vendor: 3,643 bytes, lines 1-88
1/******/ (function(modules) { // webpackBootstrap 2/******/ // The module cache 3/******/ var installedModules = {}; 4/******/ 5/******/ // The require function 6/******/ function __webpack_require__(moduleId) { 7/******/ 8/******/ // Check if module is in cache 9/******/ if(installedModules[moduleId]) { 10/******/ return installedModules[moduleId].exports; 11/******/ } 12/******/ // Create a new module (and put it into the cache) 13/******/ var module = installedModules[moduleId] = { 14/******/ i: moduleId, 15/******/ l: false, 16/******/ exports: {} 17/******/ }; 18/******/ 19/******/ // Execute the module function 20/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); 21/******/ 22/******/ // Flag the module as loaded 23/******/ module.l = true; 24/******/ 25/******/ // Return the exports of the module 26/******/ return module.exports; 27/******/ } 28/******/ 29/******/ 30/******/ // expose the modules object (__webpack_modules__) 31/******/ __webpack_require__.m = modules; 32/******/ 33/******/ // expose the module cache 34/******/ __webpack_require__.c = installedModules; 35/******/ 36/******/ // define getter function for harmony exports 37/******/ __webpack_require__.d = function(exports, name, getter) { 38/******/ if(!__webpack_require__.o(exports, name)) { 39/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); 40/******/ } 41/******/ }; 42/******/ 43/******/ // define __esModule on exports 44/******/ __webpack_require__.r = function(exports) { 45/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { 46/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); 47/******/ } 48/******/ Object.defineProperty(exports, '__esModule', { value: true }); 49/******/ }; 50/******/ 51/******/ // create a fake namespace object 52/******/ // mode & 1: value is a module id, require it 53/******/ // mode & 2: merge all properties of value into the ns 54/******/ // mode & 4: return value when already ns object 55/******/ // mode & 8|1: behave like require 56/******/ __webpack_require__.t = function(value, mode) { 57/******/ if(mode & 1) value = __webpack_require__(value); 58/******/ if(mode & 8) return value; 59/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; 60/******/ var ns = Object.create(null); 61/******/ __webpack_require__.r(ns); 62/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); 63/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); 64/******/ return ns; 65/******/ }; 66/******/ 67/******/ // getDefaultExport function for compatibility with non-harmony modules 68/******/ __webpack_require__.n = function(module) { 69/******/ var getter = module && module.__esModule ? 70/******/ function getDefault() { return module['default']; } : 71/******/ function getModuleExports() { return module; }; 72/******/ __webpack_require__.d(getter, 'a', getter); 73/******/ return getter; 74/******/ }; 75/******/ 76/******/ // Object.prototype.hasOwnProperty.call 77/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; 78/******/ 79/******/ // __webpack_public_path__ 80/******/ __webpack_require__.p = "/wp-content/themes/just-keep-living-website/dist/"; 81/******/ 82/******/ 83/******/ // Load entry module and return exports 84/******/ return __webpack_require__(__webpack_require__.s = 0); 85/******/ }) 86/************************************************************************/ 87/******/ ({ 88
vendor: 399 bytes, lines 89-99
89/***/ "./node_modules/bootstrap/dist/css/bootstrap-grid.css": 90/*!************************************************************!*\ 91 !*** ./node_modules/bootstrap/dist/css/bootstrap-grid.css ***! 92 \************************************************************/ 93/*! no static exports found */ 94/***/ (function(module, exports, __webpack_require__) { 95 96// extracted by mini-css-extract-plugin 97 98/***/ }), 99
vendor: 58,137 bytes, lines 100-1636
100/***/ "./node_modules/dom7/dist/dom7.modular.js": 101/*!************************************************!*\ 102 !*** ./node_modules/dom7/dist/dom7.modular.js ***! 103 \************************************************/ 104/*! exports provided: $, addClass, removeClass, hasClass, toggleClass, attr, removeAttr, prop, data, removeData, dataset, val, transform, transition, on, off, once, trigger, transitionEnd, animationEnd, width, outerWidth, height, outerHeight, offset, hide, show, styles, css, toArray, each, forEach, filter, map, html, text, is, indexOf, index, eq, append, appendTo, prepend, prependTo, insertBefore, insertAfter, next, nextAll, prev, prevAll, siblings, parent, parents, closest, find, children, remove, detach, add, empty, scrollTo, scrollTop, scrollLeft, animate, stop, click, blur, focus, focusin, focusout, keyup, keydown, keypress, submit, change, mousedown, mousemove, mouseup, mouseenter, mouseleave, mouseout, mouseover, touchstart, touchend, touchmove, resize, scroll */ 105/***/ (function(module, __webpack_exports__, __webpack_require__) { 106 107"use strict"; 108__webpack_require__.r(__webpack_exports__); 109/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "$", function() { return $; }); 110/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "addClass", function() { return addClass; }); 111/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeClass", function() { return removeClass; }); 112/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hasClass", function() { return hasClass; }); 113/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toggleClass", function() { return toggleClass; }); 114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "attr", function() { return attr; }); 115/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeAttr", function() { return removeAttr; }); 116/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prop", function() { return prop; }); 117/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "data", function() { return data; }); 118/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "removeData", function() { return removeData; }); 119/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dataset", function() { return dataset; }); 120/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "val", function() { return val; }); 121/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transform", function() { return transform; }); 122/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transition", function() { return transition; }); 123/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "on", function() { return on; }); 124/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "off", function() { return off; }); 125/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "once", function() { return once; }); 126/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "trigger", function() { return trigger; }); 127/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transitionEnd", function() { return transitionEnd; }); 128/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animationEnd", function() { return animationEnd; }); 129/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "width", function() { return width; }); 130/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "outerWidth", function() { return outerWidth; }); 131/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "height", function() { return height; }); 132/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "outerHeight", function() { return outerHeight; }); 133/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "offset", function() { return offset; }); 134/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hide", function() { return hide; }); 135/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "show", function() { return show; }); 136/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "styles", function() { return styles; }); 137/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "css", function() { return css; }); 138/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; }); 139/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "each", function() { return each; }); 140/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "forEach", function() { return forEach; }); 141/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return filter; }); 142/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); 143/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "html", function() { return html; }); 144/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "text", function() { return text; }); 145/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "is", function() { return is; }); 146/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexOf", function() { return indexOf; }); 147/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "index", function() { return index; }); 148/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eq", function() { return eq; }); 149/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "append", function() { return append; }); 150/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "appendTo", function() { return appendTo; }); 151/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prepend", function() { return prepend; }); 152/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prependTo", function() { return prependTo; }); 153/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertBefore", function() { return insertBefore; }); 154/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "insertAfter", function() { return insertAfter; }); 155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "next", function() { return next; }); 156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nextAll", function() { return nextAll; }); 157/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prev", function() { return prev; }); 158/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prevAll", function() { return prevAll; }); 159/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "siblings", function() { return siblings; }); 160/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parent", function() { return parent; }); 161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parents", function() { return parents; }); 162/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "closest", function() { return closest; }); 163/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "find", function() { return find; }); 164/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "children", function() { return children; }); 165/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "remove", function() { return remove; }); 166/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "detach", function() { return detach; }); 167/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "add", function() { return add; }); 168/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "empty", function() { return empty; }); 169/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollTo", function() { return scrollTo; }); 170/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollTop", function() { return scrollTop; }); 171/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scrollLeft", function() { return scrollLeft; }); 172/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "animate", function() { return animate; }); 173/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stop", function() { return stop; }); 174/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "click", function() { return click; }); 175/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blur", function() { return blur; }); 176/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focus", function() { return focus; }); 177/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focusin", function() { return focusin; }); 178/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "focusout", function() { return focusout; }); 179/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keyup", function() { return keyup; }); 180/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keydown", function() { return keydown; }); 181/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "keypress", function() { return keypress; }); 182/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "submit", function() { return submit; }); 183/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "change", function() { return change; }); 184/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mousedown", function() { return mousedown; }); 185/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mousemove", function() { return mousemove; }); 186/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseup", function() { return mouseup; }); 187/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseenter", function() { return mouseenter; }); 188/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseleave", function() { return mouseleave; }); 189/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseout", function() { return mouseout; }); 190/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mouseover", function() { return mouseover; }); 191/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touchstart", function() { return touchstart; }); 192/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touchend", function() { return touchend; }); 193/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "touchmove", function() { return touchmove; }); 194/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "resize", function() { return resize; }); 195/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "scroll", function() { return scroll; }); 196/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/dist/ssr-window.esm.js"); 197function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 198function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 199function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 200function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 201function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 202function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 203/** 204 * Dom7 2.1.5 205 * Minimalistic JavaScript library for DOM manipulation, with a jQuery-compatible API 206 * http://framework7.io/docs/dom.html 207 * 208 * Copyright 2020, Vladimir Kharlampidi 209 * The iDangero.us 210 * http://www.idangero.us/ 211 * 212 * Licensed under MIT 213 * 214 * Released on: May 15, 2020 215 */ 216 217var Dom7 = /*#__PURE__*/_createClass(function Dom7(arr) { 218 _classCallCheck(this, Dom7); 219 var self = this; 220 // Create array-like object 221 for (var i = 0; i < arr.length; i += 1) { 222 self[i] = arr[i]; 223 } 224 self.length = arr.length; 225 // Return collection with methods 226 return this; 227}); 228function $(selector, context) { 229 var arr = []; 230 var i = 0; 231 if (selector && !context) { 232 if (selector instanceof Dom7) { 233 return selector; 234 } 235 } 236 if (selector) { 237 // String 238 if (typeof selector === 'string') { 239 var els; 240 var tempParent; 241 var _html = selector.trim(); 242 if (_html.indexOf('<') >= 0 && _html.indexOf('>') >= 0) { 243 var toCreate = 'div'; 244 if (_html.indexOf('<li') === 0) toCreate = 'ul'; 245 if (_html.indexOf('<tr') === 0) toCreate = 'tbody'; 246 if (_html.indexOf('<td') === 0 || _html.indexOf('<th') === 0) toCreate = 'tr'; 247 if (_html.indexOf('<tbody') === 0) toCreate = 'table'; 248 if (_html.indexOf('<option') === 0) toCreate = 'select'; 249 tempParent = ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"].createElement(toCreate); 250 tempParent.innerHTML = _html; 251 for (i = 0; i < tempParent.childNodes.length; i += 1) { 252 arr.push(tempParent.childNodes[i]); 253 } 254 } else { 255 if (!context && selector[0] === '#' && !selector.match(/[ .<>:~]/)) { 256 // Pure ID selector 257 els = [ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"].getElementById(selector.trim().split('#')[1])]; 258 } else { 259 // Other selectors 260 els = (context || ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"]).querySelectorAll(selector.trim()); 261 } 262 for (i = 0; i < els.length; i += 1) { 263 if (els[i]) arr.push(els[i]); 264 } 265 } 266 } else if (selector.nodeType || selector === ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"] || selector === ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"]) { 267 // Node/element 268 arr.push(selector); 269 } else if (selector.length > 0 && selector[0].nodeType) { 270 // Array of elements or instance of Dom 271 for (i = 0; i < selector.length; i += 1) { 272 arr.push(selector[i]); 273 } 274 } 275 } 276 return new Dom7(arr); 277} 278$.fn = Dom7.prototype; 279$.Class = Dom7; 280$.Dom7 = Dom7; 281function unique(arr) { 282 var uniqueArray = []; 283 for (var i = 0; i < arr.length; i += 1) { 284 if (uniqueArray.indexOf(arr[i]) === -1) uniqueArray.push(arr[i]); 285 } 286 return uniqueArray; 287} 288function toCamelCase(string) { 289 return string.toLowerCase().replace(/-(.)/g, function (match, group1) { 290 return group1.toUpperCase(); 291 }); 292} 293function requestAnimationFrame(callback) { 294 if (ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].requestAnimationFrame) return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].requestAnimationFrame(callback);else if (ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].webkitRequestAnimationFrame) return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].webkitRequestAnimationFrame(callback); 295 return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].setTimeout(callback, 1000 / 60); 296} 297function cancelAnimationFrame(id) { 298 if (ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].cancelAnimationFrame) return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].cancelAnimationFrame(id);else if (ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].webkitCancelAnimationFrame) return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].webkitCancelAnimationFrame(id); 299 return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].clearTimeout(id); 300} 301 302// Classes and attributes 303function addClass(className) { 304 if (typeof className === 'undefined') { 305 return this; 306 } 307 var classes = className.split(' '); 308 for (var i = 0; i < classes.length; i += 1) { 309 for (var j = 0; j < this.length; j += 1) { 310 if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.add(classes[i]); 311 } 312 } 313 return this; 314} 315function removeClass(className) { 316 var classes = className.split(' '); 317 for (var i = 0; i < classes.length; i += 1) { 318 for (var j = 0; j < this.length; j += 1) { 319 if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.remove(classes[i]); 320 } 321 } 322 return this; 323} 324function hasClass(className) { 325 if (!this[0]) return false; 326 return this[0].classList.contains(className); 327} 328function toggleClass(className) { 329 var classes = className.split(' '); 330 for (var i = 0; i < classes.length; i += 1) { 331 for (var j = 0; j < this.length; j += 1) { 332 if (typeof this[j] !== 'undefined' && typeof this[j].classList !== 'undefined') this[j].classList.toggle(classes[i]); 333 } 334 } 335 return this; 336} 337function attr(attrs, value) { 338 if (arguments.length === 1 && typeof attrs === 'string') { 339 // Get attr 340 if (this[0]) return this[0].getAttribute(attrs); 341 return undefined; 342 } 343 344 // Set attrs 345 for (var i = 0; i < this.length; i += 1) { 346 if (arguments.length === 2) { 347 // String 348 this[i].setAttribute(attrs, value); 349 } else { 350 // Object 351 // eslint-disable-next-line 352 for (var attrName in attrs) { 353 this[i][attrName] = attrs[attrName]; 354 this[i].setAttribute(attrName, attrs[attrName]); 355 } 356 } 357 } 358 return this; 359} 360// eslint-disable-next-line 361function removeAttr(attr) { 362 for (var i = 0; i < this.length; i += 1) { 363 this[i].removeAttribute(attr); 364 } 365 return this; 366} 367// eslint-disable-next-line 368function prop(props, value) { 369 if (arguments.length === 1 && typeof props === 'string') { 370 // Get prop 371 if (this[0]) return this[0][props]; 372 } else { 373 // Set props 374 for (var i = 0; i < this.length; i += 1) { 375 if (arguments.length === 2) { 376 // String 377 this[i][props] = value; 378 } else { 379 // Object 380 // eslint-disable-next-line 381 for (var propName in props) { 382 this[i][propName] = props[propName]; 383 } 384 } 385 } 386 return this; 387 } 388} 389function data(key, value) { 390 var el; 391 if (typeof value === 'undefined') { 392 el = this[0]; 393 // Get value 394 if (el) { 395 if (el.dom7ElementDataStorage && key in el.dom7ElementDataStorage) { 396 return el.dom7ElementDataStorage[key]; 397 } 398 var dataKey = el.getAttribute("data-".concat(key)); 399 if (dataKey) { 400 return dataKey; 401 } 402 return undefined; 403 } 404 return undefined; 405 } 406 407 // Set value 408 for (var i = 0; i < this.length; i += 1) { 409 el = this[i]; 410 if (!el.dom7ElementDataStorage) el.dom7ElementDataStorage = {}; 411 el.dom7ElementDataStorage[key] = value; 412 } 413 return this; 414} 415function removeData(key) { 416 for (var i = 0; i < this.length; i += 1) { 417 var el = this[i]; 418 if (el.dom7ElementDataStorage && el.dom7ElementDataStorage[key]) { 419 el.dom7ElementDataStorage[key] = null; 420 delete el.dom7ElementDataStorage[key]; 421 } 422 } 423} 424function dataset() { 425 var el = this[0]; 426 if (!el) return undefined; 427 var dataset = {}; // eslint-disable-line 428 if (el.dataset) { 429 // eslint-disable-next-line 430 for (var dataKey in el.dataset) { 431 dataset[dataKey] = el.dataset[dataKey]; 432 } 433 } else { 434 for (var i = 0; i < el.attributes.length; i += 1) { 435 // eslint-disable-next-line 436 var _attr = el.attributes[i]; 437 if (_attr.name.indexOf('data-') >= 0) { 438 dataset[toCamelCase(_attr.name.split('data-')[1])] = _attr.value; 439 } 440 } 441 } 442 // eslint-disable-next-line 443 for (var key in dataset) { 444 if (dataset[key] === 'false') dataset[key] = false;else if (dataset[key] === 'true') dataset[key] = true;else if (parseFloat(dataset[key]) === dataset[key] * 1) dataset[key] *= 1; 445 } 446 return dataset; 447} 448function val(value) { 449 var dom = this; 450 if (typeof value === 'undefined') { 451 if (dom[0]) { 452 if (dom[0].multiple && dom[0].nodeName.toLowerCase() === 'select') { 453 var values = []; 454 for (var i = 0; i < dom[0].selectedOptions.length; i += 1) { 455 values.push(dom[0].selectedOptions[i].value); 456 } 457 return values; 458 } 459 return dom[0].value; 460 } 461 return undefined; 462 } 463 for (var _i = 0; _i < dom.length; _i += 1) { 464 var el = dom[_i]; 465 if (Array.isArray(value) && el.multiple && el.nodeName.toLowerCase() === 'select') { 466 for (var j = 0; j < el.options.length; j += 1) { 467 el.options[j].selected = value.indexOf(el.options[j].value) >= 0; 468 } 469 } else { 470 el.value = value; 471 } 472 } 473 return dom; 474} 475// Transforms 476// eslint-disable-next-line 477function transform(transform) { 478 for (var i = 0; i < this.length; i += 1) { 479 var elStyle = this[i].style; 480 elStyle.webkitTransform = transform; 481 elStyle.transform = transform; 482 } 483 return this; 484} 485function transition(duration) { 486 if (typeof duration !== 'string') { 487 duration = "".concat(duration, "ms"); // eslint-disable-line 488 } 489 for (var i = 0; i < this.length; i += 1) { 490 var elStyle = this[i].style; 491 elStyle.webkitTransitionDuration = duration; 492 elStyle.transitionDuration = duration; 493 } 494 return this; 495} 496// Events 497function on() { 498 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 499 args[_key] = arguments[_key]; 500 } 501 var eventType = args[0], 502 targetSelector = args[1], 503 listener = args[2], 504 capture = args[3]; 505 if (typeof args[1] === 'function') { 506 eventType = args[0]; 507 listener = args[1]; 508 capture = args[2]; 509 targetSelector = undefined; 510 } 511 if (!capture) capture = false; 512 function handleLiveEvent(e) { 513 var target = e.target; 514 if (!target) return; 515 var eventData = e.target.dom7EventData || []; 516 if (eventData.indexOf(e) < 0) { 517 eventData.unshift(e); 518 } 519 if ($(target).is(targetSelector)) listener.apply(target, eventData);else { 520 var _parents = $(target).parents(); // eslint-disable-line 521 for (var k = 0; k < _parents.length; k += 1) { 522 if ($(_parents[k]).is(targetSelector)) listener.apply(_parents[k], eventData); 523 } 524 } 525 } 526 function handleEvent(e) { 527 var eventData = e && e.target ? e.target.dom7EventData || [] : []; 528 if (eventData.indexOf(e) < 0) { 529 eventData.unshift(e); 530 } 531 listener.apply(this, eventData); 532 } 533 var events = eventType.split(' '); 534 var j; 535 for (var i = 0; i < this.length; i += 1) { 536 var el = this[i]; 537 if (!targetSelector) { 538 for (j = 0; j < events.length; j += 1) { 539 var event = events[j]; 540 if (!el.dom7Listeners) el.dom7Listeners = {}; 541 if (!el.dom7Listeners[event]) el.dom7Listeners[event] = []; 542 el.dom7Listeners[event].push({ 543 listener: listener, 544 proxyListener: handleEvent 545 }); 546 el.addEventListener(event, handleEvent, capture); 547 } 548 } else { 549 // Live events 550 for (j = 0; j < events.length; j += 1) { 551 var _event = events[j]; 552 if (!el.dom7LiveListeners) el.dom7LiveListeners = {}; 553 if (!el.dom7LiveListeners[_event]) el.dom7LiveListeners[_event] = []; 554 el.dom7LiveListeners[_event].push({ 555 listener: listener, 556 proxyListener: handleLiveEvent 557 }); 558 el.addEventListener(_event, handleLiveEvent, capture); 559 } 560 } 561 } 562 return this; 563} 564function off() { 565 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 566 args[_key2] = arguments[_key2]; 567 } 568 var eventType = args[0], 569 targetSelector = args[1], 570 listener = args[2], 571 capture = args[3]; 572 if (typeof args[1] === 'function') { 573 eventType = args[0]; 574 listener = args[1]; 575 capture = args[2]; 576 targetSelector = undefined; 577 } 578 if (!capture) capture = false; 579 var events = eventType.split(' '); 580 for (var i = 0; i < events.length; i += 1) { 581 var event = events[i]; 582 for (var j = 0; j < this.length; j += 1) { 583 var el = this[j]; 584 var handlers = void 0; 585 if (!targetSelector && el.dom7Listeners) { 586 handlers = el.dom7Listeners[event]; 587 } else if (targetSelector && el.dom7LiveListeners) { 588 handlers = el.dom7LiveListeners[event]; 589 } 590 if (handlers && handlers.length) { 591 for (var k = handlers.length - 1; k >= 0; k -= 1) { 592 var handler = handlers[k]; 593 if (listener && handler.listener === listener) { 594 el.removeEventListener(event, handler.proxyListener, capture); 595 handlers.splice(k, 1); 596 } else if (listener && handler.listener && handler.listener.dom7proxy && handler.listener.dom7proxy === listener) { 597 el.removeEventListener(event, handler.proxyListener, capture); 598 handlers.splice(k, 1); 599 } else if (!listener) { 600 el.removeEventListener(event, handler.proxyListener, capture); 601 handlers.splice(k, 1); 602 } 603 } 604 } 605 } 606 } 607 return this; 608} 609function once() { 610 var dom = this; 611 for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) { 612 args[_key3] = arguments[_key3]; 613 } 614 var eventName = args[0], 615 targetSelector = args[1], 616 listener = args[2], 617 capture = args[3]; 618 if (typeof args[1] === 'function') { 619 eventName = args[0]; 620 listener = args[1]; 621 capture = args[2]; 622 targetSelector = undefined; 623 } 624 function onceHandler() { 625 for (var _len4 = arguments.length, eventArgs = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) { 626 eventArgs[_key4] = arguments[_key4]; 627 } 628 listener.apply(this, eventArgs); 629 dom.off(eventName, targetSelector, onceHandler, capture); 630 if (onceHandler.dom7proxy) { 631 delete onceHandler.dom7proxy; 632 } 633 } 634 onceHandler.dom7proxy = listener; 635 return dom.on(eventName, targetSelector, onceHandler, capture); 636} 637function trigger() { 638 for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { 639 args[_key5] = arguments[_key5]; 640 } 641 var events = args[0].split(' '); 642 var eventData = args[1]; 643 for (var i = 0; i < events.length; i += 1) { 644 var event = events[i]; 645 for (var j = 0; j < this.length; j += 1) { 646 var el = this[j]; 647 var evt = void 0; 648 try { 649 evt = new ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].CustomEvent(event, { 650 detail: eventData, 651 bubbles: true, 652 cancelable: true 653 }); 654 } catch (e) { 655 evt = ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"].createEvent('Event'); 656 evt.initEvent(event, true, true); 657 evt.detail = eventData; 658 } 659 // eslint-disable-next-line 660 el.dom7EventData = args.filter(function (data, dataIndex) { 661 return dataIndex > 0; 662 }); 663 el.dispatchEvent(evt); 664 el.dom7EventData = []; 665 delete el.dom7EventData; 666 } 667 } 668 return this; 669} 670function transitionEnd(callback) { 671 var events = ['webkitTransitionEnd', 'transitionend']; 672 var dom = this; 673 var i; 674 function fireCallBack(e) { 675 /* jshint validthis:true */ 676 if (e.target !== this) return; 677 callback.call(this, e); 678 for (i = 0; i < events.length; i += 1) { 679 dom.off(events[i], fireCallBack); 680 } 681 } 682 if (callback) { 683 for (i = 0; i < events.length; i += 1) { 684 dom.on(events[i], fireCallBack); 685 } 686 } 687 return this; 688} 689function animationEnd(callback) { 690 var events = ['webkitAnimationEnd', 'animationend']; 691 var dom = this; 692 var i; 693 function fireCallBack(e) { 694 if (e.target !== this) return; 695 callback.call(this, e); 696 for (i = 0; i < events.length; i += 1) { 697 dom.off(events[i], fireCallBack); 698 } 699 } 700 if (callback) { 701 for (i = 0; i < events.length; i += 1) { 702 dom.on(events[i], fireCallBack); 703 } 704 } 705 return this; 706} 707// Sizing/Styles 708function width() { 709 if (this[0] === ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"]) { 710 return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].innerWidth; 711 } 712 if (this.length > 0) { 713 return parseFloat(this.css('width')); 714 } 715 return null; 716} 717function outerWidth(includeMargins) { 718 if (this.length > 0) { 719 if (includeMargins) { 720 // eslint-disable-next-line 721 var _styles = this.styles(); 722 return this[0].offsetWidth + parseFloat(_styles.getPropertyValue('margin-right')) + parseFloat(_styles.getPropertyValue('margin-left')); 723 } 724 return this[0].offsetWidth; 725 } 726 return null; 727} 728function height() { 729 if (this[0] === ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"]) { 730 return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].innerHeight; 731 } 732 if (this.length > 0) { 733 return parseFloat(this.css('height')); 734 } 735 return null; 736} 737function outerHeight(includeMargins) { 738 if (this.length > 0) { 739 if (includeMargins) { 740 // eslint-disable-next-line 741 var _styles2 = this.styles(); 742 return this[0].offsetHeight + parseFloat(_styles2.getPropertyValue('margin-top')) + parseFloat(_styles2.getPropertyValue('margin-bottom')); 743 } 744 return this[0].offsetHeight; 745 } 746 return null; 747} 748function offset() { 749 if (this.length > 0) { 750 var el = this[0]; 751 var box = el.getBoundingClientRect(); 752 var body = ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"].body; 753 var clientTop = el.clientTop || body.clientTop || 0; 754 var clientLeft = el.clientLeft || body.clientLeft || 0; 755 var _scrollTop = el === ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"] ? ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].scrollY : el.scrollTop; 756 var _scrollLeft = el === ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"] ? ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].scrollX : el.scrollLeft; 757 return { 758 top: box.top + _scrollTop - clientTop, 759 left: box.left + _scrollLeft - clientLeft 760 }; 761 } 762 return null; 763} 764function hide() { 765 for (var i = 0; i < this.length; i += 1) { 766 this[i].style.display = 'none'; 767 } 768 return this; 769} 770function show() { 771 for (var i = 0; i < this.length; i += 1) { 772 var el = this[i]; 773 if (el.style.display === 'none') { 774 el.style.display = ''; 775 } 776 if (ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].getComputedStyle(el, null).getPropertyValue('display') === 'none') { 777 // Still not visible 778 el.style.display = 'block'; 779 } 780 } 781 return this; 782} 783function styles() { 784 if (this[0]) return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].getComputedStyle(this[0], null); 785 return {}; 786} 787function css(props, value) { 788 var i; 789 if (arguments.length === 1) { 790 if (typeof props === 'string') { 791 if (this[0]) return ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].getComputedStyle(this[0], null).getPropertyValue(props); 792 } else { 793 for (i = 0; i < this.length; i += 1) { 794 // eslint-disable-next-line 795 for (var _prop in props) { 796 this[i].style[_prop] = props[_prop]; 797 } 798 } 799 return this; 800 } 801 } 802 if (arguments.length === 2 && typeof props === 'string') { 803 for (i = 0; i < this.length; i += 1) { 804 this[i].style[props] = value; 805 } 806 return this; 807 } 808 return this; 809} 810 811// Dom manipulation 812function toArray() { 813 var arr = []; 814 for (var i = 0; i < this.length; i += 1) { 815 arr.push(this[i]); 816 } 817 return arr; 818} 819// Iterate over the collection passing elements to `callback` 820function each(callback) { 821 // Don't bother continuing without a callback 822 if (!callback) return this; 823 // Iterate over the current collection 824 for (var i = 0; i < this.length; i += 1) { 825 // If the callback returns false 826 if (callback.call(this[i], i, this[i]) === false) { 827 // End the loop early 828 return this; 829 } 830 } 831 // Return `this` to allow chained DOM operations 832 return this; 833} 834function forEach(callback) { 835 // Don't bother continuing without a callback 836 if (!callback) return this; 837 // Iterate over the current collection 838 for (var i = 0; i < this.length; i += 1) { 839 // If the callback returns false 840 if (callback.call(this[i], this[i], i) === false) { 841 // End the loop early 842 return this; 843 } 844 } 845 // Return `this` to allow chained DOM operations 846 return this; 847} 848function filter(callback) { 849 var matchedItems = []; 850 var dom = this; 851 for (var i = 0; i < dom.length; i += 1) { 852 if (callback.call(dom[i], i, dom[i])) matchedItems.push(dom[i]); 853 } 854 return new Dom7(matchedItems); 855} 856function map(callback) { 857 var modifiedItems = []; 858 var dom = this; 859 for (var i = 0; i < dom.length; i += 1) { 860 modifiedItems.push(callback.call(dom[i], i, dom[i])); 861 } 862 return new Dom7(modifiedItems); 863} 864// eslint-disable-next-line 865function html(html) { 866 if (typeof html === 'undefined') { 867 return this[0] ? this[0].innerHTML : undefined; 868 } 869 for (var i = 0; i < this.length; i += 1) { 870 this[i].innerHTML = html; 871 } 872 return this; 873} 874// eslint-disable-next-line 875function text(text) { 876 if (typeof text === 'undefined') { 877 if (this[0]) { 878 return this[0].textContent.trim(); 879 } 880 return null; 881 } 882 for (var i = 0; i < this.length; i += 1) { 883 this[i].textContent = text; 884 } 885 return this; 886} 887function is(selector) { 888 var el = this[0]; 889 var compareWith; 890 var i; 891 if (!el || typeof selector === 'undefined') return false; 892 if (typeof selector === 'string') { 893 if (el.matches) return el.matches(selector);else if (el.webkitMatchesSelector) return el.webkitMatchesSelector(selector);else if (el.msMatchesSelector) return el.msMatchesSelector(selector); 894 compareWith = $(selector); 895 for (i = 0; i < compareWith.length; i += 1) { 896 if (compareWith[i] === el) return true; 897 } 898 return false; 899 } else if (selector === ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"]) return el === ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"];else if (selector === ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"]) return el === ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"]; 900 if (selector.nodeType || selector instanceof Dom7) { 901 compareWith = selector.nodeType ? [selector] : selector; 902 for (i = 0; i < compareWith.length; i += 1) { 903 if (compareWith[i] === el) return true; 904 } 905 return false; 906 } 907 return false; 908} 909function indexOf(el) { 910 for (var i = 0; i < this.length; i += 1) { 911 if (this[i] === el) return i; 912 } 913 return -1; 914} 915function index() { 916 var child = this[0]; 917 var i; 918 if (child) { 919 i = 0; 920 // eslint-disable-next-line 921 while ((child = child.previousSibling) !== null) { 922 if (child.nodeType === 1) i += 1; 923 } 924 return i; 925 } 926 return undefined; 927} 928// eslint-disable-next-line 929function eq(index) { 930 if (typeof index === 'undefined') return this; 931 var length = this.length; 932 var returnIndex; 933 if (index > length - 1) { 934 return new Dom7([]); 935 } 936 if (index < 0) { 937 returnIndex = length + index; 938 if (returnIndex < 0) return new Dom7([]); 939 return new Dom7([this[returnIndex]]); 940 } 941 return new Dom7([this[index]]); 942} 943function append() { 944 var newChild; 945 for (var k = 0; k < arguments.length; k += 1) { 946 newChild = k < 0 || arguments.length <= k ? undefined : arguments[k]; 947 for (var i = 0; i < this.length; i += 1) { 948 if (typeof newChild === 'string') { 949 var tempDiv = ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"].createElement('div'); 950 tempDiv.innerHTML = newChild; 951 while (tempDiv.firstChild) { 952 this[i].appendChild(tempDiv.firstChild); 953 } 954 } else if (newChild instanceof Dom7) { 955 for (var j = 0; j < newChild.length; j += 1) { 956 this[i].appendChild(newChild[j]); 957 } 958 } else { 959 this[i].appendChild(newChild); 960 } 961 } 962 } 963 return this; 964} 965// eslint-disable-next-line 966function appendTo(parent) { 967 $(parent).append(this); 968 return this; 969} 970function prepend(newChild) { 971 var i; 972 var j; 973 for (i = 0; i < this.length; i += 1) { 974 if (typeof newChild === 'string') { 975 var tempDiv = ssr_window__WEBPACK_IMPORTED_MODULE_0__["document"].createElement('div'); 976 tempDiv.innerHTML = newChild; 977 for (j = tempDiv.childNodes.length - 1; j >= 0; j -= 1) { 978 this[i].insertBefore(tempDiv.childNodes[j], this[i].childNodes[0]); 979 } 980 } else if (newChild instanceof Dom7) { 981 for (j = 0; j < newChild.length; j += 1) { 982 this[i].insertBefore(newChild[j], this[i].childNodes[0]); 983 } 984 } else { 985 this[i].insertBefore(newChild, this[i].childNodes[0]); 986 } 987 } 988 return this; 989} 990// eslint-disable-next-line 991function prependTo(parent) { 992 $(parent).prepend(this); 993 return this; 994} 995function insertBefore(selector) { 996 var before = $(selector); 997 for (var i = 0; i < this.length; i += 1) { 998 if (before.length === 1) { 999 before[0].parentNode.insertBefore(this[i], before[0]); 1000 } else if (before.length > 1) { 1001 for (var j = 0; j < before.length; j += 1) { 1002 before[j].parentNode.insertBefore(this[i].cloneNode(true), before[j]); 1003 } 1004 } 1005 } 1006} 1007function insertAfter(selector) { 1008 var after = $(selector); 1009 for (var i = 0; i < this.length; i += 1) { 1010 if (after.length === 1) { 1011 after[0].parentNode.insertBefore(this[i], after[0].nextSibling); 1012 } else if (after.length > 1) { 1013 for (var j = 0; j < after.length; j += 1) { 1014 after[j].parentNode.insertBefore(this[i].cloneNode(true), after[j].nextSibling); 1015 } 1016 } 1017 } 1018} 1019function next(selector) { 1020 if (this.length > 0) { 1021 if (selector) { 1022 if (this[0].nextElementSibling && $(this[0].nextElementSibling).is(selector)) { 1023 return new Dom7([this[0].nextElementSibling]); 1024 } 1025 return new Dom7([]); 1026 } 1027 if (this[0].nextElementSibling) return new Dom7([this[0].nextElementSibling]); 1028 return new Dom7([]); 1029 } 1030 return new Dom7([]); 1031} 1032function nextAll(selector) { 1033 var nextEls = []; 1034 var el = this[0]; 1035 if (!el) return new Dom7([]); 1036 while (el.nextElementSibling) { 1037 var _next = el.nextElementSibling; // eslint-disable-line 1038 if (selector) { 1039 if ($(_next).is(selector)) nextEls.push(_next); 1040 } else nextEls.push(_next); 1041 el = _next; 1042 } 1043 return new Dom7(nextEls); 1044} 1045function prev(selector) { 1046 if (this.length > 0) { 1047 var el = this[0]; 1048 if (selector) { 1049 if (el.previousElementSibling && $(el.previousElementSibling).is(selector)) { 1050 return new Dom7([el.previousElementSibling]); 1051 } 1052 return new Dom7([]); 1053 } 1054 if (el.previousElementSibling) return new Dom7([el.previousElementSibling]); 1055 return new Dom7([]); 1056 } 1057 return new Dom7([]); 1058} 1059function prevAll(selector) { 1060 var prevEls = []; 1061 var el = this[0]; 1062 if (!el) return new Dom7([]); 1063 while (el.previousElementSibling) { 1064 var _prev = el.previousElementSibling; // eslint-disable-line 1065 if (selector) { 1066 if ($(_prev).is(selector)) prevEls.push(_prev); 1067 } else prevEls.push(_prev); 1068 el = _prev; 1069 } 1070 return new Dom7(prevEls); 1071} 1072function siblings(selector) { 1073 return this.nextAll(selector).add(this.prevAll(selector)); 1074} 1075function parent(selector) { 1076 var parents = []; // eslint-disable-line 1077 for (var i = 0; i < this.length; i += 1) { 1078 if (this[i].parentNode !== null) { 1079 if (selector) { 1080 if ($(this[i].parentNode).is(selector)) parents.push(this[i].parentNode); 1081 } else { 1082 parents.push(this[i].parentNode); 1083 } 1084 } 1085 } 1086 return $(unique(parents)); 1087} 1088function parents(selector) { 1089 var parents = []; // eslint-disable-line 1090 for (var i = 0; i < this.length; i += 1) { 1091 var _parent = this[i].parentNode; // eslint-disable-line 1092 while (_parent) { 1093 if (selector) { 1094 if ($(_parent).is(selector)) parents.push(_parent); 1095 } else { 1096 parents.push(_parent); 1097 } 1098 _parent = _parent.parentNode; 1099 } 1100 } 1101 return $(unique(parents)); 1102} 1103function closest(selector) { 1104 var closest = this; // eslint-disable-line 1105 if (typeof selector === 'undefined') { 1106 return new Dom7([]); 1107 } 1108 if (!closest.is(selector)) { 1109 closest = closest.parents(selector).eq(0); 1110 } 1111 return closest; 1112} 1113function find(selector) { 1114 var foundElements = []; 1115 for (var i = 0; i < this.length; i += 1) { 1116 var found = this[i].querySelectorAll(selector); 1117 for (var j = 0; j < found.length; j += 1) { 1118 foundElements.push(found[j]); 1119 } 1120 } 1121 return new Dom7(foundElements); 1122} 1123function children(selector) { 1124 var children = []; // eslint-disable-line 1125 for (var i = 0; i < this.length; i += 1) { 1126 var childNodes = this[i].childNodes; 1127 for (var j = 0; j < childNodes.length; j += 1) { 1128 if (!selector) { 1129 if (childNodes[j].nodeType === 1) children.push(childNodes[j]); 1130 } else if (childNodes[j].nodeType === 1 && $(childNodes[j]).is(selector)) { 1131 children.push(childNodes[j]); 1132 } 1133 } 1134 } 1135 return new Dom7(unique(children)); 1136} 1137function remove() { 1138 for (var i = 0; i < this.length; i += 1) { 1139 if (this[i].parentNode) this[i].parentNode.removeChild(this[i]); 1140 } 1141 return this; 1142} 1143function detach() { 1144 return this.remove(); 1145} 1146function add() { 1147 var dom = this; 1148 var i; 1149 var j; 1150 for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { 1151 args[_key6] = arguments[_key6]; 1152 } 1153 for (i = 0; i < args.length; i += 1) { 1154 var toAdd = $(args[i]); 1155 for (j = 0; j < toAdd.length; j += 1) { 1156 dom[dom.length] = toAdd[j]; 1157 dom.length += 1; 1158 } 1159 } 1160 return dom; 1161} 1162function empty() { 1163 for (var i = 0; i < this.length; i += 1) { 1164 var el = this[i]; 1165 if (el.nodeType === 1) { 1166 for (var j = 0; j < el.childNodes.length; j += 1) { 1167 if (el.childNodes[j].parentNode) { 1168 el.childNodes[j].parentNode.removeChild(el.childNodes[j]); 1169 } 1170 } 1171 el.textContent = ''; 1172 } 1173 } 1174 return this; 1175} 1176function scrollTo() { 1177 for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) { 1178 args[_key7] = arguments[_key7]; 1179 } 1180 var left = args[0], 1181 top = args[1], 1182 duration = args[2], 1183 easing = args[3], 1184 callback = args[4]; 1185 if (args.length === 4 && typeof easing === 'function') { 1186 callback = easing; 1187 left = args[0]; 1188 top = args[1]; 1189 duration = args[2]; 1190 callback = args[3]; 1191 easing = args[4]; 1192 } 1193 if (typeof easing === 'undefined') easing = 'swing'; 1194 return this.each(function animate() { 1195 var el = this; 1196 var currentTop; 1197 var currentLeft; 1198 var maxTop; 1199 var maxLeft; 1200 var newTop; 1201 var newLeft; 1202 var scrollTop; // eslint-disable-line 1203 var scrollLeft; // eslint-disable-line 1204 var animateTop = top > 0 || top === 0; 1205 var animateLeft = left > 0 || left === 0; 1206 if (typeof easing === 'undefined') { 1207 easing = 'swing'; 1208 } 1209 if (animateTop) { 1210 currentTop = el.scrollTop; 1211 if (!duration) { 1212 el.scrollTop = top; 1213 } 1214 } 1215 if (animateLeft) { 1216 currentLeft = el.scrollLeft; 1217 if (!duration) { 1218 el.scrollLeft = left; 1219 } 1220 } 1221 if (!duration) return; 1222 if (animateTop) { 1223 maxTop = el.scrollHeight - el.offsetHeight; 1224 newTop = Math.max(Math.min(top, maxTop), 0); 1225 } 1226 if (animateLeft) { 1227 maxLeft = el.scrollWidth - el.offsetWidth; 1228 newLeft = Math.max(Math.min(left, maxLeft), 0); 1229 } 1230 var startTime = null; 1231 if (animateTop && newTop === currentTop) animateTop = false; 1232 if (animateLeft && newLeft === currentLeft) animateLeft = false; 1233 function render() { 1234 var time = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date().getTime(); 1235 if (startTime === null) { 1236 startTime = time; 1237 } 1238 var progress = Math.max(Math.min((time - startTime) / duration, 1), 0); 1239 var easeProgress = easing === 'linear' ? progress : 0.5 - Math.cos(progress * Math.PI) / 2; 1240 var done; 1241 if (animateTop) scrollTop = currentTop + easeProgress * (newTop - currentTop); 1242 if (animateLeft) scrollLeft = currentLeft + easeProgress * (newLeft - currentLeft); 1243 if (animateTop && newTop > currentTop && scrollTop >= newTop) { 1244 el.scrollTop = newTop; 1245 done = true; 1246 } 1247 if (animateTop && newTop < currentTop && scrollTop <= newTop) { 1248 el.scrollTop = newTop; 1249 done = true; 1250 } 1251 if (animateLeft && newLeft > currentLeft && scrollLeft >= newLeft) { 1252 el.scrollLeft = newLeft; 1253 done = true; 1254 } 1255 if (animateLeft && newLeft < currentLeft && scrollLeft <= newLeft) { 1256 el.scrollLeft = newLeft; 1257 done = true; 1258 } 1259 if (done) { 1260 if (callback) callback(); 1261 return; 1262 } 1263 if (animateTop) el.scrollTop = scrollTop; 1264 if (animateLeft) el.scrollLeft = scrollLeft; 1265 requestAnimationFrame(render); 1266 } 1267 requestAnimationFrame(render); 1268 }); 1269} 1270// scrollTop(top, duration, easing, callback) { 1271function scrollTop() { 1272 for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) { 1273 args[_key8] = arguments[_key8]; 1274 } 1275 var top = args[0], 1276 duration = args[1], 1277 easing = args[2], 1278 callback = args[3]; 1279 if (args.length === 3 && typeof easing === 'function') { 1280 top = args[0]; 1281 duration = args[1]; 1282 callback = args[2]; 1283 easing = args[3]; 1284 } 1285 var dom = this; 1286 if (typeof top === 'undefined') { 1287 if (dom.length > 0) return dom[0].scrollTop; 1288 return null; 1289 } 1290 return dom.scrollTo(undefined, top, duration, easing, callback); 1291} 1292function scrollLeft() { 1293 for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) { 1294 args[_key9] = arguments[_key9]; 1295 } 1296 var left = args[0], 1297 duration = args[1], 1298 easing = args[2], 1299 callback = args[3]; 1300 if (args.length === 3 && typeof easing === 'function') { 1301 left = args[0]; 1302 duration = args[1]; 1303 callback = args[2]; 1304 easing = args[3]; 1305 } 1306 var dom = this; 1307 if (typeof left === 'undefined') { 1308 if (dom.length > 0) return dom[0].scrollLeft; 1309 return null; 1310 } 1311 return dom.scrollTo(left, undefined, duration, easing, callback); 1312} 1313function animate(initialProps, initialParams) { 1314 var els = this; 1315 var a = { 1316 props: Object.assign({}, initialProps), 1317 params: Object.assign({ 1318 duration: 300, 1319 easing: 'swing' // or 'linear' 1320 /* Callbacks 1321 begin(elements) 1322 complete(elements) 1323 progress(elements, complete, remaining, start, tweenValue) 1324 */ 1325 }, initialParams), 1326 elements: els, 1327 animating: false, 1328 que: [], 1329 easingProgress: function easingProgress(easing, progress) { 1330 if (easing === 'swing') { 1331 return 0.5 - Math.cos(progress * Math.PI) / 2; 1332 } 1333 if (typeof easing === 'function') { 1334 return easing(progress); 1335 } 1336 return progress; 1337 }, 1338 stop: function stop() { 1339 if (a.frameId) { 1340 cancelAnimationFrame(a.frameId); 1341 } 1342 a.animating = false; 1343 a.elements.each(function (index, el) { 1344 var element = el; 1345 delete element.dom7AnimateInstance; 1346 }); 1347 a.que = []; 1348 }, 1349 done: function done(complete) { 1350 a.animating = false; 1351 a.elements.each(function (index, el) { 1352 var element = el; 1353 delete element.dom7AnimateInstance; 1354 }); 1355 if (complete) complete(els); 1356 if (a.que.length > 0) { 1357 var que = a.que.shift(); 1358 a.animate(que[0], que[1]); 1359 } 1360 }, 1361 animate: function animate(props, params) { 1362 if (a.animating) { 1363 a.que.push([props, params]); 1364 return a; 1365 } 1366 var elements = []; 1367 1368 // Define & Cache Initials & Units 1369 a.elements.each(function (index, el) { 1370 var initialFullValue; 1371 var initialValue; 1372 var unit; 1373 var finalValue; 1374 var finalFullValue; 1375 if (!el.dom7AnimateInstance) a.elements[index].dom7AnimateInstance = a; 1376 elements[index] = { 1377 container: el 1378 }; 1379 Object.keys(props).forEach(function (prop) { 1380 initialFullValue = ssr_window__WEBPACK_IMPORTED_MODULE_0__["window"].getComputedStyle(el, null).getPropertyValue(prop).replace(',', '.'); 1381 initialValue = parseFloat(initialFullValue); 1382 unit = initialFullValue.replace(initialValue, ''); 1383 finalValue = parseFloat(props[prop]); 1384 finalFullValue = props[prop] + unit; 1385 elements[index][prop] = { 1386 initialFullValue: initialFullValue, 1387 initialValue: initialValue, 1388 unit: unit, 1389 finalValue: finalValue, 1390 finalFullValue: finalFullValue, 1391 currentValue: initialValue 1392 }; 1393 }); 1394 }); 1395 var startTime = null; 1396 var time; 1397 var elementsDone = 0; 1398 var propsDone = 0; 1399 var done; 1400 var began = false; 1401 a.animating = true; 1402 function render() { 1403 time = new Date().getTime(); 1404 var progress; 1405 var easeProgress; 1406 // let el; 1407 if (!began) { 1408 began = true; 1409 if (params.begin) params.begin(els); 1410 } 1411 if (startTime === null) { 1412 startTime = time; 1413 } 1414 if (params.progress) { 1415 // eslint-disable-next-line 1416 params.progress(els, Math.max(Math.min((time - startTime) / params.duration, 1), 0), startTime + params.duration - time < 0 ? 0 : startTime + params.duration - time, startTime); 1417 } 1418 elements.forEach(function (element) { 1419 var el = element; 1420 if (done || el.done) return; 1421 Object.keys(props).forEach(function (prop) { 1422 if (done || el.done) return; 1423 progress = Math.max(Math.min((time - startTime) / params.duration, 1), 0); 1424 easeProgress = a.easingProgress(params.easing, progress); 1425 var _el$prop = el[prop], 1426 initialValue = _el$prop.initialValue, 1427 finalValue = _el$prop.finalValue, 1428 unit = _el$prop.unit; 1429 el[prop].currentValue = initialValue + easeProgress * (finalValue - initialValue); 1430 var currentValue = el[prop].currentValue; 1431 if (finalValue > initialValue && currentValue >= finalValue || finalValue < initialValue && currentValue <= finalValue) { 1432 el.container.style[prop] = finalValue + unit; 1433 propsDone += 1; 1434 if (propsDone === Object.keys(props).length) { 1435 el.done = true; 1436 elementsDone += 1; 1437 } 1438 if (elementsDone === elements.length) { 1439 done = true; 1440 } 1441 } 1442 if (done) { 1443 a.done(params.complete); 1444 return; 1445 } 1446 el.container.style[prop] = currentValue + unit; 1447 }); 1448 }); 1449 if (done) return; 1450 // Then call 1451 a.frameId = requestAnimationFrame(render); 1452 } 1453 a.frameId = requestAnimationFrame(render); 1454 return a; 1455 } 1456 }; 1457 if (a.elements.length === 0) { 1458 return els; 1459 } 1460 var animateInstance; 1461 for (var i = 0; i < a.elements.length; i += 1) { 1462 if (a.elements[i].dom7AnimateInstance) { 1463 animateInstance = a.elements[i].dom7AnimateInstance; 1464 } else a.elements[i].dom7AnimateInstance = a; 1465 } 1466 if (!animateInstance) { 1467 animateInstance = a; 1468 } 1469 if (initialProps === 'stop') { 1470 animateInstance.stop(); 1471 } else { 1472 animateInstance.animate(a.props, a.params); 1473 } 1474 return els; 1475} 1476function stop() { 1477 var els = this; 1478 for (var i = 0; i < els.length; i += 1) { 1479 if (els[i].dom7AnimateInstance) { 1480 els[i].dom7AnimateInstance.stop(); 1481 } 1482 } 1483} 1484var noTrigger = 'resize scroll'.split(' '); 1485function eventShortcut(name) { 1486 for (var _len10 = arguments.length, args = new Array(_len10 > 1 ? _len10 - 1 : 0), _key10 = 1; _key10 < _len10; _key10++) { 1487 args[_key10 - 1] = arguments[_key10]; 1488 } 1489 if (typeof args[0] === 'undefined') { 1490 for (var i = 0; i < this.length; i += 1) { 1491 if (noTrigger.indexOf(name) < 0) { 1492 if (name in this[i]) this[i][name]();else { 1493 $(this[i]).trigger(name); 1494 } 1495 } 1496 } 1497 return this; 1498 } 1499 return this.on.apply(this, [name].concat(args)); 1500} 1501function click() { 1502 for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) { 1503 args[_key11] = arguments[_key11]; 1504 } 1505 return eventShortcut.bind(this).apply(void 0, ['click'].concat(args)); 1506} 1507function blur() { 1508 for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) { 1509 args[_key12] = arguments[_key12]; 1510 } 1511 return eventShortcut.bind(this).apply(void 0, ['blur'].concat(args)); 1512} 1513function focus() { 1514 for (var _len13 = arguments.length, args = new Array(_len13), _key13 = 0; _key13 < _len13; _key13++) { 1515 args[_key13] = arguments[_key13]; 1516 } 1517 return eventShortcut.bind(this).apply(void 0, ['focus'].concat(args)); 1518} 1519function focusin() { 1520 for (var _len14 = arguments.length, args = new Array(_len14), _key14 = 0; _key14 < _len14; _key14++) { 1521 args[_key14] = arguments[_key14]; 1522 } 1523 return eventShortcut.bind(this).apply(void 0, ['focusin'].concat(args)); 1524} 1525function focusout() { 1526 for (var _len15 = arguments.length, args = new Array(_len15), _key15 = 0; _key15 < _len15; _key15++) { 1527 args[_key15] = arguments[_key15]; 1528 } 1529 return eventShortcut.bind(this).apply(void 0, ['focusout'].concat(args)); 1530} 1531function keyup() { 1532 for (var _len16 = arguments.length, args = new Array(_len16), _key16 = 0; _key16 < _len16; _key16++) { 1533 args[_key16] = arguments[_key16]; 1534 } 1535 return eventShortcut.bind(this).apply(void 0, ['keyup'].concat(args)); 1536} 1537function keydown() { 1538 for (var _len17 = arguments.length, args = new Array(_len17), _key17 = 0; _key17 < _len17; _key17++) { 1539 args[_key17] = arguments[_key17]; 1540 } 1541 return eventShortcut.bind(this).apply(void 0, ['keydown'].concat(args)); 1542} 1543function keypress() { 1544 for (var _len18 = arguments.length, args = new Array(_len18), _key18 = 0; _key18 < _len18; _key18++) { 1545 args[_key18] = arguments[_key18]; 1546 } 1547 return eventShortcut.bind(this).apply(void 0, ['keypress'].concat(args)); 1548} 1549function submit() { 1550 for (var _len19 = arguments.length, args = new Array(_len19), _key19 = 0; _key19 < _len19; _key19++) { 1551 args[_key19] = arguments[_key19]; 1552 } 1553 return eventShortcut.bind(this).apply(void 0, ['submit'].concat(args)); 1554} 1555function change() { 1556 for (var _len20 = arguments.length, args = new Array(_len20), _key20 = 0; _key20 < _len20; _key20++) { 1557 args[_key20] = arguments[_key20]; 1558 } 1559 return eventShortcut.bind(this).apply(void 0, ['change'].concat(args)); 1560} 1561function mousedown() { 1562 for (var _len21 = arguments.length, args = new Array(_len21), _key21 = 0; _key21 < _len21; _key21++) { 1563 args[_key21] = arguments[_key21]; 1564 } 1565 return eventShortcut.bind(this).apply(void 0, ['mousedown'].concat(args)); 1566} 1567function mousemove() { 1568 for (var _len22 = arguments.length, args = new Array(_len22), _key22 = 0; _key22 < _len22; _key22++) { 1569 args[_key22] = arguments[_key22]; 1570 } 1571 return eventShortcut.bind(this).apply(void 0, ['mousemove'].concat(args)); 1572} 1573function mouseup() { 1574 for (var _len23 = arguments.length, args = new Array(_len23), _key23 = 0; _key23 < _len23; _key23++) { 1575 args[_key23] = arguments[_key23]; 1576 } 1577 return eventShortcut.bind(this).apply(void 0, ['mouseup'].concat(args)); 1578} 1579function mouseenter() { 1580 for (var _len24 = arguments.length, args = new Array(_len24), _key24 = 0; _key24 < _len24; _key24++) { 1581 args[_key24] = arguments[_key24]; 1582 } 1583 return eventShortcut.bind(this).apply(void 0, ['mouseenter'].concat(args)); 1584} 1585function mouseleave() { 1586 for (var _len25 = arguments.length, args = new Array(_len25), _key25 = 0; _key25 < _len25; _key25++) { 1587 args[_key25] = arguments[_key25]; 1588 } 1589 return eventShortcut.bind(this).apply(void 0, ['mouseleave'].concat(args)); 1590} 1591function mouseout() { 1592 for (var _len26 = arguments.length, args = new Array(_len26), _key26 = 0; _key26 < _len26; _key26++) { 1593 args[_key26] = arguments[_key26]; 1594 } 1595 return eventShortcut.bind(this).apply(void 0, ['mouseout'].concat(args)); 1596} 1597function mouseover() { 1598 for (var _len27 = arguments.length, args = new Array(_len27), _key27 = 0; _key27 < _len27; _key27++) { 1599 args[_key27] = arguments[_key27]; 1600 } 1601 return eventShortcut.bind(this).apply(void 0, ['mouseover'].concat(args)); 1602} 1603function touchstart() { 1604 for (var _len28 = arguments.length, args = new Array(_len28), _key28 = 0; _key28 < _len28; _key28++) { 1605 args[_key28] = arguments[_key28]; 1606 } 1607 return eventShortcut.bind(this).apply(void 0, ['touchstart'].concat(args)); 1608} 1609function touchend() { 1610 for (var _len29 = arguments.length, args = new Array(_len29), _key29 = 0; _key29 < _len29; _key29++) { 1611 args[_key29] = arguments[_key29]; 1612 } 1613 return eventShortcut.bind(this).apply(void 0, ['touchend'].concat(args)); 1614} 1615function touchmove() { 1616 for (var _len30 = arguments.length, args = new Array(_len30), _key30 = 0; _key30 < _len30; _key30++) { 1617 args[_key30] = arguments[_key30]; 1618 } 1619 return eventShortcut.bind(this).apply(void 0, ['touchmove'].concat(args)); 1620} 1621function resize() { 1622 for (var _len31 = arguments.length, args = new Array(_len31), _key31 = 0; _key31 < _len31; _key31++) { 1623 args[_key31] = arguments[_key31]; 1624 } 1625 return eventShortcut.bind(this).apply(void 0, ['resize'].concat(args)); 1626} 1627function scroll() { 1628 for (var _len32 = arguments.length, args = new Array(_len32), _key32 = 0; _key32 < _len32; _key32++) { 1629 args[_key32] = arguments[_key32]; 1630 } 1631 return eventShortcut.bind(this).apply(void 0, ['scroll'].concat(args)); 1632} 1633 1634 1635/***/ }), 1636
vendor: 379 bytes, lines 1637-1647
1637/***/ "./node_modules/glightbox/dist/css/glightbox.css": 1638/*!*******************************************************!*\ 1639 !*** ./node_modules/glightbox/dist/css/glightbox.css ***! 1640 \*******************************************************/ 1641/*! no static exports found */ 1642/***/ (function(module, exports, __webpack_require__) { 1643 1644// extracted by mini-css-extract-plugin 1645 1646/***/ }), 1647
vendor: 42,782 bytes, lines 1648-1658
1648/***/ "./node_modules/glightbox/dist/js/glightbox.min.js": 1649/*!*********************************************************!*\ 1650 !*** ./node_modules/glightbox/dist/js/glightbox.min.js ***! 1651 \*********************************************************/ 1652/*! no static exports found */ 1653/***/ (function(module, exports, __webpack_require__) { 1654 1655!function(t,e){ true?module.exports=e():undefined}(this,(function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function s(t){return function(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function o(t){return Math.sqrt(t.x*t.x+t.y*t.y)}function l(t,e){var i=function(t,e){var i=o(t)*o(e);if(0===i)return 0;var n=function(t,e){return t.x*e.x+t.y*e.y}(t,e)/i;return n>1&&(n=1),Math.acos(n)}(t,e);return function(t,e){return t.x*e.y-e.x*t.y}(t,e)>0&&(i*=-1),180*i/Math.PI}var r=function(){function t(i){e(this,t),this.handlers=[],this.el=i}return n(t,[{key:"add",value:function(t){this.handlers.push(t)}},{key:"del",value:function(t){t||(this.handlers=[]);for(var e=this.handlers.length;e>=0;e--)this.handlers[e]===t&&this.handlers.splice(e,1)}},{key:"dispatch",value:function(){for(var t=0,e=this.handlers.length;t<e;t++){var i=this.handlers[t];"function"==typeof i&&i.apply(this.el,arguments)}}}]),t}();function a(t,e){var i=new r(t);return i.add(e),i}var c=function(){function t(i,n){e(this,t),this.element="string"==typeof i?document.querySelector(i):i,this.start=this.start.bind(this),this.move=this.move.bind(this),this.end=this.end.bind(this),this.cancel=this.cancel.bind(this),this.element.addEventListener("touchstart",this.start,!1),this.element.addEventListener("touchmove",this.move,!1),this.element.addEventListener("touchend",this.end,!1),this.element.addEventListener("touchcancel",this.cancel,!1),this.preV={x:null,y:null},this.pinchStartLen=null,this.zoom=1,this.isDoubleTap=!1;var s=function(){};this.rotate=a(this.element,n.rotate||s),this.touchStart=a(this.element,n.touchStart||s),this.multipointStart=a(this.element,n.multipointStart||s),this.multipointEnd=a(this.element,n.multipointEnd||s),this.pinch=a(this.element,n.pinch||s),this.swipe=a(this.element,n.swipe||s),this.tap=a(this.element,n.tap||s),this.doubleTap=a(this.element,n.doubleTap||s),this.longTap=a(this.element,n.longTap||s),this.singleTap=a(this.element,n.singleTap||s),this.pressMove=a(this.element,n.pressMove||s),this.twoFingerPressMove=a(this.element,n.twoFingerPressMove||s),this.touchMove=a(this.element,n.touchMove||s),this.touchEnd=a(this.element,n.touchEnd||s),this.touchCancel=a(this.element,n.touchCancel||s),this._cancelAllHandler=this.cancelAll.bind(this),window.addEventListener("scroll",this._cancelAllHandler),this.delta=null,this.last=null,this.now=null,this.tapTimeout=null,this.singleTapTimeout=null,this.longTapTimeout=null,this.swipeTimeout=null,this.x1=this.x2=this.y1=this.y2=null,this.preTapPosition={x:null,y:null}}return n(t,[{key:"start",value:function(t){if(t.touches){this.now=Date.now(),this.x1=t.touches[0].pageX,this.y1=t.touches[0].pageY,this.delta=this.now-(this.last||this.now),this.touchStart.dispatch(t,this.element),null!==this.preTapPosition.x&&(this.isDoubleTap=this.delta>0&&this.delta<=250&&Math.abs(this.preTapPosition.x-this.x1)<30&&Math.abs(this.preTapPosition.y-this.y1)<30,this.isDoubleTap&&clearTimeout(this.singleTapTimeout)),this.preTapPosition.x=this.x1,this.preTapPosition.y=this.y1,this.last=this.now;var e=this.preV;if(t.touches.length>1){this._cancelLongTap(),this._cancelSingleTap();var i={x:t.touches[1].pageX-this.x1,y:t.touches[1].pageY-this.y1};e.x=i.x,e.y=i.y,this.pinchStartLen=o(e),this.multipointStart.dispatch(t,this.element)}this._preventTap=!1,this.longTapTimeout=setTimeout(function(){this.longTap.dispatch(t,this.element),this._preventTap=!0}.bind(this),750)}}},{key:"move",value:function(t){if(t.touches){var e=this.preV,i=t.touches.length,n=t.touches[0].pageX,s=t.touches[0].pageY;if(this.isDoubleTap=!1,i>1){var r=t.touches[1].pageX,a=t.touches[1].pageY,c={x:t.touches[1].pageX-n,y:t.touches[1].pageY-s};null!==e.x&&(this.pinchStartLen>0&&(t.zoom=o(c)/this.pinchStartLen,this.pinch.dispatch(t,this.element)),t.angle=l(c,e),this.rotate.dispatch(t,this.element)),e.x=c.x,e.y=c.y,null!==this.x2&&null!==this.sx2?(t.deltaX=(n-this.x2+r-this.sx2)/2,t.deltaY=(s-this.y2+a-this.sy2)/2):(t.deltaX=0,t.deltaY=0),this.twoFingerPressMove.dispatch(t,this.element),this.sx2=r,this.sy2=a}else{if(null!==this.x2){t.deltaX=n-this.x2,t.deltaY=s-this.y2;var h=Math.abs(this.x1-this.x2),u=Math.abs(this.y1-this.y2);(h>10||u>10)&&(this._preventTap=!0)}else t.deltaX=0,t.deltaY=0;this.pressMove.dispatch(t,this.element)}this.touchMove.dispatch(t,this.element),this._cancelLongTap(),this.x2=n,this.y2=s,i>1&&t.preventDefault()}}},{key:"end",value:function(t){if(t.changedTouches){this._cancelLongTap();var e=this;t.touches.length<2&&(this.multipointEnd.dispatch(t,this.element),this.sx2=this.sy2=null),this.x2&&Math.abs(this.x1-this.x2)>30||this.y2&&Math.abs(this.y1-this.y2)>30?(t.direction=this._swipeDirection(this.x1,this.x2,this.y1,this.y2),this.swipeTimeout=setTimeout((function(){e.swipe.dispatch(t,e.element)}),0)):(this.tapTimeout=setTimeout((function(){e._preventTap||e.tap.dispatch(t,e.element),e.isDoubleTap&&(e.doubleTap.dispatch(t,e.element),e.isDoubleTap=!1)}),0),e.isDoubleTap||(e.singleTapTimeout=setTimeout((function(){e.singleTap.dispatch(t,e.element)}),250))),this.touchEnd.dispatch(t,this.element),this.preV.x=0,this.preV.y=0,this.zoom=1,this.pinchStartLen=null,this.x1=this.x2=this.y1=this.y2=null}}},{key:"cancelAll",value:function(){this._preventTap=!0,clearTimeout(this.singleTapTimeout),clearTimeout(this.tapTimeout),clearTimeout(this.longTapTimeout),clearTimeout(this.swipeTimeout)}},{key:"cancel",value:function(t){this.cancelAll(),this.touchCancel.dispatch(t,this.element)}},{key:"_cancelLongTap",value:function(){clearTimeout(this.longTapTimeout)}},{key:"_cancelSingleTap",value:function(){clearTimeout(this.singleTapTimeout)}},{key:"_swipeDirection",value:function(t,e,i,n){return Math.abs(t-e)>=Math.abs(i-n)?t-e>0?"Left":"Right":i-n>0?"Up":"Down"}},{key:"on",value:function(t,e){this[t]&&this[t].add(e)}},{key:"off",value:function(t,e){this[t]&&this[t].del(e)}},{key:"destroy",value:function(){return this.singleTapTimeout&&clearTimeout(this.singleTapTimeout),this.tapTimeout&&clearTimeout(this.tapTimeout),this.longTapTimeout&&clearTimeout(this.longTapTimeout),this.swipeTimeout&&clearTimeout(this.swipeTimeout),this.element.removeEventListener("touchstart",this.start),this.element.removeEventListener("touchmove",this.move),this.element.removeEventListener("touchend",this.end),this.element.removeEventListener("touchcancel",this.cancel),this.rotate.del(),this.touchStart.del(),this.multipointStart.del(),this.multipointEnd.del(),this.pinch.del(),this.swipe.del(),this.tap.del(),this.doubleTap.del(),this.longTap.del(),this.singleTap.del(),this.pressMove.del(),this.twoFingerPressMove.del(),this.touchMove.del(),this.touchEnd.del(),this.touchCancel.del(),this.preV=this.pinchStartLen=this.zoom=this.isDoubleTap=this.delta=this.last=this.now=this.tapTimeout=this.singleTapTimeout=this.longTapTimeout=this.swipeTimeout=this.x1=this.x2=this.y1=this.y2=this.preTapPosition=this.rotate=this.touchStart=this.multipointStart=this.multipointEnd=this.pinch=this.swipe=this.tap=this.doubleTap=this.longTap=this.singleTap=this.pressMove=this.touchMove=this.touchEnd=this.touchCancel=this.twoFingerPressMove=null,window.removeEventListener("scroll",this._cancelAllHandler),null}}]),t}(),h=function(){function t(i,n){var s=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(e(this,t),this.img=i,this.slide=n,this.onclose=o,this.img.setZoomEvents)return!1;this.active=!1,this.zoomedIn=!1,this.dragging=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.img.addEventListener("mousedown",(function(t){return s.dragStart(t)}),!1),this.img.addEventListener("mouseup",(function(t){return s.dragEnd(t)}),!1),this.img.addEventListener("mousemove",(function(t){return s.drag(t)}),!1),this.img.addEventListener("click",(function(t){if(!s.zoomedIn)return s.zoomIn();s.zoomedIn&&!s.dragging&&s.zoomOut()}),!1),this.img.setZoomEvents=!0}return n(t,[{key:"zoomIn",value:function(){var t=this.widowWidth();if(!(this.zoomedIn||t<=768)){var e=this.img;if(e.setAttribute("data-style",e.getAttribute("style")),e.style.maxWidth=e.naturalWidth+"px",e.style.maxHeight=e.naturalHeight+"px",e.naturalWidth>t){var i=t/2-e.naturalWidth/2;this.setTranslate(this.img.parentNode,i,0)}this.slide.classList.add("zoomed"),this.zoomedIn=!0}}},{key:"zoomOut",value:function(){this.img.parentNode.setAttribute("style",""),this.img.setAttribute("style",this.img.getAttribute("data-style")),this.slide.classList.remove("zoomed"),this.zoomedIn=!1,this.currentX=null,this.currentY=null,this.initialX=null,this.initialY=null,this.xOffset=0,this.yOffset=0,this.onclose&&"function"==typeof this.onclose&&this.onclose()}},{key:"dragStart",value:function(t){t.preventDefault(),this.zoomedIn?("touchstart"===t.type?(this.initialX=t.touches[0].clientX-this.xOffset,this.initialY=t.touches[0].clientY-this.yOffset):(this.initialX=t.clientX-this.xOffset,this.initialY=t.clientY-this.yOffset),t.target===this.img&&(this.active=!0,this.img.classList.add("dragging"))):this.active=!1}},{key:"dragEnd",value:function(t){var e=this;t.preventDefault(),this.initialX=this.currentX,this.initialY=this.currentY,this.active=!1,setTimeout((function(){e.dragging=!1,e.img.isDragging=!1,e.img.classList.remove("dragging")}),100)}},{key:"drag",value:function(t){this.active&&(t.preventDefault(),"touchmove"===t.type?(this.currentX=t.touches[0].clientX-this.initialX,this.currentY=t.touches[0].clientY-this.initialY):(this.currentX=t.clientX-this.initialX,this.currentY=t.clientY-this.initialY),this.xOffset=this.currentX,this.yOffset=this.currentY,this.img.isDragging=!0,this.dragging=!0,this.setTranslate(this.img,this.currentX,this.currentY))}},{key:"onMove",value:function(t){if(this.zoomedIn){var e=t.clientX-this.img.naturalWidth/2,i=t.clientY-this.img.naturalHeight/2;this.setTranslate(this.img,e,i)}}},{key:"setTranslate",value:function(t,e,i){t.style.transform="translate3d("+e+"px, "+i+"px, 0)"}},{key:"widowWidth",value:function(){return window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth}}]),t}(),u=navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i),d=null!==u||void 0!==document.createTouch||"ontouchstart"in window||"onmsgesturechange"in window||navigator.msMaxTouchPoints,g=document.getElementsByTagName("html")[0],p=function(){var t,e=document.createElement("fakeelement"),i={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(t in i)if(void 0!==e.style[t])return i[t]}(),v=function(){var t,e=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in i)if(void 0!==e.style[t])return i[t]}(),f=Date.now(),m={},y={selector:".glightbox",elements:null,skin:"clean",closeButton:!0,startAt:null,autoplayVideos:!0,descPosition:"bottom",width:"900px",height:"506px",videosWidth:"960px",beforeSlideChange:null,afterSlideChange:null,beforeSlideLoad:null,afterSlideLoad:null,onOpen:null,onClose:null,loop:!1,touchNavigation:!0,touchFollowAxis:!0,keyboardNavigation:!0,closeOnOutsideClick:!0,plyr:{css:"https://cdn.plyr.io/3.5.6/plyr.css",js:"https://cdn.plyr.io/3.5.6/plyr.js",config:{ratio:"16:9",youtube:{noCookie:!0,rel:0,showinfo:0,iv_load_policy:3},vimeo:{byline:!1,portrait:!1,title:!1,transparent:!1}}},openEffect:"zoomIn",closeEffect:"zoomOut",slideEffect:"slide",moreText:"See more",moreLength:60,lightboxHtml:"",cssEfects:{fade:{in:"fadeIn",out:"fadeOut"},zoom:{in:"zoomIn",out:"zoomOut"},slide:{in:"slideInRight",out:"slideOutLeft"},slide_back:{in:"slideInLeft",out:"slideOutRight"}},svg:{close:'<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" xml:space="preserve"><g><g><path d="M505.943,6.058c-8.077-8.077-21.172-8.077-29.249,0L6.058,476.693c-8.077,8.077-8.077,21.172,0,29.249C10.096,509.982,15.39,512,20.683,512c5.293,0,10.586-2.019,14.625-6.059L505.943,35.306C514.019,27.23,514.019,14.135,505.943,6.058z"/></g></g><g><g><path d="M505.942,476.694L35.306,6.059c-8.076-8.077-21.172-8.077-29.248,0c-8.077,8.076-8.077,21.171,0,29.248l470.636,470.636c4.038,4.039,9.332,6.058,14.625,6.058c5.293,0,10.587-2.019,14.624-6.057C514.018,497.866,514.018,484.771,505.942,476.694z"/></g></g></svg>',next:'<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"> <g><path d="M360.731,229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1,0s-5.3,13.8,0,19.1l215.5,215.5l-215.5,215.5c-5.3,5.3-5.3,13.8,0,19.1c2.6,2.6,6.1,4,9.5,4c3.4,0,6.9-1.3,9.5-4l225.1-225.1C365.931,242.875,365.931,234.275,360.731,229.075z"/></g></svg>',prev:'<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"><g><path d="M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z"/></g></svg>'}};y.slideHtml='<div class="gslide">\n <div class="gslide-inner-content">\n <div class="ginner-container">\n <div class="gslide-media">\n </div>\n <div class="gslide-description">\n <div class="gdesc-inner">\n <h4 class="gslide-title"></h4>\n <div class="gslide-desc"></div>\n </div>\n </div>\n </div>\n </div>\n</div>';function b(){var t={},e=!0,i=0,n=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(e=arguments[0],i++);for(var s=function(i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e&&"[object Object]"===Object.prototype.toString.call(i[n])?t[n]=b(!0,t[n],i[n]):t[n]=i[n])};i<n;i++){s(arguments[i])}return t}y.lightboxHtml='<div id="glightbox-body" class="glightbox-container">\n <div class="gloader visible"></div>\n <div class="goverlay"></div>\n <div class="gcontainer">\n <div id="glightbox-slider" class="gslider"></div>\n <button class="gnext gbtn" tabindex="0">{nextSVG}</button>\n <button class="gprev gbtn" tabindex="1">{prevSVG}</button>\n <button class="gclose gbtn" tabindex="2">{closeSVG}</button>\n</div>\n</div>';var x={isFunction:function(t){return"function"==typeof t},isString:function(t){return"string"==typeof t},isNode:function(t){return!(!t||!t.nodeType||1!=t.nodeType)},isArray:function(t){return Array.isArray(t)},isArrayLike:function(t){return t&&t.length&&isFinite(t.length)},isObject:function(e){return"object"===t(e)&&null!=e&&!x.isFunction(e)&&!x.isArray(e)},isNil:function(t){return null==t},has:function(t,e){return null!==t&&hasOwnProperty.call(t,e)},size:function(t){if(x.isObject(t)){if(t.keys)return t.keys().length;var e=0;for(var i in t)x.has(t,i)&&e++;return e}return t.length},isNumber:function(t){return!isNaN(parseFloat(t))&&isFinite(t)}};function w(t,e){if((x.isNode(t)||t===window||t===document)&&(t=[t]),x.isArrayLike(t)||x.isObject(t)||(t=[t]),0!=x.size(t))if(x.isArrayLike(t)&&!x.isObject(t))for(var i=t.length,n=0;n<i&&!1!==e.call(t[n],t[n],n,t);n++);else if(x.isObject(t))for(var s in t)if(x.has(t,s)&&!1===e.call(t[s],t[s],s,t))break}function S(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=t[f]=t[f]||[],s={all:n,evt:null,found:null};return e&&i&&x.size(n)>0&&w(n,(function(t,n){if(t.eventName==e&&t.fn.toString()==i.toString())return s.found=!0,s.evt=n,!1})),s}function T(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.onElement,n=e.withCallback,s=e.avoidDuplicate,o=void 0===s||s,l=e.once,r=void 0!==l&&l,a=e.useCapture,c=void 0!==a&&a,h=arguments.length>2?arguments[2]:void 0,u=i||[];function d(t){x.isFunction(n)&&n.call(h,t,this),r&&d.destroy()}return x.isString(u)&&(u=document.querySelectorAll(u)),d.destroy=function(){w(u,(function(e){var i=S(e,t,d);i.found&&i.all.splice(i.evt,1),e.removeEventListener&&e.removeEventListener(t,d,c)}))},w(u,(function(e){var i=S(e,t,d);(e.addEventListener&&o&&!i.found||!o)&&(e.addEventListener(t,d,c),i.all.push({eventName:t,fn:d}))})),d}function k(t,e){w(e.split(" "),(function(e){return t.classList.add(e)}))}function E(t,e){w(e.split(" "),(function(e){return t.classList.remove(e)}))}function A(t,e){return t.classList.contains(e)}function C(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!t||""===e)return!1;if("none"==e)return x.isFunction(i)&&i(),!1;var n=e.split(" ");w(n,(function(e){k(t,"g"+e)})),T(v,{onElement:t,avoidDuplicate:!1,once:!0,withCallback:function(t,e){w(n,(function(t){E(e,"g"+t)})),x.isFunction(i)&&i()}})}function L(t){var e=document.createDocumentFragment(),i=document.createElement("div");for(i.innerHTML=t;i.firstChild;)e.appendChild(i.firstChild);return e}function M(t,e){for(;t!==document.body;){if("function"==typeof(t=t.parentElement).matches?t.matches(e):t.msMatchesSelector(e))return t}}function O(t){t.style.display="block"}function N(t){t.style.display="none"}function z(){return{width:window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth,height:window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight}}function q(t){if(A(t.target,"plyr--html5")){var e=M(t.target,".gslide-media");"enterfullscreen"==t.type&&k(e,"fullscreen"),"exitfullscreen"==t.type&&E(e,"fullscreen")}}function I(t){return x.isNumber(t)?"".concat(t,"px"):t}function D(t,e){var i="video"==t.type?I(e.videosWidth):I(e.width),n=I(e.height);return t.width=x.has(t,"width")&&""!==t.width?I(t.width):i,t.height=x.has(t,"height")&&""!==t.height?I(t.height):n,t}var X=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1?arguments[1]:void 0,i={href:"",title:"",type:"",description:"",descPosition:e.descPosition,effect:"",width:"",height:"",node:t,content:!1};if(x.isObject(t)&&!x.isNode(t)){x.has(t,"type")||(x.has(t,"content")&&t.content?t.type="inline":x.has(t,"href")&&(t.type=W(t.href)));var n=b(i,t);return D(n,e),n}var s="",o=t.getAttribute("data-glightbox"),l=t.nodeName.toLowerCase();if("a"===l&&(s=t.href),"img"===l&&(s=t.src),i.href=s,w(i,(function(n,s){x.has(e,s)&&"width"!==s&&(i[s]=e[s]);var o=t.dataset[s];x.isNil(o)||(i[s]=o)})),i.content&&(i.type="inline"),!i.type&&s&&(i.type=W(s)),x.isNil(o)){if("a"==l){var r=t.title;x.isNil(r)||""===r||(i.title=r)}if("img"==l){var a=t.alt;x.isNil(a)||""===a||(i.title=a)}var c=t.getAttribute("data-description");x.isNil(c)||""===c||(i.description=c)}else{var h=[];w(i,(function(t,e){h.push(";\\s?"+e)})),h=h.join("\\s?:|"),""!==o.trim()&&w(i,(function(t,e){var n=o,s=new RegExp("s?"+e+"s?:s?(.*?)("+h+"s?:|$)"),l=n.match(s);if(l&&l.length&&l[1]){var r=l[1].trim().replace(/;\s*$/,"");i[e]=r}}))}if(i.description&&"."==i.description.substring(0,1)&&document.querySelector(i.description))i.description=document.querySelector(i.description).innerHTML;else{var u=t.querySelector(".glightbox-desc");u&&(i.description=u.innerHTML)}return D(i,e),i},Y=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(A(e,"loaded"))return!1;x.isFunction(this.settings.beforeSlideLoad)&&this.settings.beforeSlideLoad(e,i);var s=i.type,o=i.descPosition,l=e.querySelector(".gslide-media"),r=e.querySelector(".gslide-title"),a=e.querySelector(".gslide-desc"),c=e.querySelector(".gdesc-inner"),d=n;if(x.isFunction(this.settings.afterSlideLoad)&&(d=function(){x.isFunction(n)&&n(),t.settings.afterSlideLoad(e,i)}),""==i.title&&""==i.description?c&&c.parentNode.parentNode.removeChild(c.parentNode):(r&&""!==i.title?r.innerHTML=i.title:r.parentNode.removeChild(r),a&&""!==i.description?u&&this.settings.moreLength>0?(i.smallDescription=R(i.description,this.settings.moreLength,this.settings.moreText),a.innerHTML=i.smallDescription,$.apply(this,[a,i])):a.innerHTML=i.description:a.parentNode.removeChild(a),k(l.parentNode,"desc-".concat(o)),k(c.parentNode,"description-".concat(o))),k(l,"gslide-".concat(s)),k(e,"loaded"),"video"===s)return k(l.parentNode,"gvideo-container"),l.insertBefore(L('<div class="gvideo-wrapper"></div>'),l.firstChild),void P.apply(this,[e,i,d]);if("external"===s){var g=B({url:i.href,callback:d});return l.parentNode.style.maxWidth=i.width,l.parentNode.style.height=i.height,void l.appendChild(g)}if("inline"!==s){if("image"===s){var p=new Image;return p.addEventListener("load",(function(){!u&&p.naturalWidth>p.offsetWidth&&(k(p,"zoomable"),new h(p,e,(function(){t.resize(e)}))),x.isFunction(d)&&d()}),!1),p.src=i.href,void l.insertBefore(p,l.firstChild)}x.isFunction(d)&&d()}else j.apply(this,[e,i,d])};function P(t,e,i){var n=this,s="gvideo"+e.index,o=t.querySelector(".gvideo-wrapper");F(this.settings.plyr.css);var l=e.href,r=location.protocol.replace(":",""),a="",c="",h=!1;"file"==r&&(r="http"),o.parentNode.style.maxWidth=e.width,F(this.settings.plyr.js,"Plyr",(function(){if(l.match(/vimeo\.com\/([0-9]*)/)){var t=/vimeo.*\/(\d+)/i.exec(l);a="vimeo",c=t[1]}if(l.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||l.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||l.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/)){var r=function(t){var e="";e=void 0!==(t=t.replace(/(>|<)/gi,"").split(/(vi\/|v=|\/v\/|youtu\.be\/|\/embed\/)/))[2]?(e=t[2].split(/[^0-9a-z_\-]/i))[0]:t;return e}(l);a="youtube",c=r}if(null!==l.match(/\.(mp4|ogg|webm|mov)$/)){a="local";var u='<video id="'+s+'" ';u+='style="background:#000; max-width: '.concat(e.width,';" '),u+='preload="metadata" ',u+='x-webkit-airplay="allow" ',u+='webkit-playsinline="" ',u+="controls ",u+='class="gvideo-local">';var d=l.toLowerCase().split(".").pop(),g={mp4:"",ogg:"",webm:""};for(var p in g[d="mov"==d?"mp4":d]=l,g)if(g.hasOwnProperty(p)){var v=g[p];e.hasOwnProperty(p)&&(v=e[p]),""!==v&&(u+='<source src="'.concat(v,'" type="video/').concat(p,'">'))}h=L(u+="</video>")}var f=h||L('<div id="'.concat(s,'" data-plyr-provider="').concat(a,'" data-plyr-embed-id="').concat(c,'"></div>'));k(o,"".concat(a,"-video gvideo")),o.appendChild(f),o.setAttribute("data-id",s);var y=x.has(n.settings.plyr,"config")?n.settings.plyr.config:{},b=new Plyr("#"+s,y);b.on("ready",(function(t){var e=t.detail.plyr;m[s]=e,x.isFunction(i)&&i()})),b.on("enterfullscreen",q),b.on("exitfullscreen",q)}))}function B(t){var e=t.url,i=t.allow,n=t.callback,s=t.appendTo,o=document.createElement("iframe");return o.className="vimeo-video gvideo",o.src=e,o.style.width="100%",o.style.height="100%",i&&o.setAttribute("allow",i),o.onload=function(){k(o,"node-ready"),x.isFunction(n)&&n()},s&&s.appendChild(o),o}function F(t,e,i){if(x.isNil(t))console.error("Inject videos api error");else{var n;if(x.isFunction(e)&&(i=e,e=!1),-1!==t.indexOf(".css")){if((n=document.querySelectorAll('link[href="'+t+'"]'))&&n.length>0)return void(x.isFunction(i)&&i());var s=document.getElementsByTagName("head")[0],o=s.querySelectorAll('link[rel="stylesheet"]'),l=document.createElement("link");return l.rel="stylesheet",l.type="text/css",l.href=t,l.media="all",o?s.insertBefore(l,o[0]):s.appendChild(l),void(x.isFunction(i)&&i())}if((n=document.querySelectorAll('script[src="'+t+'"]'))&&n.length>0){if(x.isFunction(i)){if(x.isString(e))return _((function(){return void 0!==window[e]}),(function(){i()})),!1;i()}}else{var r=document.createElement("script");r.type="text/javascript",r.src=t,r.onload=function(){if(x.isFunction(i)){if(x.isString(e))return _((function(){return void 0!==window[e]}),(function(){i()})),!1;i()}},document.body.appendChild(r)}}}function _(t,e,i,n){if(t())e();else{var s;i||(i=100);var o=setInterval((function(){t()&&(clearInterval(o),s&&clearTimeout(s),e())}),i);n&&(s=setTimeout((function(){clearInterval(o)}),n))}}function j(t,e,i){var n,s=this,o=t.querySelector(".gslide-media"),l=!(!x.has(e,"href")||!e.href)&&e.href.split("#").pop().trim(),r=!(!x.has(e,"content")||!e.content)&&e.content;if(r&&(x.isString(r)&&(n=L('<div class="ginlined-content">'.concat(r,"</div>"))),x.isNode(r))){"none"==r.style.display&&(r.style.display="block");var a=document.createElement("div");a.className="ginlined-content",a.appendChild(r),n=a}if(l){var c=document.getElementById(l);if(!c)return!1;var h=c.cloneNode(!0);h.style.height=e.height,h.style.maxWidth=e.width,k(h,"ginlined-content"),n=h}if(!n)return console.error("Unable to append inline slide content",e),!1;o.style.height=e.height,o.style.width=e.width,o.appendChild(n),this.events["inlineclose"+l]=T("click",{onElement:o.querySelectorAll(".gtrigger-close"),withCallback:function(t){t.preventDefault(),s.close()}}),x.isFunction(i)&&i()}var W=function(t){var e=t;if(null!==(t=t.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|svg)$/))return"image";if(t.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/)||t.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/)||t.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/))return"video";if(t.match(/vimeo\.com\/([0-9]*)/))return"video";if(null!==t.match(/\.(mp4|ogg|webm|mov)$/))return"video";if(t.indexOf("#")>-1&&""!==e.split("#").pop().trim())return"inline";return t.includes("gajax=true")?"ajax":"external"};function H(){var t=this;if(this.events.hasOwnProperty("keyboard"))return!1;this.events.keyboard=T("keydown",{onElement:window,withCallback:function(e,i){var n=(e=e||window.event).keyCode;if(9==n){var o=!(!document.activeElement||!document.activeElement.nodeName)&&document.activeElement.nodeName.toLocaleLowerCase();if("input"==o||"textarea"==o||"button"==o)return;e.preventDefault();var l=document.querySelectorAll(".gbtn");if(!l||l.length<=0)return;var r=s(l).filter((function(t){return A(t,"focused")}));if(!r.length){var a=document.querySelector('.gbtn[tabindex="0"]');return void(a&&(a.focus(),k(a,"focused")))}l.forEach((function(t){return E(t,"focused")}));var c=r[0].getAttribute("tabindex");c=c||"0";var h=parseInt(c)+1;h>l.length-1&&(h="0");var u=document.querySelector('.gbtn[tabindex="'.concat(h,'"]'));u&&(u.focus(),k(u,"focused"))}39==n&&t.nextSlide(),37==n&&t.prevSlide(),27==n&&t.close()}})}function V(){var t=this;if(this.events.hasOwnProperty("touch"))return!1;var e,i,n,s=z(),o=s.width,l=s.height,r=!1,a=null,h=null,u=null,d=!1,g=1,p=1,v=!1,f=!1,m=null,y=null,b=null,x=null,w=0,S=0,T=!1,C=!1,L={},O={},N=0,q=0,I=this,D=document.getElementById("glightbox-slider"),X=document.querySelector(".goverlay"),Y=(this.loop(),new c(D,{touchStart:function(t){if(A(t.targetTouches[0].target,"ginner-container")||M(t.targetTouches[0].target,".gslide-desc"))return r=!1,!1;r=!0,O=t.targetTouches[0],L.pageX=t.targetTouches[0].pageX,L.pageY=t.targetTouches[0].pageY,N=t.targetTouches[0].clientX,q=t.targetTouches[0].clientY,a=I.activeSlide,h=a.querySelector(".gslide-media"),n=a.querySelector(".gslide-inline"),u=null,A(h,"gslide-image")&&(u=h.querySelector("img")),E(X,"greset")},touchMove:function(s){if(r&&(O=s.targetTouches[0],!v&&!f)){if(n&&n.offsetHeight>l){var a=L.pageX-O.pageX;if(Math.abs(a)<=13)return!1}d=!0;var c,g=s.targetTouches[0].clientX,p=s.targetTouches[0].clientY,m=N-g,y=q-p;if(Math.abs(m)>Math.abs(y)?(T=!1,C=!0):(C=!1,T=!0),e=O.pageX-L.pageX,w=100*e/o,i=O.pageY-L.pageY,S=100*i/l,T&&u&&(c=1-Math.abs(i)/l,X.style.opacity=c,t.settings.touchFollowAxis&&(w=0)),C&&(c=1-Math.abs(e)/o,h.style.opacity=c,t.settings.touchFollowAxis&&(S=0)),!u)return G(h,"translate3d(".concat(w,"%, 0, 0)"));G(h,"translate3d(".concat(w,"%, ").concat(S,"%, 0)"))}},touchEnd:function(){if(r){if(d=!1,f||v)return b=m,void(x=y);var e=Math.abs(parseInt(S)),i=Math.abs(parseInt(w));if(!(e>29&&u))return e<29&&i<25?(k(X,"greset"),X.style.opacity=1,Z(h)):void 0;t.close()}},multipointEnd:function(){setTimeout((function(){v=!1}),50)},multipointStart:function(){v=!0,g=p||1},pinch:function(t){if(!u||d)return!1;v=!0,u.scaleX=u.scaleY=g*t.zoom;var e=g*t.zoom;if(f=!0,e<=1)return f=!1,e=1,x=null,b=null,m=null,y=null,void u.setAttribute("style","");e>4.5&&(e=4.5),u.style.transform="scale3d(".concat(e,", ").concat(e,", 1)"),p=e},pressMove:function(t){if(f&&!v){var e=O.pageX-L.pageX,i=O.pageY-L.pageY;b&&(e+=b),x&&(i+=x),m=e,y=i;var n="translate3d(".concat(e,"px, ").concat(i,"px, 0)");p&&(n+=" scale3d(".concat(p,", ").concat(p,", 1)")),G(u,n)}},swipe:function(e){if(!f)if(v)v=!1;else{if("Left"==e.direction){if(t.index==t.elements.length-1)return Z(h);t.nextSlide()}if("Right"==e.direction){if(0==t.index)return Z(h);t.prevSlide()}}}}));this.events.touch=Y}function G(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""==e)return t.style.webkitTransform="",t.style.MozTransform="",t.style.msTransform="",t.style.OTransform="",t.style.transform="",!1;t.style.webkitTransform=e,t.style.MozTransform=e,t.style.msTransform=e,t.style.OTransform=e,t.style.transform=e}function Z(t){var e=A(t,"gslide-media")?t:t.querySelector(".gslide-media"),i=t.querySelector(".gslide-description");k(e,"greset"),G(e,"translate3d(0, 0, 0)");T(p,{onElement:e,once:!0,withCallback:function(t,i){E(e,"greset")}});e.style.opacity="",i&&(i.style.opacity="")}function R(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=i;if((t=t.trim()).length<=e)return t;var s=t.substr(0,e-1);return n?s+'... <a href="#" class="desc-more">'+i+"</a>":s}function $(t,e){var i=t.querySelector(".desc-more");if(!i)return!1;T("click",{onElement:i,withCallback:function(t,i){t.preventDefault();var n=document.body,s=M(i,".gslide-desc");if(!s)return!1;s.innerHTML=e.description,k(n,"gdesc-open");var o=T("click",{onElement:[n,M(s,".gslide-description")],withCallback:function(t,i){"a"!==t.target.nodeName.toLowerCase()&&(E(n,"gdesc-open"),k(n,"gdesc-closed"),s.innerHTML=e.smallDescription,$(s,e),setTimeout((function(){E(n,"gdesc-closed")}),400),o.destroy())}})}})}var U=function(){function t(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e(this,t),this.settings=b(y,i),this.effectsClasses=this.getAnimationClasses(),this.slidesData={}}return n(t,[{key:"init",value:function(){var t=this;this.baseEvents=T("click",{onElement:this.getSelector(),withCallback:function(e,i){e.preventDefault(),t.open(i)}})}},{key:"open",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(this.elements=this.getElements(t),0==this.elements.length)return!1;this.activeSlide=null,this.prevActiveSlideIndex=null,this.prevActiveSlide=null;var i=e||this.settings.startAt;t&&x.isNil(i)&&(i=this.elements.indexOf(t))<0&&(i=0),x.isNil(i)&&(i=0),this.build(),C(this.overlay,"none"==this.settings.openEffect?"none":this.settings.cssEfects.fade.in);var n=document.body,s=window.innerWidth-document.documentElement.clientWidth;if(s>0){var o=document.createElement("style");o.type="text/css",o.className="gcss-styles",o.innerText=".gscrollbar-fixer {margin-right: ".concat(s,"px}"),document.head.appendChild(o),k(n,"gscrollbar-fixer")}if(k(n,"glightbox-open"),k(g,"glightbox-open"),u&&(k(document.body,"glightbox-mobile"),this.settings.slideEffect="slide"),this.showSlide(i,!0),1==this.elements.length?(N(this.prevButton),N(this.nextButton)):(O(this.prevButton),O(this.nextButton)),this.lightboxOpen=!0,x.isFunction(this.settings.onOpen)&&this.settings.onOpen(),u&&d&&this.settings.touchNavigation)return V.apply(this),!1;this.settings.keyboardNavigation&&H.apply(this)}},{key:"openAt",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.open(null,t)}},{key:"showSlide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];O(this.loader),this.index=parseInt(e);var n=this.slidesContainer.querySelector(".current");n&&E(n,"current"),this.slideAnimateOut();var s=this.slidesContainer.querySelectorAll(".gslide")[e];if(A(s,"loaded"))this.slideAnimateIn(s,i),N(this.loader);else{O(this.loader);var o=X(this.elements[e],this.settings);o.index=e,this.slidesData[e]=o,Y.apply(this,[s,o,function(){N(t.loader),t.resize(),t.slideAnimateIn(s,i)}])}this.slideDescription=s.querySelector(".gslide-description"),this.slideDescriptionContained=this.slideDescription&&A(this.slideDescription.parentNode,"gslide-media"),this.preloadSlide(e+1),this.preloadSlide(e-1);var l=this.loop();E(this.nextButton,"disabled"),E(this.prevButton,"disabled"),0!==e||l?e!==this.elements.length-1||l||k(this.nextButton,"disabled"):k(this.prevButton,"disabled"),this.activeSlide=s}},{key:"preloadSlide",value:function(t){var e=this;if(t<0||t>this.elements.length)return!1;if(x.isNil(this.elements[t]))return!1;var i=this.slidesContainer.querySelectorAll(".gslide")[t];if(A(i,"loaded"))return!1;var n=X(this.elements[t],this.settings);n.index=t,this.slidesData[t]=n;var s=n.sourcetype;"video"==s||"external"==s?setTimeout((function(){Y.apply(e,[i,n])}),200):Y.apply(this,[i,n])}},{key:"prevSlide",value:function(){this.goToSlide(this.index-1)}},{key:"nextSlide",value:function(){this.goToSlide(this.index+1)}},{key:"goToSlide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.prevActiveSlide=this.activeSlide,this.prevActiveSlideIndex=this.index;var e=this.loop();if(!e&&(t<0||t>this.elements.length-1))return!1;t<0?t=this.elements.length-1:t>=this.elements.length&&(t=0),this.showSlide(t)}},{key:"insertSlide",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;this.tmpAddSlides||(this.tmpAddSlides=[]),t.atPosition=e,this.tmpAddSlides.push(t)}},{key:"slideAnimateIn",value:function(t,e){var i=this,n=t.querySelector(".gslide-media"),s=t.querySelector(".gslide-description"),o={index:this.prevActiveSlideIndex,slide:this.prevActiveSlide},l={index:this.index,slide:this.activeSlide};if(n.offsetWidth>0&&s&&(N(s),s.style.display=""),E(t,this.effectsClasses),e)C(t,this.settings.openEffect,(function(){!u&&i.settings.autoplayVideos&&i.playSlideVideo(t),x.isFunction(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[o,l])}));else{var r=this.settings.slideEffect,a="none"!==r?this.settings.cssEfects[r].in:r;this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(a=this.settings.cssEfects.slide_back.in),C(t,a,(function(){!u&&i.settings.autoplayVideos&&i.playSlideVideo(t),x.isFunction(i.settings.afterSlideChange)&&i.settings.afterSlideChange.apply(i,[o,l])}))}setTimeout((function(){i.resize(t)}),100),k(t,"current")}},{key:"slideAnimateOut",value:function(){if(!this.prevActiveSlide)return!1;var t=this.prevActiveSlide;E(t,this.effectsClasses),k(t,"prev");var e=this.settings.slideEffect,i="none"!==e?this.settings.cssEfects[e].out:e;this.stopSlideVideo(t),x.isFunction(this.settings.beforeSlideChange)&&this.settings.beforeSlideChange.apply(this,[{index:this.prevActiveSlideIndex,slide:this.prevActiveSlide},{index:this.index,slide:this.activeSlide}]),this.prevActiveSlideIndex>this.index&&"slide"==this.settings.slideEffect&&(i=this.settings.cssEfects.slide_back.out),C(t,i,(function(){var e=t.querySelector(".gslide-media"),i=t.querySelector(".gslide-description");e.style.transform="",E(e,"greset"),e.style.opacity="",i&&(i.style.opacity=""),E(t,"prev")}))}},{key:"stopSlideVideo",value:function(t){x.isNumber(t)&&(t=this.slidesContainer.querySelectorAll(".gslide")[t]);var e=t?t.querySelector(".gvideo"):null;if(!e)return!1;var i=e.getAttribute("data-id");if(m&&x.has(m,i)){var n=m[i];n&&n.play&&n.pause()}}},{key:"playSlideVideo",value:function(t){x.isNumber(t)&&(t=this.slidesContainer.querySelectorAll(".gslide")[t]);var e=t.querySelector(".gvideo");if(!e)return!1;var i=e.getAttribute("data-id");if(m&&x.has(m,i)){var n=m[i];n&&n.play&&n.play()}}},{key:"setElements",value:function(t){this.settings.elements=t}},{key:"getElements",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=[];this.elements=this.elements?this.elements:[],!x.isNil(this.settings.elements)&&x.isArray(this.settings.elements)&&(e=this.settings.elements);var i=!1,n=this.getSelector();if(null!==t){var s=t.getAttribute("data-gallery");s&&""!==s&&(i=document.querySelectorAll('[data-gallery="'.concat(s,'"]')))}return 0==i&&n&&(i=document.querySelectorAll(this.getSelector())),i=Array.prototype.slice.call(i),e=e.concat(i),this.tmpAddSlides&&this.tmpAddSlides.length&&(w(this.tmpAddSlides,(function(t){var i=t.atPosition<0?e.length+1:t.atPosition;e.splice(i,0,b({},t))})),this.tmpAddSlides.length=0),e}},{key:"getSelector",value:function(){return"data-"==this.settings.selector.substring(0,5)?"*[".concat(this.settings.selector,"]"):this.settings.selector}},{key:"getActiveSlide",value:function(){return this.slidesContainer.querySelectorAll(".gslide")[this.index]}},{key:"getActiveSlideIndex",value:function(){return this.index}},{key:"getAnimationClasses",value:function(){var t=[];for(var e in this.settings.cssEfects)if(this.settings.cssEfects.hasOwnProperty(e)){var i=this.settings.cssEfects[e];t.push("g".concat(i.in)),t.push("g".concat(i.out))}return t.join(" ")}},{key:"build",value:function(){var t=this;if(this.built)return!1;var e=x.has(this.settings.svg,"next")?this.settings.svg.next:"",i=x.has(this.settings.svg,"prev")?this.settings.svg.prev:"",n=x.has(this.settings.svg,"close")?this.settings.svg.close:"",s=this.settings.lightboxHtml;s=L(s=(s=(s=s.replace(/{nextSVG}/g,e)).replace(/{prevSVG}/g,i)).replace(/{closeSVG}/g,n)),document.body.appendChild(s);var o=document.getElementById("glightbox-body");this.modal=o;var l=o.querySelector(".gclose");this.prevButton=o.querySelector(".gprev"),this.nextButton=o.querySelector(".gnext"),this.overlay=o.querySelector(".goverlay"),this.loader=o.querySelector(".gloader"),this.slidesContainer=document.getElementById("glightbox-slider"),this.events={},k(this.modal,"glightbox-"+this.settings.skin),this.settings.closeButton&&l&&(this.events.close=T("click",{onElement:l,withCallback:function(e,i){e.preventDefault(),t.close()}})),l&&!this.settings.closeButton&&l.parentNode.removeChild(l),this.nextButton&&(this.events.next=T("click",{onElement:this.nextButton,withCallback:function(e,i){e.preventDefault(),t.nextSlide()}})),this.prevButton&&(this.events.prev=T("click",{onElement:this.prevButton,withCallback:function(e,i){e.preventDefault(),t.prevSlide()}})),this.settings.closeOnOutsideClick&&(this.events.outClose=T("click",{onElement:o,withCallback:function(e,i){A(document.body,"glightbox-mobile")||M(e.target,".ginner-container")||M(e.target,".gbtn")||A(e.target,"gnext")||A(e.target,"gprev")||t.close()}})),w(this.elements,(function(){var e=L(t.settings.slideHtml);t.slidesContainer.appendChild(e)})),d&&k(document.body,"glightbox-touch"),this.events.resize=T("resize",{onElement:window,withCallback:function(){t.resize()}}),this.built=!0}},{key:"resize",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if((t=t||this.activeSlide)&&!A(t,"zoomed")){var e=z(),i=t.querySelector(".gvideo-wrapper"),n=t.querySelector(".gslide-image"),s=this.slideDescription,o=e.width,l=e.height;if(o<=768?k(document.body,"glightbox-mobile"):E(document.body,"glightbox-mobile"),i||n){var r=!1;if(s&&(A(s,"description-bottom")||A(s,"description-top"))&&!A(s,"gabsolute")&&(r=!0),n)if(o<=768){var a=n.querySelector("img");a.setAttribute("style","")}else if(r){var c=s.offsetHeight,h=this.slidesData[this.index].width;h=h<=o?h+"px":"100%";var u=n.querySelector("img");u.setAttribute("style","max-height: calc(100vh - ".concat(c,"px)")),s.setAttribute("style","max-width: ".concat(u.offsetWidth,"px;"))}if(i){var d=x.has(this.settings.plyr.config,"ratio")?this.settings.plyr.config.ratio:"16:9",g=d.split(":"),p=this.slidesData[this.index].width,v=p/(parseInt(g[0])/parseInt(g[1]));if(v=Math.floor(v),r&&(l-=s.offsetHeight),l<v&&o>p){var f=i.offsetWidth,m=i.offsetHeight,y=l/m,b={width:f*y,height:m*y};i.parentNode.setAttribute("style","max-width: ".concat(b.width,"px")),r&&s.setAttribute("style","max-width: ".concat(b.width,"px;"))}else i.parentNode.style.maxWidth="".concat(p,"px"),r&&s.setAttribute("style","max-width: ".concat(p,"px;"))}}}}},{key:"reload",value:function(){this.init()}},{key:"loop",value:function(){var t=x.has(this.settings,"loopAtEnd")?this.settings.loopAtEnd:null;return t=x.has(this.settings,"loop")?this.settings.loop:t,t}},{key:"close",value:function(){var t=this;if(this.closing)return!1;this.closing=!0,this.stopSlideVideo(this.activeSlide),k(this.modal,"glightbox-closing"),C(this.overlay,"none"==this.settings.openEffect?"none":this.settings.cssEfects.fade.out),C(this.activeSlide,this.settings.closeEffect,(function(){if(t.activeSlide=null,t.prevActiveSlideIndex=null,t.prevActiveSlide=null,t.built=!1,t.events){for(var e in t.events)t.events.hasOwnProperty(e)&&t.events[e].destroy();t.events=null}var i=document.body;E(g,"glightbox-open"),E(i,"glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"),t.modal.parentNode.removeChild(t.modal),x.isFunction(t.settings.onClose)&&t.settings.onClose();var n=document.querySelector(".gcss-styles");n&&n.parentNode.removeChild(n),t.closing=null}))}},{key:"destroy",value:function(){this.close(),this.baseEvents.destroy()}}]),t}();return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new U(t);return e.init(),e}})); 1656 1657/***/ }), 1658
vendor: 68,183 bytes, lines 1659-3252
1659/***/ "./node_modules/gsap/CSSPlugin.js": 1660/*!****************************************!*\ 1661 !*** ./node_modules/gsap/CSSPlugin.js ***! 1662 \****************************************/ 1663/*! exports provided: CSSPlugin, default, _getBBox, _createElement, checkPrefix */ 1664/***/ (function(module, __webpack_exports__, __webpack_require__) { 1665 1666"use strict"; 1667__webpack_require__.r(__webpack_exports__); 1668/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return CSSPlugin; }); 1669/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return CSSPlugin; }); 1670/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getBBox", function() { return _getBBox; }); 1671/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_createElement", function() { return _createElement; }); 1672/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "checkPrefix", function() { return _checkPropPrefix; }); 1673/* harmony import */ var _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gsap-core.js */ "./node_modules/gsap/gsap-core.js"); 1674/*! 1675 * CSSPlugin 3.12.5 1676 * https://gsap.com 1677 * 1678 * Copyright 2008-2024, GreenSock. All rights reserved. 1679 * Subject to the terms at https://gsap.com/standard-license or for 1680 * Club GSAP members, the agreement issued with that membership. 1681 * @author: Jack Doyle, [email protected] 1682*/ 1683 1684/* eslint-disable */ 1685 1686 1687var _win, 1688 _doc, 1689 _docElement, 1690 _pluginInitted, 1691 _tempDiv, 1692 _tempDivStyler, 1693 _recentSetterPlugin, 1694 _reverting, 1695 _windowExists = function _windowExists() { 1696 return typeof window !== "undefined"; 1697}, 1698 _transformProps = {}, 1699 _RAD2DEG = 180 / Math.PI, 1700 _DEG2RAD = Math.PI / 180, 1701 _atan2 = Math.atan2, 1702 _bigNum = 1e8, 1703 _capsExp = /([A-Z])/g, 1704 _horizontalExp = /(left|right|width|margin|padding|x)/i, 1705 _complexExp = /[\s,\(]\S/, 1706 _propertyAliases = { 1707 autoAlpha: "opacity,visibility", 1708 scale: "scaleX,scaleY", 1709 alpha: "opacity" 1710}, 1711 _renderCSSProp = function _renderCSSProp(ratio, data) { 1712 return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data); 1713}, 1714 _renderPropWithEnd = function _renderPropWithEnd(ratio, data) { 1715 return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u, data); 1716}, 1717 _renderCSSPropWithBeginning = function _renderCSSPropWithBeginning(ratio, data) { 1718 return data.set(data.t, data.p, ratio ? Math.round((data.s + data.c * ratio) * 10000) / 10000 + data.u : data.b, data); 1719}, 1720 //if units change, we need a way to render the original unit/value when the tween goes all the way back to the beginning (ratio:0) 1721_renderRoundedCSSProp = function _renderRoundedCSSProp(ratio, data) { 1722 var value = data.s + data.c * ratio; 1723 data.set(data.t, data.p, ~~(value + (value < 0 ? -.5 : .5)) + data.u, data); 1724}, 1725 _renderNonTweeningValue = function _renderNonTweeningValue(ratio, data) { 1726 return data.set(data.t, data.p, ratio ? data.e : data.b, data); 1727}, 1728 _renderNonTweeningValueOnlyAtEnd = function _renderNonTweeningValueOnlyAtEnd(ratio, data) { 1729 return data.set(data.t, data.p, ratio !== 1 ? data.b : data.e, data); 1730}, 1731 _setterCSSStyle = function _setterCSSStyle(target, property, value) { 1732 return target.style[property] = value; 1733}, 1734 _setterCSSProp = function _setterCSSProp(target, property, value) { 1735 return target.style.setProperty(property, value); 1736}, 1737 _setterTransform = function _setterTransform(target, property, value) { 1738 return target._gsap[property] = value; 1739}, 1740 _setterScale = function _setterScale(target, property, value) { 1741 return target._gsap.scaleX = target._gsap.scaleY = value; 1742}, 1743 _setterScaleWithRender = function _setterScaleWithRender(target, property, value, data, ratio) { 1744 var cache = target._gsap; 1745 cache.scaleX = cache.scaleY = value; 1746 cache.renderTransform(ratio, cache); 1747}, 1748 _setterTransformWithRender = function _setterTransformWithRender(target, property, value, data, ratio) { 1749 var cache = target._gsap; 1750 cache[property] = value; 1751 cache.renderTransform(ratio, cache); 1752}, 1753 _transformProp = "transform", 1754 _transformOriginProp = _transformProp + "Origin", 1755 _saveStyle = function _saveStyle(property, isNotCSS) { 1756 var _this = this; 1757 1758 var target = this.target, 1759 style = target.style, 1760 cache = target._gsap; 1761 1762 if (property in _transformProps && style) { 1763 this.tfm = this.tfm || {}; 1764 1765 if (property !== "transform") { 1766 property = _propertyAliases[property] || property; 1767 ~property.indexOf(",") ? property.split(",").forEach(function (a) { 1768 return _this.tfm[a] = _get(target, a); 1769 }) : this.tfm[property] = cache.x ? cache[property] : _get(target, property); // note: scale would map to "scaleX,scaleY", thus we loop and apply them both. 1770 1771 property === _transformOriginProp && (this.tfm.zOrigin = cache.zOrigin); 1772 } else { 1773 return _propertyAliases.transform.split(",").forEach(function (p) { 1774 return _saveStyle.call(_this, p, isNotCSS); 1775 }); 1776 } 1777 1778 if (this.props.indexOf(_transformProp) >= 0) { 1779 return; 1780 } 1781 1782 if (cache.svg) { 1783 this.svgo = target.getAttribute("data-svg-origin"); 1784 this.props.push(_transformOriginProp, isNotCSS, ""); 1785 } 1786 1787 property = _transformProp; 1788 } 1789 1790 (style || isNotCSS) && this.props.push(property, isNotCSS, style[property]); 1791}, 1792 _removeIndependentTransforms = function _removeIndependentTransforms(style) { 1793 if (style.translate) { 1794 style.removeProperty("translate"); 1795 style.removeProperty("scale"); 1796 style.removeProperty("rotate"); 1797 } 1798}, 1799 _revertStyle = function _revertStyle() { 1800 var props = this.props, 1801 target = this.target, 1802 style = target.style, 1803 cache = target._gsap, 1804 i, 1805 p; 1806 1807 for (i = 0; i < props.length; i += 3) { 1808 // stored like this: property, isNotCSS, value 1809 props[i + 1] ? target[props[i]] = props[i + 2] : props[i + 2] ? style[props[i]] = props[i + 2] : style.removeProperty(props[i].substr(0, 2) === "--" ? props[i] : props[i].replace(_capsExp, "-$1").toLowerCase()); 1810 } 1811 1812 if (this.tfm) { 1813 for (p in this.tfm) { 1814 cache[p] = this.tfm[p]; 1815 } 1816 1817 if (cache.svg) { 1818 cache.renderTransform(); 1819 target.setAttribute("data-svg-origin", this.svgo || ""); 1820 } 1821 1822 i = _reverting(); 1823 1824 if ((!i || !i.isStart) && !style[_transformProp]) { 1825 _removeIndependentTransforms(style); 1826 1827 if (cache.zOrigin && style[_transformOriginProp]) { 1828 style[_transformOriginProp] += " " + cache.zOrigin + "px"; // since we're uncaching, we must put the zOrigin back into the transformOrigin so that we can pull it out accurately when we parse again. Otherwise, we'd lose the z portion of the origin since we extract it to protect from Safari bugs. 1829 1830 cache.zOrigin = 0; 1831 cache.renderTransform(); 1832 } 1833 1834 cache.uncache = 1; // if it's a startAt that's being reverted in the _initTween() of the core, we don't need to uncache transforms. This is purely a performance optimization. 1835 } 1836 } 1837}, 1838 _getStyleSaver = function _getStyleSaver(target, properties) { 1839 var saver = { 1840 target: target, 1841 props: [], 1842 revert: _revertStyle, 1843 save: _saveStyle 1844 }; 1845 target._gsap || _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].core.getCache(target); // just make sure there's a _gsap cache defined because we read from it in _saveStyle() and it's more efficient to just check it here once. 1846 1847 properties && properties.split(",").forEach(function (p) { 1848 return saver.save(p); 1849 }); 1850 return saver; 1851}, 1852 _supports3D, 1853 _createElement = function _createElement(type, ns) { 1854 var e = _doc.createElementNS ? _doc.createElementNS((ns || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), type) : _doc.createElement(type); //some servers swap in https for http in the namespace which can break things, making "style" inaccessible. 1855 1856 return e && e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://gsap.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/). 1857}, 1858 _getComputedProperty = function _getComputedProperty(target, property, skipPrefixFallback) { 1859 var cs = getComputedStyle(target); 1860 return cs[property] || cs.getPropertyValue(property.replace(_capsExp, "-$1").toLowerCase()) || cs.getPropertyValue(property) || !skipPrefixFallback && _getComputedProperty(target, _checkPropPrefix(property) || property, 1) || ""; //css variables may not need caps swapped out for dashes and lowercase. 1861}, 1862 _prefixes = "O,Moz,ms,Ms,Webkit".split(","), 1863 _checkPropPrefix = function _checkPropPrefix(property, element, preferPrefix) { 1864 var e = element || _tempDiv, 1865 s = e.style, 1866 i = 5; 1867 1868 if (property in s && !preferPrefix) { 1869 return property; 1870 } 1871 1872 property = property.charAt(0).toUpperCase() + property.substr(1); 1873 1874 while (i-- && !(_prefixes[i] + property in s)) {} 1875 1876 return i < 0 ? null : (i === 3 ? "ms" : i >= 0 ? _prefixes[i] : "") + property; 1877}, 1878 _initCore = function _initCore() { 1879 if (_windowExists() && window.document) { 1880 _win = window; 1881 _doc = _win.document; 1882 _docElement = _doc.documentElement; 1883 _tempDiv = _createElement("div") || { 1884 style: {} 1885 }; 1886 _tempDivStyler = _createElement("div"); 1887 _transformProp = _checkPropPrefix(_transformProp); 1888 _transformOriginProp = _transformProp + "Origin"; 1889 _tempDiv.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0"; //make sure to override certain properties that may contaminate measurements, in case the user has overreaching style sheets. 1890 1891 _supports3D = !!_checkPropPrefix("perspective"); 1892 _reverting = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].core.reverting; 1893 _pluginInitted = 1; 1894 } 1895}, 1896 _getBBoxHack = function _getBBoxHack(swapIfPossible) { 1897 //works around issues in some browsers (like Firefox) that don't correctly report getBBox() on SVG elements inside a <defs> element and/or <mask>. We try creating an SVG, adding it to the documentElement and toss the element in there so that it's definitely part of the rendering tree, then grab the bbox and if it works, we actually swap out the original getBBox() method for our own that does these extra steps whenever getBBox is needed. This helps ensure that performance is optimal (only do all these extra steps when absolutely necessary...most elements don't need it). 1898 var svg = _createElement("svg", this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), 1899 oldParent = this.parentNode, 1900 oldSibling = this.nextSibling, 1901 oldCSS = this.style.cssText, 1902 bbox; 1903 1904 _docElement.appendChild(svg); 1905 1906 svg.appendChild(this); 1907 this.style.display = "block"; 1908 1909 if (swapIfPossible) { 1910 try { 1911 bbox = this.getBBox(); 1912 this._gsapBBox = this.getBBox; //store the original 1913 1914 this.getBBox = _getBBoxHack; 1915 } catch (e) {} 1916 } else if (this._gsapBBox) { 1917 bbox = this._gsapBBox(); 1918 } 1919 1920 if (oldParent) { 1921 if (oldSibling) { 1922 oldParent.insertBefore(this, oldSibling); 1923 } else { 1924 oldParent.appendChild(this); 1925 } 1926 } 1927 1928 _docElement.removeChild(svg); 1929 1930 this.style.cssText = oldCSS; 1931 return bbox; 1932}, 1933 _getAttributeFallbacks = function _getAttributeFallbacks(target, attributesArray) { 1934 var i = attributesArray.length; 1935 1936 while (i--) { 1937 if (target.hasAttribute(attributesArray[i])) { 1938 return target.getAttribute(attributesArray[i]); 1939 } 1940 } 1941}, 1942 _getBBox = function _getBBox(target) { 1943 var bounds; 1944 1945 try { 1946 bounds = target.getBBox(); //Firefox throws errors if you try calling getBBox() on an SVG element that's not rendered (like in a <symbol> or <defs>). https://bugzilla.mozilla.org/show_bug.cgi?id=612118 1947 } catch (error) { 1948 bounds = _getBBoxHack.call(target, true); 1949 } 1950 1951 bounds && (bounds.width || bounds.height) || target.getBBox === _getBBoxHack || (bounds = _getBBoxHack.call(target, true)); //some browsers (like Firefox) misreport the bounds if the element has zero width and height (it just assumes it's at x:0, y:0), thus we need to manually grab the position in that case. 1952 1953 return bounds && !bounds.width && !bounds.x && !bounds.y ? { 1954 x: +_getAttributeFallbacks(target, ["x", "cx", "x1"]) || 0, 1955 y: +_getAttributeFallbacks(target, ["y", "cy", "y1"]) || 0, 1956 width: 0, 1957 height: 0 1958 } : bounds; 1959}, 1960 _isSVG = function _isSVG(e) { 1961 return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e)); 1962}, 1963 //reports if the element is an SVG on which getBBox() actually works 1964_removeProperty = function _removeProperty(target, property) { 1965 if (property) { 1966 var style = target.style, 1967 first2Chars; 1968 1969 if (property in _transformProps && property !== _transformOriginProp) { 1970 property = _transformProp; 1971 } 1972 1973 if (style.removeProperty) { 1974 first2Chars = property.substr(0, 2); 1975 1976 if (first2Chars === "ms" || property.substr(0, 6) === "webkit") { 1977 //Microsoft and some Webkit browsers don't conform to the standard of capitalizing the first prefix character, so we adjust so that when we prefix the caps with a dash, it's correct (otherwise it'd be "ms-transform" instead of "-ms-transform" for IE9, for example) 1978 property = "-" + property; 1979 } 1980 1981 style.removeProperty(first2Chars === "--" ? property : property.replace(_capsExp, "-$1").toLowerCase()); 1982 } else { 1983 //note: old versions of IE use "removeAttribute()" instead of "removeProperty()" 1984 style.removeAttribute(property); 1985 } 1986 } 1987}, 1988 _addNonTweeningPT = function _addNonTweeningPT(plugin, target, property, beginning, end, onlySetAtEnd) { 1989 var pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, target, property, 0, 1, onlySetAtEnd ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue); 1990 plugin._pt = pt; 1991 pt.b = beginning; 1992 pt.e = end; 1993 1994 plugin._props.push(property); 1995 1996 return pt; 1997}, 1998 _nonConvertibleUnits = { 1999 deg: 1, 2000 rad: 1, 2001 turn: 1 2002}, 2003 _nonStandardLayouts = { 2004 grid: 1, 2005 flex: 1 2006}, 2007 //takes a single value like 20px and converts it to the unit specified, like "%", returning only the numeric amount. 2008_convertToUnit = function _convertToUnit(target, property, value, unit) { 2009 var curValue = parseFloat(value) || 0, 2010 curUnit = (value + "").trim().substr((curValue + "").length) || "px", 2011 // some browsers leave extra whitespace at the beginning of CSS variables, hence the need to trim() 2012 style = _tempDiv.style, 2013 horizontal = _horizontalExp.test(property), 2014 isRootSVG = target.tagName.toLowerCase() === "svg", 2015 measureProperty = (isRootSVG ? "client" : "offset") + (horizontal ? "Width" : "Height"), 2016 amount = 100, 2017 toPixels = unit === "px", 2018 toPercent = unit === "%", 2019 px, 2020 parent, 2021 cache, 2022 isSVG; 2023 2024 if (unit === curUnit || !curValue || _nonConvertibleUnits[unit] || _nonConvertibleUnits[curUnit]) { 2025 return curValue; 2026 } 2027 2028 curUnit !== "px" && !toPixels && (curValue = _convertToUnit(target, property, value, "px")); 2029 isSVG = target.getCTM && _isSVG(target); 2030 2031 if ((toPercent || curUnit === "%") && (_transformProps[property] || ~property.indexOf("adius"))) { 2032 px = isSVG ? target.getBBox()[horizontal ? "width" : "height"] : target[measureProperty]; 2033 return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(toPercent ? curValue / px * amount : curValue / 100 * px); 2034 } 2035 2036 style[horizontal ? "width" : "height"] = amount + (toPixels ? curUnit : unit); 2037 parent = ~property.indexOf("adius") || unit === "em" && target.appendChild && !isRootSVG ? target : target.parentNode; 2038 2039 if (isSVG) { 2040 parent = (target.ownerSVGElement || {}).parentNode; 2041 } 2042 2043 if (!parent || parent === _doc || !parent.appendChild) { 2044 parent = _doc.body; 2045 } 2046 2047 cache = parent._gsap; 2048 2049 if (cache && toPercent && cache.width && horizontal && cache.time === _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_ticker"].time && !cache.uncache) { 2050 return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(curValue / cache.width * amount); 2051 } else { 2052 if (toPercent && (property === "height" || property === "width")) { 2053 // if we're dealing with width/height that's inside a container with padding and/or it's a flexbox/grid container, we must apply it to the target itself rather than the _tempDiv in order to ensure complete accuracy, factoring in the parent's padding. 2054 var v = target.style[property]; 2055 target.style[property] = amount + unit; 2056 px = target[measureProperty]; 2057 v ? target.style[property] = v : _removeProperty(target, property); 2058 } else { 2059 (toPercent || curUnit === "%") && !_nonStandardLayouts[_getComputedProperty(parent, "display")] && (style.position = _getComputedProperty(target, "position")); 2060 parent === target && (style.position = "static"); // like for borderRadius, if it's a % we must have it relative to the target itself but that may not have position: relative or position: absolute in which case it'd go up the chain until it finds its offsetParent (bad). position: static protects against that. 2061 2062 parent.appendChild(_tempDiv); 2063 px = _tempDiv[measureProperty]; 2064 parent.removeChild(_tempDiv); 2065 style.position = "absolute"; 2066 } 2067 2068 if (horizontal && toPercent) { 2069 cache = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getCache"])(parent); 2070 cache.time = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_ticker"].time; 2071 cache.width = parent[measureProperty]; 2072 } 2073 } 2074 2075 return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(toPixels ? px * curValue / amount : px && curValue ? amount / px * curValue : 0); 2076}, 2077 _get = function _get(target, property, unit, uncache) { 2078 var value; 2079 _pluginInitted || _initCore(); 2080 2081 if (property in _propertyAliases && property !== "transform") { 2082 property = _propertyAliases[property]; 2083 2084 if (~property.indexOf(",")) { 2085 property = property.split(",")[0]; 2086 } 2087 } 2088 2089 if (_transformProps[property] && property !== "transform") { 2090 value = _parseTransform(target, uncache); 2091 value = property !== "transformOrigin" ? value[property] : value.svg ? value.origin : _firstTwoOnly(_getComputedProperty(target, _transformOriginProp)) + " " + value.zOrigin + "px"; 2092 } else { 2093 value = target.style[property]; 2094 2095 if (!value || value === "auto" || uncache || ~(value + "").indexOf("calc(")) { 2096 value = _specialProps[property] && _specialProps[property](target, property, unit) || _getComputedProperty(target, property) || Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getProperty"])(target, property) || (property === "opacity" ? 1 : 0); // note: some browsers, like Firefox, don't report borderRadius correctly! Instead, it only reports every corner like borderTopLeftRadius 2097 } 2098 } 2099 2100 return unit && !~(value + "").trim().indexOf(" ") ? _convertToUnit(target, property, value, unit) + unit : value; 2101}, 2102 _tweenComplexCSSString = function _tweenComplexCSSString(target, prop, start, end) { 2103 // note: we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin. 2104 if (!start || start === "none") { 2105 // some browsers like Safari actually PREFER the prefixed property and mis-report the unprefixed value like clipPath (BUG). In other words, even though clipPath exists in the style ("clipPath" in target.style) and it's set in the CSS properly (along with -webkit-clip-path), Safari reports clipPath as "none" whereas WebkitClipPath reports accurately like "ellipse(100% 0% at 50% 0%)", so in this case we must SWITCH to using the prefixed property instead. See https://gsap.com/forums/topic/18310-clippath-doesnt-work-on-ios/ 2106 var p = _checkPropPrefix(prop, target, 1), 2107 s = p && _getComputedProperty(target, p, 1); 2108 2109 if (s && s !== start) { 2110 prop = p; 2111 start = s; 2112 } else if (prop === "borderColor") { 2113 start = _getComputedProperty(target, "borderTopColor"); // Firefox bug: always reports "borderColor" as "", so we must fall back to borderTopColor. See https://gsap.com/forums/topic/24583-how-to-return-colors-that-i-had-after-reverse/ 2114 } 2115 } 2116 2117 var pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, target.style, prop, 0, 1, _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_renderComplexString"]), 2118 index = 0, 2119 matchIndex = 0, 2120 a, 2121 result, 2122 startValues, 2123 startNum, 2124 color, 2125 startValue, 2126 endValue, 2127 endNum, 2128 chunk, 2129 endUnit, 2130 startUnit, 2131 endValues; 2132 pt.b = start; 2133 pt.e = end; 2134 start += ""; // ensure values are strings 2135 2136 end += ""; 2137 2138 if (end === "auto") { 2139 startValue = target.style[prop]; 2140 target.style[prop] = end; 2141 end = _getComputedProperty(target, prop) || end; 2142 startValue ? target.style[prop] = startValue : _removeProperty(target, prop); 2143 } 2144 2145 a = [start, end]; 2146 2147 Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_colorStringFilter"])(a); // pass an array with the starting and ending values and let the filter do whatever it needs to the values. If colors are found, it returns true and then we must match where the color shows up order-wise because for things like boxShadow, sometimes the browser provides the computed values with the color FIRST, but the user provides it with the color LAST, so flip them if necessary. Same for drop-shadow(). 2148 2149 2150 start = a[0]; 2151 end = a[1]; 2152 startValues = start.match(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numWithUnitExp"]) || []; 2153 endValues = end.match(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numWithUnitExp"]) || []; 2154 2155 if (endValues.length) { 2156 while (result = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numWithUnitExp"].exec(end)) { 2157 endValue = result[0]; 2158 chunk = end.substring(index, result.index); 2159 2160 if (color) { 2161 color = (color + 1) % 5; 2162 } else if (chunk.substr(-5) === "rgba(" || chunk.substr(-5) === "hsla(") { 2163 color = 1; 2164 } 2165 2166 if (endValue !== (startValue = startValues[matchIndex++] || "")) { 2167 startNum = parseFloat(startValue) || 0; 2168 startUnit = startValue.substr((startNum + "").length); 2169 endValue.charAt(1) === "=" && (endValue = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_parseRelative"])(startNum, endValue) + startUnit); 2170 endNum = parseFloat(endValue); 2171 endUnit = endValue.substr((endNum + "").length); 2172 index = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numWithUnitExp"].lastIndex - endUnit.length; 2173 2174 if (!endUnit) { 2175 //if something like "perspective:300" is passed in and we must add a unit to the end 2176 endUnit = endUnit || _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[prop] || startUnit; 2177 2178 if (index === end.length) { 2179 end += endUnit; 2180 pt.e += endUnit; 2181 } 2182 } 2183 2184 if (startUnit !== endUnit) { 2185 startNum = _convertToUnit(target, prop, startValue, endUnit) || 0; 2186 } // these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method. 2187 2188 2189 pt._pt = { 2190 _next: pt._pt, 2191 p: chunk || matchIndex === 1 ? chunk : ",", 2192 //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case. 2193 s: startNum, 2194 c: endNum - startNum, 2195 m: color && color < 4 || prop === "zIndex" ? Math.round : 0 2196 }; 2197 } 2198 } 2199 2200 pt.c = index < end.length ? end.substring(index, end.length) : ""; //we use the "c" of the PropTween to store the final part of the string (after the last number) 2201 } else { 2202 pt.r = prop === "display" && end === "none" ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue; 2203 } 2204 2205 _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_relExp"].test(end) && (pt.e = 0); //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value). 2206 2207 this._pt = pt; //start the linked list with this new PropTween. Remember, we call _tweenComplexCSSString.call(pluginInstance...) to ensure that it's scoped properly. We may call it from within another plugin too, thus "this" would refer to the plugin. 2208 2209 return pt; 2210}, 2211 _keywordToPercent = { 2212 top: "0%", 2213 bottom: "100%", 2214 left: "0%", 2215 right: "100%", 2216 center: "50%" 2217}, 2218 _convertKeywordsToPercentages = function _convertKeywordsToPercentages(value) { 2219 var split = value.split(" "), 2220 x = split[0], 2221 y = split[1] || "50%"; 2222 2223 if (x === "top" || x === "bottom" || y === "left" || y === "right") { 2224 //the user provided them in the wrong order, so flip them 2225 value = x; 2226 x = y; 2227 y = value; 2228 } 2229 2230 split[0] = _keywordToPercent[x] || x; 2231 split[1] = _keywordToPercent[y] || y; 2232 return split.join(" "); 2233}, 2234 _renderClearProps = function _renderClearProps(ratio, data) { 2235 if (data.tween && data.tween._time === data.tween._dur) { 2236 var target = data.t, 2237 style = target.style, 2238 props = data.u, 2239 cache = target._gsap, 2240 prop, 2241 clearTransforms, 2242 i; 2243 2244 if (props === "all" || props === true) { 2245 style.cssText = ""; 2246 clearTransforms = 1; 2247 } else { 2248 props = props.split(","); 2249 i = props.length; 2250 2251 while (--i > -1) { 2252 prop = props[i]; 2253 2254 if (_transformProps[prop]) { 2255 clearTransforms = 1; 2256 prop = prop === "transformOrigin" ? _transformOriginProp : _transformProp; 2257 } 2258 2259 _removeProperty(target, prop); 2260 } 2261 } 2262 2263 if (clearTransforms) { 2264 _removeProperty(target, _transformProp); 2265 2266 if (cache) { 2267 cache.svg && target.removeAttribute("transform"); 2268 2269 _parseTransform(target, 1); // force all the cached values back to "normal"/identity, otherwise if there's another tween that's already set to render transforms on this element, it could display the wrong values. 2270 2271 2272 cache.uncache = 1; 2273 2274 _removeIndependentTransforms(style); 2275 } 2276 } 2277 } 2278}, 2279 // note: specialProps should return 1 if (and only if) they have a non-zero priority. It indicates we need to sort the linked list. 2280_specialProps = { 2281 clearProps: function clearProps(plugin, target, property, endValue, tween) { 2282 if (tween.data !== "isFromStart") { 2283 var pt = plugin._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, target, property, 0, 0, _renderClearProps); 2284 pt.u = endValue; 2285 pt.pr = -10; 2286 pt.tween = tween; 2287 2288 plugin._props.push(property); 2289 2290 return 1; 2291 } 2292 } 2293 /* className feature (about 0.4kb gzipped). 2294 , className(plugin, target, property, endValue, tween) { 2295 let _renderClassName = (ratio, data) => { 2296 data.css.render(ratio, data.css); 2297 if (!ratio || ratio === 1) { 2298 let inline = data.rmv, 2299 target = data.t, 2300 p; 2301 target.setAttribute("class", ratio ? data.e : data.b); 2302 for (p in inline) { 2303 _removeProperty(target, p); 2304 } 2305 } 2306 }, 2307 _getAllStyles = (target) => { 2308 let styles = {}, 2309 computed = getComputedStyle(target), 2310 p; 2311 for (p in computed) { 2312 if (isNaN(p) && p !== "cssText" && p !== "length") { 2313 styles[p] = computed[p]; 2314 } 2315 } 2316 _setDefaults(styles, _parseTransform(target, 1)); 2317 return styles; 2318 }, 2319 startClassList = target.getAttribute("class"), 2320 style = target.style, 2321 cssText = style.cssText, 2322 cache = target._gsap, 2323 classPT = cache.classPT, 2324 inlineToRemoveAtEnd = {}, 2325 data = {t:target, plugin:plugin, rmv:inlineToRemoveAtEnd, b:startClassList, e:(endValue.charAt(1) !== "=") ? endValue : startClassList.replace(new RegExp("(?:\\s|^)" + endValue.substr(2) + "(?![\\w-])"), "") + ((endValue.charAt(0) === "+") ? " " + endValue.substr(2) : "")}, 2326 changingVars = {}, 2327 startVars = _getAllStyles(target), 2328 transformRelated = /(transform|perspective)/i, 2329 endVars, p; 2330 if (classPT) { 2331 classPT.r(1, classPT.d); 2332 _removeLinkedListItem(classPT.d.plugin, classPT, "_pt"); 2333 } 2334 target.setAttribute("class", data.e); 2335 endVars = _getAllStyles(target, true); 2336 target.setAttribute("class", startClassList); 2337 for (p in endVars) { 2338 if (endVars[p] !== startVars[p] && !transformRelated.test(p)) { 2339 changingVars[p] = endVars[p]; 2340 if (!style[p] && style[p] !== "0") { 2341 inlineToRemoveAtEnd[p] = 1; 2342 } 2343 } 2344 } 2345 cache.classPT = plugin._pt = new PropTween(plugin._pt, target, "className", 0, 0, _renderClassName, data, 0, -11); 2346 if (style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://gsap.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/. 2347 style.cssText = cssText; //we recorded cssText before we swapped classes and ran _getAllStyles() because in cases when a className tween is overwritten, we remove all the related tweening properties from that class change (otherwise class-specific stuff can't override properties we've directly set on the target's style object due to specificity). 2348 } 2349 _parseTransform(target, true); //to clear the caching of transforms 2350 data.css = new gsap.plugins.css(); 2351 data.css.init(target, changingVars, tween); 2352 plugin._props.push(...data.css._props); 2353 return 1; 2354 } 2355 */ 2356 2357}, 2358 2359/* 2360 * -------------------------------------------------------------------------------------- 2361 * TRANSFORMS 2362 * -------------------------------------------------------------------------------------- 2363 */ 2364_identity2DMatrix = [1, 0, 0, 1, 0, 0], 2365 _rotationalProperties = {}, 2366 _isNullTransform = function _isNullTransform(value) { 2367 return value === "matrix(1, 0, 0, 1, 0, 0)" || value === "none" || !value; 2368}, 2369 _getComputedTransformMatrixAsArray = function _getComputedTransformMatrixAsArray(target) { 2370 var matrixString = _getComputedProperty(target, _transformProp); 2371 2372 return _isNullTransform(matrixString) ? _identity2DMatrix : matrixString.substr(7).match(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_numExp"]).map(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"]); 2373}, 2374 _getMatrix = function _getMatrix(target, force2D) { 2375 var cache = target._gsap || Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getCache"])(target), 2376 style = target.style, 2377 matrix = _getComputedTransformMatrixAsArray(target), 2378 parent, 2379 nextSibling, 2380 temp, 2381 addedToDOM; 2382 2383 if (cache.svg && target.getAttribute("transform")) { 2384 temp = target.transform.baseVal.consolidate().matrix; //ensures that even complex values like "translate(50,60) rotate(135,0,0)" are parsed because it mashes it into a matrix. 2385 2386 matrix = [temp.a, temp.b, temp.c, temp.d, temp.e, temp.f]; 2387 return matrix.join(",") === "1,0,0,1,0,0" ? _identity2DMatrix : matrix; 2388 } else if (matrix === _identity2DMatrix && !target.offsetParent && target !== _docElement && !cache.svg) { 2389 //note: if offsetParent is null, that means the element isn't in the normal document flow, like if it has display:none or one of its ancestors has display:none). Firefox returns null for getComputedStyle() if the element is in an iframe that has display:none. https://bugzilla.mozilla.org/show_bug.cgi?id=548397 2390 //browsers don't report transforms accurately unless the element is in the DOM and has a display value that's not "none". Firefox and Microsoft browsers have a partial bug where they'll report transforms even if display:none BUT not any percentage-based values like translate(-50%, 8px) will be reported as if it's translate(0, 8px). 2391 temp = style.display; 2392 style.display = "block"; 2393 parent = target.parentNode; 2394 2395 if (!parent || !target.offsetParent) { 2396 // note: in 3.3.0 we switched target.offsetParent to _doc.body.contains(target) to avoid [sometimes unnecessary] MutationObserver calls but that wasn't adequate because there are edge cases where nested position: fixed elements need to get reparented to accurately sense transforms. See https://github.com/greensock/GSAP/issues/388 and https://github.com/greensock/GSAP/issues/375 2397 addedToDOM = 1; //flag 2398 2399 nextSibling = target.nextElementSibling; 2400 2401 _docElement.appendChild(target); //we must add it to the DOM in order to get values properly 2402 2403 } 2404 2405 matrix = _getComputedTransformMatrixAsArray(target); 2406 temp ? style.display = temp : _removeProperty(target, "display"); 2407 2408 if (addedToDOM) { 2409 nextSibling ? parent.insertBefore(target, nextSibling) : parent ? parent.appendChild(target) : _docElement.removeChild(target); 2410 } 2411 } 2412 2413 return force2D && matrix.length > 6 ? [matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]] : matrix; 2414}, 2415 _applySVGOrigin = function _applySVGOrigin(target, origin, originIsAbsolute, smooth, matrixArray, pluginToAddPropTweensTo) { 2416 var cache = target._gsap, 2417 matrix = matrixArray || _getMatrix(target, true), 2418 xOriginOld = cache.xOrigin || 0, 2419 yOriginOld = cache.yOrigin || 0, 2420 xOffsetOld = cache.xOffset || 0, 2421 yOffsetOld = cache.yOffset || 0, 2422 a = matrix[0], 2423 b = matrix[1], 2424 c = matrix[2], 2425 d = matrix[3], 2426 tx = matrix[4], 2427 ty = matrix[5], 2428 originSplit = origin.split(" "), 2429 xOrigin = parseFloat(originSplit[0]) || 0, 2430 yOrigin = parseFloat(originSplit[1]) || 0, 2431 bounds, 2432 determinant, 2433 x, 2434 y; 2435 2436 if (!originIsAbsolute) { 2437 bounds = _getBBox(target); 2438 xOrigin = bounds.x + (~originSplit[0].indexOf("%") ? xOrigin / 100 * bounds.width : xOrigin); 2439 yOrigin = bounds.y + (~(originSplit[1] || originSplit[0]).indexOf("%") ? yOrigin / 100 * bounds.height : yOrigin); // if (!("xOrigin" in cache) && (xOrigin || yOrigin)) { // added in 3.12.3, reverted in 3.12.4; requires more exploration 2440 // xOrigin -= bounds.x; 2441 // yOrigin -= bounds.y; 2442 // } 2443 } else if (matrix !== _identity2DMatrix && (determinant = a * d - b * c)) { 2444 //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero. 2445 x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + (c * ty - d * tx) / determinant; 2446 y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - (a * ty - b * tx) / determinant; 2447 xOrigin = x; 2448 yOrigin = y; // theory: we only had to do this for smoothing and it assumes that the previous one was not originIsAbsolute. 2449 } 2450 2451 if (smooth || smooth !== false && cache.smooth) { 2452 tx = xOrigin - xOriginOld; 2453 ty = yOrigin - yOriginOld; 2454 cache.xOffset = xOffsetOld + (tx * a + ty * c) - tx; 2455 cache.yOffset = yOffsetOld + (tx * b + ty * d) - ty; 2456 } else { 2457 cache.xOffset = cache.yOffset = 0; 2458 } 2459 2460 cache.xOrigin = xOrigin; 2461 cache.yOrigin = yOrigin; 2462 cache.smooth = !!smooth; 2463 cache.origin = origin; 2464 cache.originIsAbsolute = !!originIsAbsolute; 2465 target.style[_transformOriginProp] = "0px 0px"; //otherwise, if someone sets an origin via CSS, it will likely interfere with the SVG transform attribute ones (because remember, we're baking the origin into the matrix() value). 2466 2467 if (pluginToAddPropTweensTo) { 2468 _addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOrigin", xOriginOld, xOrigin); 2469 2470 _addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOrigin", yOriginOld, yOrigin); 2471 2472 _addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOffset", xOffsetOld, cache.xOffset); 2473 2474 _addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOffset", yOffsetOld, cache.yOffset); 2475 } 2476 2477 target.setAttribute("data-svg-origin", xOrigin + " " + yOrigin); 2478}, 2479 _parseTransform = function _parseTransform(target, uncache) { 2480 var cache = target._gsap || new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["GSCache"](target); 2481 2482 if ("x" in cache && !uncache && !cache.uncache) { 2483 return cache; 2484 } 2485 2486 var style = target.style, 2487 invertedScaleX = cache.scaleX < 0, 2488 px = "px", 2489 deg = "deg", 2490 cs = getComputedStyle(target), 2491 origin = _getComputedProperty(target, _transformOriginProp) || "0", 2492 x, 2493 y, 2494 z, 2495 scaleX, 2496 scaleY, 2497 rotation, 2498 rotationX, 2499 rotationY, 2500 skewX, 2501 skewY, 2502 perspective, 2503 xOrigin, 2504 yOrigin, 2505 matrix, 2506 angle, 2507 cos, 2508 sin, 2509 a, 2510 b, 2511 c, 2512 d, 2513 a12, 2514 a22, 2515 t1, 2516 t2, 2517 t3, 2518 a13, 2519 a23, 2520 a33, 2521 a42, 2522 a43, 2523 a32; 2524 x = y = z = rotation = rotationX = rotationY = skewX = skewY = perspective = 0; 2525 scaleX = scaleY = 1; 2526 cache.svg = !!(target.getCTM && _isSVG(target)); 2527 2528 if (cs.translate) { 2529 // accommodate independent transforms by combining them into normal ones. 2530 if (cs.translate !== "none" || cs.scale !== "none" || cs.rotate !== "none") { 2531 style[_transformProp] = (cs.translate !== "none" ? "translate3d(" + (cs.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (cs.rotate !== "none" ? "rotate(" + cs.rotate + ") " : "") + (cs.scale !== "none" ? "scale(" + cs.scale.split(" ").join(",") + ") " : "") + (cs[_transformProp] !== "none" ? cs[_transformProp] : ""); 2532 } 2533 2534 style.scale = style.rotate = style.translate = "none"; 2535 } 2536 2537 matrix = _getMatrix(target, cache.svg); 2538 2539 if (cache.svg) { 2540 if (cache.uncache) { 2541 // if cache.uncache is true (and maybe if origin is 0,0), we need to set element.style.transformOrigin = (cache.xOrigin - bbox.x) + "px " + (cache.yOrigin - bbox.y) + "px". Previously we let the data-svg-origin stay instead, but when introducing revert(), it complicated things. 2542 t2 = target.getBBox(); 2543 origin = cache.xOrigin - t2.x + "px " + (cache.yOrigin - t2.y) + "px"; 2544 t1 = ""; 2545 } else { 2546 t1 = !uncache && target.getAttribute("data-svg-origin"); // Remember, to work around browser inconsistencies we always force SVG elements' transformOrigin to 0,0 and offset the translation accordingly. 2547 } 2548 2549 _applySVGOrigin(target, t1 || origin, !!t1 || cache.originIsAbsolute, cache.smooth !== false, matrix); 2550 } 2551 2552 xOrigin = cache.xOrigin || 0; 2553 yOrigin = cache.yOrigin || 0; 2554 2555 if (matrix !== _identity2DMatrix) { 2556 a = matrix[0]; //a11 2557 2558 b = matrix[1]; //a21 2559 2560 c = matrix[2]; //a31 2561 2562 d = matrix[3]; //a41 2563 2564 x = a12 = matrix[4]; 2565 y = a22 = matrix[5]; //2D matrix 2566 2567 if (matrix.length === 6) { 2568 scaleX = Math.sqrt(a * a + b * b); 2569 scaleY = Math.sqrt(d * d + c * c); 2570 rotation = a || b ? _atan2(b, a) * _RAD2DEG : 0; //note: if scaleX is 0, we cannot accurately measure rotation. Same for skewX with a scaleY of 0. Therefore, we default to the previously recorded value (or zero if that doesn't exist). 2571 2572 skewX = c || d ? _atan2(c, d) * _RAD2DEG + rotation : 0; 2573 skewX && (scaleY *= Math.abs(Math.cos(skewX * _DEG2RAD))); 2574 2575 if (cache.svg) { 2576 x -= xOrigin - (xOrigin * a + yOrigin * c); 2577 y -= yOrigin - (xOrigin * b + yOrigin * d); 2578 } //3D matrix 2579 2580 } else { 2581 a32 = matrix[6]; 2582 a42 = matrix[7]; 2583 a13 = matrix[8]; 2584 a23 = matrix[9]; 2585 a33 = matrix[10]; 2586 a43 = matrix[11]; 2587 x = matrix[12]; 2588 y = matrix[13]; 2589 z = matrix[14]; 2590 angle = _atan2(a32, a33); 2591 rotationX = angle * _RAD2DEG; //rotationX 2592 2593 if (angle) { 2594 cos = Math.cos(-angle); 2595 sin = Math.sin(-angle); 2596 t1 = a12 * cos + a13 * sin; 2597 t2 = a22 * cos + a23 * sin; 2598 t3 = a32 * cos + a33 * sin; 2599 a13 = a12 * -sin + a13 * cos; 2600 a23 = a22 * -sin + a23 * cos; 2601 a33 = a32 * -sin + a33 * cos; 2602 a43 = a42 * -sin + a43 * cos; 2603 a12 = t1; 2604 a22 = t2; 2605 a32 = t3; 2606 } //rotationY 2607 2608 2609 angle = _atan2(-c, a33); 2610 rotationY = angle * _RAD2DEG; 2611 2612 if (angle) { 2613 cos = Math.cos(-angle); 2614 sin = Math.sin(-angle); 2615 t1 = a * cos - a13 * sin; 2616 t2 = b * cos - a23 * sin; 2617 t3 = c * cos - a33 * sin; 2618 a43 = d * sin + a43 * cos; 2619 a = t1; 2620 b = t2; 2621 c = t3; 2622 } //rotationZ 2623 2624 2625 angle = _atan2(b, a); 2626 rotation = angle * _RAD2DEG; 2627 2628 if (angle) { 2629 cos = Math.cos(angle); 2630 sin = Math.sin(angle); 2631 t1 = a * cos + b * sin; 2632 t2 = a12 * cos + a22 * sin; 2633 b = b * cos - a * sin; 2634 a22 = a22 * cos - a12 * sin; 2635 a = t1; 2636 a12 = t2; 2637 } 2638 2639 if (rotationX && Math.abs(rotationX) + Math.abs(rotation) > 359.9) { 2640 //when rotationY is set, it will often be parsed as 180 degrees different than it should be, and rotationX and rotation both being 180 (it looks the same), so we adjust for that here. 2641 rotationX = rotation = 0; 2642 rotationY = 180 - rotationY; 2643 } 2644 2645 scaleX = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(Math.sqrt(a * a + b * b + c * c)); 2646 scaleY = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(Math.sqrt(a22 * a22 + a32 * a32)); 2647 angle = _atan2(a12, a22); 2648 skewX = Math.abs(angle) > 0.0002 ? angle * _RAD2DEG : 0; 2649 perspective = a43 ? 1 / (a43 < 0 ? -a43 : a43) : 0; 2650 } 2651 2652 if (cache.svg) { 2653 //sense if there are CSS transforms applied on an SVG element in which case we must overwrite them when rendering. The transform attribute is more reliable cross-browser, but we can't just remove the CSS ones because they may be applied in a CSS rule somewhere (not just inline). 2654 t1 = target.getAttribute("transform"); 2655 cache.forceCSS = target.setAttribute("transform", "") || !_isNullTransform(_getComputedProperty(target, _transformProp)); 2656 t1 && target.setAttribute("transform", t1); 2657 } 2658 } 2659 2660 if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) { 2661 if (invertedScaleX) { 2662 scaleX *= -1; 2663 skewX += rotation <= 0 ? 180 : -180; 2664 rotation += rotation <= 0 ? 180 : -180; 2665 } else { 2666 scaleY *= -1; 2667 skewX += skewX <= 0 ? 180 : -180; 2668 } 2669 } 2670 2671 uncache = uncache || cache.uncache; 2672 cache.x = x - ((cache.xPercent = x && (!uncache && cache.xPercent || (Math.round(target.offsetWidth / 2) === Math.round(-x) ? -50 : 0))) ? target.offsetWidth * cache.xPercent / 100 : 0) + px; 2673 cache.y = y - ((cache.yPercent = y && (!uncache && cache.yPercent || (Math.round(target.offsetHeight / 2) === Math.round(-y) ? -50 : 0))) ? target.offsetHeight * cache.yPercent / 100 : 0) + px; 2674 cache.z = z + px; 2675 cache.scaleX = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(scaleX); 2676 cache.scaleY = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(scaleY); 2677 cache.rotation = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(rotation) + deg; 2678 cache.rotationX = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(rotationX) + deg; 2679 cache.rotationY = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(rotationY) + deg; 2680 cache.skewX = skewX + deg; 2681 cache.skewY = skewY + deg; 2682 cache.transformPerspective = perspective + px; 2683 2684 if (cache.zOrigin = parseFloat(origin.split(" ")[2]) || !uncache && cache.zOrigin || 0) { 2685 style[_transformOriginProp] = _firstTwoOnly(origin); 2686 } 2687 2688 cache.xOffset = cache.yOffset = 0; 2689 cache.force3D = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].force3D; 2690 cache.renderTransform = cache.svg ? _renderSVGTransforms : _supports3D ? _renderCSSTransforms : _renderNon3DTransforms; 2691 cache.uncache = 0; 2692 return cache; 2693}, 2694 _firstTwoOnly = function _firstTwoOnly(value) { 2695 return (value = value.split(" "))[0] + " " + value[1]; 2696}, 2697 //for handling transformOrigin values, stripping out the 3rd dimension 2698_addPxTranslate = function _addPxTranslate(target, start, value) { 2699 var unit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(start); 2700 return Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(parseFloat(start) + parseFloat(_convertToUnit(target, "x", value + "px", unit))) + unit; 2701}, 2702 _renderNon3DTransforms = function _renderNon3DTransforms(ratio, cache) { 2703 cache.z = "0px"; 2704 cache.rotationY = cache.rotationX = "0deg"; 2705 cache.force3D = 0; 2706 2707 _renderCSSTransforms(ratio, cache); 2708}, 2709 _zeroDeg = "0deg", 2710 _zeroPx = "0px", 2711 _endParenthesis = ") ", 2712 _renderCSSTransforms = function _renderCSSTransforms(ratio, cache) { 2713 var _ref = cache || this, 2714 xPercent = _ref.xPercent, 2715 yPercent = _ref.yPercent, 2716 x = _ref.x, 2717 y = _ref.y, 2718 z = _ref.z, 2719 rotation = _ref.rotation, 2720 rotationY = _ref.rotationY, 2721 rotationX = _ref.rotationX, 2722 skewX = _ref.skewX, 2723 skewY = _ref.skewY, 2724 scaleX = _ref.scaleX, 2725 scaleY = _ref.scaleY, 2726 transformPerspective = _ref.transformPerspective, 2727 force3D = _ref.force3D, 2728 target = _ref.target, 2729 zOrigin = _ref.zOrigin, 2730 transforms = "", 2731 use3D = force3D === "auto" && ratio && ratio !== 1 || force3D === true; // Safari has a bug that causes it not to render 3D transform-origin values properly, so we force the z origin to 0, record it in the cache, and then do the math here to offset the translate values accordingly (basically do the 3D transform-origin part manually) 2732 2733 2734 if (zOrigin && (rotationX !== _zeroDeg || rotationY !== _zeroDeg)) { 2735 var angle = parseFloat(rotationY) * _DEG2RAD, 2736 a13 = Math.sin(angle), 2737 a33 = Math.cos(angle), 2738 cos; 2739 2740 angle = parseFloat(rotationX) * _DEG2RAD; 2741 cos = Math.cos(angle); 2742 x = _addPxTranslate(target, x, a13 * cos * -zOrigin); 2743 y = _addPxTranslate(target, y, -Math.sin(angle) * -zOrigin); 2744 z = _addPxTranslate(target, z, a33 * cos * -zOrigin + zOrigin); 2745 } 2746 2747 if (transformPerspective !== _zeroPx) { 2748 transforms += "perspective(" + transformPerspective + _endParenthesis; 2749 } 2750 2751 if (xPercent || yPercent) { 2752 transforms += "translate(" + xPercent + "%, " + yPercent + "%) "; 2753 } 2754 2755 if (use3D || x !== _zeroPx || y !== _zeroPx || z !== _zeroPx) { 2756 transforms += z !== _zeroPx || use3D ? "translate3d(" + x + ", " + y + ", " + z + ") " : "translate(" + x + ", " + y + _endParenthesis; 2757 } 2758 2759 if (rotation !== _zeroDeg) { 2760 transforms += "rotate(" + rotation + _endParenthesis; 2761 } 2762 2763 if (rotationY !== _zeroDeg) { 2764 transforms += "rotateY(" + rotationY + _endParenthesis; 2765 } 2766 2767 if (rotationX !== _zeroDeg) { 2768 transforms += "rotateX(" + rotationX + _endParenthesis; 2769 } 2770 2771 if (skewX !== _zeroDeg || skewY !== _zeroDeg) { 2772 transforms += "skew(" + skewX + ", " + skewY + _endParenthesis; 2773 } 2774 2775 if (scaleX !== 1 || scaleY !== 1) { 2776 transforms += "scale(" + scaleX + ", " + scaleY + _endParenthesis; 2777 } 2778 2779 target.style[_transformProp] = transforms || "translate(0, 0)"; 2780}, 2781 _renderSVGTransforms = function _renderSVGTransforms(ratio, cache) { 2782 var _ref2 = cache || this, 2783 xPercent = _ref2.xPercent, 2784 yPercent = _ref2.yPercent, 2785 x = _ref2.x, 2786 y = _ref2.y, 2787 rotation = _ref2.rotation, 2788 skewX = _ref2.skewX, 2789 skewY = _ref2.skewY, 2790 scaleX = _ref2.scaleX, 2791 scaleY = _ref2.scaleY, 2792 target = _ref2.target, 2793 xOrigin = _ref2.xOrigin, 2794 yOrigin = _ref2.yOrigin, 2795 xOffset = _ref2.xOffset, 2796 yOffset = _ref2.yOffset, 2797 forceCSS = _ref2.forceCSS, 2798 tx = parseFloat(x), 2799 ty = parseFloat(y), 2800 a11, 2801 a21, 2802 a12, 2803 a22, 2804 temp; 2805 2806 rotation = parseFloat(rotation); 2807 skewX = parseFloat(skewX); 2808 skewY = parseFloat(skewY); 2809 2810 if (skewY) { 2811 //for performance reasons, we combine all skewing into the skewX and rotation values. Remember, a skewY of 10 degrees looks the same as a rotation of 10 degrees plus a skewX of 10 degrees. 2812 skewY = parseFloat(skewY); 2813 skewX += skewY; 2814 rotation += skewY; 2815 } 2816 2817 if (rotation || skewX) { 2818 rotation *= _DEG2RAD; 2819 skewX *= _DEG2RAD; 2820 a11 = Math.cos(rotation) * scaleX; 2821 a21 = Math.sin(rotation) * scaleX; 2822 a12 = Math.sin(rotation - skewX) * -scaleY; 2823 a22 = Math.cos(rotation - skewX) * scaleY; 2824 2825 if (skewX) { 2826 skewY *= _DEG2RAD; 2827 temp = Math.tan(skewX - skewY); 2828 temp = Math.sqrt(1 + temp * temp); 2829 a12 *= temp; 2830 a22 *= temp; 2831 2832 if (skewY) { 2833 temp = Math.tan(skewY); 2834 temp = Math.sqrt(1 + temp * temp); 2835 a11 *= temp; 2836 a21 *= temp; 2837 } 2838 } 2839 2840 a11 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a11); 2841 a21 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a21); 2842 a12 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a12); 2843 a22 = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(a22); 2844 } else { 2845 a11 = scaleX; 2846 a22 = scaleY; 2847 a21 = a12 = 0; 2848 } 2849 2850 if (tx && !~(x + "").indexOf("px") || ty && !~(y + "").indexOf("px")) { 2851 tx = _convertToUnit(target, "x", x, "px"); 2852 ty = _convertToUnit(target, "y", y, "px"); 2853 } 2854 2855 if (xOrigin || yOrigin || xOffset || yOffset) { 2856 tx = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(tx + xOrigin - (xOrigin * a11 + yOrigin * a12) + xOffset); 2857 ty = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(ty + yOrigin - (xOrigin * a21 + yOrigin * a22) + yOffset); 2858 } 2859 2860 if (xPercent || yPercent) { 2861 //The SVG spec doesn't support percentage-based translation in the "transform" attribute, so we merge it into the translation to simulate it. 2862 temp = target.getBBox(); 2863 tx = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(tx + xPercent / 100 * temp.width); 2864 ty = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_round"])(ty + yPercent / 100 * temp.height); 2865 } 2866 2867 temp = "matrix(" + a11 + "," + a21 + "," + a12 + "," + a22 + "," + tx + "," + ty + ")"; 2868 target.setAttribute("transform", temp); 2869 forceCSS && (target.style[_transformProp] = temp); //some browsers prioritize CSS transforms over the transform attribute. When we sense that the user has CSS transforms applied, we must overwrite them this way (otherwise some browser simply won't render the transform attribute changes!) 2870}, 2871 _addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue) { 2872 var cap = 360, 2873 isString = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_isString"])(endValue), 2874 endNum = parseFloat(endValue) * (isString && ~endValue.indexOf("rad") ? _RAD2DEG : 1), 2875 change = endNum - startNum, 2876 finalValue = startNum + change + "deg", 2877 direction, 2878 pt; 2879 2880 if (isString) { 2881 direction = endValue.split("_")[1]; 2882 2883 if (direction === "short") { 2884 change %= cap; 2885 2886 if (change !== change % (cap / 2)) { 2887 change += change < 0 ? cap : -cap; 2888 } 2889 } 2890 2891 if (direction === "cw" && change < 0) { 2892 change = (change + cap * _bigNum) % cap - ~~(change / cap) * cap; 2893 } else if (direction === "ccw" && change > 0) { 2894 change = (change - cap * _bigNum) % cap - ~~(change / cap) * cap; 2895 } 2896 } 2897 2898 plugin._pt = pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, target, property, startNum, change, _renderPropWithEnd); 2899 pt.e = finalValue; 2900 pt.u = "deg"; 2901 2902 plugin._props.push(property); 2903 2904 return pt; 2905}, 2906 _assign = function _assign(target, source) { 2907 // Internet Explorer doesn't have Object.assign(), so we recreate it here. 2908 for (var p in source) { 2909 target[p] = source[p]; 2910 } 2911 2912 return target; 2913}, 2914 _addRawTransformPTs = function _addRawTransformPTs(plugin, transforms, target) { 2915 //for handling cases where someone passes in a whole transform string, like transform: "scale(2, 3) rotate(20deg) translateY(30em)" 2916 var startCache = _assign({}, target._gsap), 2917 exclude = "perspective,force3D,transformOrigin,svgOrigin", 2918 style = target.style, 2919 endCache, 2920 p, 2921 startValue, 2922 endValue, 2923 startNum, 2924 endNum, 2925 startUnit, 2926 endUnit; 2927 2928 if (startCache.svg) { 2929 startValue = target.getAttribute("transform"); 2930 target.setAttribute("transform", ""); 2931 style[_transformProp] = transforms; 2932 endCache = _parseTransform(target, 1); 2933 2934 _removeProperty(target, _transformProp); 2935 2936 target.setAttribute("transform", startValue); 2937 } else { 2938 startValue = getComputedStyle(target)[_transformProp]; 2939 style[_transformProp] = transforms; 2940 endCache = _parseTransform(target, 1); 2941 style[_transformProp] = startValue; 2942 } 2943 2944 for (p in _transformProps) { 2945 startValue = startCache[p]; 2946 endValue = endCache[p]; 2947 2948 if (startValue !== endValue && exclude.indexOf(p) < 0) { 2949 //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case. 2950 startUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(startValue); 2951 endUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(endValue); 2952 startNum = startUnit !== endUnit ? _convertToUnit(target, p, startValue, endUnit) : parseFloat(startValue); 2953 endNum = parseFloat(endValue); 2954 plugin._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](plugin._pt, endCache, p, startNum, endNum - startNum, _renderCSSProp); 2955 plugin._pt.u = endUnit || 0; 2956 2957 plugin._props.push(p); 2958 } 2959 } 2960 2961 _assign(endCache, startCache); 2962}; // handle splitting apart padding, margin, borderWidth, and borderRadius into their 4 components. Firefox, for example, won't report borderRadius correctly - it will only do borderTopLeftRadius and the other corners. We also want to handle paddingTop, marginLeft, borderRightWidth, etc. 2963 2964 2965Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])("padding,margin,Width,Radius", function (name, index) { 2966 var t = "Top", 2967 r = "Right", 2968 b = "Bottom", 2969 l = "Left", 2970 props = (index < 3 ? [t, r, b, l] : [t + l, t + r, b + r, b + l]).map(function (side) { 2971 return index < 2 ? name + side : "border" + side + name; 2972 }); 2973 2974 _specialProps[index > 1 ? "border" + name : name] = function (plugin, target, property, endValue, tween) { 2975 var a, vars; 2976 2977 if (arguments.length < 4) { 2978 // getter, passed target, property, and unit (from _get()) 2979 a = props.map(function (prop) { 2980 return _get(plugin, prop, property); 2981 }); 2982 vars = a.join(" "); 2983 return vars.split(a[0]).length === 5 ? a[0] : vars; 2984 } 2985 2986 a = (endValue + "").split(" "); 2987 vars = {}; 2988 props.forEach(function (prop, i) { 2989 return vars[prop] = a[i] = a[i] || a[(i - 1) / 2 | 0]; 2990 }); 2991 plugin.init(target, vars, tween); 2992 }; 2993}); 2994 2995var CSSPlugin = { 2996 name: "css", 2997 register: _initCore, 2998 targetTest: function targetTest(target) { 2999 return target.style && target.nodeType; 3000 }, 3001 init: function init(target, vars, tween, index, targets) { 3002 var props = this._props, 3003 style = target.style, 3004 startAt = tween.vars.startAt, 3005 startValue, 3006 endValue, 3007 endNum, 3008 startNum, 3009 type, 3010 specialProp, 3011 p, 3012 startUnit, 3013 endUnit, 3014 relative, 3015 isTransformRelated, 3016 transformPropTween, 3017 cache, 3018 smooth, 3019 hasPriority, 3020 inlineProps; 3021 _pluginInitted || _initCore(); // we may call init() multiple times on the same plugin instance, like when adding special properties, so make sure we don't overwrite the revert data or inlineProps 3022 3023 this.styles = this.styles || _getStyleSaver(target); 3024 inlineProps = this.styles.props; 3025 this.tween = tween; 3026 3027 for (p in vars) { 3028 if (p === "autoRound") { 3029 continue; 3030 } 3031 3032 endValue = vars[p]; 3033 3034 if (_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_plugins"][p] && Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_checkPlugin"])(p, vars, tween, index, target, targets)) { 3035 // plugins 3036 continue; 3037 } 3038 3039 type = typeof endValue; 3040 specialProp = _specialProps[p]; 3041 3042 if (type === "function") { 3043 endValue = endValue.call(tween, index, target, targets); 3044 type = typeof endValue; 3045 } 3046 3047 if (type === "string" && ~endValue.indexOf("random(")) { 3048 endValue = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_replaceRandom"])(endValue); 3049 } 3050 3051 if (specialProp) { 3052 specialProp(this, target, p, endValue, tween) && (hasPriority = 1); 3053 } else if (p.substr(0, 2) === "--") { 3054 //CSS variable 3055 startValue = (getComputedStyle(target).getPropertyValue(p) + "").trim(); 3056 endValue += ""; 3057 _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_colorExp"].lastIndex = 0; 3058 3059 if (!_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_colorExp"].test(startValue)) { 3060 // colors don't have units 3061 startUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(startValue); 3062 endUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(endValue); 3063 } 3064 3065 endUnit ? startUnit !== endUnit && (startValue = _convertToUnit(target, p, startValue, endUnit) + endUnit) : startUnit && (endValue += startUnit); 3066 this.add(style, "setProperty", startValue, endValue, index, targets, 0, 0, p); 3067 props.push(p); 3068 inlineProps.push(p, 0, style[p]); 3069 } else if (type !== "undefined") { 3070 if (startAt && p in startAt) { 3071 // in case someone hard-codes a complex value as the start, like top: "calc(2vh / 2)". Without this, it'd use the computed value (always in px) 3072 startValue = typeof startAt[p] === "function" ? startAt[p].call(tween, index, target, targets) : startAt[p]; 3073 Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_isString"])(startValue) && ~startValue.indexOf("random(") && (startValue = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_replaceRandom"])(startValue)); 3074 Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(startValue + "") || startValue === "auto" || (startValue += _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[p] || Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(_get(target, p)) || ""); // for cases when someone passes in a unitless value like {x: 100}; if we try setting translate(100, 0px) it won't work. 3075 3076 (startValue + "").charAt(1) === "=" && (startValue = _get(target, p)); // can't work with relative values 3077 } else { 3078 startValue = _get(target, p); 3079 } 3080 3081 startNum = parseFloat(startValue); 3082 relative = type === "string" && endValue.charAt(1) === "=" && endValue.substr(0, 2); 3083 relative && (endValue = endValue.substr(2)); 3084 endNum = parseFloat(endValue); 3085 3086 if (p in _propertyAliases) { 3087 if (p === "autoAlpha") { 3088 //special case where we control the visibility along with opacity. We still allow the opacity value to pass through and get tweened. 3089 if (startNum === 1 && _get(target, "visibility") === "hidden" && endNum) { 3090 //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience) 3091 startNum = 0; 3092 } 3093 3094 inlineProps.push("visibility", 0, style.visibility); 3095 3096 _addNonTweeningPT(this, style, "visibility", startNum ? "inherit" : "hidden", endNum ? "inherit" : "hidden", !endNum); 3097 } 3098 3099 if (p !== "scale" && p !== "transform") { 3100 p = _propertyAliases[p]; 3101 ~p.indexOf(",") && (p = p.split(",")[0]); 3102 } 3103 } 3104 3105 isTransformRelated = p in _transformProps; //--- TRANSFORM-RELATED --- 3106 3107 if (isTransformRelated) { 3108 this.styles.save(p); 3109 3110 if (!transformPropTween) { 3111 cache = target._gsap; 3112 cache.renderTransform && !vars.parseTransform || _parseTransform(target, vars.parseTransform); // if, for example, gsap.set(... {transform:"translateX(50vw)"}), the _get() call doesn't parse the transform, thus cache.renderTransform won't be set yet so force the parsing of the transform here. 3113 3114 smooth = vars.smoothOrigin !== false && cache.smooth; 3115 transformPropTween = this._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, style, _transformProp, 0, 1, cache.renderTransform, cache, 0, -1); //the first time through, create the rendering PropTween so that it runs LAST (in the linked list, we keep adding to the beginning) 3116 3117 transformPropTween.dep = 1; //flag it as dependent so that if things get killed/overwritten and this is the only PropTween left, we can safely kill the whole tween. 3118 } 3119 3120 if (p === "scale") { 3121 this._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, cache, "scaleY", cache.scaleY, (relative ? Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_parseRelative"])(cache.scaleY, relative + endNum) : endNum) - cache.scaleY || 0, _renderCSSProp); 3122 this._pt.u = 0; 3123 props.push("scaleY", p); 3124 p += "X"; 3125 } else if (p === "transformOrigin") { 3126 inlineProps.push(_transformOriginProp, 0, style[_transformOriginProp]); 3127 endValue = _convertKeywordsToPercentages(endValue); //in case something like "left top" or "bottom right" is passed in. Convert to percentages. 3128 3129 if (cache.svg) { 3130 _applySVGOrigin(target, endValue, 0, smooth, 0, this); 3131 } else { 3132 endUnit = parseFloat(endValue.split(" ")[2]) || 0; //handle the zOrigin separately! 3133 3134 endUnit !== cache.zOrigin && _addNonTweeningPT(this, cache, "zOrigin", cache.zOrigin, endUnit); 3135 3136 _addNonTweeningPT(this, style, p, _firstTwoOnly(startValue), _firstTwoOnly(endValue)); 3137 } 3138 3139 continue; 3140 } else if (p === "svgOrigin") { 3141 _applySVGOrigin(target, endValue, 1, smooth, 0, this); 3142 3143 continue; 3144 } else if (p in _rotationalProperties) { 3145 _addRotationalPropTween(this, cache, p, startNum, relative ? Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_parseRelative"])(startNum, relative + endValue) : endValue); 3146 3147 continue; 3148 } else if (p === "smoothOrigin") { 3149 _addNonTweeningPT(this, cache, "smooth", cache.smooth, endValue); 3150 3151 continue; 3152 } else if (p === "force3D") { 3153 cache[p] = endValue; 3154 continue; 3155 } else if (p === "transform") { 3156 _addRawTransformPTs(this, endValue, target); 3157 3158 continue; 3159 } 3160 } else if (!(p in style)) { 3161 p = _checkPropPrefix(p) || p; 3162 } 3163 3164 if (isTransformRelated || (endNum || endNum === 0) && (startNum || startNum === 0) && !_complexExp.test(endValue) && p in style) { 3165 startUnit = (startValue + "").substr((startNum + "").length); 3166 endNum || (endNum = 0); // protect against NaN 3167 3168 endUnit = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"])(endValue) || (p in _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units ? _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[p] : startUnit); 3169 startUnit !== endUnit && (startNum = _convertToUnit(target, p, startValue, endUnit)); 3170 this._pt = new _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["PropTween"](this._pt, isTransformRelated ? cache : style, p, startNum, (relative ? Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_parseRelative"])(startNum, relative + endNum) : endNum) - startNum, !isTransformRelated && (endUnit === "px" || p === "zIndex") && vars.autoRound !== false ? _renderRoundedCSSProp : _renderCSSProp); 3171 this._pt.u = endUnit || 0; 3172 3173 if (startUnit !== endUnit && endUnit !== "%") { 3174 //when the tween goes all the way back to the beginning, we need to revert it to the OLD/ORIGINAL value (with those units). We record that as a "b" (beginning) property and point to a render method that handles that. (performance optimization) 3175 this._pt.b = startValue; 3176 this._pt.r = _renderCSSPropWithBeginning; 3177 } 3178 } else if (!(p in style)) { 3179 if (p in target) { 3180 //maybe it's not a style - it could be a property added directly to an element in which case we'll try to animate that. 3181 this.add(target, p, startValue || target[p], relative ? relative + endValue : endValue, index, targets); 3182 } else if (p !== "parseTransform") { 3183 Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_missingPlugin"])(p, endValue); 3184 3185 continue; 3186 } 3187 } else { 3188 _tweenComplexCSSString.call(this, target, p, startValue, relative ? relative + endValue : endValue); 3189 } 3190 3191 isTransformRelated || (p in style ? inlineProps.push(p, 0, style[p]) : inlineProps.push(p, 1, startValue || target[p])); 3192 props.push(p); 3193 } 3194 } 3195 3196 hasPriority && Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_sortPropTweensByPriority"])(this); 3197 }, 3198 render: function render(ratio, data) { 3199 if (data.tween._time || !_reverting()) { 3200 var pt = data._pt; 3201 3202 while (pt) { 3203 pt.r(ratio, pt.d); 3204 pt = pt._next; 3205 } 3206 } else { 3207 data.styles.revert(); 3208 } 3209 }, 3210 get: _get, 3211 aliases: _propertyAliases, 3212 getSetter: function getSetter(target, property, plugin) { 3213 //returns a setter function that accepts target, property, value and applies it accordingly. Remember, properties like "x" aren't as simple as target.style.property = value because they've got to be applied to a proxy object and then merged into a transform string in a renderer. 3214 var p = _propertyAliases[property]; 3215 p && p.indexOf(",") < 0 && (property = p); 3216 return property in _transformProps && property !== _transformOriginProp && (target._gsap.x || _get(target, "x")) ? plugin && _recentSetterPlugin === plugin ? property === "scale" ? _setterScale : _setterTransform : (_recentSetterPlugin = plugin || {}) && (property === "scale" ? _setterScaleWithRender : _setterTransformWithRender) : target.style && !Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_isUndefined"])(target.style[property]) ? _setterCSSStyle : ~property.indexOf("-") ? _setterCSSProp : Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_getSetter"])(target, property); 3217 }, 3218 core: { 3219 _removeProperty: _removeProperty, 3220 _getMatrix: _getMatrix 3221 } 3222}; 3223_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].utils.checkPrefix = _checkPropPrefix; 3224_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].core.getStyleSaver = _getStyleSaver; 3225 3226(function (positionAndScale, rotation, others, aliases) { 3227 var all = Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])(positionAndScale + "," + rotation + "," + others, function (name) { 3228 _transformProps[name] = 1; 3229 }); 3230 3231 Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])(rotation, function (name) { 3232 _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[name] = "deg"; 3233 _rotationalProperties[name] = 1; 3234 }); 3235 3236 _propertyAliases[all[13]] = positionAndScale + "," + rotation; 3237 3238 Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])(aliases, function (name) { 3239 var split = name.split(":"); 3240 _propertyAliases[split[1]] = all[split[0]]; 3241 }); 3242})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent", "rotation,rotationX,rotationY,skewX,skewY", "transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY"); 3243 3244Object(_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_forEachName"])("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function (name) { 3245 _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["_config"].units[name] = "px"; 3246}); 3247 3248_gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].registerPlugin(CSSPlugin); 3249 3250 3251/***/ }), 3252
vendor: 4,135 bytes, lines 3253-3400
3253/***/ "./node_modules/gsap/CSSRulePlugin.js": 3254/*!********************************************!*\ 3255 !*** ./node_modules/gsap/CSSRulePlugin.js ***! 3256 \********************************************/ 3257/*! exports provided: CSSRulePlugin, default */ 3258/***/ (function(module, __webpack_exports__, __webpack_require__) { 3259 3260"use strict"; 3261__webpack_require__.r(__webpack_exports__); 3262/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSRulePlugin", function() { return CSSRulePlugin; }); 3263/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return CSSRulePlugin; }); 3264/*! 3265 * CSSRulePlugin 3.12.5 3266 * https://gsap.com 3267 * 3268 * @license Copyright 2008-2024, GreenSock. All rights reserved. 3269 * Subject to the terms at https://gsap.com/standard-license or for 3270 * Club GSAP members, the agreement issued with that membership. 3271 * @author: Jack Doyle, [email protected] 3272*/ 3273 3274/* eslint-disable */ 3275var gsap, 3276 _coreInitted, 3277 _win, 3278 _doc, 3279 CSSPlugin, 3280 _windowExists = function _windowExists() { 3281 return typeof window !== "undefined"; 3282}, 3283 _getGSAP = function _getGSAP() { 3284 return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap; 3285}, 3286 _checkRegister = function _checkRegister() { 3287 if (!_coreInitted) { 3288 _initCore(); 3289 3290 if (!CSSPlugin) { 3291 console.warn("Please gsap.registerPlugin(CSSPlugin, CSSRulePlugin)"); 3292 } 3293 } 3294 3295 return _coreInitted; 3296}, 3297 _initCore = function _initCore(core) { 3298 gsap = core || _getGSAP(); 3299 3300 if (_windowExists()) { 3301 _win = window; 3302 _doc = document; 3303 } 3304 3305 if (gsap) { 3306 CSSPlugin = gsap.plugins.css; 3307 3308 if (CSSPlugin) { 3309 _coreInitted = 1; 3310 } 3311 } 3312}; 3313 3314var CSSRulePlugin = { 3315 version: "3.12.5", 3316 name: "cssRule", 3317 init: function init(target, value, tween, index, targets) { 3318 if (!_checkRegister() || typeof target.cssText === "undefined") { 3319 return false; 3320 } 3321 3322 var div = target._gsProxy = target._gsProxy || _doc.createElement("div"); 3323 3324 this.ss = target; 3325 this.style = div.style; 3326 div.style.cssText = target.cssText; 3327 CSSPlugin.prototype.init.call(this, div, value, tween, index, targets); //we just offload all the work to the regular CSSPlugin and then copy the cssText back over to the rule in the render() method. This allows us to have all of the updates to CSSPlugin automatically flow through to CSSRulePlugin instead of having to maintain both 3328 }, 3329 render: function render(ratio, data) { 3330 var pt = data._pt, 3331 style = data.style, 3332 ss = data.ss, 3333 i; 3334 3335 while (pt) { 3336 pt.r(ratio, pt.d); 3337 pt = pt._next; 3338 } 3339 3340 i = style.length; 3341 3342 while (--i > -1) { 3343 ss[style[i]] = style[style[i]]; 3344 } 3345 }, 3346 getRule: function getRule(selector) { 3347 _checkRegister(); 3348 3349 var ruleProp = _doc.all ? "rules" : "cssRules", 3350 styleSheets = _doc.styleSheets, 3351 i = styleSheets.length, 3352 pseudo = selector.charAt(0) === ":", 3353 j, 3354 curSS, 3355 cs, 3356 a; 3357 selector = (pseudo ? "" : ",") + selector.split("::").join(":").toLowerCase() + ","; //note: old versions of IE report tag name selectors as upper case, so we just change everything to lowercase. 3358 3359 if (pseudo) { 3360 a = []; 3361 } 3362 3363 while (i--) { 3364 //Firefox may throw insecure operation errors when css is loaded from other domains, so try/catch. 3365 try { 3366 curSS = styleSheets[i][ruleProp]; 3367 3368 if (!curSS) { 3369 continue; 3370 } 3371 3372 j = curSS.length; 3373 } catch (e) { 3374 console.warn(e); 3375 continue; 3376 } 3377 3378 while (--j > -1) { 3379 cs = curSS[j]; 3380 3381 if (cs.selectorText && ("," + cs.selectorText.split("::").join(":").toLowerCase() + ",").indexOf(selector) !== -1) { 3382 //note: IE adds an extra ":" to pseudo selectors, so .myClass:after becomes .myClass::after, so we need to strip the extra one out. 3383 if (pseudo) { 3384 a.push(cs.style); 3385 } else { 3386 return cs.style; 3387 } 3388 } 3389 } 3390 } 3391 3392 return a; 3393 }, 3394 register: _initCore 3395}; 3396_getGSAP() && gsap.registerPlugin(CSSRulePlugin); 3397 3398 3399/***/ }), 3400
vendor: 12,028 bytes, lines 3401-3786
3401/***/ "./node_modules/gsap/CustomEase.js": 3402/*!*****************************************!*\ 3403 !*** ./node_modules/gsap/CustomEase.js ***! 3404 \*****************************************/ 3405/*! exports provided: CustomEase, default */ 3406/***/ (function(module, __webpack_exports__, __webpack_require__) { 3407 3408"use strict"; 3409__webpack_require__.r(__webpack_exports__); 3410/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CustomEase", function() { return CustomEase; }); 3411/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return CustomEase; }); 3412/* harmony import */ var _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/paths.js */ "./node_modules/gsap/utils/paths.js"); 3413/*! 3414 * CustomEase 3.12.5 3415 * https://gsap.com 3416 * 3417 * @license Copyright 2008-2024, GreenSock. All rights reserved. 3418 * Subject to the terms at https://gsap.com/standard-license or for 3419 * Club GSAP members, the agreement issued with that membership. 3420 * @author: Jack Doyle, [email protected] 3421*/ 3422 3423/* eslint-disable */ 3424 3425 3426var gsap, 3427 _coreInitted, 3428 _getGSAP = function _getGSAP() { 3429 return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 3430}, 3431 _initCore = function _initCore() { 3432 gsap = _getGSAP(); 3433 3434 if (gsap) { 3435 gsap.registerEase("_CE", CustomEase.create); 3436 _coreInitted = 1; 3437 } else { 3438 console.warn("Please gsap.registerPlugin(CustomEase)"); 3439 } 3440}, 3441 _bigNum = 1e20, 3442 _round = function _round(value) { 3443 return ~~(value * 1000 + (value < 0 ? -.5 : .5)) / 1000; 3444}, 3445 _bonusValidated = 1, 3446 //<name>CustomEase</name> 3447_numExp = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi, 3448 //finds any numbers, including ones that start with += or -=, negative numbers, and ones in scientific notation like 1e-8. 3449_needsParsingExp = /[cLlsSaAhHvVtTqQ]/g, 3450 _findMinimum = function _findMinimum(values) { 3451 var l = values.length, 3452 min = _bigNum, 3453 i; 3454 3455 for (i = 1; i < l; i += 6) { 3456 +values[i] < min && (min = +values[i]); 3457 } 3458 3459 return min; 3460}, 3461 //takes all the points and translates/scales them so that the x starts at 0 and ends at 1. 3462_normalize = function _normalize(values, height, originY) { 3463 if (!originY && originY !== 0) { 3464 originY = Math.max(+values[values.length - 1], +values[1]); 3465 } 3466 3467 var tx = +values[0] * -1, 3468 ty = -originY, 3469 l = values.length, 3470 sx = 1 / (+values[l - 2] + tx), 3471 sy = -height || (Math.abs(+values[l - 1] - +values[1]) < 0.01 * (+values[l - 2] - +values[0]) ? _findMinimum(values) + ty : +values[l - 1] + ty), 3472 i; 3473 3474 if (sy) { 3475 //typically y ends at 1 (so that the end values are reached) 3476 sy = 1 / sy; 3477 } else { 3478 //in case the ease returns to its beginning value, scale everything proportionally 3479 sy = -sx; 3480 } 3481 3482 for (i = 0; i < l; i += 2) { 3483 values[i] = (+values[i] + tx) * sx; 3484 values[i + 1] = (+values[i + 1] + ty) * sy; 3485 } 3486}, 3487 //note that this function returns point objects like {x, y} rather than working with segments which are arrays with alternating x, y values as in the similar function in paths.js 3488_bezierToPoints = function _bezierToPoints(x1, y1, x2, y2, x3, y3, x4, y4, threshold, points, index) { 3489 var x12 = (x1 + x2) / 2, 3490 y12 = (y1 + y2) / 2, 3491 x23 = (x2 + x3) / 2, 3492 y23 = (y2 + y3) / 2, 3493 x34 = (x3 + x4) / 2, 3494 y34 = (y3 + y4) / 2, 3495 x123 = (x12 + x23) / 2, 3496 y123 = (y12 + y23) / 2, 3497 x234 = (x23 + x34) / 2, 3498 y234 = (y23 + y34) / 2, 3499 x1234 = (x123 + x234) / 2, 3500 y1234 = (y123 + y234) / 2, 3501 dx = x4 - x1, 3502 dy = y4 - y1, 3503 d2 = Math.abs((x2 - x4) * dy - (y2 - y4) * dx), 3504 d3 = Math.abs((x3 - x4) * dy - (y3 - y4) * dx), 3505 length; 3506 3507 if (!points) { 3508 points = [{ 3509 x: x1, 3510 y: y1 3511 }, { 3512 x: x4, 3513 y: y4 3514 }]; 3515 index = 1; 3516 } 3517 3518 points.splice(index || points.length - 1, 0, { 3519 x: x1234, 3520 y: y1234 3521 }); 3522 3523 if ((d2 + d3) * (d2 + d3) > threshold * (dx * dx + dy * dy)) { 3524 length = points.length; 3525 3526 _bezierToPoints(x1, y1, x12, y12, x123, y123, x1234, y1234, threshold, points, index); 3527 3528 _bezierToPoints(x1234, y1234, x234, y234, x34, y34, x4, y4, threshold, points, index + 1 + (points.length - length)); 3529 } 3530 3531 return points; 3532}; 3533 3534var CustomEase = /*#__PURE__*/function () { 3535 function CustomEase(id, data, config) { 3536 _coreInitted || _initCore(); 3537 this.id = id; 3538 _bonusValidated && this.setData(data, config); 3539 } 3540 3541 var _proto = CustomEase.prototype; 3542 3543 _proto.setData = function setData(data, config) { 3544 config = config || {}; 3545 data = data || "0,0,1,1"; 3546 var values = data.match(_numExp), 3547 closest = 1, 3548 points = [], 3549 lookup = [], 3550 precision = config.precision || 1, 3551 fast = precision <= 1, 3552 l, 3553 a1, 3554 a2, 3555 i, 3556 inc, 3557 j, 3558 point, 3559 prevPoint, 3560 p; 3561 this.data = data; 3562 3563 if (_needsParsingExp.test(data) || ~data.indexOf("M") && data.indexOf("C") < 0) { 3564 values = Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["stringToRawPath"])(data)[0]; 3565 } 3566 3567 l = values.length; 3568 3569 if (l === 4) { 3570 values.unshift(0, 0); 3571 values.push(1, 1); 3572 l = 8; 3573 } else if ((l - 2) % 6) { 3574 throw "Invalid CustomEase"; 3575 } 3576 3577 if (+values[0] !== 0 || +values[l - 2] !== 1) { 3578 _normalize(values, config.height, config.originY); 3579 } 3580 3581 this.segment = values; 3582 3583 for (i = 2; i < l; i += 6) { 3584 a1 = { 3585 x: +values[i - 2], 3586 y: +values[i - 1] 3587 }; 3588 a2 = { 3589 x: +values[i + 4], 3590 y: +values[i + 5] 3591 }; 3592 points.push(a1, a2); 3593 3594 _bezierToPoints(a1.x, a1.y, +values[i], +values[i + 1], +values[i + 2], +values[i + 3], a2.x, a2.y, 1 / (precision * 200000), points, points.length - 1); 3595 } 3596 3597 l = points.length; 3598 3599 for (i = 0; i < l; i++) { 3600 point = points[i]; 3601 prevPoint = points[i - 1] || point; 3602 3603 if ((point.x > prevPoint.x || prevPoint.y !== point.y && prevPoint.x === point.x || point === prevPoint) && point.x <= 1) { 3604 //if a point goes BACKWARD in time or is a duplicate, just drop it. Also it shouldn't go past 1 on the x axis, as could happen in a string like "M0,0 C0,0 0.12,0.68 0.18,0.788 0.195,0.845 0.308,1 0.32,1 0.403,1.005 0.398,1 0.5,1 0.602,1 0.816,1.005 0.9,1 0.91,1 0.948,0.69 0.962,0.615 1.003,0.376 1,0 1,0". 3605 prevPoint.cx = point.x - prevPoint.x; //change in x between this point and the next point (performance optimization) 3606 3607 prevPoint.cy = point.y - prevPoint.y; 3608 prevPoint.n = point; 3609 prevPoint.nx = point.x; //next point's x value (performance optimization, making lookups faster in getRatio()). Remember, the lookup will always land on a spot where it's either this point or the very next one (never beyond that) 3610 3611 if (fast && i > 1 && Math.abs(prevPoint.cy / prevPoint.cx - points[i - 2].cy / points[i - 2].cx) > 2) { 3612 //if there's a sudden change in direction, prioritize accuracy over speed. Like a bounce ease - you don't want to risk the sampling chunks landing on each side of the bounce anchor and having it clipped off. 3613 fast = 0; 3614 } 3615 3616 if (prevPoint.cx < closest) { 3617 if (!prevPoint.cx) { 3618 prevPoint.cx = 0.001; //avoids math problems in getRatio() (dividing by zero) 3619 3620 if (i === l - 1) { 3621 //in case the final segment goes vertical RIGHT at the end, make sure we end at the end. 3622 prevPoint.x -= 0.001; 3623 closest = Math.min(closest, 0.001); 3624 fast = 0; 3625 } 3626 } else { 3627 closest = prevPoint.cx; 3628 } 3629 } 3630 } else { 3631 points.splice(i--, 1); 3632 l--; 3633 } 3634 } 3635 3636 l = 1 / closest + 1 | 0; 3637 inc = 1 / l; 3638 j = 0; 3639 point = points[0]; 3640 3641 if (fast) { 3642 for (i = 0; i < l; i++) { 3643 //for fastest lookups, we just sample along the path at equal x (time) distance. Uses more memory and is slightly less accurate for anchors that don't land on the sampling points, but for the vast majority of eases it's excellent (and fast). 3644 p = i * inc; 3645 3646 if (point.nx < p) { 3647 point = points[++j]; 3648 } 3649 3650 a1 = point.y + (p - point.x) / point.cx * point.cy; 3651 lookup[i] = { 3652 x: p, 3653 cx: inc, 3654 y: a1, 3655 cy: 0, 3656 nx: 9 3657 }; 3658 3659 if (i) { 3660 lookup[i - 1].cy = a1 - lookup[i - 1].y; 3661 } 3662 } 3663 3664 lookup[l - 1].cy = points[points.length - 1].y - a1; 3665 } else { 3666 //this option is more accurate, ensuring that EVERY anchor is hit perfectly. Clipping across a bounce, for example, would never happen. 3667 for (i = 0; i < l; i++) { 3668 //build a lookup table based on the smallest distance so that we can instantly find the appropriate point (well, it'll either be that point or the very next one). We'll look up based on the linear progress. So it's it's 0.5 and the lookup table has 100 elements, it'd be like lookup[Math.floor(0.5 * 100)] 3669 if (point.nx < i * inc) { 3670 point = points[++j]; 3671 } 3672 3673 lookup[i] = point; 3674 } 3675 3676 if (j < points.length - 1) { 3677 lookup[i - 1] = points[points.length - 2]; 3678 } 3679 } //this._calcEnd = (points[points.length-1].y !== 1 || points[0].y !== 0); //ensures that we don't run into floating point errors. As long as we're starting at 0 and ending at 1, tell GSAP to skip the final calculation and use 0/1 as the factor. 3680 3681 3682 this.ease = function (p) { 3683 var point = lookup[p * l | 0] || lookup[l - 1]; 3684 3685 if (point.nx < p) { 3686 point = point.n; 3687 } 3688 3689 return point.y + (p - point.x) / point.cx * point.cy; 3690 }; 3691 3692 this.ease.custom = this; 3693 this.id && gsap && gsap.registerEase(this.id, this.ease); 3694 return this; 3695 }; 3696 3697 _proto.getSVGData = function getSVGData(config) { 3698 return CustomEase.getSVGData(this, config); 3699 }; 3700 3701 CustomEase.create = function create(id, data, config) { 3702 return new CustomEase(id, data, config).ease; 3703 }; 3704 3705 CustomEase.register = function register(core) { 3706 gsap = core; 3707 3708 _initCore(); 3709 }; 3710 3711 CustomEase.get = function get(id) { 3712 return gsap.parseEase(id); 3713 }; 3714 3715 CustomEase.getSVGData = function getSVGData(ease, config) { 3716 config = config || {}; 3717 var width = config.width || 100, 3718 height = config.height || 100, 3719 x = config.x || 0, 3720 y = (config.y || 0) + height, 3721 e = gsap.utils.toArray(config.path)[0], 3722 a, 3723 slope, 3724 i, 3725 inc, 3726 tx, 3727 ty, 3728 precision, 3729 threshold, 3730 prevX, 3731 prevY; 3732 3733 if (config.invert) { 3734 height = -height; 3735 y = 0; 3736 } 3737 3738 if (typeof ease === "string") { 3739 ease = gsap.parseEase(ease); 3740 } 3741 3742 if (ease.custom) { 3743 ease = ease.custom; 3744 } 3745 3746 if (ease instanceof CustomEase) { 3747 a = Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["rawPathToString"])(Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["transformRawPath"])([ease.segment], width, 0, 0, -height, x, y)); 3748 } else { 3749 a = [x, y]; 3750 precision = Math.max(5, (config.precision || 1) * 200); 3751 inc = 1 / precision; 3752 precision += 2; 3753 threshold = 5 / precision; 3754 prevX = _round(x + inc * width); 3755 prevY = _round(y + ease(inc) * -height); 3756 slope = (prevY - y) / (prevX - x); 3757 3758 for (i = 2; i < precision; i++) { 3759 tx = _round(x + i * inc * width); 3760 ty = _round(y + ease(i * inc) * -height); 3761 3762 if (Math.abs((ty - prevY) / (tx - prevX) - slope) > threshold || i === precision - 1) { 3763 //only add points when the slope changes beyond the threshold 3764 a.push(prevX, prevY); 3765 slope = (ty - prevY) / (tx - prevX); 3766 } 3767 3768 prevX = tx; 3769 prevY = ty; 3770 } 3771 3772 a = "M" + a.join(","); 3773 } 3774 3775 e && e.setAttribute("d", a); 3776 return a; 3777 }; 3778 3779 return CustomEase; 3780}(); 3781_getGSAP() && gsap.registerPlugin(CustomEase); 3782CustomEase.version = "3.12.5"; 3783 3784 3785/***/ }), 3786
vendor: 101,563 bytes, lines 3787-6500
3787/***/ "./node_modules/gsap/Draggable.js": 3788/*!****************************************!*\ 3789 !*** ./node_modules/gsap/Draggable.js ***! 3790 \****************************************/ 3791/*! exports provided: Draggable, default */ 3792/***/ (function(module, __webpack_exports__, __webpack_require__) { 3793 3794"use strict"; 3795__webpack_require__.r(__webpack_exports__); 3796/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Draggable", function() { return Draggable; }); 3797/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Draggable; }); 3798/* harmony import */ var _utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/matrix.js */ "./node_modules/gsap/utils/matrix.js"); 3799function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 3800 3801function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } 3802 3803/*! 3804 * Draggable 3.12.5 3805 * https://gsap.com 3806 * 3807 * @license Copyright 2008-2024, GreenSock. All rights reserved. 3808 * Subject to the terms at https://gsap.com/standard-license or for 3809 * Club GSAP members, the agreement issued with that membership. 3810 * @author: Jack Doyle, [email protected] 3811 */ 3812 3813/* eslint-disable */ 3814 3815 3816var gsap, 3817 _win, 3818 _doc, 3819 _docElement, 3820 _body, 3821 _tempDiv, 3822 _placeholderDiv, 3823 _coreInitted, 3824 _checkPrefix, 3825 _toArray, 3826 _supportsPassive, 3827 _isTouchDevice, 3828 _touchEventLookup, 3829 _isMultiTouching, 3830 _isAndroid, 3831 InertiaPlugin, 3832 _defaultCursor, 3833 _supportsPointer, 3834 _context, 3835 _getStyleSaver, 3836 _dragCount = 0, 3837 _windowExists = function _windowExists() { 3838 return typeof window !== "undefined"; 3839}, 3840 _getGSAP = function _getGSAP() { 3841 return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap; 3842}, 3843 _isFunction = function _isFunction(value) { 3844 return typeof value === "function"; 3845}, 3846 _isObject = function _isObject(value) { 3847 return typeof value === "object"; 3848}, 3849 _isUndefined = function _isUndefined(value) { 3850 return typeof value === "undefined"; 3851}, 3852 _emptyFunc = function _emptyFunc() { 3853 return false; 3854}, 3855 _transformProp = "transform", 3856 _transformOriginProp = "transformOrigin", 3857 _round = function _round(value) { 3858 return Math.round(value * 10000) / 10000; 3859}, 3860 _isArray = Array.isArray, 3861 _createElement = function _createElement(type, ns) { 3862 var e = _doc.createElementNS ? _doc.createElementNS((ns || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), type) : _doc.createElement(type); //some servers swap in https for http in the namespace which can break things, making "style" inaccessible. 3863 3864 return e.style ? e : _doc.createElement(type); //some environments won't allow access to the element's style when created with a namespace in which case we default to the standard createElement() to work around the issue. Also note that when GSAP is embedded directly inside an SVG file, createElement() won't allow access to the style object in Firefox (see https://gsap.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/). 3865}, 3866 _RAD2DEG = 180 / Math.PI, 3867 _bigNum = 1e20, 3868 _identityMatrix = new _utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"](), 3869 _getTime = Date.now || function () { 3870 return new Date().getTime(); 3871}, 3872 _renderQueue = [], 3873 _lookup = {}, 3874 //when a Draggable is created, the target gets a unique _gsDragID property that allows gets associated with the Draggable instance for quick lookups in Draggable.get(). This avoids circular references that could cause gc problems. 3875_lookupCount = 0, 3876 _clickableTagExp = /^(?:a|input|textarea|button|select)$/i, 3877 _lastDragTime = 0, 3878 _temp1 = {}, 3879 // a simple object we reuse and populate (usually x/y properties) to conserve memory and improve performance. 3880_windowProxy = {}, 3881 //memory/performance optimization - we reuse this object during autoScroll to store window-related bounds/offsets. 3882_copy = function _copy(obj, factor) { 3883 var copy = {}, 3884 p; 3885 3886 for (p in obj) { 3887 copy[p] = factor ? obj[p] * factor : obj[p]; 3888 } 3889 3890 return copy; 3891}, 3892 _extend = function _extend(obj, defaults) { 3893 for (var p in defaults) { 3894 if (!(p in obj)) { 3895 obj[p] = defaults[p]; 3896 } 3897 } 3898 3899 return obj; 3900}, 3901 _setTouchActionForAllDescendants = function _setTouchActionForAllDescendants(elements, value) { 3902 var i = elements.length, 3903 children; 3904 3905 while (i--) { 3906 value ? elements[i].style.touchAction = value : elements[i].style.removeProperty("touch-action"); 3907 children = elements[i].children; 3908 children && children.length && _setTouchActionForAllDescendants(children, value); 3909 } 3910}, 3911 _renderQueueTick = function _renderQueueTick() { 3912 return _renderQueue.forEach(function (func) { 3913 return func(); 3914 }); 3915}, 3916 _addToRenderQueue = function _addToRenderQueue(func) { 3917 _renderQueue.push(func); 3918 3919 if (_renderQueue.length === 1) { 3920 gsap.ticker.add(_renderQueueTick); 3921 } 3922}, 3923 _renderQueueTimeout = function _renderQueueTimeout() { 3924 return !_renderQueue.length && gsap.ticker.remove(_renderQueueTick); 3925}, 3926 _removeFromRenderQueue = function _removeFromRenderQueue(func) { 3927 var i = _renderQueue.length; 3928 3929 while (i--) { 3930 if (_renderQueue[i] === func) { 3931 _renderQueue.splice(i, 1); 3932 } 3933 } 3934 3935 gsap.to(_renderQueueTimeout, { 3936 overwrite: true, 3937 delay: 15, 3938 duration: 0, 3939 onComplete: _renderQueueTimeout, 3940 data: "_draggable" 3941 }); //remove the "tick" listener only after the render queue is empty for 15 seconds (to improve performance). Adding/removing it constantly for every click/touch wouldn't deliver optimal speed, and we also don't want the ticker to keep calling the render method when things are idle for long periods of time (we want to improve battery life on mobile devices). 3942}, 3943 _setDefaults = function _setDefaults(obj, defaults) { 3944 for (var p in defaults) { 3945 if (!(p in obj)) { 3946 obj[p] = defaults[p]; 3947 } 3948 } 3949 3950 return obj; 3951}, 3952 _addListener = function _addListener(element, type, func, capture) { 3953 if (element.addEventListener) { 3954 var touchType = _touchEventLookup[type]; 3955 capture = capture || (_supportsPassive ? { 3956 passive: false 3957 } : null); 3958 element.addEventListener(touchType || type, func, capture); 3959 touchType && type !== touchType && element.addEventListener(type, func, capture); //some browsers actually support both, so must we. But pointer events cover all. 3960 } 3961}, 3962 _removeListener = function _removeListener(element, type, func, capture) { 3963 if (element.removeEventListener) { 3964 var touchType = _touchEventLookup[type]; 3965 element.removeEventListener(touchType || type, func, capture); 3966 touchType && type !== touchType && element.removeEventListener(type, func, capture); 3967 } 3968}, 3969 _preventDefault = function _preventDefault(event) { 3970 event.preventDefault && event.preventDefault(); 3971 event.preventManipulation && event.preventManipulation(); //for some Microsoft browsers 3972}, 3973 _hasTouchID = function _hasTouchID(list, ID) { 3974 var i = list.length; 3975 3976 while (i--) { 3977 if (list[i].identifier === ID) { 3978 return true; 3979 } 3980 } 3981}, 3982 _onMultiTouchDocumentEnd = function _onMultiTouchDocumentEnd(event) { 3983 _isMultiTouching = event.touches && _dragCount < event.touches.length; 3984 3985 _removeListener(event.target, "touchend", _onMultiTouchDocumentEnd); 3986}, 3987 _onMultiTouchDocument = function _onMultiTouchDocument(event) { 3988 _isMultiTouching = event.touches && _dragCount < event.touches.length; 3989 3990 _addListener(event.target, "touchend", _onMultiTouchDocumentEnd); 3991}, 3992 _getDocScrollTop = function _getDocScrollTop(doc) { 3993 return _win.pageYOffset || doc.scrollTop || doc.documentElement.scrollTop || doc.body.scrollTop || 0; 3994}, 3995 _getDocScrollLeft = function _getDocScrollLeft(doc) { 3996 return _win.pageXOffset || doc.scrollLeft || doc.documentElement.scrollLeft || doc.body.scrollLeft || 0; 3997}, 3998 _addScrollListener = function _addScrollListener(e, callback) { 3999 _addListener(e, "scroll", callback); 4000 4001 if (!_isRoot(e.parentNode)) { 4002 _addScrollListener(e.parentNode, callback); 4003 } 4004}, 4005 _removeScrollListener = function _removeScrollListener(e, callback) { 4006 _removeListener(e, "scroll", callback); 4007 4008 if (!_isRoot(e.parentNode)) { 4009 _removeScrollListener(e.parentNode, callback); 4010 } 4011}, 4012 _isRoot = function _isRoot(e) { 4013 return !!(!e || e === _docElement || e.nodeType === 9 || e === _doc.body || e === _win || !e.nodeType || !e.parentNode); 4014}, 4015 _getMaxScroll = function _getMaxScroll(element, axis) { 4016 var dim = axis === "x" ? "Width" : "Height", 4017 scroll = "scroll" + dim, 4018 client = "client" + dim; 4019 return Math.max(0, _isRoot(element) ? Math.max(_docElement[scroll], _body[scroll]) - (_win["inner" + dim] || _docElement[client] || _body[client]) : element[scroll] - element[client]); 4020}, 4021 _recordMaxScrolls = function _recordMaxScrolls(e, skipCurrent) { 4022 //records _gsMaxScrollX and _gsMaxScrollY properties for the element and all ancestors up the chain so that we can cap it, otherwise dragging beyond the edges with autoScroll on can endlessly scroll. 4023 var x = _getMaxScroll(e, "x"), 4024 y = _getMaxScroll(e, "y"); 4025 4026 if (_isRoot(e)) { 4027 e = _windowProxy; 4028 } else { 4029 _recordMaxScrolls(e.parentNode, skipCurrent); 4030 } 4031 4032 e._gsMaxScrollX = x; 4033 e._gsMaxScrollY = y; 4034 4035 if (!skipCurrent) { 4036 e._gsScrollX = e.scrollLeft || 0; 4037 e._gsScrollY = e.scrollTop || 0; 4038 } 4039}, 4040 _setStyle = function _setStyle(element, property, value) { 4041 var style = element.style; 4042 4043 if (!style) { 4044 return; 4045 } 4046 4047 if (_isUndefined(style[property])) { 4048 property = _checkPrefix(property, element) || property; 4049 } 4050 4051 if (value == null) { 4052 style.removeProperty && style.removeProperty(property.replace(/([A-Z])/g, "-$1").toLowerCase()); 4053 } else { 4054 style[property] = value; 4055 } 4056}, 4057 _getComputedStyle = function _getComputedStyle(element) { 4058 return _win.getComputedStyle(element instanceof Element ? element : element.host || (element.parentNode || {}).host || element); 4059}, 4060 //the "host" stuff helps to accommodate ShadowDom objects. 4061_tempRect = {}, 4062 //reuse to reduce garbage collection tasks 4063_parseRect = function _parseRect(e) { 4064 //accepts a DOM element, a mouse event, or a rectangle object and returns the corresponding rectangle with left, right, width, height, top, and bottom properties 4065 if (e === _win) { 4066 _tempRect.left = _tempRect.top = 0; 4067 _tempRect.width = _tempRect.right = _docElement.clientWidth || e.innerWidth || _body.clientWidth || 0; 4068 _tempRect.height = _tempRect.bottom = (e.innerHeight || 0) - 20 < _docElement.clientHeight ? _docElement.clientHeight : e.innerHeight || _body.clientHeight || 0; 4069 return _tempRect; 4070 } 4071 4072 var doc = e.ownerDocument || _doc, 4073 r = !_isUndefined(e.pageX) ? { 4074 left: e.pageX - _getDocScrollLeft(doc), 4075 top: e.pageY - _getDocScrollTop(doc), 4076 right: e.pageX - _getDocScrollLeft(doc) + 1, 4077 bottom: e.pageY - _getDocScrollTop(doc) + 1 4078 } : !e.nodeType && !_isUndefined(e.left) && !_isUndefined(e.top) ? e : _toArray(e)[0].getBoundingClientRect(); 4079 4080 if (_isUndefined(r.right) && !_isUndefined(r.width)) { 4081 r.right = r.left + r.width; 4082 r.bottom = r.top + r.height; 4083 } else if (_isUndefined(r.width)) { 4084 //some browsers don't include width and height properties. We can't just set them directly on r because some browsers throw errors, so create a new generic object. 4085 r = { 4086 width: r.right - r.left, 4087 height: r.bottom - r.top, 4088 right: r.right, 4089 left: r.left, 4090 bottom: r.bottom, 4091 top: r.top 4092 }; 4093 } 4094 4095 return r; 4096}, 4097 _dispatchEvent = function _dispatchEvent(target, type, callbackName) { 4098 var vars = target.vars, 4099 callback = vars[callbackName], 4100 listeners = target._listeners[type], 4101 result; 4102 4103 if (_isFunction(callback)) { 4104 result = callback.apply(vars.callbackScope || target, vars[callbackName + "Params"] || [target.pointerEvent]); 4105 } 4106 4107 if (listeners && target.dispatchEvent(type) === false) { 4108 result = false; 4109 } 4110 4111 return result; 4112}, 4113 _getBounds = function _getBounds(target, context) { 4114 //accepts any of the following: a DOM element, jQuery object, selector text, or an object defining bounds as {top, left, width, height} or {minX, maxX, minY, maxY}. Returns an object with left, top, width, and height properties. 4115 var e = _toArray(target)[0], 4116 top, 4117 left, 4118 offset; 4119 4120 if (!e.nodeType && e !== _win) { 4121 if (!_isUndefined(target.left)) { 4122 offset = { 4123 x: 0, 4124 y: 0 4125 }; //_getOffsetTransformOrigin(context); //the bounds should be relative to the origin 4126 4127 return { 4128 left: target.left - offset.x, 4129 top: target.top - offset.y, 4130 width: target.width, 4131 height: target.height 4132 }; 4133 } 4134 4135 left = target.min || target.minX || target.minRotation || 0; 4136 top = target.min || target.minY || 0; 4137 return { 4138 left: left, 4139 top: top, 4140 width: (target.max || target.maxX || target.maxRotation || 0) - left, 4141 height: (target.max || target.maxY || 0) - top 4142 }; 4143 } 4144 4145 return _getElementBounds(e, context); 4146}, 4147 _point1 = {}, 4148 //we reuse to minimize garbage collection tasks. 4149_getElementBounds = function _getElementBounds(element, context) { 4150 context = _toArray(context)[0]; 4151 var isSVG = element.getBBox && element.ownerSVGElement, 4152 doc = element.ownerDocument || _doc, 4153 left, 4154 right, 4155 top, 4156 bottom, 4157 matrix, 4158 p1, 4159 p2, 4160 p3, 4161 p4, 4162 bbox, 4163 width, 4164 height, 4165 cs; 4166 4167 if (element === _win) { 4168 top = _getDocScrollTop(doc); 4169 left = _getDocScrollLeft(doc); 4170 right = left + (doc.documentElement.clientWidth || element.innerWidth || doc.body.clientWidth || 0); 4171 bottom = top + ((element.innerHeight || 0) - 20 < doc.documentElement.clientHeight ? doc.documentElement.clientHeight : element.innerHeight || doc.body.clientHeight || 0); //some browsers (like Firefox) ignore absolutely positioned elements, and collapse the height of the documentElement, so it could be 8px, for example, if you have just an absolutely positioned div. In that case, we use the innerHeight to resolve this. 4172 } else if (context === _win || _isUndefined(context)) { 4173 return element.getBoundingClientRect(); 4174 } else { 4175 left = top = 0; 4176 4177 if (isSVG) { 4178 bbox = element.getBBox(); 4179 width = bbox.width; 4180 height = bbox.height; 4181 } else { 4182 if (element.viewBox && (bbox = element.viewBox.baseVal)) { 4183 left = bbox.x || 0; 4184 top = bbox.y || 0; 4185 width = bbox.width; 4186 height = bbox.height; 4187 } 4188 4189 if (!width) { 4190 cs = _getComputedStyle(element); 4191 bbox = cs.boxSizing === "border-box"; 4192 width = (parseFloat(cs.width) || element.clientWidth || 0) + (bbox ? 0 : parseFloat(cs.borderLeftWidth) + parseFloat(cs.borderRightWidth)); 4193 height = (parseFloat(cs.height) || element.clientHeight || 0) + (bbox ? 0 : parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth)); 4194 } 4195 } 4196 4197 right = width; 4198 bottom = height; 4199 } 4200 4201 if (element === context) { 4202 return { 4203 left: left, 4204 top: top, 4205 width: right - left, 4206 height: bottom - top 4207 }; 4208 } 4209 4210 matrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(context, true).multiply(Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(element)); 4211 p1 = matrix.apply({ 4212 x: left, 4213 y: top 4214 }); 4215 p2 = matrix.apply({ 4216 x: right, 4217 y: top 4218 }); 4219 p3 = matrix.apply({ 4220 x: right, 4221 y: bottom 4222 }); 4223 p4 = matrix.apply({ 4224 x: left, 4225 y: bottom 4226 }); 4227 left = Math.min(p1.x, p2.x, p3.x, p4.x); 4228 top = Math.min(p1.y, p2.y, p3.y, p4.y); 4229 return { 4230 left: left, 4231 top: top, 4232 width: Math.max(p1.x, p2.x, p3.x, p4.x) - left, 4233 height: Math.max(p1.y, p2.y, p3.y, p4.y) - top 4234 }; 4235}, 4236 _parseInertia = function _parseInertia(draggable, snap, max, min, factor, forceZeroVelocity) { 4237 var vars = {}, 4238 a, 4239 i, 4240 l; 4241 4242 if (snap) { 4243 if (factor !== 1 && snap instanceof Array) { 4244 //some data must be altered to make sense, like if the user passes in an array of rotational values in degrees, we must convert it to radians. Or for scrollLeft and scrollTop, we invert the values. 4245 vars.end = a = []; 4246 l = snap.length; 4247 4248 if (_isObject(snap[0])) { 4249 //if the array is populated with objects, like points ({x:100, y:200}), make copies before multiplying by the factor, otherwise we'll mess up the originals and the user may reuse it elsewhere. 4250 for (i = 0; i < l; i++) { 4251 a[i] = _copy(snap[i], factor); 4252 } 4253 } else { 4254 for (i = 0; i < l; i++) { 4255 a[i] = snap[i] * factor; 4256 } 4257 } 4258 4259 max += 1.1; //allow 1.1 pixels of wiggle room when snapping in order to work around some browser inconsistencies in the way bounds are reported which can make them roughly a pixel off. For example, if "snap:[-$('#menu').width(), 0]" was defined and #menu had a wrapper that was used as the bounds, some browsers would be one pixel off, making the minimum -752 for example when snap was [-753,0], thus instead of snapping to -753, it would snap to 0 since -753 was below the minimum. 4260 4261 min -= 1.1; 4262 } else if (_isFunction(snap)) { 4263 vars.end = function (value) { 4264 var result = snap.call(draggable, value), 4265 copy, 4266 p; 4267 4268 if (factor !== 1) { 4269 if (_isObject(result)) { 4270 copy = {}; 4271 4272 for (p in result) { 4273 copy[p] = result[p] * factor; 4274 } 4275 4276 result = copy; 4277 } else { 4278 result *= factor; 4279 } 4280 } 4281 4282 return result; //we need to ensure that we can scope the function call to the Draggable instance itself so that users can access important values like maxX, minX, maxY, minY, x, and y from within that function. 4283 }; 4284 } else { 4285 vars.end = snap; 4286 } 4287 } 4288 4289 if (max || max === 0) { 4290 vars.max = max; 4291 } 4292 4293 if (min || min === 0) { 4294 vars.min = min; 4295 } 4296 4297 if (forceZeroVelocity) { 4298 vars.velocity = 0; 4299 } 4300 4301 return vars; 4302}, 4303 _isClickable = function _isClickable(element) { 4304 //sometimes it's convenient to mark an element as clickable by adding a data-clickable="true" attribute (in which case we won't preventDefault() the mouse/touch event). This method checks if the element is an <a>, <input>, or <button> or has the data-clickable or contentEditable attribute set to true (or any of its parent elements). 4305 var data; 4306 return !element || !element.getAttribute || element === _body ? false : (data = element.getAttribute("data-clickable")) === "true" || data !== "false" && (_clickableTagExp.test(element.nodeName + "") || element.getAttribute("contentEditable") === "true") ? true : _isClickable(element.parentNode); 4307}, 4308 _setSelectable = function _setSelectable(elements, selectable) { 4309 var i = elements.length, 4310 e; 4311 4312 while (i--) { 4313 e = elements[i]; 4314 e.ondragstart = e.onselectstart = selectable ? null : _emptyFunc; 4315 gsap.set(e, { 4316 lazy: true, 4317 userSelect: selectable ? "text" : "none" 4318 }); 4319 } 4320}, 4321 _isFixed = function _isFixed(element) { 4322 if (_getComputedStyle(element).position === "fixed") { 4323 return true; 4324 } 4325 4326 element = element.parentNode; 4327 4328 if (element && element.nodeType === 1) { 4329 // avoid document fragments which will throw an error. 4330 return _isFixed(element); 4331 } 4332}, 4333 _supports3D, 4334 _addPaddingBR, 4335 //The ScrollProxy class wraps an element's contents into another div (we call it "content") that we either add padding when necessary or apply a translate3d() transform in order to overscroll (scroll past the boundaries). This allows us to simply set the scrollTop/scrollLeft (or top/left for easier reverse-axis orientation, which is what we do in Draggable) and it'll do all the work for us. For example, if we tried setting scrollTop to -100 on a normal DOM element, it wouldn't work - it'd look the same as setting it to 0, but if we set scrollTop of a ScrollProxy to -100, it'll give the correct appearance by either setting paddingTop of the wrapper to 100 or applying a 100-pixel translateY. 4336ScrollProxy = function ScrollProxy(element, vars) { 4337 element = gsap.utils.toArray(element)[0]; 4338 vars = vars || {}; 4339 var content = document.createElement("div"), 4340 style = content.style, 4341 node = element.firstChild, 4342 offsetTop = 0, 4343 offsetLeft = 0, 4344 prevTop = element.scrollTop, 4345 prevLeft = element.scrollLeft, 4346 scrollWidth = element.scrollWidth, 4347 scrollHeight = element.scrollHeight, 4348 extraPadRight = 0, 4349 maxLeft = 0, 4350 maxTop = 0, 4351 elementWidth, 4352 elementHeight, 4353 contentHeight, 4354 nextNode, 4355 transformStart, 4356 transformEnd; 4357 4358 if (_supports3D && vars.force3D !== false) { 4359 transformStart = "translate3d("; 4360 transformEnd = "px,0px)"; 4361 } else if (_transformProp) { 4362 transformStart = "translate("; 4363 transformEnd = "px)"; 4364 } 4365 4366 this.scrollTop = function (value, force) { 4367 if (!arguments.length) { 4368 return -this.top(); 4369 } 4370 4371 this.top(-value, force); 4372 }; 4373 4374 this.scrollLeft = function (value, force) { 4375 if (!arguments.length) { 4376 return -this.left(); 4377 } 4378 4379 this.left(-value, force); 4380 }; 4381 4382 this.left = function (value, force) { 4383 if (!arguments.length) { 4384 return -(element.scrollLeft + offsetLeft); 4385 } 4386 4387 var dif = element.scrollLeft - prevLeft, 4388 oldOffset = offsetLeft; 4389 4390 if ((dif > 2 || dif < -2) && !force) { 4391 //if the user interacts with the scrollbar (or something else scrolls it, like the mouse wheel), we should kill any tweens of the ScrollProxy. 4392 prevLeft = element.scrollLeft; 4393 gsap.killTweensOf(this, { 4394 left: 1, 4395 scrollLeft: 1 4396 }); 4397 this.left(-prevLeft); 4398 4399 if (vars.onKill) { 4400 vars.onKill(); 4401 } 4402 4403 return; 4404 } 4405 4406 value = -value; //invert because scrolling works in the opposite direction 4407 4408 if (value < 0) { 4409 offsetLeft = value - 0.5 | 0; 4410 value = 0; 4411 } else if (value > maxLeft) { 4412 offsetLeft = value - maxLeft | 0; 4413 value = maxLeft; 4414 } else { 4415 offsetLeft = 0; 4416 } 4417 4418 if (offsetLeft || oldOffset) { 4419 if (!this._skip) { 4420 style[_transformProp] = transformStart + -offsetLeft + "px," + -offsetTop + transformEnd; 4421 } 4422 4423 if (offsetLeft + extraPadRight >= 0) { 4424 style.paddingRight = offsetLeft + extraPadRight + "px"; 4425 } 4426 } 4427 4428 element.scrollLeft = value | 0; 4429 prevLeft = element.scrollLeft; //don't merge this with the line above because some browsers adjust the scrollLeft after it's set, so in order to be 100% accurate in tracking it, we need to ask the browser to report it. 4430 }; 4431 4432 this.top = function (value, force) { 4433 if (!arguments.length) { 4434 return -(element.scrollTop + offsetTop); 4435 } 4436 4437 var dif = element.scrollTop - prevTop, 4438 oldOffset = offsetTop; 4439 4440 if ((dif > 2 || dif < -2) && !force) { 4441 //if the user interacts with the scrollbar (or something else scrolls it, like the mouse wheel), we should kill any tweens of the ScrollProxy. 4442 prevTop = element.scrollTop; 4443 gsap.killTweensOf(this, { 4444 top: 1, 4445 scrollTop: 1 4446 }); 4447 this.top(-prevTop); 4448 4449 if (vars.onKill) { 4450 vars.onKill(); 4451 } 4452 4453 return; 4454 } 4455 4456 value = -value; //invert because scrolling works in the opposite direction 4457 4458 if (value < 0) { 4459 offsetTop = value - 0.5 | 0; 4460 value = 0; 4461 } else if (value > maxTop) { 4462 offsetTop = value - maxTop | 0; 4463 value = maxTop; 4464 } else { 4465 offsetTop = 0; 4466 } 4467 4468 if (offsetTop || oldOffset) { 4469 if (!this._skip) { 4470 style[_transformProp] = transformStart + -offsetLeft + "px," + -offsetTop + transformEnd; 4471 } 4472 } 4473 4474 element.scrollTop = value | 0; 4475 prevTop = element.scrollTop; 4476 }; 4477 4478 this.maxScrollTop = function () { 4479 return maxTop; 4480 }; 4481 4482 this.maxScrollLeft = function () { 4483 return maxLeft; 4484 }; 4485 4486 this.disable = function () { 4487 node = content.firstChild; 4488 4489 while (node) { 4490 nextNode = node.nextSibling; 4491 element.appendChild(node); 4492 node = nextNode; 4493 } 4494 4495 if (element === content.parentNode) { 4496 //in case disable() is called when it's already disabled. 4497 element.removeChild(content); 4498 } 4499 }; 4500 4501 this.enable = function () { 4502 node = element.firstChild; 4503 4504 if (node === content) { 4505 return; 4506 } 4507 4508 while (node) { 4509 nextNode = node.nextSibling; 4510 content.appendChild(node); 4511 node = nextNode; 4512 } 4513 4514 element.appendChild(content); 4515 this.calibrate(); 4516 }; 4517 4518 this.calibrate = function (force) { 4519 var widthMatches = element.clientWidth === elementWidth, 4520 cs, 4521 x, 4522 y; 4523 prevTop = element.scrollTop; 4524 prevLeft = element.scrollLeft; 4525 4526 if (widthMatches && element.clientHeight === elementHeight && content.offsetHeight === contentHeight && scrollWidth === element.scrollWidth && scrollHeight === element.scrollHeight && !force) { 4527 return; //no need to recalculate things if the width and height haven't changed. 4528 } 4529 4530 if (offsetTop || offsetLeft) { 4531 x = this.left(); 4532 y = this.top(); 4533 this.left(-element.scrollLeft); 4534 this.top(-element.scrollTop); 4535 } 4536 4537 cs = _getComputedStyle(element); //first, we need to remove any width constraints to see how the content naturally flows so that we can see if it's wider than the containing element. If so, we've got to record the amount of overage so that we can apply that as padding in order for browsers to correctly handle things. Then we switch back to a width of 100% (without that, some browsers don't flow the content correctly) 4538 4539 if (!widthMatches || force) { 4540 style.display = "block"; 4541 style.width = "auto"; 4542 style.paddingRight = "0px"; 4543 extraPadRight = Math.max(0, element.scrollWidth - element.clientWidth); //if the content is wider than the container, we need to add the paddingLeft and paddingRight in order for things to behave correctly. 4544 4545 if (extraPadRight) { 4546 extraPadRight += parseFloat(cs.paddingLeft) + (_addPaddingBR ? parseFloat(cs.paddingRight) : 0); 4547 } 4548 } 4549 4550 style.display = "inline-block"; 4551 style.position = "relative"; 4552 style.overflow = "visible"; 4553 style.verticalAlign = "top"; 4554 style.boxSizing = "content-box"; 4555 style.width = "100%"; 4556 style.paddingRight = extraPadRight + "px"; //some browsers neglect to factor in the bottom padding when calculating the scrollHeight, so we need to add that padding to the content when that happens. Allow a 2px margin for error 4557 4558 if (_addPaddingBR) { 4559 style.paddingBottom = cs.paddingBottom; 4560 } 4561 4562 elementWidth = element.clientWidth; 4563 elementHeight = element.clientHeight; 4564 scrollWidth = element.scrollWidth; 4565 scrollHeight = element.scrollHeight; 4566 maxLeft = element.scrollWidth - elementWidth; 4567 maxTop = element.scrollHeight - elementHeight; 4568 contentHeight = content.offsetHeight; 4569 style.display = "block"; 4570 4571 if (x || y) { 4572 this.left(x); 4573 this.top(y); 4574 } 4575 }; 4576 4577 this.content = content; 4578 this.element = element; 4579 this._skip = false; 4580 this.enable(); 4581}, 4582 _initCore = function _initCore(required) { 4583 if (_windowExists() && document.body) { 4584 var nav = window && window.navigator; 4585 _win = window; 4586 _doc = document; 4587 _docElement = _doc.documentElement; 4588 _body = _doc.body; 4589 _tempDiv = _createElement("div"); 4590 _supportsPointer = !!window.PointerEvent; 4591 _placeholderDiv = _createElement("div"); 4592 _placeholderDiv.style.cssText = "visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab"; 4593 _defaultCursor = _placeholderDiv.style.cursor === "grab" ? "grab" : "move"; 4594 _isAndroid = nav && nav.userAgent.toLowerCase().indexOf("android") !== -1; //Android handles touch events in an odd way and it's virtually impossible to "feature test" so we resort to UA sniffing 4595 4596 _isTouchDevice = "ontouchstart" in _docElement && "orientation" in _win || nav && (nav.MaxTouchPoints > 0 || nav.msMaxTouchPoints > 0); 4597 4598 _addPaddingBR = function () { 4599 //this function is in charge of analyzing browser behavior related to padding. It sets the _addPaddingBR to true if the browser doesn't normally factor in the bottom or right padding on the element inside the scrolling area, and it sets _addPaddingLeft to true if it's a browser that requires the extra offset (offsetLeft) to be added to the paddingRight (like Opera). 4600 var div = _createElement("div"), 4601 child = _createElement("div"), 4602 childStyle = child.style, 4603 parent = _body, 4604 val; 4605 4606 childStyle.display = "inline-block"; 4607 childStyle.position = "relative"; 4608 div.style.cssText = "width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden"; 4609 div.appendChild(child); 4610 parent.appendChild(div); 4611 val = child.offsetHeight + 18 > div.scrollHeight; //div.scrollHeight should be child.offsetHeight + 20 because of the 10px of padding on each side, but some browsers ignore one side. We allow a 2px margin of error. 4612 4613 parent.removeChild(div); 4614 return val; 4615 }(); 4616 4617 _touchEventLookup = function (types) { 4618 //we create an object that makes it easy to translate touch event types into their "pointer" counterparts if we're in a browser that uses those instead. Like IE10 uses "MSPointerDown" instead of "touchstart", for example. 4619 var standard = types.split(","), 4620 converted = ("onpointerdown" in _tempDiv ? "pointerdown,pointermove,pointerup,pointercancel" : "onmspointerdown" in _tempDiv ? "MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel" : types).split(","), 4621 obj = {}, 4622 i = 4; 4623 4624 while (--i > -1) { 4625 obj[standard[i]] = converted[i]; 4626 obj[converted[i]] = standard[i]; 4627 } //to avoid problems in iOS 9, test to see if the browser supports the "passive" option on addEventListener(). 4628 4629 4630 try { 4631 _docElement.addEventListener("test", null, Object.defineProperty({}, "passive", { 4632 get: function get() { 4633 _supportsPassive = 1; 4634 } 4635 })); 4636 } catch (e) {} 4637 4638 return obj; 4639 }("touchstart,touchmove,touchend,touchcancel"); 4640 4641 _addListener(_doc, "touchcancel", _emptyFunc); //some older Android devices intermittently stop dispatching "touchmove" events if we don't listen for "touchcancel" on the document. Very strange indeed. 4642 4643 4644 _addListener(_win, "touchmove", _emptyFunc); //works around Safari bugs that still allow the page to scroll even when we preventDefault() on the touchmove event. 4645 4646 4647 _body && _body.addEventListener("touchstart", _emptyFunc); //works around Safari bug: https://gsap.com/forums/topic/21450-draggable-in-iframe-on-mobile-is-buggy/ 4648 4649 _addListener(_doc, "contextmenu", function () { 4650 for (var p in _lookup) { 4651 if (_lookup[p].isPressed) { 4652 _lookup[p].endDrag(); 4653 } 4654 } 4655 }); 4656 4657 gsap = _coreInitted = _getGSAP(); 4658 } 4659 4660 if (gsap) { 4661 InertiaPlugin = gsap.plugins.inertia; 4662 4663 _context = gsap.core.context || function () {}; 4664 4665 _checkPrefix = gsap.utils.checkPrefix; 4666 _transformProp = _checkPrefix(_transformProp); 4667 _transformOriginProp = _checkPrefix(_transformOriginProp); 4668 _toArray = gsap.utils.toArray; 4669 _getStyleSaver = gsap.core.getStyleSaver; 4670 _supports3D = !!_checkPrefix("perspective"); 4671 } else if (required) { 4672 console.warn("Please gsap.registerPlugin(Draggable)"); 4673 } 4674}; 4675 4676var EventDispatcher = /*#__PURE__*/function () { 4677 function EventDispatcher(target) { 4678 this._listeners = {}; 4679 this.target = target || this; 4680 } 4681 4682 var _proto = EventDispatcher.prototype; 4683 4684 _proto.addEventListener = function addEventListener(type, callback) { 4685 var list = this._listeners[type] || (this._listeners[type] = []); 4686 4687 if (!~list.indexOf(callback)) { 4688 list.push(callback); 4689 } 4690 }; 4691 4692 _proto.removeEventListener = function removeEventListener(type, callback) { 4693 var list = this._listeners[type], 4694 i = list && list.indexOf(callback); 4695 i >= 0 && list.splice(i, 1); 4696 }; 4697 4698 _proto.dispatchEvent = function dispatchEvent(type) { 4699 var _this = this; 4700 4701 var result; 4702 (this._listeners[type] || []).forEach(function (callback) { 4703 return callback.call(_this, { 4704 type: type, 4705 target: _this.target 4706 }) === false && (result = false); 4707 }); 4708 return result; //if any of the callbacks return false, pass that along. 4709 }; 4710 4711 return EventDispatcher; 4712}(); 4713 4714var Draggable = /*#__PURE__*/function (_EventDispatcher) { 4715 _inheritsLoose(Draggable, _EventDispatcher); 4716 4717 function Draggable(target, vars) { 4718 var _this2; 4719 4720 _this2 = _EventDispatcher.call(this) || this; 4721 _coreInitted || _initCore(1); 4722 target = _toArray(target)[0]; //in case the target is a selector object or selector text 4723 4724 _this2.styles = _getStyleSaver && _getStyleSaver(target, "transform,left,top"); 4725 4726 if (!InertiaPlugin) { 4727 InertiaPlugin = gsap.plugins.inertia; 4728 } 4729 4730 _this2.vars = vars = _copy(vars || {}); 4731 _this2.target = target; 4732 _this2.x = _this2.y = _this2.rotation = 0; 4733 _this2.dragResistance = parseFloat(vars.dragResistance) || 0; 4734 _this2.edgeResistance = isNaN(vars.edgeResistance) ? 1 : parseFloat(vars.edgeResistance) || 0; 4735 _this2.lockAxis = vars.lockAxis; 4736 _this2.autoScroll = vars.autoScroll || 0; 4737 _this2.lockedAxis = null; 4738 _this2.allowEventDefault = !!vars.allowEventDefault; 4739 gsap.getProperty(target, "x"); // to ensure that transforms are instantiated. 4740 4741 var type = (vars.type || "x,y").toLowerCase(), 4742 xyMode = ~type.indexOf("x") || ~type.indexOf("y"), 4743 rotationMode = type.indexOf("rotation") !== -1, 4744 xProp = rotationMode ? "rotation" : xyMode ? "x" : "left", 4745 yProp = xyMode ? "y" : "top", 4746 allowX = !!(~type.indexOf("x") || ~type.indexOf("left") || type === "scroll"), 4747 allowY = !!(~type.indexOf("y") || ~type.indexOf("top") || type === "scroll"), 4748 minimumMovement = vars.minimumMovement || 2, 4749 self = _assertThisInitialized(_this2), 4750 triggers = _toArray(vars.trigger || vars.handle || target), 4751 killProps = {}, 4752 dragEndTime = 0, 4753 checkAutoScrollBounds = false, 4754 autoScrollMarginTop = vars.autoScrollMarginTop || 40, 4755 autoScrollMarginRight = vars.autoScrollMarginRight || 40, 4756 autoScrollMarginBottom = vars.autoScrollMarginBottom || 40, 4757 autoScrollMarginLeft = vars.autoScrollMarginLeft || 40, 4758 isClickable = vars.clickableTest || _isClickable, 4759 clickTime = 0, 4760 gsCache = target._gsap || gsap.core.getCache(target), 4761 isFixed = _isFixed(target), 4762 getPropAsNum = function getPropAsNum(property, unit) { 4763 return parseFloat(gsCache.get(target, property, unit)); 4764 }, 4765 ownerDoc = target.ownerDocument || _doc, 4766 enabled, 4767 scrollProxy, 4768 startPointerX, 4769 startPointerY, 4770 startElementX, 4771 startElementY, 4772 hasBounds, 4773 hasDragCallback, 4774 hasMoveCallback, 4775 maxX, 4776 minX, 4777 maxY, 4778 minY, 4779 touch, 4780 touchID, 4781 rotationOrigin, 4782 dirty, 4783 old, 4784 snapX, 4785 snapY, 4786 snapXY, 4787 isClicking, 4788 touchEventTarget, 4789 matrix, 4790 interrupted, 4791 allowNativeTouchScrolling, 4792 touchDragAxis, 4793 isDispatching, 4794 clickDispatch, 4795 trustedClickDispatch, 4796 isPreventingDefault, 4797 innerMatrix, 4798 dragged, 4799 onContextMenu = function onContextMenu(e) { 4800 //used to prevent long-touch from triggering a context menu. 4801 // (self.isPressed && e.which < 2) && self.endDrag() // previously ended drag when context menu was triggered, but instead we should just stop propagation and prevent the default event behavior. 4802 _preventDefault(e); 4803 4804 e.stopImmediatePropagation && e.stopImmediatePropagation(); 4805 return false; 4806 }, 4807 //this method gets called on every tick of TweenLite.ticker which allows us to synchronize the renders to the core engine (which is typically synchronized with the display refresh via requestAnimationFrame). This is an optimization - it's better than applying the values inside the "mousemove" or "touchmove" event handler which may get called many times inbetween refreshes. 4808 render = function render(suppressEvents) { 4809 if (self.autoScroll && self.isDragging && (checkAutoScrollBounds || dirty)) { 4810 var e = target, 4811 autoScrollFactor = self.autoScroll * 15, 4812 //multiplying by 15 just gives us a better "feel" speed-wise. 4813 parent, 4814 isRoot, 4815 rect, 4816 pointerX, 4817 pointerY, 4818 changeX, 4819 changeY, 4820 gap; 4821 checkAutoScrollBounds = false; 4822 _windowProxy.scrollTop = _win.pageYOffset != null ? _win.pageYOffset : ownerDoc.documentElement.scrollTop != null ? ownerDoc.documentElement.scrollTop : ownerDoc.body.scrollTop; 4823 _windowProxy.scrollLeft = _win.pageXOffset != null ? _win.pageXOffset : ownerDoc.documentElement.scrollLeft != null ? ownerDoc.documentElement.scrollLeft : ownerDoc.body.scrollLeft; 4824 pointerX = self.pointerX - _windowProxy.scrollLeft; 4825 pointerY = self.pointerY - _windowProxy.scrollTop; 4826 4827 while (e && !isRoot) { 4828 //walk up the chain and sense wherever the pointer is within 40px of an edge that's scrollable. 4829 isRoot = _isRoot(e.parentNode); 4830 parent = isRoot ? _windowProxy : e.parentNode; 4831 rect = isRoot ? { 4832 bottom: Math.max(_docElement.clientHeight, _win.innerHeight || 0), 4833 right: Math.max(_docElement.clientWidth, _win.innerWidth || 0), 4834 left: 0, 4835 top: 0 4836 } : parent.getBoundingClientRect(); 4837 changeX = changeY = 0; 4838 4839 if (allowY) { 4840 gap = parent._gsMaxScrollY - parent.scrollTop; 4841 4842 if (gap < 0) { 4843 changeY = gap; 4844 } else if (pointerY > rect.bottom - autoScrollMarginBottom && gap) { 4845 checkAutoScrollBounds = true; 4846 changeY = Math.min(gap, autoScrollFactor * (1 - Math.max(0, rect.bottom - pointerY) / autoScrollMarginBottom) | 0); 4847 } else if (pointerY < rect.top + autoScrollMarginTop && parent.scrollTop) { 4848 checkAutoScrollBounds = true; 4849 changeY = -Math.min(parent.scrollTop, autoScrollFactor * (1 - Math.max(0, pointerY - rect.top) / autoScrollMarginTop) | 0); 4850 } 4851 4852 if (changeY) { 4853 parent.scrollTop += changeY; 4854 } 4855 } 4856 4857 if (allowX) { 4858 gap = parent._gsMaxScrollX - parent.scrollLeft; 4859 4860 if (gap < 0) { 4861 changeX = gap; 4862 } else if (pointerX > rect.right - autoScrollMarginRight && gap) { 4863 checkAutoScrollBounds = true; 4864 changeX = Math.min(gap, autoScrollFactor * (1 - Math.max(0, rect.right - pointerX) / autoScrollMarginRight) | 0); 4865 } else if (pointerX < rect.left + autoScrollMarginLeft && parent.scrollLeft) { 4866 checkAutoScrollBounds = true; 4867 changeX = -Math.min(parent.scrollLeft, autoScrollFactor * (1 - Math.max(0, pointerX - rect.left) / autoScrollMarginLeft) | 0); 4868 } 4869 4870 if (changeX) { 4871 parent.scrollLeft += changeX; 4872 } 4873 } 4874 4875 if (isRoot && (changeX || changeY)) { 4876 _win.scrollTo(parent.scrollLeft, parent.scrollTop); 4877 4878 setPointerPosition(self.pointerX + changeX, self.pointerY + changeY); 4879 } 4880 4881 e = parent; 4882 } 4883 } 4884 4885 if (dirty) { 4886 var x = self.x, 4887 y = self.y; 4888 4889 if (rotationMode) { 4890 self.deltaX = x - parseFloat(gsCache.rotation); 4891 self.rotation = x; 4892 gsCache.rotation = x + "deg"; 4893 gsCache.renderTransform(1, gsCache); 4894 } else { 4895 if (scrollProxy) { 4896 if (allowY) { 4897 self.deltaY = y - scrollProxy.top(); 4898 scrollProxy.top(y); 4899 } 4900 4901 if (allowX) { 4902 self.deltaX = x - scrollProxy.left(); 4903 scrollProxy.left(x); 4904 } 4905 } else if (xyMode) { 4906 if (allowY) { 4907 self.deltaY = y - parseFloat(gsCache.y); 4908 gsCache.y = y + "px"; 4909 } 4910 4911 if (allowX) { 4912 self.deltaX = x - parseFloat(gsCache.x); 4913 gsCache.x = x + "px"; 4914 } 4915 4916 gsCache.renderTransform(1, gsCache); 4917 } else { 4918 if (allowY) { 4919 self.deltaY = y - parseFloat(target.style.top || 0); 4920 target.style.top = y + "px"; 4921 } 4922 4923 if (allowX) { 4924 self.deltaX = x - parseFloat(target.style.left || 0); 4925 target.style.left = x + "px"; 4926 } 4927 } 4928 } 4929 4930 if (hasDragCallback && !suppressEvents && !isDispatching) { 4931 isDispatching = true; //in case onDrag has an update() call (avoid endless loop) 4932 4933 if (_dispatchEvent(self, "drag", "onDrag") === false) { 4934 if (allowX) { 4935 self.x -= self.deltaX; 4936 } 4937 4938 if (allowY) { 4939 self.y -= self.deltaY; 4940 } 4941 4942 render(true); 4943 } 4944 4945 isDispatching = false; 4946 } 4947 } 4948 4949 dirty = false; 4950 }, 4951 //copies the x/y from the element (whether that be transforms, top/left, or ScrollProxy's top/left) to the Draggable's x and y (and rotation if necessary) properties so that they reflect reality and it also (optionally) applies any snapping necessary. This is used by the InertiaPlugin tween in an onUpdate to ensure things are synced and snapped. 4952 syncXY = function syncXY(skipOnUpdate, skipSnap) { 4953 var x = self.x, 4954 y = self.y, 4955 snappedValue, 4956 cs; 4957 4958 if (!target._gsap) { 4959 //just in case the _gsap cache got wiped, like if the user called clearProps on the transform or something (very rare). 4960 gsCache = gsap.core.getCache(target); 4961 } 4962 4963 gsCache.uncache && gsap.getProperty(target, "x"); // trigger a re-cache 4964 4965 if (xyMode) { 4966 self.x = parseFloat(gsCache.x); 4967 self.y = parseFloat(gsCache.y); 4968 } else if (rotationMode) { 4969 self.x = self.rotation = parseFloat(gsCache.rotation); 4970 } else if (scrollProxy) { 4971 self.y = scrollProxy.top(); 4972 self.x = scrollProxy.left(); 4973 } else { 4974 self.y = parseFloat(target.style.top || (cs = _getComputedStyle(target)) && cs.top) || 0; 4975 self.x = parseFloat(target.style.left || (cs || {}).left) || 0; 4976 } 4977 4978 if ((snapX || snapY || snapXY) && !skipSnap && (self.isDragging || self.isThrowing)) { 4979 if (snapXY) { 4980 _temp1.x = self.x; 4981 _temp1.y = self.y; 4982 snappedValue = snapXY(_temp1); 4983 4984 if (snappedValue.x !== self.x) { 4985 self.x = snappedValue.x; 4986 dirty = true; 4987 } 4988 4989 if (snappedValue.y !== self.y) { 4990 self.y = snappedValue.y; 4991 dirty = true; 4992 } 4993 } 4994 4995 if (snapX) { 4996 snappedValue = snapX(self.x); 4997 4998 if (snappedValue !== self.x) { 4999 self.x = snappedValue; 5000 5001 if (rotationMode) { 5002 self.rotation = snappedValue; 5003 } 5004 5005 dirty = true; 5006 } 5007 } 5008 5009 if (snapY) { 5010 snappedValue = snapY(self.y); 5011 5012 if (snappedValue !== self.y) { 5013 self.y = snappedValue; 5014 } 5015 5016 dirty = true; 5017 } 5018 } 5019 5020 dirty && render(true); 5021 5022 if (!skipOnUpdate) { 5023 self.deltaX = self.x - x; 5024 self.deltaY = self.y - y; 5025 5026 _dispatchEvent(self, "throwupdate", "onThrowUpdate"); 5027 } 5028 }, 5029 buildSnapFunc = function buildSnapFunc(snap, min, max, factor) { 5030 if (min == null) { 5031 min = -_bigNum; 5032 } 5033 5034 if (max == null) { 5035 max = _bigNum; 5036 } 5037 5038 if (_isFunction(snap)) { 5039 return function (n) { 5040 var edgeTolerance = !self.isPressed ? 1 : 1 - self.edgeResistance; //if we're tweening, disable the edgeTolerance because it's already factored into the tweening values (we don't want to apply it multiple times) 5041 5042 return snap.call(self, (n > max ? max + (n - max) * edgeTolerance : n < min ? min + (n - min) * edgeTolerance : n) * factor) * factor; 5043 }; 5044 } 5045 5046 if (_isArray(snap)) { 5047 return function (n) { 5048 var i = snap.length, 5049 closest = 0, 5050 absDif = _bigNum, 5051 val, 5052 dif; 5053 5054 while (--i > -1) { 5055 val = snap[i]; 5056 dif = val - n; 5057 5058 if (dif < 0) { 5059 dif = -dif; 5060 } 5061 5062 if (dif < absDif && val >= min && val <= max) { 5063 closest = i; 5064 absDif = dif; 5065 } 5066 } 5067 5068 return snap[closest]; 5069 }; 5070 } 5071 5072 return isNaN(snap) ? function (n) { 5073 return n; 5074 } : function () { 5075 return snap * factor; 5076 }; 5077 }, 5078 buildPointSnapFunc = function buildPointSnapFunc(snap, minX, maxX, minY, maxY, radius, factor) { 5079 radius = radius && radius < _bigNum ? radius * radius : _bigNum; //so we don't have to Math.sqrt() in the functions. Performance optimization. 5080 5081 if (_isFunction(snap)) { 5082 return function (point) { 5083 var edgeTolerance = !self.isPressed ? 1 : 1 - self.edgeResistance, 5084 x = point.x, 5085 y = point.y, 5086 result, 5087 dx, 5088 dy; //if we're tweening, disable the edgeTolerance because it's already factored into the tweening values (we don't want to apply it multiple times) 5089 5090 point.x = x = x > maxX ? maxX + (x - maxX) * edgeTolerance : x < minX ? minX + (x - minX) * edgeTolerance : x; 5091 point.y = y = y > maxY ? maxY + (y - maxY) * edgeTolerance : y < minY ? minY + (y - minY) * edgeTolerance : y; 5092 result = snap.call(self, point); 5093 5094 if (result !== point) { 5095 point.x = result.x; 5096 point.y = result.y; 5097 } 5098 5099 if (factor !== 1) { 5100 point.x *= factor; 5101 point.y *= factor; 5102 } 5103 5104 if (radius < _bigNum) { 5105 dx = point.x - x; 5106 dy = point.y - y; 5107 5108 if (dx * dx + dy * dy > radius) { 5109 point.x = x; 5110 point.y = y; 5111 } 5112 } 5113 5114 return point; 5115 }; 5116 } 5117 5118 if (_isArray(snap)) { 5119 return function (p) { 5120 var i = snap.length, 5121 closest = 0, 5122 minDist = _bigNum, 5123 x, 5124 y, 5125 point, 5126 dist; 5127 5128 while (--i > -1) { 5129 point = snap[i]; 5130 x = point.x - p.x; 5131 y = point.y - p.y; 5132 dist = x * x + y * y; 5133 5134 if (dist < minDist) { 5135 closest = i; 5136 minDist = dist; 5137 } 5138 } 5139 5140 return minDist <= radius ? snap[closest] : p; 5141 }; 5142 } 5143 5144 return function (n) { 5145 return n; 5146 }; 5147 }, 5148 calculateBounds = function calculateBounds() { 5149 var bounds, targetBounds, snap, snapIsRaw; 5150 hasBounds = false; 5151 5152 if (scrollProxy) { 5153 scrollProxy.calibrate(); 5154 self.minX = minX = -scrollProxy.maxScrollLeft(); 5155 self.minY = minY = -scrollProxy.maxScrollTop(); 5156 self.maxX = maxX = self.maxY = maxY = 0; 5157 hasBounds = true; 5158 } else if (!!vars.bounds) { 5159 bounds = _getBounds(vars.bounds, target.parentNode); //could be a selector/jQuery object or a DOM element or a generic object like {top:0, left:100, width:1000, height:800} or {minX:100, maxX:1100, minY:0, maxY:800} 5160 5161 if (rotationMode) { 5162 self.minX = minX = bounds.left; 5163 self.maxX = maxX = bounds.left + bounds.width; 5164 self.minY = minY = self.maxY = maxY = 0; 5165 } else if (!_isUndefined(vars.bounds.maxX) || !_isUndefined(vars.bounds.maxY)) { 5166 bounds = vars.bounds; 5167 self.minX = minX = bounds.minX; 5168 self.minY = minY = bounds.minY; 5169 self.maxX = maxX = bounds.maxX; 5170 self.maxY = maxY = bounds.maxY; 5171 } else { 5172 targetBounds = _getBounds(target, target.parentNode); 5173 self.minX = minX = Math.round(getPropAsNum(xProp, "px") + bounds.left - targetBounds.left); 5174 self.minY = minY = Math.round(getPropAsNum(yProp, "px") + bounds.top - targetBounds.top); 5175 self.maxX = maxX = Math.round(minX + (bounds.width - targetBounds.width)); 5176 self.maxY = maxY = Math.round(minY + (bounds.height - targetBounds.height)); 5177 } 5178 5179 if (minX > maxX) { 5180 self.minX = maxX; 5181 self.maxX = maxX = minX; 5182 minX = self.minX; 5183 } 5184 5185 if (minY > maxY) { 5186 self.minY = maxY; 5187 self.maxY = maxY = minY; 5188 minY = self.minY; 5189 } 5190 5191 if (rotationMode) { 5192 self.minRotation = minX; 5193 self.maxRotation = maxX; 5194 } 5195 5196 hasBounds = true; 5197 } 5198 5199 if (vars.liveSnap) { 5200 snap = vars.liveSnap === true ? vars.snap || {} : vars.liveSnap; 5201 snapIsRaw = _isArray(snap) || _isFunction(snap); 5202 5203 if (rotationMode) { 5204 snapX = buildSnapFunc(snapIsRaw ? snap : snap.rotation, minX, maxX, 1); 5205 snapY = null; 5206 } else { 5207 if (snap.points) { 5208 snapXY = buildPointSnapFunc(snapIsRaw ? snap : snap.points, minX, maxX, minY, maxY, snap.radius, scrollProxy ? -1 : 1); 5209 } else { 5210 if (allowX) { 5211 snapX = buildSnapFunc(snapIsRaw ? snap : snap.x || snap.left || snap.scrollLeft, minX, maxX, scrollProxy ? -1 : 1); 5212 } 5213 5214 if (allowY) { 5215 snapY = buildSnapFunc(snapIsRaw ? snap : snap.y || snap.top || snap.scrollTop, minY, maxY, scrollProxy ? -1 : 1); 5216 } 5217 } 5218 } 5219 } 5220 }, 5221 onThrowComplete = function onThrowComplete() { 5222 self.isThrowing = false; 5223 5224 _dispatchEvent(self, "throwcomplete", "onThrowComplete"); 5225 }, 5226 onThrowInterrupt = function onThrowInterrupt() { 5227 self.isThrowing = false; 5228 }, 5229 animate = function animate(inertia, forceZeroVelocity) { 5230 var snap, snapIsRaw, tween, overshootTolerance; 5231 5232 if (inertia && InertiaPlugin) { 5233 if (inertia === true) { 5234 snap = vars.snap || vars.liveSnap || {}; 5235 snapIsRaw = _isArray(snap) || _isFunction(snap); 5236 inertia = { 5237 resistance: (vars.throwResistance || vars.resistance || 1000) / (rotationMode ? 10 : 1) 5238 }; 5239 5240 if (rotationMode) { 5241 inertia.rotation = _parseInertia(self, snapIsRaw ? snap : snap.rotation, maxX, minX, 1, forceZeroVelocity); 5242 } else { 5243 if (allowX) { 5244 inertia[xProp] = _parseInertia(self, snapIsRaw ? snap : snap.points || snap.x || snap.left, maxX, minX, scrollProxy ? -1 : 1, forceZeroVelocity || self.lockedAxis === "x"); 5245 } 5246 5247 if (allowY) { 5248 inertia[yProp] = _parseInertia(self, snapIsRaw ? snap : snap.points || snap.y || snap.top, maxY, minY, scrollProxy ? -1 : 1, forceZeroVelocity || self.lockedAxis === "y"); 5249 } 5250 5251 if (snap.points || _isArray(snap) && _isObject(snap[0])) { 5252 inertia.linkedProps = xProp + "," + yProp; 5253 inertia.radius = snap.radius; //note: we also disable liveSnapping while throwing if there's a "radius" defined, otherwise it looks weird to have the item thrown past a snapping point but live-snapping mid-tween. We do this by altering the onUpdateParams so that "skipSnap" parameter is true for syncXY. 5254 } 5255 } 5256 } 5257 5258 self.isThrowing = true; 5259 overshootTolerance = !isNaN(vars.overshootTolerance) ? vars.overshootTolerance : vars.edgeResistance === 1 ? 0 : 1 - self.edgeResistance + 0.2; 5260 5261 if (!inertia.duration) { 5262 inertia.duration = { 5263 max: Math.max(vars.minDuration || 0, "maxDuration" in vars ? vars.maxDuration : 2), 5264 min: !isNaN(vars.minDuration) ? vars.minDuration : overshootTolerance === 0 || _isObject(inertia) && inertia.resistance > 1000 ? 0 : 0.5, 5265 overshoot: overshootTolerance 5266 }; 5267 } 5268 5269 self.tween = tween = gsap.to(scrollProxy || target, { 5270 inertia: inertia, 5271 data: "_draggable", 5272 inherit: false, 5273 onComplete: onThrowComplete, 5274 onInterrupt: onThrowInterrupt, 5275 onUpdate: vars.fastMode ? _dispatchEvent : syncXY, 5276 onUpdateParams: vars.fastMode ? [self, "onthrowupdate", "onThrowUpdate"] : snap && snap.radius ? [false, true] : [] 5277 }); 5278 5279 if (!vars.fastMode) { 5280 if (scrollProxy) { 5281 scrollProxy._skip = true; // Microsoft browsers have a bug that causes them to briefly render the position incorrectly (it flashes to the end state when we seek() the tween even though we jump right back to the current position, and this only seems to happen when we're affecting both top and left), so we set a _suspendTransforms flag to prevent it from actually applying the values in the ScrollProxy. 5282 } 5283 5284 tween.render(1e9, true, true); // force to the end. Remember, the duration will likely change upon initting because that's when InertiaPlugin calculates it. 5285 5286 syncXY(true, true); 5287 self.endX = self.x; 5288 self.endY = self.y; 5289 5290 if (rotationMode) { 5291 self.endRotation = self.x; 5292 } 5293 5294 tween.play(0); 5295 syncXY(true, true); 5296 5297 if (scrollProxy) { 5298 scrollProxy._skip = false; //Microsoft browsers have a bug that causes them to briefly render the position incorrectly (it flashes to the end state when we seek() the tween even though we jump right back to the current position, and this only seems to happen when we're affecting both top and left), so we set a _suspendTransforms flag to prevent it from actually applying the values in the ScrollProxy. 5299 } 5300 } 5301 } else if (hasBounds) { 5302 self.applyBounds(); 5303 } 5304 }, 5305 updateMatrix = function updateMatrix(shiftStart) { 5306 var start = matrix, 5307 p; 5308 matrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(target.parentNode, true); 5309 5310 if (shiftStart && self.isPressed && !matrix.equals(start || new _utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"]())) { 5311 //if the matrix changes WHILE the element is pressed, we must adjust the startPointerX and startPointerY accordingly, so we invert the original matrix and figure out where the pointerX and pointerY were in the global space, then apply the new matrix to get the updated coordinates. 5312 p = start.inverse().apply({ 5313 x: startPointerX, 5314 y: startPointerY 5315 }); 5316 matrix.apply(p, p); 5317 startPointerX = p.x; 5318 startPointerY = p.y; 5319 } 5320 5321 if (matrix.equals(_identityMatrix)) { 5322 //if there are no transforms, we can optimize performance by not factoring in the matrix 5323 matrix = null; 5324 } 5325 }, 5326 recordStartPositions = function recordStartPositions() { 5327 var edgeTolerance = 1 - self.edgeResistance, 5328 offsetX = isFixed ? _getDocScrollLeft(ownerDoc) : 0, 5329 offsetY = isFixed ? _getDocScrollTop(ownerDoc) : 0, 5330 parsedOrigin, 5331 x, 5332 y; 5333 5334 if (xyMode) { 5335 // in case the user set it as a different unit, like animating the x to "100%". We must convert it back to px! 5336 gsCache.x = getPropAsNum(xProp, "px") + "px"; 5337 gsCache.y = getPropAsNum(yProp, "px") + "px"; 5338 gsCache.renderTransform(); 5339 } 5340 5341 updateMatrix(false); 5342 _point1.x = self.pointerX - offsetX; 5343 _point1.y = self.pointerY - offsetY; 5344 matrix && matrix.apply(_point1, _point1); 5345 startPointerX = _point1.x; //translate to local coordinate system 5346 5347 startPointerY = _point1.y; 5348 5349 if (dirty) { 5350 setPointerPosition(self.pointerX, self.pointerY); 5351 render(true); 5352 } 5353 5354 innerMatrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(target); 5355 5356 if (scrollProxy) { 5357 calculateBounds(); 5358 startElementY = scrollProxy.top(); 5359 startElementX = scrollProxy.left(); 5360 } else { 5361 //if the element is in the process of tweening, don't force snapping to occur because it could make it jump. Imagine the user throwing, then before it's done, clicking on the element in its inbetween state. 5362 if (isTweening()) { 5363 syncXY(true, true); 5364 calculateBounds(); 5365 } else { 5366 self.applyBounds(); 5367 } 5368 5369 if (rotationMode) { 5370 parsedOrigin = target.ownerSVGElement ? [gsCache.xOrigin - target.getBBox().x, gsCache.yOrigin - target.getBBox().y] : (_getComputedStyle(target)[_transformOriginProp] || "0 0").split(" "); 5371 rotationOrigin = self.rotationOrigin = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(target).apply({ 5372 x: parseFloat(parsedOrigin[0]) || 0, 5373 y: parseFloat(parsedOrigin[1]) || 0 5374 }); 5375 syncXY(true, true); 5376 x = self.pointerX - rotationOrigin.x - offsetX; 5377 y = rotationOrigin.y - self.pointerY + offsetY; 5378 startElementX = self.x; //starting rotation (x always refers to rotation in type:"rotation", measured in degrees) 5379 5380 startElementY = self.y = Math.atan2(y, x) * _RAD2DEG; 5381 } else { 5382 //parent = !isFixed && target.parentNode; 5383 //startScrollTop = parent ? parent.scrollTop || 0 : 0; 5384 //startScrollLeft = parent ? parent.scrollLeft || 0 : 0; 5385 startElementY = getPropAsNum(yProp, "px"); //record the starting top and left values so that we can just add the mouse's movement to them later. 5386 5387 startElementX = getPropAsNum(xProp, "px"); 5388 } 5389 } 5390 5391 if (hasBounds && edgeTolerance) { 5392 if (startElementX > maxX) { 5393 startElementX = maxX + (startElementX - maxX) / edgeTolerance; 5394 } else if (startElementX < minX) { 5395 startElementX = minX - (minX - startElementX) / edgeTolerance; 5396 } 5397 5398 if (!rotationMode) { 5399 if (startElementY > maxY) { 5400 startElementY = maxY + (startElementY - maxY) / edgeTolerance; 5401 } else if (startElementY < minY) { 5402 startElementY = minY - (minY - startElementY) / edgeTolerance; 5403 } 5404 } 5405 } 5406 5407 self.startX = startElementX = _round(startElementX); 5408 self.startY = startElementY = _round(startElementY); 5409 }, 5410 isTweening = function isTweening() { 5411 return self.tween && self.tween.isActive(); 5412 }, 5413 removePlaceholder = function removePlaceholder() { 5414 if (_placeholderDiv.parentNode && !isTweening() && !self.isDragging) { 5415 //_placeholderDiv just props open auto-scrolling containers so they don't collapse as the user drags left/up. We remove it after dragging (and throwing, if necessary) finishes. 5416 _placeholderDiv.parentNode.removeChild(_placeholderDiv); 5417 } 5418 }, 5419 //called when the mouse is pressed (or touch starts) 5420 onPress = function onPress(e, force) { 5421 var i; 5422 5423 if (!enabled || self.isPressed || !e || (e.type === "mousedown" || e.type === "pointerdown") && !force && _getTime() - clickTime < 30 && _touchEventLookup[self.pointerEvent.type]) { 5424 //when we DON'T preventDefault() in order to accommodate touch-scrolling and the user just taps, many browsers also fire a mousedown/mouseup sequence AFTER the touchstart/touchend sequence, thus it'd result in two quick "click" events being dispatched. This line senses that condition and halts it on the subsequent mousedown. 5425 isPreventingDefault && e && enabled && _preventDefault(e); // in some browsers, we must listen for multiple event types like touchstart, pointerdown, mousedown. The first time this function is called, we record whether or not we _preventDefault() so that on duplicate calls, we can do the same if necessary. 5426 5427 return; 5428 } 5429 5430 interrupted = isTweening(); 5431 dragged = false; // we need to track whether or not it was dragged in this interaction so that if, for example, the user calls .endDrag() to FORCE it to stop and then they keep the mouse pressed down and eventually release, that would normally cause an onClick but we have to skip it in that case if there was dragging that occurred. 5432 5433 self.pointerEvent = e; 5434 5435 if (_touchEventLookup[e.type]) { 5436 //note: on iOS, BOTH touchmove and mousemove are dispatched, but the mousemove has pageY and pageX of 0 which would mess up the calculations and needlessly hurt performance. 5437 touchEventTarget = ~e.type.indexOf("touch") ? e.currentTarget || e.target : ownerDoc; //pointer-based touches (for Microsoft browsers) don't remain locked to the original target like other browsers, so we must use the document instead. The event type would be "MSPointerDown" or "pointerdown". 5438 5439 _addListener(touchEventTarget, "touchend", onRelease); 5440 5441 _addListener(touchEventTarget, "touchmove", onMove); // possible future change if PointerEvents are more standardized: https://developer.mozilla.org/en-US/docs/Web/API/Element/setPointerCapture 5442 5443 5444 _addListener(touchEventTarget, "touchcancel", onRelease); 5445 5446 _addListener(ownerDoc, "touchstart", _onMultiTouchDocument); 5447 } else { 5448 touchEventTarget = null; 5449 5450 _addListener(ownerDoc, "mousemove", onMove); //attach these to the document instead of the box itself so that if the user's mouse moves too quickly (and off of the box), things still work. 5451 5452 } 5453 5454 touchDragAxis = null; 5455 5456 if (!_supportsPointer || !touchEventTarget) { 5457 _addListener(ownerDoc, "mouseup", onRelease); 5458 5459 e && e.target && _addListener(e.target, "mouseup", onRelease); //we also have to listen directly on the element because some browsers don't bubble up the event to the _doc on elements with contentEditable="true" 5460 } 5461 5462 isClicking = isClickable.call(self, e.target) && vars.dragClickables === false && !force; 5463 5464 if (isClicking) { 5465 _addListener(e.target, "change", onRelease); //in some browsers, when you mousedown on a <select> element, no mouseup gets dispatched! So we listen for a "change" event instead. 5466 5467 5468 _dispatchEvent(self, "pressInit", "onPressInit"); 5469 5470 _dispatchEvent(self, "press", "onPress"); 5471 5472 _setSelectable(triggers, true); //accommodates things like inputs and elements with contentEditable="true" (otherwise user couldn't drag to select text) 5473 5474 5475 isPreventingDefault = false; 5476 return; 5477 } 5478 5479 allowNativeTouchScrolling = !touchEventTarget || allowX === allowY || self.vars.allowNativeTouchScrolling === false || self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2) ? false : allowX ? "y" : "x"; //note: in Chrome, right-clicking (for a context menu) fires onPress and it doesn't have the event.which set properly, so we must look for event.ctrlKey. If the user wants to allow context menus we should of course sense it here and not allow native touch scrolling. 5480 5481 isPreventingDefault = !allowNativeTouchScrolling && !self.allowEventDefault; 5482 5483 if (isPreventingDefault) { 5484 _preventDefault(e); 5485 5486 _addListener(_win, "touchforcechange", _preventDefault); //works around safari bug: https://gsap.com/forums/topic/21450-draggable-in-iframe-on-mobile-is-buggy/ 5487 5488 } 5489 5490 if (e.changedTouches) { 5491 //touch events store the data slightly differently 5492 e = touch = e.changedTouches[0]; 5493 touchID = e.identifier; 5494 } else if (e.pointerId) { 5495 touchID = e.pointerId; //for some Microsoft browsers 5496 } else { 5497 touch = touchID = null; 5498 } 5499 5500 _dragCount++; 5501 5502 _addToRenderQueue(render); //causes the Draggable to render on each "tick" of gsap.ticker (performance optimization - updating values in a mousemove can cause them to happen too frequently, like multiple times between frame redraws which is wasteful, and it also prevents values from updating properly in IE8) 5503 5504 5505 startPointerY = self.pointerY = e.pageY; //record the starting x and y so that we can calculate the movement from the original in _onMouseMove 5506 5507 startPointerX = self.pointerX = e.pageX; 5508 5509 _dispatchEvent(self, "pressInit", "onPressInit"); 5510 5511 if (allowNativeTouchScrolling || self.autoScroll) { 5512 _recordMaxScrolls(target.parentNode); 5513 } 5514 5515 if (target.parentNode && self.autoScroll && !scrollProxy && !rotationMode && target.parentNode._gsMaxScrollX && !_placeholderDiv.parentNode && !target.getBBox) { 5516 //add a placeholder div to prevent the parent container from collapsing when the user drags the element left. 5517 _placeholderDiv.style.width = target.parentNode.scrollWidth + "px"; 5518 target.parentNode.appendChild(_placeholderDiv); 5519 } 5520 5521 recordStartPositions(); 5522 self.tween && self.tween.kill(); 5523 self.isThrowing = false; 5524 gsap.killTweensOf(scrollProxy || target, killProps, true); //in case the user tries to drag it before the last tween is done. 5525 5526 scrollProxy && gsap.killTweensOf(target, { 5527 scrollTo: 1 5528 }, true); //just in case the original target's scroll position is being tweened somewhere else. 5529 5530 self.tween = self.lockedAxis = null; 5531 5532 if (vars.zIndexBoost || !rotationMode && !scrollProxy && vars.zIndexBoost !== false) { 5533 target.style.zIndex = Draggable.zIndex++; 5534 } 5535 5536 self.isPressed = true; 5537 hasDragCallback = !!(vars.onDrag || self._listeners.drag); 5538 hasMoveCallback = !!(vars.onMove || self._listeners.move); 5539 5540 if (vars.cursor !== false || vars.activeCursor) { 5541 i = triggers.length; 5542 5543 while (--i > -1) { 5544 gsap.set(triggers[i], { 5545 cursor: vars.activeCursor || vars.cursor || (_defaultCursor === "grab" ? "grabbing" : _defaultCursor) 5546 }); 5547 } 5548 } 5549 5550 _dispatchEvent(self, "press", "onPress"); 5551 }, 5552 //called every time the mouse/touch moves 5553 onMove = function onMove(e) { 5554 var originalEvent = e, 5555 touches, 5556 pointerX, 5557 pointerY, 5558 i, 5559 dx, 5560 dy; 5561 5562 if (!enabled || _isMultiTouching || !self.isPressed || !e) { 5563 isPreventingDefault && e && enabled && _preventDefault(e); // in some browsers, we must listen for multiple event types like touchmove, pointermove, mousemove. The first time this function is called, we record whether or not we _preventDefault() so that on duplicate calls, we can do the same if necessary. 5564 5565 return; 5566 } 5567 5568 self.pointerEvent = e; 5569 touches = e.changedTouches; 5570 5571 if (touches) { 5572 //touch events store the data slightly differently 5573 e = touches[0]; 5574 5575 if (e !== touch && e.identifier !== touchID) { 5576 //Usually changedTouches[0] will be what we're looking for, but in case it's not, look through the rest of the array...(and Android browsers don't reuse the event like iOS) 5577 i = touches.length; 5578 5579 while (--i > -1 && (e = touches[i]).identifier !== touchID && e.target !== target) {} // Some Android devices dispatch a touchstart AND pointerdown initially, and then only pointermove thus the touchID may not match because it was grabbed from the touchstart event whereas the pointer event is the one that the browser dispatches for move, so if the event target matches this Draggable's target, let it through. 5580 5581 5582 if (i < 0) { 5583 return; 5584 } 5585 } 5586 } else if (e.pointerId && touchID && e.pointerId !== touchID) { 5587 //for some Microsoft browsers, we must attach the listener to the doc rather than the trigger so that when the finger moves outside the bounds of the trigger, things still work. So if the event we're receiving has a pointerId that doesn't match the touchID, ignore it (for multi-touch) 5588 return; 5589 } 5590 5591 if (touchEventTarget && allowNativeTouchScrolling && !touchDragAxis) { 5592 //Android browsers force us to decide on the first "touchmove" event if we should allow the default (scrolling) behavior or preventDefault(). Otherwise, a "touchcancel" will be fired and then no "touchmove" or "touchend" will fire during the scrolling (no good). 5593 _point1.x = e.pageX - (isFixed ? _getDocScrollLeft(ownerDoc) : 0); 5594 _point1.y = e.pageY - (isFixed ? _getDocScrollTop(ownerDoc) : 0); 5595 matrix && matrix.apply(_point1, _point1); 5596 pointerX = _point1.x; 5597 pointerY = _point1.y; 5598 dx = Math.abs(pointerX - startPointerX); 5599 dy = Math.abs(pointerY - startPointerY); 5600 5601 if (dx !== dy && (dx > minimumMovement || dy > minimumMovement) || _isAndroid && allowNativeTouchScrolling === touchDragAxis) { 5602 touchDragAxis = dx > dy && allowX ? "x" : "y"; 5603 5604 if (allowNativeTouchScrolling && touchDragAxis !== allowNativeTouchScrolling) { 5605 _addListener(_win, "touchforcechange", _preventDefault); // prevents native touch scrolling from taking over if the user started dragging in the other direction in iOS Safari 5606 5607 } 5608 5609 if (self.vars.lockAxisOnTouchScroll !== false && allowX && allowY) { 5610 self.lockedAxis = touchDragAxis === "x" ? "y" : "x"; 5611 _isFunction(self.vars.onLockAxis) && self.vars.onLockAxis.call(self, originalEvent); 5612 } 5613 5614 if (_isAndroid && allowNativeTouchScrolling === touchDragAxis) { 5615 onRelease(originalEvent); 5616 return; 5617 } 5618 } 5619 } 5620 5621 if (!self.allowEventDefault && (!allowNativeTouchScrolling || touchDragAxis && allowNativeTouchScrolling !== touchDragAxis) && originalEvent.cancelable !== false) { 5622 _preventDefault(originalEvent); 5623 5624 isPreventingDefault = true; 5625 } else if (isPreventingDefault) { 5626 isPreventingDefault = false; 5627 } 5628 5629 if (self.autoScroll) { 5630 checkAutoScrollBounds = true; 5631 } 5632 5633 setPointerPosition(e.pageX, e.pageY, hasMoveCallback); 5634 }, 5635 setPointerPosition = function setPointerPosition(pointerX, pointerY, invokeOnMove) { 5636 var dragTolerance = 1 - self.dragResistance, 5637 edgeTolerance = 1 - self.edgeResistance, 5638 prevPointerX = self.pointerX, 5639 prevPointerY = self.pointerY, 5640 prevStartElementY = startElementY, 5641 prevX = self.x, 5642 prevY = self.y, 5643 prevEndX = self.endX, 5644 prevEndY = self.endY, 5645 prevEndRotation = self.endRotation, 5646 prevDirty = dirty, 5647 xChange, 5648 yChange, 5649 x, 5650 y, 5651 dif, 5652 temp; 5653 self.pointerX = pointerX; 5654 self.pointerY = pointerY; 5655 5656 if (isFixed) { 5657 pointerX -= _getDocScrollLeft(ownerDoc); 5658 pointerY -= _getDocScrollTop(ownerDoc); 5659 } 5660 5661 if (rotationMode) { 5662 y = Math.atan2(rotationOrigin.y - pointerY, pointerX - rotationOrigin.x) * _RAD2DEG; 5663 dif = self.y - y; 5664 5665 if (dif > 180) { 5666 startElementY -= 360; 5667 self.y = y; 5668 } else if (dif < -180) { 5669 startElementY += 360; 5670 self.y = y; 5671 } 5672 5673 if (self.x !== startElementX || Math.abs(startElementY - y) > minimumMovement) { 5674 self.y = y; 5675 x = startElementX + (startElementY - y) * dragTolerance; 5676 } else { 5677 x = startElementX; 5678 } 5679 } else { 5680 if (matrix) { 5681 temp = pointerX * matrix.a + pointerY * matrix.c + matrix.e; 5682 pointerY = pointerX * matrix.b + pointerY * matrix.d + matrix.f; 5683 pointerX = temp; 5684 } 5685 5686 yChange = pointerY - startPointerY; 5687 xChange = pointerX - startPointerX; 5688 5689 if (yChange < minimumMovement && yChange > -minimumMovement) { 5690 yChange = 0; 5691 } 5692 5693 if (xChange < minimumMovement && xChange > -minimumMovement) { 5694 xChange = 0; 5695 } 5696 5697 if ((self.lockAxis || self.lockedAxis) && (xChange || yChange)) { 5698 temp = self.lockedAxis; 5699 5700 if (!temp) { 5701 self.lockedAxis = temp = allowX && Math.abs(xChange) > Math.abs(yChange) ? "y" : allowY ? "x" : null; 5702 5703 if (temp && _isFunction(self.vars.onLockAxis)) { 5704 self.vars.onLockAxis.call(self, self.pointerEvent); 5705 } 5706 } 5707 5708 if (temp === "y") { 5709 yChange = 0; 5710 } else if (temp === "x") { 5711 xChange = 0; 5712 } 5713 } 5714 5715 x = _round(startElementX + xChange * dragTolerance); 5716 y = _round(startElementY + yChange * dragTolerance); 5717 } 5718 5719 if ((snapX || snapY || snapXY) && (self.x !== x || self.y !== y && !rotationMode)) { 5720 if (snapXY) { 5721 _temp1.x = x; 5722 _temp1.y = y; 5723 temp = snapXY(_temp1); 5724 x = _round(temp.x); 5725 y = _round(temp.y); 5726 } 5727 5728 if (snapX) { 5729 x = _round(snapX(x)); 5730 } 5731 5732 if (snapY) { 5733 y = _round(snapY(y)); 5734 } 5735 } 5736 5737 if (hasBounds) { 5738 if (x > maxX) { 5739 x = maxX + Math.round((x - maxX) * edgeTolerance); 5740 } else if (x < minX) { 5741 x = minX + Math.round((x - minX) * edgeTolerance); 5742 } 5743 5744 if (!rotationMode) { 5745 if (y > maxY) { 5746 y = Math.round(maxY + (y - maxY) * edgeTolerance); 5747 } else if (y < minY) { 5748 y = Math.round(minY + (y - minY) * edgeTolerance); 5749 } 5750 } 5751 } 5752 5753 if (self.x !== x || self.y !== y && !rotationMode) { 5754 if (rotationMode) { 5755 self.endRotation = self.x = self.endX = x; 5756 dirty = true; 5757 } else { 5758 if (allowY) { 5759 self.y = self.endY = y; 5760 dirty = true; //a flag that indicates we need to render the target next time the TweenLite.ticker dispatches a "tick" event (typically on a requestAnimationFrame) - this is a performance optimization (we shouldn't render on every move because sometimes many move events can get dispatched between screen refreshes, and that'd be wasteful to render every time) 5761 } 5762 5763 if (allowX) { 5764 self.x = self.endX = x; 5765 dirty = true; 5766 } 5767 } 5768 5769 if (!invokeOnMove || _dispatchEvent(self, "move", "onMove") !== false) { 5770 if (!self.isDragging && self.isPressed) { 5771 self.isDragging = dragged = true; 5772 5773 _dispatchEvent(self, "dragstart", "onDragStart"); 5774 } 5775 } else { 5776 //revert because the onMove returned false! 5777 self.pointerX = prevPointerX; 5778 self.pointerY = prevPointerY; 5779 startElementY = prevStartElementY; 5780 self.x = prevX; 5781 self.y = prevY; 5782 self.endX = prevEndX; 5783 self.endY = prevEndY; 5784 self.endRotation = prevEndRotation; 5785 dirty = prevDirty; 5786 } 5787 } 5788 }, 5789 //called when the mouse/touch is released 5790 onRelease = function onRelease(e, force) { 5791 if (!enabled || !self.isPressed || e && touchID != null && !force && (e.pointerId && e.pointerId !== touchID && e.target !== target || e.changedTouches && !_hasTouchID(e.changedTouches, touchID))) { 5792 //for some Microsoft browsers, we must attach the listener to the doc rather than the trigger so that when the finger moves outside the bounds of the trigger, things still work. So if the event we're receiving has a pointerId that doesn't match the touchID, ignore it (for multi-touch) 5793 isPreventingDefault && e && enabled && _preventDefault(e); // in some browsers, we must listen for multiple event types like touchend, pointerup, mouseup. The first time this function is called, we record whether or not we _preventDefault() so that on duplicate calls, we can do the same if necessary. 5794 5795 return; 5796 } 5797 5798 self.isPressed = false; 5799 var originalEvent = e, 5800 wasDragging = self.isDragging, 5801 isContextMenuRelease = self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2), 5802 placeholderDelayedCall = gsap.delayedCall(0.001, removePlaceholder), 5803 touches, 5804 i, 5805 syntheticEvent, 5806 eventTarget, 5807 syntheticClick; 5808 5809 if (touchEventTarget) { 5810 _removeListener(touchEventTarget, "touchend", onRelease); 5811 5812 _removeListener(touchEventTarget, "touchmove", onMove); 5813 5814 _removeListener(touchEventTarget, "touchcancel", onRelease); 5815 5816 _removeListener(ownerDoc, "touchstart", _onMultiTouchDocument); 5817 } else { 5818 _removeListener(ownerDoc, "mousemove", onMove); 5819 } 5820 5821 _removeListener(_win, "touchforcechange", _preventDefault); 5822 5823 if (!_supportsPointer || !touchEventTarget) { 5824 _removeListener(ownerDoc, "mouseup", onRelease); 5825 5826 e && e.target && _removeListener(e.target, "mouseup", onRelease); 5827 } 5828 5829 dirty = false; 5830 5831 if (wasDragging) { 5832 dragEndTime = _lastDragTime = _getTime(); 5833 self.isDragging = false; 5834 } 5835 5836 _removeFromRenderQueue(render); 5837 5838 if (isClicking && !isContextMenuRelease) { 5839 if (e) { 5840 _removeListener(e.target, "change", onRelease); 5841 5842 self.pointerEvent = originalEvent; 5843 } 5844 5845 _setSelectable(triggers, false); 5846 5847 _dispatchEvent(self, "release", "onRelease"); 5848 5849 _dispatchEvent(self, "click", "onClick"); 5850 5851 isClicking = false; 5852 return; 5853 } 5854 5855 i = triggers.length; 5856 5857 while (--i > -1) { 5858 _setStyle(triggers[i], "cursor", vars.cursor || (vars.cursor !== false ? _defaultCursor : null)); 5859 } 5860 5861 _dragCount--; 5862 5863 if (e) { 5864 touches = e.changedTouches; 5865 5866 if (touches) { 5867 //touch events store the data slightly differently 5868 e = touches[0]; 5869 5870 if (e !== touch && e.identifier !== touchID) { 5871 //Usually changedTouches[0] will be what we're looking for, but in case it's not, look through the rest of the array...(and Android browsers don't reuse the event like iOS) 5872 i = touches.length; 5873 5874 while (--i > -1 && (e = touches[i]).identifier !== touchID && e.target !== target) {} 5875 5876 if (i < 0 && !force) { 5877 return; 5878 } 5879 } 5880 } 5881 5882 self.pointerEvent = originalEvent; 5883 self.pointerX = e.pageX; 5884 self.pointerY = e.pageY; 5885 } 5886 5887 if (isContextMenuRelease && originalEvent) { 5888 _preventDefault(originalEvent); 5889 5890 isPreventingDefault = true; 5891 5892 _dispatchEvent(self, "release", "onRelease"); 5893 } else if (originalEvent && !wasDragging) { 5894 isPreventingDefault = false; 5895 5896 if (interrupted && (vars.snap || vars.bounds)) { 5897 //otherwise, if the user clicks on the object while it's animating to a snapped position, and then releases without moving 3 pixels, it will just stay there (it should animate/snap) 5898 animate(vars.inertia || vars.throwProps); 5899 } 5900 5901 _dispatchEvent(self, "release", "onRelease"); 5902 5903 if ((!_isAndroid || originalEvent.type !== "touchmove") && originalEvent.type.indexOf("cancel") === -1) { 5904 //to accommodate native scrolling on Android devices, we have to immediately call onRelease() on the first touchmove event, but that shouldn't trigger a "click". 5905 _dispatchEvent(self, "click", "onClick"); 5906 5907 if (_getTime() - clickTime < 300) { 5908 _dispatchEvent(self, "doubleclick", "onDoubleClick"); 5909 } 5910 5911 eventTarget = originalEvent.target || target; //old IE uses srcElement 5912 5913 clickTime = _getTime(); 5914 5915 syntheticClick = function syntheticClick() { 5916 // some browsers (like Firefox) won't trust script-generated clicks, so if the user tries to click on a video to play it, for example, it simply won't work. Since a regular "click" event will most likely be generated anyway (one that has its isTrusted flag set to true), we must slightly delay our script-generated click so that the "real"/trusted one is prioritized. Remember, when there are duplicate events in quick succession, we suppress all but the first one. Some browsers don't even trigger the "real" one at all, so our synthetic one is a safety valve that ensures that no matter what, a click event does get dispatched. 5917 if (clickTime !== clickDispatch && self.enabled() && !self.isPressed && !originalEvent.defaultPrevented) { 5918 if (eventTarget.click) { 5919 //some browsers (like mobile Safari) don't properly trigger the click event 5920 eventTarget.click(); 5921 } else if (ownerDoc.createEvent) { 5922 syntheticEvent = ownerDoc.createEvent("MouseEvents"); 5923 syntheticEvent.initMouseEvent("click", true, true, _win, 1, self.pointerEvent.screenX, self.pointerEvent.screenY, self.pointerX, self.pointerY, false, false, false, false, 0, null); 5924 eventTarget.dispatchEvent(syntheticEvent); 5925 } 5926 } 5927 }; 5928 5929 if (!_isAndroid && !originalEvent.defaultPrevented) { 5930 //iOS Safari requires the synthetic click to happen immediately or else it simply won't work, but Android doesn't play nice. 5931 gsap.delayedCall(0.05, syntheticClick); //in addition to the iOS bug workaround, there's a Firefox issue with clicking on things like a video to play, so we must fake a click event in a slightly delayed fashion. Previously, we listened for the "click" event with "capture" false which solved the video-click-to-play issue, but it would allow the "click" event to be dispatched twice like if you were using a jQuery.click() because that was handled in the capture phase, thus we had to switch to the capture phase to avoid the double-dispatching, but do the delayed synthetic click. Don't fire it too fast (like 0.00001) because we want to give the native event a chance to fire first as it's "trusted". 5932 } 5933 } 5934 } else { 5935 animate(vars.inertia || vars.throwProps); //will skip if inertia/throwProps isn't defined or InertiaPlugin isn't loaded. 5936 5937 if (!self.allowEventDefault && originalEvent && (vars.dragClickables !== false || !isClickable.call(self, originalEvent.target)) && wasDragging && (!allowNativeTouchScrolling || touchDragAxis && allowNativeTouchScrolling === touchDragAxis) && originalEvent.cancelable !== false) { 5938 isPreventingDefault = true; 5939 5940 _preventDefault(originalEvent); 5941 } else { 5942 isPreventingDefault = false; 5943 } 5944 5945 _dispatchEvent(self, "release", "onRelease"); 5946 } 5947 5948 isTweening() && placeholderDelayedCall.duration(self.tween.duration()); //sync the timing so that the placeholder DIV gets 5949 5950 wasDragging && _dispatchEvent(self, "dragend", "onDragEnd"); 5951 return true; 5952 }, 5953 updateScroll = function updateScroll(e) { 5954 if (e && self.isDragging && !scrollProxy) { 5955 var parent = e.target || target.parentNode, 5956 deltaX = parent.scrollLeft - parent._gsScrollX, 5957 deltaY = parent.scrollTop - parent._gsScrollY; 5958 5959 if (deltaX || deltaY) { 5960 if (matrix) { 5961 startPointerX -= deltaX * matrix.a + deltaY * matrix.c; 5962 startPointerY -= deltaY * matrix.d + deltaX * matrix.b; 5963 } else { 5964 startPointerX -= deltaX; 5965 startPointerY -= deltaY; 5966 } 5967 5968 parent._gsScrollX += deltaX; 5969 parent._gsScrollY += deltaY; 5970 setPointerPosition(self.pointerX, self.pointerY); 5971 } 5972 } 5973 }, 5974 onClick = function onClick(e) { 5975 //this was a huge pain in the neck to align all the various browsers and their behaviors. Chrome, Firefox, Safari, Opera, Android, and Microsoft Edge all handle events differently! Some will only trigger native behavior (like checkbox toggling) from trusted events. Others don't even support isTrusted, but require 2 events to flow through before triggering native behavior. Edge treats everything as trusted but also mandates that 2 flow through to trigger the correct native behavior. 5976 var time = _getTime(), 5977 recentlyClicked = time - clickTime < 100, 5978 recentlyDragged = time - dragEndTime < 50, 5979 alreadyDispatched = recentlyClicked && clickDispatch === clickTime, 5980 defaultPrevented = self.pointerEvent && self.pointerEvent.defaultPrevented, 5981 alreadyDispatchedTrusted = recentlyClicked && trustedClickDispatch === clickTime, 5982 trusted = e.isTrusted || e.isTrusted == null && recentlyClicked && alreadyDispatched; //note: Safari doesn't support isTrusted, and it won't properly execute native behavior (like toggling checkboxes) on the first synthetic "click" event - we must wait for the 2nd and treat it as trusted (but stop propagation at that point). Confusing, I know. Don't you love cross-browser compatibility challenges? 5983 5984 5985 if ((alreadyDispatched || recentlyDragged && self.vars.suppressClickOnDrag !== false) && e.stopImmediatePropagation) { 5986 e.stopImmediatePropagation(); 5987 } 5988 5989 if (recentlyClicked && !(self.pointerEvent && self.pointerEvent.defaultPrevented) && (!alreadyDispatched || trusted && !alreadyDispatchedTrusted)) { 5990 //let the first click pass through unhindered. Let the next one only if it's trusted, then no more (stop quick-succession ones) 5991 if (trusted && alreadyDispatched) { 5992 trustedClickDispatch = clickTime; 5993 } 5994 5995 clickDispatch = clickTime; 5996 return; 5997 } 5998 5999 if (self.isPressed || recentlyDragged || recentlyClicked) { 6000 if (!trusted || !e.detail || !recentlyClicked || defaultPrevented) { 6001 _preventDefault(e); 6002 } 6003 } 6004 6005 if (!recentlyClicked && !recentlyDragged && !dragged) { 6006 // for script-triggered event dispatches, like element.click() 6007 e && e.target && (self.pointerEvent = e); 6008 6009 _dispatchEvent(self, "click", "onClick"); 6010 } 6011 }, 6012 localizePoint = function localizePoint(p) { 6013 return matrix ? { 6014 x: p.x * matrix.a + p.y * matrix.c + matrix.e, 6015 y: p.x * matrix.b + p.y * matrix.d + matrix.f 6016 } : { 6017 x: p.x, 6018 y: p.y 6019 }; 6020 }; 6021 6022 old = Draggable.get(target); 6023 old && old.kill(); // avoids duplicates (an element can only be controlled by one Draggable) 6024 //give the user access to start/stop dragging... 6025 6026 _this2.startDrag = function (event, align) { 6027 var r1, r2, p1, p2; 6028 onPress(event || self.pointerEvent, true); //if the pointer isn't on top of the element, adjust things accordingly 6029 6030 if (align && !self.hitTest(event || self.pointerEvent)) { 6031 r1 = _parseRect(event || self.pointerEvent); 6032 r2 = _parseRect(target); 6033 p1 = localizePoint({ 6034 x: r1.left + r1.width / 2, 6035 y: r1.top + r1.height / 2 6036 }); 6037 p2 = localizePoint({ 6038 x: r2.left + r2.width / 2, 6039 y: r2.top + r2.height / 2 6040 }); 6041 startPointerX -= p1.x - p2.x; 6042 startPointerY -= p1.y - p2.y; 6043 } 6044 6045 if (!self.isDragging) { 6046 self.isDragging = dragged = true; 6047 6048 _dispatchEvent(self, "dragstart", "onDragStart"); 6049 } 6050 }; 6051 6052 _this2.drag = onMove; 6053 6054 _this2.endDrag = function (e) { 6055 return onRelease(e || self.pointerEvent, true); 6056 }; 6057 6058 _this2.timeSinceDrag = function () { 6059 return self.isDragging ? 0 : (_getTime() - dragEndTime) / 1000; 6060 }; 6061 6062 _this2.timeSinceClick = function () { 6063 return (_getTime() - clickTime) / 1000; 6064 }; 6065 6066 _this2.hitTest = function (target, threshold) { 6067 return Draggable.hitTest(self.target, target, threshold); 6068 }; 6069 6070 _this2.getDirection = function (from, diagonalThreshold) { 6071 //from can be "start" (default), "velocity", or an element 6072 var mode = from === "velocity" && InertiaPlugin ? from : _isObject(from) && !rotationMode ? "element" : "start", 6073 xChange, 6074 yChange, 6075 ratio, 6076 direction, 6077 r1, 6078 r2; 6079 6080 if (mode === "element") { 6081 r1 = _parseRect(self.target); 6082 r2 = _parseRect(from); 6083 } 6084 6085 xChange = mode === "start" ? self.x - startElementX : mode === "velocity" ? InertiaPlugin.getVelocity(target, xProp) : r1.left + r1.width / 2 - (r2.left + r2.width / 2); 6086 6087 if (rotationMode) { 6088 return xChange < 0 ? "counter-clockwise" : "clockwise"; 6089 } else { 6090 diagonalThreshold = diagonalThreshold || 2; 6091 yChange = mode === "start" ? self.y - startElementY : mode === "velocity" ? InertiaPlugin.getVelocity(target, yProp) : r1.top + r1.height / 2 - (r2.top + r2.height / 2); 6092 ratio = Math.abs(xChange / yChange); 6093 direction = ratio < 1 / diagonalThreshold ? "" : xChange < 0 ? "left" : "right"; 6094 6095 if (ratio < diagonalThreshold) { 6096 if (direction !== "") { 6097 direction += "-"; 6098 } 6099 6100 direction += yChange < 0 ? "up" : "down"; 6101 } 6102 } 6103 6104 return direction; 6105 }; 6106 6107 _this2.applyBounds = function (newBounds, sticky) { 6108 var x, y, forceZeroVelocity, e, parent, isRoot; 6109 6110 if (newBounds && vars.bounds !== newBounds) { 6111 vars.bounds = newBounds; 6112 return self.update(true, sticky); 6113 } 6114 6115 syncXY(true); 6116 calculateBounds(); 6117 6118 if (hasBounds && !isTweening()) { 6119 x = self.x; 6120 y = self.y; 6121 6122 if (x > maxX) { 6123 x = maxX; 6124 } else if (x < minX) { 6125 x = minX; 6126 } 6127 6128 if (y > maxY) { 6129 y = maxY; 6130 } else if (y < minY) { 6131 y = minY; 6132 } 6133 6134 if (self.x !== x || self.y !== y) { 6135 forceZeroVelocity = true; 6136 self.x = self.endX = x; 6137 6138 if (rotationMode) { 6139 self.endRotation = x; 6140 } else { 6141 self.y = self.endY = y; 6142 } 6143 6144 dirty = true; 6145 render(true); 6146 6147 if (self.autoScroll && !self.isDragging) { 6148 _recordMaxScrolls(target.parentNode); 6149 6150 e = target; 6151 _windowProxy.scrollTop = _win.pageYOffset != null ? _win.pageYOffset : ownerDoc.documentElement.scrollTop != null ? ownerDoc.documentElement.scrollTop : ownerDoc.body.scrollTop; 6152 _windowProxy.scrollLeft = _win.pageXOffset != null ? _win.pageXOffset : ownerDoc.documentElement.scrollLeft != null ? ownerDoc.documentElement.scrollLeft : ownerDoc.body.scrollLeft; 6153 6154 while (e && !isRoot) { 6155 //walk up the chain and sense wherever the scrollTop/scrollLeft exceeds the maximum. 6156 isRoot = _isRoot(e.parentNode); 6157 parent = isRoot ? _windowProxy : e.parentNode; 6158 6159 if (allowY && parent.scrollTop > parent._gsMaxScrollY) { 6160 parent.scrollTop = parent._gsMaxScrollY; 6161 } 6162 6163 if (allowX && parent.scrollLeft > parent._gsMaxScrollX) { 6164 parent.scrollLeft = parent._gsMaxScrollX; 6165 } 6166 6167 e = parent; 6168 } 6169 } 6170 } 6171 6172 if (self.isThrowing && (forceZeroVelocity || self.endX > maxX || self.endX < minX || self.endY > maxY || self.endY < minY)) { 6173 animate(vars.inertia || vars.throwProps, forceZeroVelocity); 6174 } 6175 } 6176 6177 return self; 6178 }; 6179 6180 _this2.update = function (applyBounds, sticky, ignoreExternalChanges) { 6181 if (sticky && self.isPressed) { 6182 // in case the element was repositioned in the document flow, thus its x/y may be identical but its position is actually quite different. 6183 var m = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(target), 6184 p = innerMatrix.apply({ 6185 x: self.x - startElementX, 6186 y: self.y - startElementY 6187 }), 6188 m2 = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(target.parentNode, true); 6189 m2.apply({ 6190 x: m.e - p.x, 6191 y: m.f - p.y 6192 }, p); 6193 self.x -= p.x - m2.e; 6194 self.y -= p.y - m2.f; 6195 render(true); 6196 recordStartPositions(); 6197 } 6198 6199 var x = self.x, 6200 y = self.y; 6201 updateMatrix(!sticky); 6202 6203 if (applyBounds) { 6204 self.applyBounds(); 6205 } else { 6206 dirty && ignoreExternalChanges && render(true); 6207 syncXY(true); 6208 } 6209 6210 if (sticky) { 6211 setPointerPosition(self.pointerX, self.pointerY); 6212 dirty && render(true); 6213 } 6214 6215 if (self.isPressed && !sticky && (allowX && Math.abs(x - self.x) > 0.01 || allowY && Math.abs(y - self.y) > 0.01 && !rotationMode)) { 6216 recordStartPositions(); 6217 } 6218 6219 if (self.autoScroll) { 6220 _recordMaxScrolls(target.parentNode, self.isDragging); 6221 6222 checkAutoScrollBounds = self.isDragging; 6223 render(true); //in case reparenting occurred. 6224 6225 _removeScrollListener(target, updateScroll); 6226 6227 _addScrollListener(target, updateScroll); 6228 } 6229 6230 return self; 6231 }; 6232 6233 _this2.enable = function (type) { 6234 var setVars = { 6235 lazy: true 6236 }, 6237 id, 6238 i, 6239 trigger; 6240 6241 if (vars.cursor !== false) { 6242 setVars.cursor = vars.cursor || _defaultCursor; 6243 } 6244 6245 if (gsap.utils.checkPrefix("touchCallout")) { 6246 setVars.touchCallout = "none"; 6247 } 6248 6249 if (type !== "soft") { 6250 _setTouchActionForAllDescendants(triggers, allowX === allowY ? "none" : vars.allowNativeTouchScrolling && target.scrollHeight === target.clientHeight === (target.scrollWidth === target.clientHeight) || vars.allowEventDefault ? "manipulation" : allowX ? "pan-y" : "pan-x"); // Some browsers like Internet Explorer will fire a pointercancel event when the user attempts to drag when touchAction is "manipulate" because it's perceived as a pan. If the element has scrollable content in only one direction, we should use pan-x or pan-y accordingly so that the pointercancel doesn't prevent dragging. 6251 6252 6253 i = triggers.length; 6254 6255 while (--i > -1) { 6256 trigger = triggers[i]; 6257 _supportsPointer || _addListener(trigger, "mousedown", onPress); 6258 6259 _addListener(trigger, "touchstart", onPress); 6260 6261 _addListener(trigger, "click", onClick, true); // note: used to pass true for capture but it prevented click-to-play-video functionality in Firefox. 6262 6263 6264 gsap.set(trigger, setVars); 6265 6266 if (trigger.getBBox && trigger.ownerSVGElement && allowX !== allowY) { 6267 // a bug in chrome doesn't respect touch-action on SVG elements - it only works if we set it on the parent SVG. 6268 gsap.set(trigger.ownerSVGElement, { 6269 touchAction: vars.allowNativeTouchScrolling || vars.allowEventDefault ? "manipulation" : allowX ? "pan-y" : "pan-x" 6270 }); 6271 } 6272 6273 vars.allowContextMenu || _addListener(trigger, "contextmenu", onContextMenu); 6274 } 6275 6276 _setSelectable(triggers, false); 6277 } 6278 6279 _addScrollListener(target, updateScroll); 6280 6281 enabled = true; 6282 6283 if (InertiaPlugin && type !== "soft") { 6284 InertiaPlugin.track(scrollProxy || target, xyMode ? "x,y" : rotationMode ? "rotation" : "top,left"); 6285 } 6286 6287 target._gsDragID = id = "d" + _lookupCount++; 6288 _lookup[id] = self; 6289 6290 if (scrollProxy) { 6291 scrollProxy.enable(); 6292 scrollProxy.element._gsDragID = id; 6293 } 6294 6295 (vars.bounds || rotationMode) && recordStartPositions(); 6296 vars.bounds && self.applyBounds(); 6297 return self; 6298 }; 6299 6300 _this2.disable = function (type) { 6301 var dragging = self.isDragging, 6302 i = triggers.length, 6303 trigger; 6304 6305 while (--i > -1) { 6306 _setStyle(triggers[i], "cursor", null); 6307 } 6308 6309 if (type !== "soft") { 6310 _setTouchActionForAllDescendants(triggers, null); 6311 6312 i = triggers.length; 6313 6314 while (--i > -1) { 6315 trigger = triggers[i]; 6316 6317 _setStyle(trigger, "touchCallout", null); 6318 6319 _removeListener(trigger, "mousedown", onPress); 6320 6321 _removeListener(trigger, "touchstart", onPress); 6322 6323 _removeListener(trigger, "click", onClick, true); 6324 6325 _removeListener(trigger, "contextmenu", onContextMenu); 6326 } 6327 6328 _setSelectable(triggers, true); 6329 6330 if (touchEventTarget) { 6331 _removeListener(touchEventTarget, "touchcancel", onRelease); 6332 6333 _removeListener(touchEventTarget, "touchend", onRelease); 6334 6335 _removeListener(touchEventTarget, "touchmove", onMove); 6336 } 6337 6338 _removeListener(ownerDoc, "mouseup", onRelease); 6339 6340 _removeListener(ownerDoc, "mousemove", onMove); 6341 } 6342 6343 _removeScrollListener(target, updateScroll); 6344 6345 enabled = false; 6346 6347 if (InertiaPlugin && type !== "soft") { 6348 InertiaPlugin.untrack(scrollProxy || target, xyMode ? "x,y" : rotationMode ? "rotation" : "top,left"); 6349 self.tween && self.tween.kill(); 6350 } 6351 6352 scrollProxy && scrollProxy.disable(); 6353 6354 _removeFromRenderQueue(render); 6355 6356 self.isDragging = self.isPressed = isClicking = false; 6357 dragging && _dispatchEvent(self, "dragend", "onDragEnd"); 6358 return self; 6359 }; 6360 6361 _this2.enabled = function (value, type) { 6362 return arguments.length ? value ? self.enable(type) : self.disable(type) : enabled; 6363 }; 6364 6365 _this2.kill = function () { 6366 self.isThrowing = false; 6367 self.tween && self.tween.kill(); 6368 self.disable(); 6369 gsap.set(triggers, { 6370 clearProps: "userSelect" 6371 }); 6372 delete _lookup[target._gsDragID]; 6373 return self; 6374 }; 6375 6376 _this2.revert = function () { 6377 this.kill(); 6378 this.styles && this.styles.revert(); 6379 }; 6380 6381 if (~type.indexOf("scroll")) { 6382 scrollProxy = _this2.scrollProxy = new ScrollProxy(target, _extend({ 6383 onKill: function onKill() { 6384 //ScrollProxy's onKill() gets called if/when the ScrollProxy senses that the user interacted with the scroll position manually (like using the scrollbar). IE9 doesn't fire the "mouseup" properly when users drag the scrollbar of an element, so this works around that issue. 6385 self.isPressed && onRelease(null); 6386 } 6387 }, vars)); //a bug in many Android devices' stock browser causes scrollTop to get forced back to 0 after it is altered via JS, so we set overflow to "hidden" on mobile/touch devices (they hide the scroll bar anyway). That works around the bug. (This bug is discussed at https://code.google.com/p/android/issues/detail?id=19625) 6388 6389 target.style.overflowY = allowY && !_isTouchDevice ? "auto" : "hidden"; 6390 target.style.overflowX = allowX && !_isTouchDevice ? "auto" : "hidden"; 6391 target = scrollProxy.content; 6392 } 6393 6394 if (rotationMode) { 6395 killProps.rotation = 1; 6396 } else { 6397 if (allowX) { 6398 killProps[xProp] = 1; 6399 } 6400 6401 if (allowY) { 6402 killProps[yProp] = 1; 6403 } 6404 } 6405 6406 gsCache.force3D = "force3D" in vars ? vars.force3D : true; //otherwise, normal dragging would be in 2D and then as soon as it's released and there's an inertia tween, it'd jump to 3D which can create an initial jump due to the work the browser must to do layerize it. 6407 6408 _context(_assertThisInitialized(_this2)); 6409 6410 _this2.enable(); 6411 6412 return _this2; 6413 } 6414 6415 Draggable.register = function register(core) { 6416 gsap = core; 6417 6418 _initCore(); 6419 }; 6420 6421 Draggable.create = function create(targets, vars) { 6422 _coreInitted || _initCore(true); 6423 return _toArray(targets).map(function (target) { 6424 return new Draggable(target, vars); 6425 }); 6426 }; 6427 6428 Draggable.get = function get(target) { 6429 return _lookup[(_toArray(target)[0] || {})._gsDragID]; 6430 }; 6431 6432 Draggable.timeSinceDrag = function timeSinceDrag() { 6433 return (_getTime() - _lastDragTime) / 1000; 6434 }; 6435 6436 Draggable.hitTest = function hitTest(obj1, obj2, threshold) { 6437 if (obj1 === obj2) { 6438 return false; 6439 } 6440 6441 var r1 = _parseRect(obj1), 6442 r2 = _parseRect(obj2), 6443 top = r1.top, 6444 left = r1.left, 6445 right = r1.right, 6446 bottom = r1.bottom, 6447 width = r1.width, 6448 height = r1.height, 6449 isOutside = r2.left > right || r2.right < left || r2.top > bottom || r2.bottom < top, 6450 overlap, 6451 area, 6452 isRatio; 6453 6454 if (isOutside || !threshold) { 6455 return !isOutside; 6456 } 6457 6458 isRatio = (threshold + "").indexOf("%") !== -1; 6459 threshold = parseFloat(threshold) || 0; 6460 overlap = { 6461 left: Math.max(left, r2.left), 6462 top: Math.max(top, r2.top) 6463 }; 6464 overlap.width = Math.min(right, r2.right) - overlap.left; 6465 overlap.height = Math.min(bottom, r2.bottom) - overlap.top; 6466 6467 if (overlap.width < 0 || overlap.height < 0) { 6468 return false; 6469 } 6470 6471 if (isRatio) { 6472 threshold *= 0.01; 6473 area = overlap.width * overlap.height; 6474 return area >= width * height * threshold || area >= r2.width * r2.height * threshold; 6475 } 6476 6477 return overlap.width > threshold && overlap.height > threshold; 6478 }; 6479 6480 return Draggable; 6481}(EventDispatcher); 6482 6483_setDefaults(Draggable.prototype, { 6484 pointerX: 0, 6485 pointerY: 0, 6486 startX: 0, 6487 startY: 0, 6488 deltaX: 0, 6489 deltaY: 0, 6490 isDragging: false, 6491 isPressed: false 6492}); 6493 6494Draggable.zIndex = 1000; 6495Draggable.version = "3.12.5"; 6496_getGSAP() && gsap.registerPlugin(Draggable); 6497 6498 6499/***/ }), 6500
vendor: 6,259 bytes, lines 6501-6729
6501/***/ "./node_modules/gsap/EasePack.js": 6502/*!***************************************!*\ 6503 !*** ./node_modules/gsap/EasePack.js ***! 6504 \***************************************/ 6505/*! exports provided: SlowMo, ExpoScaleEase, RoughEase, EasePack, default */ 6506/***/ (function(module, __webpack_exports__, __webpack_require__) { 6507 6508"use strict"; 6509__webpack_require__.r(__webpack_exports__); 6510/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SlowMo", function() { return SlowMo; }); 6511/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpoScaleEase", function() { return ExpoScaleEase; }); 6512/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RoughEase", function() { return RoughEase; }); 6513/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EasePack", function() { return EasePack; }); 6514/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return EasePack; }); 6515/*! 6516 * EasePack 3.12.5 6517 * https://gsap.com 6518 * 6519 * @license Copyright 2008-2024, GreenSock. All rights reserved. 6520 * Subject to the terms at https://gsap.com/standard-license or for 6521 * Club GSAP members, the agreement issued with that membership. 6522 * @author: Jack Doyle, [email protected] 6523*/ 6524 6525/* eslint-disable */ 6526var gsap, 6527 _coreInitted, 6528 _registerEase, 6529 _getGSAP = function _getGSAP() { 6530 return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 6531}, 6532 _boolean = function _boolean(value, defaultValue) { 6533 return !!(typeof value === "undefined" ? defaultValue : value && !~(value + "").indexOf("false")); 6534}, 6535 _initCore = function _initCore(core) { 6536 gsap = core || _getGSAP(); 6537 6538 if (gsap) { 6539 _registerEase = gsap.registerEase; //add weighted ease capabilities to standard eases so users can do "power2.inOut(0.8)" for example to push everything toward the "out", or (-0.8) to push it toward the "in" (0 is neutral) 6540 6541 var eases = gsap.parseEase(), 6542 createConfig = function createConfig(ease) { 6543 return function (ratio) { 6544 var y = 0.5 + ratio / 2; 6545 6546 ease.config = function (p) { 6547 return ease(2 * (1 - p) * p * y + p * p); 6548 }; 6549 }; 6550 }, 6551 p; 6552 6553 for (p in eases) { 6554 if (!eases[p].config) { 6555 createConfig(eases[p]); 6556 } 6557 } 6558 6559 _registerEase("slow", SlowMo); 6560 6561 _registerEase("expoScale", ExpoScaleEase); 6562 6563 _registerEase("rough", RoughEase); 6564 6565 for (p in EasePack) { 6566 p !== "version" && gsap.core.globals(p, EasePack[p]); 6567 } 6568 6569 _coreInitted = 1; 6570 } 6571}, 6572 _createSlowMo = function _createSlowMo(linearRatio, power, yoyoMode) { 6573 linearRatio = Math.min(1, linearRatio || 0.7); 6574 6575 var pow = linearRatio < 1 ? power || power === 0 ? power : 0.7 : 0, 6576 p1 = (1 - linearRatio) / 2, 6577 p3 = p1 + linearRatio, 6578 calcEnd = _boolean(yoyoMode); 6579 6580 return function (p) { 6581 var r = p + (0.5 - p) * pow; 6582 return p < p1 ? calcEnd ? 1 - (p = 1 - p / p1) * p : r - (p = 1 - p / p1) * p * p * p * r : p > p3 ? calcEnd ? p === 1 ? 0 : 1 - (p = (p - p3) / p1) * p : r + (p - r) * (p = (p - p3) / p1) * p * p * p : calcEnd ? 1 : r; 6583 }; 6584}, 6585 _createExpoScale = function _createExpoScale(start, end, ease) { 6586 var p1 = Math.log(end / start), 6587 p2 = end - start; 6588 ease && (ease = gsap.parseEase(ease)); 6589 return function (p) { 6590 return (start * Math.exp(p1 * (ease ? ease(p) : p)) - start) / p2; 6591 }; 6592}, 6593 EasePoint = function EasePoint(time, value, next) { 6594 this.t = time; 6595 this.v = value; 6596 6597 if (next) { 6598 this.next = next; 6599 next.prev = this; 6600 this.c = next.v - value; 6601 this.gap = next.t - time; 6602 } 6603}, 6604 _createRoughEase = function _createRoughEase(vars) { 6605 if (typeof vars !== "object") { 6606 //users may pass in via a string, like "rough(30)" 6607 vars = { 6608 points: +vars || 20 6609 }; 6610 } 6611 6612 var taper = vars.taper || "none", 6613 a = [], 6614 cnt = 0, 6615 points = (+vars.points || 20) | 0, 6616 i = points, 6617 randomize = _boolean(vars.randomize, true), 6618 clamp = _boolean(vars.clamp), 6619 template = gsap ? gsap.parseEase(vars.template) : 0, 6620 strength = (+vars.strength || 1) * 0.4, 6621 x, 6622 y, 6623 bump, 6624 invX, 6625 obj, 6626 pnt, 6627 recent; 6628 6629 while (--i > -1) { 6630 x = randomize ? Math.random() : 1 / points * i; 6631 y = template ? template(x) : x; 6632 6633 if (taper === "none") { 6634 bump = strength; 6635 } else if (taper === "out") { 6636 invX = 1 - x; 6637 bump = invX * invX * strength; 6638 } else if (taper === "in") { 6639 bump = x * x * strength; 6640 } else if (x < 0.5) { 6641 //"both" (start) 6642 invX = x * 2; 6643 bump = invX * invX * 0.5 * strength; 6644 } else { 6645 //"both" (end) 6646 invX = (1 - x) * 2; 6647 bump = invX * invX * 0.5 * strength; 6648 } 6649 6650 if (randomize) { 6651 y += Math.random() * bump - bump * 0.5; 6652 } else if (i % 2) { 6653 y += bump * 0.5; 6654 } else { 6655 y -= bump * 0.5; 6656 } 6657 6658 if (clamp) { 6659 if (y > 1) { 6660 y = 1; 6661 } else if (y < 0) { 6662 y = 0; 6663 } 6664 } 6665 6666 a[cnt++] = { 6667 x: x, 6668 y: y 6669 }; 6670 } 6671 6672 a.sort(function (a, b) { 6673 return a.x - b.x; 6674 }); 6675 pnt = new EasePoint(1, 1, null); 6676 i = points; 6677 6678 while (i--) { 6679 obj = a[i]; 6680 pnt = new EasePoint(obj.x, obj.y, pnt); 6681 } 6682 6683 recent = new EasePoint(0, 0, pnt.t ? pnt : pnt.next); 6684 return function (p) { 6685 var pnt = recent; 6686 6687 if (p > pnt.t) { 6688 while (pnt.next && p >= pnt.t) { 6689 pnt = pnt.next; 6690 } 6691 6692 pnt = pnt.prev; 6693 } else { 6694 while (pnt.prev && p <= pnt.t) { 6695 pnt = pnt.prev; 6696 } 6697 } 6698 6699 recent = pnt; 6700 return pnt.v + (p - pnt.t) / pnt.gap * pnt.c; 6701 }; 6702}; 6703 6704var SlowMo = _createSlowMo(0.7); 6705SlowMo.ease = SlowMo; //for backward compatibility 6706 6707SlowMo.config = _createSlowMo; 6708var ExpoScaleEase = _createExpoScale(1, 2); 6709ExpoScaleEase.config = _createExpoScale; 6710var RoughEase = _createRoughEase(); 6711RoughEase.ease = RoughEase; //for backward compatibility 6712 6713RoughEase.config = _createRoughEase; 6714var EasePack = { 6715 SlowMo: SlowMo, 6716 RoughEase: RoughEase, 6717 ExpoScaleEase: ExpoScaleEase 6718}; 6719 6720for (var p in EasePack) { 6721 EasePack[p].register = _initCore; 6722 EasePack[p].version = "3.12.5"; 6723} 6724 6725_getGSAP() && gsap.registerPlugin(SlowMo); 6726 6727 6728/***/ }), 6729
vendor: 9,365 bytes, lines 6730-7084
6730/***/ "./node_modules/gsap/EaselPlugin.js": 6731/*!******************************************!*\ 6732 !*** ./node_modules/gsap/EaselPlugin.js ***! 6733 \******************************************/ 6734/*! exports provided: EaselPlugin, default */ 6735/***/ (function(module, __webpack_exports__, __webpack_require__) { 6736 6737"use strict"; 6738__webpack_require__.r(__webpack_exports__); 6739/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EaselPlugin", function() { return EaselPlugin; }); 6740/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return EaselPlugin; }); 6741/*! 6742 * EaselPlugin 3.12.5 6743 * https://gsap.com 6744 * 6745 * @license Copyright 2008-2024, GreenSock. All rights reserved. 6746 * Subject to the terms at https://gsap.com/standard-license or for 6747 * Club GSAP members, the agreement issued with that membership. 6748 * @author: Jack Doyle, [email protected] 6749*/ 6750 6751/* eslint-disable */ 6752var gsap, 6753 _coreInitted, 6754 _win, 6755 _createJS, 6756 _ColorFilter, 6757 _ColorMatrixFilter, 6758 _colorProps = "redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier,redOffset,greenOffset,blueOffset,alphaOffset".split(","), 6759 _windowExists = function _windowExists() { 6760 return typeof window !== "undefined"; 6761}, 6762 _getGSAP = function _getGSAP() { 6763 return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap; 6764}, 6765 _getCreateJS = function _getCreateJS() { 6766 return _createJS || _win && _win.createjs || _win || {}; 6767}, 6768 _warn = function _warn(message) { 6769 return console.warn(message); 6770}, 6771 _cache = function _cache(target) { 6772 var b = target.getBounds && target.getBounds(); 6773 6774 if (!b) { 6775 b = target.nominalBounds || { 6776 x: 0, 6777 y: 0, 6778 width: 100, 6779 height: 100 6780 }; 6781 target.setBounds && target.setBounds(b.x, b.y, b.width, b.height); 6782 } 6783 6784 target.cache && target.cache(b.x, b.y, b.width, b.height); 6785 6786 _warn("EaselPlugin: for filters to display in EaselJS, you must call the object's cache() method first. GSAP attempted to use the target's getBounds() for the cache but that may not be completely accurate. " + target); 6787}, 6788 _parseColorFilter = function _parseColorFilter(target, v, plugin) { 6789 if (!_ColorFilter) { 6790 _ColorFilter = _getCreateJS().ColorFilter; 6791 6792 if (!_ColorFilter) { 6793 _warn("EaselPlugin error: The EaselJS ColorFilter JavaScript file wasn't loaded."); 6794 } 6795 } 6796 6797 var filters = target.filters || [], 6798 i = filters.length, 6799 c, 6800 s, 6801 e, 6802 a, 6803 p, 6804 pt; 6805 6806 while (i--) { 6807 if (filters[i] instanceof _ColorFilter) { 6808 s = filters[i]; 6809 break; 6810 } 6811 } 6812 6813 if (!s) { 6814 s = new _ColorFilter(); 6815 filters.push(s); 6816 target.filters = filters; 6817 } 6818 6819 e = s.clone(); 6820 6821 if (v.tint != null) { 6822 c = gsap.utils.splitColor(v.tint); 6823 a = v.tintAmount != null ? +v.tintAmount : 1; 6824 e.redOffset = +c[0] * a; 6825 e.greenOffset = +c[1] * a; 6826 e.blueOffset = +c[2] * a; 6827 e.redMultiplier = e.greenMultiplier = e.blueMultiplier = 1 - a; 6828 } else { 6829 for (p in v) { 6830 if (p !== "exposure") if (p !== "brightness") { 6831 e[p] = +v[p]; 6832 } 6833 } 6834 } 6835 6836 if (v.exposure != null) { 6837 e.redOffset = e.greenOffset = e.blueOffset = 255 * (+v.exposure - 1); 6838 e.redMultiplier = e.greenMultiplier = e.blueMultiplier = 1; 6839 } else if (v.brightness != null) { 6840 a = +v.brightness - 1; 6841 e.redOffset = e.greenOffset = e.blueOffset = a > 0 ? a * 255 : 0; 6842 e.redMultiplier = e.greenMultiplier = e.blueMultiplier = 1 - Math.abs(a); 6843 } 6844 6845 i = 8; 6846 6847 while (i--) { 6848 p = _colorProps[i]; 6849 6850 if (s[p] !== e[p]) { 6851 pt = plugin.add(s, p, s[p], e[p], 0, 0, 0, 0, 0, 1); 6852 6853 if (pt) { 6854 pt.op = "easel_colorFilter"; 6855 } 6856 } 6857 } 6858 6859 plugin._props.push("easel_colorFilter"); 6860 6861 if (!target.cacheID) { 6862 _cache(target); 6863 } 6864}, 6865 _idMatrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], 6866 _lumR = 0.212671, 6867 _lumG = 0.715160, 6868 _lumB = 0.072169, 6869 _applyMatrix = function _applyMatrix(m, m2) { 6870 if (!(m instanceof Array) || !(m2 instanceof Array)) { 6871 return m2; 6872 } 6873 6874 var temp = [], 6875 i = 0, 6876 z = 0, 6877 y, 6878 x; 6879 6880 for (y = 0; y < 4; y++) { 6881 for (x = 0; x < 5; x++) { 6882 z = x === 4 ? m[i + 4] : 0; 6883 temp[i + x] = m[i] * m2[x] + m[i + 1] * m2[x + 5] + m[i + 2] * m2[x + 10] + m[i + 3] * m2[x + 15] + z; 6884 } 6885 6886 i += 5; 6887 } 6888 6889 return temp; 6890}, 6891 _setSaturation = function _setSaturation(m, n) { 6892 if (isNaN(n)) { 6893 return m; 6894 } 6895 6896 var inv = 1 - n, 6897 r = inv * _lumR, 6898 g = inv * _lumG, 6899 b = inv * _lumB; 6900 return _applyMatrix([r + n, g, b, 0, 0, r, g + n, b, 0, 0, r, g, b + n, 0, 0, 0, 0, 0, 1, 0], m); 6901}, 6902 _colorize = function _colorize(m, color, amount) { 6903 if (isNaN(amount)) { 6904 amount = 1; 6905 } 6906 6907 var c = gsap.utils.splitColor(color), 6908 r = c[0] / 255, 6909 g = c[1] / 255, 6910 b = c[2] / 255, 6911 inv = 1 - amount; 6912 return _applyMatrix([inv + amount * r * _lumR, amount * r * _lumG, amount * r * _lumB, 0, 0, amount * g * _lumR, inv + amount * g * _lumG, amount * g * _lumB, 0, 0, amount * b * _lumR, amount * b * _lumG, inv + amount * b * _lumB, 0, 0, 0, 0, 0, 1, 0], m); 6913}, 6914 _setHue = function _setHue(m, n) { 6915 if (isNaN(n)) { 6916 return m; 6917 } 6918 6919 n *= Math.PI / 180; 6920 var c = Math.cos(n), 6921 s = Math.sin(n); 6922 return _applyMatrix([_lumR + c * (1 - _lumR) + s * -_lumR, _lumG + c * -_lumG + s * -_lumG, _lumB + c * -_lumB + s * (1 - _lumB), 0, 0, _lumR + c * -_lumR + s * 0.143, _lumG + c * (1 - _lumG) + s * 0.14, _lumB + c * -_lumB + s * -0.283, 0, 0, _lumR + c * -_lumR + s * -(1 - _lumR), _lumG + c * -_lumG + s * _lumG, _lumB + c * (1 - _lumB) + s * _lumB, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], m); 6923}, 6924 _setContrast = function _setContrast(m, n) { 6925 if (isNaN(n)) { 6926 return m; 6927 } 6928 6929 n += 0.01; 6930 return _applyMatrix([n, 0, 0, 0, 128 * (1 - n), 0, n, 0, 0, 128 * (1 - n), 0, 0, n, 0, 128 * (1 - n), 0, 0, 0, 1, 0], m); 6931}, 6932 _parseColorMatrixFilter = function _parseColorMatrixFilter(target, v, plugin) { 6933 if (!_ColorMatrixFilter) { 6934 _ColorMatrixFilter = _getCreateJS().ColorMatrixFilter; 6935 6936 if (!_ColorMatrixFilter) { 6937 _warn("EaselPlugin: The EaselJS ColorMatrixFilter JavaScript file wasn't loaded."); 6938 } 6939 } 6940 6941 var filters = target.filters || [], 6942 i = filters.length, 6943 matrix, 6944 startMatrix, 6945 s, 6946 pg; 6947 6948 while (--i > -1) { 6949 if (filters[i] instanceof _ColorMatrixFilter) { 6950 s = filters[i]; 6951 break; 6952 } 6953 } 6954 6955 if (!s) { 6956 s = new _ColorMatrixFilter(_idMatrix.slice()); 6957 filters.push(s); 6958 target.filters = filters; 6959 } 6960 6961 startMatrix = s.matrix; 6962 matrix = _idMatrix.slice(); 6963 6964 if (v.colorize != null) { 6965 matrix = _colorize(matrix, v.colorize, Number(v.colorizeAmount)); 6966 } 6967 6968 if (v.contrast != null) { 6969 matrix = _setContrast(matrix, Number(v.contrast)); 6970 } 6971 6972 if (v.hue != null) { 6973 matrix = _setHue(matrix, Number(v.hue)); 6974 } 6975 6976 if (v.saturation != null) { 6977 matrix = _setSaturation(matrix, Number(v.saturation)); 6978 } 6979 6980 i = matrix.length; 6981 6982 while (--i > -1) { 6983 if (matrix[i] !== startMatrix[i]) { 6984 pg = plugin.add(startMatrix, i, startMatrix[i], matrix[i], 0, 0, 0, 0, 0, 1); 6985 6986 if (pg) { 6987 pg.op = "easel_colorMatrixFilter"; 6988 } 6989 } 6990 } 6991 6992 plugin._props.push("easel_colorMatrixFilter"); 6993 6994 if (!target.cacheID) { 6995 _cache(); 6996 } 6997 6998 plugin._matrix = startMatrix; 6999}, 7000 _initCore = function _initCore(core) { 7001 gsap = core || _getGSAP(); 7002 7003 if (_windowExists()) { 7004 _win = window; 7005 } 7006 7007 if (gsap) { 7008 _coreInitted = 1; 7009 } 7010}; 7011 7012var EaselPlugin = { 7013 version: "3.12.5", 7014 name: "easel", 7015 init: function init(target, value, tween, index, targets) { 7016 if (!_coreInitted) { 7017 _initCore(); 7018 7019 if (!gsap) { 7020 _warn("Please gsap.registerPlugin(EaselPlugin)"); 7021 } 7022 } 7023 7024 this.target = target; 7025 var p, pt, tint, colorMatrix, end, labels, i; 7026 7027 for (p in value) { 7028 end = value[p]; 7029 7030 if (p === "colorFilter" || p === "tint" || p === "tintAmount" || p === "exposure" || p === "brightness") { 7031 if (!tint) { 7032 _parseColorFilter(target, value.colorFilter || value, this); 7033 7034 tint = true; 7035 } 7036 } else if (p === "saturation" || p === "contrast" || p === "hue" || p === "colorize" || p === "colorizeAmount") { 7037 if (!colorMatrix) { 7038 _parseColorMatrixFilter(target, value.colorMatrixFilter || value, this); 7039 7040 colorMatrix = true; 7041 } 7042 } else if (p === "frame") { 7043 if (typeof end === "string" && end.charAt(1) !== "=" && (labels = target.labels)) { 7044 for (i = 0; i < labels.length; i++) { 7045 if (labels[i].label === end) { 7046 end = labels[i].position; 7047 } 7048 } 7049 } 7050 7051 pt = this.add(target, "gotoAndStop", target.currentFrame, end, index, targets, Math.round, 0, 0, 1); 7052 7053 if (pt) { 7054 pt.op = p; 7055 } 7056 } else if (target[p] != null) { 7057 this.add(target, p, "get", end); 7058 } 7059 } 7060 }, 7061 render: function render(ratio, data) { 7062 var pt = data._pt; 7063 7064 while (pt) { 7065 pt.r(ratio, pt.d); 7066 pt = pt._next; 7067 } 7068 7069 if (data.target.cacheID) { 7070 data.target.updateCache(); 7071 } 7072 }, 7073 register: _initCore 7074}; 7075 7076EaselPlugin.registerCreateJS = function (createjs) { 7077 _createJS = createjs; 7078}; 7079 7080_getGSAP() && gsap.registerPlugin(EaselPlugin); 7081 7082 7083/***/ }), 7084
vendor: 49,046 bytes, lines 7085-8617
7085/***/ "./node_modules/gsap/Flip.js": 7086/*!***********************************!*\ 7087 !*** ./node_modules/gsap/Flip.js ***! 7088 \***********************************/ 7089/*! exports provided: Flip, default */ 7090/***/ (function(module, __webpack_exports__, __webpack_require__) { 7091 7092"use strict"; 7093__webpack_require__.r(__webpack_exports__); 7094/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Flip", function() { return Flip; }); 7095/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Flip; }); 7096/* harmony import */ var _utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/matrix.js */ "./node_modules/gsap/utils/matrix.js"); 7097/*! 7098 * Flip 3.12.5 7099 * https://gsap.com 7100 * 7101 * @license Copyright 2008-2024, GreenSock. All rights reserved. 7102 * Subject to the terms at https://gsap.com/standard-license or for 7103 * Club GSAP members, the agreement issued with that membership. 7104 * @author: Jack Doyle, [email protected] 7105*/ 7106 7107/* eslint-disable */ 7108 7109 7110var _id = 1, 7111 _toArray, 7112 gsap, 7113 _batch, 7114 _batchAction, 7115 _body, 7116 _closestTenth, 7117 _getStyleSaver, 7118 _forEachBatch = function _forEachBatch(batch, name) { 7119 return batch.actions.forEach(function (a) { 7120 return a.vars[name] && a.vars[name](a); 7121 }); 7122}, 7123 _batchLookup = {}, 7124 _RAD2DEG = 180 / Math.PI, 7125 _DEG2RAD = Math.PI / 180, 7126 _emptyObj = {}, 7127 _dashedNameLookup = {}, 7128 _memoizedRemoveProps = {}, 7129 _listToArray = function _listToArray(list) { 7130 return typeof list === "string" ? list.split(" ").join("").split(",") : list; 7131}, 7132 // removes extra spaces contaminating the names, returns an Array. 7133_callbacks = _listToArray("onStart,onUpdate,onComplete,onReverseComplete,onInterrupt"), 7134 _removeProps = _listToArray("transform,transformOrigin,width,height,position,top,left,opacity,zIndex,maxWidth,maxHeight,minWidth,minHeight"), 7135 _getEl = function _getEl(target) { 7136 return _toArray(target)[0] || console.warn("Element not found:", target); 7137}, 7138 _round = function _round(value) { 7139 return Math.round(value * 10000) / 10000 || 0; 7140}, 7141 _toggleClass = function _toggleClass(targets, className, action) { 7142 return targets.forEach(function (el) { 7143 return el.classList[action](className); 7144 }); 7145}, 7146 _reserved = { 7147 zIndex: 1, 7148 kill: 1, 7149 simple: 1, 7150 spin: 1, 7151 clearProps: 1, 7152 targets: 1, 7153 toggleClass: 1, 7154 onComplete: 1, 7155 onUpdate: 1, 7156 onInterrupt: 1, 7157 onStart: 1, 7158 delay: 1, 7159 repeat: 1, 7160 repeatDelay: 1, 7161 yoyo: 1, 7162 scale: 1, 7163 fade: 1, 7164 absolute: 1, 7165 props: 1, 7166 onEnter: 1, 7167 onLeave: 1, 7168 custom: 1, 7169 paused: 1, 7170 nested: 1, 7171 prune: 1, 7172 absoluteOnLeave: 1 7173}, 7174 _fitReserved = { 7175 zIndex: 1, 7176 simple: 1, 7177 clearProps: 1, 7178 scale: 1, 7179 absolute: 1, 7180 fitChild: 1, 7181 getVars: 1, 7182 props: 1 7183}, 7184 _camelToDashed = function _camelToDashed(p) { 7185 return p.replace(/([A-Z])/g, "-$1").toLowerCase(); 7186}, 7187 _copy = function _copy(obj, exclude) { 7188 var result = {}, 7189 p; 7190 7191 for (p in obj) { 7192 exclude[p] || (result[p] = obj[p]); 7193 } 7194 7195 return result; 7196}, 7197 _memoizedProps = {}, 7198 _memoizeProps = function _memoizeProps(props) { 7199 var p = _memoizedProps[props] = _listToArray(props); 7200 7201 _memoizedRemoveProps[props] = p.concat(_removeProps); 7202 return p; 7203}, 7204 _getInverseGlobalMatrix = function _getInverseGlobalMatrix(el) { 7205 // integrates caching for improved performance 7206 var cache = el._gsap || gsap.core.getCache(el); 7207 7208 if (cache.gmCache === gsap.ticker.frame) { 7209 return cache.gMatrix; 7210 } 7211 7212 cache.gmCache = gsap.ticker.frame; 7213 return cache.gMatrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(el, true, false, true); 7214}, 7215 _getDOMDepth = function _getDOMDepth(el, invert, level) { 7216 if (level === void 0) { 7217 level = 0; 7218 } 7219 7220 // In invert is true, the sibling depth is increments of 1, and parent/nesting depth is increments of 1000. This lets us order elements in an Array to reflect document flow. 7221 var parent = el.parentNode, 7222 inc = 1000 * Math.pow(10, level) * (invert ? -1 : 1), 7223 l = invert ? -inc * 900 : 0; 7224 7225 while (el) { 7226 l += inc; 7227 el = el.previousSibling; 7228 } 7229 7230 return parent ? l + _getDOMDepth(parent, invert, level + 1) : l; 7231}, 7232 _orderByDOMDepth = function _orderByDOMDepth(comps, invert, isElStates) { 7233 comps.forEach(function (comp) { 7234 return comp.d = _getDOMDepth(isElStates ? comp.element : comp.t, invert); 7235 }); 7236 comps.sort(function (c1, c2) { 7237 return c1.d - c2.d; 7238 }); 7239 return comps; 7240}, 7241 _recordInlineStyles = function _recordInlineStyles(elState, props) { 7242 // records the current inline CSS properties into an Array in alternating name/value pairs that's stored in a "css" property on the state object so that we can revert later. 7243 var style = elState.element.style, 7244 a = elState.css = elState.css || [], 7245 i = props.length, 7246 p, 7247 v; 7248 7249 while (i--) { 7250 p = props[i]; 7251 v = style[p] || style.getPropertyValue(p); 7252 a.push(v ? p : _dashedNameLookup[p] || (_dashedNameLookup[p] = _camelToDashed(p)), v); 7253 } 7254 7255 return style; 7256}, 7257 _applyInlineStyles = function _applyInlineStyles(state) { 7258 var css = state.css, 7259 style = state.element.style, 7260 i = 0; 7261 state.cache.uncache = 1; 7262 7263 for (; i < css.length; i += 2) { 7264 css[i + 1] ? style[css[i]] = css[i + 1] : style.removeProperty(css[i]); 7265 } 7266 7267 if (!css[css.indexOf("transform") + 1] && style.translate) { 7268 // CSSPlugin adds scale, translate, and rotate inline CSS as "none" in order to keep CSS rules from contaminating transforms. 7269 style.removeProperty("translate"); 7270 style.removeProperty("scale"); 7271 style.removeProperty("rotate"); 7272 } 7273}, 7274 _setFinalStates = function _setFinalStates(comps, onlyTransforms) { 7275 comps.forEach(function (c) { 7276 return c.a.cache.uncache = 1; 7277 }); 7278 onlyTransforms || comps.finalStates.forEach(_applyInlineStyles); 7279}, 7280 _absoluteProps = "paddingTop,paddingRight,paddingBottom,paddingLeft,gridArea,transition".split(","), 7281 // properties that we must record just 7282_makeAbsolute = function _makeAbsolute(elState, fallbackNode, ignoreBatch) { 7283 var element = elState.element, 7284 width = elState.width, 7285 height = elState.height, 7286 uncache = elState.uncache, 7287 getProp = elState.getProp, 7288 style = element.style, 7289 i = 4, 7290 result, 7291 displayIsNone, 7292 cs; 7293 typeof fallbackNode !== "object" && (fallbackNode = elState); 7294 7295 if (_batch && ignoreBatch !== 1) { 7296 _batch._abs.push({ 7297 t: element, 7298 b: elState, 7299 a: elState, 7300 sd: 0 7301 }); 7302 7303 _batch._final.push(function () { 7304 return (elState.cache.uncache = 1) && _applyInlineStyles(elState); 7305 }); 7306 7307 return element; 7308 } 7309 7310 displayIsNone = getProp("display") === "none"; 7311 7312 if (!elState.isVisible || displayIsNone) { 7313 displayIsNone && (_recordInlineStyles(elState, ["display"]).display = fallbackNode.display); 7314 elState.matrix = fallbackNode.matrix; 7315 elState.width = width = elState.width || fallbackNode.width; 7316 elState.height = height = elState.height || fallbackNode.height; 7317 } 7318 7319 _recordInlineStyles(elState, _absoluteProps); 7320 7321 cs = window.getComputedStyle(element); 7322 7323 while (i--) { 7324 style[_absoluteProps[i]] = cs[_absoluteProps[i]]; // record paddings as px-based because if removed from grid, percentage-based ones could be altered. 7325 } 7326 7327 style.gridArea = "1 / 1 / 1 / 1"; 7328 style.transition = "none"; 7329 style.position = "absolute"; 7330 style.width = width + "px"; 7331 style.height = height + "px"; 7332 style.top || (style.top = "0px"); 7333 style.left || (style.left = "0px"); 7334 7335 if (uncache) { 7336 result = new ElementState(element); 7337 } else { 7338 // better performance 7339 result = _copy(elState, _emptyObj); 7340 result.position = "absolute"; 7341 7342 if (elState.simple) { 7343 var bounds = element.getBoundingClientRect(); 7344 result.matrix = new _utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"](1, 0, 0, 1, bounds.left + Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["_getDocScrollLeft"])(), bounds.top + Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["_getDocScrollTop"])()); 7345 } else { 7346 result.matrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(element, false, false, true); 7347 } 7348 } 7349 7350 result = _fit(result, elState, true); 7351 elState.x = _closestTenth(result.x, 0.01); 7352 elState.y = _closestTenth(result.y, 0.01); 7353 return element; 7354}, 7355 _filterComps = function _filterComps(comps, targets) { 7356 if (targets !== true) { 7357 targets = _toArray(targets); 7358 comps = comps.filter(function (c) { 7359 if (targets.indexOf((c.sd < 0 ? c.b : c.a).element) !== -1) { 7360 return true; 7361 } else { 7362 c.t._gsap.renderTransform(1); // we must force transforms to render on anything that isn't being made position: absolute, otherwise the absolute position happens and then when animation begins it applies transforms which can create a new stacking context, throwing off positioning! 7363 7364 7365 if (c.b.isVisible) { 7366 c.t.style.width = c.b.width + "px"; // otherwise things can collapse when contents are made position: absolute. 7367 7368 c.t.style.height = c.b.height + "px"; 7369 } 7370 } 7371 }); 7372 } 7373 7374 return comps; 7375}, 7376 _makeCompsAbsolute = function _makeCompsAbsolute(comps) { 7377 return _orderByDOMDepth(comps, true).forEach(function (c) { 7378 return (c.a.isVisible || c.b.isVisible) && _makeAbsolute(c.sd < 0 ? c.b : c.a, c.b, 1); 7379 }); 7380}, 7381 _findElStateInState = function _findElStateInState(state, other) { 7382 return other && state.idLookup[_parseElementState(other).id] || state.elementStates[0]; 7383}, 7384 _parseElementState = function _parseElementState(elOrNode, props, simple, other) { 7385 return elOrNode instanceof ElementState ? elOrNode : elOrNode instanceof FlipState ? _findElStateInState(elOrNode, other) : new ElementState(typeof elOrNode === "string" ? _getEl(elOrNode) || console.warn(elOrNode + " not found") : elOrNode, props, simple); 7386}, 7387 _recordProps = function _recordProps(elState, props) { 7388 var getProp = gsap.getProperty(elState.element, null, "native"), 7389 obj = elState.props = {}, 7390 i = props.length; 7391 7392 while (i--) { 7393 obj[props[i]] = (getProp(props[i]) + "").trim(); 7394 } 7395 7396 obj.zIndex && (obj.zIndex = parseFloat(obj.zIndex) || 0); 7397 return elState; 7398}, 7399 _applyProps = function _applyProps(element, props) { 7400 var style = element.style || element, 7401 // could pass in a vars object. 7402 p; 7403 7404 for (p in props) { 7405 style[p] = props[p]; 7406 } 7407}, 7408 _getID = function _getID(el) { 7409 var id = el.getAttribute("data-flip-id"); 7410 id || el.setAttribute("data-flip-id", id = "auto-" + _id++); 7411 return id; 7412}, 7413 _elementsFromElementStates = function _elementsFromElementStates(elStates) { 7414 return elStates.map(function (elState) { 7415 return elState.element; 7416 }); 7417}, 7418 _handleCallback = function _handleCallback(callback, elStates, tl) { 7419 return callback && elStates.length && tl.add(callback(_elementsFromElementStates(elStates), tl, new FlipState(elStates, 0, true)), 0); 7420}, 7421 _fit = function _fit(fromState, toState, scale, applyProps, fitChild, vars) { 7422 var element = fromState.element, 7423 cache = fromState.cache, 7424 parent = fromState.parent, 7425 x = fromState.x, 7426 y = fromState.y, 7427 width = toState.width, 7428 height = toState.height, 7429 scaleX = toState.scaleX, 7430 scaleY = toState.scaleY, 7431 rotation = toState.rotation, 7432 bounds = toState.bounds, 7433 styles = vars && _getStyleSaver && _getStyleSaver(element, "transform"), 7434 dimensionState = fromState, 7435 _toState$matrix = toState.matrix, 7436 e = _toState$matrix.e, 7437 f = _toState$matrix.f, 7438 deep = fromState.bounds.width !== bounds.width || fromState.bounds.height !== bounds.height || fromState.scaleX !== scaleX || fromState.scaleY !== scaleY || fromState.rotation !== rotation, 7439 simple = !deep && fromState.simple && toState.simple && !fitChild, 7440 skewX, 7441 fromPoint, 7442 toPoint, 7443 getProp, 7444 parentMatrix, 7445 matrix, 7446 bbox; 7447 7448 if (simple || !parent) { 7449 scaleX = scaleY = 1; 7450 rotation = skewX = 0; 7451 } else { 7452 parentMatrix = _getInverseGlobalMatrix(parent); 7453 matrix = parentMatrix.clone().multiply(toState.ctm ? toState.matrix.clone().multiply(toState.ctm) : toState.matrix); // root SVG elements have a ctm that we must factor out (for example, viewBox:"0 0 94 94" with a width of 200px would scale the internals by 2.127 but when we're matching the size of the root <svg> element itself, that scaling shouldn't factor in!) 7454 7455 rotation = _round(Math.atan2(matrix.b, matrix.a) * _RAD2DEG); 7456 skewX = _round(Math.atan2(matrix.c, matrix.d) * _RAD2DEG + rotation) % 360; // in very rare cases, minor rounding might end up with 360 which should be 0. 7457 7458 scaleX = Math.sqrt(Math.pow(matrix.a, 2) + Math.pow(matrix.b, 2)); 7459 scaleY = Math.sqrt(Math.pow(matrix.c, 2) + Math.pow(matrix.d, 2)) * Math.cos(skewX * _DEG2RAD); 7460 7461 if (fitChild) { 7462 fitChild = _toArray(fitChild)[0]; 7463 getProp = gsap.getProperty(fitChild); 7464 bbox = fitChild.getBBox && typeof fitChild.getBBox === "function" && fitChild.getBBox(); 7465 dimensionState = { 7466 scaleX: getProp("scaleX"), 7467 scaleY: getProp("scaleY"), 7468 width: bbox ? bbox.width : Math.ceil(parseFloat(getProp("width", "px"))), 7469 height: bbox ? bbox.height : parseFloat(getProp("height", "px")) 7470 }; 7471 } 7472 7473 cache.rotation = rotation + "deg"; 7474 cache.skewX = skewX + "deg"; 7475 } 7476 7477 if (scale) { 7478 scaleX *= width === dimensionState.width || !dimensionState.width ? 1 : width / dimensionState.width; // note if widths are both 0, we should make scaleX 1 - some elements have box-sizing that incorporates padding, etc. and we don't want it to collapse in that case. 7479 7480 scaleY *= height === dimensionState.height || !dimensionState.height ? 1 : height / dimensionState.height; 7481 cache.scaleX = scaleX; 7482 cache.scaleY = scaleY; 7483 } else { 7484 width = _closestTenth(width * scaleX / dimensionState.scaleX, 0); 7485 height = _closestTenth(height * scaleY / dimensionState.scaleY, 0); 7486 element.style.width = width + "px"; 7487 element.style.height = height + "px"; 7488 } // if (fromState.isFixed) { // commented out because it's now taken care of in getGlobalMatrix() with a flag at the end. 7489 // e -= _getDocScrollLeft(); 7490 // f -= _getDocScrollTop(); 7491 // } 7492 7493 7494 applyProps && _applyProps(element, toState.props); 7495 7496 if (simple || !parent) { 7497 x += e - fromState.matrix.e; 7498 y += f - fromState.matrix.f; 7499 } else if (deep || parent !== toState.parent) { 7500 cache.renderTransform(1, cache); 7501 matrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(fitChild || element, false, false, true); 7502 fromPoint = parentMatrix.apply({ 7503 x: matrix.e, 7504 y: matrix.f 7505 }); 7506 toPoint = parentMatrix.apply({ 7507 x: e, 7508 y: f 7509 }); 7510 x += toPoint.x - fromPoint.x; 7511 y += toPoint.y - fromPoint.y; 7512 } else { 7513 // use a faster/cheaper algorithm if we're just moving x/y 7514 parentMatrix.e = parentMatrix.f = 0; 7515 toPoint = parentMatrix.apply({ 7516 x: e - fromState.matrix.e, 7517 y: f - fromState.matrix.f 7518 }); 7519 x += toPoint.x; 7520 y += toPoint.y; 7521 } 7522 7523 x = _closestTenth(x, 0.02); 7524 y = _closestTenth(y, 0.02); 7525 7526 if (vars && !(vars instanceof ElementState)) { 7527 // revert 7528 styles && styles.revert(); 7529 } else { 7530 // or apply the transform immediately 7531 cache.x = x + "px"; 7532 cache.y = y + "px"; 7533 cache.renderTransform(1, cache); 7534 } 7535 7536 if (vars) { 7537 vars.x = x; 7538 vars.y = y; 7539 vars.rotation = rotation; 7540 vars.skewX = skewX; 7541 7542 if (scale) { 7543 vars.scaleX = scaleX; 7544 vars.scaleY = scaleY; 7545 } else { 7546 vars.width = width; 7547 vars.height = height; 7548 } 7549 } 7550 7551 return vars || cache; 7552}, 7553 _parseState = function _parseState(targetsOrState, vars) { 7554 return targetsOrState instanceof FlipState ? targetsOrState : new FlipState(targetsOrState, vars); 7555}, 7556 _getChangingElState = function _getChangingElState(toState, fromState, id) { 7557 var to1 = toState.idLookup[id], 7558 to2 = toState.alt[id]; 7559 return to2.isVisible && (!(fromState.getElementState(to2.element) || to2).isVisible || !to1.isVisible) ? to2 : to1; 7560}, 7561 _bodyMetrics = [], 7562 _bodyProps = "width,height,overflowX,overflowY".split(","), 7563 _bodyLocked, 7564 _lockBodyScroll = function _lockBodyScroll(lock) { 7565 // if there's no scrollbar, we should lock that so that measurements don't get affected by temporary repositioning, like if something is centered in the window. 7566 if (lock !== _bodyLocked) { 7567 var s = _body.style, 7568 w = _body.clientWidth === window.outerWidth, 7569 h = _body.clientHeight === window.outerHeight, 7570 i = 4; 7571 7572 if (lock && (w || h)) { 7573 while (i--) { 7574 _bodyMetrics[i] = s[_bodyProps[i]]; 7575 } 7576 7577 if (w) { 7578 s.width = _body.clientWidth + "px"; 7579 s.overflowY = "hidden"; 7580 } 7581 7582 if (h) { 7583 s.height = _body.clientHeight + "px"; 7584 s.overflowX = "hidden"; 7585 } 7586 7587 _bodyLocked = lock; 7588 } else if (_bodyLocked) { 7589 while (i--) { 7590 _bodyMetrics[i] ? s[_bodyProps[i]] = _bodyMetrics[i] : s.removeProperty(_camelToDashed(_bodyProps[i])); 7591 } 7592 7593 _bodyLocked = lock; 7594 } 7595 } 7596}, 7597 _fromTo = function _fromTo(fromState, toState, vars, relative) { 7598 // relative is -1 if "from()", and 1 if "to()" 7599 fromState instanceof FlipState && toState instanceof FlipState || console.warn("Not a valid state object."); 7600 vars = vars || {}; 7601 7602 var _vars = vars, 7603 clearProps = _vars.clearProps, 7604 onEnter = _vars.onEnter, 7605 onLeave = _vars.onLeave, 7606 absolute = _vars.absolute, 7607 absoluteOnLeave = _vars.absoluteOnLeave, 7608 custom = _vars.custom, 7609 delay = _vars.delay, 7610 paused = _vars.paused, 7611 repeat = _vars.repeat, 7612 repeatDelay = _vars.repeatDelay, 7613 yoyo = _vars.yoyo, 7614 toggleClass = _vars.toggleClass, 7615 nested = _vars.nested, 7616 _zIndex = _vars.zIndex, 7617 scale = _vars.scale, 7618 fade = _vars.fade, 7619 stagger = _vars.stagger, 7620 spin = _vars.spin, 7621 prune = _vars.prune, 7622 props = ("props" in vars ? vars : fromState).props, 7623 tweenVars = _copy(vars, _reserved), 7624 animation = gsap.timeline({ 7625 delay: delay, 7626 paused: paused, 7627 repeat: repeat, 7628 repeatDelay: repeatDelay, 7629 yoyo: yoyo, 7630 data: "isFlip" 7631 }), 7632 remainingProps = tweenVars, 7633 entering = [], 7634 leaving = [], 7635 comps = [], 7636 swapOutTargets = [], 7637 spinNum = spin === true ? 1 : spin || 0, 7638 spinFunc = typeof spin === "function" ? spin : function () { 7639 return spinNum; 7640 }, 7641 interrupted = fromState.interrupted || toState.interrupted, 7642 addFunc = animation[relative !== 1 ? "to" : "from"], 7643 v, 7644 p, 7645 endTime, 7646 i, 7647 el, 7648 comp, 7649 state, 7650 targets, 7651 finalStates, 7652 fromNode, 7653 toNode, 7654 run, 7655 a, 7656 b; //relative || (toState = (new FlipState(toState.targets, {props: props})).fit(toState, scale)); 7657 7658 7659 for (p in toState.idLookup) { 7660 toNode = !toState.alt[p] ? toState.idLookup[p] : _getChangingElState(toState, fromState, p); 7661 el = toNode.element; 7662 fromNode = fromState.idLookup[p]; 7663 fromState.alt[p] && el === fromNode.element && (fromState.alt[p].isVisible || !toNode.isVisible) && (fromNode = fromState.alt[p]); 7664 7665 if (fromNode) { 7666 comp = { 7667 t: el, 7668 b: fromNode, 7669 a: toNode, 7670 sd: fromNode.element === el ? 0 : toNode.isVisible ? 1 : -1 7671 }; 7672 comps.push(comp); 7673 7674 if (comp.sd) { 7675 if (comp.sd < 0) { 7676 comp.b = toNode; 7677 comp.a = fromNode; 7678 } // for swapping elements that got interrupted, we must re-record the inline styles to ensure they're not tainted. Remember, .batch() permits getState() not to force in-progress flips to their end state. 7679 7680 7681 interrupted && _recordInlineStyles(comp.b, props ? _memoizedRemoveProps[props] : _removeProps); 7682 fade && comps.push(comp.swap = { 7683 t: fromNode.element, 7684 b: comp.b, 7685 a: comp.a, 7686 sd: -comp.sd, 7687 swap: comp 7688 }); 7689 } 7690 7691 el._flip = fromNode.element._flip = _batch ? _batch.timeline : animation; 7692 } else if (toNode.isVisible) { 7693 comps.push({ 7694 t: el, 7695 b: _copy(toNode, { 7696 isVisible: 1 7697 }), 7698 a: toNode, 7699 sd: 0, 7700 entering: 1 7701 }); // to include it in the "entering" Array and do absolute positioning if necessary 7702 7703 el._flip = _batch ? _batch.timeline : animation; 7704 } 7705 } 7706 7707 props && (_memoizedProps[props] || _memoizeProps(props)).forEach(function (p) { 7708 return tweenVars[p] = function (i) { 7709 return comps[i].a.props[p]; 7710 }; 7711 }); 7712 comps.finalStates = finalStates = []; 7713 7714 run = function run() { 7715 _orderByDOMDepth(comps); 7716 7717 _lockBodyScroll(true); // otherwise, measurements may get thrown off when things get fit. 7718 // TODO: cache the matrix, especially for parent because it'll probably get reused quite a bit, but lock it to a particular cycle(?). 7719 7720 7721 for (i = 0; i < comps.length; i++) { 7722 comp = comps[i]; 7723 a = comp.a; 7724 b = comp.b; 7725 7726 if (prune && !a.isDifferent(b) && !comp.entering) { 7727 // only flip if things changed! Don't omit it from comps initially because that'd prevent the element from being positioned absolutely (if necessary) 7728 comps.splice(i--, 1); 7729 } else { 7730 el = comp.t; 7731 nested && !(comp.sd < 0) && i && (a.matrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(el, false, false, true)); // moving a parent affects the position of children 7732 7733 if (b.isVisible && a.isVisible) { 7734 if (comp.sd < 0) { 7735 // swapping OUT (swap direction of -1 is out) 7736 state = new ElementState(el, props, fromState.simple); 7737 7738 _fit(state, a, scale, 0, 0, state); 7739 7740 state.matrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(el, false, false, true); 7741 state.css = comp.b.css; 7742 comp.a = a = state; 7743 fade && (el.style.opacity = interrupted ? b.opacity : a.opacity); 7744 stagger && swapOutTargets.push(el); 7745 } else if (comp.sd > 0 && fade) { 7746 // swapping IN (swap direction of 1 is in) 7747 el.style.opacity = interrupted ? a.opacity - b.opacity : "0"; 7748 } 7749 7750 _fit(a, b, scale, props); 7751 } else if (b.isVisible !== a.isVisible) { 7752 // either entering or leaving (one side is invisible) 7753 if (!b.isVisible) { 7754 // entering 7755 a.isVisible && entering.push(a); 7756 comps.splice(i--, 1); 7757 } else if (!a.isVisible) { 7758 // leaving 7759 b.css = a.css; 7760 leaving.push(b); 7761 comps.splice(i--, 1); 7762 absolute && nested && _fit(a, b, scale, props); 7763 } 7764 } 7765 7766 if (!scale) { 7767 el.style.maxWidth = Math.max(a.width, b.width) + "px"; 7768 el.style.maxHeight = Math.max(a.height, b.height) + "px"; 7769 el.style.minWidth = Math.min(a.width, b.width) + "px"; 7770 el.style.minHeight = Math.min(a.height, b.height) + "px"; 7771 } 7772 7773 nested && toggleClass && el.classList.add(toggleClass); 7774 } 7775 7776 finalStates.push(a); 7777 } 7778 7779 var classTargets; 7780 7781 if (toggleClass) { 7782 classTargets = finalStates.map(function (s) { 7783 return s.element; 7784 }); 7785 nested && classTargets.forEach(function (e) { 7786 return e.classList.remove(toggleClass); 7787 }); // there could be a delay, so don't leave the classes applied (we'll do it in a timeline callback) 7788 } 7789 7790 _lockBodyScroll(false); 7791 7792 if (scale) { 7793 tweenVars.scaleX = function (i) { 7794 return comps[i].a.scaleX; 7795 }; 7796 7797 tweenVars.scaleY = function (i) { 7798 return comps[i].a.scaleY; 7799 }; 7800 } else { 7801 tweenVars.width = function (i) { 7802 return comps[i].a.width + "px"; 7803 }; 7804 7805 tweenVars.height = function (i) { 7806 return comps[i].a.height + "px"; 7807 }; 7808 7809 tweenVars.autoRound = vars.autoRound || false; 7810 } 7811 7812 tweenVars.x = function (i) { 7813 return comps[i].a.x + "px"; 7814 }; 7815 7816 tweenVars.y = function (i) { 7817 return comps[i].a.y + "px"; 7818 }; 7819 7820 tweenVars.rotation = function (i) { 7821 return comps[i].a.rotation + (spin ? spinFunc(i, targets[i], targets) * 360 : 0); 7822 }; 7823 7824 tweenVars.skewX = function (i) { 7825 return comps[i].a.skewX; 7826 }; 7827 7828 targets = comps.map(function (c) { 7829 return c.t; 7830 }); 7831 7832 if (_zIndex || _zIndex === 0) { 7833 tweenVars.modifiers = { 7834 zIndex: function zIndex() { 7835 return _zIndex; 7836 } 7837 }; 7838 tweenVars.zIndex = _zIndex; 7839 tweenVars.immediateRender = vars.immediateRender !== false; 7840 } 7841 7842 fade && (tweenVars.opacity = function (i) { 7843 return comps[i].sd < 0 ? 0 : comps[i].sd > 0 ? comps[i].a.opacity : "+=0"; 7844 }); 7845 7846 if (swapOutTargets.length) { 7847 stagger = gsap.utils.distribute(stagger); 7848 var dummyArray = targets.slice(swapOutTargets.length); 7849 7850 tweenVars.stagger = function (i, el) { 7851 return stagger(~swapOutTargets.indexOf(el) ? targets.indexOf(comps[i].swap.t) : i, el, dummyArray); 7852 }; 7853 } // // for testing... 7854 // gsap.delayedCall(vars.data ? 50 : 1, function() { 7855 // animation.eventCallback("onComplete", () => _setFinalStates(comps, !clearProps)); 7856 // addFunc.call(animation, targets, tweenVars, 0).play(); 7857 // }); 7858 // return; 7859 7860 7861 _callbacks.forEach(function (name) { 7862 return vars[name] && animation.eventCallback(name, vars[name], vars[name + "Params"]); 7863 }); // apply callbacks to the timeline, not tweens (because "custom" timing can make multiple tweens) 7864 7865 7866 if (custom && targets.length) { 7867 // bust out the custom properties as their own tweens so they can use different eases, durations, etc. 7868 remainingProps = _copy(tweenVars, _reserved); 7869 7870 if ("scale" in custom) { 7871 custom.scaleX = custom.scaleY = custom.scale; 7872 delete custom.scale; 7873 } 7874 7875 for (p in custom) { 7876 v = _copy(custom[p], _fitReserved); 7877 v[p] = tweenVars[p]; 7878 !("duration" in v) && "duration" in tweenVars && (v.duration = tweenVars.duration); 7879 v.stagger = tweenVars.stagger; 7880 addFunc.call(animation, targets, v, 0); 7881 delete remainingProps[p]; 7882 } 7883 } 7884 7885 if (targets.length || leaving.length || entering.length) { 7886 toggleClass && animation.add(function () { 7887 return _toggleClass(classTargets, toggleClass, animation._zTime < 0 ? "remove" : "add"); 7888 }, 0) && !paused && _toggleClass(classTargets, toggleClass, "add"); 7889 targets.length && addFunc.call(animation, targets, remainingProps, 0); 7890 } 7891 7892 _handleCallback(onEnter, entering, animation); 7893 7894 _handleCallback(onLeave, leaving, animation); 7895 7896 var batchTl = _batch && _batch.timeline; 7897 7898 if (batchTl) { 7899 batchTl.add(animation, 0); 7900 7901 _batch._final.push(function () { 7902 return _setFinalStates(comps, !clearProps); 7903 }); 7904 } 7905 7906 endTime = animation.duration(); 7907 animation.call(function () { 7908 var forward = animation.time() >= endTime; 7909 forward && !batchTl && _setFinalStates(comps, !clearProps); 7910 toggleClass && _toggleClass(classTargets, toggleClass, forward ? "remove" : "add"); 7911 }); 7912 }; 7913 7914 absoluteOnLeave && (absolute = comps.filter(function (comp) { 7915 return !comp.sd && !comp.a.isVisible && comp.b.isVisible; 7916 }).map(function (comp) { 7917 return comp.a.element; 7918 })); 7919 7920 if (_batch) { 7921 var _batch$_abs; 7922 7923 absolute && (_batch$_abs = _batch._abs).push.apply(_batch$_abs, _filterComps(comps, absolute)); 7924 7925 _batch._run.push(run); 7926 } else { 7927 absolute && _makeCompsAbsolute(_filterComps(comps, absolute)); // when making absolute, we must go in a very particular order so that document flow changes don't affect things. Don't make it visible if both the before and after states are invisible! There's no point, and it could make things appear visible during the flip that shouldn't be. 7928 7929 run(); 7930 } 7931 7932 var anim = _batch ? _batch.timeline : animation; 7933 7934 anim.revert = function () { 7935 return _killFlip(anim, 1, 1); 7936 }; // a Flip timeline should behave very different when reverting - it should actually jump to the end so that styles get cleared out. 7937 7938 7939 return anim; 7940}, 7941 _interrupt = function _interrupt(tl) { 7942 tl.vars.onInterrupt && tl.vars.onInterrupt.apply(tl, tl.vars.onInterruptParams || []); 7943 tl.getChildren(true, false, true).forEach(_interrupt); 7944}, 7945 _killFlip = function _killFlip(tl, action, force) { 7946 // action: 0 = nothing, 1 = complete, 2 = only kill (don't complete) 7947 if (tl && tl.progress() < 1 && (!tl.paused() || force)) { 7948 if (action) { 7949 _interrupt(tl); 7950 7951 action < 2 && tl.progress(1); // we should also kill it in case it was added to a parent timeline. 7952 7953 tl.kill(); 7954 } 7955 7956 return true; 7957 } 7958}, 7959 _createLookup = function _createLookup(state) { 7960 var lookup = state.idLookup = {}, 7961 alt = state.alt = {}, 7962 elStates = state.elementStates, 7963 i = elStates.length, 7964 elState; 7965 7966 while (i--) { 7967 elState = elStates[i]; 7968 lookup[elState.id] ? alt[elState.id] = elState : lookup[elState.id] = elState; 7969 } 7970}; 7971 7972var FlipState = /*#__PURE__*/function () { 7973 function FlipState(targets, vars, targetsAreElementStates) { 7974 this.props = vars && vars.props; 7975 this.simple = !!(vars && vars.simple); 7976 7977 if (targetsAreElementStates) { 7978 this.targets = _elementsFromElementStates(targets); 7979 this.elementStates = targets; 7980 7981 _createLookup(this); 7982 } else { 7983 this.targets = _toArray(targets); 7984 var soft = vars && (vars.kill === false || vars.batch && !vars.kill); 7985 _batch && !soft && _batch._kill.push(this); 7986 this.update(soft || !!_batch); // when batching, don't force in-progress flips to their end; we need to do that AFTER all getStates() are called. 7987 } 7988 } 7989 7990 var _proto = FlipState.prototype; 7991 7992 _proto.update = function update(soft) { 7993 var _this = this; 7994 7995 this.elementStates = this.targets.map(function (el) { 7996 return new ElementState(el, _this.props, _this.simple); 7997 }); 7998 7999 _createLookup(this); 8000 8001 this.interrupt(soft); 8002 this.recordInlineStyles(); 8003 return this; 8004 }; 8005 8006 _proto.clear = function clear() { 8007 this.targets.length = this.elementStates.length = 0; 8008 8009 _createLookup(this); 8010 8011 return this; 8012 }; 8013 8014 _proto.fit = function fit(state, scale, nested) { 8015 var elStatesInOrder = _orderByDOMDepth(this.elementStates.slice(0), false, true), 8016 toElStates = (state || this).idLookup, 8017 i = 0, 8018 fromNode, 8019 toNode; 8020 8021 for (; i < elStatesInOrder.length; i++) { 8022 fromNode = elStatesInOrder[i]; 8023 nested && (fromNode.matrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(fromNode.element, false, false, true)); // moving a parent affects the position of children 8024 8025 toNode = toElStates[fromNode.id]; 8026 toNode && _fit(fromNode, toNode, scale, true, 0, fromNode); 8027 fromNode.matrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(fromNode.element, false, false, true); 8028 } 8029 8030 return this; 8031 }; 8032 8033 _proto.getProperty = function getProperty(element, property) { 8034 var es = this.getElementState(element) || _emptyObj; 8035 8036 return (property in es ? es : es.props || _emptyObj)[property]; 8037 }; 8038 8039 _proto.add = function add(state) { 8040 var i = state.targets.length, 8041 lookup = this.idLookup, 8042 alt = this.alt, 8043 index, 8044 es, 8045 es2; 8046 8047 while (i--) { 8048 es = state.elementStates[i]; 8049 es2 = lookup[es.id]; 8050 8051 if (es2 && (es.element === es2.element || alt[es.id] && alt[es.id].element === es.element)) { 8052 // if the flip id is already in this FlipState, replace it! 8053 index = this.elementStates.indexOf(es.element === es2.element ? es2 : alt[es.id]); 8054 this.targets.splice(index, 1, state.targets[i]); 8055 this.elementStates.splice(index, 1, es); 8056 } else { 8057 this.targets.push(state.targets[i]); 8058 this.elementStates.push(es); 8059 } 8060 } 8061 8062 state.interrupted && (this.interrupted = true); 8063 state.simple || (this.simple = false); 8064 8065 _createLookup(this); 8066 8067 return this; 8068 }; 8069 8070 _proto.compare = function compare(state) { 8071 var l1 = state.idLookup, 8072 l2 = this.idLookup, 8073 unchanged = [], 8074 changed = [], 8075 enter = [], 8076 leave = [], 8077 targets = [], 8078 a1 = state.alt, 8079 a2 = this.alt, 8080 place = function place(s1, s2, el) { 8081 return (s1.isVisible !== s2.isVisible ? s1.isVisible ? enter : leave : s1.isVisible ? changed : unchanged).push(el) && targets.push(el); 8082 }, 8083 placeIfDoesNotExist = function placeIfDoesNotExist(s1, s2, el) { 8084 return targets.indexOf(el) < 0 && place(s1, s2, el); 8085 }, 8086 s1, 8087 s2, 8088 p, 8089 el, 8090 s1Alt, 8091 s2Alt, 8092 c1, 8093 c2; 8094 8095 for (p in l1) { 8096 s1Alt = a1[p]; 8097 s2Alt = a2[p]; 8098 s1 = !s1Alt ? l1[p] : _getChangingElState(state, this, p); 8099 el = s1.element; 8100 s2 = l2[p]; 8101 8102 if (s2Alt) { 8103 c2 = s2.isVisible || !s2Alt.isVisible && el === s2.element ? s2 : s2Alt; 8104 c1 = s1Alt && !s1.isVisible && !s1Alt.isVisible && c2.element === s1Alt.element ? s1Alt : s1; //c1.element !== c2.element && c1.element === s2.element && (c2 = s2); 8105 8106 if (c1.isVisible && c2.isVisible && c1.element !== c2.element) { 8107 // swapping, so force into "changed" array 8108 (c1.isDifferent(c2) ? changed : unchanged).push(c1.element, c2.element); 8109 targets.push(c1.element, c2.element); 8110 } else { 8111 place(c1, c2, c1.element); 8112 } 8113 8114 s1Alt && c1.element === s1Alt.element && (s1Alt = l1[p]); 8115 placeIfDoesNotExist(c1.element !== s2.element && s1Alt ? s1Alt : c1, s2, s2.element); 8116 placeIfDoesNotExist(s1Alt && s1Alt.element === s2Alt.element ? s1Alt : c1, s2Alt, s2Alt.element); 8117 s1Alt && placeIfDoesNotExist(s1Alt, s2Alt.element === s1Alt.element ? s2Alt : s2, s1Alt.element); 8118 } else { 8119 !s2 ? enter.push(el) : !s2.isDifferent(s1) ? unchanged.push(el) : place(s1, s2, el); 8120 s1Alt && placeIfDoesNotExist(s1Alt, s2, s1Alt.element); 8121 } 8122 } 8123 8124 for (p in l2) { 8125 if (!l1[p]) { 8126 leave.push(l2[p].element); 8127 a2[p] && leave.push(a2[p].element); 8128 } 8129 } 8130 8131 return { 8132 changed: changed, 8133 unchanged: unchanged, 8134 enter: enter, 8135 leave: leave 8136 }; 8137 }; 8138 8139 _proto.recordInlineStyles = function recordInlineStyles() { 8140 var props = _memoizedRemoveProps[this.props] || _removeProps, 8141 i = this.elementStates.length; 8142 8143 while (i--) { 8144 _recordInlineStyles(this.elementStates[i], props); 8145 } 8146 }; 8147 8148 _proto.interrupt = function interrupt(soft) { 8149 var _this2 = this; 8150 8151 // soft = DON'T force in-progress flip animations to completion (like when running a batch, we can't immediately kill flips when getting states because it could contaminate positioning and other .getState() calls that will run in the batch (we kill AFTER all the .getState() calls complete). 8152 var timelines = []; 8153 this.targets.forEach(function (t) { 8154 var tl = t._flip, 8155 foundInProgress = _killFlip(tl, soft ? 0 : 1); 8156 8157 soft && foundInProgress && timelines.indexOf(tl) < 0 && tl.add(function () { 8158 return _this2.updateVisibility(); 8159 }); 8160 foundInProgress && timelines.push(tl); 8161 }); 8162 !soft && timelines.length && this.updateVisibility(); // if we found an in-progress Flip animation, we must record all the values in their current state at that point BUT we should update the isVisible value AFTER pushing that flip to completion so that elements that are entering or leaving will populate those Arrays properly. 8163 8164 this.interrupted || (this.interrupted = !!timelines.length); 8165 }; 8166 8167 _proto.updateVisibility = function updateVisibility() { 8168 this.elementStates.forEach(function (es) { 8169 var b = es.element.getBoundingClientRect(); 8170 es.isVisible = !!(b.width || b.height || b.top || b.left); 8171 es.uncache = 1; 8172 }); 8173 }; 8174 8175 _proto.getElementState = function getElementState(element) { 8176 return this.elementStates[this.targets.indexOf(_getEl(element))]; 8177 }; 8178 8179 _proto.makeAbsolute = function makeAbsolute() { 8180 return _orderByDOMDepth(this.elementStates.slice(0), true, true).map(_makeAbsolute); 8181 }; 8182 8183 return FlipState; 8184}(); 8185 8186var ElementState = /*#__PURE__*/function () { 8187 function ElementState(element, props, simple) { 8188 this.element = element; 8189 this.update(props, simple); 8190 } 8191 8192 var _proto2 = ElementState.prototype; 8193 8194 _proto2.isDifferent = function isDifferent(state) { 8195 var b1 = this.bounds, 8196 b2 = state.bounds; 8197 return b1.top !== b2.top || b1.left !== b2.left || b1.width !== b2.width || b1.height !== b2.height || !this.matrix.equals(state.matrix) || this.opacity !== state.opacity || this.props && state.props && JSON.stringify(this.props) !== JSON.stringify(state.props); 8198 }; 8199 8200 _proto2.update = function update(props, simple) { 8201 var self = this, 8202 element = self.element, 8203 getProp = gsap.getProperty(element), 8204 cache = gsap.core.getCache(element), 8205 bounds = element.getBoundingClientRect(), 8206 bbox = element.getBBox && typeof element.getBBox === "function" && element.nodeName.toLowerCase() !== "svg" && element.getBBox(), 8207 m = simple ? new _utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["Matrix2D"](1, 0, 0, 1, bounds.left + Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["_getDocScrollLeft"])(), bounds.top + Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["_getDocScrollTop"])()) : Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(element, false, false, true); 8208 self.getProp = getProp; 8209 self.element = element; 8210 self.id = _getID(element); 8211 self.matrix = m; 8212 self.cache = cache; 8213 self.bounds = bounds; 8214 self.isVisible = !!(bounds.width || bounds.height || bounds.left || bounds.top); 8215 self.display = getProp("display"); 8216 self.position = getProp("position"); 8217 self.parent = element.parentNode; 8218 self.x = getProp("x"); 8219 self.y = getProp("y"); 8220 self.scaleX = cache.scaleX; 8221 self.scaleY = cache.scaleY; 8222 self.rotation = getProp("rotation"); 8223 self.skewX = getProp("skewX"); 8224 self.opacity = getProp("opacity"); 8225 self.width = bbox ? bbox.width : _closestTenth(getProp("width", "px"), 0.04); // round up to the closest 0.1 so that text doesn't wrap. 8226 8227 self.height = bbox ? bbox.height : _closestTenth(getProp("height", "px"), 0.04); 8228 props && _recordProps(self, _memoizedProps[props] || _memoizeProps(props)); 8229 self.ctm = element.getCTM && element.nodeName.toLowerCase() === "svg" && Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["_getCTM"])(element).inverse(); 8230 self.simple = simple || _round(m.a) === 1 && !_round(m.b) && !_round(m.c) && _round(m.d) === 1; // allows us to speed through some other tasks if it's not scale/rotated 8231 8232 self.uncache = 0; 8233 }; 8234 8235 return ElementState; 8236}(); 8237 8238var FlipAction = /*#__PURE__*/function () { 8239 function FlipAction(vars, batch) { 8240 this.vars = vars; 8241 this.batch = batch; 8242 this.states = []; 8243 this.timeline = batch.timeline; 8244 } 8245 8246 var _proto3 = FlipAction.prototype; 8247 8248 _proto3.getStateById = function getStateById(id) { 8249 var i = this.states.length; 8250 8251 while (i--) { 8252 if (this.states[i].idLookup[id]) { 8253 return this.states[i]; 8254 } 8255 } 8256 }; 8257 8258 _proto3.kill = function kill() { 8259 this.batch.remove(this); 8260 }; 8261 8262 return FlipAction; 8263}(); 8264 8265var FlipBatch = /*#__PURE__*/function () { 8266 function FlipBatch(id) { 8267 this.id = id; 8268 this.actions = []; 8269 this._kill = []; 8270 this._final = []; 8271 this._abs = []; 8272 this._run = []; 8273 this.data = {}; 8274 this.state = new FlipState(); 8275 this.timeline = gsap.timeline(); 8276 } 8277 8278 var _proto4 = FlipBatch.prototype; 8279 8280 _proto4.add = function add(config) { 8281 var result = this.actions.filter(function (action) { 8282 return action.vars === config; 8283 }); 8284 8285 if (result.length) { 8286 return result[0]; 8287 } 8288 8289 result = new FlipAction(typeof config === "function" ? { 8290 animate: config 8291 } : config, this); 8292 this.actions.push(result); 8293 return result; 8294 }; 8295 8296 _proto4.remove = function remove(action) { 8297 var i = this.actions.indexOf(action); 8298 i >= 0 && this.actions.splice(i, 1); 8299 return this; 8300 }; 8301 8302 _proto4.getState = function getState(merge) { 8303 var _this3 = this; 8304 8305 var prevBatch = _batch, 8306 prevAction = _batchAction; 8307 _batch = this; 8308 this.state.clear(); 8309 this._kill.length = 0; 8310 this.actions.forEach(function (action) { 8311 if (action.vars.getState) { 8312 action.states.length = 0; 8313 _batchAction = action; 8314 action.state = action.vars.getState(action); 8315 } 8316 8317 merge && action.states.forEach(function (s) { 8318 return _this3.state.add(s); 8319 }); 8320 }); 8321 _batchAction = prevAction; 8322 _batch = prevBatch; 8323 this.killConflicts(); 8324 return this; 8325 }; 8326 8327 _proto4.animate = function animate() { 8328 var _this4 = this; 8329 8330 var prevBatch = _batch, 8331 tl = this.timeline, 8332 i = this.actions.length, 8333 finalStates, 8334 endTime; 8335 _batch = this; 8336 tl.clear(); 8337 this._abs.length = this._final.length = this._run.length = 0; 8338 this.actions.forEach(function (a) { 8339 a.vars.animate && a.vars.animate(a); 8340 var onEnter = a.vars.onEnter, 8341 onLeave = a.vars.onLeave, 8342 targets = a.targets, 8343 s, 8344 result; 8345 8346 if (targets && targets.length && (onEnter || onLeave)) { 8347 s = new FlipState(); 8348 a.states.forEach(function (state) { 8349 return s.add(state); 8350 }); 8351 result = s.compare(Flip.getState(targets)); 8352 result.enter.length && onEnter && onEnter(result.enter); 8353 result.leave.length && onLeave && onLeave(result.leave); 8354 } 8355 }); 8356 8357 _makeCompsAbsolute(this._abs); 8358 8359 this._run.forEach(function (f) { 8360 return f(); 8361 }); 8362 8363 endTime = tl.duration(); 8364 finalStates = this._final.slice(0); 8365 tl.add(function () { 8366 if (endTime <= tl.time()) { 8367 // only call if moving forward in the timeline (in case it's nested in a timeline that gets reversed) 8368 finalStates.forEach(function (f) { 8369 return f(); 8370 }); 8371 8372 _forEachBatch(_this4, "onComplete"); 8373 } 8374 }); 8375 _batch = prevBatch; 8376 8377 while (i--) { 8378 this.actions[i].vars.once && this.actions[i].kill(); 8379 } 8380 8381 _forEachBatch(this, "onStart"); 8382 8383 tl.restart(); 8384 return this; 8385 }; 8386 8387 _proto4.loadState = function loadState(done) { 8388 done || (done = function done() { 8389 return 0; 8390 }); 8391 var queue = []; 8392 this.actions.forEach(function (c) { 8393 if (c.vars.loadState) { 8394 var i, 8395 f = function f(targets) { 8396 targets && (c.targets = targets); 8397 i = queue.indexOf(f); 8398 8399 if (~i) { 8400 queue.splice(i, 1); 8401 queue.length || done(); 8402 } 8403 }; 8404 8405 queue.push(f); 8406 c.vars.loadState(f); 8407 } 8408 }); 8409 queue.length || done(); 8410 return this; 8411 }; 8412 8413 _proto4.setState = function setState() { 8414 this.actions.forEach(function (c) { 8415 return c.targets = c.vars.setState && c.vars.setState(c); 8416 }); 8417 return this; 8418 }; 8419 8420 _proto4.killConflicts = function killConflicts(soft) { 8421 this.state.interrupt(soft); 8422 8423 this._kill.forEach(function (state) { 8424 return state.interrupt(soft); 8425 }); 8426 8427 return this; 8428 }; 8429 8430 _proto4.run = function run(skipGetState, merge) { 8431 var _this5 = this; 8432 8433 if (this !== _batch) { 8434 skipGetState || this.getState(merge); 8435 this.loadState(function () { 8436 if (!_this5._killed) { 8437 _this5.setState(); 8438 8439 _this5.animate(); 8440 } 8441 }); 8442 } 8443 8444 return this; 8445 }; 8446 8447 _proto4.clear = function clear(stateOnly) { 8448 this.state.clear(); 8449 stateOnly || (this.actions.length = 0); 8450 }; 8451 8452 _proto4.getStateById = function getStateById(id) { 8453 var i = this.actions.length, 8454 s; 8455 8456 while (i--) { 8457 s = this.actions[i].getStateById(id); 8458 8459 if (s) { 8460 return s; 8461 } 8462 } 8463 8464 return this.state.idLookup[id] && this.state; 8465 }; 8466 8467 _proto4.kill = function kill() { 8468 this._killed = 1; 8469 this.clear(); 8470 delete _batchLookup[this.id]; 8471 }; 8472 8473 return FlipBatch; 8474}(); 8475 8476var Flip = /*#__PURE__*/function () { 8477 function Flip() {} 8478 8479 Flip.getState = function getState(targets, vars) { 8480 var state = _parseState(targets, vars); 8481 8482 _batchAction && _batchAction.states.push(state); 8483 vars && vars.batch && Flip.batch(vars.batch).state.add(state); 8484 return state; 8485 }; 8486 8487 Flip.from = function from(state, vars) { 8488 vars = vars || {}; 8489 "clearProps" in vars || (vars.clearProps = true); 8490 return _fromTo(state, _parseState(vars.targets || state.targets, { 8491 props: vars.props || state.props, 8492 simple: vars.simple, 8493 kill: !!vars.kill 8494 }), vars, -1); 8495 }; 8496 8497 Flip.to = function to(state, vars) { 8498 return _fromTo(state, _parseState(vars.targets || state.targets, { 8499 props: vars.props || state.props, 8500 simple: vars.simple, 8501 kill: !!vars.kill 8502 }), vars, 1); 8503 }; 8504 8505 Flip.fromTo = function fromTo(fromState, toState, vars) { 8506 return _fromTo(fromState, toState, vars); 8507 }; 8508 8509 Flip.fit = function fit(fromEl, toEl, vars) { 8510 var v = vars ? _copy(vars, _fitReserved) : {}, 8511 _ref = vars || v, 8512 absolute = _ref.absolute, 8513 scale = _ref.scale, 8514 getVars = _ref.getVars, 8515 props = _ref.props, 8516 runBackwards = _ref.runBackwards, 8517 onComplete = _ref.onComplete, 8518 simple = _ref.simple, 8519 fitChild = vars && vars.fitChild && _getEl(vars.fitChild), 8520 before = _parseElementState(toEl, props, simple, fromEl), 8521 after = _parseElementState(fromEl, 0, simple, before), 8522 inlineProps = props ? _memoizedRemoveProps[props] : _removeProps, 8523 ctx = gsap.context(); 8524 8525 props && _applyProps(v, before.props); 8526 8527 _recordInlineStyles(after, inlineProps); 8528 8529 if (runBackwards) { 8530 "immediateRender" in v || (v.immediateRender = true); 8531 8532 v.onComplete = function () { 8533 _applyInlineStyles(after); 8534 8535 onComplete && onComplete.apply(this, arguments); 8536 }; 8537 } 8538 8539 absolute && _makeAbsolute(after, before); 8540 v = _fit(after, before, scale || fitChild, props, fitChild, v.duration || getVars ? v : 0); 8541 ctx && !getVars && ctx.add(function () { 8542 return function () { 8543 return _applyInlineStyles(after); 8544 }; 8545 }); 8546 return getVars ? v : v.duration ? gsap.to(after.element, v) : null; 8547 }; 8548 8549 Flip.makeAbsolute = function makeAbsolute(targetsOrStates, vars) { 8550 return (targetsOrStates instanceof FlipState ? targetsOrStates : new FlipState(targetsOrStates, vars)).makeAbsolute(); 8551 }; 8552 8553 Flip.batch = function batch(id) { 8554 id || (id = "default"); 8555 return _batchLookup[id] || (_batchLookup[id] = new FlipBatch(id)); 8556 }; 8557 8558 Flip.killFlipsOf = function killFlipsOf(targets, complete) { 8559 (targets instanceof FlipState ? targets.targets : _toArray(targets)).forEach(function (t) { 8560 return t && _killFlip(t._flip, complete !== false ? 1 : 2); 8561 }); 8562 }; 8563 8564 Flip.isFlipping = function isFlipping(target) { 8565 var f = Flip.getByTarget(target); 8566 return !!f && f.isActive(); 8567 }; 8568 8569 Flip.getByTarget = function getByTarget(target) { 8570 return (_getEl(target) || _emptyObj)._flip; 8571 }; 8572 8573 Flip.getElementState = function getElementState(target, props) { 8574 return new ElementState(_getEl(target), props); 8575 }; 8576 8577 Flip.convertCoordinates = function convertCoordinates(fromElement, toElement, point) { 8578 var m = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(toElement, true, true).multiply(Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["getGlobalMatrix"])(fromElement)); 8579 return point ? m.apply(point) : m; 8580 }; 8581 8582 Flip.register = function register(core) { 8583 _body = typeof document !== "undefined" && document.body; 8584 8585 if (_body) { 8586 gsap = core; 8587 8588 Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_0__["_setDoc"])(_body); 8589 8590 _toArray = gsap.utils.toArray; 8591 _getStyleSaver = gsap.core.getStyleSaver; 8592 var snap = gsap.utils.snap(0.1); 8593 8594 _closestTenth = function _closestTenth(value, add) { 8595 return snap(parseFloat(value) + add); 8596 }; 8597 } 8598 }; 8599 8600 return Flip; 8601}(); 8602Flip.version = "3.12.5"; // function whenImagesLoad(el, func) { 8603// let pending = [], 8604// onLoad = e => { 8605// pending.splice(pending.indexOf(e.target), 1); 8606// e.target.removeEventListener("load", onLoad); 8607// pending.length || func(); 8608// }; 8609// gsap.utils.toArray(el.tagName.toLowerCase() === "img" ? el : el.querySelectorAll("img")).forEach(img => img.complete || img.addEventListener("load", onLoad) || pending.push(img)); 8610// pending.length || func(); 8611// } 8612 8613typeof window !== "undefined" && window.gsap && window.gsap.registerPlugin(Flip); 8614 8615 8616/***/ }), 8617
vendor: 14,730 bytes, lines 8618-9001
8618/***/ "./node_modules/gsap/MotionPathPlugin.js": 8619/*!***********************************************!*\ 8620 !*** ./node_modules/gsap/MotionPathPlugin.js ***! 8621 \***********************************************/ 8622/*! exports provided: MotionPathPlugin, default */ 8623/***/ (function(module, __webpack_exports__, __webpack_require__) { 8624 8625"use strict"; 8626__webpack_require__.r(__webpack_exports__); 8627/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MotionPathPlugin", function() { return MotionPathPlugin; }); 8628/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return MotionPathPlugin; }); 8629/* harmony import */ var _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/paths.js */ "./node_modules/gsap/utils/paths.js"); 8630/* harmony import */ var _utils_matrix_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils/matrix.js */ "./node_modules/gsap/utils/matrix.js"); 8631/*! 8632 * MotionPathPlugin 3.12.5 8633 * https://gsap.com 8634 * 8635 * @license Copyright 2008-2024, GreenSock. All rights reserved. 8636 * Subject to the terms at https://gsap.com/standard-license or for 8637 * Club GSAP members, the agreement issued with that membership. 8638 * @author: Jack Doyle, [email protected] 8639*/ 8640 8641/* eslint-disable */ 8642 8643 8644 8645var _xProps = "x,translateX,left,marginLeft,xPercent".split(","), 8646 _yProps = "y,translateY,top,marginTop,yPercent".split(","), 8647 _DEG2RAD = Math.PI / 180, 8648 gsap, 8649 PropTween, 8650 _getUnit, 8651 _toArray, 8652 _getStyleSaver, 8653 _reverting, 8654 _getGSAP = function _getGSAP() { 8655 return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 8656}, 8657 _populateSegmentFromArray = function _populateSegmentFromArray(segment, values, property, mode) { 8658 //mode: 0 = x but don't fill y yet, 1 = y, 2 = x and fill y with 0. 8659 var l = values.length, 8660 si = mode === 2 ? 0 : mode, 8661 i = 0, 8662 v; 8663 8664 for (; i < l; i++) { 8665 segment[si] = v = parseFloat(values[i][property]); 8666 mode === 2 && (segment[si + 1] = 0); 8667 si += 2; 8668 } 8669 8670 return segment; 8671}, 8672 _getPropNum = function _getPropNum(target, prop, unit) { 8673 return parseFloat(target._gsap.get(target, prop, unit || "px")) || 0; 8674}, 8675 _relativize = function _relativize(segment) { 8676 var x = segment[0], 8677 y = segment[1], 8678 i; 8679 8680 for (i = 2; i < segment.length; i += 2) { 8681 x = segment[i] += x; 8682 y = segment[i + 1] += y; 8683 } 8684}, 8685 // feed in an array of quadratic bezier points like [{x: 0, y: 0}, ...] and it'll convert it to cubic bezier 8686// _quadToCubic = points => { 8687// let cubic = [], 8688// l = points.length - 1, 8689// i = 1, 8690// a, b, c; 8691// for (; i < l; i+=2) { 8692// a = points[i-1]; 8693// b = points[i]; 8694// c = points[i+1]; 8695// cubic.push(a, {x: (2 * b.x + a.x) / 3, y: (2 * b.y + a.y) / 3}, {x: (2 * b.x + c.x) / 3, y: (2 * b.y + c.y) / 3}); 8696// } 8697// cubic.push(points[l]); 8698// return cubic; 8699// }, 8700_segmentToRawPath = function _segmentToRawPath(plugin, segment, target, x, y, slicer, vars, unitX, unitY) { 8701 if (vars.type === "cubic") { 8702 segment = [segment]; 8703 } else { 8704 vars.fromCurrent !== false && segment.unshift(_getPropNum(target, x, unitX), y ? _getPropNum(target, y, unitY) : 0); 8705 vars.relative && _relativize(segment); 8706 var pointFunc = y ? _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["pointsToSegment"] : _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["flatPointsToSegment"]; 8707 segment = [pointFunc(segment, vars.curviness)]; 8708 } 8709 8710 segment = slicer(_align(segment, target, vars)); 8711 8712 _addDimensionalPropTween(plugin, target, x, segment, "x", unitX); 8713 8714 y && _addDimensionalPropTween(plugin, target, y, segment, "y", unitY); 8715 return Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["cacheRawPathMeasurements"])(segment, vars.resolution || (vars.curviness === 0 ? 20 : 12)); //when curviness is 0, it creates control points right on top of the anchors which makes it more sensitive to resolution, thus we change the default accordingly. 8716}, 8717 _emptyFunc = function _emptyFunc(v) { 8718 return v; 8719}, 8720 _numExp = /[-+\.]*\d+\.?(?:e-|e\+)?\d*/g, 8721 _originToPoint = function _originToPoint(element, origin, parentMatrix) { 8722 // origin is an array of normalized values (0-1) in relation to the width/height, so [0.5, 0.5] would be the center. It can also be "auto" in which case it will be the top left unless it's a <path>, when it will start at the beginning of the path itself. 8723 var m = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_1__["getGlobalMatrix"])(element), 8724 x = 0, 8725 y = 0, 8726 svg; 8727 8728 if ((element.tagName + "").toLowerCase() === "svg") { 8729 svg = element.viewBox.baseVal; 8730 svg.width || (svg = { 8731 width: +element.getAttribute("width"), 8732 height: +element.getAttribute("height") 8733 }); 8734 } else { 8735 svg = origin && element.getBBox && element.getBBox(); 8736 } 8737 8738 if (origin && origin !== "auto") { 8739 x = origin.push ? origin[0] * (svg ? svg.width : element.offsetWidth || 0) : origin.x; 8740 y = origin.push ? origin[1] * (svg ? svg.height : element.offsetHeight || 0) : origin.y; 8741 } 8742 8743 return parentMatrix.apply(x || y ? m.apply({ 8744 x: x, 8745 y: y 8746 }) : { 8747 x: m.e, 8748 y: m.f 8749 }); 8750}, 8751 _getAlignMatrix = function _getAlignMatrix(fromElement, toElement, fromOrigin, toOrigin) { 8752 var parentMatrix = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_1__["getGlobalMatrix"])(fromElement.parentNode, true, true), 8753 m = parentMatrix.clone().multiply(Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_1__["getGlobalMatrix"])(toElement)), 8754 fromPoint = _originToPoint(fromElement, fromOrigin, parentMatrix), 8755 _originToPoint2 = _originToPoint(toElement, toOrigin, parentMatrix), 8756 x = _originToPoint2.x, 8757 y = _originToPoint2.y, 8758 p; 8759 8760 m.e = m.f = 0; 8761 8762 if (toOrigin === "auto" && toElement.getTotalLength && toElement.tagName.toLowerCase() === "path") { 8763 p = toElement.getAttribute("d").match(_numExp) || []; 8764 p = m.apply({ 8765 x: +p[0], 8766 y: +p[1] 8767 }); 8768 x += p.x; 8769 y += p.y; 8770 } //if (p || (toElement.getBBox && fromElement.getBBox && toElement.ownerSVGElement === fromElement.ownerSVGElement)) { 8771 8772 8773 if (p) { 8774 p = m.apply(toElement.getBBox()); 8775 x -= p.x; 8776 y -= p.y; 8777 } 8778 8779 m.e = x - fromPoint.x; 8780 m.f = y - fromPoint.y; 8781 return m; 8782}, 8783 _align = function _align(rawPath, target, _ref) { 8784 var align = _ref.align, 8785 matrix = _ref.matrix, 8786 offsetX = _ref.offsetX, 8787 offsetY = _ref.offsetY, 8788 alignOrigin = _ref.alignOrigin; 8789 8790 var x = rawPath[0][0], 8791 y = rawPath[0][1], 8792 curX = _getPropNum(target, "x"), 8793 curY = _getPropNum(target, "y"), 8794 alignTarget, 8795 m, 8796 p; 8797 8798 if (!rawPath || !rawPath.length) { 8799 return Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["getRawPath"])("M0,0L0,0"); 8800 } 8801 8802 if (align) { 8803 if (align === "self" || (alignTarget = _toArray(align)[0] || target) === target) { 8804 Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["transformRawPath"])(rawPath, 1, 0, 0, 1, curX - x, curY - y); 8805 } else { 8806 if (alignOrigin && alignOrigin[2] !== false) { 8807 gsap.set(target, { 8808 transformOrigin: alignOrigin[0] * 100 + "% " + alignOrigin[1] * 100 + "%" 8809 }); 8810 } else { 8811 alignOrigin = [_getPropNum(target, "xPercent") / -100, _getPropNum(target, "yPercent") / -100]; 8812 } 8813 8814 m = _getAlignMatrix(target, alignTarget, alignOrigin, "auto"); 8815 p = m.apply({ 8816 x: x, 8817 y: y 8818 }); 8819 Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["transformRawPath"])(rawPath, m.a, m.b, m.c, m.d, curX + m.e - (p.x - m.e), curY + m.f - (p.y - m.f)); 8820 } 8821 } 8822 8823 if (matrix) { 8824 Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["transformRawPath"])(rawPath, matrix.a, matrix.b, matrix.c, matrix.d, matrix.e, matrix.f); 8825 } else if (offsetX || offsetY) { 8826 Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["transformRawPath"])(rawPath, 1, 0, 0, 1, offsetX || 0, offsetY || 0); 8827 } 8828 8829 return rawPath; 8830}, 8831 _addDimensionalPropTween = function _addDimensionalPropTween(plugin, target, property, rawPath, pathProperty, forceUnit) { 8832 var cache = target._gsap, 8833 harness = cache.harness, 8834 alias = harness && harness.aliases && harness.aliases[property], 8835 prop = alias && alias.indexOf(",") < 0 ? alias : property, 8836 pt = plugin._pt = new PropTween(plugin._pt, target, prop, 0, 0, _emptyFunc, 0, cache.set(target, prop, plugin)); 8837 pt.u = _getUnit(cache.get(target, prop, forceUnit)) || 0; 8838 pt.path = rawPath; 8839 pt.pp = pathProperty; 8840 8841 plugin._props.push(prop); 8842}, 8843 _sliceModifier = function _sliceModifier(start, end) { 8844 return function (rawPath) { 8845 return start || end !== 1 ? Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["sliceRawPath"])(rawPath, start, end) : rawPath; 8846 }; 8847}; 8848 8849var MotionPathPlugin = { 8850 version: "3.12.5", 8851 name: "motionPath", 8852 register: function register(core, Plugin, propTween) { 8853 gsap = core; 8854 _getUnit = gsap.utils.getUnit; 8855 _toArray = gsap.utils.toArray; 8856 _getStyleSaver = gsap.core.getStyleSaver; 8857 8858 _reverting = gsap.core.reverting || function () {}; 8859 8860 PropTween = propTween; 8861 }, 8862 init: function init(target, vars, tween) { 8863 if (!gsap) { 8864 console.warn("Please gsap.registerPlugin(MotionPathPlugin)"); 8865 return false; 8866 } 8867 8868 if (!(typeof vars === "object" && !vars.style) || !vars.path) { 8869 vars = { 8870 path: vars 8871 }; 8872 } 8873 8874 var rawPaths = [], 8875 _vars = vars, 8876 path = _vars.path, 8877 autoRotate = _vars.autoRotate, 8878 unitX = _vars.unitX, 8879 unitY = _vars.unitY, 8880 x = _vars.x, 8881 y = _vars.y, 8882 firstObj = path[0], 8883 slicer = _sliceModifier(vars.start, "end" in vars ? vars.end : 1), 8884 rawPath, 8885 p; 8886 8887 this.rawPaths = rawPaths; 8888 this.target = target; 8889 this.tween = tween; 8890 this.styles = _getStyleSaver && _getStyleSaver(target, "transform"); 8891 8892 if (this.rotate = autoRotate || autoRotate === 0) { 8893 //get the rotational data FIRST so that the setTransform() method is called in the correct order in the render() loop - rotation gets set last. 8894 this.rOffset = parseFloat(autoRotate) || 0; 8895 this.radians = !!vars.useRadians; 8896 this.rProp = vars.rotation || "rotation"; // rotation property 8897 8898 this.rSet = target._gsap.set(target, this.rProp, this); // rotation setter 8899 8900 this.ru = _getUnit(target._gsap.get(target, this.rProp)) || 0; // rotation units 8901 } 8902 8903 if (Array.isArray(path) && !("closed" in path) && typeof firstObj !== "number") { 8904 for (p in firstObj) { 8905 if (!x && ~_xProps.indexOf(p)) { 8906 x = p; 8907 } else if (!y && ~_yProps.indexOf(p)) { 8908 y = p; 8909 } 8910 } 8911 8912 if (x && y) { 8913 //correlated values 8914 rawPaths.push(_segmentToRawPath(this, _populateSegmentFromArray(_populateSegmentFromArray([], path, x, 0), path, y, 1), target, x, y, slicer, vars, unitX || _getUnit(path[0][x]), unitY || _getUnit(path[0][y]))); 8915 } else { 8916 x = y = 0; 8917 } 8918 8919 for (p in firstObj) { 8920 p !== x && p !== y && rawPaths.push(_segmentToRawPath(this, _populateSegmentFromArray([], path, p, 2), target, p, 0, slicer, vars, _getUnit(path[0][p]))); 8921 } 8922 } else { 8923 rawPath = slicer(_align(Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["getRawPath"])(vars.path), target, vars)); 8924 Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["cacheRawPathMeasurements"])(rawPath, vars.resolution); 8925 rawPaths.push(rawPath); 8926 8927 _addDimensionalPropTween(this, target, vars.x || "x", rawPath, "x", vars.unitX || "px"); 8928 8929 _addDimensionalPropTween(this, target, vars.y || "y", rawPath, "y", vars.unitY || "px"); 8930 } 8931 }, 8932 render: function render(ratio, data) { 8933 var rawPaths = data.rawPaths, 8934 i = rawPaths.length, 8935 pt = data._pt; 8936 8937 if (data.tween._time || !_reverting()) { 8938 if (ratio > 1) { 8939 ratio = 1; 8940 } else if (ratio < 0) { 8941 ratio = 0; 8942 } 8943 8944 while (i--) { 8945 Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["getPositionOnPath"])(rawPaths[i], ratio, !i && data.rotate, rawPaths[i]); 8946 } 8947 8948 while (pt) { 8949 pt.set(pt.t, pt.p, pt.path[pt.pp] + pt.u, pt.d, ratio); 8950 pt = pt._next; 8951 } 8952 8953 data.rotate && data.rSet(data.target, data.rProp, rawPaths[0].angle * (data.radians ? _DEG2RAD : 1) + data.rOffset + data.ru, data, ratio); 8954 } else { 8955 data.styles.revert(); 8956 } 8957 }, 8958 getLength: function getLength(path) { 8959 return Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["cacheRawPathMeasurements"])(Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["getRawPath"])(path)).totalLength; 8960 }, 8961 sliceRawPath: _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["sliceRawPath"], 8962 getRawPath: _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["getRawPath"], 8963 pointsToSegment: _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["pointsToSegment"], 8964 stringToRawPath: _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["stringToRawPath"], 8965 rawPathToString: _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["rawPathToString"], 8966 transformRawPath: _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["transformRawPath"], 8967 getGlobalMatrix: _utils_matrix_js__WEBPACK_IMPORTED_MODULE_1__["getGlobalMatrix"], 8968 getPositionOnPath: _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["getPositionOnPath"], 8969 cacheRawPathMeasurements: _utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["cacheRawPathMeasurements"], 8970 convertToPath: function convertToPath(targets, swap) { 8971 return _toArray(targets).map(function (target) { 8972 return Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["convertToPath"])(target, swap !== false); 8973 }); 8974 }, 8975 convertCoordinates: function convertCoordinates(fromElement, toElement, point) { 8976 var m = Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_1__["getGlobalMatrix"])(toElement, true, true).multiply(Object(_utils_matrix_js__WEBPACK_IMPORTED_MODULE_1__["getGlobalMatrix"])(fromElement)); 8977 return point ? m.apply(point) : m; 8978 }, 8979 getAlignMatrix: _getAlignMatrix, 8980 getRelativePosition: function getRelativePosition(fromElement, toElement, fromOrigin, toOrigin) { 8981 var m = _getAlignMatrix(fromElement, toElement, fromOrigin, toOrigin); 8982 8983 return { 8984 x: m.e, 8985 y: m.f 8986 }; 8987 }, 8988 arrayToRawPath: function arrayToRawPath(value, vars) { 8989 vars = vars || {}; 8990 8991 var segment = _populateSegmentFromArray(_populateSegmentFromArray([], value, vars.x || "x", 0), value, vars.y || "y", 1); 8992 8993 vars.relative && _relativize(segment); 8994 return [vars.type === "cubic" ? segment : Object(_utils_paths_js__WEBPACK_IMPORTED_MODULE_0__["pointsToSegment"])(segment, vars.curviness)]; 8995 } 8996}; 8997_getGSAP() && gsap.registerPlugin(MotionPathPlugin); 8998 8999 9000/***/ }), 9001
vendor: 27,126 bytes, lines 9002-9710
9002/***/ "./node_modules/gsap/Observer.js": 9003/*!***************************************!*\ 9004 !*** ./node_modules/gsap/Observer.js ***! 9005 \***************************************/ 9006/*! exports provided: Observer, default, _isViewport, _scrollers, _getScrollFunc, _getProxyProp, _proxies, _getVelocityProp, _vertical, _horizontal, _getTarget */ 9007/***/ (function(module, __webpack_exports__, __webpack_require__) { 9008 9009"use strict"; 9010__webpack_require__.r(__webpack_exports__); 9011/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Observer", function() { return Observer; }); 9012/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Observer; }); 9013/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_isViewport", function() { return _isViewport; }); 9014/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_scrollers", function() { return _scrollers; }); 9015/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getScrollFunc", function() { return _getScrollFunc; }); 9016/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getProxyProp", function() { return _getProxyProp; }); 9017/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_proxies", function() { return _proxies; }); 9018/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getVelocityProp", function() { return _getVelocityProp; }); 9019/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_vertical", function() { return _vertical; }); 9020/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_horizontal", function() { return _horizontal; }); 9021/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getTarget", function() { return _getTarget; }); 9022function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } 9023 9024function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } 9025 9026/*! 9027 * Observer 3.12.5 9028 * https://gsap.com 9029 * 9030 * @license Copyright 2008-2024, GreenSock. All rights reserved. 9031 * Subject to the terms at https://gsap.com/standard-license or for 9032 * Club GSAP members, the agreement issued with that membership. 9033 * @author: Jack Doyle, [email protected] 9034*/ 9035 9036/* eslint-disable */ 9037var gsap, 9038 _coreInitted, 9039 _clamp, 9040 _win, 9041 _doc, 9042 _docEl, 9043 _body, 9044 _isTouch, 9045 _pointerType, 9046 ScrollTrigger, 9047 _root, 9048 _normalizer, 9049 _eventTypes, 9050 _context, 9051 _getGSAP = function _getGSAP() { 9052 return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 9053}, 9054 _startup = 1, 9055 _observers = [], 9056 _scrollers = [], 9057 _proxies = [], 9058 _getTime = Date.now, 9059 _bridge = function _bridge(name, value) { 9060 return value; 9061}, 9062 _integrate = function _integrate() { 9063 var core = ScrollTrigger.core, 9064 data = core.bridge || {}, 9065 scrollers = core._scrollers, 9066 proxies = core._proxies; 9067 scrollers.push.apply(scrollers, _scrollers); 9068 proxies.push.apply(proxies, _proxies); 9069 _scrollers = scrollers; 9070 _proxies = proxies; 9071 9072 _bridge = function _bridge(name, value) { 9073 return data[name](value); 9074 }; 9075}, 9076 _getProxyProp = function _getProxyProp(element, property) { 9077 return ~_proxies.indexOf(element) && _proxies[_proxies.indexOf(element) + 1][property]; 9078}, 9079 _isViewport = function _isViewport(el) { 9080 return !!~_root.indexOf(el); 9081}, 9082 _addListener = function _addListener(element, type, func, passive, capture) { 9083 return element.addEventListener(type, func, { 9084 passive: passive !== false, 9085 capture: !!capture 9086 }); 9087}, 9088 _removeListener = function _removeListener(element, type, func, capture) { 9089 return element.removeEventListener(type, func, !!capture); 9090}, 9091 _scrollLeft = "scrollLeft", 9092 _scrollTop = "scrollTop", 9093 _onScroll = function _onScroll() { 9094 return _normalizer && _normalizer.isPressed || _scrollers.cache++; 9095}, 9096 _scrollCacheFunc = function _scrollCacheFunc(f, doNotCache) { 9097 var cachingFunc = function cachingFunc(value) { 9098 // since reading the scrollTop/scrollLeft/pageOffsetY/pageOffsetX can trigger a layout, this function allows us to cache the value so it only gets read fresh after a "scroll" event fires (or while we're refreshing because that can lengthen the page and alter the scroll position). when "soft" is true, that means don't actually set the scroll, but cache the new value instead (useful in ScrollSmoother) 9099 if (value || value === 0) { 9100 _startup && (_win.history.scrollRestoration = "manual"); // otherwise the new position will get overwritten by the browser onload. 9101 9102 var isNormalizing = _normalizer && _normalizer.isPressed; 9103 value = cachingFunc.v = Math.round(value) || (_normalizer && _normalizer.iOS ? 1 : 0); //TODO: iOS Bug: if you allow it to go to 0, Safari can start to report super strange (wildly inaccurate) touch positions! 9104 9105 f(value); 9106 cachingFunc.cacheID = _scrollers.cache; 9107 isNormalizing && _bridge("ss", value); // set scroll (notify ScrollTrigger so it can dispatch a "scrollStart" event if necessary 9108 } else if (doNotCache || _scrollers.cache !== cachingFunc.cacheID || _bridge("ref")) { 9109 cachingFunc.cacheID = _scrollers.cache; 9110 cachingFunc.v = f(); 9111 } 9112 9113 return cachingFunc.v + cachingFunc.offset; 9114 }; 9115 9116 cachingFunc.offset = 0; 9117 return f && cachingFunc; 9118}, 9119 _horizontal = { 9120 s: _scrollLeft, 9121 p: "left", 9122 p2: "Left", 9123 os: "right", 9124 os2: "Right", 9125 d: "width", 9126 d2: "Width", 9127 a: "x", 9128 sc: _scrollCacheFunc(function (value) { 9129 return arguments.length ? _win.scrollTo(value, _vertical.sc()) : _win.pageXOffset || _doc[_scrollLeft] || _docEl[_scrollLeft] || _body[_scrollLeft] || 0; 9130 }) 9131}, 9132 _vertical = { 9133 s: _scrollTop, 9134 p: "top", 9135 p2: "Top", 9136 os: "bottom", 9137 os2: "Bottom", 9138 d: "height", 9139 d2: "Height", 9140 a: "y", 9141 op: _horizontal, 9142 sc: _scrollCacheFunc(function (value) { 9143 return arguments.length ? _win.scrollTo(_horizontal.sc(), value) : _win.pageYOffset || _doc[_scrollTop] || _docEl[_scrollTop] || _body[_scrollTop] || 0; 9144 }) 9145}, 9146 _getTarget = function _getTarget(t, self) { 9147 return (self && self._ctx && self._ctx.selector || gsap.utils.toArray)(t)[0] || (typeof t === "string" && gsap.config().nullTargetWarn !== false ? console.warn("Element not found:", t) : null); 9148}, 9149 _getScrollFunc = function _getScrollFunc(element, _ref) { 9150 var s = _ref.s, 9151 sc = _ref.sc; 9152 // we store the scroller functions in an alternating sequenced Array like [element, verticalScrollFunc, horizontalScrollFunc, ...] so that we can minimize memory, maximize performance, and we also record the last position as a ".rec" property in order to revert to that after refreshing to ensure things don't shift around. 9153 _isViewport(element) && (element = _doc.scrollingElement || _docEl); 9154 9155 var i = _scrollers.indexOf(element), 9156 offset = sc === _vertical.sc ? 1 : 2; 9157 9158 !~i && (i = _scrollers.push(element) - 1); 9159 _scrollers[i + offset] || _addListener(element, "scroll", _onScroll); // clear the cache when a scroll occurs 9160 9161 var prev = _scrollers[i + offset], 9162 func = prev || (_scrollers[i + offset] = _scrollCacheFunc(_getProxyProp(element, s), true) || (_isViewport(element) ? sc : _scrollCacheFunc(function (value) { 9163 return arguments.length ? element[s] = value : element[s]; 9164 }))); 9165 func.target = element; 9166 prev || (func.smooth = gsap.getProperty(element, "scrollBehavior") === "smooth"); // only set it the first time (don't reset every time a scrollFunc is requested because perhaps it happens during a refresh() when it's disabled in ScrollTrigger. 9167 9168 return func; 9169}, 9170 _getVelocityProp = function _getVelocityProp(value, minTimeRefresh, useDelta) { 9171 var v1 = value, 9172 v2 = value, 9173 t1 = _getTime(), 9174 t2 = t1, 9175 min = minTimeRefresh || 50, 9176 dropToZeroTime = Math.max(500, min * 3), 9177 update = function update(value, force) { 9178 var t = _getTime(); 9179 9180 if (force || t - t1 > min) { 9181 v2 = v1; 9182 v1 = value; 9183 t2 = t1; 9184 t1 = t; 9185 } else if (useDelta) { 9186 v1 += value; 9187 } else { 9188 // not totally necessary, but makes it a bit more accurate by adjusting the v1 value according to the new slope. This way we're not just ignoring the incoming data. Removing for now because it doesn't seem to make much practical difference and it's probably not worth the kb. 9189 v1 = v2 + (value - v2) / (t - t2) * (t1 - t2); 9190 } 9191 }, 9192 reset = function reset() { 9193 v2 = v1 = useDelta ? 0 : v1; 9194 t2 = t1 = 0; 9195 }, 9196 getVelocity = function getVelocity(latestValue) { 9197 var tOld = t2, 9198 vOld = v2, 9199 t = _getTime(); 9200 9201 (latestValue || latestValue === 0) && latestValue !== v1 && update(latestValue); 9202 return t1 === t2 || t - t2 > dropToZeroTime ? 0 : (v1 + (useDelta ? vOld : -vOld)) / ((useDelta ? t : t1) - tOld) * 1000; 9203 }; 9204 9205 return { 9206 update: update, 9207 reset: reset, 9208 getVelocity: getVelocity 9209 }; 9210}, 9211 _getEvent = function _getEvent(e, preventDefault) { 9212 preventDefault && !e._gsapAllow && e.preventDefault(); 9213 return e.changedTouches ? e.changedTouches[0] : e; 9214}, 9215 _getAbsoluteMax = function _getAbsoluteMax(a) { 9216 var max = Math.max.apply(Math, a), 9217 min = Math.min.apply(Math, a); 9218 return Math.abs(max) >= Math.abs(min) ? max : min; 9219}, 9220 _setScrollTrigger = function _setScrollTrigger() { 9221 ScrollTrigger = gsap.core.globals().ScrollTrigger; 9222 ScrollTrigger && ScrollTrigger.core && _integrate(); 9223}, 9224 _initCore = function _initCore(core) { 9225 gsap = core || _getGSAP(); 9226 9227 if (!_coreInitted && gsap && typeof document !== "undefined" && document.body) { 9228 _win = window; 9229 _doc = document; 9230 _docEl = _doc.documentElement; 9231 _body = _doc.body; 9232 _root = [_win, _doc, _docEl, _body]; 9233 _clamp = gsap.utils.clamp; 9234 9235 _context = gsap.core.context || function () {}; 9236 9237 _pointerType = "onpointerenter" in _body ? "pointer" : "mouse"; // isTouch is 0 if no touch, 1 if ONLY touch, and 2 if it can accommodate touch but also other types like mouse/pointer. 9238 9239 _isTouch = Observer.isTouch = _win.matchMedia && _win.matchMedia("(hover: none), (pointer: coarse)").matches ? 1 : "ontouchstart" in _win || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 ? 2 : 0; 9240 _eventTypes = Observer.eventTypes = ("ontouchstart" in _docEl ? "touchstart,touchmove,touchcancel,touchend" : !("onpointerdown" in _docEl) ? "mousedown,mousemove,mouseup,mouseup" : "pointerdown,pointermove,pointercancel,pointerup").split(","); 9241 setTimeout(function () { 9242 return _startup = 0; 9243 }, 500); 9244 9245 _setScrollTrigger(); 9246 9247 _coreInitted = 1; 9248 } 9249 9250 return _coreInitted; 9251}; 9252 9253_horizontal.op = _vertical; 9254_scrollers.cache = 0; 9255var Observer = /*#__PURE__*/function () { 9256 function Observer(vars) { 9257 this.init(vars); 9258 } 9259 9260 var _proto = Observer.prototype; 9261 9262 _proto.init = function init(vars) { 9263 _coreInitted || _initCore(gsap) || console.warn("Please gsap.registerPlugin(Observer)"); 9264 ScrollTrigger || _setScrollTrigger(); 9265 var tolerance = vars.tolerance, 9266 dragMinimum = vars.dragMinimum, 9267 type = vars.type, 9268 target = vars.target, 9269 lineHeight = vars.lineHeight, 9270 debounce = vars.debounce, 9271 preventDefault = vars.preventDefault, 9272 onStop = vars.onStop, 9273 onStopDelay = vars.onStopDelay, 9274 ignore = vars.ignore, 9275 wheelSpeed = vars.wheelSpeed, 9276 event = vars.event, 9277 onDragStart = vars.onDragStart, 9278 onDragEnd = vars.onDragEnd, 9279 onDrag = vars.onDrag, 9280 onPress = vars.onPress, 9281 onRelease = vars.onRelease, 9282 onRight = vars.onRight, 9283 onLeft = vars.onLeft, 9284 onUp = vars.onUp, 9285 onDown = vars.onDown, 9286 onChangeX = vars.onChangeX, 9287 onChangeY = vars.onChangeY, 9288 onChange = vars.onChange, 9289 onToggleX = vars.onToggleX, 9290 onToggleY = vars.onToggleY, 9291 onHover = vars.onHover, 9292 onHoverEnd = vars.onHoverEnd, 9293 onMove = vars.onMove, 9294 ignoreCheck = vars.ignoreCheck, 9295 isNormalizer = vars.isNormalizer, 9296 onGestureStart = vars.onGestureStart, 9297 onGestureEnd = vars.onGestureEnd, 9298 onWheel = vars.onWheel, 9299 onEnable = vars.onEnable, 9300 onDisable = vars.onDisable, 9301 onClick = vars.onClick, 9302 scrollSpeed = vars.scrollSpeed, 9303 capture = vars.capture, 9304 allowClicks = vars.allowClicks, 9305 lockAxis = vars.lockAxis, 9306 onLockAxis = vars.onLockAxis; 9307 this.target = target = _getTarget(target) || _docEl; 9308 this.vars = vars; 9309 ignore && (ignore = gsap.utils.toArray(ignore)); 9310 tolerance = tolerance || 1e-9; 9311 dragMinimum = dragMinimum || 0; 9312 wheelSpeed = wheelSpeed || 1; 9313 scrollSpeed = scrollSpeed || 1; 9314 type = type || "wheel,touch,pointer"; 9315 debounce = debounce !== false; 9316 lineHeight || (lineHeight = parseFloat(_win.getComputedStyle(_body).lineHeight) || 22); // note: browser may report "normal", so default to 22. 9317 9318 var id, 9319 onStopDelayedCall, 9320 dragged, 9321 moved, 9322 wheeled, 9323 locked, 9324 axis, 9325 self = this, 9326 prevDeltaX = 0, 9327 prevDeltaY = 0, 9328 passive = vars.passive || !preventDefault, 9329 scrollFuncX = _getScrollFunc(target, _horizontal), 9330 scrollFuncY = _getScrollFunc(target, _vertical), 9331 scrollX = scrollFuncX(), 9332 scrollY = scrollFuncY(), 9333 limitToTouch = ~type.indexOf("touch") && !~type.indexOf("pointer") && _eventTypes[0] === "pointerdown", 9334 // for devices that accommodate mouse events and touch events, we need to distinguish. 9335 isViewport = _isViewport(target), 9336 ownerDoc = target.ownerDocument || _doc, 9337 deltaX = [0, 0, 0], 9338 // wheel, scroll, pointer/touch 9339 deltaY = [0, 0, 0], 9340 onClickTime = 0, 9341 clickCapture = function clickCapture() { 9342 return onClickTime = _getTime(); 9343 }, 9344 _ignoreCheck = function _ignoreCheck(e, isPointerOrTouch) { 9345 return (self.event = e) && ignore && ~ignore.indexOf(e.target) || isPointerOrTouch && limitToTouch && e.pointerType !== "touch" || ignoreCheck && ignoreCheck(e, isPointerOrTouch); 9346 }, 9347 onStopFunc = function onStopFunc() { 9348 self._vx.reset(); 9349 9350 self._vy.reset(); 9351 9352 onStopDelayedCall.pause(); 9353 onStop && onStop(self); 9354 }, 9355 update = function update() { 9356 var dx = self.deltaX = _getAbsoluteMax(deltaX), 9357 dy = self.deltaY = _getAbsoluteMax(deltaY), 9358 changedX = Math.abs(dx) >= tolerance, 9359 changedY = Math.abs(dy) >= tolerance; 9360 9361 onChange && (changedX || changedY) && onChange(self, dx, dy, deltaX, deltaY); // in ScrollTrigger.normalizeScroll(), we need to know if it was touch/pointer so we need access to the deltaX/deltaY Arrays before we clear them out. 9362 9363 if (changedX) { 9364 onRight && self.deltaX > 0 && onRight(self); 9365 onLeft && self.deltaX < 0 && onLeft(self); 9366 onChangeX && onChangeX(self); 9367 onToggleX && self.deltaX < 0 !== prevDeltaX < 0 && onToggleX(self); 9368 prevDeltaX = self.deltaX; 9369 deltaX[0] = deltaX[1] = deltaX[2] = 0; 9370 } 9371 9372 if (changedY) { 9373 onDown && self.deltaY > 0 && onDown(self); 9374 onUp && self.deltaY < 0 && onUp(self); 9375 onChangeY && onChangeY(self); 9376 onToggleY && self.deltaY < 0 !== prevDeltaY < 0 && onToggleY(self); 9377 prevDeltaY = self.deltaY; 9378 deltaY[0] = deltaY[1] = deltaY[2] = 0; 9379 } 9380 9381 if (moved || dragged) { 9382 onMove && onMove(self); 9383 9384 if (dragged) { 9385 onDrag(self); 9386 dragged = false; 9387 } 9388 9389 moved = false; 9390 } 9391 9392 locked && !(locked = false) && onLockAxis && onLockAxis(self); 9393 9394 if (wheeled) { 9395 onWheel(self); 9396 wheeled = false; 9397 } 9398 9399 id = 0; 9400 }, 9401 onDelta = function onDelta(x, y, index) { 9402 deltaX[index] += x; 9403 deltaY[index] += y; 9404 9405 self._vx.update(x); 9406 9407 self._vy.update(y); 9408 9409 debounce ? id || (id = requestAnimationFrame(update)) : update(); 9410 }, 9411 onTouchOrPointerDelta = function onTouchOrPointerDelta(x, y) { 9412 if (lockAxis && !axis) { 9413 self.axis = axis = Math.abs(x) > Math.abs(y) ? "x" : "y"; 9414 locked = true; 9415 } 9416 9417 if (axis !== "y") { 9418 deltaX[2] += x; 9419 9420 self._vx.update(x, true); // update the velocity as frequently as possible instead of in the debounced function so that very quick touch-scrolls (flicks) feel natural. If it's the mouse/touch/pointer, force it so that we get snappy/accurate momentum scroll. 9421 9422 } 9423 9424 if (axis !== "x") { 9425 deltaY[2] += y; 9426 9427 self._vy.update(y, true); 9428 } 9429 9430 debounce ? id || (id = requestAnimationFrame(update)) : update(); 9431 }, 9432 _onDrag = function _onDrag(e) { 9433 if (_ignoreCheck(e, 1)) { 9434 return; 9435 } 9436 9437 e = _getEvent(e, preventDefault); 9438 var x = e.clientX, 9439 y = e.clientY, 9440 dx = x - self.x, 9441 dy = y - self.y, 9442 isDragging = self.isDragging; 9443 self.x = x; 9444 self.y = y; 9445 9446 if (isDragging || Math.abs(self.startX - x) >= dragMinimum || Math.abs(self.startY - y) >= dragMinimum) { 9447 onDrag && (dragged = true); 9448 isDragging || (self.isDragging = true); 9449 onTouchOrPointerDelta(dx, dy); 9450 isDragging || onDragStart && onDragStart(self); 9451 } 9452 }, 9453 _onPress = self.onPress = function (e) { 9454 if (_ignoreCheck(e, 1) || e && e.button) { 9455 return; 9456 } 9457 9458 self.axis = axis = null; 9459 onStopDelayedCall.pause(); 9460 self.isPressed = true; 9461 e = _getEvent(e); // note: may need to preventDefault(?) Won't side-scroll on iOS Safari if we do, though. 9462 9463 prevDeltaX = prevDeltaY = 0; 9464 self.startX = self.x = e.clientX; 9465 self.startY = self.y = e.clientY; 9466 9467 self._vx.reset(); // otherwise the t2 may be stale if the user touches and flicks super fast and releases in less than 2 requestAnimationFrame ticks, causing velocity to be 0. 9468 9469 9470 self._vy.reset(); 9471 9472 _addListener(isNormalizer ? target : ownerDoc, _eventTypes[1], _onDrag, passive, true); 9473 9474 self.deltaX = self.deltaY = 0; 9475 onPress && onPress(self); 9476 }, 9477 _onRelease = self.onRelease = function (e) { 9478 if (_ignoreCheck(e, 1)) { 9479 return; 9480 } 9481 9482 _removeListener(isNormalizer ? target : ownerDoc, _eventTypes[1], _onDrag, true); 9483 9484 var isTrackingDrag = !isNaN(self.y - self.startY), 9485 wasDragging = self.isDragging, 9486 isDragNotClick = wasDragging && (Math.abs(self.x - self.startX) > 3 || Math.abs(self.y - self.startY) > 3), 9487 // some touch devices need some wiggle room in terms of sensing clicks - the finger may move a few pixels. 9488 eventData = _getEvent(e); 9489 9490 if (!isDragNotClick && isTrackingDrag) { 9491 self._vx.reset(); 9492 9493 self._vy.reset(); //if (preventDefault && allowClicks && self.isPressed) { // check isPressed because in a rare edge case, the inputObserver in ScrollTrigger may stopPropagation() on the press/drag, so the onRelease may get fired without the onPress/onDrag ever getting called, thus it could trigger a click to occur on a link after scroll-dragging it. 9494 9495 9496 if (preventDefault && allowClicks) { 9497 gsap.delayedCall(0.08, function () { 9498 // some browsers (like Firefox) won't trust script-generated clicks, so if the user tries to click on a video to play it, for example, it simply won't work. Since a regular "click" event will most likely be generated anyway (one that has its isTrusted flag set to true), we must slightly delay our script-generated click so that the "real"/trusted one is prioritized. Remember, when there are duplicate events in quick succession, we suppress all but the first one. Some browsers don't even trigger the "real" one at all, so our synthetic one is a safety valve that ensures that no matter what, a click event does get dispatched. 9499 if (_getTime() - onClickTime > 300 && !e.defaultPrevented) { 9500 if (e.target.click) { 9501 //some browsers (like mobile Safari) don't properly trigger the click event 9502 e.target.click(); 9503 } else if (ownerDoc.createEvent) { 9504 var syntheticEvent = ownerDoc.createEvent("MouseEvents"); 9505 syntheticEvent.initMouseEvent("click", true, true, _win, 1, eventData.screenX, eventData.screenY, eventData.clientX, eventData.clientY, false, false, false, false, 0, null); 9506 e.target.dispatchEvent(syntheticEvent); 9507 } 9508 } 9509 }); 9510 } 9511 } 9512 9513 self.isDragging = self.isGesturing = self.isPressed = false; 9514 onStop && wasDragging && !isNormalizer && onStopDelayedCall.restart(true); 9515 onDragEnd && wasDragging && onDragEnd(self); 9516 onRelease && onRelease(self, isDragNotClick); 9517 }, 9518 _onGestureStart = function _onGestureStart(e) { 9519 return e.touches && e.touches.length > 1 && (self.isGesturing = true) && onGestureStart(e, self.isDragging); 9520 }, 9521 _onGestureEnd = function _onGestureEnd() { 9522 return (self.isGesturing = false) || onGestureEnd(self); 9523 }, 9524 onScroll = function onScroll(e) { 9525 if (_ignoreCheck(e)) { 9526 return; 9527 } 9528 9529 var x = scrollFuncX(), 9530 y = scrollFuncY(); 9531 onDelta((x - scrollX) * scrollSpeed, (y - scrollY) * scrollSpeed, 1); 9532 scrollX = x; 9533 scrollY = y; 9534 onStop && onStopDelayedCall.restart(true); 9535 }, 9536 _onWheel = function _onWheel(e) { 9537 if (_ignoreCheck(e)) { 9538 return; 9539 } 9540 9541 e = _getEvent(e, preventDefault); 9542 onWheel && (wheeled = true); 9543 var multiplier = (e.deltaMode === 1 ? lineHeight : e.deltaMode === 2 ? _win.innerHeight : 1) * wheelSpeed; 9544 onDelta(e.deltaX * multiplier, e.deltaY * multiplier, 0); 9545 onStop && !isNormalizer && onStopDelayedCall.restart(true); 9546 }, 9547 _onMove = function _onMove(e) { 9548 if (_ignoreCheck(e)) { 9549 return; 9550 } 9551 9552 var x = e.clientX, 9553 y = e.clientY, 9554 dx = x - self.x, 9555 dy = y - self.y; 9556 self.x = x; 9557 self.y = y; 9558 moved = true; 9559 onStop && onStopDelayedCall.restart(true); 9560 (dx || dy) && onTouchOrPointerDelta(dx, dy); 9561 }, 9562 _onHover = function _onHover(e) { 9563 self.event = e; 9564 onHover(self); 9565 }, 9566 _onHoverEnd = function _onHoverEnd(e) { 9567 self.event = e; 9568 onHoverEnd(self); 9569 }, 9570 _onClick = function _onClick(e) { 9571 return _ignoreCheck(e) || _getEvent(e, preventDefault) && onClick(self); 9572 }; 9573 9574 onStopDelayedCall = self._dc = gsap.delayedCall(onStopDelay || 0.25, onStopFunc).pause(); 9575 self.deltaX = self.deltaY = 0; 9576 self._vx = _getVelocityProp(0, 50, true); 9577 self._vy = _getVelocityProp(0, 50, true); 9578 self.scrollX = scrollFuncX; 9579 self.scrollY = scrollFuncY; 9580 self.isDragging = self.isGesturing = self.isPressed = false; 9581 9582 _context(this); 9583 9584 self.enable = function (e) { 9585 if (!self.isEnabled) { 9586 _addListener(isViewport ? ownerDoc : target, "scroll", _onScroll); 9587 9588 type.indexOf("scroll") >= 0 && _addListener(isViewport ? ownerDoc : target, "scroll", onScroll, passive, capture); 9589 type.indexOf("wheel") >= 0 && _addListener(target, "wheel", _onWheel, passive, capture); 9590 9591 if (type.indexOf("touch") >= 0 && _isTouch || type.indexOf("pointer") >= 0) { 9592 _addListener(target, _eventTypes[0], _onPress, passive, capture); 9593 9594 _addListener(ownerDoc, _eventTypes[2], _onRelease); 9595 9596 _addListener(ownerDoc, _eventTypes[3], _onRelease); 9597 9598 allowClicks && _addListener(target, "click", clickCapture, true, true); 9599 onClick && _addListener(target, "click", _onClick); 9600 onGestureStart && _addListener(ownerDoc, "gesturestart", _onGestureStart); 9601 onGestureEnd && _addListener(ownerDoc, "gestureend", _onGestureEnd); 9602 onHover && _addListener(target, _pointerType + "enter", _onHover); 9603 onHoverEnd && _addListener(target, _pointerType + "leave", _onHoverEnd); 9604 onMove && _addListener(target, _pointerType + "move", _onMove); 9605 } 9606 9607 self.isEnabled = true; 9608 e && e.type && _onPress(e); 9609 onEnable && onEnable(self); 9610 } 9611 9612 return self; 9613 }; 9614 9615 self.disable = function () { 9616 if (self.isEnabled) { 9617 // only remove the _onScroll listener if there aren't any others that rely on the functionality. 9618 _observers.filter(function (o) { 9619 return o !== self && _isViewport(o.target); 9620 }).length || _removeListener(isViewport ? ownerDoc : target, "scroll", _onScroll); 9621 9622 if (self.isPressed) { 9623 self._vx.reset(); 9624 9625 self._vy.reset(); 9626 9627 _removeListener(isNormalizer ? target : ownerDoc, _eventTypes[1], _onDrag, true); 9628 } 9629 9630 _removeListener(isViewport ? ownerDoc : target, "scroll", onScroll, capture); 9631 9632 _removeListener(target, "wheel", _onWheel, capture); 9633 9634 _removeListener(target, _eventTypes[0], _onPress, capture); 9635 9636 _removeListener(ownerDoc, _eventTypes[2], _onRelease); 9637 9638 _removeListener(ownerDoc, _eventTypes[3], _onRelease); 9639 9640 _removeListener(target, "click", clickCapture, true); 9641 9642 _removeListener(target, "click", _onClick); 9643 9644 _removeListener(ownerDoc, "gesturestart", _onGestureStart); 9645 9646 _removeListener(ownerDoc, "gestureend", _onGestureEnd); 9647 9648 _removeListener(target, _pointerType + "enter", _onHover); 9649 9650 _removeListener(target, _pointerType + "leave", _onHoverEnd); 9651 9652 _removeListener(target, _pointerType + "move", _onMove); 9653 9654 self.isEnabled = self.isPressed = self.isDragging = false; 9655 onDisable && onDisable(self); 9656 } 9657 }; 9658 9659 self.kill = self.revert = function () { 9660 self.disable(); 9661 9662 var i = _observers.indexOf(self); 9663 9664 i >= 0 && _observers.splice(i, 1); 9665 _normalizer === self && (_normalizer = 0); 9666 }; 9667 9668 _observers.push(self); 9669 9670 isNormalizer && _isViewport(target) && (_normalizer = self); 9671 self.enable(event); 9672 }; 9673 9674 _createClass(Observer, [{ 9675 key: "velocityX", 9676 get: function get() { 9677 return this._vx.getVelocity(); 9678 } 9679 }, { 9680 key: "velocityY", 9681 get: function get() { 9682 return this._vy.getVelocity(); 9683 } 9684 }]); 9685 9686 return Observer; 9687}(); 9688Observer.version = "3.12.5"; 9689 9690Observer.create = function (vars) { 9691 return new Observer(vars); 9692}; 9693 9694Observer.register = _initCore; 9695 9696Observer.getAll = function () { 9697 return _observers.slice(); 9698}; 9699 9700Observer.getById = function (id) { 9701 return _observers.filter(function (o) { 9702 return o.vars.id === id; 9703 })[0]; 9704}; 9705 9706_getGSAP() && gsap.registerPlugin(Observer); 9707 9708 9709/***/ }), 9710
vendor: 15,517 bytes, lines 9711-10185
9711/***/ "./node_modules/gsap/PixiPlugin.js": 9712/*!*****************************************!*\ 9713 !*** ./node_modules/gsap/PixiPlugin.js ***! 9714 \*****************************************/ 9715/*! exports provided: PixiPlugin, default */ 9716/***/ (function(module, __webpack_exports__, __webpack_require__) { 9717 9718"use strict"; 9719__webpack_require__.r(__webpack_exports__); 9720/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PixiPlugin", function() { return PixiPlugin; }); 9721/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return PixiPlugin; }); 9722/*! 9723 * PixiPlugin 3.12.5 9724 * https://gsap.com 9725 * 9726 * @license Copyright 2008-2024, GreenSock. All rights reserved. 9727 * Subject to the terms at https://gsap.com/standard-license or for 9728 * Club GSAP members, the agreement issued with that membership. 9729 * @author: Jack Doyle, [email protected] 9730*/ 9731 9732/* eslint-disable */ 9733var gsap, 9734 _splitColor, 9735 _coreInitted, 9736 _PIXI, 9737 PropTween, 9738 _getSetter, 9739 _isV4, 9740 _windowExists = function _windowExists() { 9741 return typeof window !== "undefined"; 9742}, 9743 _getGSAP = function _getGSAP() { 9744 return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap; 9745}, 9746 _isFunction = function _isFunction(value) { 9747 return typeof value === "function"; 9748}, 9749 _warn = function _warn(message) { 9750 return console.warn(message); 9751}, 9752 _idMatrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0], 9753 _lumR = 0.212671, 9754 _lumG = 0.715160, 9755 _lumB = 0.072169, 9756 _filterClass = function _filterClass(name) { 9757 return _isFunction(_PIXI[name]) ? _PIXI[name] : _PIXI.filters[name]; 9758}, 9759 // in PIXI 7.1, filters moved from PIXI.filters to just PIXI 9760_applyMatrix = function _applyMatrix(m, m2) { 9761 var temp = [], 9762 i = 0, 9763 z = 0, 9764 y, 9765 x; 9766 9767 for (y = 0; y < 4; y++) { 9768 for (x = 0; x < 5; x++) { 9769 z = x === 4 ? m[i + 4] : 0; 9770 temp[i + x] = m[i] * m2[x] + m[i + 1] * m2[x + 5] + m[i + 2] * m2[x + 10] + m[i + 3] * m2[x + 15] + z; 9771 } 9772 9773 i += 5; 9774 } 9775 9776 return temp; 9777}, 9778 _setSaturation = function _setSaturation(m, n) { 9779 var inv = 1 - n, 9780 r = inv * _lumR, 9781 g = inv * _lumG, 9782 b = inv * _lumB; 9783 return _applyMatrix([r + n, g, b, 0, 0, r, g + n, b, 0, 0, r, g, b + n, 0, 0, 0, 0, 0, 1, 0], m); 9784}, 9785 _colorize = function _colorize(m, color, amount) { 9786 var c = _splitColor(color), 9787 r = c[0] / 255, 9788 g = c[1] / 255, 9789 b = c[2] / 255, 9790 inv = 1 - amount; 9791 9792 return _applyMatrix([inv + amount * r * _lumR, amount * r * _lumG, amount * r * _lumB, 0, 0, amount * g * _lumR, inv + amount * g * _lumG, amount * g * _lumB, 0, 0, amount * b * _lumR, amount * b * _lumG, inv + amount * b * _lumB, 0, 0, 0, 0, 0, 1, 0], m); 9793}, 9794 _setHue = function _setHue(m, n) { 9795 n *= Math.PI / 180; 9796 var c = Math.cos(n), 9797 s = Math.sin(n); 9798 return _applyMatrix([_lumR + c * (1 - _lumR) + s * -_lumR, _lumG + c * -_lumG + s * -_lumG, _lumB + c * -_lumB + s * (1 - _lumB), 0, 0, _lumR + c * -_lumR + s * 0.143, _lumG + c * (1 - _lumG) + s * 0.14, _lumB + c * -_lumB + s * -0.283, 0, 0, _lumR + c * -_lumR + s * -(1 - _lumR), _lumG + c * -_lumG + s * _lumG, _lumB + c * (1 - _lumB) + s * _lumB, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], m); 9799}, 9800 _setContrast = function _setContrast(m, n) { 9801 return _applyMatrix([n, 0, 0, 0, 0.5 * (1 - n), 0, n, 0, 0, 0.5 * (1 - n), 0, 0, n, 0, 0.5 * (1 - n), 0, 0, 0, 1, 0], m); 9802}, 9803 _getFilter = function _getFilter(target, type) { 9804 var filterClass = _filterClass(type), 9805 filters = target.filters || [], 9806 i = filters.length, 9807 filter; 9808 9809 filterClass || _warn(type + " not found. PixiPlugin.registerPIXI(PIXI)"); 9810 9811 while (--i > -1) { 9812 if (filters[i] instanceof filterClass) { 9813 return filters[i]; 9814 } 9815 } 9816 9817 filter = new filterClass(); 9818 9819 if (type === "BlurFilter") { 9820 filter.blur = 0; 9821 } 9822 9823 filters.push(filter); 9824 target.filters = filters; 9825 return filter; 9826}, 9827 _addColorMatrixFilterCacheTween = function _addColorMatrixFilterCacheTween(p, plugin, cache, vars) { 9828 //we cache the ColorMatrixFilter components in a _gsColorMatrixFilter object attached to the target object so that it's easy to grab the current value at any time. 9829 plugin.add(cache, p, cache[p], vars[p]); 9830 9831 plugin._props.push(p); 9832}, 9833 _applyBrightnessToMatrix = function _applyBrightnessToMatrix(brightness, matrix) { 9834 var filterClass = _filterClass("ColorMatrixFilter"), 9835 temp = new filterClass(); 9836 9837 temp.matrix = matrix; 9838 temp.brightness(brightness, true); 9839 return temp.matrix; 9840}, 9841 _copy = function _copy(obj) { 9842 var copy = {}, 9843 p; 9844 9845 for (p in obj) { 9846 copy[p] = obj[p]; 9847 } 9848 9849 return copy; 9850}, 9851 _CMFdefaults = { 9852 contrast: 1, 9853 saturation: 1, 9854 colorizeAmount: 0, 9855 colorize: "rgb(255,255,255)", 9856 hue: 0, 9857 brightness: 1 9858}, 9859 _parseColorMatrixFilter = function _parseColorMatrixFilter(target, v, pg) { 9860 var filter = _getFilter(target, "ColorMatrixFilter"), 9861 cache = target._gsColorMatrixFilter = target._gsColorMatrixFilter || _copy(_CMFdefaults), 9862 combine = v.combineCMF && !("colorMatrixFilter" in v && !v.colorMatrixFilter), 9863 i, 9864 matrix, 9865 startMatrix; 9866 9867 startMatrix = filter.matrix; 9868 9869 if (v.resolution) { 9870 filter.resolution = v.resolution; 9871 } 9872 9873 if (v.matrix && v.matrix.length === startMatrix.length) { 9874 matrix = v.matrix; 9875 9876 if (cache.contrast !== 1) { 9877 _addColorMatrixFilterCacheTween("contrast", pg, cache, _CMFdefaults); 9878 } 9879 9880 if (cache.hue) { 9881 _addColorMatrixFilterCacheTween("hue", pg, cache, _CMFdefaults); 9882 } 9883 9884 if (cache.brightness !== 1) { 9885 _addColorMatrixFilterCacheTween("brightness", pg, cache, _CMFdefaults); 9886 } 9887 9888 if (cache.colorizeAmount) { 9889 _addColorMatrixFilterCacheTween("colorize", pg, cache, _CMFdefaults); 9890 9891 _addColorMatrixFilterCacheTween("colorizeAmount", pg, cache, _CMFdefaults); 9892 } 9893 9894 if (cache.saturation !== 1) { 9895 _addColorMatrixFilterCacheTween("saturation", pg, cache, _CMFdefaults); 9896 } 9897 } else { 9898 matrix = _idMatrix.slice(); 9899 9900 if (v.contrast != null) { 9901 matrix = _setContrast(matrix, +v.contrast); 9902 9903 _addColorMatrixFilterCacheTween("contrast", pg, cache, v); 9904 } else if (cache.contrast !== 1) { 9905 if (combine) { 9906 matrix = _setContrast(matrix, cache.contrast); 9907 } else { 9908 _addColorMatrixFilterCacheTween("contrast", pg, cache, _CMFdefaults); 9909 } 9910 } 9911 9912 if (v.hue != null) { 9913 matrix = _setHue(matrix, +v.hue); 9914 9915 _addColorMatrixFilterCacheTween("hue", pg, cache, v); 9916 } else if (cache.hue) { 9917 if (combine) { 9918 matrix = _setHue(matrix, cache.hue); 9919 } else { 9920 _addColorMatrixFilterCacheTween("hue", pg, cache, _CMFdefaults); 9921 } 9922 } 9923 9924 if (v.brightness != null) { 9925 matrix = _applyBrightnessToMatrix(+v.brightness, matrix); 9926 9927 _addColorMatrixFilterCacheTween("brightness", pg, cache, v); 9928 } else if (cache.brightness !== 1) { 9929 if (combine) { 9930 matrix = _applyBrightnessToMatrix(cache.brightness, matrix); 9931 } else { 9932 _addColorMatrixFilterCacheTween("brightness", pg, cache, _CMFdefaults); 9933 } 9934 } 9935 9936 if (v.colorize != null) { 9937 v.colorizeAmount = "colorizeAmount" in v ? +v.colorizeAmount : 1; 9938 matrix = _colorize(matrix, v.colorize, v.colorizeAmount); 9939 9940 _addColorMatrixFilterCacheTween("colorize", pg, cache, v); 9941 9942 _addColorMatrixFilterCacheTween("colorizeAmount", pg, cache, v); 9943 } else if (cache.colorizeAmount) { 9944 if (combine) { 9945 matrix = _colorize(matrix, cache.colorize, cache.colorizeAmount); 9946 } else { 9947 _addColorMatrixFilterCacheTween("colorize", pg, cache, _CMFdefaults); 9948 9949 _addColorMatrixFilterCacheTween("colorizeAmount", pg, cache, _CMFdefaults); 9950 } 9951 } 9952 9953 if (v.saturation != null) { 9954 matrix = _setSaturation(matrix, +v.saturation); 9955 9956 _addColorMatrixFilterCacheTween("saturation", pg, cache, v); 9957 } else if (cache.saturation !== 1) { 9958 if (combine) { 9959 matrix = _setSaturation(matrix, cache.saturation); 9960 } else { 9961 _addColorMatrixFilterCacheTween("saturation", pg, cache, _CMFdefaults); 9962 } 9963 } 9964 } 9965 9966 i = matrix.length; 9967 9968 while (--i > -1) { 9969 if (matrix[i] !== startMatrix[i]) { 9970 pg.add(startMatrix, i, startMatrix[i], matrix[i], "colorMatrixFilter"); 9971 } 9972 } 9973 9974 pg._props.push("colorMatrixFilter"); 9975}, 9976 _renderColor = function _renderColor(ratio, _ref) { 9977 var t = _ref.t, 9978 p = _ref.p, 9979 color = _ref.color, 9980 set = _ref.set; 9981 set(t, p, color[0] << 16 | color[1] << 8 | color[2]); 9982}, 9983 _renderDirtyCache = function _renderDirtyCache(ratio, _ref2) { 9984 var g = _ref2.g; 9985 9986 if (g) { 9987 //in order for PixiJS to actually redraw GraphicsData, we've gotta increment the "dirty" and "clearDirty" values. If we don't do this, the values will be tween properly, but not rendered. 9988 g.dirty++; 9989 g.clearDirty++; 9990 } 9991}, 9992 _renderAutoAlpha = function _renderAutoAlpha(ratio, data) { 9993 data.t.visible = !!data.t.alpha; 9994}, 9995 _addColorTween = function _addColorTween(target, p, value, plugin) { 9996 var currentValue = target[p], 9997 startColor = _splitColor(_isFunction(currentValue) ? target[p.indexOf("set") || !_isFunction(target["get" + p.substr(3)]) ? p : "get" + p.substr(3)]() : currentValue), 9998 endColor = _splitColor(value); 9999 10000 plugin._pt = new PropTween(plugin._pt, target, p, 0, 0, _renderColor, { 10001 t: target, 10002 p: p, 10003 color: startColor, 10004 set: _getSetter(target, p) 10005 }); 10006 plugin.add(startColor, 0, startColor[0], endColor[0]); 10007 plugin.add(startColor, 1, startColor[1], endColor[1]); 10008 plugin.add(startColor, 2, startColor[2], endColor[2]); 10009}, 10010 _colorProps = { 10011 tint: 1, 10012 lineColor: 1, 10013 fillColor: 1 10014}, 10015 _xyContexts = "position,scale,skew,pivot,anchor,tilePosition,tileScale".split(","), 10016 _contexts = { 10017 x: "position", 10018 y: "position", 10019 tileX: "tilePosition", 10020 tileY: "tilePosition" 10021}, 10022 _colorMatrixFilterProps = { 10023 colorMatrixFilter: 1, 10024 saturation: 1, 10025 contrast: 1, 10026 hue: 1, 10027 colorize: 1, 10028 colorizeAmount: 1, 10029 brightness: 1, 10030 combineCMF: 1 10031}, 10032 _DEG2RAD = Math.PI / 180, 10033 _isString = function _isString(value) { 10034 return typeof value === "string"; 10035}, 10036 _degreesToRadians = function _degreesToRadians(value) { 10037 return _isString(value) && value.charAt(1) === "=" ? value.substr(0, 2) + parseFloat(value.substr(2)) * _DEG2RAD : value * _DEG2RAD; 10038}, 10039 _renderPropWithEnd = function _renderPropWithEnd(ratio, data) { 10040 return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 100000) / 100000, data); 10041}, 10042 _addRotationalPropTween = function _addRotationalPropTween(plugin, target, property, startNum, endValue, radians) { 10043 var cap = 360 * (radians ? _DEG2RAD : 1), 10044 isString = _isString(endValue), 10045 relative = isString && endValue.charAt(1) === "=" ? +(endValue.charAt(0) + "1") : 0, 10046 endNum = parseFloat(relative ? endValue.substr(2) : endValue) * (radians ? _DEG2RAD : 1), 10047 change = relative ? endNum * relative : endNum - startNum, 10048 finalValue = startNum + change, 10049 direction, 10050 pt; 10051 10052 if (isString) { 10053 direction = endValue.split("_")[1]; 10054 10055 if (direction === "short") { 10056 change %= cap; 10057 10058 if (change !== change % (cap / 2)) { 10059 change += change < 0 ? cap : -cap; 10060 } 10061 } 10062 10063 if (direction === "cw" && change < 0) { 10064 change = (change + cap * 1e10) % cap - ~~(change / cap) * cap; 10065 } else if (direction === "ccw" && change > 0) { 10066 change = (change - cap * 1e10) % cap - ~~(change / cap) * cap; 10067 } 10068 } 10069 10070 plugin._pt = pt = new PropTween(plugin._pt, target, property, startNum, change, _renderPropWithEnd); 10071 pt.e = finalValue; 10072 return pt; 10073}, 10074 _initCore = function _initCore() { 10075 if (!_coreInitted) { 10076 gsap = _getGSAP(); 10077 _PIXI = _coreInitted = _PIXI || _windowExists() && window.PIXI; 10078 _isV4 = _PIXI && _PIXI.VERSION && _PIXI.VERSION.charAt(0) === "4"; 10079 10080 _splitColor = function _splitColor(color) { 10081 return gsap.utils.splitColor((color + "").substr(0, 2) === "0x" ? "#" + color.substr(2) : color); 10082 }; // some colors in PIXI are reported as "0xFF4421" instead of "#FF4421". 10083 10084 } 10085}, 10086 i, 10087 p; //context setup... 10088 10089 10090for (i = 0; i < _xyContexts.length; i++) { 10091 p = _xyContexts[i]; 10092 _contexts[p + "X"] = p; 10093 _contexts[p + "Y"] = p; 10094} 10095 10096var PixiPlugin = { 10097 version: "3.12.5", 10098 name: "pixi", 10099 register: function register(core, Plugin, propTween) { 10100 gsap = core; 10101 PropTween = propTween; 10102 _getSetter = Plugin.getSetter; 10103 10104 _initCore(); 10105 }, 10106 headless: true, 10107 // doesn't need window 10108 registerPIXI: function registerPIXI(pixi) { 10109 _PIXI = pixi; 10110 }, 10111 init: function init(target, values, tween, index, targets) { 10112 _PIXI || _initCore(); 10113 10114 if (!_PIXI) { 10115 _warn("PIXI was not found. PixiPlugin.registerPIXI(PIXI);"); 10116 10117 return false; 10118 } 10119 10120 var context, axis, value, colorMatrix, filter, p, padding, i, data; 10121 10122 for (p in values) { 10123 context = _contexts[p]; 10124 value = values[p]; 10125 10126 if (context) { 10127 axis = ~p.charAt(p.length - 1).toLowerCase().indexOf("x") ? "x" : "y"; 10128 this.add(target[context], axis, target[context][axis], context === "skew" ? _degreesToRadians(value) : value, 0, 0, 0, 0, 0, 1); 10129 } else if (p === "scale" || p === "anchor" || p === "pivot" || p === "tileScale") { 10130 this.add(target[p], "x", target[p].x, value); 10131 this.add(target[p], "y", target[p].y, value); 10132 } else if (p === "rotation" || p === "angle") { 10133 //PIXI expects rotation in radians, but as a convenience we let folks define it in degrees and we do the conversion. 10134 _addRotationalPropTween(this, target, p, target[p], value, p === "rotation"); 10135 } else if (_colorMatrixFilterProps[p]) { 10136 if (!colorMatrix) { 10137 _parseColorMatrixFilter(target, values.colorMatrixFilter || values, this); 10138 10139 colorMatrix = true; 10140 } 10141 } else if (p === "blur" || p === "blurX" || p === "blurY" || p === "blurPadding") { 10142 filter = _getFilter(target, "BlurFilter"); 10143 this.add(filter, p, filter[p], value); 10144 10145 if (values.blurPadding !== 0) { 10146 padding = values.blurPadding || Math.max(filter[p], value) * 2; 10147 i = target.filters.length; 10148 10149 while (--i > -1) { 10150 target.filters[i].padding = Math.max(target.filters[i].padding, padding); //if we don't expand the padding on all the filters, it can look clipped. 10151 } 10152 } 10153 } else if (_colorProps[p]) { 10154 if ((p === "lineColor" || p === "fillColor") && target instanceof _PIXI.Graphics) { 10155 data = (target.geometry || target).graphicsData; //"geometry" was introduced in PIXI version 5 10156 10157 this._pt = new PropTween(this._pt, target, p, 0, 0, _renderDirtyCache, { 10158 g: target.geometry || target 10159 }); 10160 i = data.length; 10161 10162 while (--i > -1) { 10163 _addColorTween(_isV4 ? data[i] : data[i][p.substr(0, 4) + "Style"], _isV4 ? p : "color", value, this); 10164 } 10165 } else { 10166 _addColorTween(target, p, value, this); 10167 } 10168 } else if (p === "autoAlpha") { 10169 this._pt = new PropTween(this._pt, target, "visible", 0, 0, _renderAutoAlpha); 10170 this.add(target, "alpha", target.alpha, value); 10171 10172 this._props.push("alpha", "visible"); 10173 } else if (p !== "resolution") { 10174 this.add(target, p, "get", value); 10175 } 10176 10177 this._props.push(p); 10178 } 10179 } 10180}; 10181_getGSAP() && gsap.registerPlugin(PixiPlugin); 10182 10183 10184/***/ }), 10185
vendor: 9,546 bytes, lines 10186-10472
10186/***/ "./node_modules/gsap/ScrollToPlugin.js": 10187/*!*********************************************!*\ 10188 !*** ./node_modules/gsap/ScrollToPlugin.js ***! 10189 \*********************************************/ 10190/*! exports provided: ScrollToPlugin, default */ 10191/***/ (function(module, __webpack_exports__, __webpack_require__) { 10192 10193"use strict"; 10194__webpack_require__.r(__webpack_exports__); 10195/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollToPlugin", function() { return ScrollToPlugin; }); 10196/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ScrollToPlugin; }); 10197/*! 10198 * ScrollToPlugin 3.12.5 10199 * https://gsap.com 10200 * 10201 * @license Copyright 2008-2024, GreenSock. All rights reserved. 10202 * Subject to the terms at https://gsap.com/standard-license or for 10203 * Club GSAP members, the agreement issued with that membership. 10204 * @author: Jack Doyle, [email protected] 10205*/ 10206 10207/* eslint-disable */ 10208var gsap, 10209 _coreInitted, 10210 _window, 10211 _docEl, 10212 _body, 10213 _toArray, 10214 _config, 10215 ScrollTrigger, 10216 _windowExists = function _windowExists() { 10217 return typeof window !== "undefined"; 10218}, 10219 _getGSAP = function _getGSAP() { 10220 return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap; 10221}, 10222 _isString = function _isString(value) { 10223 return typeof value === "string"; 10224}, 10225 _isFunction = function _isFunction(value) { 10226 return typeof value === "function"; 10227}, 10228 _max = function _max(element, axis) { 10229 var dim = axis === "x" ? "Width" : "Height", 10230 scroll = "scroll" + dim, 10231 client = "client" + dim; 10232 return element === _window || element === _docEl || element === _body ? Math.max(_docEl[scroll], _body[scroll]) - (_window["inner" + dim] || _docEl[client] || _body[client]) : element[scroll] - element["offset" + dim]; 10233}, 10234 _buildGetter = function _buildGetter(e, axis) { 10235 //pass in an element and an axis ("x" or "y") and it'll return a getter function for the scroll position of that element (like scrollTop or scrollLeft, although if the element is the window, it'll use the pageXOffset/pageYOffset or the documentElement's scrollTop/scrollLeft or document.body's. Basically this streamlines things and makes a very fast getter across browsers. 10236 var p = "scroll" + (axis === "x" ? "Left" : "Top"); 10237 10238 if (e === _window) { 10239 if (e.pageXOffset != null) { 10240 p = "page" + axis.toUpperCase() + "Offset"; 10241 } else { 10242 e = _docEl[p] != null ? _docEl : _body; 10243 } 10244 } 10245 10246 return function () { 10247 return e[p]; 10248 }; 10249}, 10250 _clean = function _clean(value, index, target, targets) { 10251 _isFunction(value) && (value = value(index, target, targets)); 10252 10253 if (typeof value !== "object") { 10254 return _isString(value) && value !== "max" && value.charAt(1) !== "=" ? { 10255 x: value, 10256 y: value 10257 } : { 10258 y: value 10259 }; //if we don't receive an object as the parameter, assume the user intends "y". 10260 } else if (value.nodeType) { 10261 return { 10262 y: value, 10263 x: value 10264 }; 10265 } else { 10266 var result = {}, 10267 p; 10268 10269 for (p in value) { 10270 result[p] = p !== "onAutoKill" && _isFunction(value[p]) ? value[p](index, target, targets) : value[p]; 10271 } 10272 10273 return result; 10274 } 10275}, 10276 _getOffset = function _getOffset(element, container) { 10277 element = _toArray(element)[0]; 10278 10279 if (!element || !element.getBoundingClientRect) { 10280 return console.warn("scrollTo target doesn't exist. Using 0") || { 10281 x: 0, 10282 y: 0 10283 }; 10284 } 10285 10286 var rect = element.getBoundingClientRect(), 10287 isRoot = !container || container === _window || container === _body, 10288 cRect = isRoot ? { 10289 top: _docEl.clientTop - (_window.pageYOffset || _docEl.scrollTop || _body.scrollTop || 0), 10290 left: _docEl.clientLeft - (_window.pageXOffset || _docEl.scrollLeft || _body.scrollLeft || 0) 10291 } : container.getBoundingClientRect(), 10292 offsets = { 10293 x: rect.left - cRect.left, 10294 y: rect.top - cRect.top 10295 }; 10296 10297 if (!isRoot && container) { 10298 //only add the current scroll position if it's not the window/body. 10299 offsets.x += _buildGetter(container, "x")(); 10300 offsets.y += _buildGetter(container, "y")(); 10301 } 10302 10303 return offsets; 10304}, 10305 _parseVal = function _parseVal(value, target, axis, currentVal, offset) { 10306 return !isNaN(value) && typeof value !== "object" ? parseFloat(value) - offset : _isString(value) && value.charAt(1) === "=" ? parseFloat(value.substr(2)) * (value.charAt(0) === "-" ? -1 : 1) + currentVal - offset : value === "max" ? _max(target, axis) - offset : Math.min(_max(target, axis), _getOffset(value, target)[axis] - offset); 10307}, 10308 _initCore = function _initCore() { 10309 gsap = _getGSAP(); 10310 10311 if (_windowExists() && gsap && typeof document !== "undefined" && document.body) { 10312 _window = window; 10313 _body = document.body; 10314 _docEl = document.documentElement; 10315 _toArray = gsap.utils.toArray; 10316 gsap.config({ 10317 autoKillThreshold: 7 10318 }); 10319 _config = gsap.config(); 10320 _coreInitted = 1; 10321 } 10322}; 10323 10324var ScrollToPlugin = { 10325 version: "3.12.5", 10326 name: "scrollTo", 10327 rawVars: 1, 10328 register: function register(core) { 10329 gsap = core; 10330 10331 _initCore(); 10332 }, 10333 init: function init(target, value, tween, index, targets) { 10334 _coreInitted || _initCore(); 10335 var data = this, 10336 snapType = gsap.getProperty(target, "scrollSnapType"); 10337 data.isWin = target === _window; 10338 data.target = target; 10339 data.tween = tween; 10340 value = _clean(value, index, target, targets); 10341 data.vars = value; 10342 data.autoKill = !!value.autoKill; 10343 data.getX = _buildGetter(target, "x"); 10344 data.getY = _buildGetter(target, "y"); 10345 data.x = data.xPrev = data.getX(); 10346 data.y = data.yPrev = data.getY(); 10347 ScrollTrigger || (ScrollTrigger = gsap.core.globals().ScrollTrigger); 10348 gsap.getProperty(target, "scrollBehavior") === "smooth" && gsap.set(target, { 10349 scrollBehavior: "auto" 10350 }); 10351 10352 if (snapType && snapType !== "none") { 10353 // disable scroll snapping to avoid strange behavior 10354 data.snap = 1; 10355 data.snapInline = target.style.scrollSnapType; 10356 target.style.scrollSnapType = "none"; 10357 } 10358 10359 if (value.x != null) { 10360 data.add(data, "x", data.x, _parseVal(value.x, target, "x", data.x, value.offsetX || 0), index, targets); 10361 10362 data._props.push("scrollTo_x"); 10363 } else { 10364 data.skipX = 1; 10365 } 10366 10367 if (value.y != null) { 10368 data.add(data, "y", data.y, _parseVal(value.y, target, "y", data.y, value.offsetY || 0), index, targets); 10369 10370 data._props.push("scrollTo_y"); 10371 } else { 10372 data.skipY = 1; 10373 } 10374 }, 10375 render: function render(ratio, data) { 10376 var pt = data._pt, 10377 target = data.target, 10378 tween = data.tween, 10379 autoKill = data.autoKill, 10380 xPrev = data.xPrev, 10381 yPrev = data.yPrev, 10382 isWin = data.isWin, 10383 snap = data.snap, 10384 snapInline = data.snapInline, 10385 x, 10386 y, 10387 yDif, 10388 xDif, 10389 threshold; 10390 10391 while (pt) { 10392 pt.r(ratio, pt.d); 10393 pt = pt._next; 10394 } 10395 10396 x = isWin || !data.skipX ? data.getX() : xPrev; 10397 y = isWin || !data.skipY ? data.getY() : yPrev; 10398 yDif = y - yPrev; 10399 xDif = x - xPrev; 10400 threshold = _config.autoKillThreshold; 10401 10402 if (data.x < 0) { 10403 //can't scroll to a position less than 0! Might happen if someone uses a Back.easeOut or Elastic.easeOut when scrolling back to the top of the page (for example) 10404 data.x = 0; 10405 } 10406 10407 if (data.y < 0) { 10408 data.y = 0; 10409 } 10410 10411 if (autoKill) { 10412 //note: iOS has a bug that throws off the scroll by several pixels, so we need to check if it's within 7 pixels of the previous one that we set instead of just looking for an exact match. 10413 if (!data.skipX && (xDif > threshold || xDif < -threshold) && x < _max(target, "x")) { 10414 data.skipX = 1; //if the user scrolls separately, we should stop tweening! 10415 } 10416 10417 if (!data.skipY && (yDif > threshold || yDif < -threshold) && y < _max(target, "y")) { 10418 data.skipY = 1; //if the user scrolls separately, we should stop tweening! 10419 } 10420 10421 if (data.skipX && data.skipY) { 10422 tween.kill(); 10423 data.vars.onAutoKill && data.vars.onAutoKill.apply(tween, data.vars.onAutoKillParams || []); 10424 } 10425 } 10426 10427 if (isWin) { 10428 _window.scrollTo(!data.skipX ? data.x : x, !data.skipY ? data.y : y); 10429 } else { 10430 data.skipY || (target.scrollTop = data.y); 10431 data.skipX || (target.scrollLeft = data.x); 10432 } 10433 10434 if (snap && (ratio === 1 || ratio === 0)) { 10435 y = target.scrollTop; 10436 x = target.scrollLeft; 10437 snapInline ? target.style.scrollSnapType = snapInline : target.style.removeProperty("scroll-snap-type"); 10438 target.scrollTop = y + 1; // bug in Safari causes the element to totally reset its scroll position when scroll-snap-type changes, so we need to set it to a slightly different value and then back again to work around this bug. 10439 10440 target.scrollLeft = x + 1; 10441 target.scrollTop = y; 10442 target.scrollLeft = x; 10443 } 10444 10445 data.xPrev = data.x; 10446 data.yPrev = data.y; 10447 ScrollTrigger && ScrollTrigger.update(); 10448 }, 10449 kill: function kill(property) { 10450 var both = property === "scrollTo", 10451 i = this._props.indexOf(property); 10452 10453 if (both || property === "scrollTo_x") { 10454 this.skipX = 1; 10455 } 10456 10457 if (both || property === "scrollTo_y") { 10458 this.skipY = 1; 10459 } 10460 10461 i > -1 && this._props.splice(i, 1); 10462 return !this._props.length; 10463 } 10464}; 10465ScrollToPlugin.max = _max; 10466ScrollToPlugin.getOffset = _getOffset; 10467ScrollToPlugin.buildGetter = _buildGetter; 10468_getGSAP() && gsap.registerPlugin(ScrollToPlugin); 10469 10470 10471/***/ }), 10472
vendor: 115,002 bytes, lines 10473-13145
10473/***/ "./node_modules/gsap/ScrollTrigger.js": 10474/*!********************************************!*\ 10475 !*** ./node_modules/gsap/ScrollTrigger.js ***! 10476 \********************************************/ 10477/*! exports provided: ScrollTrigger, default */ 10478/***/ (function(module, __webpack_exports__, __webpack_require__) { 10479 10480"use strict"; 10481__webpack_require__.r(__webpack_exports__); 10482/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ScrollTrigger", function() { return ScrollTrigger; }); 10483/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return ScrollTrigger; }); 10484/* harmony import */ var _Observer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Observer.js */ "./node_modules/gsap/Observer.js"); 10485/*! 10486 * ScrollTrigger 3.12.5 10487 * https://gsap.com 10488 * 10489 * @license Copyright 2008-2024, GreenSock. All rights reserved. 10490 * Subject to the terms at https://gsap.com/standard-license or for 10491 * Club GSAP members, the agreement issued with that membership. 10492 * @author: Jack Doyle, [email protected] 10493*/ 10494 10495/* eslint-disable */ 10496 10497 10498var gsap, 10499 _coreInitted, 10500 _win, 10501 _doc, 10502 _docEl, 10503 _body, 10504 _root, 10505 _resizeDelay, 10506 _toArray, 10507 _clamp, 10508 _time2, 10509 _syncInterval, 10510 _refreshing, 10511 _pointerIsDown, 10512 _transformProp, 10513 _i, 10514 _prevWidth, 10515 _prevHeight, 10516 _autoRefresh, 10517 _sort, 10518 _suppressOverwrites, 10519 _ignoreResize, 10520 _normalizer, 10521 _ignoreMobileResize, 10522 _baseScreenHeight, 10523 _baseScreenWidth, 10524 _fixIOSBug, 10525 _context, 10526 _scrollRestoration, 10527 _div100vh, 10528 _100vh, 10529 _isReverted, 10530 _clampingMax, 10531 _limitCallbacks, 10532 // if true, we'll only trigger callbacks if the active state toggles, so if you scroll immediately past both the start and end positions of a ScrollTrigger (thus inactive to inactive), neither its onEnter nor onLeave will be called. This is useful during startup. 10533_startup = 1, 10534 _getTime = Date.now, 10535 _time1 = _getTime(), 10536 _lastScrollTime = 0, 10537 _enabled = 0, 10538 _parseClamp = function _parseClamp(value, type, self) { 10539 var clamp = _isString(value) && (value.substr(0, 6) === "clamp(" || value.indexOf("max") > -1); 10540 self["_" + type + "Clamp"] = clamp; 10541 return clamp ? value.substr(6, value.length - 7) : value; 10542}, 10543 _keepClamp = function _keepClamp(value, clamp) { 10544 return clamp && (!_isString(value) || value.substr(0, 6) !== "clamp(") ? "clamp(" + value + ")" : value; 10545}, 10546 _rafBugFix = function _rafBugFix() { 10547 return _enabled && requestAnimationFrame(_rafBugFix); 10548}, 10549 // in some browsers (like Firefox), screen repaints weren't consistent unless we had SOMETHING queued up in requestAnimationFrame()! So this just creates a super simple loop to keep it alive and smooth out repaints. 10550_pointerDownHandler = function _pointerDownHandler() { 10551 return _pointerIsDown = 1; 10552}, 10553 _pointerUpHandler = function _pointerUpHandler() { 10554 return _pointerIsDown = 0; 10555}, 10556 _passThrough = function _passThrough(v) { 10557 return v; 10558}, 10559 _round = function _round(value) { 10560 return Math.round(value * 100000) / 100000 || 0; 10561}, 10562 _windowExists = function _windowExists() { 10563 return typeof window !== "undefined"; 10564}, 10565 _getGSAP = function _getGSAP() { 10566 return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap; 10567}, 10568 _isViewport = function _isViewport(e) { 10569 return !!~_root.indexOf(e); 10570}, 10571 _getViewportDimension = function _getViewportDimension(dimensionProperty) { 10572 return (dimensionProperty === "Height" ? _100vh : _win["inner" + dimensionProperty]) || _docEl["client" + dimensionProperty] || _body["client" + dimensionProperty]; 10573}, 10574 _getBoundsFunc = function _getBoundsFunc(element) { 10575 return Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getProxyProp"])(element, "getBoundingClientRect") || (_isViewport(element) ? function () { 10576 _winOffsets.width = _win.innerWidth; 10577 _winOffsets.height = _100vh; 10578 return _winOffsets; 10579 } : function () { 10580 return _getBounds(element); 10581 }); 10582}, 10583 _getSizeFunc = function _getSizeFunc(scroller, isViewport, _ref) { 10584 var d = _ref.d, 10585 d2 = _ref.d2, 10586 a = _ref.a; 10587 return (a = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getProxyProp"])(scroller, "getBoundingClientRect")) ? function () { 10588 return a()[d]; 10589 } : function () { 10590 return (isViewport ? _getViewportDimension(d2) : scroller["client" + d2]) || 0; 10591 }; 10592}, 10593 _getOffsetsFunc = function _getOffsetsFunc(element, isViewport) { 10594 return !isViewport || ~_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_proxies"].indexOf(element) ? _getBoundsFunc(element) : function () { 10595 return _winOffsets; 10596 }; 10597}, 10598 _maxScroll = function _maxScroll(element, _ref2) { 10599 var s = _ref2.s, 10600 d2 = _ref2.d2, 10601 d = _ref2.d, 10602 a = _ref2.a; 10603 return Math.max(0, (s = "scroll" + d2) && (a = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getProxyProp"])(element, s)) ? a() - _getBoundsFunc(element)()[d] : _isViewport(element) ? (_docEl[s] || _body[s]) - _getViewportDimension(d2) : element[s] - element["offset" + d2]); 10604}, 10605 _iterateAutoRefresh = function _iterateAutoRefresh(func, events) { 10606 for (var i = 0; i < _autoRefresh.length; i += 3) { 10607 (!events || ~events.indexOf(_autoRefresh[i + 1])) && func(_autoRefresh[i], _autoRefresh[i + 1], _autoRefresh[i + 2]); 10608 } 10609}, 10610 _isString = function _isString(value) { 10611 return typeof value === "string"; 10612}, 10613 _isFunction = function _isFunction(value) { 10614 return typeof value === "function"; 10615}, 10616 _isNumber = function _isNumber(value) { 10617 return typeof value === "number"; 10618}, 10619 _isObject = function _isObject(value) { 10620 return typeof value === "object"; 10621}, 10622 _endAnimation = function _endAnimation(animation, reversed, pause) { 10623 return animation && animation.progress(reversed ? 0 : 1) && pause && animation.pause(); 10624}, 10625 _callback = function _callback(self, func) { 10626 if (self.enabled) { 10627 var result = self._ctx ? self._ctx.add(function () { 10628 return func(self); 10629 }) : func(self); 10630 result && result.totalTime && (self.callbackAnimation = result); 10631 } 10632}, 10633 _abs = Math.abs, 10634 _left = "left", 10635 _top = "top", 10636 _right = "right", 10637 _bottom = "bottom", 10638 _width = "width", 10639 _height = "height", 10640 _Right = "Right", 10641 _Left = "Left", 10642 _Top = "Top", 10643 _Bottom = "Bottom", 10644 _padding = "padding", 10645 _margin = "margin", 10646 _Width = "Width", 10647 _Height = "Height", 10648 _px = "px", 10649 _getComputedStyle = function _getComputedStyle(element) { 10650 return _win.getComputedStyle(element); 10651}, 10652 _makePositionable = function _makePositionable(element) { 10653 // if the element already has position: absolute or fixed, leave that, otherwise make it position: relative 10654 var position = _getComputedStyle(element).position; 10655 10656 element.style.position = position === "absolute" || position === "fixed" ? position : "relative"; 10657}, 10658 _setDefaults = function _setDefaults(obj, defaults) { 10659 for (var p in defaults) { 10660 p in obj || (obj[p] = defaults[p]); 10661 } 10662 10663 return obj; 10664}, 10665 _getBounds = function _getBounds(element, withoutTransforms) { 10666 var tween = withoutTransforms && _getComputedStyle(element)[_transformProp] !== "matrix(1, 0, 0, 1, 0, 0)" && gsap.to(element, { 10667 x: 0, 10668 y: 0, 10669 xPercent: 0, 10670 yPercent: 0, 10671 rotation: 0, 10672 rotationX: 0, 10673 rotationY: 0, 10674 scale: 1, 10675 skewX: 0, 10676 skewY: 0 10677 }).progress(1), 10678 bounds = element.getBoundingClientRect(); 10679 tween && tween.progress(0).kill(); 10680 return bounds; 10681}, 10682 _getSize = function _getSize(element, _ref3) { 10683 var d2 = _ref3.d2; 10684 return element["offset" + d2] || element["client" + d2] || 0; 10685}, 10686 _getLabelRatioArray = function _getLabelRatioArray(timeline) { 10687 var a = [], 10688 labels = timeline.labels, 10689 duration = timeline.duration(), 10690 p; 10691 10692 for (p in labels) { 10693 a.push(labels[p] / duration); 10694 } 10695 10696 return a; 10697}, 10698 _getClosestLabel = function _getClosestLabel(animation) { 10699 return function (value) { 10700 return gsap.utils.snap(_getLabelRatioArray(animation), value); 10701 }; 10702}, 10703 _snapDirectional = function _snapDirectional(snapIncrementOrArray) { 10704 var snap = gsap.utils.snap(snapIncrementOrArray), 10705 a = Array.isArray(snapIncrementOrArray) && snapIncrementOrArray.slice(0).sort(function (a, b) { 10706 return a - b; 10707 }); 10708 return a ? function (value, direction, threshold) { 10709 if (threshold === void 0) { 10710 threshold = 1e-3; 10711 } 10712 10713 var i; 10714 10715 if (!direction) { 10716 return snap(value); 10717 } 10718 10719 if (direction > 0) { 10720 value -= threshold; // to avoid rounding errors. If we're too strict, it might snap forward, then immediately again, and again. 10721 10722 for (i = 0; i < a.length; i++) { 10723 if (a[i] >= value) { 10724 return a[i]; 10725 } 10726 } 10727 10728 return a[i - 1]; 10729 } else { 10730 i = a.length; 10731 value += threshold; 10732 10733 while (i--) { 10734 if (a[i] <= value) { 10735 return a[i]; 10736 } 10737 } 10738 } 10739 10740 return a[0]; 10741 } : function (value, direction, threshold) { 10742 if (threshold === void 0) { 10743 threshold = 1e-3; 10744 } 10745 10746 var snapped = snap(value); 10747 return !direction || Math.abs(snapped - value) < threshold || snapped - value < 0 === direction < 0 ? snapped : snap(direction < 0 ? value - snapIncrementOrArray : value + snapIncrementOrArray); 10748 }; 10749}, 10750 _getLabelAtDirection = function _getLabelAtDirection(timeline) { 10751 return function (value, st) { 10752 return _snapDirectional(_getLabelRatioArray(timeline))(value, st.direction); 10753 }; 10754}, 10755 _multiListener = function _multiListener(func, element, types, callback) { 10756 return types.split(",").forEach(function (type) { 10757 return func(element, type, callback); 10758 }); 10759}, 10760 _addListener = function _addListener(element, type, func, nonPassive, capture) { 10761 return element.addEventListener(type, func, { 10762 passive: !nonPassive, 10763 capture: !!capture 10764 }); 10765}, 10766 _removeListener = function _removeListener(element, type, func, capture) { 10767 return element.removeEventListener(type, func, !!capture); 10768}, 10769 _wheelListener = function _wheelListener(func, el, scrollFunc) { 10770 scrollFunc = scrollFunc && scrollFunc.wheelHandler; 10771 10772 if (scrollFunc) { 10773 func(el, "wheel", scrollFunc); 10774 func(el, "touchmove", scrollFunc); 10775 } 10776}, 10777 _markerDefaults = { 10778 startColor: "green", 10779 endColor: "red", 10780 indent: 0, 10781 fontSize: "16px", 10782 fontWeight: "normal" 10783}, 10784 _defaults = { 10785 toggleActions: "play", 10786 anticipatePin: 0 10787}, 10788 _keywords = { 10789 top: 0, 10790 left: 0, 10791 center: 0.5, 10792 bottom: 1, 10793 right: 1 10794}, 10795 _offsetToPx = function _offsetToPx(value, size) { 10796 if (_isString(value)) { 10797 var eqIndex = value.indexOf("="), 10798 relative = ~eqIndex ? +(value.charAt(eqIndex - 1) + 1) * parseFloat(value.substr(eqIndex + 1)) : 0; 10799 10800 if (~eqIndex) { 10801 value.indexOf("%") > eqIndex && (relative *= size / 100); 10802 value = value.substr(0, eqIndex - 1); 10803 } 10804 10805 value = relative + (value in _keywords ? _keywords[value] * size : ~value.indexOf("%") ? parseFloat(value) * size / 100 : parseFloat(value) || 0); 10806 } 10807 10808 return value; 10809}, 10810 _createMarker = function _createMarker(type, name, container, direction, _ref4, offset, matchWidthEl, containerAnimation) { 10811 var startColor = _ref4.startColor, 10812 endColor = _ref4.endColor, 10813 fontSize = _ref4.fontSize, 10814 indent = _ref4.indent, 10815 fontWeight = _ref4.fontWeight; 10816 10817 var e = _doc.createElement("div"), 10818 useFixedPosition = _isViewport(container) || Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getProxyProp"])(container, "pinType") === "fixed", 10819 isScroller = type.indexOf("scroller") !== -1, 10820 parent = useFixedPosition ? _body : container, 10821 isStart = type.indexOf("start") !== -1, 10822 color = isStart ? startColor : endColor, 10823 css = "border-color:" + color + ";font-size:" + fontSize + ";color:" + color + ";font-weight:" + fontWeight + ";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;"; 10824 10825 css += "position:" + ((isScroller || containerAnimation) && useFixedPosition ? "fixed;" : "absolute;"); 10826 (isScroller || containerAnimation || !useFixedPosition) && (css += (direction === _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"] ? _right : _bottom) + ":" + (offset + parseFloat(indent)) + "px;"); 10827 matchWidthEl && (css += "box-sizing:border-box;text-align:left;width:" + matchWidthEl.offsetWidth + "px;"); 10828 e._isStart = isStart; 10829 e.setAttribute("class", "gsap-marker-" + type + (name ? " marker-" + name : "")); 10830 e.style.cssText = css; 10831 e.innerText = name || name === 0 ? type + "-" + name : type; 10832 parent.children[0] ? parent.insertBefore(e, parent.children[0]) : parent.appendChild(e); 10833 e._offset = e["offset" + direction.op.d2]; 10834 10835 _positionMarker(e, 0, direction, isStart); 10836 10837 return e; 10838}, 10839 _positionMarker = function _positionMarker(marker, start, direction, flipped) { 10840 var vars = { 10841 display: "block" 10842 }, 10843 side = direction[flipped ? "os2" : "p2"], 10844 oppositeSide = direction[flipped ? "p2" : "os2"]; 10845 marker._isFlipped = flipped; 10846 vars[direction.a + "Percent"] = flipped ? -100 : 0; 10847 vars[direction.a] = flipped ? "1px" : 0; 10848 vars["border" + side + _Width] = 1; 10849 vars["border" + oppositeSide + _Width] = 0; 10850 vars[direction.p] = start + "px"; 10851 gsap.set(marker, vars); 10852}, 10853 _triggers = [], 10854 _ids = {}, 10855 _rafID, 10856 _sync = function _sync() { 10857 return _getTime() - _lastScrollTime > 34 && (_rafID || (_rafID = requestAnimationFrame(_updateAll))); 10858}, 10859 _onScroll = function _onScroll() { 10860 // previously, we tried to optimize performance by batching/deferring to the next requestAnimationFrame(), but discovered that Safari has a few bugs that make this unworkable (especially on iOS). See https://codepen.io/GreenSock/pen/16c435b12ef09c38125204818e7b45fc?editors=0010 and https://codepen.io/GreenSock/pen/JjOxYpQ/3dd65ccec5a60f1d862c355d84d14562?editors=0010 and https://codepen.io/GreenSock/pen/ExbrPNa/087cef197dc35445a0951e8935c41503?editors=0010 10861 if (!_normalizer || !_normalizer.isPressed || _normalizer.startX > _body.clientWidth) { 10862 // if the user is dragging the scrollbar, allow it. 10863 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].cache++; 10864 10865 if (_normalizer) { 10866 _rafID || (_rafID = requestAnimationFrame(_updateAll)); 10867 } else { 10868 _updateAll(); // Safari in particular (on desktop) NEEDS the immediate update rather than waiting for a requestAnimationFrame() whereas iOS seems to benefit from waiting for the requestAnimationFrame() tick, at least when normalizing. See https://codepen.io/GreenSock/pen/qBYozqO?editors=0110 10869 10870 } 10871 10872 _lastScrollTime || _dispatch("scrollStart"); 10873 _lastScrollTime = _getTime(); 10874 } 10875}, 10876 _setBaseDimensions = function _setBaseDimensions() { 10877 _baseScreenWidth = _win.innerWidth; 10878 _baseScreenHeight = _win.innerHeight; 10879}, 10880 _onResize = function _onResize() { 10881 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].cache++; 10882 !_refreshing && !_ignoreResize && !_doc.fullscreenElement && !_doc.webkitFullscreenElement && (!_ignoreMobileResize || _baseScreenWidth !== _win.innerWidth || Math.abs(_win.innerHeight - _baseScreenHeight) > _win.innerHeight * 0.25) && _resizeDelay.restart(true); 10883}, 10884 // ignore resizes triggered by refresh() 10885_listeners = {}, 10886 _emptyArray = [], 10887 _softRefresh = function _softRefresh() { 10888 return _removeListener(ScrollTrigger, "scrollEnd", _softRefresh) || _refreshAll(true); 10889}, 10890 _dispatch = function _dispatch(type) { 10891 return _listeners[type] && _listeners[type].map(function (f) { 10892 return f(); 10893 }) || _emptyArray; 10894}, 10895 _savedStyles = [], 10896 // when ScrollTrigger.saveStyles() is called, the inline styles are recorded in this Array in a sequential format like [element, cssText, gsCache, media]. This keeps it very memory-efficient and fast to iterate through. 10897_revertRecorded = function _revertRecorded(media) { 10898 for (var i = 0; i < _savedStyles.length; i += 5) { 10899 if (!media || _savedStyles[i + 4] && _savedStyles[i + 4].query === media) { 10900 _savedStyles[i].style.cssText = _savedStyles[i + 1]; 10901 _savedStyles[i].getBBox && _savedStyles[i].setAttribute("transform", _savedStyles[i + 2] || ""); 10902 _savedStyles[i + 3].uncache = 1; 10903 } 10904 } 10905}, 10906 _revertAll = function _revertAll(kill, media) { 10907 var trigger; 10908 10909 for (_i = 0; _i < _triggers.length; _i++) { 10910 trigger = _triggers[_i]; 10911 10912 if (trigger && (!media || trigger._ctx === media)) { 10913 if (kill) { 10914 trigger.kill(1); 10915 } else { 10916 trigger.revert(true, true); 10917 } 10918 } 10919 } 10920 10921 _isReverted = true; 10922 media && _revertRecorded(media); 10923 media || _dispatch("revert"); 10924}, 10925 _clearScrollMemory = function _clearScrollMemory(scrollRestoration, force) { 10926 // zero-out all the recorded scroll positions. Don't use _triggers because if, for example, .matchMedia() is used to create some ScrollTriggers and then the user resizes and it removes ALL ScrollTriggers, and then go back to a size where there are ScrollTriggers, it would have kept the position(s) saved from the initial state. 10927 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].cache++; 10928 (force || !_refreshingAll) && _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].forEach(function (obj) { 10929 return _isFunction(obj) && obj.cacheID++ && (obj.rec = 0); 10930 }); 10931 _isString(scrollRestoration) && (_win.history.scrollRestoration = _scrollRestoration = scrollRestoration); 10932}, 10933 _refreshingAll, 10934 _refreshID = 0, 10935 _queueRefreshID, 10936 _queueRefreshAll = function _queueRefreshAll() { 10937 // we don't want to call _refreshAll() every time we create a new ScrollTrigger (for performance reasons) - it's better to batch them. Some frameworks dynamically load content and we can't rely on the window's "load" or "DOMContentLoaded" events to trigger it. 10938 if (_queueRefreshID !== _refreshID) { 10939 var id = _queueRefreshID = _refreshID; 10940 requestAnimationFrame(function () { 10941 return id === _refreshID && _refreshAll(true); 10942 }); 10943 } 10944}, 10945 _refresh100vh = function _refresh100vh() { 10946 _body.appendChild(_div100vh); 10947 10948 _100vh = !_normalizer && _div100vh.offsetHeight || _win.innerHeight; 10949 10950 _body.removeChild(_div100vh); 10951}, 10952 _hideAllMarkers = function _hideAllMarkers(hide) { 10953 return _toArray(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach(function (el) { 10954 return el.style.display = hide ? "none" : "block"; 10955 }); 10956}, 10957 _refreshAll = function _refreshAll(force, skipRevert) { 10958 if (_lastScrollTime && !force && !_isReverted) { 10959 _addListener(ScrollTrigger, "scrollEnd", _softRefresh); 10960 10961 return; 10962 } 10963 10964 _refresh100vh(); 10965 10966 _refreshingAll = ScrollTrigger.isRefreshing = true; 10967 10968 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].forEach(function (obj) { 10969 return _isFunction(obj) && ++obj.cacheID && (obj.rec = obj()); 10970 }); // force the clearing of the cache because some browsers take a little while to dispatch the "scroll" event and the user may have changed the scroll position and then called ScrollTrigger.refresh() right away 10971 10972 10973 var refreshInits = _dispatch("refreshInit"); 10974 10975 _sort && ScrollTrigger.sort(); 10976 skipRevert || _revertAll(); 10977 10978 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].forEach(function (obj) { 10979 if (_isFunction(obj)) { 10980 obj.smooth && (obj.target.style.scrollBehavior = "auto"); // smooth scrolling interferes 10981 10982 obj(0); 10983 } 10984 }); 10985 10986 _triggers.slice(0).forEach(function (t) { 10987 return t.refresh(); 10988 }); // don't loop with _i because during a refresh() someone could call ScrollTrigger.update() which would iterate through _i resulting in a skip. 10989 10990 10991 _isReverted = false; 10992 10993 _triggers.forEach(function (t) { 10994 // nested pins (pinnedContainer) with pinSpacing may expand the container, so we must accommodate that here. 10995 if (t._subPinOffset && t.pin) { 10996 var prop = t.vars.horizontal ? "offsetWidth" : "offsetHeight", 10997 original = t.pin[prop]; 10998 t.revert(true, 1); 10999 t.adjustPinSpacing(t.pin[prop] - original); 11000 t.refresh(); 11001 } 11002 }); 11003 11004 _clampingMax = 1; // pinSpacing might be propping a page open, thus when we .setPositions() to clamp a ScrollTrigger's end we should leave the pinSpacing alone. That's what this flag is for. 11005 11006 _hideAllMarkers(true); 11007 11008 _triggers.forEach(function (t) { 11009 // the scroller's max scroll position may change after all the ScrollTriggers refreshed (like pinning could push it down), so we need to loop back and correct any with end: "max". Same for anything with a clamped end 11010 var max = _maxScroll(t.scroller, t._dir), 11011 endClamp = t.vars.end === "max" || t._endClamp && t.end > max, 11012 startClamp = t._startClamp && t.start >= max; 11013 11014 (endClamp || startClamp) && t.setPositions(startClamp ? max - 1 : t.start, endClamp ? Math.max(startClamp ? max : t.start + 1, max) : t.end, true); 11015 }); 11016 11017 _hideAllMarkers(false); 11018 11019 _clampingMax = 0; 11020 refreshInits.forEach(function (result) { 11021 return result && result.render && result.render(-1); 11022 }); // if the onRefreshInit() returns an animation (typically a gsap.set()), revert it. This makes it easy to put things in a certain spot before refreshing for measurement purposes, and then put things back. 11023 11024 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].forEach(function (obj) { 11025 if (_isFunction(obj)) { 11026 obj.smooth && requestAnimationFrame(function () { 11027 return obj.target.style.scrollBehavior = "smooth"; 11028 }); 11029 obj.rec && obj(obj.rec); 11030 } 11031 }); 11032 11033 _clearScrollMemory(_scrollRestoration, 1); 11034 11035 _resizeDelay.pause(); 11036 11037 _refreshID++; 11038 _refreshingAll = 2; 11039 11040 _updateAll(2); 11041 11042 _triggers.forEach(function (t) { 11043 return _isFunction(t.vars.onRefresh) && t.vars.onRefresh(t); 11044 }); 11045 11046 _refreshingAll = ScrollTrigger.isRefreshing = false; 11047 11048 _dispatch("refresh"); 11049}, 11050 _lastScroll = 0, 11051 _direction = 1, 11052 _primary, 11053 _updateAll = function _updateAll(force) { 11054 if (force === 2 || !_refreshingAll && !_isReverted) { 11055 // _isReverted could be true if, for example, a matchMedia() is in the process of executing. We don't want to update during the time everything is reverted. 11056 ScrollTrigger.isUpdating = true; 11057 _primary && _primary.update(0); // ScrollSmoother uses refreshPriority -9999 to become the primary that gets updated before all others because it affects the scroll position. 11058 11059 var l = _triggers.length, 11060 time = _getTime(), 11061 recordVelocity = time - _time1 >= 50, 11062 scroll = l && _triggers[0].scroll(); 11063 11064 _direction = _lastScroll > scroll ? -1 : 1; 11065 _refreshingAll || (_lastScroll = scroll); 11066 11067 if (recordVelocity) { 11068 if (_lastScrollTime && !_pointerIsDown && time - _lastScrollTime > 200) { 11069 _lastScrollTime = 0; 11070 11071 _dispatch("scrollEnd"); 11072 } 11073 11074 _time2 = _time1; 11075 _time1 = time; 11076 } 11077 11078 if (_direction < 0) { 11079 _i = l; 11080 11081 while (_i-- > 0) { 11082 _triggers[_i] && _triggers[_i].update(0, recordVelocity); 11083 } 11084 11085 _direction = 1; 11086 } else { 11087 for (_i = 0; _i < l; _i++) { 11088 _triggers[_i] && _triggers[_i].update(0, recordVelocity); 11089 } 11090 } 11091 11092 ScrollTrigger.isUpdating = false; 11093 } 11094 11095 _rafID = 0; 11096}, 11097 _propNamesToCopy = [_left, _top, _bottom, _right, _margin + _Bottom, _margin + _Right, _margin + _Top, _margin + _Left, "display", "flexShrink", "float", "zIndex", "gridColumnStart", "gridColumnEnd", "gridRowStart", "gridRowEnd", "gridArea", "justifySelf", "alignSelf", "placeSelf", "order"], 11098 _stateProps = _propNamesToCopy.concat([_width, _height, "boxSizing", "max" + _Width, "max" + _Height, "position", _margin, _padding, _padding + _Top, _padding + _Right, _padding + _Bottom, _padding + _Left]), 11099 _swapPinOut = function _swapPinOut(pin, spacer, state) { 11100 _setState(state); 11101 11102 var cache = pin._gsap; 11103 11104 if (cache.spacerIsNative) { 11105 _setState(cache.spacerState); 11106 } else if (pin._gsap.swappedIn) { 11107 var parent = spacer.parentNode; 11108 11109 if (parent) { 11110 parent.insertBefore(pin, spacer); 11111 parent.removeChild(spacer); 11112 } 11113 } 11114 11115 pin._gsap.swappedIn = false; 11116}, 11117 _swapPinIn = function _swapPinIn(pin, spacer, cs, spacerState) { 11118 if (!pin._gsap.swappedIn) { 11119 var i = _propNamesToCopy.length, 11120 spacerStyle = spacer.style, 11121 pinStyle = pin.style, 11122 p; 11123 11124 while (i--) { 11125 p = _propNamesToCopy[i]; 11126 spacerStyle[p] = cs[p]; 11127 } 11128 11129 spacerStyle.position = cs.position === "absolute" ? "absolute" : "relative"; 11130 cs.display === "inline" && (spacerStyle.display = "inline-block"); 11131 pinStyle[_bottom] = pinStyle[_right] = "auto"; 11132 spacerStyle.flexBasis = cs.flexBasis || "auto"; 11133 spacerStyle.overflow = "visible"; 11134 spacerStyle.boxSizing = "border-box"; 11135 spacerStyle[_width] = _getSize(pin, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"]) + _px; 11136 spacerStyle[_height] = _getSize(pin, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"]) + _px; 11137 spacerStyle[_padding] = pinStyle[_margin] = pinStyle[_top] = pinStyle[_left] = "0"; 11138 11139 _setState(spacerState); 11140 11141 pinStyle[_width] = pinStyle["max" + _Width] = cs[_width]; 11142 pinStyle[_height] = pinStyle["max" + _Height] = cs[_height]; 11143 pinStyle[_padding] = cs[_padding]; 11144 11145 if (pin.parentNode !== spacer) { 11146 pin.parentNode.insertBefore(spacer, pin); 11147 spacer.appendChild(pin); 11148 } 11149 11150 pin._gsap.swappedIn = true; 11151 } 11152}, 11153 _capsExp = /([A-Z])/g, 11154 _setState = function _setState(state) { 11155 if (state) { 11156 var style = state.t.style, 11157 l = state.length, 11158 i = 0, 11159 p, 11160 value; 11161 (state.t._gsap || gsap.core.getCache(state.t)).uncache = 1; // otherwise transforms may be off 11162 11163 for (; i < l; i += 2) { 11164 value = state[i + 1]; 11165 p = state[i]; 11166 11167 if (value) { 11168 style[p] = value; 11169 } else if (style[p]) { 11170 style.removeProperty(p.replace(_capsExp, "-$1").toLowerCase()); 11171 } 11172 } 11173 } 11174}, 11175 _getState = function _getState(element) { 11176 // returns an Array with alternating values like [property, value, property, value] and a "t" property pointing to the target (element). Makes it fast and cheap. 11177 var l = _stateProps.length, 11178 style = element.style, 11179 state = [], 11180 i = 0; 11181 11182 for (; i < l; i++) { 11183 state.push(_stateProps[i], style[_stateProps[i]]); 11184 } 11185 11186 state.t = element; 11187 return state; 11188}, 11189 _copyState = function _copyState(state, override, omitOffsets) { 11190 var result = [], 11191 l = state.length, 11192 i = omitOffsets ? 8 : 0, 11193 // skip top, left, right, bottom if omitOffsets is true 11194 p; 11195 11196 for (; i < l; i += 2) { 11197 p = state[i]; 11198 result.push(p, p in override ? override[p] : state[i + 1]); 11199 } 11200 11201 result.t = state.t; 11202 return result; 11203}, 11204 _winOffsets = { 11205 left: 0, 11206 top: 0 11207}, 11208 // // potential future feature (?) Allow users to calculate where a trigger hits (scroll position) like getScrollPosition("#id", "top bottom") 11209// _getScrollPosition = (trigger, position, {scroller, containerAnimation, horizontal}) => { 11210// scroller = _getTarget(scroller || _win); 11211// let direction = horizontal ? _horizontal : _vertical, 11212// isViewport = _isViewport(scroller); 11213// _getSizeFunc(scroller, isViewport, direction); 11214// return _parsePosition(position, _getTarget(trigger), _getSizeFunc(scroller, isViewport, direction)(), direction, _getScrollFunc(scroller, direction)(), 0, 0, 0, _getOffsetsFunc(scroller, isViewport)(), isViewport ? 0 : parseFloat(_getComputedStyle(scroller)["border" + direction.p2 + _Width]) || 0, 0, containerAnimation ? containerAnimation.duration() : _maxScroll(scroller), containerAnimation); 11215// }, 11216_parsePosition = function _parsePosition(value, trigger, scrollerSize, direction, scroll, marker, markerScroller, self, scrollerBounds, borderWidth, useFixedPosition, scrollerMax, containerAnimation, clampZeroProp) { 11217 _isFunction(value) && (value = value(self)); 11218 11219 if (_isString(value) && value.substr(0, 3) === "max") { 11220 value = scrollerMax + (value.charAt(4) === "=" ? _offsetToPx("0" + value.substr(3), scrollerSize) : 0); 11221 } 11222 11223 var time = containerAnimation ? containerAnimation.time() : 0, 11224 p1, 11225 p2, 11226 element; 11227 containerAnimation && containerAnimation.seek(0); 11228 isNaN(value) || (value = +value); // convert a string number like "45" to an actual number 11229 11230 if (!_isNumber(value)) { 11231 _isFunction(trigger) && (trigger = trigger(self)); 11232 var offsets = (value || "0").split(" "), 11233 bounds, 11234 localOffset, 11235 globalOffset, 11236 display; 11237 element = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(trigger, self) || _body; 11238 bounds = _getBounds(element) || {}; 11239 11240 if ((!bounds || !bounds.left && !bounds.top) && _getComputedStyle(element).display === "none") { 11241 // if display is "none", it won't report getBoundingClientRect() properly 11242 display = element.style.display; 11243 element.style.display = "block"; 11244 bounds = _getBounds(element); 11245 display ? element.style.display = display : element.style.removeProperty("display"); 11246 } 11247 11248 localOffset = _offsetToPx(offsets[0], bounds[direction.d]); 11249 globalOffset = _offsetToPx(offsets[1] || "0", scrollerSize); 11250 value = bounds[direction.p] - scrollerBounds[direction.p] - borderWidth + localOffset + scroll - globalOffset; 11251 markerScroller && _positionMarker(markerScroller, globalOffset, direction, scrollerSize - globalOffset < 20 || markerScroller._isStart && globalOffset > 20); 11252 scrollerSize -= scrollerSize - globalOffset; // adjust for the marker 11253 } else { 11254 containerAnimation && (value = gsap.utils.mapRange(containerAnimation.scrollTrigger.start, containerAnimation.scrollTrigger.end, 0, scrollerMax, value)); 11255 markerScroller && _positionMarker(markerScroller, scrollerSize, direction, true); 11256 } 11257 11258 if (clampZeroProp) { 11259 self[clampZeroProp] = value || -0.001; 11260 value < 0 && (value = 0); 11261 } 11262 11263 if (marker) { 11264 var position = value + scrollerSize, 11265 isStart = marker._isStart; 11266 p1 = "scroll" + direction.d2; 11267 11268 _positionMarker(marker, position, direction, isStart && position > 20 || !isStart && (useFixedPosition ? Math.max(_body[p1], _docEl[p1]) : marker.parentNode[p1]) <= position + 1); 11269 11270 if (useFixedPosition) { 11271 scrollerBounds = _getBounds(markerScroller); 11272 useFixedPosition && (marker.style[direction.op.p] = scrollerBounds[direction.op.p] - direction.op.m - marker._offset + _px); 11273 } 11274 } 11275 11276 if (containerAnimation && element) { 11277 p1 = _getBounds(element); 11278 containerAnimation.seek(scrollerMax); 11279 p2 = _getBounds(element); 11280 containerAnimation._caScrollDist = p1[direction.p] - p2[direction.p]; 11281 value = value / containerAnimation._caScrollDist * scrollerMax; 11282 } 11283 11284 containerAnimation && containerAnimation.seek(time); 11285 return containerAnimation ? value : Math.round(value); 11286}, 11287 _prefixExp = /(webkit|moz|length|cssText|inset)/i, 11288 _reparent = function _reparent(element, parent, top, left) { 11289 if (element.parentNode !== parent) { 11290 var style = element.style, 11291 p, 11292 cs; 11293 11294 if (parent === _body) { 11295 element._stOrig = style.cssText; // record original inline styles so we can revert them later 11296 11297 cs = _getComputedStyle(element); 11298 11299 for (p in cs) { 11300 // must copy all relevant styles to ensure that nothing changes visually when we reparent to the <body>. Skip the vendor prefixed ones. 11301 if (!+p && !_prefixExp.test(p) && cs[p] && typeof style[p] === "string" && p !== "0") { 11302 style[p] = cs[p]; 11303 } 11304 } 11305 11306 style.top = top; 11307 style.left = left; 11308 } else { 11309 style.cssText = element._stOrig; 11310 } 11311 11312 gsap.core.getCache(element).uncache = 1; 11313 parent.appendChild(element); 11314 } 11315}, 11316 _interruptionTracker = function _interruptionTracker(getValueFunc, initialValue, onInterrupt) { 11317 var last1 = initialValue, 11318 last2 = last1; 11319 return function (value) { 11320 var current = Math.round(getValueFunc()); // round because in some [very uncommon] Windows environments, scroll can get reported with decimals even though it was set without. 11321 11322 if (current !== last1 && current !== last2 && Math.abs(current - last1) > 3 && Math.abs(current - last2) > 3) { 11323 // if the user scrolls, kill the tween. iOS Safari intermittently misreports the scroll position, it may be the most recently-set one or the one before that! When Safari is zoomed (CMD-+), it often misreports as 1 pixel off too! So if we set the scroll position to 125, for example, it'll actually report it as 124. 11324 value = current; 11325 onInterrupt && onInterrupt(); 11326 } 11327 11328 last2 = last1; 11329 last1 = value; 11330 return value; 11331 }; 11332}, 11333 _shiftMarker = function _shiftMarker(marker, direction, value) { 11334 var vars = {}; 11335 vars[direction.p] = "+=" + value; 11336 gsap.set(marker, vars); 11337}, 11338 // _mergeAnimations = animations => { 11339// let tl = gsap.timeline({smoothChildTiming: true}).startTime(Math.min(...animations.map(a => a.globalTime(0)))); 11340// animations.forEach(a => {let time = a.totalTime(); tl.add(a); a.totalTime(time); }); 11341// tl.smoothChildTiming = false; 11342// return tl; 11343// }, 11344// returns a function that can be used to tween the scroll position in the direction provided, and when doing so it'll add a .tween property to the FUNCTION itself, and remove it when the tween completes or gets killed. This gives us a way to have multiple ScrollTriggers use a central function for any given scroller and see if there's a scroll tween running (which would affect if/how things get updated) 11345_getTweenCreator = function _getTweenCreator(scroller, direction) { 11346 var getScroll = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getScrollFunc"])(scroller, direction), 11347 prop = "_scroll" + direction.p2, 11348 // add a tweenable property to the scroller that's a getter/setter function, like _scrollTop or _scrollLeft. This way, if someone does gsap.killTweensOf(scroller) it'll kill the scroll tween. 11349 getTween = function getTween(scrollTo, vars, initialValue, change1, change2) { 11350 var tween = getTween.tween, 11351 onComplete = vars.onComplete, 11352 modifiers = {}; 11353 initialValue = initialValue || getScroll(); 11354 11355 var checkForInterruption = _interruptionTracker(getScroll, initialValue, function () { 11356 tween.kill(); 11357 getTween.tween = 0; 11358 }); 11359 11360 change2 = change1 && change2 || 0; // if change1 is 0, we set that to the difference and ignore change2. Otherwise, there would be a compound effect. 11361 11362 change1 = change1 || scrollTo - initialValue; 11363 tween && tween.kill(); 11364 vars[prop] = scrollTo; 11365 vars.inherit = false; 11366 vars.modifiers = modifiers; 11367 11368 modifiers[prop] = function () { 11369 return checkForInterruption(initialValue + change1 * tween.ratio + change2 * tween.ratio * tween.ratio); 11370 }; 11371 11372 vars.onUpdate = function () { 11373 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].cache++; 11374 getTween.tween && _updateAll(); // if it was interrupted/killed, like in a context.revert(), don't force an updateAll() 11375 }; 11376 11377 vars.onComplete = function () { 11378 getTween.tween = 0; 11379 onComplete && onComplete.call(tween); 11380 }; 11381 11382 tween = getTween.tween = gsap.to(scroller, vars); 11383 return tween; 11384 }; 11385 11386 scroller[prop] = getScroll; 11387 11388 getScroll.wheelHandler = function () { 11389 return getTween.tween && getTween.tween.kill() && (getTween.tween = 0); 11390 }; 11391 11392 _addListener(scroller, "wheel", getScroll.wheelHandler); // Windows machines handle mousewheel scrolling in chunks (like "3 lines per scroll") meaning the typical strategy for cancelling the scroll isn't as sensitive. It's much more likely to match one of the previous 2 scroll event positions. So we kill any snapping as soon as there's a wheel event. 11393 11394 11395 ScrollTrigger.isTouch && _addListener(scroller, "touchmove", getScroll.wheelHandler); 11396 return getTween; 11397}; 11398 11399var ScrollTrigger = /*#__PURE__*/function () { 11400 function ScrollTrigger(vars, animation) { 11401 _coreInitted || ScrollTrigger.register(gsap) || console.warn("Please gsap.registerPlugin(ScrollTrigger)"); 11402 11403 _context(this); 11404 11405 this.init(vars, animation); 11406 } 11407 11408 var _proto = ScrollTrigger.prototype; 11409 11410 _proto.init = function init(vars, animation) { 11411 this.progress = this.start = 0; 11412 this.vars && this.kill(true, true); // in case it's being initted again 11413 11414 if (!_enabled) { 11415 this.update = this.refresh = this.kill = _passThrough; 11416 return; 11417 } 11418 11419 vars = _setDefaults(_isString(vars) || _isNumber(vars) || vars.nodeType ? { 11420 trigger: vars 11421 } : vars, _defaults); 11422 11423 var _vars = vars, 11424 onUpdate = _vars.onUpdate, 11425 toggleClass = _vars.toggleClass, 11426 id = _vars.id, 11427 onToggle = _vars.onToggle, 11428 onRefresh = _vars.onRefresh, 11429 scrub = _vars.scrub, 11430 trigger = _vars.trigger, 11431 pin = _vars.pin, 11432 pinSpacing = _vars.pinSpacing, 11433 invalidateOnRefresh = _vars.invalidateOnRefresh, 11434 anticipatePin = _vars.anticipatePin, 11435 onScrubComplete = _vars.onScrubComplete, 11436 onSnapComplete = _vars.onSnapComplete, 11437 once = _vars.once, 11438 snap = _vars.snap, 11439 pinReparent = _vars.pinReparent, 11440 pinSpacer = _vars.pinSpacer, 11441 containerAnimation = _vars.containerAnimation, 11442 fastScrollEnd = _vars.fastScrollEnd, 11443 preventOverlaps = _vars.preventOverlaps, 11444 direction = vars.horizontal || vars.containerAnimation && vars.horizontal !== false ? _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"] : _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"], 11445 isToggle = !scrub && scrub !== 0, 11446 scroller = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(vars.scroller || _win), 11447 scrollerCache = gsap.core.getCache(scroller), 11448 isViewport = _isViewport(scroller), 11449 useFixedPosition = ("pinType" in vars ? vars.pinType : Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getProxyProp"])(scroller, "pinType") || isViewport && "fixed") === "fixed", 11450 callbacks = [vars.onEnter, vars.onLeave, vars.onEnterBack, vars.onLeaveBack], 11451 toggleActions = isToggle && vars.toggleActions.split(" "), 11452 markers = "markers" in vars ? vars.markers : _defaults.markers, 11453 borderWidth = isViewport ? 0 : parseFloat(_getComputedStyle(scroller)["border" + direction.p2 + _Width]) || 0, 11454 self = this, 11455 onRefreshInit = vars.onRefreshInit && function () { 11456 return vars.onRefreshInit(self); 11457 }, 11458 getScrollerSize = _getSizeFunc(scroller, isViewport, direction), 11459 getScrollerOffsets = _getOffsetsFunc(scroller, isViewport), 11460 lastSnap = 0, 11461 lastRefresh = 0, 11462 prevProgress = 0, 11463 scrollFunc = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getScrollFunc"])(scroller, direction), 11464 tweenTo, 11465 pinCache, 11466 snapFunc, 11467 scroll1, 11468 scroll2, 11469 start, 11470 end, 11471 markerStart, 11472 markerEnd, 11473 markerStartTrigger, 11474 markerEndTrigger, 11475 markerVars, 11476 executingOnRefresh, 11477 change, 11478 pinOriginalState, 11479 pinActiveState, 11480 pinState, 11481 spacer, 11482 offset, 11483 pinGetter, 11484 pinSetter, 11485 pinStart, 11486 pinChange, 11487 spacingStart, 11488 spacerState, 11489 markerStartSetter, 11490 pinMoves, 11491 markerEndSetter, 11492 cs, 11493 snap1, 11494 snap2, 11495 scrubTween, 11496 scrubSmooth, 11497 snapDurClamp, 11498 snapDelayedCall, 11499 prevScroll, 11500 prevAnimProgress, 11501 caMarkerSetter, 11502 customRevertReturn; // for the sake of efficiency, _startClamp/_endClamp serve like a truthy value indicating that clamping was enabled on the start/end, and ALSO store the actual pre-clamped numeric value. We tap into that in ScrollSmoother for speed effects. So for example, if start="clamp(top bottom)" results in a start of -100 naturally, it would get clamped to 0 but -100 would be stored in _startClamp. 11503 11504 11505 self._startClamp = self._endClamp = false; 11506 self._dir = direction; 11507 anticipatePin *= 45; 11508 self.scroller = scroller; 11509 self.scroll = containerAnimation ? containerAnimation.time.bind(containerAnimation) : scrollFunc; 11510 scroll1 = scrollFunc(); 11511 self.vars = vars; 11512 animation = animation || vars.animation; 11513 11514 if ("refreshPriority" in vars) { 11515 _sort = 1; 11516 vars.refreshPriority === -9999 && (_primary = self); // used by ScrollSmoother 11517 } 11518 11519 scrollerCache.tweenScroll = scrollerCache.tweenScroll || { 11520 top: _getTweenCreator(scroller, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"]), 11521 left: _getTweenCreator(scroller, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"]) 11522 }; 11523 self.tweenTo = tweenTo = scrollerCache.tweenScroll[direction.p]; 11524 11525 self.scrubDuration = function (value) { 11526 scrubSmooth = _isNumber(value) && value; 11527 11528 if (!scrubSmooth) { 11529 scrubTween && scrubTween.progress(1).kill(); 11530 scrubTween = 0; 11531 } else { 11532 scrubTween ? scrubTween.duration(value) : scrubTween = gsap.to(animation, { 11533 ease: "expo", 11534 totalProgress: "+=0", 11535 inherit: false, 11536 duration: scrubSmooth, 11537 paused: true, 11538 onComplete: function onComplete() { 11539 return onScrubComplete && onScrubComplete(self); 11540 } 11541 }); 11542 } 11543 }; 11544 11545 if (animation) { 11546 animation.vars.lazy = false; 11547 animation._initted && !self.isReverted || animation.vars.immediateRender !== false && vars.immediateRender !== false && animation.duration() && animation.render(0, true, true); // special case: if this ScrollTrigger gets re-initted, a from() tween with a stagger could get initted initially and then reverted on the re-init which means it'll need to get rendered again here to properly display things. Otherwise, See https://gsap.com/forums/topic/36777-scrollsmoother-splittext-nextjs/ and https://codepen.io/GreenSock/pen/eYPyPpd?editors=0010 11548 11549 self.animation = animation.pause(); 11550 animation.scrollTrigger = self; 11551 self.scrubDuration(scrub); 11552 snap1 = 0; 11553 id || (id = animation.vars.id); 11554 } 11555 11556 if (snap) { 11557 // TODO: potential idea: use legitimate CSS scroll snapping by pushing invisible elements into the DOM that serve as snap positions, and toggle the document.scrollingElement.style.scrollSnapType onToggle. See https://codepen.io/GreenSock/pen/JjLrgWM for a quick proof of concept. 11558 if (!_isObject(snap) || snap.push) { 11559 snap = { 11560 snapTo: snap 11561 }; 11562 } 11563 11564 "scrollBehavior" in _body.style && gsap.set(isViewport ? [_body, _docEl] : scroller, { 11565 scrollBehavior: "auto" 11566 }); // smooth scrolling doesn't work with snap. 11567 11568 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].forEach(function (o) { 11569 return _isFunction(o) && o.target === (isViewport ? _doc.scrollingElement || _docEl : scroller) && (o.smooth = false); 11570 }); // note: set smooth to false on both the vertical and horizontal scroll getters/setters 11571 11572 11573 snapFunc = _isFunction(snap.snapTo) ? snap.snapTo : snap.snapTo === "labels" ? _getClosestLabel(animation) : snap.snapTo === "labelsDirectional" ? _getLabelAtDirection(animation) : snap.directional !== false ? function (value, st) { 11574 return _snapDirectional(snap.snapTo)(value, _getTime() - lastRefresh < 500 ? 0 : st.direction); 11575 } : gsap.utils.snap(snap.snapTo); 11576 snapDurClamp = snap.duration || { 11577 min: 0.1, 11578 max: 2 11579 }; 11580 snapDurClamp = _isObject(snapDurClamp) ? _clamp(snapDurClamp.min, snapDurClamp.max) : _clamp(snapDurClamp, snapDurClamp); 11581 snapDelayedCall = gsap.delayedCall(snap.delay || scrubSmooth / 2 || 0.1, function () { 11582 var scroll = scrollFunc(), 11583 refreshedRecently = _getTime() - lastRefresh < 500, 11584 tween = tweenTo.tween; 11585 11586 if ((refreshedRecently || Math.abs(self.getVelocity()) < 10) && !tween && !_pointerIsDown && lastSnap !== scroll) { 11587 var progress = (scroll - start) / change, 11588 totalProgress = animation && !isToggle ? animation.totalProgress() : progress, 11589 velocity = refreshedRecently ? 0 : (totalProgress - snap2) / (_getTime() - _time2) * 1000 || 0, 11590 change1 = gsap.utils.clamp(-progress, 1 - progress, _abs(velocity / 2) * velocity / 0.185), 11591 naturalEnd = progress + (snap.inertia === false ? 0 : change1), 11592 endValue, 11593 endScroll, 11594 _snap = snap, 11595 onStart = _snap.onStart, 11596 _onInterrupt = _snap.onInterrupt, 11597 _onComplete = _snap.onComplete; 11598 endValue = snapFunc(naturalEnd, self); 11599 _isNumber(endValue) || (endValue = naturalEnd); // in case the function didn't return a number, fall back to using the naturalEnd 11600 11601 endScroll = Math.round(start + endValue * change); 11602 11603 if (scroll <= end && scroll >= start && endScroll !== scroll) { 11604 if (tween && !tween._initted && tween.data <= _abs(endScroll - scroll)) { 11605 // there's an overlapping snap! So we must figure out which one is closer and let that tween live. 11606 return; 11607 } 11608 11609 if (snap.inertia === false) { 11610 change1 = endValue - progress; 11611 } 11612 11613 tweenTo(endScroll, { 11614 duration: snapDurClamp(_abs(Math.max(_abs(naturalEnd - totalProgress), _abs(endValue - totalProgress)) * 0.185 / velocity / 0.05 || 0)), 11615 ease: snap.ease || "power3", 11616 data: _abs(endScroll - scroll), 11617 // record the distance so that if another snap tween occurs (conflict) we can prioritize the closest snap. 11618 onInterrupt: function onInterrupt() { 11619 return snapDelayedCall.restart(true) && _onInterrupt && _onInterrupt(self); 11620 }, 11621 onComplete: function onComplete() { 11622 self.update(); 11623 lastSnap = scrollFunc(); 11624 11625 if (animation) { 11626 // the resolution of the scrollbar is limited, so we should correct the scrubbed animation's playhead at the end to match EXACTLY where it was supposed to snap 11627 scrubTween ? scrubTween.resetTo("totalProgress", endValue, animation._tTime / animation._tDur) : animation.progress(endValue); 11628 } 11629 11630 snap1 = snap2 = animation && !isToggle ? animation.totalProgress() : self.progress; 11631 onSnapComplete && onSnapComplete(self); 11632 _onComplete && _onComplete(self); 11633 } 11634 }, scroll, change1 * change, endScroll - scroll - change1 * change); 11635 onStart && onStart(self, tweenTo.tween); 11636 } 11637 } else if (self.isActive && lastSnap !== scroll) { 11638 snapDelayedCall.restart(true); 11639 } 11640 }).pause(); 11641 } 11642 11643 id && (_ids[id] = self); 11644 trigger = self.trigger = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(trigger || pin !== true && pin); // if a trigger has some kind of scroll-related effect applied that could contaminate the "y" or "x" position (like a ScrollSmoother effect), we needed a way to temporarily revert it, so we use the stRevert property of the gsCache. It can return another function that we'll call at the end so it can return to its normal state. 11645 11646 customRevertReturn = trigger && trigger._gsap && trigger._gsap.stRevert; 11647 customRevertReturn && (customRevertReturn = customRevertReturn(self)); 11648 pin = pin === true ? trigger : Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(pin); 11649 _isString(toggleClass) && (toggleClass = { 11650 targets: trigger, 11651 className: toggleClass 11652 }); 11653 11654 if (pin) { 11655 pinSpacing === false || pinSpacing === _margin || (pinSpacing = !pinSpacing && pin.parentNode && pin.parentNode.style && _getComputedStyle(pin.parentNode).display === "flex" ? false : _padding); // if the parent is display: flex, don't apply pinSpacing by default. We should check that pin.parentNode is an element (not shadow dom window) 11656 11657 self.pin = pin; 11658 pinCache = gsap.core.getCache(pin); 11659 11660 if (!pinCache.spacer) { 11661 // record the spacer and pinOriginalState on the cache in case someone tries pinning the same element with MULTIPLE ScrollTriggers - we don't want to have multiple spacers or record the "original" pin state after it has already been affected by another ScrollTrigger. 11662 if (pinSpacer) { 11663 pinSpacer = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(pinSpacer); 11664 pinSpacer && !pinSpacer.nodeType && (pinSpacer = pinSpacer.current || pinSpacer.nativeElement); // for React & Angular 11665 11666 pinCache.spacerIsNative = !!pinSpacer; 11667 pinSpacer && (pinCache.spacerState = _getState(pinSpacer)); 11668 } 11669 11670 pinCache.spacer = spacer = pinSpacer || _doc.createElement("div"); 11671 spacer.classList.add("pin-spacer"); 11672 id && spacer.classList.add("pin-spacer-" + id); 11673 pinCache.pinState = pinOriginalState = _getState(pin); 11674 } else { 11675 pinOriginalState = pinCache.pinState; 11676 } 11677 11678 vars.force3D !== false && gsap.set(pin, { 11679 force3D: true 11680 }); 11681 self.spacer = spacer = pinCache.spacer; 11682 cs = _getComputedStyle(pin); 11683 spacingStart = cs[pinSpacing + direction.os2]; 11684 pinGetter = gsap.getProperty(pin); 11685 pinSetter = gsap.quickSetter(pin, direction.a, _px); // pin.firstChild && !_maxScroll(pin, direction) && (pin.style.overflow = "hidden"); // protects from collapsing margins, but can have unintended consequences as demonstrated here: https://codepen.io/GreenSock/pen/1e42c7a73bfa409d2cf1e184e7a4248d so it was removed in favor of just telling people to set up their CSS to avoid the collapsing margins (overflow: hidden | auto is just one option. Another is border-top: 1px solid transparent). 11686 11687 _swapPinIn(pin, spacer, cs); 11688 11689 pinState = _getState(pin); 11690 } 11691 11692 if (markers) { 11693 markerVars = _isObject(markers) ? _setDefaults(markers, _markerDefaults) : _markerDefaults; 11694 markerStartTrigger = _createMarker("scroller-start", id, scroller, direction, markerVars, 0); 11695 markerEndTrigger = _createMarker("scroller-end", id, scroller, direction, markerVars, 0, markerStartTrigger); 11696 offset = markerStartTrigger["offset" + direction.op.d2]; 11697 11698 var content = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getProxyProp"])(scroller, "content") || scroller); 11699 11700 markerStart = this.markerStart = _createMarker("start", id, content, direction, markerVars, offset, 0, containerAnimation); 11701 markerEnd = this.markerEnd = _createMarker("end", id, content, direction, markerVars, offset, 0, containerAnimation); 11702 containerAnimation && (caMarkerSetter = gsap.quickSetter([markerStart, markerEnd], direction.a, _px)); 11703 11704 if (!useFixedPosition && !(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_proxies"].length && Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getProxyProp"])(scroller, "fixedMarkers") === true)) { 11705 _makePositionable(isViewport ? _body : scroller); 11706 11707 gsap.set([markerStartTrigger, markerEndTrigger], { 11708 force3D: true 11709 }); 11710 markerStartSetter = gsap.quickSetter(markerStartTrigger, direction.a, _px); 11711 markerEndSetter = gsap.quickSetter(markerEndTrigger, direction.a, _px); 11712 } 11713 } 11714 11715 if (containerAnimation) { 11716 var oldOnUpdate = containerAnimation.vars.onUpdate, 11717 oldParams = containerAnimation.vars.onUpdateParams; 11718 containerAnimation.eventCallback("onUpdate", function () { 11719 self.update(0, 0, 1); 11720 oldOnUpdate && oldOnUpdate.apply(containerAnimation, oldParams || []); 11721 }); 11722 } 11723 11724 self.previous = function () { 11725 return _triggers[_triggers.indexOf(self) - 1]; 11726 }; 11727 11728 self.next = function () { 11729 return _triggers[_triggers.indexOf(self) + 1]; 11730 }; 11731 11732 self.revert = function (revert, temp) { 11733 if (!temp) { 11734 return self.kill(true); 11735 } // for compatibility with gsap.context() and gsap.matchMedia() which call revert() 11736 11737 11738 var r = revert !== false || !self.enabled, 11739 prevRefreshing = _refreshing; 11740 11741 if (r !== self.isReverted) { 11742 if (r) { 11743 prevScroll = Math.max(scrollFunc(), self.scroll.rec || 0); // record the scroll so we can revert later (repositioning/pinning things can affect scroll position). In the static refresh() method, we first record all the scroll positions as a reference. 11744 11745 prevProgress = self.progress; 11746 prevAnimProgress = animation && animation.progress(); 11747 } 11748 11749 markerStart && [markerStart, markerEnd, markerStartTrigger, markerEndTrigger].forEach(function (m) { 11750 return m.style.display = r ? "none" : "block"; 11751 }); 11752 11753 if (r) { 11754 _refreshing = self; 11755 self.update(r); // make sure the pin is back in its original position so that all the measurements are correct. do this BEFORE swapping the pin out 11756 } 11757 11758 if (pin && (!pinReparent || !self.isActive)) { 11759 if (r) { 11760 _swapPinOut(pin, spacer, pinOriginalState); 11761 } else { 11762 _swapPinIn(pin, spacer, _getComputedStyle(pin), spacerState); 11763 } 11764 } 11765 11766 r || self.update(r); // when we're restoring, the update should run AFTER swapping the pin into its pin-spacer. 11767 11768 _refreshing = prevRefreshing; // restore. We set it to true during the update() so that things fire properly in there. 11769 11770 self.isReverted = r; 11771 } 11772 }; 11773 11774 self.refresh = function (soft, force, position, pinOffset) { 11775 // position is typically only defined if it's coming from setPositions() - it's a way to skip the normal parsing. pinOffset is also only from setPositions() and is mostly related to fancy stuff we need to do in ScrollSmoother with effects 11776 if ((_refreshing || !self.enabled) && !force) { 11777 return; 11778 } 11779 11780 if (pin && soft && _lastScrollTime) { 11781 _addListener(ScrollTrigger, "scrollEnd", _softRefresh); 11782 11783 return; 11784 } 11785 11786 !_refreshingAll && onRefreshInit && onRefreshInit(self); 11787 _refreshing = self; 11788 11789 if (tweenTo.tween && !position) { 11790 // we skip this if a position is passed in because typically that's from .setPositions() and it's best to allow in-progress snapping to continue. 11791 tweenTo.tween.kill(); 11792 tweenTo.tween = 0; 11793 } 11794 11795 scrubTween && scrubTween.pause(); 11796 invalidateOnRefresh && animation && animation.revert({ 11797 kill: false 11798 }).invalidate(); 11799 self.isReverted || self.revert(true, true); 11800 self._subPinOffset = false; // we'll set this to true in the sub-pins if we find any 11801 11802 var size = getScrollerSize(), 11803 scrollerBounds = getScrollerOffsets(), 11804 max = containerAnimation ? containerAnimation.duration() : _maxScroll(scroller, direction), 11805 isFirstRefresh = change <= 0.01, 11806 offset = 0, 11807 otherPinOffset = pinOffset || 0, 11808 parsedEnd = _isObject(position) ? position.end : vars.end, 11809 parsedEndTrigger = vars.endTrigger || trigger, 11810 parsedStart = _isObject(position) ? position.start : vars.start || (vars.start === 0 || !trigger ? 0 : pin ? "0 0" : "0 100%"), 11811 pinnedContainer = self.pinnedContainer = vars.pinnedContainer && Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(vars.pinnedContainer, self), 11812 triggerIndex = trigger && Math.max(0, _triggers.indexOf(self)) || 0, 11813 i = triggerIndex, 11814 cs, 11815 bounds, 11816 scroll, 11817 isVertical, 11818 override, 11819 curTrigger, 11820 curPin, 11821 oppositeScroll, 11822 initted, 11823 revertedPins, 11824 forcedOverflow, 11825 markerStartOffset, 11826 markerEndOffset; 11827 11828 if (markers && _isObject(position)) { 11829 // if we alter the start/end positions with .setPositions(), it generally feeds in absolute NUMBERS which don't convey information about where to line up the markers, so to keep it intuitive, we record how far the trigger positions shift after applying the new numbers and then offset by that much in the opposite direction. We do the same to the associated trigger markers too of course. 11830 markerStartOffset = gsap.getProperty(markerStartTrigger, direction.p); 11831 markerEndOffset = gsap.getProperty(markerEndTrigger, direction.p); 11832 } 11833 11834 while (i--) { 11835 // user might try to pin the same element more than once, so we must find any prior triggers with the same pin, revert them, and determine how long they're pinning so that we can offset things appropriately. Make sure we revert from last to first so that things "rewind" properly. 11836 curTrigger = _triggers[i]; 11837 curTrigger.end || curTrigger.refresh(0, 1) || (_refreshing = self); // if it's a timeline-based trigger that hasn't been fully initialized yet because it's waiting for 1 tick, just force the refresh() here, otherwise if it contains a pin that's supposed to affect other ScrollTriggers further down the page, they won't be adjusted properly. 11838 11839 curPin = curTrigger.pin; 11840 11841 if (curPin && (curPin === trigger || curPin === pin || curPin === pinnedContainer) && !curTrigger.isReverted) { 11842 revertedPins || (revertedPins = []); 11843 revertedPins.unshift(curTrigger); // we'll revert from first to last to make sure things reach their end state properly 11844 11845 curTrigger.revert(true, true); 11846 } 11847 11848 if (curTrigger !== _triggers[i]) { 11849 // in case it got removed. 11850 triggerIndex--; 11851 i--; 11852 } 11853 } 11854 11855 _isFunction(parsedStart) && (parsedStart = parsedStart(self)); 11856 parsedStart = _parseClamp(parsedStart, "start", self); 11857 start = _parsePosition(parsedStart, trigger, size, direction, scrollFunc(), markerStart, markerStartTrigger, self, scrollerBounds, borderWidth, useFixedPosition, max, containerAnimation, self._startClamp && "_startClamp") || (pin ? -0.001 : 0); 11858 _isFunction(parsedEnd) && (parsedEnd = parsedEnd(self)); 11859 11860 if (_isString(parsedEnd) && !parsedEnd.indexOf("+=")) { 11861 if (~parsedEnd.indexOf(" ")) { 11862 parsedEnd = (_isString(parsedStart) ? parsedStart.split(" ")[0] : "") + parsedEnd; 11863 } else { 11864 offset = _offsetToPx(parsedEnd.substr(2), size); 11865 parsedEnd = _isString(parsedStart) ? parsedStart : (containerAnimation ? gsap.utils.mapRange(0, containerAnimation.duration(), containerAnimation.scrollTrigger.start, containerAnimation.scrollTrigger.end, start) : start) + offset; // _parsePosition won't factor in the offset if the start is a number, so do it here. 11866 11867 parsedEndTrigger = trigger; 11868 } 11869 } 11870 11871 parsedEnd = _parseClamp(parsedEnd, "end", self); 11872 end = Math.max(start, _parsePosition(parsedEnd || (parsedEndTrigger ? "100% 0" : max), parsedEndTrigger, size, direction, scrollFunc() + offset, markerEnd, markerEndTrigger, self, scrollerBounds, borderWidth, useFixedPosition, max, containerAnimation, self._endClamp && "_endClamp")) || -0.001; 11873 offset = 0; 11874 i = triggerIndex; 11875 11876 while (i--) { 11877 curTrigger = _triggers[i]; 11878 curPin = curTrigger.pin; 11879 11880 if (curPin && curTrigger.start - curTrigger._pinPush <= start && !containerAnimation && curTrigger.end > 0) { 11881 cs = curTrigger.end - (self._startClamp ? Math.max(0, curTrigger.start) : curTrigger.start); 11882 11883 if ((curPin === trigger && curTrigger.start - curTrigger._pinPush < start || curPin === pinnedContainer) && isNaN(parsedStart)) { 11884 // numeric start values shouldn't be offset at all - treat them as absolute 11885 offset += cs * (1 - curTrigger.progress); 11886 } 11887 11888 curPin === pin && (otherPinOffset += cs); 11889 } 11890 } 11891 11892 start += offset; 11893 end += offset; 11894 self._startClamp && (self._startClamp += offset); 11895 11896 if (self._endClamp && !_refreshingAll) { 11897 self._endClamp = end || -0.001; 11898 end = Math.min(end, _maxScroll(scroller, direction)); 11899 } 11900 11901 change = end - start || (start -= 0.01) && 0.001; 11902 11903 if (isFirstRefresh) { 11904 // on the very first refresh(), the prevProgress couldn't have been accurate yet because the start/end were never calculated, so we set it here. Before 3.11.5, it could lead to an inaccurate scroll position restoration with snapping. 11905 prevProgress = gsap.utils.clamp(0, 1, gsap.utils.normalize(start, end, prevScroll)); 11906 } 11907 11908 self._pinPush = otherPinOffset; 11909 11910 if (markerStart && offset) { 11911 // offset the markers if necessary 11912 cs = {}; 11913 cs[direction.a] = "+=" + offset; 11914 pinnedContainer && (cs[direction.p] = "-=" + scrollFunc()); 11915 gsap.set([markerStart, markerEnd], cs); 11916 } 11917 11918 if (pin && !(_clampingMax && self.end >= _maxScroll(scroller, direction))) { 11919 cs = _getComputedStyle(pin); 11920 isVertical = direction === _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"]; 11921 scroll = scrollFunc(); // recalculate because the triggers can affect the scroll 11922 11923 pinStart = parseFloat(pinGetter(direction.a)) + otherPinOffset; 11924 11925 if (!max && end > 1) { 11926 // makes sure the scroller has a scrollbar, otherwise if something has width: 100%, for example, it would be too big (exclude the scrollbar). See https://gsap.com/forums/topic/25182-scrolltrigger-width-of-page-increase-where-markers-are-set-to-false/ 11927 forcedOverflow = (isViewport ? _doc.scrollingElement || _docEl : scroller).style; 11928 forcedOverflow = { 11929 style: forcedOverflow, 11930 value: forcedOverflow["overflow" + direction.a.toUpperCase()] 11931 }; 11932 11933 if (isViewport && _getComputedStyle(_body)["overflow" + direction.a.toUpperCase()] !== "scroll") { 11934 // avoid an extra scrollbar if BOTH <html> and <body> have overflow set to "scroll" 11935 forcedOverflow.style["overflow" + direction.a.toUpperCase()] = "scroll"; 11936 } 11937 } 11938 11939 _swapPinIn(pin, spacer, cs); 11940 11941 pinState = _getState(pin); // transforms will interfere with the top/left/right/bottom placement, so remove them temporarily. getBoundingClientRect() factors in transforms. 11942 11943 bounds = _getBounds(pin, true); 11944 oppositeScroll = useFixedPosition && Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getScrollFunc"])(scroller, isVertical ? _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"] : _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"])(); 11945 11946 if (pinSpacing) { 11947 spacerState = [pinSpacing + direction.os2, change + otherPinOffset + _px]; 11948 spacerState.t = spacer; 11949 i = pinSpacing === _padding ? _getSize(pin, direction) + change + otherPinOffset : 0; 11950 11951 if (i) { 11952 spacerState.push(direction.d, i + _px); // for box-sizing: border-box (must include padding). 11953 11954 spacer.style.flexBasis !== "auto" && (spacer.style.flexBasis = i + _px); 11955 } 11956 11957 _setState(spacerState); 11958 11959 if (pinnedContainer) { 11960 // in ScrollTrigger.refresh(), we need to re-evaluate the pinContainer's size because this pinSpacing may stretch it out, but we can't just add the exact distance because depending on layout, it may not push things down or it may only do so partially. 11961 _triggers.forEach(function (t) { 11962 if (t.pin === pinnedContainer && t.vars.pinSpacing !== false) { 11963 t._subPinOffset = true; 11964 } 11965 }); 11966 } 11967 11968 useFixedPosition && scrollFunc(prevScroll); 11969 } else { 11970 i = _getSize(pin, direction); 11971 i && spacer.style.flexBasis !== "auto" && (spacer.style.flexBasis = i + _px); 11972 } 11973 11974 if (useFixedPosition) { 11975 override = { 11976 top: bounds.top + (isVertical ? scroll - start : oppositeScroll) + _px, 11977 left: bounds.left + (isVertical ? oppositeScroll : scroll - start) + _px, 11978 boxSizing: "border-box", 11979 position: "fixed" 11980 }; 11981 override[_width] = override["max" + _Width] = Math.ceil(bounds.width) + _px; 11982 override[_height] = override["max" + _Height] = Math.ceil(bounds.height) + _px; 11983 override[_margin] = override[_margin + _Top] = override[_margin + _Right] = override[_margin + _Bottom] = override[_margin + _Left] = "0"; 11984 override[_padding] = cs[_padding]; 11985 override[_padding + _Top] = cs[_padding + _Top]; 11986 override[_padding + _Right] = cs[_padding + _Right]; 11987 override[_padding + _Bottom] = cs[_padding + _Bottom]; 11988 override[_padding + _Left] = cs[_padding + _Left]; 11989 pinActiveState = _copyState(pinOriginalState, override, pinReparent); 11990 _refreshingAll && scrollFunc(0); 11991 } 11992 11993 if (animation) { 11994 // the animation might be affecting the transform, so we must jump to the end, check the value, and compensate accordingly. Otherwise, when it becomes unpinned, the pinSetter() will get set to a value that doesn't include whatever the animation did. 11995 initted = animation._initted; // if not, we must invalidate() after this step, otherwise it could lock in starting values prematurely. 11996 11997 _suppressOverwrites(1); 11998 11999 animation.render(animation.duration(), true, true); 12000 pinChange = pinGetter(direction.a) - pinStart + change + otherPinOffset; 12001 pinMoves = Math.abs(change - pinChange) > 1; 12002 useFixedPosition && pinMoves && pinActiveState.splice(pinActiveState.length - 2, 2); // transform is the last property/value set in the state Array. Since the animation is controlling that, we should omit it. 12003 12004 animation.render(0, true, true); 12005 initted || animation.invalidate(true); 12006 animation.parent || animation.totalTime(animation.totalTime()); // if, for example, a toggleAction called play() and then refresh() happens and when we render(1) above, it would cause the animation to complete and get removed from its parent, so this makes sure it gets put back in. 12007 12008 _suppressOverwrites(0); 12009 } else { 12010 pinChange = change; 12011 } 12012 12013 forcedOverflow && (forcedOverflow.value ? forcedOverflow.style["overflow" + direction.a.toUpperCase()] = forcedOverflow.value : forcedOverflow.style.removeProperty("overflow-" + direction.a)); 12014 } else if (trigger && scrollFunc() && !containerAnimation) { 12015 // it may be INSIDE a pinned element, so walk up the tree and look for any elements with _pinOffset to compensate because anything with pinSpacing that's already scrolled would throw off the measurements in getBoundingClientRect() 12016 bounds = trigger.parentNode; 12017 12018 while (bounds && bounds !== _body) { 12019 if (bounds._pinOffset) { 12020 start -= bounds._pinOffset; 12021 end -= bounds._pinOffset; 12022 } 12023 12024 bounds = bounds.parentNode; 12025 } 12026 } 12027 12028 revertedPins && revertedPins.forEach(function (t) { 12029 return t.revert(false, true); 12030 }); 12031 self.start = start; 12032 self.end = end; 12033 scroll1 = scroll2 = _refreshingAll ? prevScroll : scrollFunc(); // reset velocity 12034 12035 if (!containerAnimation && !_refreshingAll) { 12036 scroll1 < prevScroll && scrollFunc(prevScroll); 12037 self.scroll.rec = 0; 12038 } 12039 12040 self.revert(false, true); 12041 lastRefresh = _getTime(); 12042 12043 if (snapDelayedCall) { 12044 lastSnap = -1; // just so snapping gets re-enabled, clear out any recorded last value 12045 // self.isActive && scrollFunc(start + change * prevProgress); // previously this line was here to ensure that when snapping kicks in, it's from the previous progress but in some cases that's not desirable, like an all-page ScrollTrigger when new content gets added to the page, that'd totally change the progress. 12046 12047 snapDelayedCall.restart(true); 12048 } 12049 12050 _refreshing = 0; 12051 animation && isToggle && (animation._initted || prevAnimProgress) && animation.progress() !== prevAnimProgress && animation.progress(prevAnimProgress || 0, true).render(animation.time(), true, true); // must force a re-render because if saveStyles() was used on the target(s), the styles could have been wiped out during the refresh(). 12052 12053 if (isFirstRefresh || prevProgress !== self.progress || containerAnimation || invalidateOnRefresh) { 12054 // ensures that the direction is set properly (when refreshing, progress is set back to 0 initially, then back again to wherever it needs to be) and that callbacks are triggered. 12055 animation && !isToggle && animation.totalProgress(containerAnimation && start < -0.001 && !prevProgress ? gsap.utils.normalize(start, end, 0) : prevProgress, true); // to avoid issues where animation callbacks like onStart aren't triggered. 12056 12057 self.progress = isFirstRefresh || (scroll1 - start) / change === prevProgress ? 0 : prevProgress; 12058 } 12059 12060 pin && pinSpacing && (spacer._pinOffset = Math.round(self.progress * pinChange)); 12061 scrubTween && scrubTween.invalidate(); 12062 12063 if (!isNaN(markerStartOffset)) { 12064 // numbers were passed in for the position which are absolute, so instead of just putting the markers at the very bottom of the viewport, we figure out how far they shifted down (it's safe to assume they were originally positioned in closer relation to the trigger element with values like "top", "center", a percentage or whatever, so we offset that much in the opposite direction to basically revert them to the relative position thy were at previously. 12065 markerStartOffset -= gsap.getProperty(markerStartTrigger, direction.p); 12066 markerEndOffset -= gsap.getProperty(markerEndTrigger, direction.p); 12067 12068 _shiftMarker(markerStartTrigger, direction, markerStartOffset); 12069 12070 _shiftMarker(markerStart, direction, markerStartOffset - (pinOffset || 0)); 12071 12072 _shiftMarker(markerEndTrigger, direction, markerEndOffset); 12073 12074 _shiftMarker(markerEnd, direction, markerEndOffset - (pinOffset || 0)); 12075 } 12076 12077 isFirstRefresh && !_refreshingAll && self.update(); // edge case - when you reload a page when it's already scrolled down, some browsers fire a "scroll" event before DOMContentLoaded, triggering an updateAll(). If we don't update the self.progress as part of refresh(), then when it happens next, it may record prevProgress as 0 when it really shouldn't, potentially causing a callback in an animation to fire again. 12078 12079 if (onRefresh && !_refreshingAll && !executingOnRefresh) { 12080 // when refreshing all, we do extra work to correct pinnedContainer sizes and ensure things don't exceed the maxScroll, so we should do all the refreshes at the end after all that work so that the start/end values are corrected. 12081 executingOnRefresh = true; 12082 onRefresh(self); 12083 executingOnRefresh = false; 12084 } 12085 }; 12086 12087 self.getVelocity = function () { 12088 return (scrollFunc() - scroll2) / (_getTime() - _time2) * 1000 || 0; 12089 }; 12090 12091 self.endAnimation = function () { 12092 _endAnimation(self.callbackAnimation); 12093 12094 if (animation) { 12095 scrubTween ? scrubTween.progress(1) : !animation.paused() ? _endAnimation(animation, animation.reversed()) : isToggle || _endAnimation(animation, self.direction < 0, 1); 12096 } 12097 }; 12098 12099 self.labelToScroll = function (label) { 12100 return animation && animation.labels && (start || self.refresh() || start) + animation.labels[label] / animation.duration() * change || 0; 12101 }; 12102 12103 self.getTrailing = function (name) { 12104 var i = _triggers.indexOf(self), 12105 a = self.direction > 0 ? _triggers.slice(0, i).reverse() : _triggers.slice(i + 1); 12106 12107 return (_isString(name) ? a.filter(function (t) { 12108 return t.vars.preventOverlaps === name; 12109 }) : a).filter(function (t) { 12110 return self.direction > 0 ? t.end <= start : t.start >= end; 12111 }); 12112 }; 12113 12114 self.update = function (reset, recordVelocity, forceFake) { 12115 if (containerAnimation && !forceFake && !reset) { 12116 return; 12117 } 12118 12119 var scroll = _refreshingAll === true ? prevScroll : self.scroll(), 12120 p = reset ? 0 : (scroll - start) / change, 12121 clipped = p < 0 ? 0 : p > 1 ? 1 : p || 0, 12122 prevProgress = self.progress, 12123 isActive, 12124 wasActive, 12125 toggleState, 12126 action, 12127 stateChanged, 12128 toggled, 12129 isAtMax, 12130 isTakingAction; 12131 12132 if (recordVelocity) { 12133 scroll2 = scroll1; 12134 scroll1 = containerAnimation ? scrollFunc() : scroll; 12135 12136 if (snap) { 12137 snap2 = snap1; 12138 snap1 = animation && !isToggle ? animation.totalProgress() : clipped; 12139 } 12140 } // anticipate the pinning a few ticks ahead of time based on velocity to avoid a visual glitch due to the fact that most browsers do scrolling on a separate thread (not synced with requestAnimationFrame). 12141 12142 12143 if (anticipatePin && pin && !_refreshing && !_startup && _lastScrollTime) { 12144 if (!clipped && start < scroll + (scroll - scroll2) / (_getTime() - _time2) * anticipatePin) { 12145 clipped = 0.0001; 12146 } else if (clipped === 1 && end > scroll + (scroll - scroll2) / (_getTime() - _time2) * anticipatePin) { 12147 clipped = 0.9999; 12148 } 12149 } 12150 12151 if (clipped !== prevProgress && self.enabled) { 12152 isActive = self.isActive = !!clipped && clipped < 1; 12153 wasActive = !!prevProgress && prevProgress < 1; 12154 toggled = isActive !== wasActive; 12155 stateChanged = toggled || !!clipped !== !!prevProgress; // could go from start all the way to end, thus it didn't toggle but it did change state in a sense (may need to fire a callback) 12156 12157 self.direction = clipped > prevProgress ? 1 : -1; 12158 self.progress = clipped; 12159 12160 if (stateChanged && !_refreshing) { 12161 toggleState = clipped && !prevProgress ? 0 : clipped === 1 ? 1 : prevProgress === 1 ? 2 : 3; // 0 = enter, 1 = leave, 2 = enterBack, 3 = leaveBack (we prioritize the FIRST encounter, thus if you scroll really fast past the onEnter and onLeave in one tick, it'd prioritize onEnter. 12162 12163 if (isToggle) { 12164 action = !toggled && toggleActions[toggleState + 1] !== "none" && toggleActions[toggleState + 1] || toggleActions[toggleState]; // if it didn't toggle, that means it shot right past and since we prioritize the "enter" action, we should switch to the "leave" in this case (but only if one is defined) 12165 12166 isTakingAction = animation && (action === "complete" || action === "reset" || action in animation); 12167 } 12168 } 12169 12170 preventOverlaps && (toggled || isTakingAction) && (isTakingAction || scrub || !animation) && (_isFunction(preventOverlaps) ? preventOverlaps(self) : self.getTrailing(preventOverlaps).forEach(function (t) { 12171 return t.endAnimation(); 12172 })); 12173 12174 if (!isToggle) { 12175 if (scrubTween && !_refreshing && !_startup) { 12176 scrubTween._dp._time - scrubTween._start !== scrubTween._time && scrubTween.render(scrubTween._dp._time - scrubTween._start); // if there's a scrub on both the container animation and this one (or a ScrollSmoother), the update order would cause this one not to have rendered yet, so it wouldn't make any progress before we .restart() it heading toward the new progress so it'd appear stuck thus we force a render here. 12177 12178 if (scrubTween.resetTo) { 12179 scrubTween.resetTo("totalProgress", clipped, animation._tTime / animation._tDur); 12180 } else { 12181 // legacy support (courtesy), before 3.10.0 12182 scrubTween.vars.totalProgress = clipped; 12183 scrubTween.invalidate().restart(); 12184 } 12185 } else if (animation) { 12186 animation.totalProgress(clipped, !!(_refreshing && (lastRefresh || reset))); 12187 } 12188 } 12189 12190 if (pin) { 12191 reset && pinSpacing && (spacer.style[pinSpacing + direction.os2] = spacingStart); 12192 12193 if (!useFixedPosition) { 12194 pinSetter(_round(pinStart + pinChange * clipped)); 12195 } else if (stateChanged) { 12196 isAtMax = !reset && clipped > prevProgress && end + 1 > scroll && scroll + 1 >= _maxScroll(scroller, direction); // if it's at the VERY end of the page, don't switch away from position: fixed because it's pointless and it could cause a brief flash when the user scrolls back up (when it gets pinned again) 12197 12198 if (pinReparent) { 12199 if (!reset && (isActive || isAtMax)) { 12200 var bounds = _getBounds(pin, true), 12201 _offset = scroll - start; 12202 12203 _reparent(pin, _body, bounds.top + (direction === _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"] ? _offset : 0) + _px, bounds.left + (direction === _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"] ? 0 : _offset) + _px); 12204 } else { 12205 _reparent(pin, spacer); 12206 } 12207 } 12208 12209 _setState(isActive || isAtMax ? pinActiveState : pinState); 12210 12211 pinMoves && clipped < 1 && isActive || pinSetter(pinStart + (clipped === 1 && !isAtMax ? pinChange : 0)); 12212 } 12213 } 12214 12215 snap && !tweenTo.tween && !_refreshing && !_startup && snapDelayedCall.restart(true); 12216 toggleClass && (toggled || once && clipped && (clipped < 1 || !_limitCallbacks)) && _toArray(toggleClass.targets).forEach(function (el) { 12217 return el.classList[isActive || once ? "add" : "remove"](toggleClass.className); 12218 }); // classes could affect positioning, so do it even if reset or refreshing is true. 12219 12220 onUpdate && !isToggle && !reset && onUpdate(self); 12221 12222 if (stateChanged && !_refreshing) { 12223 if (isToggle) { 12224 if (isTakingAction) { 12225 if (action === "complete") { 12226 animation.pause().totalProgress(1); 12227 } else if (action === "reset") { 12228 animation.restart(true).pause(); 12229 } else if (action === "restart") { 12230 animation.restart(true); 12231 } else { 12232 animation[action](); 12233 } 12234 } 12235 12236 onUpdate && onUpdate(self); 12237 } 12238 12239 if (toggled || !_limitCallbacks) { 12240 // on startup, the page could be scrolled and we don't want to fire callbacks that didn't toggle. For example onEnter shouldn't fire if the ScrollTrigger isn't actually entered. 12241 onToggle && toggled && _callback(self, onToggle); 12242 callbacks[toggleState] && _callback(self, callbacks[toggleState]); 12243 once && (clipped === 1 ? self.kill(false, 1) : callbacks[toggleState] = 0); // a callback shouldn't be called again if once is true. 12244 12245 if (!toggled) { 12246 // it's possible to go completely past, like from before the start to after the end (or vice-versa) in which case BOTH callbacks should be fired in that order 12247 toggleState = clipped === 1 ? 1 : 3; 12248 callbacks[toggleState] && _callback(self, callbacks[toggleState]); 12249 } 12250 } 12251 12252 if (fastScrollEnd && !isActive && Math.abs(self.getVelocity()) > (_isNumber(fastScrollEnd) ? fastScrollEnd : 2500)) { 12253 _endAnimation(self.callbackAnimation); 12254 12255 scrubTween ? scrubTween.progress(1) : _endAnimation(animation, action === "reverse" ? 1 : !clipped, 1); 12256 } 12257 } else if (isToggle && onUpdate && !_refreshing) { 12258 onUpdate(self); 12259 } 12260 } // update absolutely-positioned markers (only if the scroller isn't the viewport) 12261 12262 12263 if (markerEndSetter) { 12264 var n = containerAnimation ? scroll / containerAnimation.duration() * (containerAnimation._caScrollDist || 0) : scroll; 12265 markerStartSetter(n + (markerStartTrigger._isFlipped ? 1 : 0)); 12266 markerEndSetter(n); 12267 } 12268 12269 caMarkerSetter && caMarkerSetter(-scroll / containerAnimation.duration() * (containerAnimation._caScrollDist || 0)); 12270 }; 12271 12272 self.enable = function (reset, refresh) { 12273 if (!self.enabled) { 12274 self.enabled = true; 12275 12276 _addListener(scroller, "resize", _onResize); 12277 12278 isViewport || _addListener(scroller, "scroll", _onScroll); 12279 onRefreshInit && _addListener(ScrollTrigger, "refreshInit", onRefreshInit); 12280 12281 if (reset !== false) { 12282 self.progress = prevProgress = 0; 12283 scroll1 = scroll2 = lastSnap = scrollFunc(); 12284 } 12285 12286 refresh !== false && self.refresh(); 12287 } 12288 }; 12289 12290 self.getTween = function (snap) { 12291 return snap && tweenTo ? tweenTo.tween : scrubTween; 12292 }; 12293 12294 self.setPositions = function (newStart, newEnd, keepClamp, pinOffset) { 12295 // doesn't persist after refresh()! Intended to be a way to override values that were set during refresh(), like you could set it in onRefresh() 12296 if (containerAnimation) { 12297 // convert ratios into scroll positions. Remember, start/end values on ScrollTriggers that have a containerAnimation refer to the time (in seconds), NOT scroll positions. 12298 var st = containerAnimation.scrollTrigger, 12299 duration = containerAnimation.duration(), 12300 _change = st.end - st.start; 12301 12302 newStart = st.start + _change * newStart / duration; 12303 newEnd = st.start + _change * newEnd / duration; 12304 } 12305 12306 self.refresh(false, false, { 12307 start: _keepClamp(newStart, keepClamp && !!self._startClamp), 12308 end: _keepClamp(newEnd, keepClamp && !!self._endClamp) 12309 }, pinOffset); 12310 self.update(); 12311 }; 12312 12313 self.adjustPinSpacing = function (amount) { 12314 if (spacerState && amount) { 12315 var i = spacerState.indexOf(direction.d) + 1; 12316 spacerState[i] = parseFloat(spacerState[i]) + amount + _px; 12317 spacerState[1] = parseFloat(spacerState[1]) + amount + _px; 12318 12319 _setState(spacerState); 12320 } 12321 }; 12322 12323 self.disable = function (reset, allowAnimation) { 12324 if (self.enabled) { 12325 reset !== false && self.revert(true, true); 12326 self.enabled = self.isActive = false; 12327 allowAnimation || scrubTween && scrubTween.pause(); 12328 prevScroll = 0; 12329 pinCache && (pinCache.uncache = 1); 12330 onRefreshInit && _removeListener(ScrollTrigger, "refreshInit", onRefreshInit); 12331 12332 if (snapDelayedCall) { 12333 snapDelayedCall.pause(); 12334 tweenTo.tween && tweenTo.tween.kill() && (tweenTo.tween = 0); 12335 } 12336 12337 if (!isViewport) { 12338 var i = _triggers.length; 12339 12340 while (i--) { 12341 if (_triggers[i].scroller === scroller && _triggers[i] !== self) { 12342 return; //don't remove the listeners if there are still other triggers referencing it. 12343 } 12344 } 12345 12346 _removeListener(scroller, "resize", _onResize); 12347 12348 isViewport || _removeListener(scroller, "scroll", _onScroll); 12349 } 12350 } 12351 }; 12352 12353 self.kill = function (revert, allowAnimation) { 12354 self.disable(revert, allowAnimation); 12355 scrubTween && !allowAnimation && scrubTween.kill(); 12356 id && delete _ids[id]; 12357 12358 var i = _triggers.indexOf(self); 12359 12360 i >= 0 && _triggers.splice(i, 1); 12361 i === _i && _direction > 0 && _i--; // if we're in the middle of a refresh() or update(), splicing would cause skips in the index, so adjust... 12362 // if no other ScrollTrigger instances of the same scroller are found, wipe out any recorded scroll position. Otherwise, in a single page application, for example, it could maintain scroll position when it really shouldn't. 12363 12364 i = 0; 12365 12366 _triggers.forEach(function (t) { 12367 return t.scroller === self.scroller && (i = 1); 12368 }); 12369 12370 i || _refreshingAll || (self.scroll.rec = 0); 12371 12372 if (animation) { 12373 animation.scrollTrigger = null; 12374 revert && animation.revert({ 12375 kill: false 12376 }); 12377 allowAnimation || animation.kill(); 12378 } 12379 12380 markerStart && [markerStart, markerEnd, markerStartTrigger, markerEndTrigger].forEach(function (m) { 12381 return m.parentNode && m.parentNode.removeChild(m); 12382 }); 12383 _primary === self && (_primary = 0); 12384 12385 if (pin) { 12386 pinCache && (pinCache.uncache = 1); 12387 i = 0; 12388 12389 _triggers.forEach(function (t) { 12390 return t.pin === pin && i++; 12391 }); 12392 12393 i || (pinCache.spacer = 0); // if there aren't any more ScrollTriggers with the same pin, remove the spacer, otherwise it could be contaminated with old/stale values if the user re-creates a ScrollTrigger for the same element. 12394 } 12395 12396 vars.onKill && vars.onKill(self); 12397 }; 12398 12399 _triggers.push(self); 12400 12401 self.enable(false, false); 12402 customRevertReturn && customRevertReturn(self); 12403 12404 if (animation && animation.add && !change) { 12405 // if the animation is a timeline, it may not have been populated yet, so it wouldn't render at the proper place on the first refresh(), thus we should schedule one for the next tick. If "change" is defined, we know it must be re-enabling, thus we can refresh() right away. 12406 var updateFunc = self.update; // some browsers may fire a scroll event BEFORE a tick elapses and/or the DOMContentLoaded fires. So there's a chance update() will be called BEFORE a refresh() has happened on a Timeline-attached ScrollTrigger which means the start/end won't be calculated yet. We don't want to add conditional logic inside the update() method (like check to see if end is defined and if not, force a refresh()) because that's a function that gets hit a LOT (performance). So we swap out the real update() method for this one that'll re-attach it the first time it gets called and of course forces a refresh(). 12407 12408 self.update = function () { 12409 self.update = updateFunc; 12410 start || end || self.refresh(); 12411 }; 12412 12413 gsap.delayedCall(0.01, self.update); 12414 change = 0.01; 12415 start = end = 0; 12416 } else { 12417 self.refresh(); 12418 } 12419 12420 pin && _queueRefreshAll(); // pinning could affect the positions of other things, so make sure we queue a full refresh() 12421 }; 12422 12423 ScrollTrigger.register = function register(core) { 12424 if (!_coreInitted) { 12425 gsap = core || _getGSAP(); 12426 _windowExists() && window.document && ScrollTrigger.enable(); 12427 _coreInitted = _enabled; 12428 } 12429 12430 return _coreInitted; 12431 }; 12432 12433 ScrollTrigger.defaults = function defaults(config) { 12434 if (config) { 12435 for (var p in config) { 12436 _defaults[p] = config[p]; 12437 } 12438 } 12439 12440 return _defaults; 12441 }; 12442 12443 ScrollTrigger.disable = function disable(reset, kill) { 12444 _enabled = 0; 12445 12446 _triggers.forEach(function (trigger) { 12447 return trigger[kill ? "kill" : "disable"](reset); 12448 }); 12449 12450 _removeListener(_win, "wheel", _onScroll); 12451 12452 _removeListener(_doc, "scroll", _onScroll); 12453 12454 clearInterval(_syncInterval); 12455 12456 _removeListener(_doc, "touchcancel", _passThrough); 12457 12458 _removeListener(_body, "touchstart", _passThrough); 12459 12460 _multiListener(_removeListener, _doc, "pointerdown,touchstart,mousedown", _pointerDownHandler); 12461 12462 _multiListener(_removeListener, _doc, "pointerup,touchend,mouseup", _pointerUpHandler); 12463 12464 _resizeDelay.kill(); 12465 12466 _iterateAutoRefresh(_removeListener); 12467 12468 for (var i = 0; i < _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].length; i += 3) { 12469 _wheelListener(_removeListener, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"][i], _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"][i + 1]); 12470 12471 _wheelListener(_removeListener, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"][i], _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"][i + 2]); 12472 } 12473 }; 12474 12475 ScrollTrigger.enable = function enable() { 12476 _win = window; 12477 _doc = document; 12478 _docEl = _doc.documentElement; 12479 _body = _doc.body; 12480 12481 if (gsap) { 12482 _toArray = gsap.utils.toArray; 12483 _clamp = gsap.utils.clamp; 12484 _context = gsap.core.context || _passThrough; 12485 _suppressOverwrites = gsap.core.suppressOverwrites || _passThrough; 12486 _scrollRestoration = _win.history.scrollRestoration || "auto"; 12487 _lastScroll = _win.pageYOffset; 12488 gsap.core.globals("ScrollTrigger", ScrollTrigger); // must register the global manually because in Internet Explorer, functions (classes) don't have a "name" property. 12489 12490 if (_body) { 12491 _enabled = 1; 12492 _div100vh = document.createElement("div"); // to solve mobile browser address bar show/hide resizing, we shouldn't rely on window.innerHeight. Instead, use a <div> with its height set to 100vh and measure that since that's what the scrolling is based on anyway and it's not affected by address bar showing/hiding. 12493 12494 _div100vh.style.height = "100vh"; 12495 _div100vh.style.position = "absolute"; 12496 12497 _refresh100vh(); 12498 12499 _rafBugFix(); 12500 12501 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"].register(gsap); // isTouch is 0 if no touch, 1 if ONLY touch, and 2 if it can accommodate touch but also other types like mouse/pointer. 12502 12503 ScrollTrigger.isTouch = _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"].isTouch; 12504 _fixIOSBug = _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"].isTouch && /(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent); // since 2017, iOS has had a bug that causes event.clientX/Y to be inaccurate when a scroll occurs, thus we must alternate ignoring every other touchmove event to work around it. See https://bugs.webkit.org/show_bug.cgi?id=181954 and https://codepen.io/GreenSock/pen/ExbrPNa/087cef197dc35445a0951e8935c41503 12505 12506 _ignoreMobileResize = _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"].isTouch === 1; 12507 12508 _addListener(_win, "wheel", _onScroll); // mostly for 3rd party smooth scrolling libraries. 12509 12510 12511 _root = [_win, _doc, _docEl, _body]; 12512 12513 if (gsap.matchMedia) { 12514 ScrollTrigger.matchMedia = function (vars) { 12515 var mm = gsap.matchMedia(), 12516 p; 12517 12518 for (p in vars) { 12519 mm.add(p, vars[p]); 12520 } 12521 12522 return mm; 12523 }; 12524 12525 gsap.addEventListener("matchMediaInit", function () { 12526 return _revertAll(); 12527 }); 12528 gsap.addEventListener("matchMediaRevert", function () { 12529 return _revertRecorded(); 12530 }); 12531 gsap.addEventListener("matchMedia", function () { 12532 _refreshAll(0, 1); 12533 12534 _dispatch("matchMedia"); 12535 }); 12536 gsap.matchMedia("(orientation: portrait)", function () { 12537 // when orientation changes, we should take new base measurements for the ignoreMobileResize feature. 12538 _setBaseDimensions(); 12539 12540 return _setBaseDimensions; 12541 }); 12542 } else { 12543 console.warn("Requires GSAP 3.11.0 or later"); 12544 } 12545 12546 _setBaseDimensions(); 12547 12548 _addListener(_doc, "scroll", _onScroll); // some browsers (like Chrome), the window stops dispatching scroll events on the window if you scroll really fast, but it's consistent on the document! 12549 12550 12551 var bodyStyle = _body.style, 12552 border = bodyStyle.borderTopStyle, 12553 AnimationProto = gsap.core.Animation.prototype, 12554 bounds, 12555 i; 12556 AnimationProto.revert || Object.defineProperty(AnimationProto, "revert", { 12557 value: function value() { 12558 return this.time(-0.01, true); 12559 } 12560 }); // only for backwards compatibility (Animation.revert() was added after 3.10.4) 12561 12562 bodyStyle.borderTopStyle = "solid"; // works around an issue where a margin of a child element could throw off the bounds of the _body, making it seem like there's a margin when there actually isn't. The border ensures that the bounds are accurate. 12563 12564 bounds = _getBounds(_body); 12565 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"].m = Math.round(bounds.top + _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"].sc()) || 0; // accommodate the offset of the <body> caused by margins and/or padding 12566 12567 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"].m = Math.round(bounds.left + _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"].sc()) || 0; 12568 border ? bodyStyle.borderTopStyle = border : bodyStyle.removeProperty("border-top-style"); // TODO: (?) maybe move to leveraging the velocity mechanism in Observer and skip intervals. 12569 12570 _syncInterval = setInterval(_sync, 250); 12571 gsap.delayedCall(0.5, function () { 12572 return _startup = 0; 12573 }); 12574 12575 _addListener(_doc, "touchcancel", _passThrough); // some older Android devices intermittently stop dispatching "touchmove" events if we don't listen for "touchcancel" on the document. 12576 12577 12578 _addListener(_body, "touchstart", _passThrough); //works around Safari bug: https://gsap.com/forums/topic/21450-draggable-in-iframe-on-mobile-is-buggy/ 12579 12580 12581 _multiListener(_addListener, _doc, "pointerdown,touchstart,mousedown", _pointerDownHandler); 12582 12583 _multiListener(_addListener, _doc, "pointerup,touchend,mouseup", _pointerUpHandler); 12584 12585 _transformProp = gsap.utils.checkPrefix("transform"); 12586 12587 _stateProps.push(_transformProp); 12588 12589 _coreInitted = _getTime(); 12590 _resizeDelay = gsap.delayedCall(0.2, _refreshAll).pause(); 12591 _autoRefresh = [_doc, "visibilitychange", function () { 12592 var w = _win.innerWidth, 12593 h = _win.innerHeight; 12594 12595 if (_doc.hidden) { 12596 _prevWidth = w; 12597 _prevHeight = h; 12598 } else if (_prevWidth !== w || _prevHeight !== h) { 12599 _onResize(); 12600 } 12601 }, _doc, "DOMContentLoaded", _refreshAll, _win, "load", _refreshAll, _win, "resize", _onResize]; 12602 12603 _iterateAutoRefresh(_addListener); 12604 12605 _triggers.forEach(function (trigger) { 12606 return trigger.enable(0, 1); 12607 }); 12608 12609 for (i = 0; i < _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].length; i += 3) { 12610 _wheelListener(_removeListener, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"][i], _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"][i + 1]); 12611 12612 _wheelListener(_removeListener, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"][i], _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"][i + 2]); 12613 } 12614 } 12615 } 12616 }; 12617 12618 ScrollTrigger.config = function config(vars) { 12619 "limitCallbacks" in vars && (_limitCallbacks = !!vars.limitCallbacks); 12620 var ms = vars.syncInterval; 12621 ms && clearInterval(_syncInterval) || (_syncInterval = ms) && setInterval(_sync, ms); 12622 "ignoreMobileResize" in vars && (_ignoreMobileResize = ScrollTrigger.isTouch === 1 && vars.ignoreMobileResize); 12623 12624 if ("autoRefreshEvents" in vars) { 12625 _iterateAutoRefresh(_removeListener) || _iterateAutoRefresh(_addListener, vars.autoRefreshEvents || "none"); 12626 _ignoreResize = (vars.autoRefreshEvents + "").indexOf("resize") === -1; 12627 } 12628 }; 12629 12630 ScrollTrigger.scrollerProxy = function scrollerProxy(target, vars) { 12631 var t = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(target), 12632 i = _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].indexOf(t), 12633 isViewport = _isViewport(t); 12634 12635 if (~i) { 12636 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].splice(i, isViewport ? 6 : 2); 12637 } 12638 12639 if (vars) { 12640 isViewport ? _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_proxies"].unshift(_win, vars, _body, vars, _docEl, vars) : _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_proxies"].unshift(t, vars); 12641 } 12642 }; 12643 12644 ScrollTrigger.clearMatchMedia = function clearMatchMedia(query) { 12645 _triggers.forEach(function (t) { 12646 return t._ctx && t._ctx.query === query && t._ctx.kill(true, true); 12647 }); 12648 }; 12649 12650 ScrollTrigger.isInViewport = function isInViewport(element, ratio, horizontal) { 12651 var bounds = (_isString(element) ? Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(element) : element).getBoundingClientRect(), 12652 offset = bounds[horizontal ? _width : _height] * ratio || 0; 12653 return horizontal ? bounds.right - offset > 0 && bounds.left + offset < _win.innerWidth : bounds.bottom - offset > 0 && bounds.top + offset < _win.innerHeight; 12654 }; 12655 12656 ScrollTrigger.positionInViewport = function positionInViewport(element, referencePoint, horizontal) { 12657 _isString(element) && (element = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(element)); 12658 var bounds = element.getBoundingClientRect(), 12659 size = bounds[horizontal ? _width : _height], 12660 offset = referencePoint == null ? size / 2 : referencePoint in _keywords ? _keywords[referencePoint] * size : ~referencePoint.indexOf("%") ? parseFloat(referencePoint) * size / 100 : parseFloat(referencePoint) || 0; 12661 return horizontal ? (bounds.left + offset) / _win.innerWidth : (bounds.top + offset) / _win.innerHeight; 12662 }; 12663 12664 ScrollTrigger.killAll = function killAll(allowListeners) { 12665 _triggers.slice(0).forEach(function (t) { 12666 return t.vars.id !== "ScrollSmoother" && t.kill(); 12667 }); 12668 12669 if (allowListeners !== true) { 12670 var listeners = _listeners.killAll || []; 12671 _listeners = {}; 12672 listeners.forEach(function (f) { 12673 return f(); 12674 }); 12675 } 12676 }; 12677 12678 return ScrollTrigger; 12679}(); 12680ScrollTrigger.version = "3.12.5"; 12681 12682ScrollTrigger.saveStyles = function (targets) { 12683 return targets ? _toArray(targets).forEach(function (target) { 12684 // saved styles are recorded in a consecutive alternating Array, like [element, cssText, transform attribute, cache, matchMedia, ...] 12685 if (target && target.style) { 12686 var i = _savedStyles.indexOf(target); 12687 12688 i >= 0 && _savedStyles.splice(i, 5); 12689 12690 _savedStyles.push(target, target.style.cssText, target.getBBox && target.getAttribute("transform"), gsap.core.getCache(target), _context()); 12691 } 12692 }) : _savedStyles; 12693}; 12694 12695ScrollTrigger.revert = function (soft, media) { 12696 return _revertAll(!soft, media); 12697}; 12698 12699ScrollTrigger.create = function (vars, animation) { 12700 return new ScrollTrigger(vars, animation); 12701}; 12702 12703ScrollTrigger.refresh = function (safe) { 12704 return safe ? _onResize() : (_coreInitted || ScrollTrigger.register()) && _refreshAll(true); 12705}; 12706 12707ScrollTrigger.update = function (force) { 12708 return ++_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].cache && _updateAll(force === true ? 2 : 0); 12709}; 12710 12711ScrollTrigger.clearScrollMemory = _clearScrollMemory; 12712 12713ScrollTrigger.maxScroll = function (element, horizontal) { 12714 return _maxScroll(element, horizontal ? _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"] : _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"]); 12715}; 12716 12717ScrollTrigger.getScrollFunc = function (element, horizontal) { 12718 return Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getScrollFunc"])(Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(element), horizontal ? _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"] : _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"]); 12719}; 12720 12721ScrollTrigger.getById = function (id) { 12722 return _ids[id]; 12723}; 12724 12725ScrollTrigger.getAll = function () { 12726 return _triggers.filter(function (t) { 12727 return t.vars.id !== "ScrollSmoother"; 12728 }); 12729}; // it's common for people to ScrollTrigger.getAll(t => t.kill()) on page routes, for example, and we don't want it to ruin smooth scrolling by killing the main ScrollSmoother one. 12730 12731 12732ScrollTrigger.isScrolling = function () { 12733 return !!_lastScrollTime; 12734}; 12735 12736ScrollTrigger.snapDirectional = _snapDirectional; 12737 12738ScrollTrigger.addEventListener = function (type, callback) { 12739 var a = _listeners[type] || (_listeners[type] = []); 12740 ~a.indexOf(callback) || a.push(callback); 12741}; 12742 12743ScrollTrigger.removeEventListener = function (type, callback) { 12744 var a = _listeners[type], 12745 i = a && a.indexOf(callback); 12746 i >= 0 && a.splice(i, 1); 12747}; 12748 12749ScrollTrigger.batch = function (targets, vars) { 12750 var result = [], 12751 varsCopy = {}, 12752 interval = vars.interval || 0.016, 12753 batchMax = vars.batchMax || 1e9, 12754 proxyCallback = function proxyCallback(type, callback) { 12755 var elements = [], 12756 triggers = [], 12757 delay = gsap.delayedCall(interval, function () { 12758 callback(elements, triggers); 12759 elements = []; 12760 triggers = []; 12761 }).pause(); 12762 return function (self) { 12763 elements.length || delay.restart(true); 12764 elements.push(self.trigger); 12765 triggers.push(self); 12766 batchMax <= elements.length && delay.progress(1); 12767 }; 12768 }, 12769 p; 12770 12771 for (p in vars) { 12772 varsCopy[p] = p.substr(0, 2) === "on" && _isFunction(vars[p]) && p !== "onRefreshInit" ? proxyCallback(p, vars[p]) : vars[p]; 12773 } 12774 12775 if (_isFunction(batchMax)) { 12776 batchMax = batchMax(); 12777 12778 _addListener(ScrollTrigger, "refresh", function () { 12779 return batchMax = vars.batchMax(); 12780 }); 12781 } 12782 12783 _toArray(targets).forEach(function (target) { 12784 var config = {}; 12785 12786 for (p in varsCopy) { 12787 config[p] = varsCopy[p]; 12788 } 12789 12790 config.trigger = target; 12791 result.push(ScrollTrigger.create(config)); 12792 }); 12793 12794 return result; 12795}; // to reduce file size. clamps the scroll and also returns a duration multiplier so that if the scroll gets chopped shorter, the duration gets curtailed as well (otherwise if you're very close to the top of the page, for example, and swipe up really fast, it'll suddenly slow down and take a long time to reach the top). 12796 12797 12798var _clampScrollAndGetDurationMultiplier = function _clampScrollAndGetDurationMultiplier(scrollFunc, current, end, max) { 12799 current > max ? scrollFunc(max) : current < 0 && scrollFunc(0); 12800 return end > max ? (max - current) / (end - current) : end < 0 ? current / (current - end) : 1; 12801}, 12802 _allowNativePanning = function _allowNativePanning(target, direction) { 12803 if (direction === true) { 12804 target.style.removeProperty("touch-action"); 12805 } else { 12806 target.style.touchAction = direction === true ? "auto" : direction ? "pan-" + direction + (_Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"].isTouch ? " pinch-zoom" : "") : "none"; // note: Firefox doesn't support it pinch-zoom properly, at least in addition to a pan-x or pan-y. 12807 } 12808 12809 target === _docEl && _allowNativePanning(_body, direction); 12810}, 12811 _overflow = { 12812 auto: 1, 12813 scroll: 1 12814}, 12815 _nestedScroll = function _nestedScroll(_ref5) { 12816 var event = _ref5.event, 12817 target = _ref5.target, 12818 axis = _ref5.axis; 12819 12820 var node = (event.changedTouches ? event.changedTouches[0] : event).target, 12821 cache = node._gsap || gsap.core.getCache(node), 12822 time = _getTime(), 12823 cs; 12824 12825 if (!cache._isScrollT || time - cache._isScrollT > 2000) { 12826 // cache for 2 seconds to improve performance. 12827 while (node && node !== _body && (node.scrollHeight <= node.clientHeight && node.scrollWidth <= node.clientWidth || !(_overflow[(cs = _getComputedStyle(node)).overflowY] || _overflow[cs.overflowX]))) { 12828 node = node.parentNode; 12829 } 12830 12831 cache._isScroll = node && node !== target && !_isViewport(node) && (_overflow[(cs = _getComputedStyle(node)).overflowY] || _overflow[cs.overflowX]); 12832 cache._isScrollT = time; 12833 } 12834 12835 if (cache._isScroll || axis === "x") { 12836 event.stopPropagation(); 12837 event._gsapAllow = true; 12838 } 12839}, 12840 // capture events on scrollable elements INSIDE the <body> and allow those by calling stopPropagation() when we find a scrollable ancestor 12841_inputObserver = function _inputObserver(target, type, inputs, nested) { 12842 return _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"].create({ 12843 target: target, 12844 capture: true, 12845 debounce: false, 12846 lockAxis: true, 12847 type: type, 12848 onWheel: nested = nested && _nestedScroll, 12849 onPress: nested, 12850 onDrag: nested, 12851 onScroll: nested, 12852 onEnable: function onEnable() { 12853 return inputs && _addListener(_doc, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"].eventTypes[0], _captureInputs, false, true); 12854 }, 12855 onDisable: function onDisable() { 12856 return _removeListener(_doc, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"].eventTypes[0], _captureInputs, true); 12857 } 12858 }); 12859}, 12860 _inputExp = /(input|label|select|textarea)/i, 12861 _inputIsFocused, 12862 _captureInputs = function _captureInputs(e) { 12863 var isInput = _inputExp.test(e.target.tagName); 12864 12865 if (isInput || _inputIsFocused) { 12866 e._gsapAllow = true; 12867 _inputIsFocused = isInput; 12868 } 12869}, 12870 _getScrollNormalizer = function _getScrollNormalizer(vars) { 12871 _isObject(vars) || (vars = {}); 12872 vars.preventDefault = vars.isNormalizer = vars.allowClicks = true; 12873 vars.type || (vars.type = "wheel,touch"); 12874 vars.debounce = !!vars.debounce; 12875 vars.id = vars.id || "normalizer"; 12876 12877 var _vars2 = vars, 12878 normalizeScrollX = _vars2.normalizeScrollX, 12879 momentum = _vars2.momentum, 12880 allowNestedScroll = _vars2.allowNestedScroll, 12881 onRelease = _vars2.onRelease, 12882 self, 12883 maxY, 12884 target = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(vars.target) || _docEl, 12885 smoother = gsap.core.globals().ScrollSmoother, 12886 smootherInstance = smoother && smoother.get(), 12887 content = _fixIOSBug && (vars.content && Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getTarget"])(vars.content) || smootherInstance && vars.content !== false && !smootherInstance.smooth() && smootherInstance.content()), 12888 scrollFuncY = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getScrollFunc"])(target, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"]), 12889 scrollFuncX = Object(_Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getScrollFunc"])(target, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"]), 12890 scale = 1, 12891 initialScale = (_Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"].isTouch && _win.visualViewport ? _win.visualViewport.scale * _win.visualViewport.width : _win.outerWidth) / _win.innerWidth, 12892 wheelRefresh = 0, 12893 resolveMomentumDuration = _isFunction(momentum) ? function () { 12894 return momentum(self); 12895 } : function () { 12896 return momentum || 2.8; 12897 }, 12898 lastRefreshID, 12899 skipTouchMove, 12900 inputObserver = _inputObserver(target, vars.type, true, allowNestedScroll), 12901 resumeTouchMove = function resumeTouchMove() { 12902 return skipTouchMove = false; 12903 }, 12904 scrollClampX = _passThrough, 12905 scrollClampY = _passThrough, 12906 updateClamps = function updateClamps() { 12907 maxY = _maxScroll(target, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"]); 12908 scrollClampY = _clamp(_fixIOSBug ? 1 : 0, maxY); 12909 normalizeScrollX && (scrollClampX = _clamp(0, _maxScroll(target, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"]))); 12910 lastRefreshID = _refreshID; 12911 }, 12912 removeContentOffset = function removeContentOffset() { 12913 content._gsap.y = _round(parseFloat(content._gsap.y) + scrollFuncY.offset) + "px"; 12914 content.style.transform = "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, " + parseFloat(content._gsap.y) + ", 0, 1)"; 12915 scrollFuncY.offset = scrollFuncY.cacheID = 0; 12916 }, 12917 ignoreDrag = function ignoreDrag() { 12918 if (skipTouchMove) { 12919 requestAnimationFrame(resumeTouchMove); 12920 12921 var offset = _round(self.deltaY / 2), 12922 scroll = scrollClampY(scrollFuncY.v - offset); 12923 12924 if (content && scroll !== scrollFuncY.v + scrollFuncY.offset) { 12925 scrollFuncY.offset = scroll - scrollFuncY.v; 12926 12927 var y = _round((parseFloat(content && content._gsap.y) || 0) - scrollFuncY.offset); 12928 12929 content.style.transform = "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, " + y + ", 0, 1)"; 12930 content._gsap.y = y + "px"; 12931 scrollFuncY.cacheID = _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].cache; 12932 12933 _updateAll(); 12934 } 12935 12936 return true; 12937 } 12938 12939 scrollFuncY.offset && removeContentOffset(); 12940 skipTouchMove = true; 12941 }, 12942 tween, 12943 startScrollX, 12944 startScrollY, 12945 onStopDelayedCall, 12946 onResize = function onResize() { 12947 // if the window resizes, like on an iPhone which Apple FORCES the address bar to show/hide even if we event.preventDefault(), it may be scrolling too far now that the address bar is showing, so we must dynamically adjust the momentum tween. 12948 updateClamps(); 12949 12950 if (tween.isActive() && tween.vars.scrollY > maxY) { 12951 scrollFuncY() > maxY ? tween.progress(1) && scrollFuncY(maxY) : tween.resetTo("scrollY", maxY); 12952 } 12953 }; 12954 12955 content && gsap.set(content, { 12956 y: "+=0" 12957 }); // to ensure there's a cache (element._gsap) 12958 12959 vars.ignoreCheck = function (e) { 12960 return _fixIOSBug && e.type === "touchmove" && ignoreDrag(e) || scale > 1.05 && e.type !== "touchstart" || self.isGesturing || e.touches && e.touches.length > 1; 12961 }; 12962 12963 vars.onPress = function () { 12964 skipTouchMove = false; 12965 var prevScale = scale; 12966 scale = _round((_win.visualViewport && _win.visualViewport.scale || 1) / initialScale); 12967 tween.pause(); 12968 prevScale !== scale && _allowNativePanning(target, scale > 1.01 ? true : normalizeScrollX ? false : "x"); 12969 startScrollX = scrollFuncX(); 12970 startScrollY = scrollFuncY(); 12971 updateClamps(); 12972 lastRefreshID = _refreshID; 12973 }; 12974 12975 vars.onRelease = vars.onGestureStart = function (self, wasDragging) { 12976 scrollFuncY.offset && removeContentOffset(); 12977 12978 if (!wasDragging) { 12979 onStopDelayedCall.restart(true); 12980 } else { 12981 _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"].cache++; // make sure we're pulling the non-cached value 12982 // alternate algorithm: durX = Math.min(6, Math.abs(self.velocityX / 800)), dur = Math.max(durX, Math.min(6, Math.abs(self.velocityY / 800))); dur = dur * (0.4 + (1 - _power4In(dur / 6)) * 0.6)) * (momentumSpeed || 1) 12983 12984 var dur = resolveMomentumDuration(), 12985 currentScroll, 12986 endScroll; 12987 12988 if (normalizeScrollX) { 12989 currentScroll = scrollFuncX(); 12990 endScroll = currentScroll + dur * 0.05 * -self.velocityX / 0.227; // the constant .227 is from power4(0.05). velocity is inverted because scrolling goes in the opposite direction. 12991 12992 dur *= _clampScrollAndGetDurationMultiplier(scrollFuncX, currentScroll, endScroll, _maxScroll(target, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_horizontal"])); 12993 tween.vars.scrollX = scrollClampX(endScroll); 12994 } 12995 12996 currentScroll = scrollFuncY(); 12997 endScroll = currentScroll + dur * 0.05 * -self.velocityY / 0.227; // the constant .227 is from power4(0.05) 12998 12999 dur *= _clampScrollAndGetDurationMultiplier(scrollFuncY, currentScroll, endScroll, _maxScroll(target, _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_vertical"])); 13000 tween.vars.scrollY = scrollClampY(endScroll); 13001 tween.invalidate().duration(dur).play(0.01); 13002 13003 if (_fixIOSBug && tween.vars.scrollY >= maxY || currentScroll >= maxY - 1) { 13004 // iOS bug: it'll show the address bar but NOT fire the window "resize" event until the animation is done but we must protect against overshoot so we leverage an onUpdate to do so. 13005 gsap.to({}, { 13006 onUpdate: onResize, 13007 duration: dur 13008 }); 13009 } 13010 } 13011 13012 onRelease && onRelease(self); 13013 }; 13014 13015 vars.onWheel = function () { 13016 tween._ts && tween.pause(); 13017 13018 if (_getTime() - wheelRefresh > 1000) { 13019 // after 1 second, refresh the clamps otherwise that'll only happen when ScrollTrigger.refresh() is called or for touch-scrolling. 13020 lastRefreshID = 0; 13021 wheelRefresh = _getTime(); 13022 } 13023 }; 13024 13025 vars.onChange = function (self, dx, dy, xArray, yArray) { 13026 _refreshID !== lastRefreshID && updateClamps(); 13027 dx && normalizeScrollX && scrollFuncX(scrollClampX(xArray[2] === dx ? startScrollX + (self.startX - self.x) : scrollFuncX() + dx - xArray[1])); // for more precision, we track pointer/touch movement from the start, otherwise it'll drift. 13028 13029 if (dy) { 13030 scrollFuncY.offset && removeContentOffset(); 13031 var isTouch = yArray[2] === dy, 13032 y = isTouch ? startScrollY + self.startY - self.y : scrollFuncY() + dy - yArray[1], 13033 yClamped = scrollClampY(y); 13034 isTouch && y !== yClamped && (startScrollY += yClamped - y); 13035 scrollFuncY(yClamped); 13036 } 13037 13038 (dy || dx) && _updateAll(); 13039 }; 13040 13041 vars.onEnable = function () { 13042 _allowNativePanning(target, normalizeScrollX ? false : "x"); 13043 13044 ScrollTrigger.addEventListener("refresh", onResize); 13045 13046 _addListener(_win, "resize", onResize); 13047 13048 if (scrollFuncY.smooth) { 13049 scrollFuncY.target.style.scrollBehavior = "auto"; 13050 scrollFuncY.smooth = scrollFuncX.smooth = false; 13051 } 13052 13053 inputObserver.enable(); 13054 }; 13055 13056 vars.onDisable = function () { 13057 _allowNativePanning(target, true); 13058 13059 _removeListener(_win, "resize", onResize); 13060 13061 ScrollTrigger.removeEventListener("refresh", onResize); 13062 inputObserver.kill(); 13063 }; 13064 13065 vars.lockAxis = vars.lockAxis !== false; 13066 self = new _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"](vars); 13067 self.iOS = _fixIOSBug; // used in the Observer getCachedScroll() function to work around an iOS bug that wreaks havoc with TouchEvent.clientY if we allow scroll to go all the way back to 0. 13068 13069 _fixIOSBug && !scrollFuncY() && scrollFuncY(1); // iOS bug causes event.clientY values to freak out (wildly inaccurate) if the scroll position is exactly 0. 13070 13071 _fixIOSBug && gsap.ticker.add(_passThrough); // prevent the ticker from sleeping 13072 13073 onStopDelayedCall = self._dc; 13074 tween = gsap.to(self, { 13075 ease: "power4", 13076 paused: true, 13077 inherit: false, 13078 scrollX: normalizeScrollX ? "+=0.1" : "+=0", 13079 scrollY: "+=0.1", 13080 modifiers: { 13081 scrollY: _interruptionTracker(scrollFuncY, scrollFuncY(), function () { 13082 return tween.pause(); 13083 }) 13084 }, 13085 onUpdate: _updateAll, 13086 onComplete: onStopDelayedCall.vars.onComplete 13087 }); // we need the modifier to sense if the scroll position is altered outside of the momentum tween (like with a scrollTo tween) so we can pause() it to prevent conflicts. 13088 13089 return self; 13090}; 13091 13092ScrollTrigger.sort = function (func) { 13093 return _triggers.sort(func || function (a, b) { 13094 return (a.vars.refreshPriority || 0) * -1e6 + a.start - (b.start + (b.vars.refreshPriority || 0) * -1e6); 13095 }); 13096}; 13097 13098ScrollTrigger.observe = function (vars) { 13099 return new _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"](vars); 13100}; 13101 13102ScrollTrigger.normalizeScroll = function (vars) { 13103 if (typeof vars === "undefined") { 13104 return _normalizer; 13105 } 13106 13107 if (vars === true && _normalizer) { 13108 return _normalizer.enable(); 13109 } 13110 13111 if (vars === false) { 13112 _normalizer && _normalizer.kill(); 13113 _normalizer = vars; 13114 return; 13115 } 13116 13117 var normalizer = vars instanceof _Observer_js__WEBPACK_IMPORTED_MODULE_0__["Observer"] ? vars : _getScrollNormalizer(vars); 13118 _normalizer && _normalizer.target === normalizer.target && _normalizer.kill(); 13119 _isViewport(normalizer.target) && (_normalizer = normalizer); 13120 return normalizer; 13121}; 13122 13123ScrollTrigger.core = { 13124 // smaller file size way to leverage in ScrollSmoother and Observer 13125 _getVelocityProp: _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_getVelocityProp"], 13126 _inputObserver: _inputObserver, 13127 _scrollers: _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_scrollers"], 13128 _proxies: _Observer_js__WEBPACK_IMPORTED_MODULE_0__["_proxies"], 13129 bridge: { 13130 // when normalizeScroll sets the scroll position (ss = setScroll) 13131 ss: function ss() { 13132 _lastScrollTime || _dispatch("scrollStart"); 13133 _lastScrollTime = _getTime(); 13134 }, 13135 // a way to get the _refreshing value in Observer 13136 ref: function ref() { 13137 return _refreshing; 13138 } 13139 } 13140}; 13141_getGSAP() && gsap.registerPlugin(ScrollTrigger); 13142 13143 13144/***/ }), 13145
vendor: 5,635 bytes, lines 13146-13326
13146/***/ "./node_modules/gsap/TextPlugin.js": 13147/*!*****************************************!*\ 13148 !*** ./node_modules/gsap/TextPlugin.js ***! 13149 \*****************************************/ 13150/*! exports provided: TextPlugin, default */ 13151/***/ (function(module, __webpack_exports__, __webpack_require__) { 13152 13153"use strict"; 13154__webpack_require__.r(__webpack_exports__); 13155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TextPlugin", function() { return TextPlugin; }); 13156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TextPlugin; }); 13157/* harmony import */ var _utils_strings_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./utils/strings.js */ "./node_modules/gsap/utils/strings.js"); 13158/*! 13159 * TextPlugin 3.12.5 13160 * https://gsap.com 13161 * 13162 * @license Copyright 2008-2024, GreenSock. All rights reserved. 13163 * Subject to the terms at https://gsap.com/standard-license or for 13164 * Club GSAP members, the agreement issued with that membership. 13165 * @author: Jack Doyle, [email protected] 13166*/ 13167 13168/* eslint-disable */ 13169 13170 13171var gsap, 13172 _tempDiv, 13173 _getGSAP = function _getGSAP() { 13174 return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap; 13175}; 13176 13177var TextPlugin = { 13178 version: "3.12.5", 13179 name: "text", 13180 init: function init(target, value, tween) { 13181 typeof value !== "object" && (value = { 13182 value: value 13183 }); 13184 13185 var i = target.nodeName.toUpperCase(), 13186 data = this, 13187 _value = value, 13188 newClass = _value.newClass, 13189 oldClass = _value.oldClass, 13190 preserveSpaces = _value.preserveSpaces, 13191 rtl = _value.rtl, 13192 delimiter = data.delimiter = value.delimiter || "", 13193 fillChar = data.fillChar = value.fillChar || (value.padSpace ? " " : ""), 13194 _short, 13195 text, 13196 original, 13197 j, 13198 condensedText, 13199 condensedOriginal, 13200 aggregate, 13201 s; 13202 13203 data.svg = target.getBBox && (i === "TEXT" || i === "TSPAN"); 13204 13205 if (!("innerHTML" in target) && !data.svg) { 13206 return false; 13207 } 13208 13209 data.target = target; 13210 13211 if (!("value" in value)) { 13212 data.text = data.original = [""]; 13213 return; 13214 } 13215 13216 original = Object(_utils_strings_js__WEBPACK_IMPORTED_MODULE_0__["splitInnerHTML"])(target, delimiter, false, preserveSpaces); 13217 _tempDiv || (_tempDiv = document.createElement("div")); 13218 _tempDiv.innerHTML = value.value; 13219 text = Object(_utils_strings_js__WEBPACK_IMPORTED_MODULE_0__["splitInnerHTML"])(_tempDiv, delimiter, false, preserveSpaces); 13220 data.from = tween._from; 13221 13222 if ((data.from || rtl) && !(rtl && data.from)) { 13223 // right-to-left or "from()" tweens should invert things (but if it's BOTH .from() and rtl, inverting twice equals not inverting at all :) 13224 i = original; 13225 original = text; 13226 text = i; 13227 } 13228 13229 data.hasClass = !!(newClass || oldClass); 13230 data.newClass = rtl ? oldClass : newClass; 13231 data.oldClass = rtl ? newClass : oldClass; 13232 i = original.length - text.length; 13233 _short = i < 0 ? original : text; 13234 13235 if (i < 0) { 13236 i = -i; 13237 } 13238 13239 while (--i > -1) { 13240 _short.push(fillChar); 13241 } 13242 13243 if (value.type === "diff") { 13244 j = 0; 13245 condensedText = []; 13246 condensedOriginal = []; 13247 aggregate = ""; 13248 13249 for (i = 0; i < text.length; i++) { 13250 s = text[i]; 13251 13252 if (s === original[i]) { 13253 aggregate += s; 13254 } else { 13255 condensedText[j] = aggregate + s; 13256 condensedOriginal[j++] = aggregate + original[i]; 13257 aggregate = ""; 13258 } 13259 } 13260 13261 text = condensedText; 13262 original = condensedOriginal; 13263 13264 if (aggregate) { 13265 text.push(aggregate); 13266 original.push(aggregate); 13267 } 13268 } 13269 13270 value.speed && tween.duration(Math.min(0.05 / value.speed * _short.length, value.maxDuration || 9999)); 13271 data.rtl = rtl; 13272 data.original = original; 13273 data.text = text; 13274 13275 data._props.push("text"); 13276 }, 13277 render: function render(ratio, data) { 13278 if (ratio > 1) { 13279 ratio = 1; 13280 } else if (ratio < 0) { 13281 ratio = 0; 13282 } 13283 13284 if (data.from) { 13285 ratio = 1 - ratio; 13286 } 13287 13288 var text = data.text, 13289 hasClass = data.hasClass, 13290 newClass = data.newClass, 13291 oldClass = data.oldClass, 13292 delimiter = data.delimiter, 13293 target = data.target, 13294 fillChar = data.fillChar, 13295 original = data.original, 13296 rtl = data.rtl, 13297 l = text.length, 13298 i = (rtl ? 1 - ratio : ratio) * l + 0.5 | 0, 13299 applyNew, 13300 applyOld, 13301 str; 13302 13303 if (hasClass && ratio) { 13304 applyNew = newClass && i; 13305 applyOld = oldClass && i !== l; 13306 str = (applyNew ? "<span class='" + newClass + "'>" : "") + text.slice(0, i).join(delimiter) + (applyNew ? "</span>" : "") + (applyOld ? "<span class='" + oldClass + "'>" : "") + delimiter + original.slice(i).join(delimiter) + (applyOld ? "</span>" : ""); 13307 } else { 13308 str = text.slice(0, i).join(delimiter) + delimiter + original.slice(i).join(delimiter); 13309 } 13310 13311 if (data.svg) { 13312 //SVG text elements don't have an "innerHTML" in Microsoft browsers. 13313 target.textContent = str; 13314 } else { 13315 target.innerHTML = fillChar === " " && ~str.indexOf(" ") ? str.split(" ").join(" ") : str; 13316 } 13317 } 13318}; 13319TextPlugin.splitInnerHTML = _utils_strings_js__WEBPACK_IMPORTED_MODULE_0__["splitInnerHTML"]; 13320TextPlugin.emojiSafeSplit = _utils_strings_js__WEBPACK_IMPORTED_MODULE_0__["emojiSafeSplit"]; 13321TextPlugin.getText = _utils_strings_js__WEBPACK_IMPORTED_MODULE_0__["getText"]; 13322_getGSAP() && gsap.registerPlugin(TextPlugin); 13323 13324 13325/***/ }), 13326
vendor: 14,612 bytes, lines 13327-13510
13327/***/ "./node_modules/gsap/all.js": 13328/*!**********************************!*\ 13329 !*** ./node_modules/gsap/all.js ***! 13330 \**********************************/ 13331/*! exports provided: gsap, default, TweenMax, CSSPlugin, TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, mapRange, pipe, unitize, interpolate, shuffle, selector, CustomEase, Draggable, CSSRulePlugin, EaselPlugin, SlowMo, ExpoScaleEase, RoughEase, EasePack, Flip, MotionPathPlugin, Observer, _isViewport, _scrollers, _getScrollFunc, _getProxyProp, _proxies, _getVelocityProp, _vertical, _horizontal, _getTarget, PixiPlugin, ScrollToPlugin, ScrollTrigger, TextPlugin */ 13332/***/ (function(module, __webpack_exports__, __webpack_require__) { 13333 13334"use strict"; 13335__webpack_require__.r(__webpack_exports__); 13336/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gsap", function() { return gsapWithCSS; }); 13337/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return gsapWithCSS; }); 13338/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return TweenMaxWithCSS; }); 13339/* harmony import */ var _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gsap-core.js */ "./node_modules/gsap/gsap-core.js"); 13340/* harmony import */ var _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CSSPlugin.js */ "./node_modules/gsap/CSSPlugin.js"); 13341/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); 13342 13343/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TweenLite"]; }); 13344 13345/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TimelineMax"]; }); 13346 13347/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TimelineLite"]; }); 13348 13349/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power0"]; }); 13350 13351/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power1"]; }); 13352 13353/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power2"]; }); 13354 13355/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power3"]; }); 13356 13357/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power4"]; }); 13358 13359/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Linear"]; }); 13360 13361/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quad", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quad"]; }); 13362 13363/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cubic", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Cubic"]; }); 13364 13365/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quart", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quart"]; }); 13366 13367/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quint", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quint"]; }); 13368 13369/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Strong", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Strong"]; }); 13370 13371/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Elastic"]; }); 13372 13373/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Back"]; }); 13374 13375/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["SteppedEase"]; }); 13376 13377/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Bounce"]; }); 13378 13379/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Sine"]; }); 13380 13381/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Expo"]; }); 13382 13383/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Circ"]; }); 13384 13385/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["wrap"]; }); 13386 13387/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "wrapYoyo", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["wrapYoyo"]; }); 13388 13389/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "distribute", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["distribute"]; }); 13390 13391/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "random", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["random"]; }); 13392 13393/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "snap", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["snap"]; }); 13394 13395/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "normalize", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["normalize"]; }); 13396 13397/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUnit", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["getUnit"]; }); 13398 13399/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["clamp"]; }); 13400 13401/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "splitColor", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["splitColor"]; }); 13402 13403/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["toArray"]; }); 13404 13405/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mapRange", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["mapRange"]; }); 13406 13407/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["pipe"]; }); 13408 13409/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "unitize", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["unitize"]; }); 13410 13411/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["interpolate"]; }); 13412 13413/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["shuffle"]; }); 13414 13415/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["selector"]; }); 13416 13417/* harmony import */ var _CustomEase_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CustomEase.js */ "./node_modules/gsap/CustomEase.js"); 13418/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CustomEase", function() { return _CustomEase_js__WEBPACK_IMPORTED_MODULE_2__["CustomEase"]; }); 13419 13420/* harmony import */ var _Draggable_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Draggable.js */ "./node_modules/gsap/Draggable.js"); 13421/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Draggable", function() { return _Draggable_js__WEBPACK_IMPORTED_MODULE_3__["Draggable"]; }); 13422 13423/* harmony import */ var _CSSRulePlugin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CSSRulePlugin.js */ "./node_modules/gsap/CSSRulePlugin.js"); 13424/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSRulePlugin", function() { return _CSSRulePlugin_js__WEBPACK_IMPORTED_MODULE_4__["CSSRulePlugin"]; }); 13425 13426/* harmony import */ var _EaselPlugin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./EaselPlugin.js */ "./node_modules/gsap/EaselPlugin.js"); 13427/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EaselPlugin", function() { return _EaselPlugin_js__WEBPACK_IMPORTED_MODULE_5__["EaselPlugin"]; }); 13428 13429/* harmony import */ var _EasePack_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./EasePack.js */ "./node_modules/gsap/EasePack.js"); 13430/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SlowMo", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_6__["SlowMo"]; }); 13431 13432/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpoScaleEase", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_6__["ExpoScaleEase"]; }); 13433 13434/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RoughEase", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_6__["RoughEase"]; }); 13435 13436/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "EasePack", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_6__["EasePack"]; }); 13437 13438/* harmony import */ var _Flip_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Flip.js */ "./node_modules/gsap/Flip.js"); 13439/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Flip", function() { return _Flip_js__WEBPACK_IMPORTED_MODULE_7__["Flip"]; }); 13440 13441/* harmony import */ var _MotionPathPlugin_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./MotionPathPlugin.js */ "./node_modules/gsap/MotionPathPlugin.js"); 13442/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MotionPathPlugin", function() { return _MotionPathPlugin_js__WEBPACK_IMPORTED_MODULE_8__["MotionPathPlugin"]; }); 13443 13444/* harmony import */ var _Observer_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./Observer.js */ "./node_modules/gsap/Observer.js"); 13445/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Observer", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["Observer"]; }); 13446 13447/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_isViewport", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["_isViewport"]; }); 13448 13449/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_scrollers", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["_scrollers"]; }); 13450 13451/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getScrollFunc", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["_getScrollFunc"]; }); 13452 13453/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getProxyProp", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["_getProxyProp"]; }); 13454 13455/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_proxies", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["_proxies"]; }); 13456 13457/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getVelocityProp", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["_getVelocityProp"]; }); 13458 13459/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_vertical", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["_vertical"]; }); 13460 13461/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_horizontal", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["_horizontal"]; }); 13462 13463/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_getTarget", function() { return _Observer_js__WEBPACK_IMPORTED_MODULE_9__["_getTarget"]; }); 13464 13465/* harmony import */ var _PixiPlugin_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./PixiPlugin.js */ "./node_modules/gsap/PixiPlugin.js"); 13466/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "PixiPlugin", function() { return _PixiPlugin_js__WEBPACK_IMPORTED_MODULE_10__["PixiPlugin"]; }); 13467 13468/* harmony import */ var _ScrollToPlugin_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./ScrollToPlugin.js */ "./node_modules/gsap/ScrollToPlugin.js"); 13469/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollToPlugin", function() { return _ScrollToPlugin_js__WEBPACK_IMPORTED_MODULE_11__["ScrollToPlugin"]; }); 13470 13471/* harmony import */ var _ScrollTrigger_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./ScrollTrigger.js */ "./node_modules/gsap/ScrollTrigger.js"); 13472/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ScrollTrigger", function() { return _ScrollTrigger_js__WEBPACK_IMPORTED_MODULE_12__["ScrollTrigger"]; }); 13473 13474/* harmony import */ var _TextPlugin_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./TextPlugin.js */ "./node_modules/gsap/TextPlugin.js"); 13475/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TextPlugin", function() { return _TextPlugin_js__WEBPACK_IMPORTED_MODULE_13__["TextPlugin"]; }); 13476 13477 13478 13479var gsapWithCSS = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["default"].registerPlugin(_CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__["default"]) || _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["default"], 13480 // to protect from tree shaking 13481TweenMaxWithCSS = gsapWithCSS.core.Tween; 13482 13483 13484 13485 13486 13487 13488 13489 13490 13491 13492 13493 13494 13495 //BONUS EXPORTS 13496// export * from "./DrawSVGPlugin.js"; 13497// export * from "./Physics2DPlugin.js"; 13498// export * from "./PhysicsPropsPlugin.js"; 13499// export * from "./ScrambleTextPlugin.js"; 13500// export * from "./CustomBounce.js"; 13501// export * from "./CustomWiggle.js"; 13502// export * from "./GSDevTools.js"; 13503// export * from "./InertiaPlugin.js"; 13504// export * from "./MorphSVGPlugin.js"; 13505// export * from "./MotionPathHelper.js"; 13506// export * from "./ScrollSmoother.js"; 13507// export * from "./SplitText.js"; 13508 13509/***/ }), 13510
vendor: 179,155 bytes, lines 13511-18078
13511/***/ "./node_modules/gsap/gsap-core.js": 13512/*!****************************************!*\ 13513 !*** ./node_modules/gsap/gsap-core.js ***! 13514 \****************************************/ 13515/*! exports provided: GSCache, Animation, Timeline, Tween, PropTween, gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ, TweenMax, TweenLite, TimelineMax, TimelineLite, default, wrap, wrapYoyo, distribute, random, snap, normalize, getUnit, clamp, splitColor, toArray, selector, mapRange, pipe, unitize, interpolate, shuffle, _getProperty, _numExp, _numWithUnitExp, _isString, _isUndefined, _renderComplexString, _relExp, _setDefaults, _removeLinkedListItem, _forEachName, _sortPropTweensByPriority, _colorStringFilter, _replaceRandom, _checkPlugin, _plugins, _ticker, _config, _roundModifier, _round, _missingPlugin, _getSetter, _getCache, _colorExp, _parseRelative */ 13516/***/ (function(module, __webpack_exports__, __webpack_require__) { 13517 13518"use strict"; 13519__webpack_require__.r(__webpack_exports__); 13520/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "GSCache", function() { return GSCache; }); 13521/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return Animation; }); 13522/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Timeline", function() { return Timeline; }); 13523/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Tween", function() { return Tween; }); 13524/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "PropTween", function() { return PropTween; }); 13525/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gsap", function() { return gsap; }); 13526/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return Power0; }); 13527/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return Power1; }); 13528/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return Power2; }); 13529/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return Power3; }); 13530/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return Power4; }); 13531/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return Linear; }); 13532/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quad", function() { return Quad; }); 13533/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cubic", function() { return Cubic; }); 13534/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quart", function() { return Quart; }); 13535/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Quint", function() { return Quint; }); 13536/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Strong", function() { return Strong; }); 13537/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return Elastic; }); 13538/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return Back; }); 13539/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return SteppedEase; }); 13540/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return Bounce; }); 13541/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return Sine; }); 13542/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return Expo; }); 13543/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return Circ; }); 13544/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return Tween; }); 13545/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return Tween; }); 13546/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return Timeline; }); 13547/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return Timeline; }); 13548/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return gsap; }); 13549/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrap", function() { return wrap; }); 13550/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "wrapYoyo", function() { return wrapYoyo; }); 13551/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "distribute", function() { return distribute; }); 13552/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "random", function() { return random; }); 13553/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "snap", function() { return snap; }); 13554/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalize", function() { return normalize; }); 13555/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getUnit", function() { return getUnit; }); 13556/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return clamp; }); 13557/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitColor", function() { return splitColor; }); 13558/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toArray", function() { return toArray; }); 13559/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "selector", function() { return selector; }); 13560/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapRange", function() { return mapRange; }); 13561/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pipe", function() { return pipe; }); 13562/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unitize", function() { return unitize; }); 13563/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "interpolate", function() { return interpolate; }); 13564/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return shuffle; }); 13565/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getProperty", function() { return _getProperty; }); 13566/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_numExp", function() { return _numExp; }); 13567/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_numWithUnitExp", function() { return _numWithUnitExp; }); 13568/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_isString", function() { return _isString; }); 13569/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_isUndefined", function() { return _isUndefined; }); 13570/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_renderComplexString", function() { return _renderComplexString; }); 13571/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_relExp", function() { return _relExp; }); 13572/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setDefaults", function() { return _setDefaults; }); 13573/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_removeLinkedListItem", function() { return _removeLinkedListItem; }); 13574/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_forEachName", function() { return _forEachName; }); 13575/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_sortPropTweensByPriority", function() { return _sortPropTweensByPriority; }); 13576/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_colorStringFilter", function() { return _colorStringFilter; }); 13577/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_replaceRandom", function() { return _replaceRandom; }); 13578/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_checkPlugin", function() { return _checkPlugin; }); 13579/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_plugins", function() { return _plugins; }); 13580/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_ticker", function() { return _ticker; }); 13581/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_config", function() { return _config; }); 13582/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_roundModifier", function() { return _roundModifier; }); 13583/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_round", function() { return _round; }); 13584/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_missingPlugin", function() { return _missingPlugin; }); 13585/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getSetter", function() { return _getSetter; }); 13586/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getCache", function() { return _getCache; }); 13587/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_colorExp", function() { return _colorExp; }); 13588/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_parseRelative", function() { return _parseRelative; }); 13589function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } 13590 13591function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; } 13592 13593/*! 13594 * GSAP 3.12.5 13595 * https://gsap.com 13596 * 13597 * @license Copyright 2008-2024, GreenSock. All rights reserved. 13598 * Subject to the terms at https://gsap.com/standard-license or for 13599 * Club GSAP members, the agreement issued with that membership. 13600 * @author: Jack Doyle, [email protected] 13601*/ 13602 13603/* eslint-disable */ 13604var _config = { 13605 autoSleep: 120, 13606 force3D: "auto", 13607 nullTargetWarn: 1, 13608 units: { 13609 lineHeight: "" 13610 } 13611}, 13612 _defaults = { 13613 duration: .5, 13614 overwrite: false, 13615 delay: 0 13616}, 13617 _suppressOverwrites, 13618 _reverting, 13619 _context, 13620 _bigNum = 1e8, 13621 _tinyNum = 1 / _bigNum, 13622 _2PI = Math.PI * 2, 13623 _HALF_PI = _2PI / 4, 13624 _gsID = 0, 13625 _sqrt = Math.sqrt, 13626 _cos = Math.cos, 13627 _sin = Math.sin, 13628 _isString = function _isString(value) { 13629 return typeof value === "string"; 13630}, 13631 _isFunction = function _isFunction(value) { 13632 return typeof value === "function"; 13633}, 13634 _isNumber = function _isNumber(value) { 13635 return typeof value === "number"; 13636}, 13637 _isUndefined = function _isUndefined(value) { 13638 return typeof value === "undefined"; 13639}, 13640 _isObject = function _isObject(value) { 13641 return typeof value === "object"; 13642}, 13643 _isNotFalse = function _isNotFalse(value) { 13644 return value !== false; 13645}, 13646 _windowExists = function _windowExists() { 13647 return typeof window !== "undefined"; 13648}, 13649 _isFuncOrString = function _isFuncOrString(value) { 13650 return _isFunction(value) || _isString(value); 13651}, 13652 _isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView || function () {}, 13653 // note: IE10 has ArrayBuffer, but NOT ArrayBuffer.isView(). 13654_isArray = Array.isArray, 13655 _strictNumExp = /(?:-?\.?\d|\.)+/gi, 13656 //only numbers (including negatives and decimals) but NOT relative values. 13657_numExp = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, 13658 //finds any numbers, including ones that start with += or -=, negative numbers, and ones in scientific notation like 1e-8. 13659_numWithUnitExp = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, 13660 _complexStringNumExp = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, 13661 //duplicate so that while we're looping through matches from exec(), it doesn't contaminate the lastIndex of _numExp which we use to search for colors too. 13662_relExp = /[+-]=-?[.\d]+/, 13663 _delimitedValueExp = /[^,'"\[\]\s]+/gi, 13664 // previously /[#\-+.]*\b[a-z\d\-=+%.]+/gi but didn't catch special characters. 13665_unitExp = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, 13666 _globalTimeline, 13667 _win, 13668 _coreInitted, 13669 _doc, 13670 _globals = {}, 13671 _installScope = {}, 13672 _coreReady, 13673 _install = function _install(scope) { 13674 return (_installScope = _merge(scope, _globals)) && gsap; 13675}, 13676 _missingPlugin = function _missingPlugin(property, value) { 13677 return console.warn("Invalid property", property, "set to", value, "Missing plugin? gsap.registerPlugin()"); 13678}, 13679 _warn = function _warn(message, suppress) { 13680 return !suppress && console.warn(message); 13681}, 13682 _addGlobal = function _addGlobal(name, obj) { 13683 return name && (_globals[name] = obj) && _installScope && (_installScope[name] = obj) || _globals; 13684}, 13685 _emptyFunc = function _emptyFunc() { 13686 return 0; 13687}, 13688 _startAtRevertConfig = { 13689 suppressEvents: true, 13690 isStart: true, 13691 kill: false 13692}, 13693 _revertConfigNoKill = { 13694 suppressEvents: true, 13695 kill: false 13696}, 13697 _revertConfig = { 13698 suppressEvents: true 13699}, 13700 _reservedProps = {}, 13701 _lazyTweens = [], 13702 _lazyLookup = {}, 13703 _lastRenderedFrame, 13704 _plugins = {}, 13705 _effects = {}, 13706 _nextGCFrame = 30, 13707 _harnessPlugins = [], 13708 _callbackNames = "", 13709 _harness = function _harness(targets) { 13710 var target = targets[0], 13711 harnessPlugin, 13712 i; 13713 _isObject(target) || _isFunction(target) || (targets = [targets]); 13714 13715 if (!(harnessPlugin = (target._gsap || {}).harness)) { 13716 // find the first target with a harness. We assume targets passed into an animation will be of similar type, meaning the same kind of harness can be used for them all (performance optimization) 13717 i = _harnessPlugins.length; 13718 13719 while (i-- && !_harnessPlugins[i].targetTest(target)) {} 13720 13721 harnessPlugin = _harnessPlugins[i]; 13722 } 13723 13724 i = targets.length; 13725 13726 while (i--) { 13727 targets[i] && (targets[i]._gsap || (targets[i]._gsap = new GSCache(targets[i], harnessPlugin))) || targets.splice(i, 1); 13728 } 13729 13730 return targets; 13731}, 13732 _getCache = function _getCache(target) { 13733 return target._gsap || _harness(toArray(target))[0]._gsap; 13734}, 13735 _getProperty = function _getProperty(target, property, v) { 13736 return (v = target[property]) && _isFunction(v) ? target[property]() : _isUndefined(v) && target.getAttribute && target.getAttribute(property) || v; 13737}, 13738 _forEachName = function _forEachName(names, func) { 13739 return (names = names.split(",")).forEach(func) || names; 13740}, 13741 //split a comma-delimited list of names into an array, then run a forEach() function and return the split array (this is just a way to consolidate/shorten some code). 13742_round = function _round(value) { 13743 return Math.round(value * 100000) / 100000 || 0; 13744}, 13745 _roundPrecise = function _roundPrecise(value) { 13746 return Math.round(value * 10000000) / 10000000 || 0; 13747}, 13748 // increased precision mostly for timing values. 13749_parseRelative = function _parseRelative(start, value) { 13750 var operator = value.charAt(0), 13751 end = parseFloat(value.substr(2)); 13752 start = parseFloat(start); 13753 return operator === "+" ? start + end : operator === "-" ? start - end : operator === "*" ? start * end : start / end; 13754}, 13755 _arrayContainsAny = function _arrayContainsAny(toSearch, toFind) { 13756 //searches one array to find matches for any of the items in the toFind array. As soon as one is found, it returns true. It does NOT return all the matches; it's simply a boolean search. 13757 var l = toFind.length, 13758 i = 0; 13759 13760 for (; toSearch.indexOf(toFind[i]) < 0 && ++i < l;) {} 13761 13762 return i < l; 13763}, 13764 _lazyRender = function _lazyRender() { 13765 var l = _lazyTweens.length, 13766 a = _lazyTweens.slice(0), 13767 i, 13768 tween; 13769 13770 _lazyLookup = {}; 13771 _lazyTweens.length = 0; 13772 13773 for (i = 0; i < l; i++) { 13774 tween = a[i]; 13775 tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0); 13776 } 13777}, 13778 _lazySafeRender = function _lazySafeRender(animation, time, suppressEvents, force) { 13779 _lazyTweens.length && !_reverting && _lazyRender(); 13780 animation.render(time, suppressEvents, force || _reverting && time < 0 && (animation._initted || animation._startAt)); 13781 _lazyTweens.length && !_reverting && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when someone calls seek() or time() or progress(), they expect an immediate render. 13782}, 13783 _numericIfPossible = function _numericIfPossible(value) { 13784 var n = parseFloat(value); 13785 return (n || n === 0) && (value + "").match(_delimitedValueExp).length < 2 ? n : _isString(value) ? value.trim() : value; 13786}, 13787 _passThrough = function _passThrough(p) { 13788 return p; 13789}, 13790 _setDefaults = function _setDefaults(obj, defaults) { 13791 for (var p in defaults) { 13792 p in obj || (obj[p] = defaults[p]); 13793 } 13794 13795 return obj; 13796}, 13797 _setKeyframeDefaults = function _setKeyframeDefaults(excludeDuration) { 13798 return function (obj, defaults) { 13799 for (var p in defaults) { 13800 p in obj || p === "duration" && excludeDuration || p === "ease" || (obj[p] = defaults[p]); 13801 } 13802 }; 13803}, 13804 _merge = function _merge(base, toMerge) { 13805 for (var p in toMerge) { 13806 base[p] = toMerge[p]; 13807 } 13808 13809 return base; 13810}, 13811 _mergeDeep = function _mergeDeep(base, toMerge) { 13812 for (var p in toMerge) { 13813 p !== "__proto__" && p !== "constructor" && p !== "prototype" && (base[p] = _isObject(toMerge[p]) ? _mergeDeep(base[p] || (base[p] = {}), toMerge[p]) : toMerge[p]); 13814 } 13815 13816 return base; 13817}, 13818 _copyExcluding = function _copyExcluding(obj, excluding) { 13819 var copy = {}, 13820 p; 13821 13822 for (p in obj) { 13823 p in excluding || (copy[p] = obj[p]); 13824 } 13825 13826 return copy; 13827}, 13828 _inheritDefaults = function _inheritDefaults(vars) { 13829 var parent = vars.parent || _globalTimeline, 13830 func = vars.keyframes ? _setKeyframeDefaults(_isArray(vars.keyframes)) : _setDefaults; 13831 13832 if (_isNotFalse(vars.inherit)) { 13833 while (parent) { 13834 func(vars, parent.vars.defaults); 13835 parent = parent.parent || parent._dp; 13836 } 13837 } 13838 13839 return vars; 13840}, 13841 _arraysMatch = function _arraysMatch(a1, a2) { 13842 var i = a1.length, 13843 match = i === a2.length; 13844 13845 while (match && i-- && a1[i] === a2[i]) {} 13846 13847 return i < 0; 13848}, 13849 _addLinkedListItem = function _addLinkedListItem(parent, child, firstProp, lastProp, sortBy) { 13850 if (firstProp === void 0) { 13851 firstProp = "_first"; 13852 } 13853 13854 if (lastProp === void 0) { 13855 lastProp = "_last"; 13856 } 13857 13858 var prev = parent[lastProp], 13859 t; 13860 13861 if (sortBy) { 13862 t = child[sortBy]; 13863 13864 while (prev && prev[sortBy] > t) { 13865 prev = prev._prev; 13866 } 13867 } 13868 13869 if (prev) { 13870 child._next = prev._next; 13871 prev._next = child; 13872 } else { 13873 child._next = parent[firstProp]; 13874 parent[firstProp] = child; 13875 } 13876 13877 if (child._next) { 13878 child._next._prev = child; 13879 } else { 13880 parent[lastProp] = child; 13881 } 13882 13883 child._prev = prev; 13884 child.parent = child._dp = parent; 13885 return child; 13886}, 13887 _removeLinkedListItem = function _removeLinkedListItem(parent, child, firstProp, lastProp) { 13888 if (firstProp === void 0) { 13889 firstProp = "_first"; 13890 } 13891 13892 if (lastProp === void 0) { 13893 lastProp = "_last"; 13894 } 13895 13896 var prev = child._prev, 13897 next = child._next; 13898 13899 if (prev) { 13900 prev._next = next; 13901 } else if (parent[firstProp] === child) { 13902 parent[firstProp] = next; 13903 } 13904 13905 if (next) { 13906 next._prev = prev; 13907 } else if (parent[lastProp] === child) { 13908 parent[lastProp] = prev; 13909 } 13910 13911 child._next = child._prev = child.parent = null; // don't delete the _dp just so we can revert if necessary. But parent should be null to indicate the item isn't in a linked list. 13912}, 13913 _removeFromParent = function _removeFromParent(child, onlyIfParentHasAutoRemove) { 13914 child.parent && (!onlyIfParentHasAutoRemove || child.parent.autoRemoveChildren) && child.parent.remove && child.parent.remove(child); 13915 child._act = 0; 13916}, 13917 _uncache = function _uncache(animation, child) { 13918 if (animation && (!child || child._end > animation._dur || child._start < 0)) { 13919 // performance optimization: if a child animation is passed in we should only uncache if that child EXTENDS the animation (its end time is beyond the end) 13920 var a = animation; 13921 13922 while (a) { 13923 a._dirty = 1; 13924 a = a.parent; 13925 } 13926 } 13927 13928 return animation; 13929}, 13930 _recacheAncestors = function _recacheAncestors(animation) { 13931 var parent = animation.parent; 13932 13933 while (parent && parent.parent) { 13934 //sometimes we must force a re-sort of all children and update the duration/totalDuration of all ancestor timelines immediately in case, for example, in the middle of a render loop, one tween alters another tween's timeScale which shoves its startTime before 0, forcing the parent timeline to shift around and shiftChildren() which could affect that next tween's render (startTime). Doesn't matter for the root timeline though. 13935 parent._dirty = 1; 13936 parent.totalDuration(); 13937 parent = parent.parent; 13938 } 13939 13940 return animation; 13941}, 13942 _rewindStartAt = function _rewindStartAt(tween, totalTime, suppressEvents, force) { 13943 return tween._startAt && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween.vars.immediateRender && !tween.vars.autoRevert || tween._startAt.render(totalTime, true, force)); 13944}, 13945 _hasNoPausedAncestors = function _hasNoPausedAncestors(animation) { 13946 return !animation || animation._ts && _hasNoPausedAncestors(animation.parent); 13947}, 13948 _elapsedCycleDuration = function _elapsedCycleDuration(animation) { 13949 return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0; 13950}, 13951 // feed in the totalTime and cycleDuration and it'll return the cycle (iteration minus 1) and if the playhead is exactly at the very END, it will NOT bump up to the next cycle. 13952_animationCycle = function _animationCycle(tTime, cycleDuration) { 13953 var whole = Math.floor(tTime /= cycleDuration); 13954 return tTime && whole === tTime ? whole - 1 : whole; 13955}, 13956 _parentToChildTotalTime = function _parentToChildTotalTime(parentTime, child) { 13957 return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur); 13958}, 13959 _setEnd = function _setEnd(animation) { 13960 return animation._end = _roundPrecise(animation._start + (animation._tDur / Math.abs(animation._ts || animation._rts || _tinyNum) || 0)); 13961}, 13962 _alignPlayhead = function _alignPlayhead(animation, totalTime) { 13963 // adjusts the animation's _start and _end according to the provided totalTime (only if the parent's smoothChildTiming is true and the animation isn't paused). It doesn't do any rendering or forcing things back into parent timelines, etc. - that's what totalTime() is for. 13964 var parent = animation._dp; 13965 13966 if (parent && parent.smoothChildTiming && animation._ts) { 13967 animation._start = _roundPrecise(parent._time - (animation._ts > 0 ? totalTime / animation._ts : ((animation._dirty ? animation.totalDuration() : animation._tDur) - totalTime) / -animation._ts)); 13968 13969 _setEnd(animation); 13970 13971 parent._dirty || _uncache(parent, animation); //for performance improvement. If the parent's cache is already dirty, it already took care of marking the ancestors as dirty too, so skip the function call here. 13972 } 13973 13974 return animation; 13975}, 13976 13977/* 13978_totalTimeToTime = (clampedTotalTime, duration, repeat, repeatDelay, yoyo) => { 13979 let cycleDuration = duration + repeatDelay, 13980 time = _round(clampedTotalTime % cycleDuration); 13981 if (time > duration) { 13982 time = duration; 13983 } 13984 return (yoyo && (~~(clampedTotalTime / cycleDuration) & 1)) ? duration - time : time; 13985}, 13986*/ 13987_postAddChecks = function _postAddChecks(timeline, child) { 13988 var t; 13989 13990 if (child._time || !child._dur && child._initted || child._start < timeline._time && (child._dur || !child.add)) { 13991 // in case, for example, the _start is moved on a tween that has already rendered, or if it's being inserted into a timeline BEFORE where the playhead is currently. Imagine it's at its end state, then the startTime is moved WAY later (after the end of this timeline), it should render at its beginning. Special case: if it's a timeline (has .add() method) and no duration, we can skip rendering because the user may be populating it AFTER adding it to a parent timeline (unconventional, but possible, and we wouldn't want it to get removed if the parent's autoRemoveChildren is true). 13992 t = _parentToChildTotalTime(timeline.rawTime(), child); 13993 13994 if (!child._dur || _clamp(0, child.totalDuration(), t) - child._tTime > _tinyNum) { 13995 child.render(t, true); 13996 } 13997 } //if the timeline has already ended but the inserted tween/timeline extends the duration, we should enable this timeline again so that it renders properly. We should also align the playhead with the parent timeline's when appropriate. 13998 13999 14000 if (_uncache(timeline, child)._dp && timeline._initted && timeline._time >= timeline._dur && timeline._ts) { 14001 //in case any of the ancestors had completed but should now be enabled... 14002 if (timeline._dur < timeline.duration()) { 14003 t = timeline; 14004 14005 while (t._dp) { 14006 t.rawTime() >= 0 && t.totalTime(t._tTime); //moves the timeline (shifts its startTime) if necessary, and also enables it. If it's currently zero, though, it may not be scheduled to render until later so there's no need to force it to align with the current playhead position. Only move to catch up with the playhead. 14007 14008 t = t._dp; 14009 } 14010 } 14011 14012 timeline._zTime = -_tinyNum; // helps ensure that the next render() will be forced (crossingStart = true in render()), even if the duration hasn't changed (we're adding a child which would need to get rendered). Definitely an edge case. Note: we MUST do this AFTER the loop above where the totalTime() might trigger a render() because this _addToTimeline() method gets called from the Animation constructor, BEFORE tweens even record their targets, etc. so we wouldn't want things to get triggered in the wrong order. 14013 } 14014}, 14015 _addToTimeline = function _addToTimeline(timeline, child, position, skipChecks) { 14016 child.parent && _removeFromParent(child); 14017 child._start = _roundPrecise((_isNumber(position) ? position : position || timeline !== _globalTimeline ? _parsePosition(timeline, position, child) : timeline._time) + child._delay); 14018 child._end = _roundPrecise(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0)); 14019 14020 _addLinkedListItem(timeline, child, "_first", "_last", timeline._sort ? "_start" : 0); 14021 14022 _isFromOrFromStart(child) || (timeline._recent = child); 14023 skipChecks || _postAddChecks(timeline, child); 14024 timeline._ts < 0 && _alignPlayhead(timeline, timeline._tTime); // if the timeline is reversed and the new child makes it longer, we may need to adjust the parent's _start (push it back) 14025 14026 return timeline; 14027}, 14028 _scrollTrigger = function _scrollTrigger(animation, trigger) { 14029 return (_globals.ScrollTrigger || _missingPlugin("scrollTrigger", trigger)) && _globals.ScrollTrigger.create(trigger, animation); 14030}, 14031 _attemptInitTween = function _attemptInitTween(tween, time, force, suppressEvents, tTime) { 14032 _initTween(tween, time, tTime); 14033 14034 if (!tween._initted) { 14035 return 1; 14036 } 14037 14038 if (!force && tween._pt && !_reverting && (tween._dur && tween.vars.lazy !== false || !tween._dur && tween.vars.lazy) && _lastRenderedFrame !== _ticker.frame) { 14039 _lazyTweens.push(tween); 14040 14041 tween._lazy = [tTime, suppressEvents]; 14042 return 1; 14043 } 14044}, 14045 _parentPlayheadIsBeforeStart = function _parentPlayheadIsBeforeStart(_ref) { 14046 var parent = _ref.parent; 14047 return parent && parent._ts && parent._initted && !parent._lock && (parent.rawTime() < 0 || _parentPlayheadIsBeforeStart(parent)); 14048}, 14049 // check parent's _lock because when a timeline repeats/yoyos and does its artificial wrapping, we shouldn't force the ratio back to 0 14050_isFromOrFromStart = function _isFromOrFromStart(_ref2) { 14051 var data = _ref2.data; 14052 return data === "isFromStart" || data === "isStart"; 14053}, 14054 _renderZeroDurationTween = function _renderZeroDurationTween(tween, totalTime, suppressEvents, force) { 14055 var prevRatio = tween.ratio, 14056 ratio = totalTime < 0 || !totalTime && (!tween._start && _parentPlayheadIsBeforeStart(tween) && !(!tween._initted && _isFromOrFromStart(tween)) || (tween._ts < 0 || tween._dp._ts < 0) && !_isFromOrFromStart(tween)) ? 0 : 1, 14057 // if the tween or its parent is reversed and the totalTime is 0, we should go to a ratio of 0. Edge case: if a from() or fromTo() stagger tween is placed later in a timeline, the "startAt" zero-duration tween could initially render at a time when the parent timeline's playhead is technically BEFORE where this tween is, so make sure that any "from" and "fromTo" startAt tweens are rendered the first time at a ratio of 1. 14058 repeatDelay = tween._rDelay, 14059 tTime = 0, 14060 pt, 14061 iteration, 14062 prevIteration; 14063 14064 if (repeatDelay && tween._repeat) { 14065 // in case there's a zero-duration tween that has a repeat with a repeatDelay 14066 tTime = _clamp(0, tween._tDur, totalTime); 14067 iteration = _animationCycle(tTime, repeatDelay); 14068 tween._yoyo && iteration & 1 && (ratio = 1 - ratio); 14069 14070 if (iteration !== _animationCycle(tween._tTime, repeatDelay)) { 14071 // if iteration changed 14072 prevRatio = 1 - ratio; 14073 tween.vars.repeatRefresh && tween._initted && tween.invalidate(); 14074 } 14075 } 14076 14077 if (ratio !== prevRatio || _reverting || force || tween._zTime === _tinyNum || !totalTime && tween._zTime) { 14078 if (!tween._initted && _attemptInitTween(tween, totalTime, force, suppressEvents, tTime)) { 14079 // if we render the very beginning (time == 0) of a fromTo(), we must force the render (normal tweens wouldn't need to render at a time of 0 when the prevTime was also 0). This is also mandatory to make sure overwriting kicks in immediately. 14080 return; 14081 } 14082 14083 prevIteration = tween._zTime; 14084 tween._zTime = totalTime || (suppressEvents ? _tinyNum : 0); // when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration tween, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. 14085 14086 suppressEvents || (suppressEvents = totalTime && !prevIteration); // if it was rendered previously at exactly 0 (_zTime) and now the playhead is moving away, DON'T fire callbacks otherwise they'll seem like duplicates. 14087 14088 tween.ratio = ratio; 14089 tween._from && (ratio = 1 - ratio); 14090 tween._time = 0; 14091 tween._tTime = tTime; 14092 pt = tween._pt; 14093 14094 while (pt) { 14095 pt.r(ratio, pt.d); 14096 pt = pt._next; 14097 } 14098 14099 totalTime < 0 && _rewindStartAt(tween, totalTime, suppressEvents, true); 14100 tween._onUpdate && !suppressEvents && _callback(tween, "onUpdate"); 14101 tTime && tween._repeat && !suppressEvents && tween.parent && _callback(tween, "onRepeat"); 14102 14103 if ((totalTime >= tween._tDur || totalTime < 0) && tween.ratio === ratio) { 14104 ratio && _removeFromParent(tween, 1); 14105 14106 if (!suppressEvents && !_reverting) { 14107 _callback(tween, ratio ? "onComplete" : "onReverseComplete", true); 14108 14109 tween._prom && tween._prom(); 14110 } 14111 } 14112 } else if (!tween._zTime) { 14113 tween._zTime = totalTime; 14114 } 14115}, 14116 _findNextPauseTween = function _findNextPauseTween(animation, prevTime, time) { 14117 var child; 14118 14119 if (time > prevTime) { 14120 child = animation._first; 14121 14122 while (child && child._start <= time) { 14123 if (child.data === "isPause" && child._start > prevTime) { 14124 return child; 14125 } 14126 14127 child = child._next; 14128 } 14129 } else { 14130 child = animation._last; 14131 14132 while (child && child._start >= time) { 14133 if (child.data === "isPause" && child._start < prevTime) { 14134 return child; 14135 } 14136 14137 child = child._prev; 14138 } 14139 } 14140}, 14141 _setDuration = function _setDuration(animation, duration, skipUncache, leavePlayhead) { 14142 var repeat = animation._repeat, 14143 dur = _roundPrecise(duration) || 0, 14144 totalProgress = animation._tTime / animation._tDur; 14145 totalProgress && !leavePlayhead && (animation._time *= dur / animation._dur); 14146 animation._dur = dur; 14147 animation._tDur = !repeat ? dur : repeat < 0 ? 1e10 : _roundPrecise(dur * (repeat + 1) + animation._rDelay * repeat); 14148 totalProgress > 0 && !leavePlayhead && _alignPlayhead(animation, animation._tTime = animation._tDur * totalProgress); 14149 animation.parent && _setEnd(animation); 14150 skipUncache || _uncache(animation.parent, animation); 14151 return animation; 14152}, 14153 _onUpdateTotalDuration = function _onUpdateTotalDuration(animation) { 14154 return animation instanceof Timeline ? _uncache(animation) : _setDuration(animation, animation._dur); 14155}, 14156 _zeroPosition = { 14157 _start: 0, 14158 endTime: _emptyFunc, 14159 totalDuration: _emptyFunc 14160}, 14161 _parsePosition = function _parsePosition(animation, position, percentAnimation) { 14162 var labels = animation.labels, 14163 recent = animation._recent || _zeroPosition, 14164 clippedDuration = animation.duration() >= _bigNum ? recent.endTime(false) : animation._dur, 14165 //in case there's a child that infinitely repeats, users almost never intend for the insertion point of a new child to be based on a SUPER long value like that so we clip it and assume the most recently-added child's endTime should be used instead. 14166 i, 14167 offset, 14168 isPercent; 14169 14170 if (_isString(position) && (isNaN(position) || position in labels)) { 14171 //if the string is a number like "1", check to see if there's a label with that name, otherwise interpret it as a number (absolute value). 14172 offset = position.charAt(0); 14173 isPercent = position.substr(-1) === "%"; 14174 i = position.indexOf("="); 14175 14176 if (offset === "<" || offset === ">") { 14177 i >= 0 && (position = position.replace(/=/, "")); 14178 return (offset === "<" ? recent._start : recent.endTime(recent._repeat >= 0)) + (parseFloat(position.substr(1)) || 0) * (isPercent ? (i < 0 ? recent : percentAnimation).totalDuration() / 100 : 1); 14179 } 14180 14181 if (i < 0) { 14182 position in labels || (labels[position] = clippedDuration); 14183 return labels[position]; 14184 } 14185 14186 offset = parseFloat(position.charAt(i - 1) + position.substr(i + 1)); 14187 14188 if (isPercent && percentAnimation) { 14189 offset = offset / 100 * (_isArray(percentAnimation) ? percentAnimation[0] : percentAnimation).totalDuration(); 14190 } 14191 14192 return i > 1 ? _parsePosition(animation, position.substr(0, i - 1), percentAnimation) + offset : clippedDuration + offset; 14193 } 14194 14195 return position == null ? clippedDuration : +position; 14196}, 14197 _createTweenType = function _createTweenType(type, params, timeline) { 14198 var isLegacy = _isNumber(params[1]), 14199 varsIndex = (isLegacy ? 2 : 1) + (type < 2 ? 0 : 1), 14200 vars = params[varsIndex], 14201 irVars, 14202 parent; 14203 14204 isLegacy && (vars.duration = params[1]); 14205 vars.parent = timeline; 14206 14207 if (type) { 14208 irVars = vars; 14209 parent = timeline; 14210 14211 while (parent && !("immediateRender" in irVars)) { 14212 // inheritance hasn't happened yet, but someone may have set a default in an ancestor timeline. We could do vars.immediateRender = _isNotFalse(_inheritDefaults(vars).immediateRender) but that'd exact a slight performance penalty because _inheritDefaults() also runs in the Tween constructor. We're paying a small kb price here to gain speed. 14213 irVars = parent.vars.defaults || {}; 14214 parent = _isNotFalse(parent.vars.inherit) && parent.parent; 14215 } 14216 14217 vars.immediateRender = _isNotFalse(irVars.immediateRender); 14218 type < 2 ? vars.runBackwards = 1 : vars.startAt = params[varsIndex - 1]; // "from" vars 14219 } 14220 14221 return new Tween(params[0], vars, params[varsIndex + 1]); 14222}, 14223 _conditionalReturn = function _conditionalReturn(value, func) { 14224 return value || value === 0 ? func(value) : func; 14225}, 14226 _clamp = function _clamp(min, max, value) { 14227 return value < min ? min : value > max ? max : value; 14228}, 14229 getUnit = function getUnit(value, v) { 14230 return !_isString(value) || !(v = _unitExp.exec(value)) ? "" : v[1]; 14231}, 14232 // note: protect against padded numbers as strings, like "100.100". That shouldn't return "00" as the unit. If it's numeric, return no unit. 14233clamp = function clamp(min, max, value) { 14234 return _conditionalReturn(value, function (v) { 14235 return _clamp(min, max, v); 14236 }); 14237}, 14238 _slice = [].slice, 14239 _isArrayLike = function _isArrayLike(value, nonEmpty) { 14240 return value && _isObject(value) && "length" in value && (!nonEmpty && !value.length || value.length - 1 in value && _isObject(value[0])) && !value.nodeType && value !== _win; 14241}, 14242 _flatten = function _flatten(ar, leaveStrings, accumulator) { 14243 if (accumulator === void 0) { 14244 accumulator = []; 14245 } 14246 14247 return ar.forEach(function (value) { 14248 var _accumulator; 14249 14250 return _isString(value) && !leaveStrings || _isArrayLike(value, 1) ? (_accumulator = accumulator).push.apply(_accumulator, toArray(value)) : accumulator.push(value); 14251 }) || accumulator; 14252}, 14253 //takes any value and returns an array. If it's a string (and leaveStrings isn't true), it'll use document.querySelectorAll() and convert that to an array. It'll also accept iterables like jQuery objects. 14254toArray = function toArray(value, scope, leaveStrings) { 14255 return _context && !scope && _context.selector ? _context.selector(value) : _isString(value) && !leaveStrings && (_coreInitted || !_wake()) ? _slice.call((scope || _doc).querySelectorAll(value), 0) : _isArray(value) ? _flatten(value, leaveStrings) : _isArrayLike(value) ? _slice.call(value, 0) : value ? [value] : []; 14256}, 14257 selector = function selector(value) { 14258 value = toArray(value)[0] || _warn("Invalid scope") || {}; 14259 return function (v) { 14260 var el = value.current || value.nativeElement || value; 14261 return toArray(v, el.querySelectorAll ? el : el === value ? _warn("Invalid scope") || _doc.createElement("div") : value); 14262 }; 14263}, 14264 shuffle = function shuffle(a) { 14265 return a.sort(function () { 14266 return .5 - Math.random(); 14267 }); 14268}, 14269 // alternative that's a bit faster and more reliably diverse but bigger: for (let j, v, i = a.length; i; j = Math.floor(Math.random() * i), v = a[--i], a[i] = a[j], a[j] = v); return a; 14270//for distributing values across an array. Can accept a number, a function or (most commonly) a function which can contain the following properties: {base, amount, from, ease, grid, axis, length, each}. Returns a function that expects the following parameters: index, target, array. Recognizes the following 14271distribute = function distribute(v) { 14272 if (_isFunction(v)) { 14273 return v; 14274 } 14275 14276 var vars = _isObject(v) ? v : { 14277 each: v 14278 }, 14279 //n:1 is just to indicate v was a number; we leverage that later to set v according to the length we get. If a number is passed in, we treat it like the old stagger value where 0.1, for example, would mean that things would be distributed with 0.1 between each element in the array rather than a total "amount" that's chunked out among them all. 14280 ease = _parseEase(vars.ease), 14281 from = vars.from || 0, 14282 base = parseFloat(vars.base) || 0, 14283 cache = {}, 14284 isDecimal = from > 0 && from < 1, 14285 ratios = isNaN(from) || isDecimal, 14286 axis = vars.axis, 14287 ratioX = from, 14288 ratioY = from; 14289 14290 if (_isString(from)) { 14291 ratioX = ratioY = { 14292 center: .5, 14293 edges: .5, 14294 end: 1 14295 }[from] || 0; 14296 } else if (!isDecimal && ratios) { 14297 ratioX = from[0]; 14298 ratioY = from[1]; 14299 } 14300 14301 return function (i, target, a) { 14302 var l = (a || vars).length, 14303 distances = cache[l], 14304 originX, 14305 originY, 14306 x, 14307 y, 14308 d, 14309 j, 14310 max, 14311 min, 14312 wrapAt; 14313 14314 if (!distances) { 14315 wrapAt = vars.grid === "auto" ? 0 : (vars.grid || [1, _bigNum])[1]; 14316 14317 if (!wrapAt) { 14318 max = -_bigNum; 14319 14320 while (max < (max = a[wrapAt++].getBoundingClientRect().left) && wrapAt < l) {} 14321 14322 wrapAt < l && wrapAt--; 14323 } 14324 14325 distances = cache[l] = []; 14326 originX = ratios ? Math.min(wrapAt, l) * ratioX - .5 : from % wrapAt; 14327 originY = wrapAt === _bigNum ? 0 : ratios ? l * ratioY / wrapAt - .5 : from / wrapAt | 0; 14328 max = 0; 14329 min = _bigNum; 14330 14331 for (j = 0; j < l; j++) { 14332 x = j % wrapAt - originX; 14333 y = originY - (j / wrapAt | 0); 14334 distances[j] = d = !axis ? _sqrt(x * x + y * y) : Math.abs(axis === "y" ? y : x); 14335 d > max && (max = d); 14336 d < min && (min = d); 14337 } 14338 14339 from === "random" && shuffle(distances); 14340 distances.max = max - min; 14341 distances.min = min; 14342 distances.v = l = (parseFloat(vars.amount) || parseFloat(vars.each) * (wrapAt > l ? l - 1 : !axis ? Math.max(wrapAt, l / wrapAt) : axis === "y" ? l / wrapAt : wrapAt) || 0) * (from === "edges" ? -1 : 1); 14343 distances.b = l < 0 ? base - l : base; 14344 distances.u = getUnit(vars.amount || vars.each) || 0; //unit 14345 14346 ease = ease && l < 0 ? _invertEase(ease) : ease; 14347 } 14348 14349 l = (distances[i] - distances.min) / distances.max || 0; 14350 return _roundPrecise(distances.b + (ease ? ease(l) : l) * distances.v) + distances.u; //round in order to work around floating point errors 14351 }; 14352}, 14353 _roundModifier = function _roundModifier(v) { 14354 //pass in 0.1 get a function that'll round to the nearest tenth, or 5 to round to the closest 5, or 0.001 to the closest 1000th, etc. 14355 var p = Math.pow(10, ((v + "").split(".")[1] || "").length); //to avoid floating point math errors (like 24 * 0.1 == 2.4000000000000004), we chop off at a specific number of decimal places (much faster than toFixed()) 14356 14357 return function (raw) { 14358 var n = _roundPrecise(Math.round(parseFloat(raw) / v) * v * p); 14359 14360 return (n - n % 1) / p + (_isNumber(raw) ? 0 : getUnit(raw)); // n - n % 1 replaces Math.floor() in order to handle negative values properly. For example, Math.floor(-150.00000000000003) is 151! 14361 }; 14362}, 14363 snap = function snap(snapTo, value) { 14364 var isArray = _isArray(snapTo), 14365 radius, 14366 is2D; 14367 14368 if (!isArray && _isObject(snapTo)) { 14369 radius = isArray = snapTo.radius || _bigNum; 14370 14371 if (snapTo.values) { 14372 snapTo = toArray(snapTo.values); 14373 14374 if (is2D = !_isNumber(snapTo[0])) { 14375 radius *= radius; //performance optimization so we don't have to Math.sqrt() in the loop. 14376 } 14377 } else { 14378 snapTo = _roundModifier(snapTo.increment); 14379 } 14380 } 14381 14382 return _conditionalReturn(value, !isArray ? _roundModifier(snapTo) : _isFunction(snapTo) ? function (raw) { 14383 is2D = snapTo(raw); 14384 return Math.abs(is2D - raw) <= radius ? is2D : raw; 14385 } : function (raw) { 14386 var x = parseFloat(is2D ? raw.x : raw), 14387 y = parseFloat(is2D ? raw.y : 0), 14388 min = _bigNum, 14389 closest = 0, 14390 i = snapTo.length, 14391 dx, 14392 dy; 14393 14394 while (i--) { 14395 if (is2D) { 14396 dx = snapTo[i].x - x; 14397 dy = snapTo[i].y - y; 14398 dx = dx * dx + dy * dy; 14399 } else { 14400 dx = Math.abs(snapTo[i] - x); 14401 } 14402 14403 if (dx < min) { 14404 min = dx; 14405 closest = i; 14406 } 14407 } 14408 14409 closest = !radius || min <= radius ? snapTo[closest] : raw; 14410 return is2D || closest === raw || _isNumber(raw) ? closest : closest + getUnit(raw); 14411 }); 14412}, 14413 random = function random(min, max, roundingIncrement, returnFunction) { 14414 return _conditionalReturn(_isArray(min) ? !max : roundingIncrement === true ? !!(roundingIncrement = 0) : !returnFunction, function () { 14415 return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + "").length - 2) : 1) && Math.floor(Math.round((min - roundingIncrement / 2 + Math.random() * (max - min + roundingIncrement * .99)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction; 14416 }); 14417}, 14418 pipe = function pipe() { 14419 for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) { 14420 functions[_key] = arguments[_key]; 14421 } 14422 14423 return function (value) { 14424 return functions.reduce(function (v, f) { 14425 return f(v); 14426 }, value); 14427 }; 14428}, 14429 unitize = function unitize(func, unit) { 14430 return function (value) { 14431 return func(parseFloat(value)) + (unit || getUnit(value)); 14432 }; 14433}, 14434 normalize = function normalize(min, max, value) { 14435 return mapRange(min, max, 0, 1, value); 14436}, 14437 _wrapArray = function _wrapArray(a, wrapper, value) { 14438 return _conditionalReturn(value, function (index) { 14439 return a[~~wrapper(index)]; 14440 }); 14441}, 14442 wrap = function wrap(min, max, value) { 14443 // NOTE: wrap() CANNOT be an arrow function! A very odd compiling bug causes problems (unrelated to GSAP). 14444 var range = max - min; 14445 return _isArray(min) ? _wrapArray(min, wrap(0, min.length), max) : _conditionalReturn(value, function (value) { 14446 return (range + (value - min) % range) % range + min; 14447 }); 14448}, 14449 wrapYoyo = function wrapYoyo(min, max, value) { 14450 var range = max - min, 14451 total = range * 2; 14452 return _isArray(min) ? _wrapArray(min, wrapYoyo(0, min.length - 1), max) : _conditionalReturn(value, function (value) { 14453 value = (total + (value - min) % total) % total || 0; 14454 return min + (value > range ? total - value : value); 14455 }); 14456}, 14457 _replaceRandom = function _replaceRandom(value) { 14458 //replaces all occurrences of random(...) in a string with the calculated random value. can be a range like random(-100, 100, 5) or an array like random([0, 100, 500]) 14459 var prev = 0, 14460 s = "", 14461 i, 14462 nums, 14463 end, 14464 isArray; 14465 14466 while (~(i = value.indexOf("random(", prev))) { 14467 end = value.indexOf(")", i); 14468 isArray = value.charAt(i + 7) === "["; 14469 nums = value.substr(i + 7, end - i - 7).match(isArray ? _delimitedValueExp : _strictNumExp); 14470 s += value.substr(prev, i - prev) + random(isArray ? nums : +nums[0], isArray ? 0 : +nums[1], +nums[2] || 1e-5); 14471 prev = end + 1; 14472 } 14473 14474 return s + value.substr(prev, value.length - prev); 14475}, 14476 mapRange = function mapRange(inMin, inMax, outMin, outMax, value) { 14477 var inRange = inMax - inMin, 14478 outRange = outMax - outMin; 14479 return _conditionalReturn(value, function (value) { 14480 return outMin + ((value - inMin) / inRange * outRange || 0); 14481 }); 14482}, 14483 interpolate = function interpolate(start, end, progress, mutate) { 14484 var func = isNaN(start + end) ? 0 : function (p) { 14485 return (1 - p) * start + p * end; 14486 }; 14487 14488 if (!func) { 14489 var isString = _isString(start), 14490 master = {}, 14491 p, 14492 i, 14493 interpolators, 14494 l, 14495 il; 14496 14497 progress === true && (mutate = 1) && (progress = null); 14498 14499 if (isString) { 14500 start = { 14501 p: start 14502 }; 14503 end = { 14504 p: end 14505 }; 14506 } else if (_isArray(start) && !_isArray(end)) { 14507 interpolators = []; 14508 l = start.length; 14509 il = l - 2; 14510 14511 for (i = 1; i < l; i++) { 14512 interpolators.push(interpolate(start[i - 1], start[i])); //build the interpolators up front as a performance optimization so that when the function is called many times, it can just reuse them. 14513 } 14514 14515 l--; 14516 14517 func = function func(p) { 14518 p *= l; 14519 var i = Math.min(il, ~~p); 14520 return interpolators[i](p - i); 14521 }; 14522 14523 progress = end; 14524 } else if (!mutate) { 14525 start = _merge(_isArray(start) ? [] : {}, start); 14526 } 14527 14528 if (!interpolators) { 14529 for (p in end) { 14530 _addPropTween.call(master, start, p, "get", end[p]); 14531 } 14532 14533 func = function func(p) { 14534 return _renderPropTweens(p, master) || (isString ? start.p : start); 14535 }; 14536 } 14537 } 14538 14539 return _conditionalReturn(progress, func); 14540}, 14541 _getLabelInDirection = function _getLabelInDirection(timeline, fromTime, backward) { 14542 //used for nextLabel() and previousLabel() 14543 var labels = timeline.labels, 14544 min = _bigNum, 14545 p, 14546 distance, 14547 label; 14548 14549 for (p in labels) { 14550 distance = labels[p] - fromTime; 14551 14552 if (distance < 0 === !!backward && distance && min > (distance = Math.abs(distance))) { 14553 label = p; 14554 min = distance; 14555 } 14556 } 14557 14558 return label; 14559}, 14560 _callback = function _callback(animation, type, executeLazyFirst) { 14561 var v = animation.vars, 14562 callback = v[type], 14563 prevContext = _context, 14564 context = animation._ctx, 14565 params, 14566 scope, 14567 result; 14568 14569 if (!callback) { 14570 return; 14571 } 14572 14573 params = v[type + "Params"]; 14574 scope = v.callbackScope || animation; 14575 executeLazyFirst && _lazyTweens.length && _lazyRender(); //in case rendering caused any tweens to lazy-init, we should render them because typically when a timeline finishes, users expect things to have rendered fully. Imagine an onUpdate on a timeline that reports/checks tweened values. 14576 14577 context && (_context = context); 14578 result = params ? callback.apply(scope, params) : callback.call(scope); 14579 _context = prevContext; 14580 return result; 14581}, 14582 _interrupt = function _interrupt(animation) { 14583 _removeFromParent(animation); 14584 14585 animation.scrollTrigger && animation.scrollTrigger.kill(!!_reverting); 14586 animation.progress() < 1 && _callback(animation, "onInterrupt"); 14587 return animation; 14588}, 14589 _quickTween, 14590 _registerPluginQueue = [], 14591 _createPlugin = function _createPlugin(config) { 14592 if (!config) return; 14593 config = !config.name && config["default"] || config; // UMD packaging wraps things oddly, so for example MotionPathHelper becomes {MotionPathHelper:MotionPathHelper, default:MotionPathHelper}. 14594 14595 if (_windowExists() || config.headless) { 14596 // edge case: some build tools may pass in a null/undefined value 14597 var name = config.name, 14598 isFunc = _isFunction(config), 14599 Plugin = name && !isFunc && config.init ? function () { 14600 this._props = []; 14601 } : config, 14602 //in case someone passes in an object that's not a plugin, like CustomEase 14603 instanceDefaults = { 14604 init: _emptyFunc, 14605 render: _renderPropTweens, 14606 add: _addPropTween, 14607 kill: _killPropTweensOf, 14608 modifier: _addPluginModifier, 14609 rawVars: 0 14610 }, 14611 statics = { 14612 targetTest: 0, 14613 get: 0, 14614 getSetter: _getSetter, 14615 aliases: {}, 14616 register: 0 14617 }; 14618 14619 _wake(); 14620 14621 if (config !== Plugin) { 14622 if (_plugins[name]) { 14623 return; 14624 } 14625 14626 _setDefaults(Plugin, _setDefaults(_copyExcluding(config, instanceDefaults), statics)); //static methods 14627 14628 14629 _merge(Plugin.prototype, _merge(instanceDefaults, _copyExcluding(config, statics))); //instance methods 14630 14631 14632 _plugins[Plugin.prop = name] = Plugin; 14633 14634 if (config.targetTest) { 14635 _harnessPlugins.push(Plugin); 14636 14637 _reservedProps[name] = 1; 14638 } 14639 14640 name = (name === "css" ? "CSS" : name.charAt(0).toUpperCase() + name.substr(1)) + "Plugin"; //for the global name. "motionPath" should become MotionPathPlugin 14641 } 14642 14643 _addGlobal(name, Plugin); 14644 14645 config.register && config.register(gsap, Plugin, PropTween); 14646 } else { 14647 _registerPluginQueue.push(config); 14648 } 14649}, 14650 14651/* 14652 * -------------------------------------------------------------------------------------- 14653 * COLORS 14654 * -------------------------------------------------------------------------------------- 14655 */ 14656_255 = 255, 14657 _colorLookup = { 14658 aqua: [0, _255, _255], 14659 lime: [0, _255, 0], 14660 silver: [192, 192, 192], 14661 black: [0, 0, 0], 14662 maroon: [128, 0, 0], 14663 teal: [0, 128, 128], 14664 blue: [0, 0, _255], 14665 navy: [0, 0, 128], 14666 white: [_255, _255, _255], 14667 olive: [128, 128, 0], 14668 yellow: [_255, _255, 0], 14669 orange: [_255, 165, 0], 14670 gray: [128, 128, 128], 14671 purple: [128, 0, 128], 14672 green: [0, 128, 0], 14673 red: [_255, 0, 0], 14674 pink: [_255, 192, 203], 14675 cyan: [0, _255, _255], 14676 transparent: [_255, _255, _255, 0] 14677}, 14678 // possible future idea to replace the hard-coded color name values - put this in the ticker.wake() where we set the _doc: 14679// let ctx = _doc.createElement("canvas").getContext("2d"); 14680// _forEachName("aqua,lime,silver,black,maroon,teal,blue,navy,white,olive,yellow,orange,gray,purple,green,red,pink,cyan", color => {ctx.fillStyle = color; _colorLookup[color] = splitColor(ctx.fillStyle)}); 14681_hue = function _hue(h, m1, m2) { 14682 h += h < 0 ? 1 : h > 1 ? -1 : 0; 14683 return (h * 6 < 1 ? m1 + (m2 - m1) * h * 6 : h < .5 ? m2 : h * 3 < 2 ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * _255 + .5 | 0; 14684}, 14685 splitColor = function splitColor(v, toHSL, forceAlpha) { 14686 var a = !v ? _colorLookup.black : _isNumber(v) ? [v >> 16, v >> 8 & _255, v & _255] : 0, 14687 r, 14688 g, 14689 b, 14690 h, 14691 s, 14692 l, 14693 max, 14694 min, 14695 d, 14696 wasHSL; 14697 14698 if (!a) { 14699 if (v.substr(-1) === ",") { 14700 //sometimes a trailing comma is included and we should chop it off (typically from a comma-delimited list of values like a textShadow:"2px 2px 2px blue, 5px 5px 5px rgb(255,0,0)" - in this example "blue," has a trailing comma. We could strip it out inside parseComplex() but we'd need to do it to the beginning and ending values plus it wouldn't provide protection from other potential scenarios like if the user passes in a similar value. 14701 v = v.substr(0, v.length - 1); 14702 } 14703 14704 if (_colorLookup[v]) { 14705 a = _colorLookup[v]; 14706 } else if (v.charAt(0) === "#") { 14707 if (v.length < 6) { 14708 //for shorthand like #9F0 or #9F0F (could have alpha) 14709 r = v.charAt(1); 14710 g = v.charAt(2); 14711 b = v.charAt(3); 14712 v = "#" + r + r + g + g + b + b + (v.length === 5 ? v.charAt(4) + v.charAt(4) : ""); 14713 } 14714 14715 if (v.length === 9) { 14716 // hex with alpha, like #fd5e53ff 14717 a = parseInt(v.substr(1, 6), 16); 14718 return [a >> 16, a >> 8 & _255, a & _255, parseInt(v.substr(7), 16) / 255]; 14719 } 14720 14721 v = parseInt(v.substr(1), 16); 14722 a = [v >> 16, v >> 8 & _255, v & _255]; 14723 } else if (v.substr(0, 3) === "hsl") { 14724 a = wasHSL = v.match(_strictNumExp); 14725 14726 if (!toHSL) { 14727 h = +a[0] % 360 / 360; 14728 s = +a[1] / 100; 14729 l = +a[2] / 100; 14730 g = l <= .5 ? l * (s + 1) : l + s - l * s; 14731 r = l * 2 - g; 14732 a.length > 3 && (a[3] *= 1); //cast as number 14733 14734 a[0] = _hue(h + 1 / 3, r, g); 14735 a[1] = _hue(h, r, g); 14736 a[2] = _hue(h - 1 / 3, r, g); 14737 } else if (~v.indexOf("=")) { 14738 //if relative values are found, just return the raw strings with the relative prefixes in place. 14739 a = v.match(_numExp); 14740 forceAlpha && a.length < 4 && (a[3] = 1); 14741 return a; 14742 } 14743 } else { 14744 a = v.match(_strictNumExp) || _colorLookup.transparent; 14745 } 14746 14747 a = a.map(Number); 14748 } 14749 14750 if (toHSL && !wasHSL) { 14751 r = a[0] / _255; 14752 g = a[1] / _255; 14753 b = a[2] / _255; 14754 max = Math.max(r, g, b); 14755 min = Math.min(r, g, b); 14756 l = (max + min) / 2; 14757 14758 if (max === min) { 14759 h = s = 0; 14760 } else { 14761 d = max - min; 14762 s = l > 0.5 ? d / (2 - max - min) : d / (max + min); 14763 h = max === r ? (g - b) / d + (g < b ? 6 : 0) : max === g ? (b - r) / d + 2 : (r - g) / d + 4; 14764 h *= 60; 14765 } 14766 14767 a[0] = ~~(h + .5); 14768 a[1] = ~~(s * 100 + .5); 14769 a[2] = ~~(l * 100 + .5); 14770 } 14771 14772 forceAlpha && a.length < 4 && (a[3] = 1); 14773 return a; 14774}, 14775 _colorOrderData = function _colorOrderData(v) { 14776 // strips out the colors from the string, finds all the numeric slots (with units) and returns an array of those. The Array also has a "c" property which is an Array of the index values where the colors belong. This is to help work around issues where there's a mis-matched order of color/numeric data like drop-shadow(#f00 0px 1px 2px) and drop-shadow(0x 1px 2px #f00). This is basically a helper function used in _formatColors() 14777 var values = [], 14778 c = [], 14779 i = -1; 14780 v.split(_colorExp).forEach(function (v) { 14781 var a = v.match(_numWithUnitExp) || []; 14782 values.push.apply(values, a); 14783 c.push(i += a.length + 1); 14784 }); 14785 values.c = c; 14786 return values; 14787}, 14788 _formatColors = function _formatColors(s, toHSL, orderMatchData) { 14789 var result = "", 14790 colors = (s + result).match(_colorExp), 14791 type = toHSL ? "hsla(" : "rgba(", 14792 i = 0, 14793 c, 14794 shell, 14795 d, 14796 l; 14797 14798 if (!colors) { 14799 return s; 14800 } 14801 14802 colors = colors.map(function (color) { 14803 return (color = splitColor(color, toHSL, 1)) && type + (toHSL ? color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : color.join(",")) + ")"; 14804 }); 14805 14806 if (orderMatchData) { 14807 d = _colorOrderData(s); 14808 c = orderMatchData.c; 14809 14810 if (c.join(result) !== d.c.join(result)) { 14811 shell = s.replace(_colorExp, "1").split(_numWithUnitExp); 14812 l = shell.length - 1; 14813 14814 for (; i < l; i++) { 14815 result += shell[i] + (~c.indexOf(i) ? colors.shift() || type + "0,0,0,0)" : (d.length ? d : colors.length ? colors : orderMatchData).shift()); 14816 } 14817 } 14818 } 14819 14820 if (!shell) { 14821 shell = s.split(_colorExp); 14822 l = shell.length - 1; 14823 14824 for (; i < l; i++) { 14825 result += shell[i] + colors[i]; 14826 } 14827 } 14828 14829 return result + shell[l]; 14830}, 14831 _colorExp = function () { 14832 var s = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", 14833 //we'll dynamically build this Regular Expression to conserve file size. After building it, it will be able to find rgb(), rgba(), # (hexadecimal), and named color values like red, blue, purple, etc., 14834 p; 14835 14836 for (p in _colorLookup) { 14837 s += "|" + p + "\\b"; 14838 } 14839 14840 return new RegExp(s + ")", "gi"); 14841}(), 14842 _hslExp = /hsl[a]?\(/, 14843 _colorStringFilter = function _colorStringFilter(a) { 14844 var combined = a.join(" "), 14845 toHSL; 14846 _colorExp.lastIndex = 0; 14847 14848 if (_colorExp.test(combined)) { 14849 toHSL = _hslExp.test(combined); 14850 a[1] = _formatColors(a[1], toHSL); 14851 a[0] = _formatColors(a[0], toHSL, _colorOrderData(a[1])); // make sure the order of numbers/colors match with the END value. 14852 14853 return true; 14854 } 14855}, 14856 14857/* 14858 * -------------------------------------------------------------------------------------- 14859 * TICKER 14860 * -------------------------------------------------------------------------------------- 14861 */ 14862_tickerActive, 14863 _ticker = function () { 14864 var _getTime = Date.now, 14865 _lagThreshold = 500, 14866 _adjustedLag = 33, 14867 _startTime = _getTime(), 14868 _lastUpdate = _startTime, 14869 _gap = 1000 / 240, 14870 _nextTime = _gap, 14871 _listeners = [], 14872 _id, 14873 _req, 14874 _raf, 14875 _self, 14876 _delta, 14877 _i, 14878 _tick = function _tick(v) { 14879 var elapsed = _getTime() - _lastUpdate, 14880 manual = v === true, 14881 overlap, 14882 dispatch, 14883 time, 14884 frame; 14885 14886 (elapsed > _lagThreshold || elapsed < 0) && (_startTime += elapsed - _adjustedLag); 14887 _lastUpdate += elapsed; 14888 time = _lastUpdate - _startTime; 14889 overlap = time - _nextTime; 14890 14891 if (overlap > 0 || manual) { 14892 frame = ++_self.frame; 14893 _delta = time - _self.time * 1000; 14894 _self.time = time = time / 1000; 14895 _nextTime += overlap + (overlap >= _gap ? 4 : _gap - overlap); 14896 dispatch = 1; 14897 } 14898 14899 manual || (_id = _req(_tick)); //make sure the request is made before we dispatch the "tick" event so that timing is maintained. Otherwise, if processing the "tick" requires a bunch of time (like 15ms) and we're using a setTimeout() that's based on 16.7ms, it'd technically take 31.7ms between frames otherwise. 14900 14901 if (dispatch) { 14902 for (_i = 0; _i < _listeners.length; _i++) { 14903 // use _i and check _listeners.length instead of a variable because a listener could get removed during the loop, and if that happens to an element less than the current index, it'd throw things off in the loop. 14904 _listeners[_i](time, _delta, frame, v); 14905 } 14906 } 14907 }; 14908 14909 _self = { 14910 time: 0, 14911 frame: 0, 14912 tick: function tick() { 14913 _tick(true); 14914 }, 14915 deltaRatio: function deltaRatio(fps) { 14916 return _delta / (1000 / (fps || 60)); 14917 }, 14918 wake: function wake() { 14919 if (_coreReady) { 14920 if (!_coreInitted && _windowExists()) { 14921 _win = _coreInitted = window; 14922 _doc = _win.document || {}; 14923 _globals.gsap = gsap; 14924 (_win.gsapVersions || (_win.gsapVersions = [])).push(gsap.version); 14925 14926 _install(_installScope || _win.GreenSockGlobals || !_win.gsap && _win || {}); 14927 14928 _registerPluginQueue.forEach(_createPlugin); 14929 } 14930 14931 _raf = typeof requestAnimationFrame !== "undefined" && requestAnimationFrame; 14932 _id && _self.sleep(); 14933 14934 _req = _raf || function (f) { 14935 return setTimeout(f, _nextTime - _self.time * 1000 + 1 | 0); 14936 }; 14937 14938 _tickerActive = 1; 14939 14940 _tick(2); 14941 } 14942 }, 14943 sleep: function sleep() { 14944 (_raf ? cancelAnimationFrame : clearTimeout)(_id); 14945 _tickerActive = 0; 14946 _req = _emptyFunc; 14947 }, 14948 lagSmoothing: function lagSmoothing(threshold, adjustedLag) { 14949 _lagThreshold = threshold || Infinity; // zero should be interpreted as basically unlimited 14950 14951 _adjustedLag = Math.min(adjustedLag || 33, _lagThreshold); 14952 }, 14953 fps: function fps(_fps) { 14954 _gap = 1000 / (_fps || 240); 14955 _nextTime = _self.time * 1000 + _gap; 14956 }, 14957 add: function add(callback, once, prioritize) { 14958 var func = once ? function (t, d, f, v) { 14959 callback(t, d, f, v); 14960 14961 _self.remove(func); 14962 } : callback; 14963 14964 _self.remove(callback); 14965 14966 _listeners[prioritize ? "unshift" : "push"](func); 14967 14968 _wake(); 14969 14970 return func; 14971 }, 14972 remove: function remove(callback, i) { 14973 ~(i = _listeners.indexOf(callback)) && _listeners.splice(i, 1) && _i >= i && _i--; 14974 }, 14975 _listeners: _listeners 14976 }; 14977 return _self; 14978}(), 14979 _wake = function _wake() { 14980 return !_tickerActive && _ticker.wake(); 14981}, 14982 //also ensures the core classes are initialized. 14983 14984/* 14985* ------------------------------------------------- 14986* EASING 14987* ------------------------------------------------- 14988*/ 14989_easeMap = {}, 14990 _customEaseExp = /^[\d.\-M][\d.\-,\s]/, 14991 _quotesExp = /["']/g, 14992 _parseObjectInString = function _parseObjectInString(value) { 14993 //takes a string like "{wiggles:10, type:anticipate})" and turns it into a real object. Notice it ends in ")" and includes the {} wrappers. This is because we only use this function for parsing ease configs and prioritized optimization rather than reusability. 14994 var obj = {}, 14995 split = value.substr(1, value.length - 3).split(":"), 14996 key = split[0], 14997 i = 1, 14998 l = split.length, 14999 index, 15000 val, 15001 parsedVal; 15002 15003 for (; i < l; i++) { 15004 val = split[i]; 15005 index = i !== l - 1 ? val.lastIndexOf(",") : val.length; 15006 parsedVal = val.substr(0, index); 15007 obj[key] = isNaN(parsedVal) ? parsedVal.replace(_quotesExp, "").trim() : +parsedVal; 15008 key = val.substr(index + 1).trim(); 15009 } 15010 15011 return obj; 15012}, 15013 _valueInParentheses = function _valueInParentheses(value) { 15014 var open = value.indexOf("(") + 1, 15015 close = value.indexOf(")"), 15016 nested = value.indexOf("(", open); 15017 return value.substring(open, ~nested && nested < close ? value.indexOf(")", close + 1) : close); 15018}, 15019 _configEaseFromString = function _configEaseFromString(name) { 15020 //name can be a string like "elastic.out(1,0.5)", and pass in _easeMap as obj and it'll parse it out and call the actual function like _easeMap.Elastic.easeOut.config(1,0.5). It will also parse custom ease strings as long as CustomEase is loaded and registered (internally as _easeMap._CE). 15021 var split = (name + "").split("("), 15022 ease = _easeMap[split[0]]; 15023 return ease && split.length > 1 && ease.config ? ease.config.apply(null, ~name.indexOf("{") ? [_parseObjectInString(split[1])] : _valueInParentheses(name).split(",").map(_numericIfPossible)) : _easeMap._CE && _customEaseExp.test(name) ? _easeMap._CE("", name) : ease; 15024}, 15025 _invertEase = function _invertEase(ease) { 15026 return function (p) { 15027 return 1 - ease(1 - p); 15028 }; 15029}, 15030 // allow yoyoEase to be set in children and have those affected when the parent/ancestor timeline yoyos. 15031_propagateYoyoEase = function _propagateYoyoEase(timeline, isYoyo) { 15032 var child = timeline._first, 15033 ease; 15034 15035 while (child) { 15036 if (child instanceof Timeline) { 15037 _propagateYoyoEase(child, isYoyo); 15038 } else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) { 15039 if (child.timeline) { 15040 _propagateYoyoEase(child.timeline, isYoyo); 15041 } else { 15042 ease = child._ease; 15043 child._ease = child._yEase; 15044 child._yEase = ease; 15045 child._yoyo = isYoyo; 15046 } 15047 } 15048 15049 child = child._next; 15050 } 15051}, 15052 _parseEase = function _parseEase(ease, defaultEase) { 15053 return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase; 15054}, 15055 _insertEase = function _insertEase(names, easeIn, easeOut, easeInOut) { 15056 if (easeOut === void 0) { 15057 easeOut = function easeOut(p) { 15058 return 1 - easeIn(1 - p); 15059 }; 15060 } 15061 15062 if (easeInOut === void 0) { 15063 easeInOut = function easeInOut(p) { 15064 return p < .5 ? easeIn(p * 2) / 2 : 1 - easeIn((1 - p) * 2) / 2; 15065 }; 15066 } 15067 15068 var ease = { 15069 easeIn: easeIn, 15070 easeOut: easeOut, 15071 easeInOut: easeInOut 15072 }, 15073 lowercaseName; 15074 15075 _forEachName(names, function (name) { 15076 _easeMap[name] = _globals[name] = ease; 15077 _easeMap[lowercaseName = name.toLowerCase()] = easeOut; 15078 15079 for (var p in ease) { 15080 _easeMap[lowercaseName + (p === "easeIn" ? ".in" : p === "easeOut" ? ".out" : ".inOut")] = _easeMap[name + "." + p] = ease[p]; 15081 } 15082 }); 15083 15084 return ease; 15085}, 15086 _easeInOutFromOut = function _easeInOutFromOut(easeOut) { 15087 return function (p) { 15088 return p < .5 ? (1 - easeOut(1 - p * 2)) / 2 : .5 + easeOut((p - .5) * 2) / 2; 15089 }; 15090}, 15091 _configElastic = function _configElastic(type, amplitude, period) { 15092 var p1 = amplitude >= 1 ? amplitude : 1, 15093 //note: if amplitude is < 1, we simply adjust the period for a more natural feel. Otherwise the math doesn't work right and the curve starts at 1. 15094 p2 = (period || (type ? .3 : .45)) / (amplitude < 1 ? amplitude : 1), 15095 p3 = p2 / _2PI * (Math.asin(1 / p1) || 0), 15096 easeOut = function easeOut(p) { 15097 return p === 1 ? 1 : p1 * Math.pow(2, -10 * p) * _sin((p - p3) * p2) + 1; 15098 }, 15099 ease = type === "out" ? easeOut : type === "in" ? function (p) { 15100 return 1 - easeOut(1 - p); 15101 } : _easeInOutFromOut(easeOut); 15102 15103 p2 = _2PI / p2; //precalculate to optimize 15104 15105 ease.config = function (amplitude, period) { 15106 return _configElastic(type, amplitude, period); 15107 }; 15108 15109 return ease; 15110}, 15111 _configBack = function _configBack(type, overshoot) { 15112 if (overshoot === void 0) { 15113 overshoot = 1.70158; 15114 } 15115 15116 var easeOut = function easeOut(p) { 15117 return p ? --p * p * ((overshoot + 1) * p + overshoot) + 1 : 0; 15118 }, 15119 ease = type === "out" ? easeOut : type === "in" ? function (p) { 15120 return 1 - easeOut(1 - p); 15121 } : _easeInOutFromOut(easeOut); 15122 15123 ease.config = function (overshoot) { 15124 return _configBack(type, overshoot); 15125 }; 15126 15127 return ease; 15128}; // a cheaper (kb and cpu) but more mild way to get a parameterized weighted ease by feeding in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear. 15129// _weightedEase = ratio => { 15130// let y = 0.5 + ratio / 2; 15131// return p => (2 * (1 - p) * p * y + p * p); 15132// }, 15133// a stronger (but more expensive kb/cpu) parameterized weighted ease that lets you feed in a value between -1 (easeIn) and 1 (easeOut) where 0 is linear. 15134// _weightedEaseStrong = ratio => { 15135// ratio = .5 + ratio / 2; 15136// let o = 1 / 3 * (ratio < .5 ? ratio : 1 - ratio), 15137// b = ratio - o, 15138// c = ratio + o; 15139// return p => p === 1 ? p : 3 * b * (1 - p) * (1 - p) * p + 3 * c * (1 - p) * p * p + p * p * p; 15140// }; 15141 15142 15143_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong", function (name, i) { 15144 var power = i < 5 ? i + 1 : i; 15145 15146 _insertEase(name + ",Power" + (power - 1), i ? function (p) { 15147 return Math.pow(p, power); 15148 } : function (p) { 15149 return p; 15150 }, function (p) { 15151 return 1 - Math.pow(1 - p, power); 15152 }, function (p) { 15153 return p < .5 ? Math.pow(p * 2, power) / 2 : 1 - Math.pow((1 - p) * 2, power) / 2; 15154 }); 15155}); 15156 15157_easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn; 15158 15159_insertEase("Elastic", _configElastic("in"), _configElastic("out"), _configElastic()); 15160 15161(function (n, c) { 15162 var n1 = 1 / c, 15163 n2 = 2 * n1, 15164 n3 = 2.5 * n1, 15165 easeOut = function easeOut(p) { 15166 return p < n1 ? n * p * p : p < n2 ? n * Math.pow(p - 1.5 / c, 2) + .75 : p < n3 ? n * (p -= 2.25 / c) * p + .9375 : n * Math.pow(p - 2.625 / c, 2) + .984375; 15167 }; 15168 15169 _insertEase("Bounce", function (p) { 15170 return 1 - easeOut(1 - p); 15171 }, easeOut); 15172})(7.5625, 2.75); 15173 15174_insertEase("Expo", function (p) { 15175 return p ? Math.pow(2, 10 * (p - 1)) : 0; 15176}); 15177 15178_insertEase("Circ", function (p) { 15179 return -(_sqrt(1 - p * p) - 1); 15180}); 15181 15182_insertEase("Sine", function (p) { 15183 return p === 1 ? 1 : -_cos(p * _HALF_PI) + 1; 15184}); 15185 15186_insertEase("Back", _configBack("in"), _configBack("out"), _configBack()); 15187 15188_easeMap.SteppedEase = _easeMap.steps = _globals.SteppedEase = { 15189 config: function config(steps, immediateStart) { 15190 if (steps === void 0) { 15191 steps = 1; 15192 } 15193 15194 var p1 = 1 / steps, 15195 p2 = steps + (immediateStart ? 0 : 1), 15196 p3 = immediateStart ? 1 : 0, 15197 max = 1 - _tinyNum; 15198 return function (p) { 15199 return ((p2 * _clamp(0, max, p) | 0) + p3) * p1; 15200 }; 15201 } 15202}; 15203_defaults.ease = _easeMap["quad.out"]; 15204 15205_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function (name) { 15206 return _callbackNames += name + "," + name + "Params,"; 15207}); 15208/* 15209 * -------------------------------------------------------------------------------------- 15210 * CACHE 15211 * -------------------------------------------------------------------------------------- 15212 */ 15213 15214 15215var GSCache = function GSCache(target, harness) { 15216 this.id = _gsID++; 15217 target._gsap = this; 15218 this.target = target; 15219 this.harness = harness; 15220 this.get = harness ? harness.get : _getProperty; 15221 this.set = harness ? harness.getSetter : _getSetter; 15222}; 15223/* 15224 * -------------------------------------------------------------------------------------- 15225 * ANIMATION 15226 * -------------------------------------------------------------------------------------- 15227 */ 15228 15229var Animation = /*#__PURE__*/function () { 15230 function Animation(vars) { 15231 this.vars = vars; 15232 this._delay = +vars.delay || 0; 15233 15234 if (this._repeat = vars.repeat === Infinity ? -2 : vars.repeat || 0) { 15235 // TODO: repeat: Infinity on a timeline's children must flag that timeline internally and affect its totalDuration, otherwise it'll stop in the negative direction when reaching the start. 15236 this._rDelay = vars.repeatDelay || 0; 15237 this._yoyo = !!vars.yoyo || !!vars.yoyoEase; 15238 } 15239 15240 this._ts = 1; 15241 15242 _setDuration(this, +vars.duration, 1, 1); 15243 15244 this.data = vars.data; 15245 15246 if (_context) { 15247 this._ctx = _context; 15248 15249 _context.data.push(this); 15250 } 15251 15252 _tickerActive || _ticker.wake(); 15253 } 15254 15255 var _proto = Animation.prototype; 15256 15257 _proto.delay = function delay(value) { 15258 if (value || value === 0) { 15259 this.parent && this.parent.smoothChildTiming && this.startTime(this._start + value - this._delay); 15260 this._delay = value; 15261 return this; 15262 } 15263 15264 return this._delay; 15265 }; 15266 15267 _proto.duration = function duration(value) { 15268 return arguments.length ? this.totalDuration(this._repeat > 0 ? value + (value + this._rDelay) * this._repeat : value) : this.totalDuration() && this._dur; 15269 }; 15270 15271 _proto.totalDuration = function totalDuration(value) { 15272 if (!arguments.length) { 15273 return this._tDur; 15274 } 15275 15276 this._dirty = 0; 15277 return _setDuration(this, this._repeat < 0 ? value : (value - this._repeat * this._rDelay) / (this._repeat + 1)); 15278 }; 15279 15280 _proto.totalTime = function totalTime(_totalTime, suppressEvents) { 15281 _wake(); 15282 15283 if (!arguments.length) { 15284 return this._tTime; 15285 } 15286 15287 var parent = this._dp; 15288 15289 if (parent && parent.smoothChildTiming && this._ts) { 15290 _alignPlayhead(this, _totalTime); 15291 15292 !parent._dp || parent.parent || _postAddChecks(parent, this); // edge case: if this is a child of a timeline that already completed, for example, we must re-activate the parent. 15293 //in case any of the ancestor timelines had completed but should now be enabled, we should reset their totalTime() which will also ensure that they're lined up properly and enabled. Skip for animations that are on the root (wasteful). Example: a TimelineLite.exportRoot() is performed when there's a paused tween on the root, the export will not complete until that tween is unpaused, but imagine a child gets restarted later, after all [unpaused] tweens have completed. The start of that child would get pushed out, but one of the ancestors may have completed. 15294 15295 while (parent && parent.parent) { 15296 if (parent.parent._time !== parent._start + (parent._ts >= 0 ? parent._tTime / parent._ts : (parent.totalDuration() - parent._tTime) / -parent._ts)) { 15297 parent.totalTime(parent._tTime, true); 15298 } 15299 15300 parent = parent.parent; 15301 } 15302 15303 if (!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && _totalTime < this._tDur || this._ts < 0 && _totalTime > 0 || !this._tDur && !_totalTime)) { 15304 //if the animation doesn't have a parent, put it back into its last parent (recorded as _dp for exactly cases like this). Limit to parents with autoRemoveChildren (like globalTimeline) so that if the user manually removes an animation from a timeline and then alters its playhead, it doesn't get added back in. 15305 _addToTimeline(this._dp, this, this._start - this._delay); 15306 } 15307 } 15308 15309 if (this._tTime !== _totalTime || !this._dur && !suppressEvents || this._initted && Math.abs(this._zTime) === _tinyNum || !_totalTime && !this._initted && (this.add || this._ptLookup)) { 15310 // check for _ptLookup on a Tween instance to ensure it has actually finished being instantiated, otherwise if this.reverse() gets called in the Animation constructor, it could trigger a render() here even though the _targets weren't populated, thus when _init() is called there won't be any PropTweens (it'll act like the tween is non-functional) 15311 this._ts || (this._pTime = _totalTime); // otherwise, if an animation is paused, then the playhead is moved back to zero, then resumed, it'd revert back to the original time at the pause 15312 //if (!this._lock) { // avoid endless recursion (not sure we need this yet or if it's worth the performance hit) 15313 // this._lock = 1; 15314 15315 _lazySafeRender(this, _totalTime, suppressEvents); // this._lock = 0; 15316 //} 15317 15318 } 15319 15320 return this; 15321 }; 15322 15323 _proto.time = function time(value, suppressEvents) { 15324 return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % (this._dur + this._rDelay) || (value ? this._dur : 0), suppressEvents) : this._time; // note: if the modulus results in 0, the playhead could be exactly at the end or the beginning, and we always defer to the END with a non-zero value, otherwise if you set the time() to the very end (duration()), it would render at the START! 15325 }; 15326 15327 _proto.totalProgress = function totalProgress(value, suppressEvents) { 15328 return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() > 0 ? 1 : 0; 15329 }; 15330 15331 _proto.progress = function progress(value, suppressEvents) { 15332 return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - value : value) + _elapsedCycleDuration(this), suppressEvents) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0; 15333 }; 15334 15335 _proto.iteration = function iteration(value, suppressEvents) { 15336 var cycleDuration = this.duration() + this._rDelay; 15337 15338 return arguments.length ? this.totalTime(this._time + (value - 1) * cycleDuration, suppressEvents) : this._repeat ? _animationCycle(this._tTime, cycleDuration) + 1 : 1; 15339 } // potential future addition: 15340 // isPlayingBackwards() { 15341 // let animation = this, 15342 // orientation = 1; // 1 = forward, -1 = backward 15343 // while (animation) { 15344 // orientation *= animation.reversed() || (animation.repeat() && !(animation.iteration() & 1)) ? -1 : 1; 15345 // animation = animation.parent; 15346 // } 15347 // return orientation < 0; 15348 // } 15349 ; 15350 15351 _proto.timeScale = function timeScale(value, suppressEvents) { 15352 if (!arguments.length) { 15353 return this._rts === -_tinyNum ? 0 : this._rts; // recorded timeScale. Special case: if someone calls reverse() on an animation with timeScale of 0, we assign it -_tinyNum to remember it's reversed. 15354 } 15355 15356 if (this._rts === value) { 15357 return this; 15358 } 15359 15360 var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime; // make sure to do the parentToChildTotalTime() BEFORE setting the new _ts because the old one must be used in that calculation. 15361 // future addition? Up side: fast and minimal file size. Down side: only works on this animation; if a timeline is reversed, for example, its childrens' onReverse wouldn't get called. 15362 //(+value < 0 && this._rts >= 0) && _callback(this, "onReverse", true); 15363 // prioritize rendering where the parent's playhead lines up instead of this._tTime because there could be a tween that's animating another tween's timeScale in the same rendering loop (same parent), thus if the timeScale tween renders first, it would alter _start BEFORE _tTime was set on that tick (in the rendering loop), effectively freezing it until the timeScale tween finishes. 15364 15365 this._rts = +value || 0; 15366 this._ts = this._ps || value === -_tinyNum ? 0 : this._rts; // _ts is the functional timeScale which would be 0 if the animation is paused. 15367 15368 this.totalTime(_clamp(-Math.abs(this._delay), this._tDur, tTime), suppressEvents !== false); 15369 15370 _setEnd(this); // if parent.smoothChildTiming was false, the end time didn't get updated in the _alignPlayhead() method, so do it here. 15371 15372 15373 return _recacheAncestors(this); 15374 }; 15375 15376 _proto.paused = function paused(value) { 15377 if (!arguments.length) { 15378 return this._ps; 15379 } 15380 15381 if (this._ps !== value) { 15382 this._ps = value; 15383 15384 if (value) { 15385 this._pTime = this._tTime || Math.max(-this._delay, this.rawTime()); // if the pause occurs during the delay phase, make sure that's factored in when resuming. 15386 15387 this._ts = this._act = 0; // _ts is the functional timeScale, so a paused tween would effectively have a timeScale of 0. We record the "real" timeScale as _rts (recorded time scale) 15388 } else { 15389 _wake(); 15390 15391 this._ts = this._rts; //only defer to _pTime (pauseTime) if tTime is zero. Remember, someone could pause() an animation, then scrub the playhead and resume(). If the parent doesn't have smoothChildTiming, we render at the rawTime() because the startTime won't get updated. 15392 15393 this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== _tinyNum && (this._tTime -= _tinyNum)); // edge case: animation.progress(1).pause().play() wouldn't render again because the playhead is already at the end, but the call to totalTime() below will add it back to its parent...and not remove it again (since removing only happens upon rendering at a new time). Offsetting the _tTime slightly is done simply to cause the final render in totalTime() that'll pop it off its timeline (if autoRemoveChildren is true, of course). Check to make sure _zTime isn't -_tinyNum to avoid an edge case where the playhead is pushed to the end but INSIDE a tween/callback, the timeline itself is paused thus halting rendering and leaving a few unrendered. When resuming, it wouldn't render those otherwise. 15394 } 15395 } 15396 15397 return this; 15398 }; 15399 15400 _proto.startTime = function startTime(value) { 15401 if (arguments.length) { 15402 this._start = value; 15403 var parent = this.parent || this._dp; 15404 parent && (parent._sort || !this.parent) && _addToTimeline(parent, this, value - this._delay); 15405 return this; 15406 } 15407 15408 return this._start; 15409 }; 15410 15411 _proto.endTime = function endTime(includeRepeats) { 15412 return this._start + (_isNotFalse(includeRepeats) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1); 15413 }; 15414 15415 _proto.rawTime = function rawTime(wrapRepeats) { 15416 var parent = this.parent || this._dp; // _dp = detached parent 15417 15418 return !parent ? this._tTime : wrapRepeats && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : !this._ts ? this._tTime : _parentToChildTotalTime(parent.rawTime(wrapRepeats), this); 15419 }; 15420 15421 _proto.revert = function revert(config) { 15422 if (config === void 0) { 15423 config = _revertConfig; 15424 } 15425 15426 var prevIsReverting = _reverting; 15427 _reverting = config; 15428 15429 if (this._initted || this._startAt) { 15430 this.timeline && this.timeline.revert(config); 15431 this.totalTime(-0.01, config.suppressEvents); 15432 } 15433 15434 this.data !== "nested" && config.kill !== false && this.kill(); 15435 _reverting = prevIsReverting; 15436 return this; 15437 }; 15438 15439 _proto.globalTime = function globalTime(rawTime) { 15440 var animation = this, 15441 time = arguments.length ? rawTime : animation.rawTime(); 15442 15443 while (animation) { 15444 time = animation._start + time / (Math.abs(animation._ts) || 1); 15445 animation = animation._dp; 15446 } 15447 15448 return !this.parent && this._sat ? this._sat.globalTime(rawTime) : time; // the _startAt tweens for .fromTo() and .from() that have immediateRender should always be FIRST in the timeline (important for context.revert()). "_sat" stands for _startAtTween, referring to the parent tween that created the _startAt. We must discern if that tween had immediateRender so that we can know whether or not to prioritize it in revert(). 15449 }; 15450 15451 _proto.repeat = function repeat(value) { 15452 if (arguments.length) { 15453 this._repeat = value === Infinity ? -2 : value; 15454 return _onUpdateTotalDuration(this); 15455 } 15456 15457 return this._repeat === -2 ? Infinity : this._repeat; 15458 }; 15459 15460 _proto.repeatDelay = function repeatDelay(value) { 15461 if (arguments.length) { 15462 var time = this._time; 15463 this._rDelay = value; 15464 15465 _onUpdateTotalDuration(this); 15466 15467 return time ? this.time(time) : this; 15468 } 15469 15470 return this._rDelay; 15471 }; 15472 15473 _proto.yoyo = function yoyo(value) { 15474 if (arguments.length) { 15475 this._yoyo = value; 15476 return this; 15477 } 15478 15479 return this._yoyo; 15480 }; 15481 15482 _proto.seek = function seek(position, suppressEvents) { 15483 return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents)); 15484 }; 15485 15486 _proto.restart = function restart(includeDelay, suppressEvents) { 15487 return this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents)); 15488 }; 15489 15490 _proto.play = function play(from, suppressEvents) { 15491 from != null && this.seek(from, suppressEvents); 15492 return this.reversed(false).paused(false); 15493 }; 15494 15495 _proto.reverse = function reverse(from, suppressEvents) { 15496 from != null && this.seek(from || this.totalDuration(), suppressEvents); 15497 return this.reversed(true).paused(false); 15498 }; 15499 15500 _proto.pause = function pause(atTime, suppressEvents) { 15501 atTime != null && this.seek(atTime, suppressEvents); 15502 return this.paused(true); 15503 }; 15504 15505 _proto.resume = function resume() { 15506 return this.paused(false); 15507 }; 15508 15509 _proto.reversed = function reversed(value) { 15510 if (arguments.length) { 15511 !!value !== this.reversed() && this.timeScale(-this._rts || (value ? -_tinyNum : 0)); // in case timeScale is zero, reversing would have no effect so we use _tinyNum. 15512 15513 return this; 15514 } 15515 15516 return this._rts < 0; 15517 }; 15518 15519 _proto.invalidate = function invalidate() { 15520 this._initted = this._act = 0; 15521 this._zTime = -_tinyNum; 15522 return this; 15523 }; 15524 15525 _proto.isActive = function isActive() { 15526 var parent = this.parent || this._dp, 15527 start = this._start, 15528 rawTime; 15529 return !!(!parent || this._ts && this._initted && parent.isActive() && (rawTime = parent.rawTime(true)) >= start && rawTime < this.endTime(true) - _tinyNum); 15530 }; 15531 15532 _proto.eventCallback = function eventCallback(type, callback, params) { 15533 var vars = this.vars; 15534 15535 if (arguments.length > 1) { 15536 if (!callback) { 15537 delete vars[type]; 15538 } else { 15539 vars[type] = callback; 15540 params && (vars[type + "Params"] = params); 15541 type === "onUpdate" && (this._onUpdate = callback); 15542 } 15543 15544 return this; 15545 } 15546 15547 return vars[type]; 15548 }; 15549 15550 _proto.then = function then(onFulfilled) { 15551 var self = this; 15552 return new Promise(function (resolve) { 15553 var f = _isFunction(onFulfilled) ? onFulfilled : _passThrough, 15554 _resolve = function _resolve() { 15555 var _then = self.then; 15556 self.then = null; // temporarily null the then() method to avoid an infinite loop (see https://github.com/greensock/GSAP/issues/322) 15557 15558 _isFunction(f) && (f = f(self)) && (f.then || f === self) && (self.then = _then); 15559 resolve(f); 15560 self.then = _then; 15561 }; 15562 15563 if (self._initted && self.totalProgress() === 1 && self._ts >= 0 || !self._tTime && self._ts < 0) { 15564 _resolve(); 15565 } else { 15566 self._prom = _resolve; 15567 } 15568 }); 15569 }; 15570 15571 _proto.kill = function kill() { 15572 _interrupt(this); 15573 }; 15574 15575 return Animation; 15576}(); 15577 15578_setDefaults(Animation.prototype, { 15579 _time: 0, 15580 _start: 0, 15581 _end: 0, 15582 _tTime: 0, 15583 _tDur: 0, 15584 _dirty: 0, 15585 _repeat: 0, 15586 _yoyo: false, 15587 parent: null, 15588 _initted: false, 15589 _rDelay: 0, 15590 _ts: 1, 15591 _dp: 0, 15592 ratio: 0, 15593 _zTime: -_tinyNum, 15594 _prom: 0, 15595 _ps: false, 15596 _rts: 1 15597}); 15598/* 15599 * ------------------------------------------------- 15600 * TIMELINE 15601 * ------------------------------------------------- 15602 */ 15603 15604 15605var Timeline = /*#__PURE__*/function (_Animation) { 15606 _inheritsLoose(Timeline, _Animation); 15607 15608 function Timeline(vars, position) { 15609 var _this; 15610 15611 if (vars === void 0) { 15612 vars = {}; 15613 } 15614 15615 _this = _Animation.call(this, vars) || this; 15616 _this.labels = {}; 15617 _this.smoothChildTiming = !!vars.smoothChildTiming; 15618 _this.autoRemoveChildren = !!vars.autoRemoveChildren; 15619 _this._sort = _isNotFalse(vars.sortChildren); 15620 _globalTimeline && _addToTimeline(vars.parent || _globalTimeline, _assertThisInitialized(_this), position); 15621 vars.reversed && _this.reverse(); 15622 vars.paused && _this.paused(true); 15623 vars.scrollTrigger && _scrollTrigger(_assertThisInitialized(_this), vars.scrollTrigger); 15624 return _this; 15625 } 15626 15627 var _proto2 = Timeline.prototype; 15628 15629 _proto2.to = function to(targets, vars, position) { 15630 _createTweenType(0, arguments, this); 15631 15632 return this; 15633 }; 15634 15635 _proto2.from = function from(targets, vars, position) { 15636 _createTweenType(1, arguments, this); 15637 15638 return this; 15639 }; 15640 15641 _proto2.fromTo = function fromTo(targets, fromVars, toVars, position) { 15642 _createTweenType(2, arguments, this); 15643 15644 return this; 15645 }; 15646 15647 _proto2.set = function set(targets, vars, position) { 15648 vars.duration = 0; 15649 vars.parent = this; 15650 _inheritDefaults(vars).repeatDelay || (vars.repeat = 0); 15651 vars.immediateRender = !!vars.immediateRender; 15652 new Tween(targets, vars, _parsePosition(this, position), 1); 15653 return this; 15654 }; 15655 15656 _proto2.call = function call(callback, params, position) { 15657 return _addToTimeline(this, Tween.delayedCall(0, callback, params), position); 15658 } //ONLY for backward compatibility! Maybe delete? 15659 ; 15660 15661 _proto2.staggerTo = function staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) { 15662 vars.duration = duration; 15663 vars.stagger = vars.stagger || stagger; 15664 vars.onComplete = onCompleteAll; 15665 vars.onCompleteParams = onCompleteAllParams; 15666 vars.parent = this; 15667 new Tween(targets, vars, _parsePosition(this, position)); 15668 return this; 15669 }; 15670 15671 _proto2.staggerFrom = function staggerFrom(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) { 15672 vars.runBackwards = 1; 15673 _inheritDefaults(vars).immediateRender = _isNotFalse(vars.immediateRender); 15674 return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams); 15675 }; 15676 15677 _proto2.staggerFromTo = function staggerFromTo(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams) { 15678 toVars.startAt = fromVars; 15679 _inheritDefaults(toVars).immediateRender = _isNotFalse(toVars.immediateRender); 15680 return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams); 15681 }; 15682 15683 _proto2.render = function render(totalTime, suppressEvents, force) { 15684 var prevTime = this._time, 15685 tDur = this._dirty ? this.totalDuration() : this._tDur, 15686 dur = this._dur, 15687 tTime = totalTime <= 0 ? 0 : _roundPrecise(totalTime), 15688 // if a paused timeline is resumed (or its _start is updated for another reason...which rounds it), that could result in the playhead shifting a **tiny** amount and a zero-duration child at that spot may get rendered at a different ratio, like its totalTime in render() may be 1e-17 instead of 0, for example. 15689 crossingStart = this._zTime < 0 !== totalTime < 0 && (this._initted || !dur), 15690 time, 15691 child, 15692 next, 15693 iteration, 15694 cycleDuration, 15695 prevPaused, 15696 pauseTween, 15697 timeScale, 15698 prevStart, 15699 prevIteration, 15700 yoyo, 15701 isYoyo; 15702 this !== _globalTimeline && tTime > tDur && totalTime >= 0 && (tTime = tDur); 15703 15704 if (tTime !== this._tTime || force || crossingStart) { 15705 if (prevTime !== this._time && dur) { 15706 //if totalDuration() finds a child with a negative startTime and smoothChildTiming is true, things get shifted around internally so we need to adjust the time accordingly. For example, if a tween starts at -30 we must shift EVERYTHING forward 30 seconds and move this timeline's startTime backward by 30 seconds so that things align with the playhead (no jump). 15707 tTime += this._time - prevTime; 15708 totalTime += this._time - prevTime; 15709 } 15710 15711 time = tTime; 15712 prevStart = this._start; 15713 timeScale = this._ts; 15714 prevPaused = !timeScale; 15715 15716 if (crossingStart) { 15717 dur || (prevTime = this._zTime); //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline, we need to discern if events are suppressed so that when the playhead moves again (next time), it'll trigger the callback. If events are NOT suppressed, obviously the callback would be triggered in this render. Basically, the callback should fire either when the playhead ARRIVES or LEAVES this exact spot, not both. Imagine doing a timeline.seek(0) and there's a callback that sits at 0. Since events are suppressed on that seek() by default, nothing will fire, but when the playhead moves off of that position, the callback should fire. This behavior is what people intuitively expect. 15718 15719 (totalTime || !suppressEvents) && (this._zTime = totalTime); 15720 } 15721 15722 if (this._repeat) { 15723 //adjust the time for repeats and yoyos 15724 yoyo = this._yoyo; 15725 cycleDuration = dur + this._rDelay; 15726 15727 if (this._repeat < -1 && totalTime < 0) { 15728 return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force); 15729 } 15730 15731 time = _roundPrecise(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!) 15732 15733 if (tTime === tDur) { 15734 // the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't) 15735 iteration = this._repeat; 15736 time = dur; 15737 } else { 15738 iteration = ~~(tTime / cycleDuration); 15739 15740 if (iteration && iteration === tTime / cycleDuration) { 15741 time = dur; 15742 iteration--; 15743 } 15744 15745 time > dur && (time = dur); 15746 } 15747 15748 prevIteration = _animationCycle(this._tTime, cycleDuration); 15749 !prevTime && this._tTime && prevIteration !== iteration && this._tTime - prevIteration * cycleDuration - this._dur <= 0 && (prevIteration = iteration); // edge case - if someone does addPause() at the very beginning of a repeating timeline, that pause is technically at the same spot as the end which causes this._time to get set to 0 when the totalTime would normally place the playhead at the end. See https://gsap.com/forums/topic/23823-closing-nav-animation-not-working-on-ie-and-iphone-6-maybe-other-older-browser/?tab=comments#comment-113005 also, this._tTime - prevIteration * cycleDuration - this._dur <= 0 just checks to make sure it wasn't previously in the "repeatDelay" portion 15750 15751 if (yoyo && iteration & 1) { 15752 time = dur - time; 15753 isYoyo = 1; 15754 } 15755 /* 15756 make sure children at the end/beginning of the timeline are rendered properly. If, for example, 15757 a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which 15758 would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there 15759 could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So 15760 we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must 15761 ensure that zero-duration tweens at the very beginning or end of the Timeline work. 15762 */ 15763 15764 15765 if (iteration !== prevIteration && !this._lock) { 15766 var rewinding = yoyo && prevIteration & 1, 15767 doesWrap = rewinding === (yoyo && iteration & 1); 15768 iteration < prevIteration && (rewinding = !rewinding); 15769 prevTime = rewinding ? 0 : tTime % dur ? dur : tTime; // if the playhead is landing exactly at the end of an iteration, use that totalTime rather than only the duration, otherwise it'll skip the 2nd render since it's effectively at the same time. 15770 15771 this._lock = 1; 15772 this.render(prevTime || (isYoyo ? 0 : _roundPrecise(iteration * cycleDuration)), suppressEvents, !dur)._lock = 0; 15773 this._tTime = tTime; // if a user gets the iteration() inside the onRepeat, for example, it should be accurate. 15774 15775 !suppressEvents && this.parent && _callback(this, "onRepeat"); 15776 this.vars.repeatRefresh && !isYoyo && (this.invalidate()._lock = 1); 15777 15778 if (prevTime && prevTime !== this._time || prevPaused !== !this._ts || this.vars.onRepeat && !this.parent && !this._act) { 15779 // if prevTime is 0 and we render at the very end, _time will be the end, thus won't match. So in this edge case, prevTime won't match _time but that's okay. If it gets killed in the onRepeat, eject as well. 15780 return this; 15781 } 15782 15783 dur = this._dur; // in case the duration changed in the onRepeat 15784 15785 tDur = this._tDur; 15786 15787 if (doesWrap) { 15788 this._lock = 2; 15789 prevTime = rewinding ? dur : -0.0001; 15790 this.render(prevTime, true); 15791 this.vars.repeatRefresh && !isYoyo && this.invalidate(); 15792 } 15793 15794 this._lock = 0; 15795 15796 if (!this._ts && !prevPaused) { 15797 return this; 15798 } //in order for yoyoEase to work properly when there's a stagger, we must swap out the ease in each sub-tween. 15799 15800 15801 _propagateYoyoEase(this, isYoyo); 15802 } 15803 } 15804 15805 if (this._hasPause && !this._forcing && this._lock < 2) { 15806 pauseTween = _findNextPauseTween(this, _roundPrecise(prevTime), _roundPrecise(time)); 15807 15808 if (pauseTween) { 15809 tTime -= time - (time = pauseTween._start); 15810 } 15811 } 15812 15813 this._tTime = tTime; 15814 this._time = time; 15815 this._act = !timeScale; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick. 15816 15817 if (!this._initted) { 15818 this._onUpdate = this.vars.onUpdate; 15819 this._initted = 1; 15820 this._zTime = totalTime; 15821 prevTime = 0; // upon init, the playhead should always go forward; someone could invalidate() a completed timeline and then if they restart(), that would make child tweens render in reverse order which could lock in the wrong starting values if they build on each other, like tl.to(obj, {x: 100}).to(obj, {x: 0}). 15822 } 15823 15824 if (!prevTime && time && !suppressEvents && !iteration) { 15825 _callback(this, "onStart"); 15826 15827 if (this._tTime !== tTime) { 15828 // in case the onStart triggered a render at a different spot, eject. Like if someone did animation.pause(0.5) or something inside the onStart. 15829 return this; 15830 } 15831 } 15832 15833 if (time >= prevTime && totalTime >= 0) { 15834 child = this._first; 15835 15836 while (child) { 15837 next = child._next; 15838 15839 if ((child._act || time >= child._start) && child._ts && pauseTween !== child) { 15840 if (child.parent !== this) { 15841 // an extreme edge case - the child's render could do something like kill() the "next" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe. 15842 return this.render(totalTime, suppressEvents, force); 15843 } 15844 15845 child.render(child._ts > 0 ? (time - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (time - child._start) * child._ts, suppressEvents, force); 15846 15847 if (time !== this._time || !this._ts && !prevPaused) { 15848 //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 15849 pauseTween = 0; 15850 next && (tTime += this._zTime = -_tinyNum); // it didn't finish rendering, so flag zTime as negative so that so that the next time render() is called it'll be forced (to render any remaining children) 15851 15852 break; 15853 } 15854 } 15855 15856 child = next; 15857 } 15858 } else { 15859 child = this._last; 15860 var adjustedTime = totalTime < 0 ? totalTime : time; //when the playhead goes backward beyond the start of this timeline, we must pass that information down to the child animations so that zero-duration tweens know whether to render their starting or ending values. 15861 15862 while (child) { 15863 next = child._prev; 15864 15865 if ((child._act || adjustedTime <= child._end) && child._ts && pauseTween !== child) { 15866 if (child.parent !== this) { 15867 // an extreme edge case - the child's render could do something like kill() the "next" one in the linked list, or reparent it. In that case we must re-initiate the whole render to be safe. 15868 return this.render(totalTime, suppressEvents, force); 15869 } 15870 15871 child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force || _reverting && (child._initted || child._startAt)); // if reverting, we should always force renders of initted tweens (but remember that .fromTo() or .from() may have a _startAt but not _initted yet). If, for example, a .fromTo() tween with a stagger (which creates an internal timeline) gets reverted BEFORE some of its child tweens render for the first time, it may not properly trigger them to revert. 15872 15873 if (time !== this._time || !this._ts && !prevPaused) { 15874 //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 15875 pauseTween = 0; 15876 next && (tTime += this._zTime = adjustedTime ? -_tinyNum : _tinyNum); // it didn't finish rendering, so adjust zTime so that so that the next time render() is called it'll be forced (to render any remaining children) 15877 15878 break; 15879 } 15880 } 15881 15882 child = next; 15883 } 15884 } 15885 15886 if (pauseTween && !suppressEvents) { 15887 this.pause(); 15888 pauseTween.render(time >= prevTime ? 0 : -_tinyNum)._zTime = time >= prevTime ? 1 : -1; 15889 15890 if (this._ts) { 15891 //the callback resumed playback! So since we may have held back the playhead due to where the pause is positioned, go ahead and jump to where it's SUPPOSED to be (if no pause happened). 15892 this._start = prevStart; //if the pause was at an earlier time and the user resumed in the callback, it could reposition the timeline (changing its startTime), throwing things off slightly, so we make sure the _start doesn't shift. 15893 15894 _setEnd(this); 15895 15896 return this.render(totalTime, suppressEvents, force); 15897 } 15898 } 15899 15900 this._onUpdate && !suppressEvents && _callback(this, "onUpdate", true); 15901 if (tTime === tDur && this._tTime >= this.totalDuration() || !tTime && prevTime) if (prevStart === this._start || Math.abs(timeScale) !== Math.abs(this._ts)) if (!this._lock) { 15902 // remember, a child's callback may alter this timeline's playhead or timeScale which is why we need to add some of these checks. 15903 (totalTime || !dur) && (tTime === tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative. 15904 15905 if (!suppressEvents && !(totalTime < 0 && !prevTime) && (tTime || prevTime || !tDur)) { 15906 _callback(this, tTime === tDur && totalTime >= 0 ? "onComplete" : "onReverseComplete", true); 15907 15908 this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom(); 15909 } 15910 } 15911 } 15912 15913 return this; 15914 }; 15915 15916 _proto2.add = function add(child, position) { 15917 var _this2 = this; 15918 15919 _isNumber(position) || (position = _parsePosition(this, position, child)); 15920 15921 if (!(child instanceof Animation)) { 15922 if (_isArray(child)) { 15923 child.forEach(function (obj) { 15924 return _this2.add(obj, position); 15925 }); 15926 return this; 15927 } 15928 15929 if (_isString(child)) { 15930 return this.addLabel(child, position); 15931 } 15932 15933 if (_isFunction(child)) { 15934 child = Tween.delayedCall(0, child); 15935 } else { 15936 return this; 15937 } 15938 } 15939 15940 return this !== child ? _addToTimeline(this, child, position) : this; //don't allow a timeline to be added to itself as a child! 15941 }; 15942 15943 _proto2.getChildren = function getChildren(nested, tweens, timelines, ignoreBeforeTime) { 15944 if (nested === void 0) { 15945 nested = true; 15946 } 15947 15948 if (tweens === void 0) { 15949 tweens = true; 15950 } 15951 15952 if (timelines === void 0) { 15953 timelines = true; 15954 } 15955 15956 if (ignoreBeforeTime === void 0) { 15957 ignoreBeforeTime = -_bigNum; 15958 } 15959 15960 var a = [], 15961 child = this._first; 15962 15963 while (child) { 15964 if (child._start >= ignoreBeforeTime) { 15965 if (child instanceof Tween) { 15966 tweens && a.push(child); 15967 } else { 15968 timelines && a.push(child); 15969 nested && a.push.apply(a, child.getChildren(true, tweens, timelines)); 15970 } 15971 } 15972 15973 child = child._next; 15974 } 15975 15976 return a; 15977 }; 15978 15979 _proto2.getById = function getById(id) { 15980 var animations = this.getChildren(1, 1, 1), 15981 i = animations.length; 15982 15983 while (i--) { 15984 if (animations[i].vars.id === id) { 15985 return animations[i]; 15986 } 15987 } 15988 }; 15989 15990 _proto2.remove = function remove(child) { 15991 if (_isString(child)) { 15992 return this.removeLabel(child); 15993 } 15994 15995 if (_isFunction(child)) { 15996 return this.killTweensOf(child); 15997 } 15998 15999 _removeLinkedListItem(this, child); 16000 16001 if (child === this._recent) { 16002 this._recent = this._last; 16003 } 16004 16005 return _uncache(this); 16006 }; 16007 16008 _proto2.totalTime = function totalTime(_totalTime2, suppressEvents) { 16009 if (!arguments.length) { 16010 return this._tTime; 16011 } 16012 16013 this._forcing = 1; 16014 16015 if (!this._dp && this._ts) { 16016 //special case for the global timeline (or any other that has no parent or detached parent). 16017 this._start = _roundPrecise(_ticker.time - (this._ts > 0 ? _totalTime2 / this._ts : (this.totalDuration() - _totalTime2) / -this._ts)); 16018 } 16019 16020 _Animation.prototype.totalTime.call(this, _totalTime2, suppressEvents); 16021 16022 this._forcing = 0; 16023 return this; 16024 }; 16025 16026 _proto2.addLabel = function addLabel(label, position) { 16027 this.labels[label] = _parsePosition(this, position); 16028 return this; 16029 }; 16030 16031 _proto2.removeLabel = function removeLabel(label) { 16032 delete this.labels[label]; 16033 return this; 16034 }; 16035 16036 _proto2.addPause = function addPause(position, callback, params) { 16037 var t = Tween.delayedCall(0, callback || _emptyFunc, params); 16038 t.data = "isPause"; 16039 this._hasPause = 1; 16040 return _addToTimeline(this, t, _parsePosition(this, position)); 16041 }; 16042 16043 _proto2.removePause = function removePause(position) { 16044 var child = this._first; 16045 position = _parsePosition(this, position); 16046 16047 while (child) { 16048 if (child._start === position && child.data === "isPause") { 16049 _removeFromParent(child); 16050 } 16051 16052 child = child._next; 16053 } 16054 }; 16055 16056 _proto2.killTweensOf = function killTweensOf(targets, props, onlyActive) { 16057 var tweens = this.getTweensOf(targets, onlyActive), 16058 i = tweens.length; 16059 16060 while (i--) { 16061 _overwritingTween !== tweens[i] && tweens[i].kill(targets, props); 16062 } 16063 16064 return this; 16065 }; 16066 16067 _proto2.getTweensOf = function getTweensOf(targets, onlyActive) { 16068 var a = [], 16069 parsedTargets = toArray(targets), 16070 child = this._first, 16071 isGlobalTime = _isNumber(onlyActive), 16072 // a number is interpreted as a global time. If the animation spans 16073 children; 16074 16075 while (child) { 16076 if (child instanceof Tween) { 16077 if (_arrayContainsAny(child._targets, parsedTargets) && (isGlobalTime ? (!_overwritingTween || child._initted && child._ts) && child.globalTime(0) <= onlyActive && child.globalTime(child.totalDuration()) > onlyActive : !onlyActive || child.isActive())) { 16078 // note: if this is for overwriting, it should only be for tweens that aren't paused and are initted. 16079 a.push(child); 16080 } 16081 } else if ((children = child.getTweensOf(parsedTargets, onlyActive)).length) { 16082 a.push.apply(a, children); 16083 } 16084 16085 child = child._next; 16086 } 16087 16088 return a; 16089 } // potential future feature - targets() on timelines 16090 // targets() { 16091 // let result = []; 16092 // this.getChildren(true, true, false).forEach(t => result.push(...t.targets())); 16093 // return result.filter((v, i) => result.indexOf(v) === i); 16094 // } 16095 ; 16096 16097 _proto2.tweenTo = function tweenTo(position, vars) { 16098 vars = vars || {}; 16099 16100 var tl = this, 16101 endTime = _parsePosition(tl, position), 16102 _vars = vars, 16103 startAt = _vars.startAt, 16104 _onStart = _vars.onStart, 16105 onStartParams = _vars.onStartParams, 16106 immediateRender = _vars.immediateRender, 16107 initted, 16108 tween = Tween.to(tl, _setDefaults({ 16109 ease: vars.ease || "none", 16110 lazy: false, 16111 immediateRender: false, 16112 time: endTime, 16113 overwrite: "auto", 16114 duration: vars.duration || Math.abs((endTime - (startAt && "time" in startAt ? startAt.time : tl._time)) / tl.timeScale()) || _tinyNum, 16115 onStart: function onStart() { 16116 tl.pause(); 16117 16118 if (!initted) { 16119 var duration = vars.duration || Math.abs((endTime - (startAt && "time" in startAt ? startAt.time : tl._time)) / tl.timeScale()); 16120 tween._dur !== duration && _setDuration(tween, duration, 0, 1).render(tween._time, true, true); 16121 initted = 1; 16122 } 16123 16124 _onStart && _onStart.apply(tween, onStartParams || []); //in case the user had an onStart in the vars - we don't want to overwrite it. 16125 } 16126 }, vars)); 16127 16128 return immediateRender ? tween.render(0) : tween; 16129 }; 16130 16131 _proto2.tweenFromTo = function tweenFromTo(fromPosition, toPosition, vars) { 16132 return this.tweenTo(toPosition, _setDefaults({ 16133 startAt: { 16134 time: _parsePosition(this, fromPosition) 16135 } 16136 }, vars)); 16137 }; 16138 16139 _proto2.recent = function recent() { 16140 return this._recent; 16141 }; 16142 16143 _proto2.nextLabel = function nextLabel(afterTime) { 16144 if (afterTime === void 0) { 16145 afterTime = this._time; 16146 } 16147 16148 return _getLabelInDirection(this, _parsePosition(this, afterTime)); 16149 }; 16150 16151 _proto2.previousLabel = function previousLabel(beforeTime) { 16152 if (beforeTime === void 0) { 16153 beforeTime = this._time; 16154 } 16155 16156 return _getLabelInDirection(this, _parsePosition(this, beforeTime), 1); 16157 }; 16158 16159 _proto2.currentLabel = function currentLabel(value) { 16160 return arguments.length ? this.seek(value, true) : this.previousLabel(this._time + _tinyNum); 16161 }; 16162 16163 _proto2.shiftChildren = function shiftChildren(amount, adjustLabels, ignoreBeforeTime) { 16164 if (ignoreBeforeTime === void 0) { 16165 ignoreBeforeTime = 0; 16166 } 16167 16168 var child = this._first, 16169 labels = this.labels, 16170 p; 16171 16172 while (child) { 16173 if (child._start >= ignoreBeforeTime) { 16174 child._start += amount; 16175 child._end += amount; 16176 } 16177 16178 child = child._next; 16179 } 16180 16181 if (adjustLabels) { 16182 for (p in labels) { 16183 if (labels[p] >= ignoreBeforeTime) { 16184 labels[p] += amount; 16185 } 16186 } 16187 } 16188 16189 return _uncache(this); 16190 }; 16191 16192 _proto2.invalidate = function invalidate(soft) { 16193 var child = this._first; 16194 this._lock = 0; 16195 16196 while (child) { 16197 child.invalidate(soft); 16198 child = child._next; 16199 } 16200 16201 return _Animation.prototype.invalidate.call(this, soft); 16202 }; 16203 16204 _proto2.clear = function clear(includeLabels) { 16205 if (includeLabels === void 0) { 16206 includeLabels = true; 16207 } 16208 16209 var child = this._first, 16210 next; 16211 16212 while (child) { 16213 next = child._next; 16214 this.remove(child); 16215 child = next; 16216 } 16217 16218 this._dp && (this._time = this._tTime = this._pTime = 0); 16219 includeLabels && (this.labels = {}); 16220 return _uncache(this); 16221 }; 16222 16223 _proto2.totalDuration = function totalDuration(value) { 16224 var max = 0, 16225 self = this, 16226 child = self._last, 16227 prevStart = _bigNum, 16228 prev, 16229 start, 16230 parent; 16231 16232 if (arguments.length) { 16233 return self.timeScale((self._repeat < 0 ? self.duration() : self.totalDuration()) / (self.reversed() ? -value : value)); 16234 } 16235 16236 if (self._dirty) { 16237 parent = self.parent; 16238 16239 while (child) { 16240 prev = child._prev; //record it here in case the tween changes position in the sequence... 16241 16242 child._dirty && child.totalDuration(); //could change the tween._startTime, so make sure the animation's cache is clean before analyzing it. 16243 16244 start = child._start; 16245 16246 if (start > prevStart && self._sort && child._ts && !self._lock) { 16247 //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence 16248 self._lock = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(). 16249 16250 _addToTimeline(self, child, start - child._delay, 1)._lock = 0; 16251 } else { 16252 prevStart = start; 16253 } 16254 16255 if (start < 0 && child._ts) { 16256 //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found. 16257 max -= start; 16258 16259 if (!parent && !self._dp || parent && parent.smoothChildTiming) { 16260 self._start += start / self._ts; 16261 self._time -= start; 16262 self._tTime -= start; 16263 } 16264 16265 self.shiftChildren(-start, false, -1e999); 16266 prevStart = 0; 16267 } 16268 16269 child._end > max && child._ts && (max = child._end); 16270 child = prev; 16271 } 16272 16273 _setDuration(self, self === _globalTimeline && self._time > max ? self._time : max, 1, 1); 16274 16275 self._dirty = 0; 16276 } 16277 16278 return self._tDur; 16279 }; 16280 16281 Timeline.updateRoot = function updateRoot(time) { 16282 if (_globalTimeline._ts) { 16283 _lazySafeRender(_globalTimeline, _parentToChildTotalTime(time, _globalTimeline)); 16284 16285 _lastRenderedFrame = _ticker.frame; 16286 } 16287 16288 if (_ticker.frame >= _nextGCFrame) { 16289 _nextGCFrame += _config.autoSleep || 120; 16290 var child = _globalTimeline._first; 16291 if (!child || !child._ts) if (_config.autoSleep && _ticker._listeners.length < 2) { 16292 while (child && !child._ts) { 16293 child = child._next; 16294 } 16295 16296 child || _ticker.sleep(); 16297 } 16298 } 16299 }; 16300 16301 return Timeline; 16302}(Animation); 16303 16304_setDefaults(Timeline.prototype, { 16305 _lock: 0, 16306 _hasPause: 0, 16307 _forcing: 0 16308}); 16309 16310var _addComplexStringPropTween = function _addComplexStringPropTween(target, prop, start, end, setter, stringFilter, funcParam) { 16311 //note: we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin. 16312 var pt = new PropTween(this._pt, target, prop, 0, 1, _renderComplexString, null, setter), 16313 index = 0, 16314 matchIndex = 0, 16315 result, 16316 startNums, 16317 color, 16318 endNum, 16319 chunk, 16320 startNum, 16321 hasRandom, 16322 a; 16323 pt.b = start; 16324 pt.e = end; 16325 start += ""; //ensure values are strings 16326 16327 end += ""; 16328 16329 if (hasRandom = ~end.indexOf("random(")) { 16330 end = _replaceRandom(end); 16331 } 16332 16333 if (stringFilter) { 16334 a = [start, end]; 16335 stringFilter(a, target, prop); //pass an array with the starting and ending values and let the filter do whatever it needs to the values. 16336 16337 start = a[0]; 16338 end = a[1]; 16339 } 16340 16341 startNums = start.match(_complexStringNumExp) || []; 16342 16343 while (result = _complexStringNumExp.exec(end)) { 16344 endNum = result[0]; 16345 chunk = end.substring(index, result.index); 16346 16347 if (color) { 16348 color = (color + 1) % 5; 16349 } else if (chunk.substr(-5) === "rgba(") { 16350 color = 1; 16351 } 16352 16353 if (endNum !== startNums[matchIndex++]) { 16354 startNum = parseFloat(startNums[matchIndex - 1]) || 0; //these nested PropTweens are handled in a special way - we'll never actually call a render or setter method on them. We'll just loop through them in the parent complex string PropTween's render method. 16355 16356 pt._pt = { 16357 _next: pt._pt, 16358 p: chunk || matchIndex === 1 ? chunk : ",", 16359 //note: SVG spec allows omission of comma/space when a negative sign is wedged between two numbers, like 2.5-5.3 instead of 2.5,-5.3 but when tweening, the negative value may switch to positive, so we insert the comma just in case. 16360 s: startNum, 16361 c: endNum.charAt(1) === "=" ? _parseRelative(startNum, endNum) - startNum : parseFloat(endNum) - startNum, 16362 m: color && color < 4 ? Math.round : 0 16363 }; 16364 index = _complexStringNumExp.lastIndex; 16365 } 16366 } 16367 16368 pt.c = index < end.length ? end.substring(index, end.length) : ""; //we use the "c" of the PropTween to store the final part of the string (after the last number) 16369 16370 pt.fp = funcParam; 16371 16372 if (_relExp.test(end) || hasRandom) { 16373 pt.e = 0; //if the end string contains relative values or dynamic random(...) values, delete the end it so that on the final render we don't actually set it to the string with += or -= characters (forces it to use the calculated value). 16374 } 16375 16376 this._pt = pt; //start the linked list with this new PropTween. Remember, we call _addComplexStringPropTween.call(tweenInstance...) to ensure that it's scoped properly. We may call it from within a plugin too, thus "this" would refer to the plugin. 16377 16378 return pt; 16379}, 16380 _addPropTween = function _addPropTween(target, prop, start, end, index, targets, modifier, stringFilter, funcParam, optional) { 16381 _isFunction(end) && (end = end(index || 0, target, targets)); 16382 var currentValue = target[prop], 16383 parsedStart = start !== "get" ? start : !_isFunction(currentValue) ? currentValue : funcParam ? target[prop.indexOf("set") || !_isFunction(target["get" + prop.substr(3)]) ? prop : "get" + prop.substr(3)](funcParam) : target[prop](), 16384 setter = !_isFunction(currentValue) ? _setterPlain : funcParam ? _setterFuncWithParam : _setterFunc, 16385 pt; 16386 16387 if (_isString(end)) { 16388 if (~end.indexOf("random(")) { 16389 end = _replaceRandom(end); 16390 } 16391 16392 if (end.charAt(1) === "=") { 16393 pt = _parseRelative(parsedStart, end) + (getUnit(parsedStart) || 0); 16394 16395 if (pt || pt === 0) { 16396 // to avoid isNaN, like if someone passes in a value like "!= whatever" 16397 end = pt; 16398 } 16399 } 16400 } 16401 16402 if (!optional || parsedStart !== end || _forceAllPropTweens) { 16403 if (!isNaN(parsedStart * end) && end !== "") { 16404 // fun fact: any number multiplied by "" is evaluated as the number 0! 16405 pt = new PropTween(this._pt, target, prop, +parsedStart || 0, end - (parsedStart || 0), typeof currentValue === "boolean" ? _renderBoolean : _renderPlain, 0, setter); 16406 funcParam && (pt.fp = funcParam); 16407 modifier && pt.modifier(modifier, this, target); 16408 return this._pt = pt; 16409 } 16410 16411 !currentValue && !(prop in target) && _missingPlugin(prop, end); 16412 return _addComplexStringPropTween.call(this, target, prop, parsedStart, end, setter, stringFilter || _config.stringFilter, funcParam); 16413 } 16414}, 16415 //creates a copy of the vars object and processes any function-based values (putting the resulting values directly into the copy) as well as strings with "random()" in them. It does NOT process relative values. 16416_processVars = function _processVars(vars, index, target, targets, tween) { 16417 _isFunction(vars) && (vars = _parseFuncOrString(vars, tween, index, target, targets)); 16418 16419 if (!_isObject(vars) || vars.style && vars.nodeType || _isArray(vars) || _isTypedArray(vars)) { 16420 return _isString(vars) ? _parseFuncOrString(vars, tween, index, target, targets) : vars; 16421 } 16422 16423 var copy = {}, 16424 p; 16425 16426 for (p in vars) { 16427 copy[p] = _parseFuncOrString(vars[p], tween, index, target, targets); 16428 } 16429 16430 return copy; 16431}, 16432 _checkPlugin = function _checkPlugin(property, vars, tween, index, target, targets) { 16433 var plugin, pt, ptLookup, i; 16434 16435 if (_plugins[property] && (plugin = new _plugins[property]()).init(target, plugin.rawVars ? vars[property] : _processVars(vars[property], index, target, targets, tween), tween, index, targets) !== false) { 16436 tween._pt = pt = new PropTween(tween._pt, target, property, 0, 1, plugin.render, plugin, 0, plugin.priority); 16437 16438 if (tween !== _quickTween) { 16439 ptLookup = tween._ptLookup[tween._targets.indexOf(target)]; //note: we can't use tween._ptLookup[index] because for staggered tweens, the index from the fullTargets array won't match what it is in each individual tween that spawns from the stagger. 16440 16441 i = plugin._props.length; 16442 16443 while (i--) { 16444 ptLookup[plugin._props[i]] = pt; 16445 } 16446 } 16447 } 16448 16449 return plugin; 16450}, 16451 _overwritingTween, 16452 //store a reference temporarily so we can avoid overwriting itself. 16453_forceAllPropTweens, 16454 _initTween = function _initTween(tween, time, tTime) { 16455 var vars = tween.vars, 16456 ease = vars.ease, 16457 startAt = vars.startAt, 16458 immediateRender = vars.immediateRender, 16459 lazy = vars.lazy, 16460 onUpdate = vars.onUpdate, 16461 runBackwards = vars.runBackwards, 16462 yoyoEase = vars.yoyoEase, 16463 keyframes = vars.keyframes, 16464 autoRevert = vars.autoRevert, 16465 dur = tween._dur, 16466 prevStartAt = tween._startAt, 16467 targets = tween._targets, 16468 parent = tween.parent, 16469 fullTargets = parent && parent.data === "nested" ? parent.vars.targets : targets, 16470 autoOverwrite = tween._overwrite === "auto" && !_suppressOverwrites, 16471 tl = tween.timeline, 16472 cleanVars, 16473 i, 16474 p, 16475 pt, 16476 target, 16477 hasPriority, 16478 gsData, 16479 harness, 16480 plugin, 16481 ptLookup, 16482 index, 16483 harnessVars, 16484 overwritten; 16485 tl && (!keyframes || !ease) && (ease = "none"); 16486 tween._ease = _parseEase(ease, _defaults.ease); 16487 tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0; 16488 16489 if (yoyoEase && tween._yoyo && !tween._repeat) { 16490 //there must have been a parent timeline with yoyo:true that is currently in its yoyo phase, so flip the eases. 16491 yoyoEase = tween._yEase; 16492 tween._yEase = tween._ease; 16493 tween._ease = yoyoEase; 16494 } 16495 16496 tween._from = !tl && !!vars.runBackwards; //nested timelines should never run backwards - the backwards-ness is in the child tweens. 16497 16498 if (!tl || keyframes && !vars.stagger) { 16499 //if there's an internal timeline, skip all the parsing because we passed that task down the chain. 16500 harness = targets[0] ? _getCache(targets[0]).harness : 0; 16501 harnessVars = harness && vars[harness.prop]; //someone may need to specify CSS-specific values AND non-CSS values, like if the element has an "x" property plus it's a standard DOM element. We allow people to distinguish by wrapping plugin-specific stuff in a css:{} object for example. 16502 16503 cleanVars = _copyExcluding(vars, _reservedProps); 16504 16505 if (prevStartAt) { 16506 prevStartAt._zTime < 0 && prevStartAt.progress(1); // in case it's a lazy startAt that hasn't rendered yet. 16507 16508 time < 0 && runBackwards && immediateRender && !autoRevert ? prevStartAt.render(-1, true) : prevStartAt.revert(runBackwards && dur ? _revertConfigNoKill : _startAtRevertConfig); // if it's a "startAt" (not "from()" or runBackwards: true), we only need to do a shallow revert (keep transforms cached in CSSPlugin) 16509 // don't just _removeFromParent(prevStartAt.render(-1, true)) because that'll leave inline styles. We're creating a new _startAt for "startAt" tweens that re-capture things to ensure that if the pre-tween values changed since the tween was created, they're recorded. 16510 16511 prevStartAt._lazy = 0; 16512 } 16513 16514 if (startAt) { 16515 _removeFromParent(tween._startAt = Tween.set(targets, _setDefaults({ 16516 data: "isStart", 16517 overwrite: false, 16518 parent: parent, 16519 immediateRender: true, 16520 lazy: !prevStartAt && _isNotFalse(lazy), 16521 startAt: null, 16522 delay: 0, 16523 onUpdate: onUpdate && function () { 16524 return _callback(tween, "onUpdate"); 16525 }, 16526 stagger: 0 16527 }, startAt))); //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, from, to).fromTo(e, to, from); 16528 16529 16530 tween._startAt._dp = 0; // don't allow it to get put back into root timeline! Like when revert() is called and totalTime() gets set. 16531 16532 tween._startAt._sat = tween; // used in globalTime(). _sat stands for _startAtTween 16533 16534 time < 0 && (_reverting || !immediateRender && !autoRevert) && tween._startAt.revert(_revertConfigNoKill); // rare edge case, like if a render is forced in the negative direction of a non-initted tween. 16535 16536 if (immediateRender) { 16537 if (dur && time <= 0 && tTime <= 0) { 16538 // check tTime here because in the case of a yoyo tween whose playhead gets pushed to the end like tween.progress(1), we should allow it through so that the onComplete gets fired properly. 16539 time && (tween._zTime = time); 16540 return; //we skip initialization here so that overwriting doesn't occur until the tween actually begins. Otherwise, if you create several immediateRender:true tweens of the same target/properties to drop into a Timeline, the last one created would overwrite the first ones because they didn't get placed into the timeline yet before the first render occurs and kicks in overwriting. 16541 } 16542 } 16543 } else if (runBackwards && dur) { 16544 //from() tweens must be handled uniquely: their beginning values must be rendered but we don't want overwriting to occur yet (when time is still 0). Wait until the tween actually begins before doing all the routines like overwriting. At that time, we should render at the END of the tween to ensure that things initialize correctly (remember, from() tweens go backwards) 16545 if (!prevStartAt) { 16546 time && (immediateRender = false); //in rare cases (like if a from() tween runs and then is invalidate()-ed), immediateRender could be true but the initial forced-render gets skipped, so there's no need to force the render in this context when the _time is greater than 0 16547 16548 p = _setDefaults({ 16549 overwrite: false, 16550 data: "isFromStart", 16551 //we tag the tween with as "isFromStart" so that if [inside a plugin] we need to only do something at the very END of a tween, we have a way of identifying this tween as merely the one that's setting the beginning values for a "from()" tween. For example, clearProps in CSSPlugin should only get applied at the very END of a tween and without this tag, from(...{height:100, clearProps:"height", delay:1}) would wipe the height at the beginning of the tween and after 1 second, it'd kick back in. 16552 lazy: immediateRender && !prevStartAt && _isNotFalse(lazy), 16553 immediateRender: immediateRender, 16554 //zero-duration tweens render immediately by default, but if we're not specifically instructed to render this tween immediately, we should skip this and merely _init() to record the starting values (rendering them immediately would push them to completion which is wasteful in that case - we'd have to render(-1) immediately after) 16555 stagger: 0, 16556 parent: parent //ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5}) 16557 16558 }, cleanVars); 16559 harnessVars && (p[harness.prop] = harnessVars); // in case someone does something like .from(..., {css:{}}) 16560 16561 _removeFromParent(tween._startAt = Tween.set(targets, p)); 16562 16563 tween._startAt._dp = 0; // don't allow it to get put back into root timeline! 16564 16565 tween._startAt._sat = tween; // used in globalTime() 16566 16567 time < 0 && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween._startAt.render(-1, true)); 16568 tween._zTime = time; 16569 16570 if (!immediateRender) { 16571 _initTween(tween._startAt, _tinyNum, _tinyNum); //ensures that the initial values are recorded 16572 16573 } else if (!time) { 16574 return; 16575 } 16576 } 16577 } 16578 16579 tween._pt = tween._ptCache = 0; 16580 lazy = dur && _isNotFalse(lazy) || lazy && !dur; 16581 16582 for (i = 0; i < targets.length; i++) { 16583 target = targets[i]; 16584 gsData = target._gsap || _harness(targets)[i]._gsap; 16585 tween._ptLookup[i] = ptLookup = {}; 16586 _lazyLookup[gsData.id] && _lazyTweens.length && _lazyRender(); //if other tweens of the same target have recently initted but haven't rendered yet, we've got to force the render so that the starting values are correct (imagine populating a timeline with a bunch of sequential tweens and then jumping to the end) 16587 16588 index = fullTargets === targets ? i : fullTargets.indexOf(target); 16589 16590 if (harness && (plugin = new harness()).init(target, harnessVars || cleanVars, tween, index, fullTargets) !== false) { 16591 tween._pt = pt = new PropTween(tween._pt, target, plugin.name, 0, 1, plugin.render, plugin, 0, plugin.priority); 16592 16593 plugin._props.forEach(function (name) { 16594 ptLookup[name] = pt; 16595 }); 16596 16597 plugin.priority && (hasPriority = 1); 16598 } 16599 16600 if (!harness || harnessVars) { 16601 for (p in cleanVars) { 16602 if (_plugins[p] && (plugin = _checkPlugin(p, cleanVars, tween, index, target, fullTargets))) { 16603 plugin.priority && (hasPriority = 1); 16604 } else { 16605 ptLookup[p] = pt = _addPropTween.call(tween, target, p, "get", cleanVars[p], index, fullTargets, 0, vars.stringFilter); 16606 } 16607 } 16608 } 16609 16610 tween._op && tween._op[i] && tween.kill(target, tween._op[i]); 16611 16612 if (autoOverwrite && tween._pt) { 16613 _overwritingTween = tween; 16614 16615 _globalTimeline.killTweensOf(target, ptLookup, tween.globalTime(time)); // make sure the overwriting doesn't overwrite THIS tween!!! 16616 16617 16618 overwritten = !tween.parent; 16619 _overwritingTween = 0; 16620 } 16621 16622 tween._pt && lazy && (_lazyLookup[gsData.id] = 1); 16623 } 16624 16625 hasPriority && _sortPropTweensByPriority(tween); 16626 tween._onInit && tween._onInit(tween); //plugins like RoundProps must wait until ALL of the PropTweens are instantiated. In the plugin's init() function, it sets the _onInit on the tween instance. May not be pretty/intuitive, but it's fast and keeps file size down. 16627 } 16628 16629 tween._onUpdate = onUpdate; 16630 tween._initted = (!tween._op || tween._pt) && !overwritten; // if overwrittenProps resulted in the entire tween being killed, do NOT flag it as initted or else it may render for one tick. 16631 16632 keyframes && time <= 0 && tl.render(_bigNum, true, true); // if there's a 0% keyframe, it'll render in the "before" state for any staggered/delayed animations thus when the following tween initializes, it'll use the "before" state instead of the "after" state as the initial values. 16633}, 16634 _updatePropTweens = function _updatePropTweens(tween, property, value, start, startIsRelative, ratio, time, skipRecursion) { 16635 var ptCache = (tween._pt && tween._ptCache || (tween._ptCache = {}))[property], 16636 pt, 16637 rootPT, 16638 lookup, 16639 i; 16640 16641 if (!ptCache) { 16642 ptCache = tween._ptCache[property] = []; 16643 lookup = tween._ptLookup; 16644 i = tween._targets.length; 16645 16646 while (i--) { 16647 pt = lookup[i][property]; 16648 16649 if (pt && pt.d && pt.d._pt) { 16650 // it's a plugin, so find the nested PropTween 16651 pt = pt.d._pt; 16652 16653 while (pt && pt.p !== property && pt.fp !== property) { 16654 // "fp" is functionParam for things like setting CSS variables which require .setProperty("--var-name", value) 16655 pt = pt._next; 16656 } 16657 } 16658 16659 if (!pt) { 16660 // there is no PropTween associated with that property, so we must FORCE one to be created and ditch out of this 16661 // if the tween has other properties that already rendered at new positions, we'd normally have to rewind to put them back like tween.render(0, true) before forcing an _initTween(), but that can create another edge case like tweening a timeline's progress would trigger onUpdates to fire which could move other things around. It's better to just inform users that .resetTo() should ONLY be used for tweens that already have that property. For example, you can't gsap.to(...{ y: 0 }) and then tween.restTo("x", 200) for example. 16662 _forceAllPropTweens = 1; // otherwise, when we _addPropTween() and it finds no change between the start and end values, it skips creating a PropTween (for efficiency...why tween when there's no difference?) but in this case we NEED that PropTween created so we can edit it. 16663 16664 tween.vars[property] = "+=0"; 16665 16666 _initTween(tween, time); 16667 16668 _forceAllPropTweens = 0; 16669 return skipRecursion ? _warn(property + " not eligible for reset") : 1; // if someone tries to do a quickTo() on a special property like borderRadius which must get split into 4 different properties, that's not eligible for .resetTo(). 16670 } 16671 16672 ptCache.push(pt); 16673 } 16674 } 16675 16676 i = ptCache.length; 16677 16678 while (i--) { 16679 rootPT = ptCache[i]; 16680 pt = rootPT._pt || rootPT; // complex values may have nested PropTweens. We only accommodate the FIRST value. 16681 16682 pt.s = (start || start === 0) && !startIsRelative ? start : pt.s + (start || 0) + ratio * pt.c; 16683 pt.c = value - pt.s; 16684 rootPT.e && (rootPT.e = _round(value) + getUnit(rootPT.e)); // mainly for CSSPlugin (end value) 16685 16686 rootPT.b && (rootPT.b = pt.s + getUnit(rootPT.b)); // (beginning value) 16687 } 16688}, 16689 _addAliasesToVars = function _addAliasesToVars(targets, vars) { 16690 var harness = targets[0] ? _getCache(targets[0]).harness : 0, 16691 propertyAliases = harness && harness.aliases, 16692 copy, 16693 p, 16694 i, 16695 aliases; 16696 16697 if (!propertyAliases) { 16698 return vars; 16699 } 16700 16701 copy = _merge({}, vars); 16702 16703 for (p in propertyAliases) { 16704 if (p in copy) { 16705 aliases = propertyAliases[p].split(","); 16706 i = aliases.length; 16707 16708 while (i--) { 16709 copy[aliases[i]] = copy[p]; 16710 } 16711 } 16712 } 16713 16714 return copy; 16715}, 16716 // parses multiple formats, like {"0%": {x: 100}, {"50%": {x: -20}} and { x: {"0%": 100, "50%": -20} }, and an "ease" can be set on any object. We populate an "allProps" object with an Array for each property, like {x: [{}, {}], y:[{}, {}]} with data for each property tween. The objects have a "t" (time), "v", (value), and "e" (ease) property. This allows us to piece together a timeline later. 16717_parseKeyframe = function _parseKeyframe(prop, obj, allProps, easeEach) { 16718 var ease = obj.ease || easeEach || "power1.inOut", 16719 p, 16720 a; 16721 16722 if (_isArray(obj)) { 16723 a = allProps[prop] || (allProps[prop] = []); // t = time (out of 100), v = value, e = ease 16724 16725 obj.forEach(function (value, i) { 16726 return a.push({ 16727 t: i / (obj.length - 1) * 100, 16728 v: value, 16729 e: ease 16730 }); 16731 }); 16732 } else { 16733 for (p in obj) { 16734 a = allProps[p] || (allProps[p] = []); 16735 p === "ease" || a.push({ 16736 t: parseFloat(prop), 16737 v: obj[p], 16738 e: ease 16739 }); 16740 } 16741 } 16742}, 16743 _parseFuncOrString = function _parseFuncOrString(value, tween, i, target, targets) { 16744 return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf("random(") ? _replaceRandom(value) : value; 16745}, 16746 _staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert", 16747 _staggerPropsToSkip = {}; 16748 16749_forEachName(_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger", function (name) { 16750 return _staggerPropsToSkip[name] = 1; 16751}); 16752/* 16753 * -------------------------------------------------------------------------------------- 16754 * TWEEN 16755 * -------------------------------------------------------------------------------------- 16756 */ 16757 16758 16759var Tween = /*#__PURE__*/function (_Animation2) { 16760 _inheritsLoose(Tween, _Animation2); 16761 16762 function Tween(targets, vars, position, skipInherit) { 16763 var _this3; 16764 16765 if (typeof vars === "number") { 16766 position.duration = vars; 16767 vars = position; 16768 position = null; 16769 } 16770 16771 _this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars)) || this; 16772 var _this3$vars = _this3.vars, 16773 duration = _this3$vars.duration, 16774 delay = _this3$vars.delay, 16775 immediateRender = _this3$vars.immediateRender, 16776 stagger = _this3$vars.stagger, 16777 overwrite = _this3$vars.overwrite, 16778 keyframes = _this3$vars.keyframes, 16779 defaults = _this3$vars.defaults, 16780 scrollTrigger = _this3$vars.scrollTrigger, 16781 yoyoEase = _this3$vars.yoyoEase, 16782 parent = vars.parent || _globalTimeline, 16783 parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets), 16784 tl, 16785 i, 16786 copy, 16787 l, 16788 p, 16789 curTarget, 16790 staggerFunc, 16791 staggerVarsToMerge; 16792 _this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn("GSAP target " + targets + " not found. https://gsap.com", !_config.nullTargetWarn) || []; 16793 _this3._ptLookup = []; //PropTween lookup. An array containing an object for each target, having keys for each tweening property 16794 16795 _this3._overwrite = overwrite; 16796 16797 if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) { 16798 vars = _this3.vars; 16799 tl = _this3.timeline = new Timeline({ 16800 data: "nested", 16801 defaults: defaults || {}, 16802 targets: parent && parent.data === "nested" ? parent.vars.targets : parsedTargets 16803 }); // we need to store the targets because for staggers and keyframes, we end up creating an individual tween for each but function-based values need to know the index and the whole Array of targets. 16804 16805 tl.kill(); 16806 tl.parent = tl._dp = _assertThisInitialized(_this3); 16807 tl._start = 0; 16808 16809 if (stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) { 16810 l = parsedTargets.length; 16811 staggerFunc = stagger && distribute(stagger); 16812 16813 if (_isObject(stagger)) { 16814 //users can pass in callbacks like onStart/onComplete in the stagger object. These should fire with each individual tween. 16815 for (p in stagger) { 16816 if (~_staggerTweenProps.indexOf(p)) { 16817 staggerVarsToMerge || (staggerVarsToMerge = {}); 16818 staggerVarsToMerge[p] = stagger[p]; 16819 } 16820 } 16821 } 16822 16823 for (i = 0; i < l; i++) { 16824 copy = _copyExcluding(vars, _staggerPropsToSkip); 16825 copy.stagger = 0; 16826 yoyoEase && (copy.yoyoEase = yoyoEase); 16827 staggerVarsToMerge && _merge(copy, staggerVarsToMerge); 16828 curTarget = parsedTargets[i]; //don't just copy duration or delay because if they're a string or function, we'd end up in an infinite loop because _isFuncOrString() would evaluate as true in the child tweens, entering this loop, etc. So we parse the value straight from vars and default to 0. 16829 16830 copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets); 16831 copy.delay = (+_parseFuncOrString(delay, _assertThisInitialized(_this3), i, curTarget, parsedTargets) || 0) - _this3._delay; 16832 16833 if (!stagger && l === 1 && copy.delay) { 16834 // if someone does delay:"random(1, 5)", repeat:-1, for example, the delay shouldn't be inside the repeat. 16835 _this3._delay = delay = copy.delay; 16836 _this3._start += delay; 16837 copy.delay = 0; 16838 } 16839 16840 tl.to(curTarget, copy, staggerFunc ? staggerFunc(i, curTarget, parsedTargets) : 0); 16841 tl._ease = _easeMap.none; 16842 } 16843 16844 tl.duration() ? duration = delay = 0 : _this3.timeline = 0; // if the timeline's duration is 0, we don't need a timeline internally! 16845 } else if (keyframes) { 16846 _inheritDefaults(_setDefaults(tl.vars.defaults, { 16847 ease: "none" 16848 })); 16849 16850 tl._ease = _parseEase(keyframes.ease || vars.ease || "none"); 16851 var time = 0, 16852 a, 16853 kf, 16854 v; 16855 16856 if (_isArray(keyframes)) { 16857 keyframes.forEach(function (frame) { 16858 return tl.to(parsedTargets, frame, ">"); 16859 }); 16860 tl.duration(); // to ensure tl._dur is cached because we tap into it for performance purposes in the render() method. 16861 } else { 16862 copy = {}; 16863 16864 for (p in keyframes) { 16865 p === "ease" || p === "easeEach" || _parseKeyframe(p, keyframes[p], copy, keyframes.easeEach); 16866 } 16867 16868 for (p in copy) { 16869 a = copy[p].sort(function (a, b) { 16870 return a.t - b.t; 16871 }); 16872 time = 0; 16873 16874 for (i = 0; i < a.length; i++) { 16875 kf = a[i]; 16876 v = { 16877 ease: kf.e, 16878 duration: (kf.t - (i ? a[i - 1].t : 0)) / 100 * duration 16879 }; 16880 v[p] = kf.v; 16881 tl.to(parsedTargets, v, time); 16882 time += v.duration; 16883 } 16884 } 16885 16886 tl.duration() < duration && tl.to({}, { 16887 duration: duration - tl.duration() 16888 }); // in case keyframes didn't go to 100% 16889 } 16890 } 16891 16892 duration || _this3.duration(duration = tl.duration()); 16893 } else { 16894 _this3.timeline = 0; //speed optimization, faster lookups (no going up the prototype chain) 16895 } 16896 16897 if (overwrite === true && !_suppressOverwrites) { 16898 _overwritingTween = _assertThisInitialized(_this3); 16899 16900 _globalTimeline.killTweensOf(parsedTargets); 16901 16902 _overwritingTween = 0; 16903 } 16904 16905 _addToTimeline(parent, _assertThisInitialized(_this3), position); 16906 16907 vars.reversed && _this3.reverse(); 16908 vars.paused && _this3.paused(true); 16909 16910 if (immediateRender || !duration && !keyframes && _this3._start === _roundPrecise(parent._time) && _isNotFalse(immediateRender) && _hasNoPausedAncestors(_assertThisInitialized(_this3)) && parent.data !== "nested") { 16911 _this3._tTime = -_tinyNum; //forces a render without having to set the render() "force" parameter to true because we want to allow lazying by default (using the "force" parameter always forces an immediate full render) 16912 16913 _this3.render(Math.max(0, -delay) || 0); //in case delay is negative 16914 16915 } 16916 16917 scrollTrigger && _scrollTrigger(_assertThisInitialized(_this3), scrollTrigger); 16918 return _this3; 16919 } 16920 16921 var _proto3 = Tween.prototype; 16922 16923 _proto3.render = function render(totalTime, suppressEvents, force) { 16924 var prevTime = this._time, 16925 tDur = this._tDur, 16926 dur = this._dur, 16927 isNegative = totalTime < 0, 16928 tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, 16929 time, 16930 pt, 16931 iteration, 16932 cycleDuration, 16933 prevIteration, 16934 isYoyo, 16935 ratio, 16936 timeline, 16937 yoyoEase; 16938 16939 if (!dur) { 16940 _renderZeroDurationTween(this, totalTime, suppressEvents, force); 16941 } else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative) { 16942 //this senses if we're crossing over the start time, in which case we must record _zTime and force the render, but we do it in this lengthy conditional way for performance reasons (usually we can skip the calculations): this._initted && (this._zTime < 0) !== (totalTime < 0) 16943 time = tTime; 16944 timeline = this.timeline; 16945 16946 if (this._repeat) { 16947 //adjust the time for repeats and yoyos 16948 cycleDuration = dur + this._rDelay; 16949 16950 if (this._repeat < -1 && isNegative) { 16951 return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force); 16952 } 16953 16954 time = _roundPrecise(tTime % cycleDuration); //round to avoid floating point errors. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!) 16955 16956 if (tTime === tDur) { 16957 // the tDur === tTime is for edge cases where there's a lengthy decimal on the duration and it may reach the very end but the time is rendered as not-quite-there (remember, tDur is rounded to 4 decimals whereas dur isn't) 16958 iteration = this._repeat; 16959 time = dur; 16960 } else { 16961 iteration = ~~(tTime / cycleDuration); 16962 16963 if (iteration && iteration === _roundPrecise(tTime / cycleDuration)) { 16964 time = dur; 16965 iteration--; 16966 } 16967 16968 time > dur && (time = dur); 16969 } 16970 16971 isYoyo = this._yoyo && iteration & 1; 16972 16973 if (isYoyo) { 16974 yoyoEase = this._yEase; 16975 time = dur - time; 16976 } 16977 16978 prevIteration = _animationCycle(this._tTime, cycleDuration); 16979 16980 if (time === prevTime && !force && this._initted && iteration === prevIteration) { 16981 //could be during the repeatDelay part. No need to render and fire callbacks. 16982 this._tTime = tTime; 16983 return this; 16984 } 16985 16986 if (iteration !== prevIteration) { 16987 timeline && this._yEase && _propagateYoyoEase(timeline, isYoyo); //repeatRefresh functionality 16988 16989 if (this.vars.repeatRefresh && !isYoyo && !this._lock && this._time !== cycleDuration && this._initted) { 16990 // this._time will === cycleDuration when we render at EXACTLY the end of an iteration. Without this condition, it'd often do the repeatRefresh render TWICE (again on the very next tick). 16991 this._lock = force = 1; //force, otherwise if lazy is true, the _attemptInitTween() will return and we'll jump out and get caught bouncing on each tick. 16992 16993 this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0; 16994 } 16995 } 16996 } 16997 16998 if (!this._initted) { 16999 if (_attemptInitTween(this, isNegative ? totalTime : time, force, suppressEvents, tTime)) { 17000 this._tTime = 0; // in constructor if immediateRender is true, we set _tTime to -_tinyNum to have the playhead cross the starting point but we can't leave _tTime as a negative number. 17001 17002 return this; 17003 } 17004 17005 if (prevTime !== this._time && !(force && this.vars.repeatRefresh && iteration !== prevIteration)) { 17006 // rare edge case - during initialization, an onUpdate in the _startAt (.fromTo()) might force this tween to render at a different spot in which case we should ditch this render() call so that it doesn't revert the values. But we also don't want to dump if we're doing a repeatRefresh render! 17007 return this; 17008 } 17009 17010 if (dur !== this._dur) { 17011 // while initting, a plugin like InertiaPlugin might alter the duration, so rerun from the start to ensure everything renders as it should. 17012 return this.render(totalTime, suppressEvents, force); 17013 } 17014 } 17015 17016 this._tTime = tTime; 17017 this._time = time; 17018 17019 if (!this._act && this._ts) { 17020 this._act = 1; //as long as it's not paused, force it to be active so that if the user renders independent of the parent timeline, it'll be forced to re-render on the next tick. 17021 17022 this._lazy = 0; 17023 } 17024 17025 this.ratio = ratio = (yoyoEase || this._ease)(time / dur); 17026 17027 if (this._from) { 17028 this.ratio = ratio = 1 - ratio; 17029 } 17030 17031 if (time && !prevTime && !suppressEvents && !iteration) { 17032 _callback(this, "onStart"); 17033 17034 if (this._tTime !== tTime) { 17035 // in case the onStart triggered a render at a different spot, eject. Like if someone did animation.pause(0.5) or something inside the onStart. 17036 return this; 17037 } 17038 } 17039 17040 pt = this._pt; 17041 17042 while (pt) { 17043 pt.r(ratio, pt.d); 17044 pt = pt._next; 17045 } 17046 17047 timeline && timeline.render(totalTime < 0 ? totalTime : timeline._dur * timeline._ease(time / this._dur), suppressEvents, force) || this._startAt && (this._zTime = totalTime); 17048 17049 if (this._onUpdate && !suppressEvents) { 17050 isNegative && _rewindStartAt(this, totalTime, suppressEvents, force); //note: for performance reasons, we tuck this conditional logic inside less traveled areas (most tweens don't have an onUpdate). We'd just have it at the end before the onComplete, but the values should be updated before any onUpdate is called, so we ALSO put it here and then if it's not called, we do so later near the onComplete. 17051 17052 _callback(this, "onUpdate"); 17053 } 17054 17055 this._repeat && iteration !== prevIteration && this.vars.onRepeat && !suppressEvents && this.parent && _callback(this, "onRepeat"); 17056 17057 if ((tTime === this._tDur || !tTime) && this._tTime === tTime) { 17058 isNegative && !this._onUpdate && _rewindStartAt(this, totalTime, true, true); 17059 (totalTime || !dur) && (tTime === this._tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1); // don't remove if we're rendering at exactly a time of 0, as there could be autoRevert values that should get set on the next tick (if the playhead goes backward beyond the startTime, negative totalTime). Don't remove if the timeline is reversed and the playhead isn't at 0, otherwise tl.progress(1).reverse() won't work. Only remove if the playhead is at the end and timeScale is positive, or if the playhead is at 0 and the timeScale is negative. 17060 17061 if (!suppressEvents && !(isNegative && !prevTime) && (tTime || prevTime || isYoyo)) { 17062 // if prevTime and tTime are zero, we shouldn't fire the onReverseComplete. This could happen if you gsap.to(... {paused:true}).play(); 17063 _callback(this, tTime === tDur ? "onComplete" : "onReverseComplete", true); 17064 17065 this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom(); 17066 } 17067 } 17068 } 17069 17070 return this; 17071 }; 17072 17073 _proto3.targets = function targets() { 17074 return this._targets; 17075 }; 17076 17077 _proto3.invalidate = function invalidate(soft) { 17078 // "soft" gives us a way to clear out everything EXCEPT the recorded pre-"from" portion of from() tweens. Otherwise, for example, if you tween.progress(1).render(0, true true).invalidate(), the "from" values would persist and then on the next render, the from() tweens would initialize and the current value would match the "from" values, thus animate from the same value to the same value (no animation). We tap into this in ScrollTrigger's refresh() where we must push a tween to completion and then back again but honor its init state in case the tween is dependent on another tween further up on the page. 17079 (!soft || !this.vars.runBackwards) && (this._startAt = 0); 17080 this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0; 17081 this._ptLookup = []; 17082 this.timeline && this.timeline.invalidate(soft); 17083 return _Animation2.prototype.invalidate.call(this, soft); 17084 }; 17085 17086 _proto3.resetTo = function resetTo(property, value, start, startIsRelative, skipRecursion) { 17087 _tickerActive || _ticker.wake(); 17088 this._ts || this.play(); 17089 var time = Math.min(this._dur, (this._dp._time - this._start) * this._ts), 17090 ratio; 17091 this._initted || _initTween(this, time); 17092 ratio = this._ease(time / this._dur); // don't just get tween.ratio because it may not have rendered yet. 17093 // possible future addition to allow an object with multiple values to update, like tween.resetTo({x: 100, y: 200}); At this point, it doesn't seem worth the added kb given the fact that most users will likely opt for the convenient gsap.quickTo() way of interacting with this method. 17094 // if (_isObject(property)) { // performance optimization 17095 // for (p in property) { 17096 // if (_updatePropTweens(this, p, property[p], value ? value[p] : null, start, ratio, time)) { 17097 // return this.resetTo(property, value, start, startIsRelative); // if a PropTween wasn't found for the property, it'll get forced with a re-initialization so we need to jump out and start over again. 17098 // } 17099 // } 17100 // } else { 17101 17102 if (_updatePropTweens(this, property, value, start, startIsRelative, ratio, time, skipRecursion)) { 17103 return this.resetTo(property, value, start, startIsRelative, 1); // if a PropTween wasn't found for the property, it'll get forced with a re-initialization so we need to jump out and start over again. 17104 } //} 17105 17106 17107 _alignPlayhead(this, 0); 17108 17109 this.parent || _addLinkedListItem(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0); 17110 return this.render(0); 17111 }; 17112 17113 _proto3.kill = function kill(targets, vars) { 17114 if (vars === void 0) { 17115 vars = "all"; 17116 } 17117 17118 if (!targets && (!vars || vars === "all")) { 17119 this._lazy = this._pt = 0; 17120 return this.parent ? _interrupt(this) : this; 17121 } 17122 17123 if (this.timeline) { 17124 var tDur = this.timeline.totalDuration(); 17125 this.timeline.killTweensOf(targets, vars, _overwritingTween && _overwritingTween.vars.overwrite !== true)._first || _interrupt(this); // if nothing is left tweening, interrupt. 17126 17127 this.parent && tDur !== this.timeline.totalDuration() && _setDuration(this, this._dur * this.timeline._tDur / tDur, 0, 1); // if a nested tween is killed that changes the duration, it should affect this tween's duration. We must use the ratio, though, because sometimes the internal timeline is stretched like for keyframes where they don't all add up to whatever the parent tween's duration was set to. 17128 17129 return this; 17130 } 17131 17132 var parsedTargets = this._targets, 17133 killingTargets = targets ? toArray(targets) : parsedTargets, 17134 propTweenLookup = this._ptLookup, 17135 firstPT = this._pt, 17136 overwrittenProps, 17137 curLookup, 17138 curOverwriteProps, 17139 props, 17140 p, 17141 pt, 17142 i; 17143 17144 if ((!vars || vars === "all") && _arraysMatch(parsedTargets, killingTargets)) { 17145 vars === "all" && (this._pt = 0); 17146 return _interrupt(this); 17147 } 17148 17149 overwrittenProps = this._op = this._op || []; 17150 17151 if (vars !== "all") { 17152 //so people can pass in a comma-delimited list of property names 17153 if (_isString(vars)) { 17154 p = {}; 17155 17156 _forEachName(vars, function (name) { 17157 return p[name] = 1; 17158 }); 17159 17160 vars = p; 17161 } 17162 17163 vars = _addAliasesToVars(parsedTargets, vars); 17164 } 17165 17166 i = parsedTargets.length; 17167 17168 while (i--) { 17169 if (~killingTargets.indexOf(parsedTargets[i])) { 17170 curLookup = propTweenLookup[i]; 17171 17172 if (vars === "all") { 17173 overwrittenProps[i] = vars; 17174 props = curLookup; 17175 curOverwriteProps = {}; 17176 } else { 17177 curOverwriteProps = overwrittenProps[i] = overwrittenProps[i] || {}; 17178 props = vars; 17179 } 17180 17181 for (p in props) { 17182 pt = curLookup && curLookup[p]; 17183 17184 if (pt) { 17185 if (!("kill" in pt.d) || pt.d.kill(p) === true) { 17186 _removeLinkedListItem(this, pt, "_pt"); 17187 } 17188 17189 delete curLookup[p]; 17190 } 17191 17192 if (curOverwriteProps !== "all") { 17193 curOverwriteProps[p] = 1; 17194 } 17195 } 17196 } 17197 } 17198 17199 this._initted && !this._pt && firstPT && _interrupt(this); //if all tweening properties are killed, kill the tween. Without this line, if there's a tween with multiple targets and then you killTweensOf() each target individually, the tween would technically still remain active and fire its onComplete even though there aren't any more properties tweening. 17200 17201 return this; 17202 }; 17203 17204 Tween.to = function to(targets, vars) { 17205 return new Tween(targets, vars, arguments[2]); 17206 }; 17207 17208 Tween.from = function from(targets, vars) { 17209 return _createTweenType(1, arguments); 17210 }; 17211 17212 Tween.delayedCall = function delayedCall(delay, callback, params, scope) { 17213 return new Tween(callback, 0, { 17214 immediateRender: false, 17215 lazy: false, 17216 overwrite: false, 17217 delay: delay, 17218 onComplete: callback, 17219 onReverseComplete: callback, 17220 onCompleteParams: params, 17221 onReverseCompleteParams: params, 17222 callbackScope: scope 17223 }); // we must use onReverseComplete too for things like timeline.add(() => {...}) which should be triggered in BOTH directions (forward and reverse) 17224 }; 17225 17226 Tween.fromTo = function fromTo(targets, fromVars, toVars) { 17227 return _createTweenType(2, arguments); 17228 }; 17229 17230 Tween.set = function set(targets, vars) { 17231 vars.duration = 0; 17232 vars.repeatDelay || (vars.repeat = 0); 17233 return new Tween(targets, vars); 17234 }; 17235 17236 Tween.killTweensOf = function killTweensOf(targets, props, onlyActive) { 17237 return _globalTimeline.killTweensOf(targets, props, onlyActive); 17238 }; 17239 17240 return Tween; 17241}(Animation); 17242 17243_setDefaults(Tween.prototype, { 17244 _targets: [], 17245 _lazy: 0, 17246 _startAt: 0, 17247 _op: 0, 17248 _onInit: 0 17249}); //add the pertinent timeline methods to Tween instances so that users can chain conveniently and create a timeline automatically. (removed due to concerns that it'd ultimately add to more confusion especially for beginners) 17250// _forEachName("to,from,fromTo,set,call,add,addLabel,addPause", name => { 17251// Tween.prototype[name] = function() { 17252// let tl = new Timeline(); 17253// return _addToTimeline(tl, this)[name].apply(tl, toArray(arguments)); 17254// } 17255// }); 17256//for backward compatibility. Leverage the timeline calls. 17257 17258 17259_forEachName("staggerTo,staggerFrom,staggerFromTo", function (name) { 17260 Tween[name] = function () { 17261 var tl = new Timeline(), 17262 params = _slice.call(arguments, 0); 17263 17264 params.splice(name === "staggerFromTo" ? 5 : 4, 0, 0); 17265 return tl[name].apply(tl, params); 17266 }; 17267}); 17268/* 17269 * -------------------------------------------------------------------------------------- 17270 * PROPTWEEN 17271 * -------------------------------------------------------------------------------------- 17272 */ 17273 17274 17275var _setterPlain = function _setterPlain(target, property, value) { 17276 return target[property] = value; 17277}, 17278 _setterFunc = function _setterFunc(target, property, value) { 17279 return target[property](value); 17280}, 17281 _setterFuncWithParam = function _setterFuncWithParam(target, property, value, data) { 17282 return target[property](data.fp, value); 17283}, 17284 _setterAttribute = function _setterAttribute(target, property, value) { 17285 return target.setAttribute(property, value); 17286}, 17287 _getSetter = function _getSetter(target, property) { 17288 return _isFunction(target[property]) ? _setterFunc : _isUndefined(target[property]) && target.setAttribute ? _setterAttribute : _setterPlain; 17289}, 17290 _renderPlain = function _renderPlain(ratio, data) { 17291 return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 1000000) / 1000000, data); 17292}, 17293 _renderBoolean = function _renderBoolean(ratio, data) { 17294 return data.set(data.t, data.p, !!(data.s + data.c * ratio), data); 17295}, 17296 _renderComplexString = function _renderComplexString(ratio, data) { 17297 var pt = data._pt, 17298 s = ""; 17299 17300 if (!ratio && data.b) { 17301 //b = beginning string 17302 s = data.b; 17303 } else if (ratio === 1 && data.e) { 17304 //e = ending string 17305 s = data.e; 17306 } else { 17307 while (pt) { 17308 s = pt.p + (pt.m ? pt.m(pt.s + pt.c * ratio) : Math.round((pt.s + pt.c * ratio) * 10000) / 10000) + s; //we use the "p" property for the text inbetween (like a suffix). And in the context of a complex string, the modifier (m) is typically just Math.round(), like for RGB colors. 17309 17310 pt = pt._next; 17311 } 17312 17313 s += data.c; //we use the "c" of the PropTween to store the final chunk of non-numeric text. 17314 } 17315 17316 data.set(data.t, data.p, s, data); 17317}, 17318 _renderPropTweens = function _renderPropTweens(ratio, data) { 17319 var pt = data._pt; 17320 17321 while (pt) { 17322 pt.r(ratio, pt.d); 17323 pt = pt._next; 17324 } 17325}, 17326 _addPluginModifier = function _addPluginModifier(modifier, tween, target, property) { 17327 var pt = this._pt, 17328 next; 17329 17330 while (pt) { 17331 next = pt._next; 17332 pt.p === property && pt.modifier(modifier, tween, target); 17333 pt = next; 17334 } 17335}, 17336 _killPropTweensOf = function _killPropTweensOf(property) { 17337 var pt = this._pt, 17338 hasNonDependentRemaining, 17339 next; 17340 17341 while (pt) { 17342 next = pt._next; 17343 17344 if (pt.p === property && !pt.op || pt.op === property) { 17345 _removeLinkedListItem(this, pt, "_pt"); 17346 } else if (!pt.dep) { 17347 hasNonDependentRemaining = 1; 17348 } 17349 17350 pt = next; 17351 } 17352 17353 return !hasNonDependentRemaining; 17354}, 17355 _setterWithModifier = function _setterWithModifier(target, property, value, data) { 17356 data.mSet(target, property, data.m.call(data.tween, value, data.mt), data); 17357}, 17358 _sortPropTweensByPriority = function _sortPropTweensByPriority(parent) { 17359 var pt = parent._pt, 17360 next, 17361 pt2, 17362 first, 17363 last; //sorts the PropTween linked list in order of priority because some plugins need to do their work after ALL of the PropTweens were created (like RoundPropsPlugin and ModifiersPlugin) 17364 17365 while (pt) { 17366 next = pt._next; 17367 pt2 = first; 17368 17369 while (pt2 && pt2.pr > pt.pr) { 17370 pt2 = pt2._next; 17371 } 17372 17373 if (pt._prev = pt2 ? pt2._prev : last) { 17374 pt._prev._next = pt; 17375 } else { 17376 first = pt; 17377 } 17378 17379 if (pt._next = pt2) { 17380 pt2._prev = pt; 17381 } else { 17382 last = pt; 17383 } 17384 17385 pt = next; 17386 } 17387 17388 parent._pt = first; 17389}; //PropTween key: t = target, p = prop, r = renderer, d = data, s = start, c = change, op = overwriteProperty (ONLY populated when it's different than p), pr = priority, _next/_prev for the linked list siblings, set = setter, m = modifier, mSet = modifierSetter (the original setter, before a modifier was added) 17390 17391 17392var PropTween = /*#__PURE__*/function () { 17393 function PropTween(next, target, prop, start, change, renderer, data, setter, priority) { 17394 this.t = target; 17395 this.s = start; 17396 this.c = change; 17397 this.p = prop; 17398 this.r = renderer || _renderPlain; 17399 this.d = data || this; 17400 this.set = setter || _setterPlain; 17401 this.pr = priority || 0; 17402 this._next = next; 17403 17404 if (next) { 17405 next._prev = this; 17406 } 17407 } 17408 17409 var _proto4 = PropTween.prototype; 17410 17411 _proto4.modifier = function modifier(func, tween, target) { 17412 this.mSet = this.mSet || this.set; //in case it was already set (a PropTween can only have one modifier) 17413 17414 this.set = _setterWithModifier; 17415 this.m = func; 17416 this.mt = target; //modifier target 17417 17418 this.tween = tween; 17419 }; 17420 17421 return PropTween; 17422}(); //Initialization tasks 17423 17424_forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function (name) { 17425 return _reservedProps[name] = 1; 17426}); 17427 17428_globals.TweenMax = _globals.TweenLite = Tween; 17429_globals.TimelineLite = _globals.TimelineMax = Timeline; 17430_globalTimeline = new Timeline({ 17431 sortChildren: false, 17432 defaults: _defaults, 17433 autoRemoveChildren: true, 17434 id: "root", 17435 smoothChildTiming: true 17436}); 17437_config.stringFilter = _colorStringFilter; 17438 17439var _media = [], 17440 _listeners = {}, 17441 _emptyArray = [], 17442 _lastMediaTime = 0, 17443 _contextID = 0, 17444 _dispatch = function _dispatch(type) { 17445 return (_listeners[type] || _emptyArray).map(function (f) { 17446 return f(); 17447 }); 17448}, 17449 _onMediaChange = function _onMediaChange() { 17450 var time = Date.now(), 17451 matches = []; 17452 17453 if (time - _lastMediaTime > 2) { 17454 _dispatch("matchMediaInit"); 17455 17456 _media.forEach(function (c) { 17457 var queries = c.queries, 17458 conditions = c.conditions, 17459 match, 17460 p, 17461 anyMatch, 17462 toggled; 17463 17464 for (p in queries) { 17465 match = _win.matchMedia(queries[p]).matches; // Firefox doesn't update the "matches" property of the MediaQueryList object correctly - it only does so as it calls its change handler - so we must re-create a media query here to ensure it's accurate. 17466 17467 match && (anyMatch = 1); 17468 17469 if (match !== conditions[p]) { 17470 conditions[p] = match; 17471 toggled = 1; 17472 } 17473 } 17474 17475 if (toggled) { 17476 c.revert(); 17477 anyMatch && matches.push(c); 17478 } 17479 }); 17480 17481 _dispatch("matchMediaRevert"); 17482 17483 matches.forEach(function (c) { 17484 return c.onMatch(c, function (func) { 17485 return c.add(null, func); 17486 }); 17487 }); 17488 _lastMediaTime = time; 17489 17490 _dispatch("matchMedia"); 17491 } 17492}; 17493 17494var Context = /*#__PURE__*/function () { 17495 function Context(func, scope) { 17496 this.selector = scope && selector(scope); 17497 this.data = []; 17498 this._r = []; // returned/cleanup functions 17499 17500 this.isReverted = false; 17501 this.id = _contextID++; // to work around issues that frameworks like Vue cause by making things into Proxies which make it impossible to do something like _media.indexOf(this) because "this" would no longer refer to the Context instance itself - it'd refer to a Proxy! We needed a way to identify the context uniquely 17502 17503 func && this.add(func); 17504 } 17505 17506 var _proto5 = Context.prototype; 17507 17508 _proto5.add = function add(name, func, scope) { 17509 // possible future addition if we need the ability to add() an animation to a context and for whatever reason cannot create that animation inside of a context.add(() => {...}) function. 17510 // if (name && _isFunction(name.revert)) { 17511 // this.data.push(name); 17512 // return (name._ctx = this); 17513 // } 17514 if (_isFunction(name)) { 17515 scope = func; 17516 func = name; 17517 name = _isFunction; 17518 } 17519 17520 var self = this, 17521 f = function f() { 17522 var prev = _context, 17523 prevSelector = self.selector, 17524 result; 17525 prev && prev !== self && prev.data.push(self); 17526 scope && (self.selector = selector(scope)); 17527 _context = self; 17528 result = func.apply(self, arguments); 17529 _isFunction(result) && self._r.push(result); 17530 _context = prev; 17531 self.selector = prevSelector; 17532 self.isReverted = false; 17533 return result; 17534 }; 17535 17536 self.last = f; 17537 return name === _isFunction ? f(self, function (func) { 17538 return self.add(null, func); 17539 }) : name ? self[name] = f : f; 17540 }; 17541 17542 _proto5.ignore = function ignore(func) { 17543 var prev = _context; 17544 _context = null; 17545 func(this); 17546 _context = prev; 17547 }; 17548 17549 _proto5.getTweens = function getTweens() { 17550 var a = []; 17551 this.data.forEach(function (e) { 17552 return e instanceof Context ? a.push.apply(a, e.getTweens()) : e instanceof Tween && !(e.parent && e.parent.data === "nested") && a.push(e); 17553 }); 17554 return a; 17555 }; 17556 17557 _proto5.clear = function clear() { 17558 this._r.length = this.data.length = 0; 17559 }; 17560 17561 _proto5.kill = function kill(revert, matchMedia) { 17562 var _this4 = this; 17563 17564 if (revert) { 17565 (function () { 17566 var tweens = _this4.getTweens(), 17567 i = _this4.data.length, 17568 t; 17569 17570 while (i--) { 17571 // Flip plugin tweens are very different in that they should actually be pushed to their end. The plugin replaces the timeline's .revert() method to do exactly that. But we also need to remove any of those nested tweens inside the flip timeline so that they don't get individually reverted. 17572 t = _this4.data[i]; 17573 17574 if (t.data === "isFlip") { 17575 t.revert(); 17576 t.getChildren(true, true, false).forEach(function (tween) { 17577 return tweens.splice(tweens.indexOf(tween), 1); 17578 }); 17579 } 17580 } // save as an object so that we can cache the globalTime for each tween to optimize performance during the sort 17581 17582 17583 tweens.map(function (t) { 17584 return { 17585 g: t._dur || t._delay || t._sat && !t._sat.vars.immediateRender ? t.globalTime(0) : -Infinity, 17586 t: t 17587 }; 17588 }).sort(function (a, b) { 17589 return b.g - a.g || -Infinity; 17590 }).forEach(function (o) { 17591 return o.t.revert(revert); 17592 }); // note: all of the _startAt tweens should be reverted in reverse order that they were created, and they'll all have the same globalTime (-1) so the " || -1" in the sort keeps the order properly. 17593 17594 i = _this4.data.length; 17595 17596 while (i--) { 17597 // make sure we loop backwards so that, for example, SplitTexts that were created later on the same element get reverted first 17598 t = _this4.data[i]; 17599 17600 if (t instanceof Timeline) { 17601 if (t.data !== "nested") { 17602 t.scrollTrigger && t.scrollTrigger.revert(); 17603 t.kill(); // don't revert() the timeline because that's duplicating efforts since we already reverted all the tweens 17604 } 17605 } else { 17606 !(t instanceof Tween) && t.revert && t.revert(revert); 17607 } 17608 } 17609 17610 _this4._r.forEach(function (f) { 17611 return f(revert, _this4); 17612 }); 17613 17614 _this4.isReverted = true; 17615 })(); 17616 } else { 17617 this.data.forEach(function (e) { 17618 return e.kill && e.kill(); 17619 }); 17620 } 17621 17622 this.clear(); 17623 17624 if (matchMedia) { 17625 var i = _media.length; 17626 17627 while (i--) { 17628 // previously, we checked _media.indexOf(this), but some frameworks like Vue enforce Proxy objects that make it impossible to get the proper result that way, so we must use a unique ID number instead. 17629 _media[i].id === this.id && _media.splice(i, 1); 17630 } 17631 } 17632 }; 17633 17634 _proto5.revert = function revert(config) { 17635 this.kill(config || {}); 17636 }; 17637 17638 return Context; 17639}(); 17640 17641var MatchMedia = /*#__PURE__*/function () { 17642 function MatchMedia(scope) { 17643 this.contexts = []; 17644 this.scope = scope; 17645 _context && _context.data.push(this); 17646 } 17647 17648 var _proto6 = MatchMedia.prototype; 17649 17650 _proto6.add = function add(conditions, func, scope) { 17651 _isObject(conditions) || (conditions = { 17652 matches: conditions 17653 }); 17654 var context = new Context(0, scope || this.scope), 17655 cond = context.conditions = {}, 17656 mq, 17657 p, 17658 active; 17659 _context && !context.selector && (context.selector = _context.selector); // in case a context is created inside a context. Like a gsap.matchMedia() that's inside a scoped gsap.context() 17660 17661 this.contexts.push(context); 17662 func = context.add("onMatch", func); 17663 context.queries = conditions; 17664 17665 for (p in conditions) { 17666 if (p === "all") { 17667 active = 1; 17668 } else { 17669 mq = _win.matchMedia(conditions[p]); 17670 17671 if (mq) { 17672 _media.indexOf(context) < 0 && _media.push(context); 17673 (cond[p] = mq.matches) && (active = 1); 17674 mq.addListener ? mq.addListener(_onMediaChange) : mq.addEventListener("change", _onMediaChange); 17675 } 17676 } 17677 } 17678 17679 active && func(context, function (f) { 17680 return context.add(null, f); 17681 }); 17682 return this; 17683 } // refresh() { 17684 // let time = _lastMediaTime, 17685 // media = _media; 17686 // _lastMediaTime = -1; 17687 // _media = this.contexts; 17688 // _onMediaChange(); 17689 // _lastMediaTime = time; 17690 // _media = media; 17691 // } 17692 ; 17693 17694 _proto6.revert = function revert(config) { 17695 this.kill(config || {}); 17696 }; 17697 17698 _proto6.kill = function kill(revert) { 17699 this.contexts.forEach(function (c) { 17700 return c.kill(revert, true); 17701 }); 17702 }; 17703 17704 return MatchMedia; 17705}(); 17706/* 17707 * -------------------------------------------------------------------------------------- 17708 * GSAP 17709 * -------------------------------------------------------------------------------------- 17710 */ 17711 17712 17713var _gsap = { 17714 registerPlugin: function registerPlugin() { 17715 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 17716 args[_key2] = arguments[_key2]; 17717 } 17718 17719 args.forEach(function (config) { 17720 return _createPlugin(config); 17721 }); 17722 }, 17723 timeline: function timeline(vars) { 17724 return new Timeline(vars); 17725 }, 17726 getTweensOf: function getTweensOf(targets, onlyActive) { 17727 return _globalTimeline.getTweensOf(targets, onlyActive); 17728 }, 17729 getProperty: function getProperty(target, property, unit, uncache) { 17730 _isString(target) && (target = toArray(target)[0]); //in case selector text or an array is passed in 17731 17732 var getter = _getCache(target || {}).get, 17733 format = unit ? _passThrough : _numericIfPossible; 17734 17735 unit === "native" && (unit = ""); 17736 return !target ? target : !property ? function (property, unit, uncache) { 17737 return format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache)); 17738 } : format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache)); 17739 }, 17740 quickSetter: function quickSetter(target, property, unit) { 17741 target = toArray(target); 17742 17743 if (target.length > 1) { 17744 var setters = target.map(function (t) { 17745 return gsap.quickSetter(t, property, unit); 17746 }), 17747 l = setters.length; 17748 return function (value) { 17749 var i = l; 17750 17751 while (i--) { 17752 setters[i](value); 17753 } 17754 }; 17755 } 17756 17757 target = target[0] || {}; 17758 17759 var Plugin = _plugins[property], 17760 cache = _getCache(target), 17761 p = cache.harness && (cache.harness.aliases || {})[property] || property, 17762 // in case it's an alias, like "rotate" for "rotation". 17763 setter = Plugin ? function (value) { 17764 var p = new Plugin(); 17765 _quickTween._pt = 0; 17766 p.init(target, unit ? value + unit : value, _quickTween, 0, [target]); 17767 p.render(1, p); 17768 _quickTween._pt && _renderPropTweens(1, _quickTween); 17769 } : cache.set(target, p); 17770 17771 return Plugin ? setter : function (value) { 17772 return setter(target, p, unit ? value + unit : value, cache, 1); 17773 }; 17774 }, 17775 quickTo: function quickTo(target, property, vars) { 17776 var _merge2; 17777 17778 var tween = gsap.to(target, _merge((_merge2 = {}, _merge2[property] = "+=0.1", _merge2.paused = true, _merge2), vars || {})), 17779 func = function func(value, start, startIsRelative) { 17780 return tween.resetTo(property, value, start, startIsRelative); 17781 }; 17782 17783 func.tween = tween; 17784 return func; 17785 }, 17786 isTweening: function isTweening(targets) { 17787 return _globalTimeline.getTweensOf(targets, true).length > 0; 17788 }, 17789 defaults: function defaults(value) { 17790 value && value.ease && (value.ease = _parseEase(value.ease, _defaults.ease)); 17791 return _mergeDeep(_defaults, value || {}); 17792 }, 17793 config: function config(value) { 17794 return _mergeDeep(_config, value || {}); 17795 }, 17796 registerEffect: function registerEffect(_ref3) { 17797 var name = _ref3.name, 17798 effect = _ref3.effect, 17799 plugins = _ref3.plugins, 17800 defaults = _ref3.defaults, 17801 extendTimeline = _ref3.extendTimeline; 17802 (plugins || "").split(",").forEach(function (pluginName) { 17803 return pluginName && !_plugins[pluginName] && !_globals[pluginName] && _warn(name + " effect requires " + pluginName + " plugin."); 17804 }); 17805 17806 _effects[name] = function (targets, vars, tl) { 17807 return effect(toArray(targets), _setDefaults(vars || {}, defaults), tl); 17808 }; 17809 17810 if (extendTimeline) { 17811 Timeline.prototype[name] = function (targets, vars, position) { 17812 return this.add(_effects[name](targets, _isObject(vars) ? vars : (position = vars) && {}, this), position); 17813 }; 17814 } 17815 }, 17816 registerEase: function registerEase(name, ease) { 17817 _easeMap[name] = _parseEase(ease); 17818 }, 17819 parseEase: function parseEase(ease, defaultEase) { 17820 return arguments.length ? _parseEase(ease, defaultEase) : _easeMap; 17821 }, 17822 getById: function getById(id) { 17823 return _globalTimeline.getById(id); 17824 }, 17825 exportRoot: function exportRoot(vars, includeDelayedCalls) { 17826 if (vars === void 0) { 17827 vars = {}; 17828 } 17829 17830 var tl = new Timeline(vars), 17831 child, 17832 next; 17833 tl.smoothChildTiming = _isNotFalse(vars.smoothChildTiming); 17834 17835 _globalTimeline.remove(tl); 17836 17837 tl._dp = 0; //otherwise it'll get re-activated when adding children and be re-introduced into _globalTimeline's linked list (then added to itself). 17838 17839 tl._time = tl._tTime = _globalTimeline._time; 17840 child = _globalTimeline._first; 17841 17842 while (child) { 17843 next = child._next; 17844 17845 if (includeDelayedCalls || !(!child._dur && child instanceof Tween && child.vars.onComplete === child._targets[0])) { 17846 _addToTimeline(tl, child, child._start - child._delay); 17847 } 17848 17849 child = next; 17850 } 17851 17852 _addToTimeline(_globalTimeline, tl, 0); 17853 17854 return tl; 17855 }, 17856 context: function context(func, scope) { 17857 return func ? new Context(func, scope) : _context; 17858 }, 17859 matchMedia: function matchMedia(scope) { 17860 return new MatchMedia(scope); 17861 }, 17862 matchMediaRefresh: function matchMediaRefresh() { 17863 return _media.forEach(function (c) { 17864 var cond = c.conditions, 17865 found, 17866 p; 17867 17868 for (p in cond) { 17869 if (cond[p]) { 17870 cond[p] = false; 17871 found = 1; 17872 } 17873 } 17874 17875 found && c.revert(); 17876 }) || _onMediaChange(); 17877 }, 17878 addEventListener: function addEventListener(type, callback) { 17879 var a = _listeners[type] || (_listeners[type] = []); 17880 ~a.indexOf(callback) || a.push(callback); 17881 }, 17882 removeEventListener: function removeEventListener(type, callback) { 17883 var a = _listeners[type], 17884 i = a && a.indexOf(callback); 17885 i >= 0 && a.splice(i, 1); 17886 }, 17887 utils: { 17888 wrap: wrap, 17889 wrapYoyo: wrapYoyo, 17890 distribute: distribute, 17891 random: random, 17892 snap: snap, 17893 normalize: normalize, 17894 getUnit: getUnit, 17895 clamp: clamp, 17896 splitColor: splitColor, 17897 toArray: toArray, 17898 selector: selector, 17899 mapRange: mapRange, 17900 pipe: pipe, 17901 unitize: unitize, 17902 interpolate: interpolate, 17903 shuffle: shuffle 17904 }, 17905 install: _install, 17906 effects: _effects, 17907 ticker: _ticker, 17908 updateRoot: Timeline.updateRoot, 17909 plugins: _plugins, 17910 globalTimeline: _globalTimeline, 17911 core: { 17912 PropTween: PropTween, 17913 globals: _addGlobal, 17914 Tween: Tween, 17915 Timeline: Timeline, 17916 Animation: Animation, 17917 getCache: _getCache, 17918 _removeLinkedListItem: _removeLinkedListItem, 17919 reverting: function reverting() { 17920 return _reverting; 17921 }, 17922 context: function context(toAdd) { 17923 if (toAdd && _context) { 17924 _context.data.push(toAdd); 17925 17926 toAdd._ctx = _context; 17927 } 17928 17929 return _context; 17930 }, 17931 suppressOverwrites: function suppressOverwrites(value) { 17932 return _suppressOverwrites = value; 17933 } 17934 } 17935}; 17936 17937_forEachName("to,from,fromTo,delayedCall,set,killTweensOf", function (name) { 17938 return _gsap[name] = Tween[name]; 17939}); 17940 17941_ticker.add(Timeline.updateRoot); 17942 17943_quickTween = _gsap.to({}, { 17944 duration: 0 17945}); // ---- EXTRA PLUGINS -------------------------------------------------------- 17946 17947var _getPluginPropTween = function _getPluginPropTween(plugin, prop) { 17948 var pt = plugin._pt; 17949 17950 while (pt && pt.p !== prop && pt.op !== prop && pt.fp !== prop) { 17951 pt = pt._next; 17952 } 17953 17954 return pt; 17955}, 17956 _addModifiers = function _addModifiers(tween, modifiers) { 17957 var targets = tween._targets, 17958 p, 17959 i, 17960 pt; 17961 17962 for (p in modifiers) { 17963 i = targets.length; 17964 17965 while (i--) { 17966 pt = tween._ptLookup[i][p]; 17967 17968 if (pt && (pt = pt.d)) { 17969 if (pt._pt) { 17970 // is a plugin 17971 pt = _getPluginPropTween(pt, p); 17972 } 17973 17974 pt && pt.modifier && pt.modifier(modifiers[p], tween, targets[i], p); 17975 } 17976 } 17977 } 17978}, 17979 _buildModifierPlugin = function _buildModifierPlugin(name, modifier) { 17980 return { 17981 name: name, 17982 rawVars: 1, 17983 //don't pre-process function-based values or "random()" strings. 17984 init: function init(target, vars, tween) { 17985 tween._onInit = function (tween) { 17986 var temp, p; 17987 17988 if (_isString(vars)) { 17989 temp = {}; 17990 17991 _forEachName(vars, function (name) { 17992 return temp[name] = 1; 17993 }); //if the user passes in a comma-delimited list of property names to roundProps, like "x,y", we round to whole numbers. 17994 17995 17996 vars = temp; 17997 } 17998 17999 if (modifier) { 18000 temp = {}; 18001 18002 for (p in vars) { 18003 temp[p] = modifier(vars[p]); 18004 } 18005 18006 vars = temp; 18007 } 18008 18009 _addModifiers(tween, vars); 18010 }; 18011 } 18012 }; 18013}; //register core plugins 18014 18015 18016var gsap = _gsap.registerPlugin({ 18017 name: "attr", 18018 init: function init(target, vars, tween, index, targets) { 18019 var p, pt, v; 18020 this.tween = tween; 18021 18022 for (p in vars) { 18023 v = target.getAttribute(p) || ""; 18024 pt = this.add(target, "setAttribute", (v || 0) + "", vars[p], index, targets, 0, 0, p); 18025 pt.op = p; 18026 pt.b = v; // record the beginning value so we can revert() 18027 18028 this._props.push(p); 18029 } 18030 }, 18031 render: function render(ratio, data) { 18032 var pt = data._pt; 18033 18034 while (pt) { 18035 _reverting ? pt.set(pt.t, pt.p, pt.b, pt) : pt.r(ratio, pt.d); // if reverting, go back to the original (pt.b) 18036 18037 pt = pt._next; 18038 } 18039 } 18040}, { 18041 name: "endArray", 18042 init: function init(target, value) { 18043 var i = value.length; 18044 18045 while (i--) { 18046 this.add(target, i, target[i] || 0, value[i], 0, 0, 0, 0, 0, 1); 18047 } 18048 } 18049}, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap; //to prevent the core plugins from being dropped via aggressive tree shaking, we must include them in the variable declaration in this way. 18050 18051Tween.version = Timeline.version = gsap.version = "3.12.5"; 18052_coreReady = 1; 18053_windowExists() && _wake(); 18054var Power0 = _easeMap.Power0, 18055 Power1 = _easeMap.Power1, 18056 Power2 = _easeMap.Power2, 18057 Power3 = _easeMap.Power3, 18058 Power4 = _easeMap.Power4, 18059 Linear = _easeMap.Linear, 18060 Quad = _easeMap.Quad, 18061 Cubic = _easeMap.Cubic, 18062 Quart = _easeMap.Quart, 18063 Quint = _easeMap.Quint, 18064 Strong = _easeMap.Strong, 18065 Elastic = _easeMap.Elastic, 18066 Back = _easeMap.Back, 18067 SteppedEase = _easeMap.SteppedEase, 18068 Bounce = _easeMap.Bounce, 18069 Sine = _easeMap.Sine, 18070 Expo = _easeMap.Expo, 18071 Circ = _easeMap.Circ; 18072 18073 //export some internal methods/orojects for use in CSSPlugin so that we can externalize that file and allow custom builds that exclude it. 18074 18075 18076 18077/***/ }), 18078
vendor: 5,064 bytes, lines 18079-18145
18079/***/ "./node_modules/gsap/index.js": 18080/*!************************************!*\ 18081 !*** ./node_modules/gsap/index.js ***! 18082 \************************************/ 18083/*! exports provided: gsap, default, CSSPlugin, TweenMax, TweenLite, TimelineMax, TimelineLite, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, SteppedEase, Bounce, Sine, Expo, Circ */ 18084/***/ (function(module, __webpack_exports__, __webpack_require__) { 18085 18086"use strict"; 18087__webpack_require__.r(__webpack_exports__); 18088/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gsap", function() { return gsapWithCSS; }); 18089/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return gsapWithCSS; }); 18090/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return TweenMaxWithCSS; }); 18091/* harmony import */ var _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./gsap-core.js */ "./node_modules/gsap/gsap-core.js"); 18092/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TweenLite"]; }); 18093 18094/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TimelineMax"]; }); 18095 18096/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["TimelineLite"]; }); 18097 18098/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power0"]; }); 18099 18100/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power1"]; }); 18101 18102/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power2"]; }); 18103 18104/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power3"]; }); 18105 18106/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Power4"]; }); 18107 18108/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Linear"]; }); 18109 18110/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quad", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quad"]; }); 18111 18112/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Cubic", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Cubic"]; }); 18113 18114/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quart", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quart"]; }); 18115 18116/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Quint", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Quint"]; }); 18117 18118/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Strong", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Strong"]; }); 18119 18120/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Elastic"]; }); 18121 18122/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Back"]; }); 18123 18124/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["SteppedEase"]; }); 18125 18126/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Bounce"]; }); 18127 18128/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Sine"]; }); 18129 18130/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Expo"]; }); 18131 18132/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["Circ"]; }); 18133 18134/* harmony import */ var _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CSSPlugin.js */ "./node_modules/gsap/CSSPlugin.js"); 18135/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__["CSSPlugin"]; }); 18136 18137 18138 18139var gsapWithCSS = _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"].registerPlugin(_CSSPlugin_js__WEBPACK_IMPORTED_MODULE_1__["CSSPlugin"]) || _gsap_core_js__WEBPACK_IMPORTED_MODULE_0__["gsap"], 18140 // to protect from tree shaking 18141TweenMaxWithCSS = gsapWithCSS.core.Tween; 18142 18143 18144/***/ }), 18145
vendor: 16,058 bytes, lines 18146-18584
18146/***/ "./node_modules/gsap/utils/matrix.js": 18147/*!*******************************************!*\ 18148 !*** ./node_modules/gsap/utils/matrix.js ***! 18149 \*******************************************/ 18150/*! exports provided: Matrix2D, getGlobalMatrix, _getDocScrollTop, _getDocScrollLeft, _setDoc, _isFixed, _getCTM */ 18151/***/ (function(module, __webpack_exports__, __webpack_require__) { 18152 18153"use strict"; 18154__webpack_require__.r(__webpack_exports__); 18155/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Matrix2D", function() { return Matrix2D; }); 18156/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGlobalMatrix", function() { return getGlobalMatrix; }); 18157/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getDocScrollTop", function() { return _getDocScrollTop; }); 18158/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getDocScrollLeft", function() { return _getDocScrollLeft; }); 18159/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_setDoc", function() { return _setDoc; }); 18160/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_isFixed", function() { return _isFixed; }); 18161/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getCTM", function() { return _getCTM; }); 18162/*! 18163 * matrix 3.12.5 18164 * https://gsap.com 18165 * 18166 * Copyright 2008-2024, GreenSock. All rights reserved. 18167 * Subject to the terms at https://gsap.com/standard-license or for 18168 * Club GSAP members, the agreement issued with that membership. 18169 * @author: Jack Doyle, [email protected] 18170*/ 18171 18172/* eslint-disable */ 18173var _doc, 18174 _win, 18175 _docElement, 18176 _body, 18177 _divContainer, 18178 _svgContainer, 18179 _identityMatrix, 18180 _gEl, 18181 _transformProp = "transform", 18182 _transformOriginProp = _transformProp + "Origin", 18183 _hasOffsetBug, 18184 _setDoc = function _setDoc(element) { 18185 var doc = element.ownerDocument || element; 18186 18187 if (!(_transformProp in element.style) && "msTransform" in element.style) { 18188 //to improve compatibility with old Microsoft browsers 18189 _transformProp = "msTransform"; 18190 _transformOriginProp = _transformProp + "Origin"; 18191 } 18192 18193 while (doc.parentNode && (doc = doc.parentNode)) {} 18194 18195 _win = window; 18196 _identityMatrix = new Matrix2D(); 18197 18198 if (doc) { 18199 _doc = doc; 18200 _docElement = doc.documentElement; 18201 _body = doc.body; 18202 _gEl = _doc.createElementNS("http://www.w3.org/2000/svg", "g"); // prevent any existing CSS from transforming it 18203 18204 _gEl.style.transform = "none"; // now test for the offset reporting bug. Use feature detection instead of browser sniffing to make things more bulletproof and future-proof. Hopefully Safari will fix their bug soon. 18205 18206 var d1 = doc.createElement("div"), 18207 d2 = doc.createElement("div"), 18208 root = doc && (doc.body || doc.firstElementChild); 18209 18210 if (root && root.appendChild) { 18211 root.appendChild(d1); 18212 d1.appendChild(d2); 18213 d1.setAttribute("style", "position:static;transform:translate3d(0,0,1px)"); 18214 _hasOffsetBug = d2.offsetParent !== d1; 18215 root.removeChild(d1); 18216 } 18217 } 18218 18219 return doc; 18220}, 18221 _forceNonZeroScale = function _forceNonZeroScale(e) { 18222 // walks up the element's ancestors and finds any that had their scale set to 0 via GSAP, and changes them to 0.0001 to ensure that measurements work. Firefox has a bug that causes it to incorrectly report getBoundingClientRect() when scale is 0. 18223 var a, cache; 18224 18225 while (e && e !== _body) { 18226 cache = e._gsap; 18227 cache && cache.uncache && cache.get(e, "x"); // force re-parsing of transforms if necessary 18228 18229 if (cache && !cache.scaleX && !cache.scaleY && cache.renderTransform) { 18230 cache.scaleX = cache.scaleY = 1e-4; 18231 cache.renderTransform(1, cache); 18232 a ? a.push(cache) : a = [cache]; 18233 } 18234 18235 e = e.parentNode; 18236 } 18237 18238 return a; 18239}, 18240 // possible future addition: pass an element to _forceDisplay() and it'll walk up all its ancestors and make sure anything with display: none is set to display: block, and if there's no parentNode, it'll add it to the body. It returns an Array that you can then feed to _revertDisplay() to have it revert all the changes it made. 18241// _forceDisplay = e => { 18242// let a = [], 18243// parent; 18244// while (e && e !== _body) { 18245// parent = e.parentNode; 18246// (_win.getComputedStyle(e).display === "none" || !parent) && a.push(e, e.style.display, parent) && (e.style.display = "block"); 18247// parent || _body.appendChild(e); 18248// e = parent; 18249// } 18250// return a; 18251// }, 18252// _revertDisplay = a => { 18253// for (let i = 0; i < a.length; i+=3) { 18254// a[i+1] ? (a[i].style.display = a[i+1]) : a[i].style.removeProperty("display"); 18255// a[i+2] || a[i].parentNode.removeChild(a[i]); 18256// } 18257// }, 18258_svgTemps = [], 18259 //we create 3 elements for SVG, and 3 for other DOM elements and cache them for performance reasons. They get nested in _divContainer and _svgContainer so that just one element is added to the DOM on each successive attempt. Again, performance is key. 18260_divTemps = [], 18261 _getDocScrollTop = function _getDocScrollTop() { 18262 return _win.pageYOffset || _doc.scrollTop || _docElement.scrollTop || _body.scrollTop || 0; 18263}, 18264 _getDocScrollLeft = function _getDocScrollLeft() { 18265 return _win.pageXOffset || _doc.scrollLeft || _docElement.scrollLeft || _body.scrollLeft || 0; 18266}, 18267 _svgOwner = function _svgOwner(element) { 18268 return element.ownerSVGElement || ((element.tagName + "").toLowerCase() === "svg" ? element : null); 18269}, 18270 _isFixed = function _isFixed(element) { 18271 if (_win.getComputedStyle(element).position === "fixed") { 18272 return true; 18273 } 18274 18275 element = element.parentNode; 18276 18277 if (element && element.nodeType === 1) { 18278 // avoid document fragments which will throw an error. 18279 return _isFixed(element); 18280 } 18281}, 18282 _createSibling = function _createSibling(element, i) { 18283 if (element.parentNode && (_doc || _setDoc(element))) { 18284 var svg = _svgOwner(element), 18285 ns = svg ? svg.getAttribute("xmlns") || "http://www.w3.org/2000/svg" : "http://www.w3.org/1999/xhtml", 18286 type = svg ? i ? "rect" : "g" : "div", 18287 x = i !== 2 ? 0 : 100, 18288 y = i === 3 ? 100 : 0, 18289 css = "position:absolute;display:block;pointer-events:none;margin:0;padding:0;", 18290 e = _doc.createElementNS ? _doc.createElementNS(ns.replace(/^https/, "http"), type) : _doc.createElement(type); 18291 18292 if (i) { 18293 if (!svg) { 18294 if (!_divContainer) { 18295 _divContainer = _createSibling(element); 18296 _divContainer.style.cssText = css; 18297 } 18298 18299 e.style.cssText = css + "width:0.1px;height:0.1px;top:" + y + "px;left:" + x + "px"; 18300 18301 _divContainer.appendChild(e); 18302 } else { 18303 _svgContainer || (_svgContainer = _createSibling(element)); 18304 e.setAttribute("width", 0.01); 18305 e.setAttribute("height", 0.01); 18306 e.setAttribute("transform", "translate(" + x + "," + y + ")"); 18307 18308 _svgContainer.appendChild(e); 18309 } 18310 } 18311 18312 return e; 18313 } 18314 18315 throw "Need document and parent."; 18316}, 18317 _consolidate = function _consolidate(m) { 18318 // replaces SVGTransformList.consolidate() because a bug in Firefox causes it to break pointer events. See https://gsap.com/forums/topic/23248-touch-is-not-working-on-draggable-in-firefox-windows-v324/?tab=comments#comment-109800 18319 var c = new Matrix2D(), 18320 i = 0; 18321 18322 for (; i < m.numberOfItems; i++) { 18323 c.multiply(m.getItem(i).matrix); 18324 } 18325 18326 return c; 18327}, 18328 _getCTM = function _getCTM(svg) { 18329 var m = svg.getCTM(), 18330 transform; 18331 18332 if (!m) { 18333 // Firefox returns null for getCTM() on root <svg> elements, so this is a workaround using a <g> that we temporarily append. 18334 transform = svg.style[_transformProp]; 18335 svg.style[_transformProp] = "none"; // a bug in Firefox causes css transforms to contaminate the getCTM() 18336 18337 svg.appendChild(_gEl); 18338 m = _gEl.getCTM(); 18339 svg.removeChild(_gEl); 18340 transform ? svg.style[_transformProp] = transform : svg.style.removeProperty(_transformProp.replace(/([A-Z])/g, "-$1").toLowerCase()); 18341 } 18342 18343 return m || _identityMatrix.clone(); // Firefox will still return null if the <svg> has a width/height of 0 in the browser. 18344}, 18345 _placeSiblings = function _placeSiblings(element, adjustGOffset) { 18346 var svg = _svgOwner(element), 18347 isRootSVG = element === svg, 18348 siblings = svg ? _svgTemps : _divTemps, 18349 parent = element.parentNode, 18350 container, 18351 m, 18352 b, 18353 x, 18354 y, 18355 cs; 18356 18357 if (element === _win) { 18358 return element; 18359 } 18360 18361 siblings.length || siblings.push(_createSibling(element, 1), _createSibling(element, 2), _createSibling(element, 3)); 18362 container = svg ? _svgContainer : _divContainer; 18363 18364 if (svg) { 18365 if (isRootSVG) { 18366 b = _getCTM(element); 18367 x = -b.e / b.a; 18368 y = -b.f / b.d; 18369 m = _identityMatrix; 18370 } else if (element.getBBox) { 18371 b = element.getBBox(); 18372 m = element.transform ? element.transform.baseVal : {}; // IE11 doesn't follow the spec. 18373 18374 m = !m.numberOfItems ? _identityMatrix : m.numberOfItems > 1 ? _consolidate(m) : m.getItem(0).matrix; // don't call m.consolidate().matrix because a bug in Firefox makes pointer events not work when consolidate() is called on the same tick as getBoundingClientRect()! See https://gsap.com/forums/topic/23248-touch-is-not-working-on-draggable-in-firefox-windows-v324/?tab=comments#comment-109800 18375 18376 x = m.a * b.x + m.c * b.y; 18377 y = m.b * b.x + m.d * b.y; 18378 } else { 18379 // may be a <mask> which has no getBBox() so just use defaults instead of throwing errors. 18380 m = new Matrix2D(); 18381 x = y = 0; 18382 } 18383 18384 if (adjustGOffset && element.tagName.toLowerCase() === "g") { 18385 x = y = 0; 18386 } 18387 18388 (isRootSVG ? svg : parent).appendChild(container); 18389 container.setAttribute("transform", "matrix(" + m.a + "," + m.b + "," + m.c + "," + m.d + "," + (m.e + x) + "," + (m.f + y) + ")"); 18390 } else { 18391 x = y = 0; 18392 18393 if (_hasOffsetBug) { 18394 // some browsers (like Safari) have a bug that causes them to misreport offset values. When an ancestor element has a transform applied, it's supposed to treat it as if it's position: relative (new context). Safari botches this, so we need to find the closest ancestor (between the element and its offsetParent) that has a transform applied and if one is found, grab its offsetTop/Left and subtract them to compensate. 18395 m = element.offsetParent; 18396 b = element; 18397 18398 while (b && (b = b.parentNode) && b !== m && b.parentNode) { 18399 if ((_win.getComputedStyle(b)[_transformProp] + "").length > 4) { 18400 x = b.offsetLeft; 18401 y = b.offsetTop; 18402 b = 0; 18403 } 18404 } 18405 } 18406 18407 cs = _win.getComputedStyle(element); 18408 18409 if (cs.position !== "absolute" && cs.position !== "fixed") { 18410 m = element.offsetParent; 18411 18412 while (parent && parent !== m) { 18413 // if there's an ancestor element between the element and its offsetParent that's scrolled, we must factor that in. 18414 x += parent.scrollLeft || 0; 18415 y += parent.scrollTop || 0; 18416 parent = parent.parentNode; 18417 } 18418 } 18419 18420 b = container.style; 18421 b.top = element.offsetTop - y + "px"; 18422 b.left = element.offsetLeft - x + "px"; 18423 b[_transformProp] = cs[_transformProp]; 18424 b[_transformOriginProp] = cs[_transformOriginProp]; // b.border = m.border; 18425 // b.borderLeftStyle = m.borderLeftStyle; 18426 // b.borderTopStyle = m.borderTopStyle; 18427 // b.borderLeftWidth = m.borderLeftWidth; 18428 // b.borderTopWidth = m.borderTopWidth; 18429 18430 b.position = cs.position === "fixed" ? "fixed" : "absolute"; 18431 element.parentNode.appendChild(container); 18432 } 18433 18434 return container; 18435}, 18436 _setMatrix = function _setMatrix(m, a, b, c, d, e, f) { 18437 m.a = a; 18438 m.b = b; 18439 m.c = c; 18440 m.d = d; 18441 m.e = e; 18442 m.f = f; 18443 return m; 18444}; 18445 18446var Matrix2D = /*#__PURE__*/function () { 18447 function Matrix2D(a, b, c, d, e, f) { 18448 if (a === void 0) { 18449 a = 1; 18450 } 18451 18452 if (b === void 0) { 18453 b = 0; 18454 } 18455 18456 if (c === void 0) { 18457 c = 0; 18458 } 18459 18460 if (d === void 0) { 18461 d = 1; 18462 } 18463 18464 if (e === void 0) { 18465 e = 0; 18466 } 18467 18468 if (f === void 0) { 18469 f = 0; 18470 } 18471 18472 _setMatrix(this, a, b, c, d, e, f); 18473 } 18474 18475 var _proto = Matrix2D.prototype; 18476 18477 _proto.inverse = function inverse() { 18478 var a = this.a, 18479 b = this.b, 18480 c = this.c, 18481 d = this.d, 18482 e = this.e, 18483 f = this.f, 18484 determinant = a * d - b * c || 1e-10; 18485 return _setMatrix(this, d / determinant, -b / determinant, -c / determinant, a / determinant, (c * f - d * e) / determinant, -(a * f - b * e) / determinant); 18486 }; 18487 18488 _proto.multiply = function multiply(matrix) { 18489 var a = this.a, 18490 b = this.b, 18491 c = this.c, 18492 d = this.d, 18493 e = this.e, 18494 f = this.f, 18495 a2 = matrix.a, 18496 b2 = matrix.c, 18497 c2 = matrix.b, 18498 d2 = matrix.d, 18499 e2 = matrix.e, 18500 f2 = matrix.f; 18501 return _setMatrix(this, a2 * a + c2 * c, a2 * b + c2 * d, b2 * a + d2 * c, b2 * b + d2 * d, e + e2 * a + f2 * c, f + e2 * b + f2 * d); 18502 }; 18503 18504 _proto.clone = function clone() { 18505 return new Matrix2D(this.a, this.b, this.c, this.d, this.e, this.f); 18506 }; 18507 18508 _proto.equals = function equals(matrix) { 18509 var a = this.a, 18510 b = this.b, 18511 c = this.c, 18512 d = this.d, 18513 e = this.e, 18514 f = this.f; 18515 return a === matrix.a && b === matrix.b && c === matrix.c && d === matrix.d && e === matrix.e && f === matrix.f; 18516 }; 18517 18518 _proto.apply = function apply(point, decoratee) { 18519 if (decoratee === void 0) { 18520 decoratee = {}; 18521 } 18522 18523 var x = point.x, 18524 y = point.y, 18525 a = this.a, 18526 b = this.b, 18527 c = this.c, 18528 d = this.d, 18529 e = this.e, 18530 f = this.f; 18531 decoratee.x = x * a + y * c + e || 0; 18532 decoratee.y = x * b + y * d + f || 0; 18533 return decoratee; 18534 }; 18535 18536 return Matrix2D; 18537}(); // Feed in an element and it'll return a 2D matrix (optionally inverted) so that you can translate between coordinate spaces. 18538// Inverting lets you translate a global point into a local coordinate space. No inverting lets you go the other way. 18539// We needed this to work around various browser bugs, like Firefox doesn't accurately report getScreenCTM() when there 18540// are transforms applied to ancestor elements. 18541// The matrix math to convert any x/y coordinate is as follows, which is wrapped in a convenient apply() method of Matrix2D above: 18542// tx = m.a * x + m.c * y + m.e 18543// ty = m.b * x + m.d * y + m.f 18544 18545function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollInFixed) { 18546 // adjustGOffset is typically used only when grabbing an element's PARENT's global matrix, and it ignores the x/y offset of any SVG <g> elements because they behave in a special way. 18547 if (!element || !element.parentNode || (_doc || _setDoc(element)).documentElement === element) { 18548 return new Matrix2D(); 18549 } 18550 18551 var zeroScales = _forceNonZeroScale(element), 18552 svg = _svgOwner(element), 18553 temps = svg ? _svgTemps : _divTemps, 18554 container = _placeSiblings(element, adjustGOffset), 18555 b1 = temps[0].getBoundingClientRect(), 18556 b2 = temps[1].getBoundingClientRect(), 18557 b3 = temps[2].getBoundingClientRect(), 18558 parent = container.parentNode, 18559 isFixed = !includeScrollInFixed && _isFixed(element), 18560 m = new Matrix2D((b2.left - b1.left) / 100, (b2.top - b1.top) / 100, (b3.left - b1.left) / 100, (b3.top - b1.top) / 100, b1.left + (isFixed ? 0 : _getDocScrollLeft()), b1.top + (isFixed ? 0 : _getDocScrollTop())); 18561 18562 parent.removeChild(container); 18563 18564 if (zeroScales) { 18565 b1 = zeroScales.length; 18566 18567 while (b1--) { 18568 b2 = zeroScales[b1]; 18569 b2.scaleX = b2.scaleY = 0; 18570 b2.renderTransform(1, b2); 18571 } 18572 } 18573 18574 return inverse ? m.inverse() : m; 18575} 18576 // export function getMatrix(element) { 18577// _doc || _setDoc(element); 18578// let m = (_win.getComputedStyle(element)[_transformProp] + "").substr(7).match(/[-.]*\d+[.e\-+]*\d*[e\-\+]*\d*/g), 18579// is2D = m && m.length === 6; 18580// return !m || m.length < 6 ? new Matrix2D() : new Matrix2D(+m[0], +m[1], +m[is2D ? 2 : 4], +m[is2D ? 3 : 5], +m[is2D ? 4 : 12], +m[is2D ? 5 : 13]); 18581// } 18582 18583/***/ }), 18584
vendor: 50,801 bytes, lines 18585-20101
18585/***/ "./node_modules/gsap/utils/paths.js": 18586/*!******************************************!*\ 18587 !*** ./node_modules/gsap/utils/paths.js ***! 18588 \******************************************/ 18589/*! exports provided: getRawPath, copyRawPath, reverseSegment, convertToPath, getRotationAtProgress, sliceRawPath, cacheRawPathMeasurements, subdivideSegment, getPositionOnPath, transformRawPath, stringToRawPath, bezierToPoints, flatPointsToSegment, pointsToSegment, simplifyPoints, getClosestData, subdivideSegmentNear, rawPathToString */ 18590/***/ (function(module, __webpack_exports__, __webpack_require__) { 18591 18592"use strict"; 18593__webpack_require__.r(__webpack_exports__); 18594/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRawPath", function() { return getRawPath; }); 18595/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "copyRawPath", function() { return copyRawPath; }); 18596/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "reverseSegment", function() { return reverseSegment; }); 18597/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "convertToPath", function() { return convertToPath; }); 18598/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRotationAtProgress", function() { return getRotationAtProgress; }); 18599/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sliceRawPath", function() { return sliceRawPath; }); 18600/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cacheRawPathMeasurements", function() { return cacheRawPathMeasurements; }); 18601/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subdivideSegment", function() { return subdivideSegment; }); 18602/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPositionOnPath", function() { return getPositionOnPath; }); 18603/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformRawPath", function() { return transformRawPath; }); 18604/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringToRawPath", function() { return stringToRawPath; }); 18605/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bezierToPoints", function() { return bezierToPoints; }); 18606/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "flatPointsToSegment", function() { return flatPointsToSegment; }); 18607/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pointsToSegment", function() { return pointsToSegment; }); 18608/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "simplifyPoints", function() { return simplifyPoints; }); 18609/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getClosestData", function() { return getClosestData; }); 18610/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "subdivideSegmentNear", function() { return subdivideSegmentNear; }); 18611/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rawPathToString", function() { return rawPathToString; }); 18612/*! 18613 * paths 3.12.5 18614 * https://gsap.com 18615 * 18616 * Copyright 2008-2024, GreenSock. All rights reserved. 18617 * Subject to the terms at https://gsap.com/standard-license or for 18618 * Club GSAP members, the agreement issued with that membership. 18619 * @author: Jack Doyle, [email protected] 18620*/ 18621 18622/* eslint-disable */ 18623var _svgPathExp = /[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig, 18624 _numbersExp = /(?:(-)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig, 18625 _scientific = /[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig, 18626 _selectorExp = /(^[#\.][a-z]|[a-y][a-z])/i, 18627 _DEG2RAD = Math.PI / 180, 18628 _RAD2DEG = 180 / Math.PI, 18629 _sin = Math.sin, 18630 _cos = Math.cos, 18631 _abs = Math.abs, 18632 _sqrt = Math.sqrt, 18633 _atan2 = Math.atan2, 18634 _largeNum = 1e8, 18635 _isString = function _isString(value) { 18636 return typeof value === "string"; 18637}, 18638 _isNumber = function _isNumber(value) { 18639 return typeof value === "number"; 18640}, 18641 _isUndefined = function _isUndefined(value) { 18642 return typeof value === "undefined"; 18643}, 18644 _temp = {}, 18645 _temp2 = {}, 18646 _roundingNum = 1e5, 18647 _wrapProgress = function _wrapProgress(progress) { 18648 return Math.round((progress + _largeNum) % 1 * _roundingNum) / _roundingNum || (progress < 0 ? 0 : 1); 18649}, 18650 //if progress lands on 1, the % will make it 0 which is why we || 1, but not if it's negative because it makes more sense for motion to end at 0 in that case. 18651_round = function _round(value) { 18652 return Math.round(value * _roundingNum) / _roundingNum || 0; 18653}, 18654 _roundPrecise = function _roundPrecise(value) { 18655 return Math.round(value * 1e10) / 1e10 || 0; 18656}, 18657 _splitSegment = function _splitSegment(rawPath, segIndex, i, t) { 18658 var segment = rawPath[segIndex], 18659 shift = t === 1 ? 6 : subdivideSegment(segment, i, t); 18660 18661 if ((shift || !t) && shift + i + 2 < segment.length) { 18662 rawPath.splice(segIndex, 0, segment.slice(0, i + shift + 2)); 18663 segment.splice(0, i + shift); 18664 return 1; 18665 } 18666}, 18667 _getSampleIndex = function _getSampleIndex(samples, length, progress) { 18668 // slightly slower way than doing this (when there's no lookup): segment.lookup[progress < 1 ? ~~(length / segment.minLength) : segment.lookup.length - 1] || 0; 18669 var l = samples.length, 18670 i = ~~(progress * l); 18671 18672 if (samples[i] > length) { 18673 while (--i && samples[i] > length) {} 18674 18675 i < 0 && (i = 0); 18676 } else { 18677 while (samples[++i] < length && i < l) {} 18678 } 18679 18680 return i < l ? i : l - 1; 18681}, 18682 _reverseRawPath = function _reverseRawPath(rawPath, skipOuter) { 18683 var i = rawPath.length; 18684 skipOuter || rawPath.reverse(); 18685 18686 while (i--) { 18687 rawPath[i].reversed || reverseSegment(rawPath[i]); 18688 } 18689}, 18690 _copyMetaData = function _copyMetaData(source, copy) { 18691 copy.totalLength = source.totalLength; 18692 18693 if (source.samples) { 18694 //segment 18695 copy.samples = source.samples.slice(0); 18696 copy.lookup = source.lookup.slice(0); 18697 copy.minLength = source.minLength; 18698 copy.resolution = source.resolution; 18699 } else if (source.totalPoints) { 18700 //rawPath 18701 copy.totalPoints = source.totalPoints; 18702 } 18703 18704 return copy; 18705}, 18706 //pushes a new segment into a rawPath, but if its starting values match the ending values of the last segment, it'll merge it into that same segment (to reduce the number of segments) 18707_appendOrMerge = function _appendOrMerge(rawPath, segment) { 18708 var index = rawPath.length, 18709 prevSeg = rawPath[index - 1] || [], 18710 l = prevSeg.length; 18711 18712 if (index && segment[0] === prevSeg[l - 2] && segment[1] === prevSeg[l - 1]) { 18713 segment = prevSeg.concat(segment.slice(2)); 18714 index--; 18715 } 18716 18717 rawPath[index] = segment; 18718}, 18719 _bestDistance; 18720/* TERMINOLOGY 18721 - RawPath - an array of arrays, one for each Segment. A single RawPath could have multiple "M" commands, defining Segments (paths aren't always connected). 18722 - Segment - an array containing a sequence of Cubic Bezier coordinates in alternating x, y, x, y format. Starting anchor, then control point 1, control point 2, and ending anchor, then the next control point 1, control point 2, anchor, etc. Uses less memory than an array with a bunch of {x, y} points. 18723 - Bezier - a single cubic Bezier with a starting anchor, two control points, and an ending anchor. 18724 - the variable "t" is typically the position along an individual Bezier path (time) and it's NOT linear, meaning it could accelerate/decelerate based on the control points whereas the "p" or "progress" value is linearly mapped to the whole path, so it shouldn't really accelerate/decelerate based on control points. So a progress of 0.2 would be almost exactly 20% along the path. "t" is ONLY in an individual Bezier piece. 18725 */ 18726//accepts basic selector text, a path instance, a RawPath instance, or a Segment and returns a RawPath (makes it easy to homogenize things). If an element or selector text is passed in, it'll also cache the value so that if it's queried again, it'll just take the path data from there instead of parsing it all over again (as long as the path data itself hasn't changed - it'll check). 18727 18728 18729function getRawPath(value) { 18730 value = _isString(value) && _selectorExp.test(value) ? document.querySelector(value) || value : value; 18731 var e = value.getAttribute ? value : 0, 18732 rawPath; 18733 18734 if (e && (value = value.getAttribute("d"))) { 18735 //implements caching 18736 if (!e._gsPath) { 18737 e._gsPath = {}; 18738 } 18739 18740 rawPath = e._gsPath[value]; 18741 return rawPath && !rawPath._dirty ? rawPath : e._gsPath[value] = stringToRawPath(value); 18742 } 18743 18744 return !value ? console.warn("Expecting a <path> element or an SVG path data string") : _isString(value) ? stringToRawPath(value) : _isNumber(value[0]) ? [value] : value; 18745} //copies a RawPath WITHOUT the length meta data (for speed) 18746 18747function copyRawPath(rawPath) { 18748 var a = [], 18749 i = 0; 18750 18751 for (; i < rawPath.length; i++) { 18752 a[i] = _copyMetaData(rawPath[i], rawPath[i].slice(0)); 18753 } 18754 18755 return _copyMetaData(rawPath, a); 18756} 18757function reverseSegment(segment) { 18758 var i = 0, 18759 y; 18760 segment.reverse(); //this will invert the order y, x, y, x so we must flip it back. 18761 18762 for (; i < segment.length; i += 2) { 18763 y = segment[i]; 18764 segment[i] = segment[i + 1]; 18765 segment[i + 1] = y; 18766 } 18767 18768 segment.reversed = !segment.reversed; 18769} 18770 18771var _createPath = function _createPath(e, ignore) { 18772 var path = document.createElementNS("http://www.w3.org/2000/svg", "path"), 18773 attr = [].slice.call(e.attributes), 18774 i = attr.length, 18775 name; 18776 ignore = "," + ignore + ","; 18777 18778 while (--i > -1) { 18779 name = attr[i].nodeName.toLowerCase(); //in Microsoft Edge, if you don't set the attribute with a lowercase name, it doesn't render correctly! Super weird. 18780 18781 if (ignore.indexOf("," + name + ",") < 0) { 18782 path.setAttributeNS(null, name, attr[i].nodeValue); 18783 } 18784 } 18785 18786 return path; 18787}, 18788 _typeAttrs = { 18789 rect: "rx,ry,x,y,width,height", 18790 circle: "r,cx,cy", 18791 ellipse: "rx,ry,cx,cy", 18792 line: "x1,x2,y1,y2" 18793}, 18794 _attrToObj = function _attrToObj(e, attrs) { 18795 var props = attrs ? attrs.split(",") : [], 18796 obj = {}, 18797 i = props.length; 18798 18799 while (--i > -1) { 18800 obj[props[i]] = +e.getAttribute(props[i]) || 0; 18801 } 18802 18803 return obj; 18804}; //converts an SVG shape like <circle>, <rect>, <polygon>, <polyline>, <ellipse>, etc. to a <path>, swapping it in and copying the attributes to match. 18805 18806 18807function convertToPath(element, swap) { 18808 var type = element.tagName.toLowerCase(), 18809 circ = 0.552284749831, 18810 data, 18811 x, 18812 y, 18813 r, 18814 ry, 18815 path, 18816 rcirc, 18817 rycirc, 18818 points, 18819 w, 18820 h, 18821 x2, 18822 x3, 18823 x4, 18824 x5, 18825 x6, 18826 y2, 18827 y3, 18828 y4, 18829 y5, 18830 y6, 18831 attr; 18832 18833 if (type === "path" || !element.getBBox) { 18834 return element; 18835 } 18836 18837 path = _createPath(element, "x,y,width,height,cx,cy,rx,ry,r,x1,x2,y1,y2,points"); 18838 attr = _attrToObj(element, _typeAttrs[type]); 18839 18840 if (type === "rect") { 18841 r = attr.rx; 18842 ry = attr.ry || r; 18843 x = attr.x; 18844 y = attr.y; 18845 w = attr.width - r * 2; 18846 h = attr.height - ry * 2; 18847 18848 if (r || ry) { 18849 //if there are rounded corners, render cubic beziers 18850 x2 = x + r * (1 - circ); 18851 x3 = x + r; 18852 x4 = x3 + w; 18853 x5 = x4 + r * circ; 18854 x6 = x4 + r; 18855 y2 = y + ry * (1 - circ); 18856 y3 = y + ry; 18857 y4 = y3 + h; 18858 y5 = y4 + ry * circ; 18859 y6 = y4 + ry; 18860 data = "M" + x6 + "," + y3 + " V" + y4 + " C" + [x6, y5, x5, y6, x4, y6, x4 - (x4 - x3) / 3, y6, x3 + (x4 - x3) / 3, y6, x3, y6, x2, y6, x, y5, x, y4, x, y4 - (y4 - y3) / 3, x, y3 + (y4 - y3) / 3, x, y3, x, y2, x2, y, x3, y, x3 + (x4 - x3) / 3, y, x4 - (x4 - x3) / 3, y, x4, y, x5, y, x6, y2, x6, y3].join(",") + "z"; 18861 } else { 18862 data = "M" + (x + w) + "," + y + " v" + h + " h" + -w + " v" + -h + " h" + w + "z"; 18863 } 18864 } else if (type === "circle" || type === "ellipse") { 18865 if (type === "circle") { 18866 r = ry = attr.r; 18867 rycirc = r * circ; 18868 } else { 18869 r = attr.rx; 18870 ry = attr.ry; 18871 rycirc = ry * circ; 18872 } 18873 18874 x = attr.cx; 18875 y = attr.cy; 18876 rcirc = r * circ; 18877 data = "M" + (x + r) + "," + y + " C" + [x + r, y + rycirc, x + rcirc, y + ry, x, y + ry, x - rcirc, y + ry, x - r, y + rycirc, x - r, y, x - r, y - rycirc, x - rcirc, y - ry, x, y - ry, x + rcirc, y - ry, x + r, y - rycirc, x + r, y].join(",") + "z"; 18878 } else if (type === "line") { 18879 data = "M" + attr.x1 + "," + attr.y1 + " L" + attr.x2 + "," + attr.y2; //previously, we just converted to "Mx,y Lx,y" but Safari has bugs that cause that not to render properly when using a stroke-dasharray that's not fully visible! Using a cubic bezier fixes that issue. 18880 } else if (type === "polyline" || type === "polygon") { 18881 points = (element.getAttribute("points") + "").match(_numbersExp) || []; 18882 x = points.shift(); 18883 y = points.shift(); 18884 data = "M" + x + "," + y + " L" + points.join(","); 18885 18886 if (type === "polygon") { 18887 data += "," + x + "," + y + "z"; 18888 } 18889 } 18890 18891 path.setAttribute("d", rawPathToString(path._gsRawPath = stringToRawPath(data))); 18892 18893 if (swap && element.parentNode) { 18894 element.parentNode.insertBefore(path, element); 18895 element.parentNode.removeChild(element); 18896 } 18897 18898 return path; 18899} //returns the rotation (in degrees) at a particular progress on a rawPath (the slope of the tangent) 18900 18901function getRotationAtProgress(rawPath, progress) { 18902 var d = getProgressData(rawPath, progress >= 1 ? 1 - 1e-9 : progress ? progress : 1e-9); 18903 return getRotationAtBezierT(d.segment, d.i, d.t); 18904} 18905 18906function getRotationAtBezierT(segment, i, t) { 18907 var a = segment[i], 18908 b = segment[i + 2], 18909 c = segment[i + 4], 18910 x; 18911 a += (b - a) * t; 18912 b += (c - b) * t; 18913 a += (b - a) * t; 18914 x = b + (c + (segment[i + 6] - c) * t - b) * t - a; 18915 a = segment[i + 1]; 18916 b = segment[i + 3]; 18917 c = segment[i + 5]; 18918 a += (b - a) * t; 18919 b += (c - b) * t; 18920 a += (b - a) * t; 18921 return _round(_atan2(b + (c + (segment[i + 7] - c) * t - b) * t - a, x) * _RAD2DEG); 18922} 18923 18924function sliceRawPath(rawPath, start, end) { 18925 end = _isUndefined(end) ? 1 : _roundPrecise(end) || 0; // we must round to avoid issues like 4.15 / 8 = 0.8300000000000001 instead of 0.83 or 2.8 / 5 = 0.5599999999999999 instead of 0.56 and if someone is doing a loop like start: 2.8 / 0.5, end: 2.8 / 0.5 + 1. 18926 18927 start = _roundPrecise(start) || 0; 18928 var loops = Math.max(0, ~~(_abs(end - start) - 1e-8)), 18929 path = copyRawPath(rawPath); 18930 18931 if (start > end) { 18932 start = 1 - start; 18933 end = 1 - end; 18934 18935 _reverseRawPath(path); 18936 18937 path.totalLength = 0; 18938 } 18939 18940 if (start < 0 || end < 0) { 18941 var offset = Math.abs(~~Math.min(start, end)) + 1; 18942 start += offset; 18943 end += offset; 18944 } 18945 18946 path.totalLength || cacheRawPathMeasurements(path); 18947 var wrap = end > 1, 18948 s = getProgressData(path, start, _temp, true), 18949 e = getProgressData(path, end, _temp2), 18950 eSeg = e.segment, 18951 sSeg = s.segment, 18952 eSegIndex = e.segIndex, 18953 sSegIndex = s.segIndex, 18954 ei = e.i, 18955 si = s.i, 18956 sameSegment = sSegIndex === eSegIndex, 18957 sameBezier = ei === si && sameSegment, 18958 wrapsBehind, 18959 sShift, 18960 eShift, 18961 i, 18962 copy, 18963 totalSegments, 18964 l, 18965 j; 18966 18967 if (wrap || loops) { 18968 wrapsBehind = eSegIndex < sSegIndex || sameSegment && ei < si || sameBezier && e.t < s.t; 18969 18970 if (_splitSegment(path, sSegIndex, si, s.t)) { 18971 sSegIndex++; 18972 18973 if (!wrapsBehind) { 18974 eSegIndex++; 18975 18976 if (sameBezier) { 18977 e.t = (e.t - s.t) / (1 - s.t); 18978 ei = 0; 18979 } else if (sameSegment) { 18980 ei -= si; 18981 } 18982 } 18983 } 18984 18985 if (Math.abs(1 - (end - start)) < 1e-5) { 18986 eSegIndex = sSegIndex - 1; 18987 } else if (!e.t && eSegIndex) { 18988 eSegIndex--; 18989 } else if (_splitSegment(path, eSegIndex, ei, e.t) && wrapsBehind) { 18990 sSegIndex++; 18991 } 18992 18993 if (s.t === 1) { 18994 sSegIndex = (sSegIndex + 1) % path.length; 18995 } 18996 18997 copy = []; 18998 totalSegments = path.length; 18999 l = 1 + totalSegments * loops; 19000 j = sSegIndex; 19001 l += (totalSegments - sSegIndex + eSegIndex) % totalSegments; 19002 19003 for (i = 0; i < l; i++) { 19004 _appendOrMerge(copy, path[j++ % totalSegments]); 19005 } 19006 19007 path = copy; 19008 } else { 19009 eShift = e.t === 1 ? 6 : subdivideSegment(eSeg, ei, e.t); 19010 19011 if (start !== end) { 19012 sShift = subdivideSegment(sSeg, si, sameBezier ? s.t / e.t : s.t); 19013 sameSegment && (eShift += sShift); 19014 eSeg.splice(ei + eShift + 2); 19015 (sShift || si) && sSeg.splice(0, si + sShift); 19016 i = path.length; 19017 19018 while (i--) { 19019 //chop off any extra segments 19020 (i < sSegIndex || i > eSegIndex) && path.splice(i, 1); 19021 } 19022 } else { 19023 eSeg.angle = getRotationAtBezierT(eSeg, ei + eShift, 0); //record the value before we chop because it'll be impossible to determine the angle after its length is 0! 19024 19025 ei += eShift; 19026 s = eSeg[ei]; 19027 e = eSeg[ei + 1]; 19028 eSeg.length = eSeg.totalLength = 0; 19029 eSeg.totalPoints = path.totalPoints = 8; 19030 eSeg.push(s, e, s, e, s, e, s, e); 19031 } 19032 } 19033 19034 path.totalLength = 0; 19035 return path; 19036} //measures a Segment according to its resolution (so if segment.resolution is 6, for example, it'll take 6 samples equally across each Bezier) and create/populate a "samples" Array that has the length up to each of those sample points (always increasing from the start) as well as a "lookup" array that's broken up according to the smallest distance between 2 samples. This gives us a very fast way of looking up a progress position rather than looping through all the points/Beziers. You can optionally have it only measure a subset, starting at startIndex and going for a specific number of beziers (remember, there are 3 x/y pairs each, for a total of 6 elements for each Bezier). It will also populate a "totalLength" property, but that's not generally super accurate because by default it'll only take 6 samples per Bezier. But for performance reasons, it's perfectly adequate for measuring progress values along the path. If you need a more accurate totalLength, either increase the resolution or use the more advanced bezierToPoints() method which keeps adding points until they don't deviate by more than a certain precision value. 19037 19038function measureSegment(segment, startIndex, bezierQty) { 19039 startIndex = startIndex || 0; 19040 19041 if (!segment.samples) { 19042 segment.samples = []; 19043 segment.lookup = []; 19044 } 19045 19046 var resolution = ~~segment.resolution || 12, 19047 inc = 1 / resolution, 19048 endIndex = bezierQty ? startIndex + bezierQty * 6 + 1 : segment.length, 19049 x1 = segment[startIndex], 19050 y1 = segment[startIndex + 1], 19051 samplesIndex = startIndex ? startIndex / 6 * resolution : 0, 19052 samples = segment.samples, 19053 lookup = segment.lookup, 19054 min = (startIndex ? segment.minLength : _largeNum) || _largeNum, 19055 prevLength = samples[samplesIndex + bezierQty * resolution - 1], 19056 length = startIndex ? samples[samplesIndex - 1] : 0, 19057 i, 19058 j, 19059 x4, 19060 x3, 19061 x2, 19062 xd, 19063 xd1, 19064 y4, 19065 y3, 19066 y2, 19067 yd, 19068 yd1, 19069 inv, 19070 t, 19071 lengthIndex, 19072 l, 19073 segLength; 19074 samples.length = lookup.length = 0; 19075 19076 for (j = startIndex + 2; j < endIndex; j += 6) { 19077 x4 = segment[j + 4] - x1; 19078 x3 = segment[j + 2] - x1; 19079 x2 = segment[j] - x1; 19080 y4 = segment[j + 5] - y1; 19081 y3 = segment[j + 3] - y1; 19082 y2 = segment[j + 1] - y1; 19083 xd = xd1 = yd = yd1 = 0; 19084 19085 if (_abs(x4) < .01 && _abs(y4) < .01 && _abs(x2) + _abs(y2) < .01) { 19086 //dump points that are sufficiently close (basically right on top of each other, making a bezier super tiny or 0 length) 19087 if (segment.length > 8) { 19088 segment.splice(j, 6); 19089 j -= 6; 19090 endIndex -= 6; 19091 } 19092 } else { 19093 for (i = 1; i <= resolution; i++) { 19094 t = inc * i; 19095 inv = 1 - t; 19096 xd = xd1 - (xd1 = (t * t * x4 + 3 * inv * (t * x3 + inv * x2)) * t); 19097 yd = yd1 - (yd1 = (t * t * y4 + 3 * inv * (t * y3 + inv * y2)) * t); 19098 l = _sqrt(yd * yd + xd * xd); 19099 19100 if (l < min) { 19101 min = l; 19102 } 19103 19104 length += l; 19105 samples[samplesIndex++] = length; 19106 } 19107 } 19108 19109 x1 += x4; 19110 y1 += y4; 19111 } 19112 19113 if (prevLength) { 19114 prevLength -= length; 19115 19116 for (; samplesIndex < samples.length; samplesIndex++) { 19117 samples[samplesIndex] += prevLength; 19118 } 19119 } 19120 19121 if (samples.length && min) { 19122 segment.totalLength = segLength = samples[samples.length - 1] || 0; 19123 segment.minLength = min; 19124 19125 if (segLength / min < 9999) { 19126 // if the lookup would require too many values (memory problem), we skip this and instead we use a loop to lookup values directly in the samples Array 19127 l = lengthIndex = 0; 19128 19129 for (i = 0; i < segLength; i += min) { 19130 lookup[l++] = samples[lengthIndex] < i ? ++lengthIndex : lengthIndex; 19131 } 19132 } 19133 } else { 19134 segment.totalLength = samples[0] = 0; 19135 } 19136 19137 return startIndex ? length - samples[startIndex / 2 - 1] : length; 19138} 19139 19140function cacheRawPathMeasurements(rawPath, resolution) { 19141 var pathLength, points, i; 19142 19143 for (i = pathLength = points = 0; i < rawPath.length; i++) { 19144 rawPath[i].resolution = ~~resolution || 12; //steps per Bezier curve (anchor, 2 control points, to anchor) 19145 19146 points += rawPath[i].length; 19147 pathLength += measureSegment(rawPath[i]); 19148 } 19149 19150 rawPath.totalPoints = points; 19151 rawPath.totalLength = pathLength; 19152 return rawPath; 19153} //divide segment[i] at position t (value between 0 and 1, progress along that particular cubic bezier segment that starts at segment[i]). Returns how many elements were spliced into the segment array (either 0 or 6) 19154 19155function subdivideSegment(segment, i, t) { 19156 if (t <= 0 || t >= 1) { 19157 return 0; 19158 } 19159 19160 var ax = segment[i], 19161 ay = segment[i + 1], 19162 cp1x = segment[i + 2], 19163 cp1y = segment[i + 3], 19164 cp2x = segment[i + 4], 19165 cp2y = segment[i + 5], 19166 bx = segment[i + 6], 19167 by = segment[i + 7], 19168 x1a = ax + (cp1x - ax) * t, 19169 x2 = cp1x + (cp2x - cp1x) * t, 19170 y1a = ay + (cp1y - ay) * t, 19171 y2 = cp1y + (cp2y - cp1y) * t, 19172 x1 = x1a + (x2 - x1a) * t, 19173 y1 = y1a + (y2 - y1a) * t, 19174 x2a = cp2x + (bx - cp2x) * t, 19175 y2a = cp2y + (by - cp2y) * t; 19176 x2 += (x2a - x2) * t; 19177 y2 += (y2a - y2) * t; 19178 segment.splice(i + 2, 4, _round(x1a), //first control point 19179 _round(y1a), _round(x1), //second control point 19180 _round(y1), _round(x1 + (x2 - x1) * t), //new fabricated anchor on line 19181 _round(y1 + (y2 - y1) * t), _round(x2), //third control point 19182 _round(y2), _round(x2a), //fourth control point 19183 _round(y2a)); 19184 segment.samples && segment.samples.splice(i / 6 * segment.resolution | 0, 0, 0, 0, 0, 0, 0, 0); 19185 return 6; 19186} // returns an object {path, segment, segIndex, i, t} 19187 19188function getProgressData(rawPath, progress, decoratee, pushToNextIfAtEnd) { 19189 decoratee = decoratee || {}; 19190 rawPath.totalLength || cacheRawPathMeasurements(rawPath); 19191 19192 if (progress < 0 || progress > 1) { 19193 progress = _wrapProgress(progress); 19194 } 19195 19196 var segIndex = 0, 19197 segment = rawPath[0], 19198 samples, 19199 resolution, 19200 length, 19201 min, 19202 max, 19203 i, 19204 t; 19205 19206 if (!progress) { 19207 t = i = segIndex = 0; 19208 segment = rawPath[0]; 19209 } else if (progress === 1) { 19210 t = 1; 19211 segIndex = rawPath.length - 1; 19212 segment = rawPath[segIndex]; 19213 i = segment.length - 8; 19214 } else { 19215 if (rawPath.length > 1) { 19216 //speed optimization: most of the time, there's only one segment so skip the recursion. 19217 length = rawPath.totalLength * progress; 19218 max = i = 0; 19219 19220 while ((max += rawPath[i++].totalLength) < length) { 19221 segIndex = i; 19222 } 19223 19224 segment = rawPath[segIndex]; 19225 min = max - segment.totalLength; 19226 progress = (length - min) / (max - min) || 0; 19227 } 19228 19229 samples = segment.samples; 19230 resolution = segment.resolution; //how many samples per cubic bezier chunk 19231 19232 length = segment.totalLength * progress; 19233 i = segment.lookup.length ? segment.lookup[~~(length / segment.minLength)] || 0 : _getSampleIndex(samples, length, progress); 19234 min = i ? samples[i - 1] : 0; 19235 max = samples[i]; 19236 19237 if (max < length) { 19238 min = max; 19239 max = samples[++i]; 19240 } 19241 19242 t = 1 / resolution * ((length - min) / (max - min) + i % resolution); 19243 i = ~~(i / resolution) * 6; 19244 19245 if (pushToNextIfAtEnd && t === 1) { 19246 if (i + 6 < segment.length) { 19247 i += 6; 19248 t = 0; 19249 } else if (segIndex + 1 < rawPath.length) { 19250 i = t = 0; 19251 segment = rawPath[++segIndex]; 19252 } 19253 } 19254 } 19255 19256 decoratee.t = t; 19257 decoratee.i = i; 19258 decoratee.path = rawPath; 19259 decoratee.segment = segment; 19260 decoratee.segIndex = segIndex; 19261 return decoratee; 19262} 19263 19264function getPositionOnPath(rawPath, progress, includeAngle, point) { 19265 var segment = rawPath[0], 19266 result = point || {}, 19267 samples, 19268 resolution, 19269 length, 19270 min, 19271 max, 19272 i, 19273 t, 19274 a, 19275 inv; 19276 19277 if (progress < 0 || progress > 1) { 19278 progress = _wrapProgress(progress); 19279 } 19280 19281 segment.lookup || cacheRawPathMeasurements(rawPath); 19282 19283 if (rawPath.length > 1) { 19284 //speed optimization: most of the time, there's only one segment so skip the recursion. 19285 length = rawPath.totalLength * progress; 19286 max = i = 0; 19287 19288 while ((max += rawPath[i++].totalLength) < length) { 19289 segment = rawPath[i]; 19290 } 19291 19292 min = max - segment.totalLength; 19293 progress = (length - min) / (max - min) || 0; 19294 } 19295 19296 samples = segment.samples; 19297 resolution = segment.resolution; 19298 length = segment.totalLength * progress; 19299 i = segment.lookup.length ? segment.lookup[progress < 1 ? ~~(length / segment.minLength) : segment.lookup.length - 1] || 0 : _getSampleIndex(samples, length, progress); 19300 min = i ? samples[i - 1] : 0; 19301 max = samples[i]; 19302 19303 if (max < length) { 19304 min = max; 19305 max = samples[++i]; 19306 } 19307 19308 t = 1 / resolution * ((length - min) / (max - min) + i % resolution) || 0; 19309 inv = 1 - t; 19310 i = ~~(i / resolution) * 6; 19311 a = segment[i]; 19312 result.x = _round((t * t * (segment[i + 6] - a) + 3 * inv * (t * (segment[i + 4] - a) + inv * (segment[i + 2] - a))) * t + a); 19313 result.y = _round((t * t * (segment[i + 7] - (a = segment[i + 1])) + 3 * inv * (t * (segment[i + 5] - a) + inv * (segment[i + 3] - a))) * t + a); 19314 19315 if (includeAngle) { 19316 result.angle = segment.totalLength ? getRotationAtBezierT(segment, i, t >= 1 ? 1 - 1e-9 : t ? t : 1e-9) : segment.angle || 0; 19317 } 19318 19319 return result; 19320} //applies a matrix transform to RawPath (or a segment in a RawPath) and returns whatever was passed in (it transforms the values in the array(s), not a copy). 19321 19322function transformRawPath(rawPath, a, b, c, d, tx, ty) { 19323 var j = rawPath.length, 19324 segment, 19325 l, 19326 i, 19327 x, 19328 y; 19329 19330 while (--j > -1) { 19331 segment = rawPath[j]; 19332 l = segment.length; 19333 19334 for (i = 0; i < l; i += 2) { 19335 x = segment[i]; 19336 y = segment[i + 1]; 19337 segment[i] = x * a + y * c + tx; 19338 segment[i + 1] = x * b + y * d + ty; 19339 } 19340 } 19341 19342 rawPath._dirty = 1; 19343 return rawPath; 19344} // translates SVG arc data into a segment (cubic beziers). Angle is in degrees. 19345 19346function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFlag, x, y) { 19347 if (lastX === x && lastY === y) { 19348 return; 19349 } 19350 19351 rx = _abs(rx); 19352 ry = _abs(ry); 19353 19354 var angleRad = angle % 360 * _DEG2RAD, 19355 cosAngle = _cos(angleRad), 19356 sinAngle = _sin(angleRad), 19357 PI = Math.PI, 19358 TWOPI = PI * 2, 19359 dx2 = (lastX - x) / 2, 19360 dy2 = (lastY - y) / 2, 19361 x1 = cosAngle * dx2 + sinAngle * dy2, 19362 y1 = -sinAngle * dx2 + cosAngle * dy2, 19363 x1_sq = x1 * x1, 19364 y1_sq = y1 * y1, 19365 radiiCheck = x1_sq / (rx * rx) + y1_sq / (ry * ry); 19366 19367 if (radiiCheck > 1) { 19368 rx = _sqrt(radiiCheck) * rx; 19369 ry = _sqrt(radiiCheck) * ry; 19370 } 19371 19372 var rx_sq = rx * rx, 19373 ry_sq = ry * ry, 19374 sq = (rx_sq * ry_sq - rx_sq * y1_sq - ry_sq * x1_sq) / (rx_sq * y1_sq + ry_sq * x1_sq); 19375 19376 if (sq < 0) { 19377 sq = 0; 19378 } 19379 19380 var coef = (largeArcFlag === sweepFlag ? -1 : 1) * _sqrt(sq), 19381 cx1 = coef * (rx * y1 / ry), 19382 cy1 = coef * -(ry * x1 / rx), 19383 sx2 = (lastX + x) / 2, 19384 sy2 = (lastY + y) / 2, 19385 cx = sx2 + (cosAngle * cx1 - sinAngle * cy1), 19386 cy = sy2 + (sinAngle * cx1 + cosAngle * cy1), 19387 ux = (x1 - cx1) / rx, 19388 uy = (y1 - cy1) / ry, 19389 vx = (-x1 - cx1) / rx, 19390 vy = (-y1 - cy1) / ry, 19391 temp = ux * ux + uy * uy, 19392 angleStart = (uy < 0 ? -1 : 1) * Math.acos(ux / _sqrt(temp)), 19393 angleExtent = (ux * vy - uy * vx < 0 ? -1 : 1) * Math.acos((ux * vx + uy * vy) / _sqrt(temp * (vx * vx + vy * vy))); 19394 19395 isNaN(angleExtent) && (angleExtent = PI); //rare edge case. Math.cos(-1) is NaN. 19396 19397 if (!sweepFlag && angleExtent > 0) { 19398 angleExtent -= TWOPI; 19399 } else if (sweepFlag && angleExtent < 0) { 19400 angleExtent += TWOPI; 19401 } 19402 19403 angleStart %= TWOPI; 19404 angleExtent %= TWOPI; 19405 19406 var segments = Math.ceil(_abs(angleExtent) / (TWOPI / 4)), 19407 rawPath = [], 19408 angleIncrement = angleExtent / segments, 19409 controlLength = 4 / 3 * _sin(angleIncrement / 2) / (1 + _cos(angleIncrement / 2)), 19410 ma = cosAngle * rx, 19411 mb = sinAngle * rx, 19412 mc = sinAngle * -ry, 19413 md = cosAngle * ry, 19414 i; 19415 19416 for (i = 0; i < segments; i++) { 19417 angle = angleStart + i * angleIncrement; 19418 x1 = _cos(angle); 19419 y1 = _sin(angle); 19420 ux = _cos(angle += angleIncrement); 19421 uy = _sin(angle); 19422 rawPath.push(x1 - controlLength * y1, y1 + controlLength * x1, ux + controlLength * uy, uy - controlLength * ux, ux, uy); 19423 } //now transform according to the actual size of the ellipse/arc (the beziers were noramlized, between 0 and 1 on a circle). 19424 19425 19426 for (i = 0; i < rawPath.length; i += 2) { 19427 x1 = rawPath[i]; 19428 y1 = rawPath[i + 1]; 19429 rawPath[i] = x1 * ma + y1 * mc + cx; 19430 rawPath[i + 1] = x1 * mb + y1 * md + cy; 19431 } 19432 19433 rawPath[i - 2] = x; //always set the end to exactly where it's supposed to be 19434 19435 rawPath[i - 1] = y; 19436 return rawPath; 19437} //Spits back a RawPath with absolute coordinates. Each segment starts with a "moveTo" command (x coordinate, then y) and then 2 control points (x, y, x, y), then anchor. The goal is to minimize memory and maximize speed. 19438 19439 19440function stringToRawPath(d) { 19441 var a = (d + "").replace(_scientific, function (m) { 19442 var n = +m; 19443 return n < 0.0001 && n > -0.0001 ? 0 : n; 19444 }).match(_svgPathExp) || [], 19445 //some authoring programs spit out very small numbers in scientific notation like "1e-5", so make sure we round that down to 0 first. 19446 path = [], 19447 relativeX = 0, 19448 relativeY = 0, 19449 twoThirds = 2 / 3, 19450 elements = a.length, 19451 points = 0, 19452 errorMessage = "ERROR: malformed path: " + d, 19453 i, 19454 j, 19455 x, 19456 y, 19457 command, 19458 isRelative, 19459 segment, 19460 startX, 19461 startY, 19462 difX, 19463 difY, 19464 beziers, 19465 prevCommand, 19466 flag1, 19467 flag2, 19468 line = function line(sx, sy, ex, ey) { 19469 difX = (ex - sx) / 3; 19470 difY = (ey - sy) / 3; 19471 segment.push(sx + difX, sy + difY, ex - difX, ey - difY, ex, ey); 19472 }; 19473 19474 if (!d || !isNaN(a[0]) || isNaN(a[1])) { 19475 console.log(errorMessage); 19476 return path; 19477 } 19478 19479 for (i = 0; i < elements; i++) { 19480 prevCommand = command; 19481 19482 if (isNaN(a[i])) { 19483 command = a[i].toUpperCase(); 19484 isRelative = command !== a[i]; //lower case means relative 19485 } else { 19486 //commands like "C" can be strung together without any new command characters between. 19487 i--; 19488 } 19489 19490 x = +a[i + 1]; 19491 y = +a[i + 2]; 19492 19493 if (isRelative) { 19494 x += relativeX; 19495 y += relativeY; 19496 } 19497 19498 if (!i) { 19499 startX = x; 19500 startY = y; 19501 } // "M" (move) 19502 19503 19504 if (command === "M") { 19505 if (segment) { 19506 if (segment.length < 8) { 19507 //if the path data was funky and just had a M with no actual drawing anywhere, skip it. 19508 path.length -= 1; 19509 } else { 19510 points += segment.length; 19511 } 19512 } 19513 19514 relativeX = startX = x; 19515 relativeY = startY = y; 19516 segment = [x, y]; 19517 path.push(segment); 19518 i += 2; 19519 command = "L"; //an "M" with more than 2 values gets interpreted as "lineTo" commands ("L"). 19520 // "C" (cubic bezier) 19521 } else if (command === "C") { 19522 if (!segment) { 19523 segment = [0, 0]; 19524 } 19525 19526 if (!isRelative) { 19527 relativeX = relativeY = 0; 19528 } //note: "*1" is just a fast/short way to cast the value as a Number. WAAAY faster in Chrome, slightly slower in Firefox. 19529 19530 19531 segment.push(x, y, relativeX + a[i + 3] * 1, relativeY + a[i + 4] * 1, relativeX += a[i + 5] * 1, relativeY += a[i + 6] * 1); 19532 i += 6; // "S" (continuation of cubic bezier) 19533 } else if (command === "S") { 19534 difX = relativeX; 19535 difY = relativeY; 19536 19537 if (prevCommand === "C" || prevCommand === "S") { 19538 difX += relativeX - segment[segment.length - 4]; 19539 difY += relativeY - segment[segment.length - 3]; 19540 } 19541 19542 if (!isRelative) { 19543 relativeX = relativeY = 0; 19544 } 19545 19546 segment.push(difX, difY, x, y, relativeX += a[i + 3] * 1, relativeY += a[i + 4] * 1); 19547 i += 4; // "Q" (quadratic bezier) 19548 } else if (command === "Q") { 19549 difX = relativeX + (x - relativeX) * twoThirds; 19550 difY = relativeY + (y - relativeY) * twoThirds; 19551 19552 if (!isRelative) { 19553 relativeX = relativeY = 0; 19554 } 19555 19556 relativeX += a[i + 3] * 1; 19557 relativeY += a[i + 4] * 1; 19558 segment.push(difX, difY, relativeX + (x - relativeX) * twoThirds, relativeY + (y - relativeY) * twoThirds, relativeX, relativeY); 19559 i += 4; // "T" (continuation of quadratic bezier) 19560 } else if (command === "T") { 19561 difX = relativeX - segment[segment.length - 4]; 19562 difY = relativeY - segment[segment.length - 3]; 19563 segment.push(relativeX + difX, relativeY + difY, x + (relativeX + difX * 1.5 - x) * twoThirds, y + (relativeY + difY * 1.5 - y) * twoThirds, relativeX = x, relativeY = y); 19564 i += 2; // "H" (horizontal line) 19565 } else if (command === "H") { 19566 line(relativeX, relativeY, relativeX = x, relativeY); 19567 i += 1; // "V" (vertical line) 19568 } else if (command === "V") { 19569 //adjust values because the first (and only one) isn't x in this case, it's y. 19570 line(relativeX, relativeY, relativeX, relativeY = x + (isRelative ? relativeY - relativeX : 0)); 19571 i += 1; // "L" (line) or "Z" (close) 19572 } else if (command === "L" || command === "Z") { 19573 if (command === "Z") { 19574 x = startX; 19575 y = startY; 19576 segment.closed = true; 19577 } 19578 19579 if (command === "L" || _abs(relativeX - x) > 0.5 || _abs(relativeY - y) > 0.5) { 19580 line(relativeX, relativeY, x, y); 19581 19582 if (command === "L") { 19583 i += 2; 19584 } 19585 } 19586 19587 relativeX = x; 19588 relativeY = y; // "A" (arc) 19589 } else if (command === "A") { 19590 flag1 = a[i + 4]; 19591 flag2 = a[i + 5]; 19592 difX = a[i + 6]; 19593 difY = a[i + 7]; 19594 j = 7; 19595 19596 if (flag1.length > 1) { 19597 // for cases when the flags are merged, like "a8 8 0 018 8" (the 0 and 1 flags are WITH the x value of 8, but it could also be "a8 8 0 01-8 8" so it may include x or not) 19598 if (flag1.length < 3) { 19599 difY = difX; 19600 difX = flag2; 19601 j--; 19602 } else { 19603 difY = flag2; 19604 difX = flag1.substr(2); 19605 j -= 2; 19606 } 19607 19608 flag2 = flag1.charAt(1); 19609 flag1 = flag1.charAt(0); 19610 } 19611 19612 beziers = arcToSegment(relativeX, relativeY, +a[i + 1], +a[i + 2], +a[i + 3], +flag1, +flag2, (isRelative ? relativeX : 0) + difX * 1, (isRelative ? relativeY : 0) + difY * 1); 19613 i += j; 19614 19615 if (beziers) { 19616 for (j = 0; j < beziers.length; j++) { 19617 segment.push(beziers[j]); 19618 } 19619 } 19620 19621 relativeX = segment[segment.length - 2]; 19622 relativeY = segment[segment.length - 1]; 19623 } else { 19624 console.log(errorMessage); 19625 } 19626 } 19627 19628 i = segment.length; 19629 19630 if (i < 6) { 19631 //in case there's odd SVG like a M0,0 command at the very end. 19632 path.pop(); 19633 i = 0; 19634 } else if (segment[0] === segment[i - 2] && segment[1] === segment[i - 1]) { 19635 segment.closed = true; 19636 } 19637 19638 path.totalPoints = points + i; 19639 return path; 19640} //populates the points array in alternating x/y values (like [x, y, x, y...] instead of individual point objects [{x, y}, {x, y}...] to conserve memory and stay in line with how we're handling segment arrays 19641 19642function bezierToPoints(x1, y1, x2, y2, x3, y3, x4, y4, threshold, points, index) { 19643 var x12 = (x1 + x2) / 2, 19644 y12 = (y1 + y2) / 2, 19645 x23 = (x2 + x3) / 2, 19646 y23 = (y2 + y3) / 2, 19647 x34 = (x3 + x4) / 2, 19648 y34 = (y3 + y4) / 2, 19649 x123 = (x12 + x23) / 2, 19650 y123 = (y12 + y23) / 2, 19651 x234 = (x23 + x34) / 2, 19652 y234 = (y23 + y34) / 2, 19653 x1234 = (x123 + x234) / 2, 19654 y1234 = (y123 + y234) / 2, 19655 dx = x4 - x1, 19656 dy = y4 - y1, 19657 d2 = _abs((x2 - x4) * dy - (y2 - y4) * dx), 19658 d3 = _abs((x3 - x4) * dy - (y3 - y4) * dx), 19659 length; 19660 19661 if (!points) { 19662 points = [x1, y1, x4, y4]; 19663 index = 2; 19664 } 19665 19666 points.splice(index || points.length - 2, 0, x1234, y1234); 19667 19668 if ((d2 + d3) * (d2 + d3) > threshold * (dx * dx + dy * dy)) { 19669 length = points.length; 19670 bezierToPoints(x1, y1, x12, y12, x123, y123, x1234, y1234, threshold, points, index); 19671 bezierToPoints(x1234, y1234, x234, y234, x34, y34, x4, y4, threshold, points, index + 2 + (points.length - length)); 19672 } 19673 19674 return points; 19675} 19676/* 19677function getAngleBetweenPoints(x0, y0, x1, y1, x2, y2) { //angle between 3 points in radians 19678 var dx1 = x1 - x0, 19679 dy1 = y1 - y0, 19680 dx2 = x2 - x1, 19681 dy2 = y2 - y1, 19682 dx3 = x2 - x0, 19683 dy3 = y2 - y0, 19684 a = dx1 * dx1 + dy1 * dy1, 19685 b = dx2 * dx2 + dy2 * dy2, 19686 c = dx3 * dx3 + dy3 * dy3; 19687 return Math.acos( (a + b - c) / _sqrt(4 * a * b) ); 19688}, 19689*/ 19690//pointsToSegment() doesn't handle flat coordinates (where y is always 0) the way we need (the resulting control points are always right on top of the anchors), so this function basically makes the control points go directly up and down, varying in length based on the curviness (more curvy, further control points) 19691 19692function flatPointsToSegment(points, curviness) { 19693 if (curviness === void 0) { 19694 curviness = 1; 19695 } 19696 19697 var x = points[0], 19698 y = 0, 19699 segment = [x, y], 19700 i = 2; 19701 19702 for (; i < points.length; i += 2) { 19703 segment.push(x, y, points[i], y = (points[i] - x) * curviness / 2, x = points[i], -y); 19704 } 19705 19706 return segment; 19707} //points is an array of x/y points, like [x, y, x, y, x, y] 19708 19709function pointsToSegment(points, curviness) { 19710 //points = simplifyPoints(points, tolerance); 19711 _abs(points[0] - points[2]) < 1e-4 && _abs(points[1] - points[3]) < 1e-4 && (points = points.slice(2)); // if the first two points are super close, dump the first one. 19712 19713 var l = points.length - 2, 19714 x = +points[0], 19715 y = +points[1], 19716 nextX = +points[2], 19717 nextY = +points[3], 19718 segment = [x, y, x, y], 19719 dx2 = nextX - x, 19720 dy2 = nextY - y, 19721 closed = Math.abs(points[l] - x) < 0.001 && Math.abs(points[l + 1] - y) < 0.001, 19722 prevX, 19723 prevY, 19724 i, 19725 dx1, 19726 dy1, 19727 r1, 19728 r2, 19729 r3, 19730 tl, 19731 mx1, 19732 mx2, 19733 mxm, 19734 my1, 19735 my2, 19736 mym; 19737 19738 if (closed) { 19739 // if the start and end points are basically on top of each other, close the segment by adding the 2nd point to the end, and the 2nd-to-last point to the beginning (we'll remove them at the end, but this allows the curvature to look perfect) 19740 points.push(nextX, nextY); 19741 nextX = x; 19742 nextY = y; 19743 x = points[l - 2]; 19744 y = points[l - 1]; 19745 points.unshift(x, y); 19746 l += 4; 19747 } 19748 19749 curviness = curviness || curviness === 0 ? +curviness : 1; 19750 19751 for (i = 2; i < l; i += 2) { 19752 prevX = x; 19753 prevY = y; 19754 x = nextX; 19755 y = nextY; 19756 nextX = +points[i + 2]; 19757 nextY = +points[i + 3]; 19758 19759 if (x === nextX && y === nextY) { 19760 continue; 19761 } 19762 19763 dx1 = dx2; 19764 dy1 = dy2; 19765 dx2 = nextX - x; 19766 dy2 = nextY - y; 19767 r1 = _sqrt(dx1 * dx1 + dy1 * dy1); // r1, r2, and r3 correlate x and y (and z in the future). Basically 2D or 3D hypotenuse 19768 19769 r2 = _sqrt(dx2 * dx2 + dy2 * dy2); 19770 r3 = _sqrt(Math.pow(dx2 / r2 + dx1 / r1, 2) + Math.pow(dy2 / r2 + dy1 / r1, 2)); 19771 tl = (r1 + r2) * curviness * 0.25 / r3; 19772 mx1 = x - (x - prevX) * (r1 ? tl / r1 : 0); 19773 mx2 = x + (nextX - x) * (r2 ? tl / r2 : 0); 19774 mxm = x - (mx1 + ((mx2 - mx1) * (r1 * 3 / (r1 + r2) + 0.5) / 4 || 0)); 19775 my1 = y - (y - prevY) * (r1 ? tl / r1 : 0); 19776 my2 = y + (nextY - y) * (r2 ? tl / r2 : 0); 19777 mym = y - (my1 + ((my2 - my1) * (r1 * 3 / (r1 + r2) + 0.5) / 4 || 0)); 19778 19779 if (x !== prevX || y !== prevY) { 19780 segment.push(_round(mx1 + mxm), // first control point 19781 _round(my1 + mym), _round(x), // anchor 19782 _round(y), _round(mx2 + mxm), // second control point 19783 _round(my2 + mym)); 19784 } 19785 } 19786 19787 x !== nextX || y !== nextY || segment.length < 4 ? segment.push(_round(nextX), _round(nextY), _round(nextX), _round(nextY)) : segment.length -= 2; 19788 19789 if (segment.length === 2) { 19790 // only one point! 19791 segment.push(x, y, x, y, x, y); 19792 } else if (closed) { 19793 segment.splice(0, 6); 19794 segment.length = segment.length - 6; 19795 } 19796 19797 return segment; 19798} //returns the squared distance between an x/y coordinate and a segment between x1/y1 and x2/y2 19799 19800function pointToSegDist(x, y, x1, y1, x2, y2) { 19801 var dx = x2 - x1, 19802 dy = y2 - y1, 19803 t; 19804 19805 if (dx || dy) { 19806 t = ((x - x1) * dx + (y - y1) * dy) / (dx * dx + dy * dy); 19807 19808 if (t > 1) { 19809 x1 = x2; 19810 y1 = y2; 19811 } else if (t > 0) { 19812 x1 += dx * t; 19813 y1 += dy * t; 19814 } 19815 } 19816 19817 return Math.pow(x - x1, 2) + Math.pow(y - y1, 2); 19818} 19819 19820function simplifyStep(points, first, last, tolerance, simplified) { 19821 var maxSqDist = tolerance, 19822 firstX = points[first], 19823 firstY = points[first + 1], 19824 lastX = points[last], 19825 lastY = points[last + 1], 19826 index, 19827 i, 19828 d; 19829 19830 for (i = first + 2; i < last; i += 2) { 19831 d = pointToSegDist(points[i], points[i + 1], firstX, firstY, lastX, lastY); 19832 19833 if (d > maxSqDist) { 19834 index = i; 19835 maxSqDist = d; 19836 } 19837 } 19838 19839 if (maxSqDist > tolerance) { 19840 index - first > 2 && simplifyStep(points, first, index, tolerance, simplified); 19841 simplified.push(points[index], points[index + 1]); 19842 last - index > 2 && simplifyStep(points, index, last, tolerance, simplified); 19843 } 19844} //points is an array of x/y values like [x, y, x, y, x, y] 19845 19846 19847function simplifyPoints(points, tolerance) { 19848 var prevX = parseFloat(points[0]), 19849 prevY = parseFloat(points[1]), 19850 temp = [prevX, prevY], 19851 l = points.length - 2, 19852 i, 19853 x, 19854 y, 19855 dx, 19856 dy, 19857 result, 19858 last; 19859 tolerance = Math.pow(tolerance || 1, 2); 19860 19861 for (i = 2; i < l; i += 2) { 19862 x = parseFloat(points[i]); 19863 y = parseFloat(points[i + 1]); 19864 dx = prevX - x; 19865 dy = prevY - y; 19866 19867 if (dx * dx + dy * dy > tolerance) { 19868 temp.push(x, y); 19869 prevX = x; 19870 prevY = y; 19871 } 19872 } 19873 19874 temp.push(parseFloat(points[l]), parseFloat(points[l + 1])); 19875 last = temp.length - 2; 19876 result = [temp[0], temp[1]]; 19877 simplifyStep(temp, 0, last, tolerance, result); 19878 result.push(temp[last], temp[last + 1]); 19879 return result; 19880} 19881 19882function getClosestProgressOnBezier(iterations, px, py, start, end, slices, x0, y0, x1, y1, x2, y2, x3, y3) { 19883 var inc = (end - start) / slices, 19884 best = 0, 19885 t = start, 19886 x, 19887 y, 19888 d, 19889 dx, 19890 dy, 19891 inv; 19892 _bestDistance = _largeNum; 19893 19894 while (t <= end) { 19895 inv = 1 - t; 19896 x = inv * inv * inv * x0 + 3 * inv * inv * t * x1 + 3 * inv * t * t * x2 + t * t * t * x3; 19897 y = inv * inv * inv * y0 + 3 * inv * inv * t * y1 + 3 * inv * t * t * y2 + t * t * t * y3; 19898 dx = x - px; 19899 dy = y - py; 19900 d = dx * dx + dy * dy; 19901 19902 if (d < _bestDistance) { 19903 _bestDistance = d; 19904 best = t; 19905 } 19906 19907 t += inc; 19908 } 19909 19910 return iterations > 1 ? getClosestProgressOnBezier(iterations - 1, px, py, Math.max(best - inc, 0), Math.min(best + inc, 1), slices, x0, y0, x1, y1, x2, y2, x3, y3) : best; 19911} 19912 19913function getClosestData(rawPath, x, y, slices) { 19914 //returns an object with the closest j, i, and t (j is the segment index, i is the index of the point in that segment, and t is the time/progress along that bezier) 19915 var closest = { 19916 j: 0, 19917 i: 0, 19918 t: 0 19919 }, 19920 bestDistance = _largeNum, 19921 i, 19922 j, 19923 t, 19924 segment; 19925 19926 for (j = 0; j < rawPath.length; j++) { 19927 segment = rawPath[j]; 19928 19929 for (i = 0; i < segment.length; i += 6) { 19930 t = getClosestProgressOnBezier(1, x, y, 0, 1, slices || 20, segment[i], segment[i + 1], segment[i + 2], segment[i + 3], segment[i + 4], segment[i + 5], segment[i + 6], segment[i + 7]); 19931 19932 if (bestDistance > _bestDistance) { 19933 bestDistance = _bestDistance; 19934 closest.j = j; 19935 closest.i = i; 19936 closest.t = t; 19937 } 19938 } 19939 } 19940 19941 return closest; 19942} //subdivide a Segment closest to a specific x,y coordinate 19943 19944function subdivideSegmentNear(x, y, segment, slices, iterations) { 19945 var l = segment.length, 19946 bestDistance = _largeNum, 19947 bestT = 0, 19948 bestSegmentIndex = 0, 19949 t, 19950 i; 19951 slices = slices || 20; 19952 iterations = iterations || 3; 19953 19954 for (i = 0; i < l; i += 6) { 19955 t = getClosestProgressOnBezier(1, x, y, 0, 1, slices, segment[i], segment[i + 1], segment[i + 2], segment[i + 3], segment[i + 4], segment[i + 5], segment[i + 6], segment[i + 7]); 19956 19957 if (bestDistance > _bestDistance) { 19958 bestDistance = _bestDistance; 19959 bestT = t; 19960 bestSegmentIndex = i; 19961 } 19962 } 19963 19964 t = getClosestProgressOnBezier(iterations, x, y, bestT - 0.05, bestT + 0.05, slices, segment[bestSegmentIndex], segment[bestSegmentIndex + 1], segment[bestSegmentIndex + 2], segment[bestSegmentIndex + 3], segment[bestSegmentIndex + 4], segment[bestSegmentIndex + 5], segment[bestSegmentIndex + 6], segment[bestSegmentIndex + 7]); 19965 subdivideSegment(segment, bestSegmentIndex, t); 19966 return bestSegmentIndex + 6; 19967} 19968/* 19969Takes any of the following and converts it to an all Cubic Bezier SVG data string: 19970- A <path> data string like "M0,0 L2,4 v20,15 H100" 19971- A RawPath, like [[x, y, x, y, x, y, x, y][[x, y, x, y, x, y, x, y]] 19972- A Segment, like [x, y, x, y, x, y, x, y] 19973 19974Note: all numbers are rounded down to the closest 0.001 to minimize memory, maximize speed, and avoid odd numbers like 1e-13 19975*/ 19976 19977function rawPathToString(rawPath) { 19978 if (_isNumber(rawPath[0])) { 19979 //in case a segment is passed in instead 19980 rawPath = [rawPath]; 19981 } 19982 19983 var result = "", 19984 l = rawPath.length, 19985 sl, 19986 s, 19987 i, 19988 segment; 19989 19990 for (s = 0; s < l; s++) { 19991 segment = rawPath[s]; 19992 result += "M" + _round(segment[0]) + "," + _round(segment[1]) + " C"; 19993 sl = segment.length; 19994 19995 for (i = 2; i < sl; i++) { 19996 result += _round(segment[i++]) + "," + _round(segment[i++]) + " " + _round(segment[i++]) + "," + _round(segment[i++]) + " " + _round(segment[i++]) + "," + _round(segment[i]) + " "; 19997 } 19998 19999 if (segment.closed) { 20000 result += "z"; 20001 } 20002 } 20003 20004 return result; 20005} 20006/* 20007// takes a segment with coordinates [x, y, x, y, ...] and converts the control points into angles and lengths [x, y, angle, length, angle, length, x, y, angle, length, ...] so that it animates more cleanly and avoids odd breaks/kinks. For example, if you animate from 1 o'clock to 6 o'clock, it'd just go directly/linearly rather than around. So the length would be very short in the middle of the tween. 20008export function cpCoordsToAngles(segment, copy) { 20009 var result = copy ? segment.slice(0) : segment, 20010 x, y, i; 20011 for (i = 0; i < segment.length; i+=6) { 20012 x = segment[i+2] - segment[i]; 20013 y = segment[i+3] - segment[i+1]; 20014 result[i+2] = Math.atan2(y, x); 20015 result[i+3] = Math.sqrt(x * x + y * y); 20016 x = segment[i+6] - segment[i+4]; 20017 y = segment[i+7] - segment[i+5]; 20018 result[i+4] = Math.atan2(y, x); 20019 result[i+5] = Math.sqrt(x * x + y * y); 20020 } 20021 return result; 20022} 20023 20024// takes a segment that was converted with cpCoordsToAngles() to have angles and lengths instead of coordinates for the control points, and converts it BACK into coordinates. 20025export function cpAnglesToCoords(segment, copy) { 20026 var result = copy ? segment.slice(0) : segment, 20027 length = segment.length, 20028 rnd = 1000, 20029 angle, l, i, j; 20030 for (i = 0; i < length; i+=6) { 20031 angle = segment[i+2]; 20032 l = segment[i+3]; //length 20033 result[i+2] = (((segment[i] + Math.cos(angle) * l) * rnd) | 0) / rnd; 20034 result[i+3] = (((segment[i+1] + Math.sin(angle) * l) * rnd) | 0) / rnd; 20035 angle = segment[i+4]; 20036 l = segment[i+5]; //length 20037 result[i+4] = (((segment[i+6] - Math.cos(angle) * l) * rnd) | 0) / rnd; 20038 result[i+5] = (((segment[i+7] - Math.sin(angle) * l) * rnd) | 0) / rnd; 20039 } 20040 return result; 20041} 20042 20043//adds an "isSmooth" array to each segment and populates it with a boolean value indicating whether or not it's smooth (the control points have basically the same slope). For any smooth control points, it converts the coordinates into angle (x, in radians) and length (y) and puts them into the same index value in a smoothData array. 20044export function populateSmoothData(rawPath) { 20045 let j = rawPath.length, 20046 smooth, segment, x, y, x2, y2, i, l, a, a2, isSmooth, smoothData; 20047 while (--j > -1) { 20048 segment = rawPath[j]; 20049 isSmooth = segment.isSmooth = segment.isSmooth || [0, 0, 0, 0]; 20050 smoothData = segment.smoothData = segment.smoothData || [0, 0, 0, 0]; 20051 isSmooth.length = 4; 20052 l = segment.length - 2; 20053 for (i = 6; i < l; i += 6) { 20054 x = segment[i] - segment[i - 2]; 20055 y = segment[i + 1] - segment[i - 1]; 20056 x2 = segment[i + 2] - segment[i]; 20057 y2 = segment[i + 3] - segment[i + 1]; 20058 a = _atan2(y, x); 20059 a2 = _atan2(y2, x2); 20060 smooth = (Math.abs(a - a2) < 0.09); 20061 if (smooth) { 20062 smoothData[i - 2] = a; 20063 smoothData[i + 2] = a2; 20064 smoothData[i - 1] = _sqrt(x * x + y * y); 20065 smoothData[i + 3] = _sqrt(x2 * x2 + y2 * y2); 20066 } 20067 isSmooth.push(smooth, smooth, 0, 0, smooth, smooth); 20068 } 20069 //if the first and last points are identical, check to see if there's a smooth transition. We must handle this a bit differently due to their positions in the array. 20070 if (segment[l] === segment[0] && segment[l+1] === segment[1]) { 20071 x = segment[0] - segment[l-2]; 20072 y = segment[1] - segment[l-1]; 20073 x2 = segment[2] - segment[0]; 20074 y2 = segment[3] - segment[1]; 20075 a = _atan2(y, x); 20076 a2 = _atan2(y2, x2); 20077 if (Math.abs(a - a2) < 0.09) { 20078 smoothData[l-2] = a; 20079 smoothData[2] = a2; 20080 smoothData[l-1] = _sqrt(x * x + y * y); 20081 smoothData[3] = _sqrt(x2 * x2 + y2 * y2); 20082 isSmooth[l-2] = isSmooth[l-1] = true; //don't change indexes 2 and 3 because we'll trigger everything from the END, and this will optimize file size a bit. 20083 } 20084 } 20085 } 20086 return rawPath; 20087} 20088export function pointToScreen(svgElement, point) { 20089 if (arguments.length < 2) { //by default, take the first set of coordinates in the path as the point 20090 let rawPath = getRawPath(svgElement); 20091 point = svgElement.ownerSVGElement.createSVGPoint(); 20092 point.x = rawPath[0][0]; 20093 point.y = rawPath[0][1]; 20094 } 20095 return point.matrixTransform(svgElement.getScreenCTM()); 20096} 20097 20098*/ 20099 20100/***/ }), 20101
vendor: 11,250 bytes, lines 20102-20224
20102/***/ "./node_modules/gsap/utils/strings.js": 20103/*!********************************************!*\ 20104 !*** ./node_modules/gsap/utils/strings.js ***! 20105 \********************************************/ 20106/*! exports provided: emojiExp, getText, splitInnerHTML, emojiSafeSplit */ 20107/***/ (function(module, __webpack_exports__, __webpack_require__) { 20108 20109"use strict"; 20110__webpack_require__.r(__webpack_exports__); 20111/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "emojiExp", function() { return emojiExp; }); 20112/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getText", function() { return getText; }); 20113/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "splitInnerHTML", function() { return splitInnerHTML; }); 20114/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "emojiSafeSplit", function() { return emojiSafeSplit; }); 20115/*! 20116 * strings: 3.12.5 20117 * https://gsap.com 20118 * 20119 * Copyright 2008-2024, GreenSock. All rights reserved. 20120 * Subject to the terms at https://gsap.com/standard-license or for 20121 * Club GSAP members, the agreement issued with that membership. 20122 * @author: Jack Doyle, [email protected] 20123*/ 20124 20125/* eslint-disable */ 20126var _trimExp = /(?:^\s+|\s+$)/g; 20127var emojiExp = /([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/; 20128function getText(e) { 20129 var type = e.nodeType, 20130 result = ""; 20131 20132 if (type === 1 || type === 9 || type === 11) { 20133 if (typeof e.textContent === "string") { 20134 return e.textContent; 20135 } else { 20136 for (e = e.firstChild; e; e = e.nextSibling) { 20137 result += getText(e); 20138 } 20139 } 20140 } else if (type === 3 || type === 4) { 20141 return e.nodeValue; 20142 } 20143 20144 return result; 20145} 20146function splitInnerHTML(element, delimiter, trim, preserveSpaces) { 20147 var node = element.firstChild, 20148 result = [], 20149 s; 20150 20151 while (node) { 20152 if (node.nodeType === 3) { 20153 s = (node.nodeValue + "").replace(/^\n+/g, ""); 20154 20155 if (!preserveSpaces) { 20156 s = s.replace(/\s+/g, " "); 20157 } 20158 20159 result.push.apply(result, emojiSafeSplit(s, delimiter, trim, preserveSpaces)); 20160 } else if ((node.nodeName + "").toLowerCase() === "br") { 20161 result[result.length - 1] += "<br>"; 20162 } else { 20163 result.push(node.outerHTML); 20164 } 20165 20166 node = node.nextSibling; 20167 } 20168 20169 s = result.length; 20170 20171 while (s--) { 20172 result[s] === "&" && result.splice(s, 1, "&"); 20173 } 20174 20175 return result; 20176} 20177/* 20178//smaller kb version that only handles the simpler emoji's, which is often perfectly adequate. 20179 20180let _emoji = "[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2694-\u2697]|\uD83E[\uDD10-\uDD5D]|[\uD800-\uDBFF][\uDC00-\uDFFF]", 20181 _emojiExp = new RegExp(_emoji), 20182 _emojiAndCharsExp = new RegExp(_emoji + "|.", "g"), 20183 _emojiSafeSplit = (text, delimiter, trim) => { 20184 if (trim) { 20185 text = text.replace(_trimExp, ""); 20186 } 20187 return ((delimiter === "" || !delimiter) && _emojiExp.test(text)) ? text.match(_emojiAndCharsExp) : text.split(delimiter || ""); 20188 }; 20189 */ 20190 20191function emojiSafeSplit(text, delimiter, trim, preserveSpaces) { 20192 text += ""; // make sure it's cast as a string. Someone may pass in a number. 20193 20194 trim && (text = text.trim ? text.trim() : text.replace(_trimExp, "")); // IE9 and earlier compatibility 20195 20196 if (delimiter && delimiter !== "") { 20197 return text.replace(/>/g, ">").replace(/</g, "<").split(delimiter); 20198 } 20199 20200 var result = [], 20201 l = text.length, 20202 i = 0, 20203 j, 20204 character; 20205 20206 for (; i < l; i++) { 20207 character = text.charAt(i); 20208 20209 if (character.charCodeAt(0) >= 0xD800 && character.charCodeAt(0) <= 0xDBFF || text.charCodeAt(i + 1) >= 0xFE00 && text.charCodeAt(i + 1) <= 0xFE0F) { 20210 //special emoji characters use 2 or 4 unicode characters that we must keep together. 20211 j = ((text.substr(i, 12).split(emojiExp) || [])[1] || "").length || 2; 20212 character = text.substr(i, j); 20213 result.emoji = 1; 20214 i += j - 1; 20215 } 20216 20217 result.push(character === ">" ? ">" : character === "<" ? "<" : preserveSpaces && character === " " && (text.charAt(i - 1) === " " || text.charAt(i + 1) === " ") ? " " : character); 20218 } 20219 20220 return result; 20221} 20222 20223/***/ }), 20224
vendor: 323 bytes, lines 20225-20235
20225/***/ "./node_modules/plyr/dist/plyr.css": 20226/*!*****************************************!*\ 20227 !*** ./node_modules/plyr/dist/plyr.css ***! 20228 \*****************************************/ 20229/*! no static exports found */ 20230/***/ (function(module, exports, __webpack_require__) { 20231 20232// extracted by mini-css-extract-plugin 20233 20234/***/ }), 20235
vendor: 5,681 bytes, lines 20236-20430
20236/***/ "./node_modules/process/browser.js": 20237/*!*****************************************!*\ 20238 !*** ./node_modules/process/browser.js ***! 20239 \*****************************************/ 20240/*! no static exports found */ 20241/***/ (function(module, exports) { 20242 20243// shim for using process in browser 20244var process = module.exports = {}; 20245 20246// cached from whatever global is present so that test runners that stub it 20247// don't break things. But we need to wrap it in a try catch in case it is 20248// wrapped in strict mode code which doesn't define any globals. It's inside a 20249// function because try/catches deoptimize in certain engines. 20250 20251var cachedSetTimeout; 20252var cachedClearTimeout; 20253 20254function defaultSetTimout() { 20255 throw new Error('setTimeout has not been defined'); 20256} 20257function defaultClearTimeout () { 20258 throw new Error('clearTimeout has not been defined'); 20259} 20260(function () { 20261 try { 20262 if (typeof setTimeout === 'function') { 20263 cachedSetTimeout = setTimeout; 20264 } else { 20265 cachedSetTimeout = defaultSetTimout; 20266 } 20267 } catch (e) { 20268 cachedSetTimeout = defaultSetTimout; 20269 } 20270 try { 20271 if (typeof clearTimeout === 'function') { 20272 cachedClearTimeout = clearTimeout; 20273 } else { 20274 cachedClearTimeout = defaultClearTimeout; 20275 } 20276 } catch (e) { 20277 cachedClearTimeout = defaultClearTimeout; 20278 } 20279} ()) 20280function runTimeout(fun) { 20281 if (cachedSetTimeout === setTimeout) { 20282 //normal enviroments in sane situations 20283 return setTimeout(fun, 0); 20284 } 20285 // if setTimeout wasn't available but was latter defined 20286 if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { 20287 cachedSetTimeout = setTimeout; 20288 return setTimeout(fun, 0); 20289 } 20290 try { 20291 // when when somebody has screwed with setTimeout but no I.E. maddness 20292 return cachedSetTimeout(fun, 0); 20293 } catch(e){ 20294 try { 20295 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 20296 return cachedSetTimeout.call(null, fun, 0); 20297 } catch(e){ 20298 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error 20299 return cachedSetTimeout.call(this, fun, 0); 20300 } 20301 } 20302 20303 20304} 20305function runClearTimeout(marker) { 20306 if (cachedClearTimeout === clearTimeout) { 20307 //normal enviroments in sane situations 20308 return clearTimeout(marker); 20309 } 20310 // if clearTimeout wasn't available but was latter defined 20311 if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { 20312 cachedClearTimeout = clearTimeout; 20313 return clearTimeout(marker); 20314 } 20315 try { 20316 // when when somebody has screwed with setTimeout but no I.E. maddness 20317 return cachedClearTimeout(marker); 20318 } catch (e){ 20319 try { 20320 // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally 20321 return cachedClearTimeout.call(null, marker); 20322 } catch (e){ 20323 // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. 20324 // Some versions of I.E. have different rules for clearTimeout vs setTimeout 20325 return cachedClearTimeout.call(this, marker); 20326 } 20327 } 20328 20329 20330 20331} 20332var queue = []; 20333var draining = false; 20334var currentQueue; 20335var queueIndex = -1; 20336 20337function cleanUpNextTick() { 20338 if (!draining || !currentQueue) { 20339 return; 20340 } 20341 draining = false; 20342 if (currentQueue.length) { 20343 queue = currentQueue.concat(queue); 20344 } else { 20345 queueIndex = -1; 20346 } 20347 if (queue.length) { 20348 drainQueue(); 20349 } 20350} 20351 20352function drainQueue() { 20353 if (draining) { 20354 return; 20355 } 20356 var timeout = runTimeout(cleanUpNextTick); 20357 draining = true; 20358 20359 var len = queue.length; 20360 while(len) { 20361 currentQueue = queue; 20362 queue = []; 20363 while (++queueIndex < len) { 20364 if (currentQueue) { 20365 currentQueue[queueIndex].run(); 20366 } 20367 } 20368 queueIndex = -1; 20369 len = queue.length; 20370 } 20371 currentQueue = null; 20372 draining = false; 20373 runClearTimeout(timeout); 20374} 20375 20376process.nextTick = function (fun) { 20377 var args = new Array(arguments.length - 1); 20378 if (arguments.length > 1) { 20379 for (var i = 1; i < arguments.length; i++) { 20380 args[i - 1] = arguments[i]; 20381 } 20382 } 20383 queue.push(new Item(fun, args)); 20384 if (queue.length === 1 && !draining) { 20385 runTimeout(drainQueue); 20386 } 20387}; 20388 20389// v8 likes predictible objects 20390function Item(fun, array) { 20391 this.fun = fun; 20392 this.array = array; 20393} 20394Item.prototype.run = function () { 20395 this.fun.apply(null, this.array); 20396}; 20397process.title = 'browser'; 20398process.browser = true; 20399process.env = {}; 20400process.argv = []; 20401process.version = ''; // empty string to avoid regexp issues 20402process.versions = {}; 20403 20404function noop() {} 20405 20406process.on = noop; 20407process.addListener = noop; 20408process.once = noop; 20409process.off = noop; 20410process.removeListener = noop; 20411process.removeAllListeners = noop; 20412process.emit = noop; 20413process.prependListener = noop; 20414process.prependOnceListener = noop; 20415 20416process.listeners = function (name) { return [] } 20417 20418process.binding = function (name) { 20419 throw new Error('process.binding is not supported'); 20420}; 20421 20422process.cwd = function () { return '/' }; 20423process.chdir = function (dir) { 20424 throw new Error('process.chdir is not supported'); 20425}; 20426process.umask = function() { return 0; }; 20427 20428 20429/***/ }), 20430
vendor: 7,346 bytes, lines 20431-20444
20431/***/ "./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js": 20432/*!************************************************************************!*\ 20433 !*** ./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js ***! 20434 \************************************************************************/ 20435/*! no static exports found */ 20436/***/ (function(module, exports, __webpack_require__) { 20437 20438/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! smooth-scroll v16.1.3 | (c) 2020 Chris Ferdinandi | MIT License | http://github.com/cferdinandi/smooth-scroll */ 20439window.Element&&!Element.prototype.closest&&(Element.prototype.closest=function(e){var t,n=(this.document||this.ownerDocument).querySelectorAll(e),o=this;do{for(t=n.length;0<=--t&&n.item(t)!==o;);}while(t<0&&(o=o.parentElement));return o}),(function(){if("function"==typeof window.CustomEvent)return;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}e.prototype=window.Event.prototype,window.CustomEvent=e})(),(function(){for(var r=0,e=["ms","moz","webkit","o"],t=0;t<e.length&&!window.requestAnimationFrame;++t)window.requestAnimationFrame=window[e[t]+"RequestAnimationFrame"],window.cancelAnimationFrame=window[e[t]+"CancelAnimationFrame"]||window[e[t]+"CancelRequestAnimationFrame"];window.requestAnimationFrame||(window.requestAnimationFrame=function(e,t){var n=(new Date).getTime(),o=Math.max(0,16-(n-r)),a=window.setTimeout((function(){e(n+o)}),o);return r=n+o,a}),window.cancelAnimationFrame||(window.cancelAnimationFrame=function(e){clearTimeout(e)})})(),(function(e,t){ true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){return t(e)}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 20440 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined})("undefined"!=typeof global?global:"undefined"!=typeof window?window:this,(function(M){"use strict";var q={ignore:"[data-scroll-ignore]",header:null,topOnEmptyHash:!0,speed:500,speedAsDuration:!1,durationMax:null,durationMin:null,clip:!0,offset:0,easing:"easeInOutCubic",customEasing:null,updateURL:!0,popstate:!0,emitEvents:!0},I=function(){var n={};return Array.prototype.forEach.call(arguments,(function(e){for(var t in e){if(!e.hasOwnProperty(t))return;n[t]=e[t]}})),n},r=function(e){"#"===e.charAt(0)&&(e=e.substr(1));for(var t,n=String(e),o=n.length,a=-1,r="",i=n.charCodeAt(0);++a<o;){if(0===(t=n.charCodeAt(a)))throw new InvalidCharacterError("Invalid character: the input contains U+0000.");1<=t&&t<=31||127==t||0===a&&48<=t&&t<=57||1===a&&48<=t&&t<=57&&45===i?r+="\\"+t.toString(16)+" ":r+=128<=t||45===t||95===t||48<=t&&t<=57||65<=t&&t<=90||97<=t&&t<=122?n.charAt(a):"\\"+n.charAt(a)}return"#"+r},F=function(){return Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},L=function(e){return e?(t=e,parseInt(M.getComputedStyle(t).height,10)+e.offsetTop):0;var t},x=function(e,t,n){0===e&&document.body.focus(),n||(e.focus(),document.activeElement!==e&&(e.setAttribute("tabindex","-1"),e.focus(),e.style.outline="none"),M.scrollTo(0,t))},H=function(e,t,n,o){if(t.emitEvents&&"function"==typeof M.CustomEvent){var a=new CustomEvent(e,{bubbles:!0,detail:{anchor:n,toggle:o}});document.dispatchEvent(a)}};return function(o,e){var b,a,A,O,C={};C.cancelScroll=function(e){cancelAnimationFrame(O),O=null,e||H("scrollCancel",b)},C.animateScroll=function(a,r,e){C.cancelScroll();var i=I(b||q,e||{}),c="[object Number]"===Object.prototype.toString.call(a),t=c||!a.tagName?null:a;if(c||t){var s=M.pageYOffset;i.header&&!A&&(A=document.querySelector(i.header));var n,o,u,l,m,d,f,h,p=L(A),g=c?a:(function(e,t,n,o){var a=0;if(e.offsetParent)for(;a+=e.offsetTop,e=e.offsetParent;);return a=Math.max(a-t-n,0),o&&(a=Math.min(a,F()-M.innerHeight)),a})(t,p,parseInt("function"==typeof i.offset?i.offset(a,r):i.offset,10),i.clip),y=g-s,v=F(),w=0,S=(n=y,u=(o=i).speedAsDuration?o.speed:Math.abs(n/1e3*o.speed),o.durationMax&&u>o.durationMax?o.durationMax:o.durationMin&&u<o.durationMin?o.durationMin:parseInt(u,10)),E=function(e){var t,n,o;l||(l=e),w+=e-l,d=s+y*(n=m=1<(m=0===S?0:w/S)?1:m,"easeInQuad"===(t=i).easing&&(o=n*n),"easeOutQuad"===t.easing&&(o=n*(2-n)),"easeInOutQuad"===t.easing&&(o=n<.5?2*n*n:(4-2*n)*n-1),"easeInCubic"===t.easing&&(o=n*n*n),"easeOutCubic"===t.easing&&(o=--n*n*n+1),"easeInOutCubic"===t.easing&&(o=n<.5?4*n*n*n:(n-1)*(2*n-2)*(2*n-2)+1),"easeInQuart"===t.easing&&(o=n*n*n*n),"easeOutQuart"===t.easing&&(o=1- --n*n*n*n),"easeInOutQuart"===t.easing&&(o=n<.5?8*n*n*n*n:1-8*--n*n*n*n),"easeInQuint"===t.easing&&(o=n*n*n*n*n),"easeOutQuint"===t.easing&&(o=1+--n*n*n*n*n),"easeInOutQuint"===t.easing&&(o=n<.5?16*n*n*n*n*n:1+16*--n*n*n*n*n),t.customEasing&&(o=t.customEasing(n)),o||n),M.scrollTo(0,Math.floor(d)),(function(e,t){var n=M.pageYOffset;if(e==t||n==t||(s<t&&M.innerHeight+n)>=v)return C.cancelScroll(!0),x(a,t,c),H("scrollStop",i,a,r),!(O=l=null)})(d,g)||(O=M.requestAnimationFrame(E),l=e)};0===M.pageYOffset&&M.scrollTo(0,0),f=a,h=i,c||history.pushState&&h.updateURL&&history.pushState({smoothScroll:JSON.stringify(h),anchor:f.id},document.title,f===document.documentElement?"#top":"#"+f.id),"matchMedia"in M&&M.matchMedia("(prefers-reduced-motion)").matches?x(a,Math.floor(g),!1):(H("scrollStart",i,a,r),C.cancelScroll(!0),M.requestAnimationFrame(E))}};var t=function(e){if(!e.defaultPrevented&&!(0!==e.button||e.metaKey||e.ctrlKey||e.shiftKey)&&"closest"in e.target&&(a=e.target.closest(o))&&"a"===a.tagName.toLowerCase()&&!e.target.closest(b.ignore)&&a.hostname===M.location.hostname&&a.pathname===M.location.pathname&&/#/.test(a.href)){var t,n;try{t=r(decodeURIComponent(a.hash))}catch(e){t=r(a.hash)}if("#"===t){if(!b.topOnEmptyHash)return;n=document.documentElement}else n=document.querySelector(t);(n=n||"#top"!==t?n:document.documentElement)&&(e.preventDefault(),(function(e){if(history.replaceState&&e.updateURL&&!history.state){var t=M.location.hash;t=t||"",history.replaceState({smoothScroll:JSON.stringify(e),anchor:t||M.pageYOffset},document.title,t||M.location.href)}})(b),C.animateScroll(n,a))}},n=function(e){if(null!==history.state&&history.state.smoothScroll&&history.state.smoothScroll===JSON.stringify(b)){var t=history.state.anchor;"string"==typeof t&&t&&!(t=document.querySelector(r(history.state.anchor)))||C.animateScroll(t,null,{updateURL:!1})}};C.destroy=function(){b&&(document.removeEventListener("click",t,!1),M.removeEventListener("popstate",n,!1),C.cancelScroll(),O=A=a=b=null)};return (function(){if(!("querySelector"in document&&"addEventListener"in M&&"requestAnimationFrame"in M&&"closest"in M.Element.prototype))throw"Smooth Scroll: This browser does not support the required JavaScript methods and browser APIs.";C.destroy(),b=I(q,e||{}),A=b.header?document.querySelector(b.header):null,document.addEventListener("click",t,!1),b.updateURL&&b.popstate&&M.addEventListener("popstate",n,!1)})(),C}})); 20441/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"))) 20442 20443/***/ }), 20444
vendor: 3,811 bytes, lines 20445-20591
20445/***/ "./node_modules/ssr-window/dist/ssr-window.esm.js": 20446/*!********************************************************!*\ 20447 !*** ./node_modules/ssr-window/dist/ssr-window.esm.js ***! 20448 \********************************************************/ 20449/*! exports provided: document, extend, window */ 20450/***/ (function(module, __webpack_exports__, __webpack_require__) { 20451 20452"use strict"; 20453__webpack_require__.r(__webpack_exports__); 20454/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "document", function() { return doc; }); 20455/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "extend", function() { return extend; }); 20456/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "window", function() { return win; }); 20457/** 20458 * SSR Window 2.0.0 20459 * Better handling for window object in SSR environment 20460 * https://github.com/nolimits4web/ssr-window 20461 * 20462 * Copyright 2020, Vladimir Kharlampidi 20463 * 20464 * Licensed under MIT 20465 * 20466 * Released on: May 12, 2020 20467 */ 20468/* eslint-disable no-param-reassign */ 20469function isObject(obj) { 20470 return (obj !== null && 20471 typeof obj === 'object' && 20472 'constructor' in obj && 20473 obj.constructor === Object); 20474} 20475function extend(target, src) { 20476 if (target === void 0) { target = {}; } 20477 if (src === void 0) { src = {}; } 20478 Object.keys(src).forEach(function (key) { 20479 if (typeof target[key] === 'undefined') 20480 target[key] = src[key]; 20481 else if (isObject(src[key]) && 20482 isObject(target[key]) && 20483 Object.keys(src[key]).length > 0) { 20484 extend(target[key], src[key]); 20485 } 20486 }); 20487} 20488 20489var doc = typeof document !== 'undefined' ? document : {}; 20490var ssrDocument = { 20491 body: {}, 20492 addEventListener: function () { }, 20493 removeEventListener: function () { }, 20494 activeElement: { 20495 blur: function () { }, 20496 nodeName: '', 20497 }, 20498 querySelector: function () { 20499 return null; 20500 }, 20501 querySelectorAll: function () { 20502 return []; 20503 }, 20504 getElementById: function () { 20505 return null; 20506 }, 20507 createEvent: function () { 20508 return { 20509 initEvent: function () { }, 20510 }; 20511 }, 20512 createElement: function () { 20513 return { 20514 children: [], 20515 childNodes: [], 20516 style: {}, 20517 setAttribute: function () { }, 20518 getElementsByTagName: function () { 20519 return []; 20520 }, 20521 }; 20522 }, 20523 createElementNS: function () { 20524 return {}; 20525 }, 20526 importNode: function () { 20527 return null; 20528 }, 20529 location: { 20530 hash: '', 20531 host: '', 20532 hostname: '', 20533 href: '', 20534 origin: '', 20535 pathname: '', 20536 protocol: '', 20537 search: '', 20538 }, 20539}; 20540extend(doc, ssrDocument); 20541 20542var win = typeof window !== 'undefined' ? window : {}; 20543var ssrWindow = { 20544 document: ssrDocument, 20545 navigator: { 20546 userAgent: '', 20547 }, 20548 location: { 20549 hash: '', 20550 host: '', 20551 hostname: '', 20552 href: '', 20553 origin: '', 20554 pathname: '', 20555 protocol: '', 20556 search: '', 20557 }, 20558 history: { 20559 replaceState: function () { }, 20560 pushState: function () { }, 20561 go: function () { }, 20562 back: function () { }, 20563 }, 20564 CustomEvent: function CustomEvent() { 20565 return this; 20566 }, 20567 addEventListener: function () { }, 20568 removeEventListener: function () { }, 20569 getComputedStyle: function () { 20570 return { 20571 getPropertyValue: function () { 20572 return ''; 20573 }, 20574 }; 20575 }, 20576 Image: function () { }, 20577 Date: function () { }, 20578 screen: {}, 20579 setTimeout: function () { }, 20580 clearTimeout: function () { }, 20581 matchMedia: function () { 20582 return {}; 20583 }, 20584}; 20585extend(win, ssrWindow); 20586 20587 20588 20589 20590/***/ }), 20591
vendor: 335 bytes, lines 20592-20602
20592/***/ "./node_modules/swiper/css/swiper.css": 20593/*!********************************************!*\ 20594 !*** ./node_modules/swiper/css/swiper.css ***! 20595 \********************************************/ 20596/*! no static exports found */ 20597/***/ (function(module, exports, __webpack_require__) { 20598 20599// extracted by mini-css-extract-plugin 20600 20601/***/ }), 20602
vendor: 282,111 bytes, lines 20603-27957
20603/***/ "./node_modules/swiper/js/swiper.esm.bundle.js": 20604/*!*****************************************************!*\ 20605 !*** ./node_modules/swiper/js/swiper.esm.bundle.js ***! 20606 \*****************************************************/ 20607/*! exports provided: default */ 20608/***/ (function(module, __webpack_exports__, __webpack_require__) { 20609 20610"use strict"; 20611__webpack_require__.r(__webpack_exports__); 20612/* harmony import */ var dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dom7/dist/dom7.modular */ "./node_modules/dom7/dist/dom7.modular.js"); 20613/* harmony import */ var ssr_window__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ssr-window */ "./node_modules/ssr-window/dist/ssr-window.esm.js"); 20614function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); } 20615function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); } 20616function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; } 20617function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } 20618function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); } 20619function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); } 20620function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); } 20621function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; } 20622function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 20623function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 20624function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 20625function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 20626function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } 20627function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 20628/** 20629 * Swiper 5.4.5 20630 * Most modern mobile touch slider and framework with hardware accelerated transitions 20631 * http://swiperjs.com 20632 * 20633 * Copyright 2014-2020 Vladimir Kharlampidi 20634 * 20635 * Released under the MIT License 20636 * 20637 * Released on: June 16, 2020 20638 */ 20639 20640 20641 20642var Methods = { 20643 addClass: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["addClass"], 20644 removeClass: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["removeClass"], 20645 hasClass: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["hasClass"], 20646 toggleClass: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["toggleClass"], 20647 attr: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["attr"], 20648 removeAttr: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["removeAttr"], 20649 data: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["data"], 20650 transform: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["transform"], 20651 transition: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["transition"], 20652 on: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["on"], 20653 off: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["off"], 20654 trigger: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["trigger"], 20655 transitionEnd: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["transitionEnd"], 20656 outerWidth: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["outerWidth"], 20657 outerHeight: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["outerHeight"], 20658 offset: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["offset"], 20659 css: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["css"], 20660 each: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["each"], 20661 html: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["html"], 20662 text: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["text"], 20663 is: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["is"], 20664 index: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["index"], 20665 eq: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["eq"], 20666 append: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["append"], 20667 prepend: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["prepend"], 20668 next: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["next"], 20669 nextAll: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["nextAll"], 20670 prev: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["prev"], 20671 prevAll: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["prevAll"], 20672 parent: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["parent"], 20673 parents: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["parents"], 20674 closest: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["closest"], 20675 find: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["find"], 20676 children: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["children"], 20677 filter: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["filter"], 20678 remove: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["remove"], 20679 add: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["add"], 20680 styles: dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["styles"] 20681}; 20682Object.keys(Methods).forEach(function (methodName) { 20683 dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"].fn[methodName] = dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"].fn[methodName] || Methods[methodName]; 20684}); 20685var Utils = { 20686 deleteProps: function deleteProps(obj) { 20687 var object = obj; 20688 Object.keys(object).forEach(function (key) { 20689 try { 20690 object[key] = null; 20691 } catch (e) { 20692 // no getter for object 20693 } 20694 try { 20695 delete object[key]; 20696 } catch (e) { 20697 // something got wrong 20698 } 20699 }); 20700 }, 20701 nextTick: function nextTick(callback) { 20702 var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; 20703 return setTimeout(callback, delay); 20704 }, 20705 now: function now() { 20706 return Date.now(); 20707 }, 20708 getTranslate: function getTranslate(el) { 20709 var axis = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'x'; 20710 var matrix; 20711 var curTransform; 20712 var transformMatrix; 20713 var curStyle = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].getComputedStyle(el, null); 20714 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].WebKitCSSMatrix) { 20715 curTransform = curStyle.transform || curStyle.webkitTransform; 20716 if (curTransform.split(',').length > 6) { 20717 curTransform = curTransform.split(', ').map(function (a) { 20718 return a.replace(',', '.'); 20719 }).join(', '); 20720 } 20721 // Some old versions of Webkit choke when 'none' is passed; pass 20722 // empty string instead in this case 20723 transformMatrix = new ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].WebKitCSSMatrix(curTransform === 'none' ? '' : curTransform); 20724 } else { 20725 transformMatrix = curStyle.MozTransform || curStyle.OTransform || curStyle.MsTransform || curStyle.msTransform || curStyle.transform || curStyle.getPropertyValue('transform').replace('translate(', 'matrix(1, 0, 0, 1,'); 20726 matrix = transformMatrix.toString().split(','); 20727 } 20728 if (axis === 'x') { 20729 // Latest Chrome and webkits Fix 20730 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].WebKitCSSMatrix) curTransform = transformMatrix.m41; 20731 // Crazy IE10 Matrix 20732 else if (matrix.length === 16) curTransform = parseFloat(matrix[12]); 20733 // Normal Browsers 20734 else curTransform = parseFloat(matrix[4]); 20735 } 20736 if (axis === 'y') { 20737 // Latest Chrome and webkits Fix 20738 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].WebKitCSSMatrix) curTransform = transformMatrix.m42; 20739 // Crazy IE10 Matrix 20740 else if (matrix.length === 16) curTransform = parseFloat(matrix[13]); 20741 // Normal Browsers 20742 else curTransform = parseFloat(matrix[5]); 20743 } 20744 return curTransform || 0; 20745 }, 20746 parseUrlQuery: function parseUrlQuery(url) { 20747 var query = {}; 20748 var urlToParse = url || ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].location.href; 20749 var i; 20750 var params; 20751 var param; 20752 var length; 20753 if (typeof urlToParse === 'string' && urlToParse.length) { 20754 urlToParse = urlToParse.indexOf('?') > -1 ? urlToParse.replace(/\S*\?/, '') : ''; 20755 params = urlToParse.split('&').filter(function (paramsPart) { 20756 return paramsPart !== ''; 20757 }); 20758 length = params.length; 20759 for (i = 0; i < length; i += 1) { 20760 param = params[i].replace(/#\S+/g, '').split('='); 20761 query[decodeURIComponent(param[0])] = typeof param[1] === 'undefined' ? undefined : decodeURIComponent(param[1]) || ''; 20762 } 20763 } 20764 return query; 20765 }, 20766 isObject: function isObject(o) { 20767 return _typeof(o) === 'object' && o !== null && o.constructor && o.constructor === Object; 20768 }, 20769 extend: function extend() { 20770 var to = Object(arguments.length <= 0 ? undefined : arguments[0]); 20771 for (var i = 1; i < arguments.length; i += 1) { 20772 var nextSource = i < 0 || arguments.length <= i ? undefined : arguments[i]; 20773 if (nextSource !== undefined && nextSource !== null) { 20774 var keysArray = Object.keys(Object(nextSource)); 20775 for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex += 1) { 20776 var nextKey = keysArray[nextIndex]; 20777 var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); 20778 if (desc !== undefined && desc.enumerable) { 20779 if (Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) { 20780 Utils.extend(to[nextKey], nextSource[nextKey]); 20781 } else if (!Utils.isObject(to[nextKey]) && Utils.isObject(nextSource[nextKey])) { 20782 to[nextKey] = {}; 20783 Utils.extend(to[nextKey], nextSource[nextKey]); 20784 } else { 20785 to[nextKey] = nextSource[nextKey]; 20786 } 20787 } 20788 } 20789 } 20790 } 20791 return to; 20792 } 20793}; 20794var Support = function Support() { 20795 return { 20796 touch: !!('ontouchstart' in ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"] || ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].DocumentTouch && ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"] instanceof ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].DocumentTouch), 20797 pointerEvents: !!ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].PointerEvent && 'maxTouchPoints' in ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].navigator && ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].navigator.maxTouchPoints >= 0, 20798 observer: function checkObserver() { 20799 return 'MutationObserver' in ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"] || 'WebkitMutationObserver' in ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"]; 20800 }(), 20801 passiveListener: function checkPassiveListener() { 20802 var supportsPassive = false; 20803 try { 20804 var opts = Object.defineProperty({}, 'passive', { 20805 // eslint-disable-next-line 20806 get: function get() { 20807 supportsPassive = true; 20808 } 20809 }); 20810 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('testPassiveListener', null, opts); 20811 } catch (e) { 20812 // No support 20813 } 20814 return supportsPassive; 20815 }(), 20816 gestures: function checkGestures() { 20817 return 'ongesturestart' in ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"]; 20818 }() 20819 }; 20820}(); 20821var SwiperClass = /*#__PURE__*/function () { 20822 function SwiperClass() { 20823 var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 20824 _classCallCheck(this, SwiperClass); 20825 var self = this; 20826 self.params = params; 20827 20828 // Events 20829 self.eventsListeners = {}; 20830 if (self.params && self.params.on) { 20831 Object.keys(self.params.on).forEach(function (eventName) { 20832 self.on(eventName, self.params.on[eventName]); 20833 }); 20834 } 20835 } 20836 return _createClass(SwiperClass, [{ 20837 key: "on", 20838 value: function on(events, handler, priority) { 20839 var self = this; 20840 if (typeof handler !== 'function') return self; 20841 var method = priority ? 'unshift' : 'push'; 20842 events.split(' ').forEach(function (event) { 20843 if (!self.eventsListeners[event]) self.eventsListeners[event] = []; 20844 self.eventsListeners[event][method](handler); 20845 }); 20846 return self; 20847 } 20848 }, { 20849 key: "once", 20850 value: function once(events, handler, priority) { 20851 var self = this; 20852 if (typeof handler !== 'function') return self; 20853 function onceHandler() { 20854 self.off(events, onceHandler); 20855 if (onceHandler.f7proxy) { 20856 delete onceHandler.f7proxy; 20857 } 20858 for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { 20859 args[_key] = arguments[_key]; 20860 } 20861 handler.apply(self, args); 20862 } 20863 onceHandler.f7proxy = handler; 20864 return self.on(events, onceHandler, priority); 20865 } 20866 }, { 20867 key: "off", 20868 value: function off(events, handler) { 20869 var self = this; 20870 if (!self.eventsListeners) return self; 20871 events.split(' ').forEach(function (event) { 20872 if (typeof handler === 'undefined') { 20873 self.eventsListeners[event] = []; 20874 } else if (self.eventsListeners[event] && self.eventsListeners[event].length) { 20875 self.eventsListeners[event].forEach(function (eventHandler, index) { 20876 if (eventHandler === handler || eventHandler.f7proxy && eventHandler.f7proxy === handler) { 20877 self.eventsListeners[event].splice(index, 1); 20878 } 20879 }); 20880 } 20881 }); 20882 return self; 20883 } 20884 }, { 20885 key: "emit", 20886 value: function emit() { 20887 var self = this; 20888 if (!self.eventsListeners) return self; 20889 var events; 20890 var data; 20891 var context; 20892 for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) { 20893 args[_key2] = arguments[_key2]; 20894 } 20895 if (typeof args[0] === 'string' || Array.isArray(args[0])) { 20896 events = args[0]; 20897 data = args.slice(1, args.length); 20898 context = self; 20899 } else { 20900 events = args[0].events; 20901 data = args[0].data; 20902 context = args[0].context || self; 20903 } 20904 var eventsArray = Array.isArray(events) ? events : events.split(' '); 20905 eventsArray.forEach(function (event) { 20906 if (self.eventsListeners && self.eventsListeners[event]) { 20907 var handlers = []; 20908 self.eventsListeners[event].forEach(function (eventHandler) { 20909 handlers.push(eventHandler); 20910 }); 20911 handlers.forEach(function (eventHandler) { 20912 eventHandler.apply(context, data); 20913 }); 20914 } 20915 }); 20916 return self; 20917 } 20918 }, { 20919 key: "useModulesParams", 20920 value: function useModulesParams(instanceParams) { 20921 var instance = this; 20922 if (!instance.modules) return; 20923 Object.keys(instance.modules).forEach(function (moduleName) { 20924 var module = instance.modules[moduleName]; 20925 // Extend params 20926 if (module.params) { 20927 Utils.extend(instanceParams, module.params); 20928 } 20929 }); 20930 } 20931 }, { 20932 key: "useModules", 20933 value: function useModules() { 20934 var modulesParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; 20935 var instance = this; 20936 if (!instance.modules) return; 20937 Object.keys(instance.modules).forEach(function (moduleName) { 20938 var module = instance.modules[moduleName]; 20939 var moduleParams = modulesParams[moduleName] || {}; 20940 // Extend instance methods and props 20941 if (module.instance) { 20942 Object.keys(module.instance).forEach(function (modulePropName) { 20943 var moduleProp = module.instance[modulePropName]; 20944 if (typeof moduleProp === 'function') { 20945 instance[modulePropName] = moduleProp.bind(instance); 20946 } else { 20947 instance[modulePropName] = moduleProp; 20948 } 20949 }); 20950 } 20951 // Add event listeners 20952 if (module.on && instance.on) { 20953 Object.keys(module.on).forEach(function (moduleEventName) { 20954 instance.on(moduleEventName, module.on[moduleEventName]); 20955 }); 20956 } 20957 20958 // Module create callback 20959 if (module.create) { 20960 module.create.bind(instance)(moduleParams); 20961 } 20962 }); 20963 } 20964 }], [{ 20965 key: "components", 20966 set: function set(components) { 20967 var Class = this; 20968 if (!Class.use) return; 20969 Class.use(components); 20970 } 20971 }, { 20972 key: "installModule", 20973 value: function installModule(module) { 20974 var Class = this; 20975 if (!Class.prototype.modules) Class.prototype.modules = {}; 20976 var name = module.name || "".concat(Object.keys(Class.prototype.modules).length, "_").concat(Utils.now()); 20977 Class.prototype.modules[name] = module; 20978 // Prototype 20979 if (module.proto) { 20980 Object.keys(module.proto).forEach(function (key) { 20981 Class.prototype[key] = module.proto[key]; 20982 }); 20983 } 20984 // Class 20985 if (module.static) { 20986 Object.keys(module.static).forEach(function (key) { 20987 Class[key] = module.static[key]; 20988 }); 20989 } 20990 // Callback 20991 if (module.install) { 20992 for (var _len3 = arguments.length, params = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { 20993 params[_key3 - 1] = arguments[_key3]; 20994 } 20995 module.install.apply(Class, params); 20996 } 20997 return Class; 20998 } 20999 }, { 21000 key: "use", 21001 value: function use(module) { 21002 var Class = this; 21003 if (Array.isArray(module)) { 21004 module.forEach(function (m) { 21005 return Class.installModule(m); 21006 }); 21007 return Class; 21008 } 21009 for (var _len4 = arguments.length, params = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { 21010 params[_key4 - 1] = arguments[_key4]; 21011 } 21012 return Class.installModule.apply(Class, [module].concat(params)); 21013 } 21014 }]); 21015}(); 21016function updateSize() { 21017 var swiper = this; 21018 var width; 21019 var height; 21020 var $el = swiper.$el; 21021 if (typeof swiper.params.width !== 'undefined') { 21022 width = swiper.params.width; 21023 } else { 21024 width = $el[0].clientWidth; 21025 } 21026 if (typeof swiper.params.height !== 'undefined') { 21027 height = swiper.params.height; 21028 } else { 21029 height = $el[0].clientHeight; 21030 } 21031 if (width === 0 && swiper.isHorizontal() || height === 0 && swiper.isVertical()) { 21032 return; 21033 } 21034 21035 // Subtract paddings 21036 width = width - parseInt($el.css('padding-left'), 10) - parseInt($el.css('padding-right'), 10); 21037 height = height - parseInt($el.css('padding-top'), 10) - parseInt($el.css('padding-bottom'), 10); 21038 Utils.extend(swiper, { 21039 width: width, 21040 height: height, 21041 size: swiper.isHorizontal() ? width : height 21042 }); 21043} 21044function updateSlides() { 21045 var swiper = this; 21046 var params = swiper.params; 21047 var $wrapperEl = swiper.$wrapperEl, 21048 swiperSize = swiper.size, 21049 rtl = swiper.rtlTranslate, 21050 wrongRTL = swiper.wrongRTL; 21051 var isVirtual = swiper.virtual && params.virtual.enabled; 21052 var previousSlidesLength = isVirtual ? swiper.virtual.slides.length : swiper.slides.length; 21053 var slides = $wrapperEl.children(".".concat(swiper.params.slideClass)); 21054 var slidesLength = isVirtual ? swiper.virtual.slides.length : slides.length; 21055 var snapGrid = []; 21056 var slidesGrid = []; 21057 var slidesSizesGrid = []; 21058 function slidesForMargin(slideIndex) { 21059 if (!params.cssMode) return true; 21060 if (slideIndex === slides.length - 1) { 21061 return false; 21062 } 21063 return true; 21064 } 21065 var offsetBefore = params.slidesOffsetBefore; 21066 if (typeof offsetBefore === 'function') { 21067 offsetBefore = params.slidesOffsetBefore.call(swiper); 21068 } 21069 var offsetAfter = params.slidesOffsetAfter; 21070 if (typeof offsetAfter === 'function') { 21071 offsetAfter = params.slidesOffsetAfter.call(swiper); 21072 } 21073 var previousSnapGridLength = swiper.snapGrid.length; 21074 var previousSlidesGridLength = swiper.snapGrid.length; 21075 var spaceBetween = params.spaceBetween; 21076 var slidePosition = -offsetBefore; 21077 var prevSlideSize = 0; 21078 var index = 0; 21079 if (typeof swiperSize === 'undefined') { 21080 return; 21081 } 21082 if (typeof spaceBetween === 'string' && spaceBetween.indexOf('%') >= 0) { 21083 spaceBetween = parseFloat(spaceBetween.replace('%', '')) / 100 * swiperSize; 21084 } 21085 swiper.virtualSize = -spaceBetween; 21086 21087 // reset margins 21088 if (rtl) slides.css({ 21089 marginLeft: '', 21090 marginTop: '' 21091 });else slides.css({ 21092 marginRight: '', 21093 marginBottom: '' 21094 }); 21095 var slidesNumberEvenToRows; 21096 if (params.slidesPerColumn > 1) { 21097 if (Math.floor(slidesLength / params.slidesPerColumn) === slidesLength / swiper.params.slidesPerColumn) { 21098 slidesNumberEvenToRows = slidesLength; 21099 } else { 21100 slidesNumberEvenToRows = Math.ceil(slidesLength / params.slidesPerColumn) * params.slidesPerColumn; 21101 } 21102 if (params.slidesPerView !== 'auto' && params.slidesPerColumnFill === 'row') { 21103 slidesNumberEvenToRows = Math.max(slidesNumberEvenToRows, params.slidesPerView * params.slidesPerColumn); 21104 } 21105 } 21106 21107 // Calc slides 21108 var slideSize; 21109 var slidesPerColumn = params.slidesPerColumn; 21110 var slidesPerRow = slidesNumberEvenToRows / slidesPerColumn; 21111 var numFullColumns = Math.floor(slidesLength / params.slidesPerColumn); 21112 for (var i = 0; i < slidesLength; i += 1) { 21113 slideSize = 0; 21114 var _slide = slides.eq(i); 21115 if (params.slidesPerColumn > 1) { 21116 // Set slides order 21117 var newSlideOrderIndex = void 0; 21118 var column = void 0; 21119 var row = void 0; 21120 if (params.slidesPerColumnFill === 'row' && params.slidesPerGroup > 1) { 21121 var groupIndex = Math.floor(i / (params.slidesPerGroup * params.slidesPerColumn)); 21122 var slideIndexInGroup = i - params.slidesPerColumn * params.slidesPerGroup * groupIndex; 21123 var columnsInGroup = groupIndex === 0 ? params.slidesPerGroup : Math.min(Math.ceil((slidesLength - groupIndex * slidesPerColumn * params.slidesPerGroup) / slidesPerColumn), params.slidesPerGroup); 21124 row = Math.floor(slideIndexInGroup / columnsInGroup); 21125 column = slideIndexInGroup - row * columnsInGroup + groupIndex * params.slidesPerGroup; 21126 newSlideOrderIndex = column + row * slidesNumberEvenToRows / slidesPerColumn; 21127 _slide.css({ 21128 '-webkit-box-ordinal-group': newSlideOrderIndex, 21129 '-moz-box-ordinal-group': newSlideOrderIndex, 21130 '-ms-flex-order': newSlideOrderIndex, 21131 '-webkit-order': newSlideOrderIndex, 21132 order: newSlideOrderIndex 21133 }); 21134 } else if (params.slidesPerColumnFill === 'column') { 21135 column = Math.floor(i / slidesPerColumn); 21136 row = i - column * slidesPerColumn; 21137 if (column > numFullColumns || column === numFullColumns && row === slidesPerColumn - 1) { 21138 row += 1; 21139 if (row >= slidesPerColumn) { 21140 row = 0; 21141 column += 1; 21142 } 21143 } 21144 } else { 21145 row = Math.floor(i / slidesPerRow); 21146 column = i - row * slidesPerRow; 21147 } 21148 _slide.css("margin-".concat(swiper.isHorizontal() ? 'top' : 'left'), row !== 0 && params.spaceBetween && "".concat(params.spaceBetween, "px")); 21149 } 21150 if (_slide.css('display') === 'none') continue; // eslint-disable-line 21151 21152 if (params.slidesPerView === 'auto') { 21153 var slideStyles = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].getComputedStyle(_slide[0], null); 21154 var currentTransform = _slide[0].style.transform; 21155 var currentWebKitTransform = _slide[0].style.webkitTransform; 21156 if (currentTransform) { 21157 _slide[0].style.transform = 'none'; 21158 } 21159 if (currentWebKitTransform) { 21160 _slide[0].style.webkitTransform = 'none'; 21161 } 21162 if (params.roundLengths) { 21163 slideSize = swiper.isHorizontal() ? _slide.outerWidth(true) : _slide.outerHeight(true); 21164 } else { 21165 // eslint-disable-next-line 21166 if (swiper.isHorizontal()) { 21167 var width = parseFloat(slideStyles.getPropertyValue('width')); 21168 var paddingLeft = parseFloat(slideStyles.getPropertyValue('padding-left')); 21169 var paddingRight = parseFloat(slideStyles.getPropertyValue('padding-right')); 21170 var marginLeft = parseFloat(slideStyles.getPropertyValue('margin-left')); 21171 var marginRight = parseFloat(slideStyles.getPropertyValue('margin-right')); 21172 var boxSizing = slideStyles.getPropertyValue('box-sizing'); 21173 if (boxSizing && boxSizing === 'border-box') { 21174 slideSize = width + marginLeft + marginRight; 21175 } else { 21176 slideSize = width + paddingLeft + paddingRight + marginLeft + marginRight; 21177 } 21178 } else { 21179 var height = parseFloat(slideStyles.getPropertyValue('height')); 21180 var paddingTop = parseFloat(slideStyles.getPropertyValue('padding-top')); 21181 var paddingBottom = parseFloat(slideStyles.getPropertyValue('padding-bottom')); 21182 var marginTop = parseFloat(slideStyles.getPropertyValue('margin-top')); 21183 var marginBottom = parseFloat(slideStyles.getPropertyValue('margin-bottom')); 21184 var _boxSizing = slideStyles.getPropertyValue('box-sizing'); 21185 if (_boxSizing && _boxSizing === 'border-box') { 21186 slideSize = height + marginTop + marginBottom; 21187 } else { 21188 slideSize = height + paddingTop + paddingBottom + marginTop + marginBottom; 21189 } 21190 } 21191 } 21192 if (currentTransform) { 21193 _slide[0].style.transform = currentTransform; 21194 } 21195 if (currentWebKitTransform) { 21196 _slide[0].style.webkitTransform = currentWebKitTransform; 21197 } 21198 if (params.roundLengths) slideSize = Math.floor(slideSize); 21199 } else { 21200 slideSize = (swiperSize - (params.slidesPerView - 1) * spaceBetween) / params.slidesPerView; 21201 if (params.roundLengths) slideSize = Math.floor(slideSize); 21202 if (slides[i]) { 21203 if (swiper.isHorizontal()) { 21204 slides[i].style.width = "".concat(slideSize, "px"); 21205 } else { 21206 slides[i].style.height = "".concat(slideSize, "px"); 21207 } 21208 } 21209 } 21210 if (slides[i]) { 21211 slides[i].swiperSlideSize = slideSize; 21212 } 21213 slidesSizesGrid.push(slideSize); 21214 if (params.centeredSlides) { 21215 slidePosition = slidePosition + slideSize / 2 + prevSlideSize / 2 + spaceBetween; 21216 if (prevSlideSize === 0 && i !== 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 21217 if (i === 0) slidePosition = slidePosition - swiperSize / 2 - spaceBetween; 21218 if (Math.abs(slidePosition) < 1 / 1000) slidePosition = 0; 21219 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 21220 if (index % params.slidesPerGroup === 0) snapGrid.push(slidePosition); 21221 slidesGrid.push(slidePosition); 21222 } else { 21223 if (params.roundLengths) slidePosition = Math.floor(slidePosition); 21224 if ((index - Math.min(swiper.params.slidesPerGroupSkip, index)) % swiper.params.slidesPerGroup === 0) snapGrid.push(slidePosition); 21225 slidesGrid.push(slidePosition); 21226 slidePosition = slidePosition + slideSize + spaceBetween; 21227 } 21228 swiper.virtualSize += slideSize + spaceBetween; 21229 prevSlideSize = slideSize; 21230 index += 1; 21231 } 21232 swiper.virtualSize = Math.max(swiper.virtualSize, swiperSize) + offsetAfter; 21233 var newSlidesGrid; 21234 if (rtl && wrongRTL && (params.effect === 'slide' || params.effect === 'coverflow')) { 21235 $wrapperEl.css({ 21236 width: "".concat(swiper.virtualSize + params.spaceBetween, "px") 21237 }); 21238 } 21239 if (params.setWrapperSize) { 21240 if (swiper.isHorizontal()) $wrapperEl.css({ 21241 width: "".concat(swiper.virtualSize + params.spaceBetween, "px") 21242 });else $wrapperEl.css({ 21243 height: "".concat(swiper.virtualSize + params.spaceBetween, "px") 21244 }); 21245 } 21246 if (params.slidesPerColumn > 1) { 21247 swiper.virtualSize = (slideSize + params.spaceBetween) * slidesNumberEvenToRows; 21248 swiper.virtualSize = Math.ceil(swiper.virtualSize / params.slidesPerColumn) - params.spaceBetween; 21249 if (swiper.isHorizontal()) $wrapperEl.css({ 21250 width: "".concat(swiper.virtualSize + params.spaceBetween, "px") 21251 });else $wrapperEl.css({ 21252 height: "".concat(swiper.virtualSize + params.spaceBetween, "px") 21253 }); 21254 if (params.centeredSlides) { 21255 newSlidesGrid = []; 21256 for (var _i = 0; _i < snapGrid.length; _i += 1) { 21257 var slidesGridItem = snapGrid[_i]; 21258 if (params.roundLengths) slidesGridItem = Math.floor(slidesGridItem); 21259 if (snapGrid[_i] < swiper.virtualSize + snapGrid[0]) newSlidesGrid.push(slidesGridItem); 21260 } 21261 snapGrid = newSlidesGrid; 21262 } 21263 } 21264 21265 // Remove last grid elements depending on width 21266 if (!params.centeredSlides) { 21267 newSlidesGrid = []; 21268 for (var _i2 = 0; _i2 < snapGrid.length; _i2 += 1) { 21269 var _slidesGridItem = snapGrid[_i2]; 21270 if (params.roundLengths) _slidesGridItem = Math.floor(_slidesGridItem); 21271 if (snapGrid[_i2] <= swiper.virtualSize - swiperSize) { 21272 newSlidesGrid.push(_slidesGridItem); 21273 } 21274 } 21275 snapGrid = newSlidesGrid; 21276 if (Math.floor(swiper.virtualSize - swiperSize) - Math.floor(snapGrid[snapGrid.length - 1]) > 1) { 21277 snapGrid.push(swiper.virtualSize - swiperSize); 21278 } 21279 } 21280 if (snapGrid.length === 0) snapGrid = [0]; 21281 if (params.spaceBetween !== 0) { 21282 if (swiper.isHorizontal()) { 21283 if (rtl) slides.filter(slidesForMargin).css({ 21284 marginLeft: "".concat(spaceBetween, "px") 21285 });else slides.filter(slidesForMargin).css({ 21286 marginRight: "".concat(spaceBetween, "px") 21287 }); 21288 } else slides.filter(slidesForMargin).css({ 21289 marginBottom: "".concat(spaceBetween, "px") 21290 }); 21291 } 21292 if (params.centeredSlides && params.centeredSlidesBounds) { 21293 var allSlidesSize = 0; 21294 slidesSizesGrid.forEach(function (slideSizeValue) { 21295 allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); 21296 }); 21297 allSlidesSize -= params.spaceBetween; 21298 var maxSnap = allSlidesSize - swiperSize; 21299 snapGrid = snapGrid.map(function (snap) { 21300 if (snap < 0) return -offsetBefore; 21301 if (snap > maxSnap) return maxSnap + offsetAfter; 21302 return snap; 21303 }); 21304 } 21305 if (params.centerInsufficientSlides) { 21306 var _allSlidesSize = 0; 21307 slidesSizesGrid.forEach(function (slideSizeValue) { 21308 _allSlidesSize += slideSizeValue + (params.spaceBetween ? params.spaceBetween : 0); 21309 }); 21310 _allSlidesSize -= params.spaceBetween; 21311 if (_allSlidesSize < swiperSize) { 21312 var allSlidesOffset = (swiperSize - _allSlidesSize) / 2; 21313 snapGrid.forEach(function (snap, snapIndex) { 21314 snapGrid[snapIndex] = snap - allSlidesOffset; 21315 }); 21316 slidesGrid.forEach(function (snap, snapIndex) { 21317 slidesGrid[snapIndex] = snap + allSlidesOffset; 21318 }); 21319 } 21320 } 21321 Utils.extend(swiper, { 21322 slides: slides, 21323 snapGrid: snapGrid, 21324 slidesGrid: slidesGrid, 21325 slidesSizesGrid: slidesSizesGrid 21326 }); 21327 if (slidesLength !== previousSlidesLength) { 21328 swiper.emit('slidesLengthChange'); 21329 } 21330 if (snapGrid.length !== previousSnapGridLength) { 21331 if (swiper.params.watchOverflow) swiper.checkOverflow(); 21332 swiper.emit('snapGridLengthChange'); 21333 } 21334 if (slidesGrid.length !== previousSlidesGridLength) { 21335 swiper.emit('slidesGridLengthChange'); 21336 } 21337 if (params.watchSlidesProgress || params.watchSlidesVisibility) { 21338 swiper.updateSlidesOffset(); 21339 } 21340} 21341function updateAutoHeight(speed) { 21342 var swiper = this; 21343 var activeSlides = []; 21344 var newHeight = 0; 21345 var i; 21346 if (typeof speed === 'number') { 21347 swiper.setTransition(speed); 21348 } else if (speed === true) { 21349 swiper.setTransition(swiper.params.speed); 21350 } 21351 // Find slides currently in view 21352 if (swiper.params.slidesPerView !== 'auto' && swiper.params.slidesPerView > 1) { 21353 if (swiper.params.centeredSlides) { 21354 swiper.visibleSlides.each(function (index, slide) { 21355 activeSlides.push(slide); 21356 }); 21357 } else { 21358 for (i = 0; i < Math.ceil(swiper.params.slidesPerView); i += 1) { 21359 var _index = swiper.activeIndex + i; 21360 if (_index > swiper.slides.length) break; 21361 activeSlides.push(swiper.slides.eq(_index)[0]); 21362 } 21363 } 21364 } else { 21365 activeSlides.push(swiper.slides.eq(swiper.activeIndex)[0]); 21366 } 21367 21368 // Find new height from highest slide in view 21369 for (i = 0; i < activeSlides.length; i += 1) { 21370 if (typeof activeSlides[i] !== 'undefined') { 21371 var height = activeSlides[i].offsetHeight; 21372 newHeight = height > newHeight ? height : newHeight; 21373 } 21374 } 21375 21376 // Update Height 21377 if (newHeight) swiper.$wrapperEl.css('height', "".concat(newHeight, "px")); 21378} 21379function updateSlidesOffset() { 21380 var swiper = this; 21381 var slides = swiper.slides; 21382 for (var i = 0; i < slides.length; i += 1) { 21383 slides[i].swiperSlideOffset = swiper.isHorizontal() ? slides[i].offsetLeft : slides[i].offsetTop; 21384 } 21385} 21386function updateSlidesProgress() { 21387 var translate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this && this.translate || 0; 21388 var swiper = this; 21389 var params = swiper.params; 21390 var slides = swiper.slides, 21391 rtl = swiper.rtlTranslate; 21392 if (slides.length === 0) return; 21393 if (typeof slides[0].swiperSlideOffset === 'undefined') swiper.updateSlidesOffset(); 21394 var offsetCenter = -translate; 21395 if (rtl) offsetCenter = translate; 21396 21397 // Visible Slides 21398 slides.removeClass(params.slideVisibleClass); 21399 swiper.visibleSlidesIndexes = []; 21400 swiper.visibleSlides = []; 21401 for (var i = 0; i < slides.length; i += 1) { 21402 var _slide2 = slides[i]; 21403 var slideProgress = (offsetCenter + (params.centeredSlides ? swiper.minTranslate() : 0) - _slide2.swiperSlideOffset) / (_slide2.swiperSlideSize + params.spaceBetween); 21404 if (params.watchSlidesVisibility || params.centeredSlides && params.autoHeight) { 21405 var slideBefore = -(offsetCenter - _slide2.swiperSlideOffset); 21406 var slideAfter = slideBefore + swiper.slidesSizesGrid[i]; 21407 var isVisible = slideBefore >= 0 && slideBefore < swiper.size - 1 || slideAfter > 1 && slideAfter <= swiper.size || slideBefore <= 0 && slideAfter >= swiper.size; 21408 if (isVisible) { 21409 swiper.visibleSlides.push(_slide2); 21410 swiper.visibleSlidesIndexes.push(i); 21411 slides.eq(i).addClass(params.slideVisibleClass); 21412 } 21413 } 21414 _slide2.progress = rtl ? -slideProgress : slideProgress; 21415 } 21416 swiper.visibleSlides = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(swiper.visibleSlides); 21417} 21418function updateProgress(translate) { 21419 var swiper = this; 21420 if (typeof translate === 'undefined') { 21421 var multiplier = swiper.rtlTranslate ? -1 : 1; 21422 // eslint-disable-next-line 21423 translate = swiper && swiper.translate && swiper.translate * multiplier || 0; 21424 } 21425 var params = swiper.params; 21426 var translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 21427 var progress = swiper.progress, 21428 isBeginning = swiper.isBeginning, 21429 isEnd = swiper.isEnd; 21430 var wasBeginning = isBeginning; 21431 var wasEnd = isEnd; 21432 if (translatesDiff === 0) { 21433 progress = 0; 21434 isBeginning = true; 21435 isEnd = true; 21436 } else { 21437 progress = (translate - swiper.minTranslate()) / translatesDiff; 21438 isBeginning = progress <= 0; 21439 isEnd = progress >= 1; 21440 } 21441 Utils.extend(swiper, { 21442 progress: progress, 21443 isBeginning: isBeginning, 21444 isEnd: isEnd 21445 }); 21446 if (params.watchSlidesProgress || params.watchSlidesVisibility || params.centeredSlides && params.autoHeight) swiper.updateSlidesProgress(translate); 21447 if (isBeginning && !wasBeginning) { 21448 swiper.emit('reachBeginning toEdge'); 21449 } 21450 if (isEnd && !wasEnd) { 21451 swiper.emit('reachEnd toEdge'); 21452 } 21453 if (wasBeginning && !isBeginning || wasEnd && !isEnd) { 21454 swiper.emit('fromEdge'); 21455 } 21456 swiper.emit('progress', progress); 21457} 21458function updateSlidesClasses() { 21459 var swiper = this; 21460 var slides = swiper.slides, 21461 params = swiper.params, 21462 $wrapperEl = swiper.$wrapperEl, 21463 activeIndex = swiper.activeIndex, 21464 realIndex = swiper.realIndex; 21465 var isVirtual = swiper.virtual && params.virtual.enabled; 21466 slides.removeClass("".concat(params.slideActiveClass, " ").concat(params.slideNextClass, " ").concat(params.slidePrevClass, " ").concat(params.slideDuplicateActiveClass, " ").concat(params.slideDuplicateNextClass, " ").concat(params.slideDuplicatePrevClass)); 21467 var activeSlide; 21468 if (isVirtual) { 21469 activeSlide = swiper.$wrapperEl.find(".".concat(params.slideClass, "[data-swiper-slide-index=\"").concat(activeIndex, "\"]")); 21470 } else { 21471 activeSlide = slides.eq(activeIndex); 21472 } 21473 21474 // Active classes 21475 activeSlide.addClass(params.slideActiveClass); 21476 if (params.loop) { 21477 // Duplicate to all looped slides 21478 if (activeSlide.hasClass(params.slideDuplicateClass)) { 21479 $wrapperEl.children(".".concat(params.slideClass, ":not(.").concat(params.slideDuplicateClass, ")[data-swiper-slide-index=\"").concat(realIndex, "\"]")).addClass(params.slideDuplicateActiveClass); 21480 } else { 21481 $wrapperEl.children(".".concat(params.slideClass, ".").concat(params.slideDuplicateClass, "[data-swiper-slide-index=\"").concat(realIndex, "\"]")).addClass(params.slideDuplicateActiveClass); 21482 } 21483 } 21484 // Next Slide 21485 var nextSlide = activeSlide.nextAll(".".concat(params.slideClass)).eq(0).addClass(params.slideNextClass); 21486 if (params.loop && nextSlide.length === 0) { 21487 nextSlide = slides.eq(0); 21488 nextSlide.addClass(params.slideNextClass); 21489 } 21490 // Prev Slide 21491 var prevSlide = activeSlide.prevAll(".".concat(params.slideClass)).eq(0).addClass(params.slidePrevClass); 21492 if (params.loop && prevSlide.length === 0) { 21493 prevSlide = slides.eq(-1); 21494 prevSlide.addClass(params.slidePrevClass); 21495 } 21496 if (params.loop) { 21497 // Duplicate to all looped slides 21498 if (nextSlide.hasClass(params.slideDuplicateClass)) { 21499 $wrapperEl.children(".".concat(params.slideClass, ":not(.").concat(params.slideDuplicateClass, ")[data-swiper-slide-index=\"").concat(nextSlide.attr('data-swiper-slide-index'), "\"]")).addClass(params.slideDuplicateNextClass); 21500 } else { 21501 $wrapperEl.children(".".concat(params.slideClass, ".").concat(params.slideDuplicateClass, "[data-swiper-slide-index=\"").concat(nextSlide.attr('data-swiper-slide-index'), "\"]")).addClass(params.slideDuplicateNextClass); 21502 } 21503 if (prevSlide.hasClass(params.slideDuplicateClass)) { 21504 $wrapperEl.children(".".concat(params.slideClass, ":not(.").concat(params.slideDuplicateClass, ")[data-swiper-slide-index=\"").concat(prevSlide.attr('data-swiper-slide-index'), "\"]")).addClass(params.slideDuplicatePrevClass); 21505 } else { 21506 $wrapperEl.children(".".concat(params.slideClass, ".").concat(params.slideDuplicateClass, "[data-swiper-slide-index=\"").concat(prevSlide.attr('data-swiper-slide-index'), "\"]")).addClass(params.slideDuplicatePrevClass); 21507 } 21508 } 21509} 21510function updateActiveIndex(newActiveIndex) { 21511 var swiper = this; 21512 var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 21513 var slidesGrid = swiper.slidesGrid, 21514 snapGrid = swiper.snapGrid, 21515 params = swiper.params, 21516 previousIndex = swiper.activeIndex, 21517 previousRealIndex = swiper.realIndex, 21518 previousSnapIndex = swiper.snapIndex; 21519 var activeIndex = newActiveIndex; 21520 var snapIndex; 21521 if (typeof activeIndex === 'undefined') { 21522 for (var i = 0; i < slidesGrid.length; i += 1) { 21523 if (typeof slidesGrid[i + 1] !== 'undefined') { 21524 if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1] - (slidesGrid[i + 1] - slidesGrid[i]) / 2) { 21525 activeIndex = i; 21526 } else if (translate >= slidesGrid[i] && translate < slidesGrid[i + 1]) { 21527 activeIndex = i + 1; 21528 } 21529 } else if (translate >= slidesGrid[i]) { 21530 activeIndex = i; 21531 } 21532 } 21533 // Normalize slideIndex 21534 if (params.normalizeSlideIndex) { 21535 if (activeIndex < 0 || typeof activeIndex === 'undefined') activeIndex = 0; 21536 } 21537 } 21538 if (snapGrid.indexOf(translate) >= 0) { 21539 snapIndex = snapGrid.indexOf(translate); 21540 } else { 21541 var skip = Math.min(params.slidesPerGroupSkip, activeIndex); 21542 snapIndex = skip + Math.floor((activeIndex - skip) / params.slidesPerGroup); 21543 } 21544 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 21545 if (activeIndex === previousIndex) { 21546 if (snapIndex !== previousSnapIndex) { 21547 swiper.snapIndex = snapIndex; 21548 swiper.emit('snapIndexChange'); 21549 } 21550 return; 21551 } 21552 21553 // Get real index 21554 var realIndex = parseInt(swiper.slides.eq(activeIndex).attr('data-swiper-slide-index') || activeIndex, 10); 21555 Utils.extend(swiper, { 21556 snapIndex: snapIndex, 21557 realIndex: realIndex, 21558 previousIndex: previousIndex, 21559 activeIndex: activeIndex 21560 }); 21561 swiper.emit('activeIndexChange'); 21562 swiper.emit('snapIndexChange'); 21563 if (previousRealIndex !== realIndex) { 21564 swiper.emit('realIndexChange'); 21565 } 21566 if (swiper.initialized || swiper.params.runCallbacksOnInit) { 21567 swiper.emit('slideChange'); 21568 } 21569} 21570function updateClickedSlide(e) { 21571 var swiper = this; 21572 var params = swiper.params; 21573 var slide = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(e.target).closest(".".concat(params.slideClass))[0]; 21574 var slideFound = false; 21575 if (slide) { 21576 for (var i = 0; i < swiper.slides.length; i += 1) { 21577 if (swiper.slides[i] === slide) slideFound = true; 21578 } 21579 } 21580 if (slide && slideFound) { 21581 swiper.clickedSlide = slide; 21582 if (swiper.virtual && swiper.params.virtual.enabled) { 21583 swiper.clickedIndex = parseInt(Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(slide).attr('data-swiper-slide-index'), 10); 21584 } else { 21585 swiper.clickedIndex = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(slide).index(); 21586 } 21587 } else { 21588 swiper.clickedSlide = undefined; 21589 swiper.clickedIndex = undefined; 21590 return; 21591 } 21592 if (params.slideToClickedSlide && swiper.clickedIndex !== undefined && swiper.clickedIndex !== swiper.activeIndex) { 21593 swiper.slideToClickedSlide(); 21594 } 21595} 21596var update = { 21597 updateSize: updateSize, 21598 updateSlides: updateSlides, 21599 updateAutoHeight: updateAutoHeight, 21600 updateSlidesOffset: updateSlidesOffset, 21601 updateSlidesProgress: updateSlidesProgress, 21602 updateProgress: updateProgress, 21603 updateSlidesClasses: updateSlidesClasses, 21604 updateActiveIndex: updateActiveIndex, 21605 updateClickedSlide: updateClickedSlide 21606}; 21607function getTranslate() { 21608 var axis = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.isHorizontal() ? 'x' : 'y'; 21609 var swiper = this; 21610 var params = swiper.params, 21611 rtl = swiper.rtlTranslate, 21612 translate = swiper.translate, 21613 $wrapperEl = swiper.$wrapperEl; 21614 if (params.virtualTranslate) { 21615 return rtl ? -translate : translate; 21616 } 21617 if (params.cssMode) { 21618 return translate; 21619 } 21620 var currentTranslate = Utils.getTranslate($wrapperEl[0], axis); 21621 if (rtl) currentTranslate = -currentTranslate; 21622 return currentTranslate || 0; 21623} 21624function setTranslate(translate, byController) { 21625 var swiper = this; 21626 var rtl = swiper.rtlTranslate, 21627 params = swiper.params, 21628 $wrapperEl = swiper.$wrapperEl, 21629 wrapperEl = swiper.wrapperEl, 21630 progress = swiper.progress; 21631 var x = 0; 21632 var y = 0; 21633 var z = 0; 21634 if (swiper.isHorizontal()) { 21635 x = rtl ? -translate : translate; 21636 } else { 21637 y = translate; 21638 } 21639 if (params.roundLengths) { 21640 x = Math.floor(x); 21641 y = Math.floor(y); 21642 } 21643 if (params.cssMode) { 21644 wrapperEl[swiper.isHorizontal() ? 'scrollLeft' : 'scrollTop'] = swiper.isHorizontal() ? -x : -y; 21645 } else if (!params.virtualTranslate) { 21646 $wrapperEl.transform("translate3d(".concat(x, "px, ").concat(y, "px, ").concat(z, "px)")); 21647 } 21648 swiper.previousTranslate = swiper.translate; 21649 swiper.translate = swiper.isHorizontal() ? x : y; 21650 21651 // Check if we need to update progress 21652 var newProgress; 21653 var translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 21654 if (translatesDiff === 0) { 21655 newProgress = 0; 21656 } else { 21657 newProgress = (translate - swiper.minTranslate()) / translatesDiff; 21658 } 21659 if (newProgress !== progress) { 21660 swiper.updateProgress(translate); 21661 } 21662 swiper.emit('setTranslate', swiper.translate, byController); 21663} 21664function minTranslate() { 21665 return -this.snapGrid[0]; 21666} 21667function maxTranslate() { 21668 return -this.snapGrid[this.snapGrid.length - 1]; 21669} 21670function translateTo() { 21671 var translate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; 21672 var speed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.params.speed; 21673 var runCallbacks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; 21674 var translateBounds = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true; 21675 var internal = arguments.length > 4 ? arguments[4] : undefined; 21676 var swiper = this; 21677 var params = swiper.params, 21678 wrapperEl = swiper.wrapperEl; 21679 if (swiper.animating && params.preventInteractionOnTransition) { 21680 return false; 21681 } 21682 var minTranslate = swiper.minTranslate(); 21683 var maxTranslate = swiper.maxTranslate(); 21684 var newTranslate; 21685 if (translateBounds && translate > minTranslate) newTranslate = minTranslate;else if (translateBounds && translate < maxTranslate) newTranslate = maxTranslate;else newTranslate = translate; 21686 21687 // Update progress 21688 swiper.updateProgress(newTranslate); 21689 if (params.cssMode) { 21690 var isH = swiper.isHorizontal(); 21691 if (speed === 0) { 21692 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; 21693 } else { 21694 // eslint-disable-next-line 21695 if (wrapperEl.scrollTo) { 21696 wrapperEl.scrollTo(_defineProperty(_defineProperty({}, isH ? 'left' : 'top', -newTranslate), "behavior", 'smooth')); 21697 } else { 21698 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = -newTranslate; 21699 } 21700 } 21701 return true; 21702 } 21703 if (speed === 0) { 21704 swiper.setTransition(0); 21705 swiper.setTranslate(newTranslate); 21706 if (runCallbacks) { 21707 swiper.emit('beforeTransitionStart', speed, internal); 21708 swiper.emit('transitionEnd'); 21709 } 21710 } else { 21711 swiper.setTransition(speed); 21712 swiper.setTranslate(newTranslate); 21713 if (runCallbacks) { 21714 swiper.emit('beforeTransitionStart', speed, internal); 21715 swiper.emit('transitionStart'); 21716 } 21717 if (!swiper.animating) { 21718 swiper.animating = true; 21719 if (!swiper.onTranslateToWrapperTransitionEnd) { 21720 swiper.onTranslateToWrapperTransitionEnd = function transitionEnd(e) { 21721 if (!swiper || swiper.destroyed) return; 21722 if (e.target !== this) return; 21723 swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); 21724 swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); 21725 swiper.onTranslateToWrapperTransitionEnd = null; 21726 delete swiper.onTranslateToWrapperTransitionEnd; 21727 if (runCallbacks) { 21728 swiper.emit('transitionEnd'); 21729 } 21730 }; 21731 } 21732 swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onTranslateToWrapperTransitionEnd); 21733 swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onTranslateToWrapperTransitionEnd); 21734 } 21735 } 21736 return true; 21737} 21738var translate = { 21739 getTranslate: getTranslate, 21740 setTranslate: setTranslate, 21741 minTranslate: minTranslate, 21742 maxTranslate: maxTranslate, 21743 translateTo: translateTo 21744}; 21745function setTransition(duration, byController) { 21746 var swiper = this; 21747 if (!swiper.params.cssMode) { 21748 swiper.$wrapperEl.transition(duration); 21749 } 21750 swiper.emit('setTransition', duration, byController); 21751} 21752function transitionStart() { 21753 var runCallbacks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; 21754 var direction = arguments.length > 1 ? arguments[1] : undefined; 21755 var swiper = this; 21756 var activeIndex = swiper.activeIndex, 21757 params = swiper.params, 21758 previousIndex = swiper.previousIndex; 21759 if (params.cssMode) return; 21760 if (params.autoHeight) { 21761 swiper.updateAutoHeight(); 21762 } 21763 var dir = direction; 21764 if (!dir) { 21765 if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset'; 21766 } 21767 swiper.emit('transitionStart'); 21768 if (runCallbacks && activeIndex !== previousIndex) { 21769 if (dir === 'reset') { 21770 swiper.emit('slideResetTransitionStart'); 21771 return; 21772 } 21773 swiper.emit('slideChangeTransitionStart'); 21774 if (dir === 'next') { 21775 swiper.emit('slideNextTransitionStart'); 21776 } else { 21777 swiper.emit('slidePrevTransitionStart'); 21778 } 21779 } 21780} 21781function transitionEnd() { 21782 var runCallbacks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; 21783 var direction = arguments.length > 1 ? arguments[1] : undefined; 21784 var swiper = this; 21785 var activeIndex = swiper.activeIndex, 21786 previousIndex = swiper.previousIndex, 21787 params = swiper.params; 21788 swiper.animating = false; 21789 if (params.cssMode) return; 21790 swiper.setTransition(0); 21791 var dir = direction; 21792 if (!dir) { 21793 if (activeIndex > previousIndex) dir = 'next';else if (activeIndex < previousIndex) dir = 'prev';else dir = 'reset'; 21794 } 21795 swiper.emit('transitionEnd'); 21796 if (runCallbacks && activeIndex !== previousIndex) { 21797 if (dir === 'reset') { 21798 swiper.emit('slideResetTransitionEnd'); 21799 return; 21800 } 21801 swiper.emit('slideChangeTransitionEnd'); 21802 if (dir === 'next') { 21803 swiper.emit('slideNextTransitionEnd'); 21804 } else { 21805 swiper.emit('slidePrevTransitionEnd'); 21806 } 21807 } 21808} 21809var transition = { 21810 setTransition: setTransition, 21811 transitionStart: transitionStart, 21812 transitionEnd: transitionEnd 21813}; 21814function slideTo() { 21815 var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; 21816 var speed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.params.speed; 21817 var runCallbacks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; 21818 var internal = arguments.length > 3 ? arguments[3] : undefined; 21819 var swiper = this; 21820 var slideIndex = index; 21821 if (slideIndex < 0) slideIndex = 0; 21822 var params = swiper.params, 21823 snapGrid = swiper.snapGrid, 21824 slidesGrid = swiper.slidesGrid, 21825 previousIndex = swiper.previousIndex, 21826 activeIndex = swiper.activeIndex, 21827 rtl = swiper.rtlTranslate, 21828 wrapperEl = swiper.wrapperEl; 21829 if (swiper.animating && params.preventInteractionOnTransition) { 21830 return false; 21831 } 21832 var skip = Math.min(swiper.params.slidesPerGroupSkip, slideIndex); 21833 var snapIndex = skip + Math.floor((slideIndex - skip) / swiper.params.slidesPerGroup); 21834 if (snapIndex >= snapGrid.length) snapIndex = snapGrid.length - 1; 21835 if ((activeIndex || params.initialSlide || 0) === (previousIndex || 0) && runCallbacks) { 21836 swiper.emit('beforeSlideChangeStart'); 21837 } 21838 var translate = -snapGrid[snapIndex]; 21839 21840 // Update progress 21841 swiper.updateProgress(translate); 21842 21843 // Normalize slideIndex 21844 if (params.normalizeSlideIndex) { 21845 for (var i = 0; i < slidesGrid.length; i += 1) { 21846 if (-Math.floor(translate * 100) >= Math.floor(slidesGrid[i] * 100)) { 21847 slideIndex = i; 21848 } 21849 } 21850 } 21851 // Directions locks 21852 if (swiper.initialized && slideIndex !== activeIndex) { 21853 if (!swiper.allowSlideNext && translate < swiper.translate && translate < swiper.minTranslate()) { 21854 return false; 21855 } 21856 if (!swiper.allowSlidePrev && translate > swiper.translate && translate > swiper.maxTranslate()) { 21857 if ((activeIndex || 0) !== slideIndex) return false; 21858 } 21859 } 21860 var direction; 21861 if (slideIndex > activeIndex) direction = 'next';else if (slideIndex < activeIndex) direction = 'prev';else direction = 'reset'; 21862 21863 // Update Index 21864 if (rtl && -translate === swiper.translate || !rtl && translate === swiper.translate) { 21865 swiper.updateActiveIndex(slideIndex); 21866 // Update Height 21867 if (params.autoHeight) { 21868 swiper.updateAutoHeight(); 21869 } 21870 swiper.updateSlidesClasses(); 21871 if (params.effect !== 'slide') { 21872 swiper.setTranslate(translate); 21873 } 21874 if (direction !== 'reset') { 21875 swiper.transitionStart(runCallbacks, direction); 21876 swiper.transitionEnd(runCallbacks, direction); 21877 } 21878 return false; 21879 } 21880 if (params.cssMode) { 21881 var isH = swiper.isHorizontal(); 21882 var t = -translate; 21883 if (rtl) { 21884 t = wrapperEl.scrollWidth - wrapperEl.offsetWidth - t; 21885 } 21886 if (speed === 0) { 21887 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; 21888 } else { 21889 // eslint-disable-next-line 21890 if (wrapperEl.scrollTo) { 21891 wrapperEl.scrollTo(_defineProperty(_defineProperty({}, isH ? 'left' : 'top', t), "behavior", 'smooth')); 21892 } else { 21893 wrapperEl[isH ? 'scrollLeft' : 'scrollTop'] = t; 21894 } 21895 } 21896 return true; 21897 } 21898 if (speed === 0) { 21899 swiper.setTransition(0); 21900 swiper.setTranslate(translate); 21901 swiper.updateActiveIndex(slideIndex); 21902 swiper.updateSlidesClasses(); 21903 swiper.emit('beforeTransitionStart', speed, internal); 21904 swiper.transitionStart(runCallbacks, direction); 21905 swiper.transitionEnd(runCallbacks, direction); 21906 } else { 21907 swiper.setTransition(speed); 21908 swiper.setTranslate(translate); 21909 swiper.updateActiveIndex(slideIndex); 21910 swiper.updateSlidesClasses(); 21911 swiper.emit('beforeTransitionStart', speed, internal); 21912 swiper.transitionStart(runCallbacks, direction); 21913 if (!swiper.animating) { 21914 swiper.animating = true; 21915 if (!swiper.onSlideToWrapperTransitionEnd) { 21916 swiper.onSlideToWrapperTransitionEnd = function transitionEnd(e) { 21917 if (!swiper || swiper.destroyed) return; 21918 if (e.target !== this) return; 21919 swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 21920 swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); 21921 swiper.onSlideToWrapperTransitionEnd = null; 21922 delete swiper.onSlideToWrapperTransitionEnd; 21923 swiper.transitionEnd(runCallbacks, direction); 21924 }; 21925 } 21926 swiper.$wrapperEl[0].addEventListener('transitionend', swiper.onSlideToWrapperTransitionEnd); 21927 swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.onSlideToWrapperTransitionEnd); 21928 } 21929 } 21930 return true; 21931} 21932function slideToLoop() { 21933 var index = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; 21934 var speed = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.params.speed; 21935 var runCallbacks = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; 21936 var internal = arguments.length > 3 ? arguments[3] : undefined; 21937 var swiper = this; 21938 var newIndex = index; 21939 if (swiper.params.loop) { 21940 newIndex += swiper.loopedSlides; 21941 } 21942 return swiper.slideTo(newIndex, speed, runCallbacks, internal); 21943} 21944 21945/* eslint no-unused-vars: "off" */ 21946function slideNext() { 21947 var speed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed; 21948 var runCallbacks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 21949 var internal = arguments.length > 2 ? arguments[2] : undefined; 21950 var swiper = this; 21951 var params = swiper.params, 21952 animating = swiper.animating; 21953 var increment = swiper.activeIndex < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup; 21954 if (params.loop) { 21955 if (animating) return false; 21956 swiper.loopFix(); 21957 // eslint-disable-next-line 21958 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 21959 } 21960 return swiper.slideTo(swiper.activeIndex + increment, speed, runCallbacks, internal); 21961} 21962 21963/* eslint no-unused-vars: "off" */ 21964function slidePrev() { 21965 var speed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed; 21966 var runCallbacks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 21967 var internal = arguments.length > 2 ? arguments[2] : undefined; 21968 var swiper = this; 21969 var params = swiper.params, 21970 animating = swiper.animating, 21971 snapGrid = swiper.snapGrid, 21972 slidesGrid = swiper.slidesGrid, 21973 rtlTranslate = swiper.rtlTranslate; 21974 if (params.loop) { 21975 if (animating) return false; 21976 swiper.loopFix(); 21977 // eslint-disable-next-line 21978 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 21979 } 21980 var translate = rtlTranslate ? swiper.translate : -swiper.translate; 21981 function normalize(val) { 21982 if (val < 0) return -Math.floor(Math.abs(val)); 21983 return Math.floor(val); 21984 } 21985 var normalizedTranslate = normalize(translate); 21986 var normalizedSnapGrid = snapGrid.map(function (val) { 21987 return normalize(val); 21988 }); 21989 var normalizedSlidesGrid = slidesGrid.map(function (val) { 21990 return normalize(val); 21991 }); 21992 var currentSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate)]; 21993 var prevSnap = snapGrid[normalizedSnapGrid.indexOf(normalizedTranslate) - 1]; 21994 if (typeof prevSnap === 'undefined' && params.cssMode) { 21995 snapGrid.forEach(function (snap) { 21996 if (!prevSnap && normalizedTranslate >= snap) prevSnap = snap; 21997 }); 21998 } 21999 var prevIndex; 22000 if (typeof prevSnap !== 'undefined') { 22001 prevIndex = slidesGrid.indexOf(prevSnap); 22002 if (prevIndex < 0) prevIndex = swiper.activeIndex - 1; 22003 } 22004 return swiper.slideTo(prevIndex, speed, runCallbacks, internal); 22005} 22006 22007/* eslint no-unused-vars: "off" */ 22008function slideReset() { 22009 var speed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed; 22010 var runCallbacks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 22011 var internal = arguments.length > 2 ? arguments[2] : undefined; 22012 var swiper = this; 22013 return swiper.slideTo(swiper.activeIndex, speed, runCallbacks, internal); 22014} 22015 22016/* eslint no-unused-vars: "off" */ 22017function slideToClosest() { 22018 var speed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed; 22019 var runCallbacks = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 22020 var internal = arguments.length > 2 ? arguments[2] : undefined; 22021 var threshold = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0.5; 22022 var swiper = this; 22023 var index = swiper.activeIndex; 22024 var skip = Math.min(swiper.params.slidesPerGroupSkip, index); 22025 var snapIndex = skip + Math.floor((index - skip) / swiper.params.slidesPerGroup); 22026 var translate = swiper.rtlTranslate ? swiper.translate : -swiper.translate; 22027 if (translate >= swiper.snapGrid[snapIndex]) { 22028 // The current translate is on or after the current snap index, so the choice 22029 // is between the current index and the one after it. 22030 var currentSnap = swiper.snapGrid[snapIndex]; 22031 var nextSnap = swiper.snapGrid[snapIndex + 1]; 22032 if (translate - currentSnap > (nextSnap - currentSnap) * threshold) { 22033 index += swiper.params.slidesPerGroup; 22034 } 22035 } else { 22036 // The current translate is before the current snap index, so the choice 22037 // is between the current index and the one before it. 22038 var prevSnap = swiper.snapGrid[snapIndex - 1]; 22039 var _currentSnap = swiper.snapGrid[snapIndex]; 22040 if (translate - prevSnap <= (_currentSnap - prevSnap) * threshold) { 22041 index -= swiper.params.slidesPerGroup; 22042 } 22043 } 22044 index = Math.max(index, 0); 22045 index = Math.min(index, swiper.slidesGrid.length - 1); 22046 return swiper.slideTo(index, speed, runCallbacks, internal); 22047} 22048function slideToClickedSlide() { 22049 var swiper = this; 22050 var params = swiper.params, 22051 $wrapperEl = swiper.$wrapperEl; 22052 var slidesPerView = params.slidesPerView === 'auto' ? swiper.slidesPerViewDynamic() : params.slidesPerView; 22053 var slideToIndex = swiper.clickedIndex; 22054 var realIndex; 22055 if (params.loop) { 22056 if (swiper.animating) return; 22057 realIndex = parseInt(Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(swiper.clickedSlide).attr('data-swiper-slide-index'), 10); 22058 if (params.centeredSlides) { 22059 if (slideToIndex < swiper.loopedSlides - slidesPerView / 2 || slideToIndex > swiper.slides.length - swiper.loopedSlides + slidesPerView / 2) { 22060 swiper.loopFix(); 22061 slideToIndex = $wrapperEl.children(".".concat(params.slideClass, "[data-swiper-slide-index=\"").concat(realIndex, "\"]:not(.").concat(params.slideDuplicateClass, ")")).eq(0).index(); 22062 Utils.nextTick(function () { 22063 swiper.slideTo(slideToIndex); 22064 }); 22065 } else { 22066 swiper.slideTo(slideToIndex); 22067 } 22068 } else if (slideToIndex > swiper.slides.length - slidesPerView) { 22069 swiper.loopFix(); 22070 slideToIndex = $wrapperEl.children(".".concat(params.slideClass, "[data-swiper-slide-index=\"").concat(realIndex, "\"]:not(.").concat(params.slideDuplicateClass, ")")).eq(0).index(); 22071 Utils.nextTick(function () { 22072 swiper.slideTo(slideToIndex); 22073 }); 22074 } else { 22075 swiper.slideTo(slideToIndex); 22076 } 22077 } else { 22078 swiper.slideTo(slideToIndex); 22079 } 22080} 22081var slide = { 22082 slideTo: slideTo, 22083 slideToLoop: slideToLoop, 22084 slideNext: slideNext, 22085 slidePrev: slidePrev, 22086 slideReset: slideReset, 22087 slideToClosest: slideToClosest, 22088 slideToClickedSlide: slideToClickedSlide 22089}; 22090function loopCreate() { 22091 var swiper = this; 22092 var params = swiper.params, 22093 $wrapperEl = swiper.$wrapperEl; 22094 // Remove duplicated slides 22095 $wrapperEl.children(".".concat(params.slideClass, ".").concat(params.slideDuplicateClass)).remove(); 22096 var slides = $wrapperEl.children(".".concat(params.slideClass)); 22097 if (params.loopFillGroupWithBlank) { 22098 var blankSlidesNum = params.slidesPerGroup - slides.length % params.slidesPerGroup; 22099 if (blankSlidesNum !== params.slidesPerGroup) { 22100 for (var i = 0; i < blankSlidesNum; i += 1) { 22101 var blankNode = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].createElement('div')).addClass("".concat(params.slideClass, " ").concat(params.slideBlankClass)); 22102 $wrapperEl.append(blankNode); 22103 } 22104 slides = $wrapperEl.children(".".concat(params.slideClass)); 22105 } 22106 } 22107 if (params.slidesPerView === 'auto' && !params.loopedSlides) params.loopedSlides = slides.length; 22108 swiper.loopedSlides = Math.ceil(parseFloat(params.loopedSlides || params.slidesPerView, 10)); 22109 swiper.loopedSlides += params.loopAdditionalSlides; 22110 if (swiper.loopedSlides > slides.length) { 22111 swiper.loopedSlides = slides.length; 22112 } 22113 var prependSlides = []; 22114 var appendSlides = []; 22115 slides.each(function (index, el) { 22116 var slide = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(el); 22117 if (index < swiper.loopedSlides) appendSlides.push(el); 22118 if (index < slides.length && index >= slides.length - swiper.loopedSlides) prependSlides.push(el); 22119 slide.attr('data-swiper-slide-index', index); 22120 }); 22121 for (var _i3 = 0; _i3 < appendSlides.length; _i3 += 1) { 22122 $wrapperEl.append(Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(appendSlides[_i3].cloneNode(true)).addClass(params.slideDuplicateClass)); 22123 } 22124 for (var _i4 = prependSlides.length - 1; _i4 >= 0; _i4 -= 1) { 22125 $wrapperEl.prepend(Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(prependSlides[_i4].cloneNode(true)).addClass(params.slideDuplicateClass)); 22126 } 22127} 22128function loopFix() { 22129 var swiper = this; 22130 swiper.emit('beforeLoopFix'); 22131 var activeIndex = swiper.activeIndex, 22132 slides = swiper.slides, 22133 loopedSlides = swiper.loopedSlides, 22134 allowSlidePrev = swiper.allowSlidePrev, 22135 allowSlideNext = swiper.allowSlideNext, 22136 snapGrid = swiper.snapGrid, 22137 rtl = swiper.rtlTranslate; 22138 var newIndex; 22139 swiper.allowSlidePrev = true; 22140 swiper.allowSlideNext = true; 22141 var snapTranslate = -snapGrid[activeIndex]; 22142 var diff = snapTranslate - swiper.getTranslate(); 22143 22144 // Fix For Negative Oversliding 22145 if (activeIndex < loopedSlides) { 22146 newIndex = slides.length - loopedSlides * 3 + activeIndex; 22147 newIndex += loopedSlides; 22148 var slideChanged = swiper.slideTo(newIndex, 0, false, true); 22149 if (slideChanged && diff !== 0) { 22150 swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); 22151 } 22152 } else if (activeIndex >= slides.length - loopedSlides) { 22153 // Fix For Positive Oversliding 22154 newIndex = -slides.length + activeIndex + loopedSlides; 22155 newIndex += loopedSlides; 22156 var _slideChanged = swiper.slideTo(newIndex, 0, false, true); 22157 if (_slideChanged && diff !== 0) { 22158 swiper.setTranslate((rtl ? -swiper.translate : swiper.translate) - diff); 22159 } 22160 } 22161 swiper.allowSlidePrev = allowSlidePrev; 22162 swiper.allowSlideNext = allowSlideNext; 22163 swiper.emit('loopFix'); 22164} 22165function loopDestroy() { 22166 var swiper = this; 22167 var $wrapperEl = swiper.$wrapperEl, 22168 params = swiper.params, 22169 slides = swiper.slides; 22170 $wrapperEl.children(".".concat(params.slideClass, ".").concat(params.slideDuplicateClass, ",.").concat(params.slideClass, ".").concat(params.slideBlankClass)).remove(); 22171 slides.removeAttr('data-swiper-slide-index'); 22172} 22173var loop = { 22174 loopCreate: loopCreate, 22175 loopFix: loopFix, 22176 loopDestroy: loopDestroy 22177}; 22178function setGrabCursor(moving) { 22179 var swiper = this; 22180 if (Support.touch || !swiper.params.simulateTouch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return; 22181 var el = swiper.el; 22182 el.style.cursor = 'move'; 22183 el.style.cursor = moving ? '-webkit-grabbing' : '-webkit-grab'; 22184 el.style.cursor = moving ? '-moz-grabbin' : '-moz-grab'; 22185 el.style.cursor = moving ? 'grabbing' : 'grab'; 22186} 22187function unsetGrabCursor() { 22188 var swiper = this; 22189 if (Support.touch || swiper.params.watchOverflow && swiper.isLocked || swiper.params.cssMode) return; 22190 swiper.el.style.cursor = ''; 22191} 22192var grabCursor = { 22193 setGrabCursor: setGrabCursor, 22194 unsetGrabCursor: unsetGrabCursor 22195}; 22196function appendSlide(slides) { 22197 var swiper = this; 22198 var $wrapperEl = swiper.$wrapperEl, 22199 params = swiper.params; 22200 if (params.loop) { 22201 swiper.loopDestroy(); 22202 } 22203 if (_typeof(slides) === 'object' && 'length' in slides) { 22204 for (var i = 0; i < slides.length; i += 1) { 22205 if (slides[i]) $wrapperEl.append(slides[i]); 22206 } 22207 } else { 22208 $wrapperEl.append(slides); 22209 } 22210 if (params.loop) { 22211 swiper.loopCreate(); 22212 } 22213 if (!(params.observer && Support.observer)) { 22214 swiper.update(); 22215 } 22216} 22217function prependSlide(slides) { 22218 var swiper = this; 22219 var params = swiper.params, 22220 $wrapperEl = swiper.$wrapperEl, 22221 activeIndex = swiper.activeIndex; 22222 if (params.loop) { 22223 swiper.loopDestroy(); 22224 } 22225 var newActiveIndex = activeIndex + 1; 22226 if (_typeof(slides) === 'object' && 'length' in slides) { 22227 for (var i = 0; i < slides.length; i += 1) { 22228 if (slides[i]) $wrapperEl.prepend(slides[i]); 22229 } 22230 newActiveIndex = activeIndex + slides.length; 22231 } else { 22232 $wrapperEl.prepend(slides); 22233 } 22234 if (params.loop) { 22235 swiper.loopCreate(); 22236 } 22237 if (!(params.observer && Support.observer)) { 22238 swiper.update(); 22239 } 22240 swiper.slideTo(newActiveIndex, 0, false); 22241} 22242function addSlide(index, slides) { 22243 var swiper = this; 22244 var $wrapperEl = swiper.$wrapperEl, 22245 params = swiper.params, 22246 activeIndex = swiper.activeIndex; 22247 var activeIndexBuffer = activeIndex; 22248 if (params.loop) { 22249 activeIndexBuffer -= swiper.loopedSlides; 22250 swiper.loopDestroy(); 22251 swiper.slides = $wrapperEl.children(".".concat(params.slideClass)); 22252 } 22253 var baseLength = swiper.slides.length; 22254 if (index <= 0) { 22255 swiper.prependSlide(slides); 22256 return; 22257 } 22258 if (index >= baseLength) { 22259 swiper.appendSlide(slides); 22260 return; 22261 } 22262 var newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + 1 : activeIndexBuffer; 22263 var slidesBuffer = []; 22264 for (var i = baseLength - 1; i >= index; i -= 1) { 22265 var currentSlide = swiper.slides.eq(i); 22266 currentSlide.remove(); 22267 slidesBuffer.unshift(currentSlide); 22268 } 22269 if (_typeof(slides) === 'object' && 'length' in slides) { 22270 for (var _i5 = 0; _i5 < slides.length; _i5 += 1) { 22271 if (slides[_i5]) $wrapperEl.append(slides[_i5]); 22272 } 22273 newActiveIndex = activeIndexBuffer > index ? activeIndexBuffer + slides.length : activeIndexBuffer; 22274 } else { 22275 $wrapperEl.append(slides); 22276 } 22277 for (var _i6 = 0; _i6 < slidesBuffer.length; _i6 += 1) { 22278 $wrapperEl.append(slidesBuffer[_i6]); 22279 } 22280 if (params.loop) { 22281 swiper.loopCreate(); 22282 } 22283 if (!(params.observer && Support.observer)) { 22284 swiper.update(); 22285 } 22286 if (params.loop) { 22287 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 22288 } else { 22289 swiper.slideTo(newActiveIndex, 0, false); 22290 } 22291} 22292function removeSlide(slidesIndexes) { 22293 var swiper = this; 22294 var params = swiper.params, 22295 $wrapperEl = swiper.$wrapperEl, 22296 activeIndex = swiper.activeIndex; 22297 var activeIndexBuffer = activeIndex; 22298 if (params.loop) { 22299 activeIndexBuffer -= swiper.loopedSlides; 22300 swiper.loopDestroy(); 22301 swiper.slides = $wrapperEl.children(".".concat(params.slideClass)); 22302 } 22303 var newActiveIndex = activeIndexBuffer; 22304 var indexToRemove; 22305 if (_typeof(slidesIndexes) === 'object' && 'length' in slidesIndexes) { 22306 for (var i = 0; i < slidesIndexes.length; i += 1) { 22307 indexToRemove = slidesIndexes[i]; 22308 if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); 22309 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 22310 } 22311 newActiveIndex = Math.max(newActiveIndex, 0); 22312 } else { 22313 indexToRemove = slidesIndexes; 22314 if (swiper.slides[indexToRemove]) swiper.slides.eq(indexToRemove).remove(); 22315 if (indexToRemove < newActiveIndex) newActiveIndex -= 1; 22316 newActiveIndex = Math.max(newActiveIndex, 0); 22317 } 22318 if (params.loop) { 22319 swiper.loopCreate(); 22320 } 22321 if (!(params.observer && Support.observer)) { 22322 swiper.update(); 22323 } 22324 if (params.loop) { 22325 swiper.slideTo(newActiveIndex + swiper.loopedSlides, 0, false); 22326 } else { 22327 swiper.slideTo(newActiveIndex, 0, false); 22328 } 22329} 22330function removeAllSlides() { 22331 var swiper = this; 22332 var slidesIndexes = []; 22333 for (var i = 0; i < swiper.slides.length; i += 1) { 22334 slidesIndexes.push(i); 22335 } 22336 swiper.removeSlide(slidesIndexes); 22337} 22338var manipulation = { 22339 appendSlide: appendSlide, 22340 prependSlide: prependSlide, 22341 addSlide: addSlide, 22342 removeSlide: removeSlide, 22343 removeAllSlides: removeAllSlides 22344}; 22345var Device = function Device() { 22346 var platform = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].navigator.platform; 22347 var ua = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].navigator.userAgent; 22348 var device = { 22349 ios: false, 22350 android: false, 22351 androidChrome: false, 22352 desktop: false, 22353 iphone: false, 22354 ipod: false, 22355 ipad: false, 22356 edge: false, 22357 ie: false, 22358 firefox: false, 22359 macos: false, 22360 windows: false, 22361 cordova: !!(ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].cordova || ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].phonegap), 22362 phonegap: !!(ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].cordova || ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].phonegap), 22363 electron: false 22364 }; 22365 var screenWidth = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].screen.width; 22366 var screenHeight = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].screen.height; 22367 var android = ua.match(/(Android);?[\s\/]+([\d.]+)?/); // eslint-disable-line 22368 var ipad = ua.match(/(iPad).*OS\s([\d_]+)/); 22369 var ipod = ua.match(/(iPod)(.*OS\s([\d_]+))?/); 22370 var iphone = !ipad && ua.match(/(iPhone\sOS|iOS)\s([\d_]+)/); 22371 var ie = ua.indexOf('MSIE ') >= 0 || ua.indexOf('Trident/') >= 0; 22372 var edge = ua.indexOf('Edge/') >= 0; 22373 var firefox = ua.indexOf('Gecko/') >= 0 && ua.indexOf('Firefox/') >= 0; 22374 var windows = platform === 'Win32'; 22375 var electron = ua.toLowerCase().indexOf('electron') >= 0; 22376 var macos = platform === 'MacIntel'; 22377 22378 // iPadOs 13 fix 22379 if (!ipad && macos && Support.touch && (screenWidth === 1024 && screenHeight === 1366 // Pro 12.9 22380 || screenWidth === 834 && screenHeight === 1194 // Pro 11 22381 || screenWidth === 834 && screenHeight === 1112 // Pro 10.5 22382 || screenWidth === 768 && screenHeight === 1024 // other 22383 )) { 22384 ipad = ua.match(/(Version)\/([\d.]+)/); 22385 macos = false; 22386 } 22387 device.ie = ie; 22388 device.edge = edge; 22389 device.firefox = firefox; 22390 22391 // Android 22392 if (android && !windows) { 22393 device.os = 'android'; 22394 device.osVersion = android[2]; 22395 device.android = true; 22396 device.androidChrome = ua.toLowerCase().indexOf('chrome') >= 0; 22397 } 22398 if (ipad || iphone || ipod) { 22399 device.os = 'ios'; 22400 device.ios = true; 22401 } 22402 // iOS 22403 if (iphone && !ipod) { 22404 device.osVersion = iphone[2].replace(/_/g, '.'); 22405 device.iphone = true; 22406 } 22407 if (ipad) { 22408 device.osVersion = ipad[2].replace(/_/g, '.'); 22409 device.ipad = true; 22410 } 22411 if (ipod) { 22412 device.osVersion = ipod[3] ? ipod[3].replace(/_/g, '.') : null; 22413 device.ipod = true; 22414 } 22415 // iOS 8+ changed UA 22416 if (device.ios && device.osVersion && ua.indexOf('Version/') >= 0) { 22417 if (device.osVersion.split('.')[0] === '10') { 22418 device.osVersion = ua.toLowerCase().split('version/')[1].split(' ')[0]; 22419 } 22420 } 22421 22422 // Webview 22423 device.webView = !!((iphone || ipad || ipod) && (ua.match(/.*AppleWebKit(?!.*Safari)/i) || ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].navigator.standalone)) || ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].matchMedia && ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].matchMedia('(display-mode: standalone)').matches; 22424 device.webview = device.webView; 22425 device.standalone = device.webView; 22426 22427 // Desktop 22428 device.desktop = !(device.ios || device.android) || electron; 22429 if (device.desktop) { 22430 device.electron = electron; 22431 device.macos = macos; 22432 device.windows = windows; 22433 if (device.macos) { 22434 device.os = 'macos'; 22435 } 22436 if (device.windows) { 22437 device.os = 'windows'; 22438 } 22439 } 22440 22441 // Pixel Ratio 22442 device.pixelRatio = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].devicePixelRatio || 1; 22443 22444 // Export object 22445 return device; 22446}(); 22447function onTouchStart(event) { 22448 var swiper = this; 22449 var data = swiper.touchEventsData; 22450 var params = swiper.params, 22451 touches = swiper.touches; 22452 if (swiper.animating && params.preventInteractionOnTransition) { 22453 return; 22454 } 22455 var e = event; 22456 if (e.originalEvent) e = e.originalEvent; 22457 var $targetEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(e.target); 22458 if (params.touchEventsTarget === 'wrapper') { 22459 if (!$targetEl.closest(swiper.wrapperEl).length) return; 22460 } 22461 data.isTouchEvent = e.type === 'touchstart'; 22462 if (!data.isTouchEvent && 'which' in e && e.which === 3) return; 22463 if (!data.isTouchEvent && 'button' in e && e.button > 0) return; 22464 if (data.isTouched && data.isMoved) return; 22465 if (params.noSwiping && $targetEl.closest(params.noSwipingSelector ? params.noSwipingSelector : ".".concat(params.noSwipingClass))[0]) { 22466 swiper.allowClick = true; 22467 return; 22468 } 22469 if (params.swipeHandler) { 22470 if (!$targetEl.closest(params.swipeHandler)[0]) return; 22471 } 22472 touches.currentX = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; 22473 touches.currentY = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; 22474 var startX = touches.currentX; 22475 var startY = touches.currentY; 22476 22477 // Do NOT start if iOS edge swipe is detected. Otherwise iOS app cannot swipe-to-go-back anymore 22478 22479 var edgeSwipeDetection = params.edgeSwipeDetection || params.iOSEdgeSwipeDetection; 22480 var edgeSwipeThreshold = params.edgeSwipeThreshold || params.iOSEdgeSwipeThreshold; 22481 if (edgeSwipeDetection && (startX <= edgeSwipeThreshold || startX >= ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].screen.width - edgeSwipeThreshold)) { 22482 return; 22483 } 22484 Utils.extend(data, { 22485 isTouched: true, 22486 isMoved: false, 22487 allowTouchCallbacks: true, 22488 isScrolling: undefined, 22489 startMoving: undefined 22490 }); 22491 touches.startX = startX; 22492 touches.startY = startY; 22493 data.touchStartTime = Utils.now(); 22494 swiper.allowClick = true; 22495 swiper.updateSize(); 22496 swiper.swipeDirection = undefined; 22497 if (params.threshold > 0) data.allowThresholdMove = false; 22498 if (e.type !== 'touchstart') { 22499 var preventDefault = true; 22500 if ($targetEl.is(data.formElements)) preventDefault = false; 22501 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement && Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement).is(data.formElements) && ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement !== $targetEl[0]) { 22502 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement.blur(); 22503 } 22504 var shouldPreventDefault = preventDefault && swiper.allowTouchMove && params.touchStartPreventDefault; 22505 if (params.touchStartForcePreventDefault || shouldPreventDefault) { 22506 e.preventDefault(); 22507 } 22508 } 22509 swiper.emit('touchStart', e); 22510} 22511function onTouchMove(event) { 22512 var swiper = this; 22513 var data = swiper.touchEventsData; 22514 var params = swiper.params, 22515 touches = swiper.touches, 22516 rtl = swiper.rtlTranslate; 22517 var e = event; 22518 if (e.originalEvent) e = e.originalEvent; 22519 if (!data.isTouched) { 22520 if (data.startMoving && data.isScrolling) { 22521 swiper.emit('touchMoveOpposite', e); 22522 } 22523 return; 22524 } 22525 if (data.isTouchEvent && e.type !== 'touchmove') return; 22526 var targetTouch = e.type === 'touchmove' && e.targetTouches && (e.targetTouches[0] || e.changedTouches[0]); 22527 var pageX = e.type === 'touchmove' ? targetTouch.pageX : e.pageX; 22528 var pageY = e.type === 'touchmove' ? targetTouch.pageY : e.pageY; 22529 if (e.preventedByNestedSwiper) { 22530 touches.startX = pageX; 22531 touches.startY = pageY; 22532 return; 22533 } 22534 if (!swiper.allowTouchMove) { 22535 // isMoved = true; 22536 swiper.allowClick = false; 22537 if (data.isTouched) { 22538 Utils.extend(touches, { 22539 startX: pageX, 22540 startY: pageY, 22541 currentX: pageX, 22542 currentY: pageY 22543 }); 22544 data.touchStartTime = Utils.now(); 22545 } 22546 return; 22547 } 22548 if (data.isTouchEvent && params.touchReleaseOnEdges && !params.loop) { 22549 if (swiper.isVertical()) { 22550 // Vertical 22551 if (pageY < touches.startY && swiper.translate <= swiper.maxTranslate() || pageY > touches.startY && swiper.translate >= swiper.minTranslate()) { 22552 data.isTouched = false; 22553 data.isMoved = false; 22554 return; 22555 } 22556 } else if (pageX < touches.startX && swiper.translate <= swiper.maxTranslate() || pageX > touches.startX && swiper.translate >= swiper.minTranslate()) { 22557 return; 22558 } 22559 } 22560 if (data.isTouchEvent && ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement) { 22561 if (e.target === ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement && Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(e.target).is(data.formElements)) { 22562 data.isMoved = true; 22563 swiper.allowClick = false; 22564 return; 22565 } 22566 } 22567 if (data.allowTouchCallbacks) { 22568 swiper.emit('touchMove', e); 22569 } 22570 if (e.targetTouches && e.targetTouches.length > 1) return; 22571 touches.currentX = pageX; 22572 touches.currentY = pageY; 22573 var diffX = touches.currentX - touches.startX; 22574 var diffY = touches.currentY - touches.startY; 22575 if (swiper.params.threshold && Math.sqrt(Math.pow(diffX, 2) + Math.pow(diffY, 2)) < swiper.params.threshold) return; 22576 if (typeof data.isScrolling === 'undefined') { 22577 var touchAngle; 22578 if (swiper.isHorizontal() && touches.currentY === touches.startY || swiper.isVertical() && touches.currentX === touches.startX) { 22579 data.isScrolling = false; 22580 } else { 22581 // eslint-disable-next-line 22582 if (diffX * diffX + diffY * diffY >= 25) { 22583 touchAngle = Math.atan2(Math.abs(diffY), Math.abs(diffX)) * 180 / Math.PI; 22584 data.isScrolling = swiper.isHorizontal() ? touchAngle > params.touchAngle : 90 - touchAngle > params.touchAngle; 22585 } 22586 } 22587 } 22588 if (data.isScrolling) { 22589 swiper.emit('touchMoveOpposite', e); 22590 } 22591 if (typeof data.startMoving === 'undefined') { 22592 if (touches.currentX !== touches.startX || touches.currentY !== touches.startY) { 22593 data.startMoving = true; 22594 } 22595 } 22596 if (data.isScrolling) { 22597 data.isTouched = false; 22598 return; 22599 } 22600 if (!data.startMoving) { 22601 return; 22602 } 22603 swiper.allowClick = false; 22604 if (!params.cssMode && e.cancelable) { 22605 e.preventDefault(); 22606 } 22607 if (params.touchMoveStopPropagation && !params.nested) { 22608 e.stopPropagation(); 22609 } 22610 if (!data.isMoved) { 22611 if (params.loop) { 22612 swiper.loopFix(); 22613 } 22614 data.startTranslate = swiper.getTranslate(); 22615 swiper.setTransition(0); 22616 if (swiper.animating) { 22617 swiper.$wrapperEl.trigger('webkitTransitionEnd transitionend'); 22618 } 22619 data.allowMomentumBounce = false; 22620 // Grab Cursor 22621 if (params.grabCursor && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 22622 swiper.setGrabCursor(true); 22623 } 22624 swiper.emit('sliderFirstMove', e); 22625 } 22626 swiper.emit('sliderMove', e); 22627 data.isMoved = true; 22628 var diff = swiper.isHorizontal() ? diffX : diffY; 22629 touches.diff = diff; 22630 diff *= params.touchRatio; 22631 if (rtl) diff = -diff; 22632 swiper.swipeDirection = diff > 0 ? 'prev' : 'next'; 22633 data.currentTranslate = diff + data.startTranslate; 22634 var disableParentSwiper = true; 22635 var resistanceRatio = params.resistanceRatio; 22636 if (params.touchReleaseOnEdges) { 22637 resistanceRatio = 0; 22638 } 22639 if (diff > 0 && data.currentTranslate > swiper.minTranslate()) { 22640 disableParentSwiper = false; 22641 if (params.resistance) data.currentTranslate = swiper.minTranslate() - 1 + Math.pow(-swiper.minTranslate() + data.startTranslate + diff, resistanceRatio); 22642 } else if (diff < 0 && data.currentTranslate < swiper.maxTranslate()) { 22643 disableParentSwiper = false; 22644 if (params.resistance) data.currentTranslate = swiper.maxTranslate() + 1 - Math.pow(swiper.maxTranslate() - data.startTranslate - diff, resistanceRatio); 22645 } 22646 if (disableParentSwiper) { 22647 e.preventedByNestedSwiper = true; 22648 } 22649 22650 // Directions locks 22651 if (!swiper.allowSlideNext && swiper.swipeDirection === 'next' && data.currentTranslate < data.startTranslate) { 22652 data.currentTranslate = data.startTranslate; 22653 } 22654 if (!swiper.allowSlidePrev && swiper.swipeDirection === 'prev' && data.currentTranslate > data.startTranslate) { 22655 data.currentTranslate = data.startTranslate; 22656 } 22657 22658 // Threshold 22659 if (params.threshold > 0) { 22660 if (Math.abs(diff) > params.threshold || data.allowThresholdMove) { 22661 if (!data.allowThresholdMove) { 22662 data.allowThresholdMove = true; 22663 touches.startX = touches.currentX; 22664 touches.startY = touches.currentY; 22665 data.currentTranslate = data.startTranslate; 22666 touches.diff = swiper.isHorizontal() ? touches.currentX - touches.startX : touches.currentY - touches.startY; 22667 return; 22668 } 22669 } else { 22670 data.currentTranslate = data.startTranslate; 22671 return; 22672 } 22673 } 22674 if (!params.followFinger || params.cssMode) return; 22675 22676 // Update active index in free mode 22677 if (params.freeMode || params.watchSlidesProgress || params.watchSlidesVisibility) { 22678 swiper.updateActiveIndex(); 22679 swiper.updateSlidesClasses(); 22680 } 22681 if (params.freeMode) { 22682 // Velocity 22683 if (data.velocities.length === 0) { 22684 data.velocities.push({ 22685 position: touches[swiper.isHorizontal() ? 'startX' : 'startY'], 22686 time: data.touchStartTime 22687 }); 22688 } 22689 data.velocities.push({ 22690 position: touches[swiper.isHorizontal() ? 'currentX' : 'currentY'], 22691 time: Utils.now() 22692 }); 22693 } 22694 // Update progress 22695 swiper.updateProgress(data.currentTranslate); 22696 // Update translate 22697 swiper.setTranslate(data.currentTranslate); 22698} 22699function onTouchEnd(event) { 22700 var swiper = this; 22701 var data = swiper.touchEventsData; 22702 var params = swiper.params, 22703 touches = swiper.touches, 22704 rtl = swiper.rtlTranslate, 22705 $wrapperEl = swiper.$wrapperEl, 22706 slidesGrid = swiper.slidesGrid, 22707 snapGrid = swiper.snapGrid; 22708 var e = event; 22709 if (e.originalEvent) e = e.originalEvent; 22710 if (data.allowTouchCallbacks) { 22711 swiper.emit('touchEnd', e); 22712 } 22713 data.allowTouchCallbacks = false; 22714 if (!data.isTouched) { 22715 if (data.isMoved && params.grabCursor) { 22716 swiper.setGrabCursor(false); 22717 } 22718 data.isMoved = false; 22719 data.startMoving = false; 22720 return; 22721 } 22722 // Return Grab Cursor 22723 if (params.grabCursor && data.isMoved && data.isTouched && (swiper.allowSlideNext === true || swiper.allowSlidePrev === true)) { 22724 swiper.setGrabCursor(false); 22725 } 22726 22727 // Time diff 22728 var touchEndTime = Utils.now(); 22729 var timeDiff = touchEndTime - data.touchStartTime; 22730 22731 // Tap, doubleTap, Click 22732 if (swiper.allowClick) { 22733 swiper.updateClickedSlide(e); 22734 swiper.emit('tap click', e); 22735 if (timeDiff < 300 && touchEndTime - data.lastClickTime < 300) { 22736 swiper.emit('doubleTap doubleClick', e); 22737 } 22738 } 22739 data.lastClickTime = Utils.now(); 22740 Utils.nextTick(function () { 22741 if (!swiper.destroyed) swiper.allowClick = true; 22742 }); 22743 if (!data.isTouched || !data.isMoved || !swiper.swipeDirection || touches.diff === 0 || data.currentTranslate === data.startTranslate) { 22744 data.isTouched = false; 22745 data.isMoved = false; 22746 data.startMoving = false; 22747 return; 22748 } 22749 data.isTouched = false; 22750 data.isMoved = false; 22751 data.startMoving = false; 22752 var currentPos; 22753 if (params.followFinger) { 22754 currentPos = rtl ? swiper.translate : -swiper.translate; 22755 } else { 22756 currentPos = -data.currentTranslate; 22757 } 22758 if (params.cssMode) { 22759 return; 22760 } 22761 if (params.freeMode) { 22762 if (currentPos < -swiper.minTranslate()) { 22763 swiper.slideTo(swiper.activeIndex); 22764 return; 22765 } 22766 if (currentPos > -swiper.maxTranslate()) { 22767 if (swiper.slides.length < snapGrid.length) { 22768 swiper.slideTo(snapGrid.length - 1); 22769 } else { 22770 swiper.slideTo(swiper.slides.length - 1); 22771 } 22772 return; 22773 } 22774 if (params.freeModeMomentum) { 22775 if (data.velocities.length > 1) { 22776 var lastMoveEvent = data.velocities.pop(); 22777 var velocityEvent = data.velocities.pop(); 22778 var distance = lastMoveEvent.position - velocityEvent.position; 22779 var time = lastMoveEvent.time - velocityEvent.time; 22780 swiper.velocity = distance / time; 22781 swiper.velocity /= 2; 22782 if (Math.abs(swiper.velocity) < params.freeModeMinimumVelocity) { 22783 swiper.velocity = 0; 22784 } 22785 // this implies that the user stopped moving a finger then released. 22786 // There would be no events with distance zero, so the last event is stale. 22787 if (time > 150 || Utils.now() - lastMoveEvent.time > 300) { 22788 swiper.velocity = 0; 22789 } 22790 } else { 22791 swiper.velocity = 0; 22792 } 22793 swiper.velocity *= params.freeModeMomentumVelocityRatio; 22794 data.velocities.length = 0; 22795 var momentumDuration = 1000 * params.freeModeMomentumRatio; 22796 var momentumDistance = swiper.velocity * momentumDuration; 22797 var newPosition = swiper.translate + momentumDistance; 22798 if (rtl) newPosition = -newPosition; 22799 var doBounce = false; 22800 var afterBouncePosition; 22801 var bounceAmount = Math.abs(swiper.velocity) * 20 * params.freeModeMomentumBounceRatio; 22802 var needsLoopFix; 22803 if (newPosition < swiper.maxTranslate()) { 22804 if (params.freeModeMomentumBounce) { 22805 if (newPosition + swiper.maxTranslate() < -bounceAmount) { 22806 newPosition = swiper.maxTranslate() - bounceAmount; 22807 } 22808 afterBouncePosition = swiper.maxTranslate(); 22809 doBounce = true; 22810 data.allowMomentumBounce = true; 22811 } else { 22812 newPosition = swiper.maxTranslate(); 22813 } 22814 if (params.loop && params.centeredSlides) needsLoopFix = true; 22815 } else if (newPosition > swiper.minTranslate()) { 22816 if (params.freeModeMomentumBounce) { 22817 if (newPosition - swiper.minTranslate() > bounceAmount) { 22818 newPosition = swiper.minTranslate() + bounceAmount; 22819 } 22820 afterBouncePosition = swiper.minTranslate(); 22821 doBounce = true; 22822 data.allowMomentumBounce = true; 22823 } else { 22824 newPosition = swiper.minTranslate(); 22825 } 22826 if (params.loop && params.centeredSlides) needsLoopFix = true; 22827 } else if (params.freeModeSticky) { 22828 var nextSlide; 22829 for (var j = 0; j < snapGrid.length; j += 1) { 22830 if (snapGrid[j] > -newPosition) { 22831 nextSlide = j; 22832 break; 22833 } 22834 } 22835 if (Math.abs(snapGrid[nextSlide] - newPosition) < Math.abs(snapGrid[nextSlide - 1] - newPosition) || swiper.swipeDirection === 'next') { 22836 newPosition = snapGrid[nextSlide]; 22837 } else { 22838 newPosition = snapGrid[nextSlide - 1]; 22839 } 22840 newPosition = -newPosition; 22841 } 22842 if (needsLoopFix) { 22843 swiper.once('transitionEnd', function () { 22844 swiper.loopFix(); 22845 }); 22846 } 22847 // Fix duration 22848 if (swiper.velocity !== 0) { 22849 if (rtl) { 22850 momentumDuration = Math.abs((-newPosition - swiper.translate) / swiper.velocity); 22851 } else { 22852 momentumDuration = Math.abs((newPosition - swiper.translate) / swiper.velocity); 22853 } 22854 if (params.freeModeSticky) { 22855 // If freeModeSticky is active and the user ends a swipe with a slow-velocity 22856 // event, then durations can be 20+ seconds to slide one (or zero!) slides. 22857 // It's easy to see this when simulating touch with mouse events. To fix this, 22858 // limit single-slide swipes to the default slide duration. This also has the 22859 // nice side effect of matching slide speed if the user stopped moving before 22860 // lifting finger or mouse vs. moving slowly before lifting the finger/mouse. 22861 // For faster swipes, also apply limits (albeit higher ones). 22862 var moveDistance = Math.abs((rtl ? -newPosition : newPosition) - swiper.translate); 22863 var currentSlideSize = swiper.slidesSizesGrid[swiper.activeIndex]; 22864 if (moveDistance < currentSlideSize) { 22865 momentumDuration = params.speed; 22866 } else if (moveDistance < 2 * currentSlideSize) { 22867 momentumDuration = params.speed * 1.5; 22868 } else { 22869 momentumDuration = params.speed * 2.5; 22870 } 22871 } 22872 } else if (params.freeModeSticky) { 22873 swiper.slideToClosest(); 22874 return; 22875 } 22876 if (params.freeModeMomentumBounce && doBounce) { 22877 swiper.updateProgress(afterBouncePosition); 22878 swiper.setTransition(momentumDuration); 22879 swiper.setTranslate(newPosition); 22880 swiper.transitionStart(true, swiper.swipeDirection); 22881 swiper.animating = true; 22882 $wrapperEl.transitionEnd(function () { 22883 if (!swiper || swiper.destroyed || !data.allowMomentumBounce) return; 22884 swiper.emit('momentumBounce'); 22885 swiper.setTransition(params.speed); 22886 setTimeout(function () { 22887 swiper.setTranslate(afterBouncePosition); 22888 $wrapperEl.transitionEnd(function () { 22889 if (!swiper || swiper.destroyed) return; 22890 swiper.transitionEnd(); 22891 }); 22892 }, 0); 22893 }); 22894 } else if (swiper.velocity) { 22895 swiper.updateProgress(newPosition); 22896 swiper.setTransition(momentumDuration); 22897 swiper.setTranslate(newPosition); 22898 swiper.transitionStart(true, swiper.swipeDirection); 22899 if (!swiper.animating) { 22900 swiper.animating = true; 22901 $wrapperEl.transitionEnd(function () { 22902 if (!swiper || swiper.destroyed) return; 22903 swiper.transitionEnd(); 22904 }); 22905 } 22906 } else { 22907 swiper.updateProgress(newPosition); 22908 } 22909 swiper.updateActiveIndex(); 22910 swiper.updateSlidesClasses(); 22911 } else if (params.freeModeSticky) { 22912 swiper.slideToClosest(); 22913 return; 22914 } 22915 if (!params.freeModeMomentum || timeDiff >= params.longSwipesMs) { 22916 swiper.updateProgress(); 22917 swiper.updateActiveIndex(); 22918 swiper.updateSlidesClasses(); 22919 } 22920 return; 22921 } 22922 22923 // Find current slide 22924 var stopIndex = 0; 22925 var groupSize = swiper.slidesSizesGrid[0]; 22926 for (var i = 0; i < slidesGrid.length; i += i < params.slidesPerGroupSkip ? 1 : params.slidesPerGroup) { 22927 var _increment = i < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 22928 if (typeof slidesGrid[i + _increment] !== 'undefined') { 22929 if (currentPos >= slidesGrid[i] && currentPos < slidesGrid[i + _increment]) { 22930 stopIndex = i; 22931 groupSize = slidesGrid[i + _increment] - slidesGrid[i]; 22932 } 22933 } else if (currentPos >= slidesGrid[i]) { 22934 stopIndex = i; 22935 groupSize = slidesGrid[slidesGrid.length - 1] - slidesGrid[slidesGrid.length - 2]; 22936 } 22937 } 22938 22939 // Find current slide size 22940 var ratio = (currentPos - slidesGrid[stopIndex]) / groupSize; 22941 var increment = stopIndex < params.slidesPerGroupSkip - 1 ? 1 : params.slidesPerGroup; 22942 if (timeDiff > params.longSwipesMs) { 22943 // Long touches 22944 if (!params.longSwipes) { 22945 swiper.slideTo(swiper.activeIndex); 22946 return; 22947 } 22948 if (swiper.swipeDirection === 'next') { 22949 if (ratio >= params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex); 22950 } 22951 if (swiper.swipeDirection === 'prev') { 22952 if (ratio > 1 - params.longSwipesRatio) swiper.slideTo(stopIndex + increment);else swiper.slideTo(stopIndex); 22953 } 22954 } else { 22955 // Short swipes 22956 if (!params.shortSwipes) { 22957 swiper.slideTo(swiper.activeIndex); 22958 return; 22959 } 22960 var isNavButtonTarget = swiper.navigation && (e.target === swiper.navigation.nextEl || e.target === swiper.navigation.prevEl); 22961 if (!isNavButtonTarget) { 22962 if (swiper.swipeDirection === 'next') { 22963 swiper.slideTo(stopIndex + increment); 22964 } 22965 if (swiper.swipeDirection === 'prev') { 22966 swiper.slideTo(stopIndex); 22967 } 22968 } else if (e.target === swiper.navigation.nextEl) { 22969 swiper.slideTo(stopIndex + increment); 22970 } else { 22971 swiper.slideTo(stopIndex); 22972 } 22973 } 22974} 22975function onResize() { 22976 var swiper = this; 22977 var params = swiper.params, 22978 el = swiper.el; 22979 if (el && el.offsetWidth === 0) return; 22980 22981 // Breakpoints 22982 if (params.breakpoints) { 22983 swiper.setBreakpoint(); 22984 } 22985 22986 // Save locks 22987 var allowSlideNext = swiper.allowSlideNext, 22988 allowSlidePrev = swiper.allowSlidePrev, 22989 snapGrid = swiper.snapGrid; 22990 22991 // Disable locks on resize 22992 swiper.allowSlideNext = true; 22993 swiper.allowSlidePrev = true; 22994 swiper.updateSize(); 22995 swiper.updateSlides(); 22996 swiper.updateSlidesClasses(); 22997 if ((params.slidesPerView === 'auto' || params.slidesPerView > 1) && swiper.isEnd && !swiper.isBeginning && !swiper.params.centeredSlides) { 22998 swiper.slideTo(swiper.slides.length - 1, 0, false, true); 22999 } else { 23000 swiper.slideTo(swiper.activeIndex, 0, false, true); 23001 } 23002 if (swiper.autoplay && swiper.autoplay.running && swiper.autoplay.paused) { 23003 swiper.autoplay.run(); 23004 } 23005 // Return locks after resize 23006 swiper.allowSlidePrev = allowSlidePrev; 23007 swiper.allowSlideNext = allowSlideNext; 23008 if (swiper.params.watchOverflow && snapGrid !== swiper.snapGrid) { 23009 swiper.checkOverflow(); 23010 } 23011} 23012function onClick(e) { 23013 var swiper = this; 23014 if (!swiper.allowClick) { 23015 if (swiper.params.preventClicks) e.preventDefault(); 23016 if (swiper.params.preventClicksPropagation && swiper.animating) { 23017 e.stopPropagation(); 23018 e.stopImmediatePropagation(); 23019 } 23020 } 23021} 23022function onScroll() { 23023 var swiper = this; 23024 var wrapperEl = swiper.wrapperEl, 23025 rtlTranslate = swiper.rtlTranslate; 23026 swiper.previousTranslate = swiper.translate; 23027 if (swiper.isHorizontal()) { 23028 if (rtlTranslate) { 23029 swiper.translate = wrapperEl.scrollWidth - wrapperEl.offsetWidth - wrapperEl.scrollLeft; 23030 } else { 23031 swiper.translate = -wrapperEl.scrollLeft; 23032 } 23033 } else { 23034 swiper.translate = -wrapperEl.scrollTop; 23035 } 23036 // eslint-disable-next-line 23037 if (swiper.translate === -0) swiper.translate = 0; 23038 swiper.updateActiveIndex(); 23039 swiper.updateSlidesClasses(); 23040 var newProgress; 23041 var translatesDiff = swiper.maxTranslate() - swiper.minTranslate(); 23042 if (translatesDiff === 0) { 23043 newProgress = 0; 23044 } else { 23045 newProgress = (swiper.translate - swiper.minTranslate()) / translatesDiff; 23046 } 23047 if (newProgress !== swiper.progress) { 23048 swiper.updateProgress(rtlTranslate ? -swiper.translate : swiper.translate); 23049 } 23050 swiper.emit('setTranslate', swiper.translate, false); 23051} 23052var dummyEventAttached = false; 23053function dummyEventListener() {} 23054function attachEvents() { 23055 var swiper = this; 23056 var params = swiper.params, 23057 touchEvents = swiper.touchEvents, 23058 el = swiper.el, 23059 wrapperEl = swiper.wrapperEl; 23060 swiper.onTouchStart = onTouchStart.bind(swiper); 23061 swiper.onTouchMove = onTouchMove.bind(swiper); 23062 swiper.onTouchEnd = onTouchEnd.bind(swiper); 23063 if (params.cssMode) { 23064 swiper.onScroll = onScroll.bind(swiper); 23065 } 23066 swiper.onClick = onClick.bind(swiper); 23067 var capture = !!params.nested; 23068 23069 // Touch Events 23070 if (!Support.touch && Support.pointerEvents) { 23071 el.addEventListener(touchEvents.start, swiper.onTouchStart, false); 23072 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].addEventListener(touchEvents.move, swiper.onTouchMove, capture); 23073 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].addEventListener(touchEvents.end, swiper.onTouchEnd, false); 23074 } else { 23075 if (Support.touch) { 23076 var passiveListener = touchEvents.start === 'touchstart' && Support.passiveListener && params.passiveListeners ? { 23077 passive: true, 23078 capture: false 23079 } : false; 23080 el.addEventListener(touchEvents.start, swiper.onTouchStart, passiveListener); 23081 el.addEventListener(touchEvents.move, swiper.onTouchMove, Support.passiveListener ? { 23082 passive: false, 23083 capture: capture 23084 } : capture); 23085 el.addEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener); 23086 if (touchEvents.cancel) { 23087 el.addEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener); 23088 } 23089 if (!dummyEventAttached) { 23090 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].addEventListener('touchstart', dummyEventListener); 23091 dummyEventAttached = true; 23092 } 23093 } 23094 if (params.simulateTouch && !Device.ios && !Device.android || params.simulateTouch && !Support.touch && Device.ios) { 23095 el.addEventListener('mousedown', swiper.onTouchStart, false); 23096 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].addEventListener('mousemove', swiper.onTouchMove, capture); 23097 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].addEventListener('mouseup', swiper.onTouchEnd, false); 23098 } 23099 } 23100 // Prevent Links Clicks 23101 if (params.preventClicks || params.preventClicksPropagation) { 23102 el.addEventListener('click', swiper.onClick, true); 23103 } 23104 if (params.cssMode) { 23105 wrapperEl.addEventListener('scroll', swiper.onScroll); 23106 } 23107 23108 // Resize handler 23109 if (params.updateOnWindowResize) { 23110 swiper.on(Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize, true); 23111 } else { 23112 swiper.on('observerUpdate', onResize, true); 23113 } 23114} 23115function detachEvents() { 23116 var swiper = this; 23117 var params = swiper.params, 23118 touchEvents = swiper.touchEvents, 23119 el = swiper.el, 23120 wrapperEl = swiper.wrapperEl; 23121 var capture = !!params.nested; 23122 23123 // Touch Events 23124 if (!Support.touch && Support.pointerEvents) { 23125 el.removeEventListener(touchEvents.start, swiper.onTouchStart, false); 23126 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].removeEventListener(touchEvents.move, swiper.onTouchMove, capture); 23127 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].removeEventListener(touchEvents.end, swiper.onTouchEnd, false); 23128 } else { 23129 if (Support.touch) { 23130 var passiveListener = touchEvents.start === 'onTouchStart' && Support.passiveListener && params.passiveListeners ? { 23131 passive: true, 23132 capture: false 23133 } : false; 23134 el.removeEventListener(touchEvents.start, swiper.onTouchStart, passiveListener); 23135 el.removeEventListener(touchEvents.move, swiper.onTouchMove, capture); 23136 el.removeEventListener(touchEvents.end, swiper.onTouchEnd, passiveListener); 23137 if (touchEvents.cancel) { 23138 el.removeEventListener(touchEvents.cancel, swiper.onTouchEnd, passiveListener); 23139 } 23140 } 23141 if (params.simulateTouch && !Device.ios && !Device.android || params.simulateTouch && !Support.touch && Device.ios) { 23142 el.removeEventListener('mousedown', swiper.onTouchStart, false); 23143 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].removeEventListener('mousemove', swiper.onTouchMove, capture); 23144 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].removeEventListener('mouseup', swiper.onTouchEnd, false); 23145 } 23146 } 23147 // Prevent Links Clicks 23148 if (params.preventClicks || params.preventClicksPropagation) { 23149 el.removeEventListener('click', swiper.onClick, true); 23150 } 23151 if (params.cssMode) { 23152 wrapperEl.removeEventListener('scroll', swiper.onScroll); 23153 } 23154 23155 // Resize handler 23156 swiper.off(Device.ios || Device.android ? 'resize orientationchange observerUpdate' : 'resize observerUpdate', onResize); 23157} 23158var events = { 23159 attachEvents: attachEvents, 23160 detachEvents: detachEvents 23161}; 23162function setBreakpoint() { 23163 var swiper = this; 23164 var activeIndex = swiper.activeIndex, 23165 initialized = swiper.initialized, 23166 _swiper$loopedSlides = swiper.loopedSlides, 23167 loopedSlides = _swiper$loopedSlides === void 0 ? 0 : _swiper$loopedSlides, 23168 params = swiper.params, 23169 $el = swiper.$el; 23170 var breakpoints = params.breakpoints; 23171 if (!breakpoints || breakpoints && Object.keys(breakpoints).length === 0) return; 23172 23173 // Get breakpoint for window width and update parameters 23174 var breakpoint = swiper.getBreakpoint(breakpoints); 23175 if (breakpoint && swiper.currentBreakpoint !== breakpoint) { 23176 var breakpointOnlyParams = breakpoint in breakpoints ? breakpoints[breakpoint] : undefined; 23177 if (breakpointOnlyParams) { 23178 ['slidesPerView', 'spaceBetween', 'slidesPerGroup', 'slidesPerGroupSkip', 'slidesPerColumn'].forEach(function (param) { 23179 var paramValue = breakpointOnlyParams[param]; 23180 if (typeof paramValue === 'undefined') return; 23181 if (param === 'slidesPerView' && (paramValue === 'AUTO' || paramValue === 'auto')) { 23182 breakpointOnlyParams[param] = 'auto'; 23183 } else if (param === 'slidesPerView') { 23184 breakpointOnlyParams[param] = parseFloat(paramValue); 23185 } else { 23186 breakpointOnlyParams[param] = parseInt(paramValue, 10); 23187 } 23188 }); 23189 } 23190 var breakpointParams = breakpointOnlyParams || swiper.originalParams; 23191 var wasMultiRow = params.slidesPerColumn > 1; 23192 var isMultiRow = breakpointParams.slidesPerColumn > 1; 23193 if (wasMultiRow && !isMultiRow) { 23194 $el.removeClass("".concat(params.containerModifierClass, "multirow ").concat(params.containerModifierClass, "multirow-column")); 23195 } else if (!wasMultiRow && isMultiRow) { 23196 $el.addClass("".concat(params.containerModifierClass, "multirow")); 23197 if (breakpointParams.slidesPerColumnFill === 'column') { 23198 $el.addClass("".concat(params.containerModifierClass, "multirow-column")); 23199 } 23200 } 23201 var directionChanged = breakpointParams.direction && breakpointParams.direction !== params.direction; 23202 var needsReLoop = params.loop && (breakpointParams.slidesPerView !== params.slidesPerView || directionChanged); 23203 if (directionChanged && initialized) { 23204 swiper.changeDirection(); 23205 } 23206 Utils.extend(swiper.params, breakpointParams); 23207 Utils.extend(swiper, { 23208 allowTouchMove: swiper.params.allowTouchMove, 23209 allowSlideNext: swiper.params.allowSlideNext, 23210 allowSlidePrev: swiper.params.allowSlidePrev 23211 }); 23212 swiper.currentBreakpoint = breakpoint; 23213 if (needsReLoop && initialized) { 23214 swiper.loopDestroy(); 23215 swiper.loopCreate(); 23216 swiper.updateSlides(); 23217 swiper.slideTo(activeIndex - loopedSlides + swiper.loopedSlides, 0, false); 23218 } 23219 swiper.emit('breakpoint', breakpointParams); 23220 } 23221} 23222function getBreakpoint(breakpoints) { 23223 // Get breakpoint for window width 23224 if (!breakpoints) return undefined; 23225 var breakpoint = false; 23226 var points = Object.keys(breakpoints).map(function (point) { 23227 if (typeof point === 'string' && point.indexOf('@') === 0) { 23228 var minRatio = parseFloat(point.substr(1)); 23229 var value = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].innerHeight * minRatio; 23230 return { 23231 value: value, 23232 point: point 23233 }; 23234 } 23235 return { 23236 value: point, 23237 point: point 23238 }; 23239 }); 23240 points.sort(function (a, b) { 23241 return parseInt(a.value, 10) - parseInt(b.value, 10); 23242 }); 23243 for (var i = 0; i < points.length; i += 1) { 23244 var _points$i = points[i], 23245 point = _points$i.point, 23246 value = _points$i.value; 23247 if (value <= ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].innerWidth) { 23248 breakpoint = point; 23249 } 23250 } 23251 return breakpoint || 'max'; 23252} 23253var breakpoints = { 23254 setBreakpoint: setBreakpoint, 23255 getBreakpoint: getBreakpoint 23256}; 23257function addClasses() { 23258 var swiper = this; 23259 var classNames = swiper.classNames, 23260 params = swiper.params, 23261 rtl = swiper.rtl, 23262 $el = swiper.$el; 23263 var suffixes = []; 23264 suffixes.push('initialized'); 23265 suffixes.push(params.direction); 23266 if (params.freeMode) { 23267 suffixes.push('free-mode'); 23268 } 23269 if (params.autoHeight) { 23270 suffixes.push('autoheight'); 23271 } 23272 if (rtl) { 23273 suffixes.push('rtl'); 23274 } 23275 if (params.slidesPerColumn > 1) { 23276 suffixes.push('multirow'); 23277 if (params.slidesPerColumnFill === 'column') { 23278 suffixes.push('multirow-column'); 23279 } 23280 } 23281 if (Device.android) { 23282 suffixes.push('android'); 23283 } 23284 if (Device.ios) { 23285 suffixes.push('ios'); 23286 } 23287 if (params.cssMode) { 23288 suffixes.push('css-mode'); 23289 } 23290 suffixes.forEach(function (suffix) { 23291 classNames.push(params.containerModifierClass + suffix); 23292 }); 23293 $el.addClass(classNames.join(' ')); 23294} 23295function removeClasses() { 23296 var swiper = this; 23297 var $el = swiper.$el, 23298 classNames = swiper.classNames; 23299 $el.removeClass(classNames.join(' ')); 23300} 23301var classes = { 23302 addClasses: addClasses, 23303 removeClasses: removeClasses 23304}; 23305function loadImage(imageEl, src, srcset, sizes, checkForComplete, callback) { 23306 var image; 23307 function onReady() { 23308 if (callback) callback(); 23309 } 23310 var isPicture = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(imageEl).parent('picture')[0]; 23311 if (!isPicture && (!imageEl.complete || !checkForComplete)) { 23312 if (src) { 23313 image = new ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].Image(); 23314 image.onload = onReady; 23315 image.onerror = onReady; 23316 if (sizes) { 23317 image.sizes = sizes; 23318 } 23319 if (srcset) { 23320 image.srcset = srcset; 23321 } 23322 if (src) { 23323 image.src = src; 23324 } 23325 } else { 23326 onReady(); 23327 } 23328 } else { 23329 // image already loaded... 23330 onReady(); 23331 } 23332} 23333function preloadImages() { 23334 var swiper = this; 23335 swiper.imagesToLoad = swiper.$el.find('img'); 23336 function onReady() { 23337 if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper.destroyed) return; 23338 if (swiper.imagesLoaded !== undefined) swiper.imagesLoaded += 1; 23339 if (swiper.imagesLoaded === swiper.imagesToLoad.length) { 23340 if (swiper.params.updateOnImagesReady) swiper.update(); 23341 swiper.emit('imagesReady'); 23342 } 23343 } 23344 for (var i = 0; i < swiper.imagesToLoad.length; i += 1) { 23345 var imageEl = swiper.imagesToLoad[i]; 23346 swiper.loadImage(imageEl, imageEl.currentSrc || imageEl.getAttribute('src'), imageEl.srcset || imageEl.getAttribute('srcset'), imageEl.sizes || imageEl.getAttribute('sizes'), true, onReady); 23347 } 23348} 23349var images = { 23350 loadImage: loadImage, 23351 preloadImages: preloadImages 23352}; 23353function checkOverflow() { 23354 var swiper = this; 23355 var params = swiper.params; 23356 var wasLocked = swiper.isLocked; 23357 var lastSlidePosition = swiper.slides.length > 0 && params.slidesOffsetBefore + params.spaceBetween * (swiper.slides.length - 1) + swiper.slides[0].offsetWidth * swiper.slides.length; 23358 if (params.slidesOffsetBefore && params.slidesOffsetAfter && lastSlidePosition) { 23359 swiper.isLocked = lastSlidePosition <= swiper.size; 23360 } else { 23361 swiper.isLocked = swiper.snapGrid.length === 1; 23362 } 23363 swiper.allowSlideNext = !swiper.isLocked; 23364 swiper.allowSlidePrev = !swiper.isLocked; 23365 23366 // events 23367 if (wasLocked !== swiper.isLocked) swiper.emit(swiper.isLocked ? 'lock' : 'unlock'); 23368 if (wasLocked && wasLocked !== swiper.isLocked) { 23369 swiper.isEnd = false; 23370 if (swiper.navigation) swiper.navigation.update(); 23371 } 23372} 23373var checkOverflow$1 = { 23374 checkOverflow: checkOverflow 23375}; 23376var defaults = { 23377 init: true, 23378 direction: 'horizontal', 23379 touchEventsTarget: 'container', 23380 initialSlide: 0, 23381 speed: 300, 23382 cssMode: false, 23383 updateOnWindowResize: true, 23384 // 23385 preventInteractionOnTransition: false, 23386 // To support iOS's swipe-to-go-back gesture (when being used in-app). 23387 edgeSwipeDetection: false, 23388 edgeSwipeThreshold: 20, 23389 // Free mode 23390 freeMode: false, 23391 freeModeMomentum: true, 23392 freeModeMomentumRatio: 1, 23393 freeModeMomentumBounce: true, 23394 freeModeMomentumBounceRatio: 1, 23395 freeModeMomentumVelocityRatio: 1, 23396 freeModeSticky: false, 23397 freeModeMinimumVelocity: 0.02, 23398 // Autoheight 23399 autoHeight: false, 23400 // Set wrapper width 23401 setWrapperSize: false, 23402 // Virtual Translate 23403 virtualTranslate: false, 23404 // Effects 23405 effect: 'slide', 23406 // 'slide' or 'fade' or 'cube' or 'coverflow' or 'flip' 23407 23408 // Breakpoints 23409 breakpoints: undefined, 23410 // Slides grid 23411 spaceBetween: 0, 23412 slidesPerView: 1, 23413 slidesPerColumn: 1, 23414 slidesPerColumnFill: 'column', 23415 slidesPerGroup: 1, 23416 slidesPerGroupSkip: 0, 23417 centeredSlides: false, 23418 centeredSlidesBounds: false, 23419 slidesOffsetBefore: 0, 23420 // in px 23421 slidesOffsetAfter: 0, 23422 // in px 23423 normalizeSlideIndex: true, 23424 centerInsufficientSlides: false, 23425 // Disable swiper and hide navigation when container not overflow 23426 watchOverflow: false, 23427 // Round length 23428 roundLengths: false, 23429 // Touches 23430 touchRatio: 1, 23431 touchAngle: 45, 23432 simulateTouch: true, 23433 shortSwipes: true, 23434 longSwipes: true, 23435 longSwipesRatio: 0.5, 23436 longSwipesMs: 300, 23437 followFinger: true, 23438 allowTouchMove: true, 23439 threshold: 0, 23440 touchMoveStopPropagation: false, 23441 touchStartPreventDefault: true, 23442 touchStartForcePreventDefault: false, 23443 touchReleaseOnEdges: false, 23444 // Unique Navigation Elements 23445 uniqueNavElements: true, 23446 // Resistance 23447 resistance: true, 23448 resistanceRatio: 0.85, 23449 // Progress 23450 watchSlidesProgress: false, 23451 watchSlidesVisibility: false, 23452 // Cursor 23453 grabCursor: false, 23454 // Clicks 23455 preventClicks: true, 23456 preventClicksPropagation: true, 23457 slideToClickedSlide: false, 23458 // Images 23459 preloadImages: true, 23460 updateOnImagesReady: true, 23461 // loop 23462 loop: false, 23463 loopAdditionalSlides: 0, 23464 loopedSlides: null, 23465 loopFillGroupWithBlank: false, 23466 // Swiping/no swiping 23467 allowSlidePrev: true, 23468 allowSlideNext: true, 23469 swipeHandler: null, 23470 // '.swipe-handler', 23471 noSwiping: true, 23472 noSwipingClass: 'swiper-no-swiping', 23473 noSwipingSelector: null, 23474 // Passive Listeners 23475 passiveListeners: true, 23476 // NS 23477 containerModifierClass: 'swiper-container-', 23478 // NEW 23479 slideClass: 'swiper-slide', 23480 slideBlankClass: 'swiper-slide-invisible-blank', 23481 slideActiveClass: 'swiper-slide-active', 23482 slideDuplicateActiveClass: 'swiper-slide-duplicate-active', 23483 slideVisibleClass: 'swiper-slide-visible', 23484 slideDuplicateClass: 'swiper-slide-duplicate', 23485 slideNextClass: 'swiper-slide-next', 23486 slideDuplicateNextClass: 'swiper-slide-duplicate-next', 23487 slidePrevClass: 'swiper-slide-prev', 23488 slideDuplicatePrevClass: 'swiper-slide-duplicate-prev', 23489 wrapperClass: 'swiper-wrapper', 23490 // Callbacks 23491 runCallbacksOnInit: true 23492}; 23493 23494/* eslint no-param-reassign: "off" */ 23495 23496var prototypes = { 23497 update: update, 23498 translate: translate, 23499 transition: transition, 23500 slide: slide, 23501 loop: loop, 23502 grabCursor: grabCursor, 23503 manipulation: manipulation, 23504 events: events, 23505 breakpoints: breakpoints, 23506 checkOverflow: checkOverflow$1, 23507 classes: classes, 23508 images: images 23509}; 23510var extendedDefaults = {}; 23511var Swiper = /*#__PURE__*/function (_SwiperClass) { 23512 function Swiper() { 23513 var _this; 23514 _classCallCheck(this, Swiper); 23515 var el; 23516 var params; 23517 for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) { 23518 args[_key5] = arguments[_key5]; 23519 } 23520 if (args.length === 1 && args[0].constructor && args[0].constructor === Object) { 23521 params = args[0]; 23522 } else { 23523 el = args[0]; 23524 params = args[1]; 23525 } 23526 if (!params) params = {}; 23527 params = Utils.extend({}, params); 23528 if (el && !params.el) params.el = el; 23529 _this = _callSuper(this, Swiper, [params]); 23530 Object.keys(prototypes).forEach(function (prototypeGroup) { 23531 Object.keys(prototypes[prototypeGroup]).forEach(function (protoMethod) { 23532 if (!Swiper.prototype[protoMethod]) { 23533 Swiper.prototype[protoMethod] = prototypes[prototypeGroup][protoMethod]; 23534 } 23535 }); 23536 }); 23537 23538 // Swiper Instance 23539 var swiper = _this; 23540 if (typeof swiper.modules === 'undefined') { 23541 swiper.modules = {}; 23542 } 23543 Object.keys(swiper.modules).forEach(function (moduleName) { 23544 var module = swiper.modules[moduleName]; 23545 if (module.params) { 23546 var moduleParamName = Object.keys(module.params)[0]; 23547 var moduleParams = module.params[moduleParamName]; 23548 if (_typeof(moduleParams) !== 'object' || moduleParams === null) return; 23549 if (!(moduleParamName in params && 'enabled' in moduleParams)) return; 23550 if (params[moduleParamName] === true) { 23551 params[moduleParamName] = { 23552 enabled: true 23553 }; 23554 } 23555 if (_typeof(params[moduleParamName]) === 'object' && !('enabled' in params[moduleParamName])) { 23556 params[moduleParamName].enabled = true; 23557 } 23558 if (!params[moduleParamName]) params[moduleParamName] = { 23559 enabled: false 23560 }; 23561 } 23562 }); 23563 23564 // Extend defaults with modules params 23565 var swiperParams = Utils.extend({}, defaults); 23566 swiper.useModulesParams(swiperParams); 23567 23568 // Extend defaults with passed params 23569 swiper.params = Utils.extend({}, swiperParams, extendedDefaults, params); 23570 swiper.originalParams = Utils.extend({}, swiper.params); 23571 swiper.passedParams = Utils.extend({}, params); 23572 23573 // Save Dom lib 23574 swiper.$ = dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"]; 23575 23576 // Find el 23577 var $el = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(swiper.params.el); 23578 el = $el[0]; 23579 if (!el) { 23580 return _possibleConstructorReturn(_this, undefined); 23581 } 23582 if ($el.length > 1) { 23583 var swipers = []; 23584 $el.each(function (index, containerEl) { 23585 var newParams = Utils.extend({}, params, { 23586 el: containerEl 23587 }); 23588 swipers.push(new Swiper(newParams)); 23589 }); 23590 return _possibleConstructorReturn(_this, swipers); 23591 } 23592 el.swiper = swiper; 23593 $el.data('swiper', swiper); 23594 23595 // Find Wrapper 23596 var $wrapperEl; 23597 if (el && el.shadowRoot && el.shadowRoot.querySelector) { 23598 $wrapperEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(el.shadowRoot.querySelector(".".concat(swiper.params.wrapperClass))); 23599 // Children needs to return slot items 23600 $wrapperEl.children = function (options) { 23601 return $el.children(options); 23602 }; 23603 } else { 23604 $wrapperEl = $el.children(".".concat(swiper.params.wrapperClass)); 23605 } 23606 // Extend Swiper 23607 Utils.extend(swiper, { 23608 $el: $el, 23609 el: el, 23610 $wrapperEl: $wrapperEl, 23611 wrapperEl: $wrapperEl[0], 23612 // Classes 23613 classNames: [], 23614 // Slides 23615 slides: Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(), 23616 slidesGrid: [], 23617 snapGrid: [], 23618 slidesSizesGrid: [], 23619 // isDirection 23620 isHorizontal: function isHorizontal() { 23621 return swiper.params.direction === 'horizontal'; 23622 }, 23623 isVertical: function isVertical() { 23624 return swiper.params.direction === 'vertical'; 23625 }, 23626 // RTL 23627 rtl: el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl', 23628 rtlTranslate: swiper.params.direction === 'horizontal' && (el.dir.toLowerCase() === 'rtl' || $el.css('direction') === 'rtl'), 23629 wrongRTL: $wrapperEl.css('display') === '-webkit-box', 23630 // Indexes 23631 activeIndex: 0, 23632 realIndex: 0, 23633 // 23634 isBeginning: true, 23635 isEnd: false, 23636 // Props 23637 translate: 0, 23638 previousTranslate: 0, 23639 progress: 0, 23640 velocity: 0, 23641 animating: false, 23642 // Locks 23643 allowSlideNext: swiper.params.allowSlideNext, 23644 allowSlidePrev: swiper.params.allowSlidePrev, 23645 // Touch Events 23646 touchEvents: function touchEvents() { 23647 var touch = ['touchstart', 'touchmove', 'touchend', 'touchcancel']; 23648 var desktop = ['mousedown', 'mousemove', 'mouseup']; 23649 if (Support.pointerEvents) { 23650 desktop = ['pointerdown', 'pointermove', 'pointerup']; 23651 } 23652 swiper.touchEventsTouch = { 23653 start: touch[0], 23654 move: touch[1], 23655 end: touch[2], 23656 cancel: touch[3] 23657 }; 23658 swiper.touchEventsDesktop = { 23659 start: desktop[0], 23660 move: desktop[1], 23661 end: desktop[2] 23662 }; 23663 return Support.touch || !swiper.params.simulateTouch ? swiper.touchEventsTouch : swiper.touchEventsDesktop; 23664 }(), 23665 touchEventsData: { 23666 isTouched: undefined, 23667 isMoved: undefined, 23668 allowTouchCallbacks: undefined, 23669 touchStartTime: undefined, 23670 isScrolling: undefined, 23671 currentTranslate: undefined, 23672 startTranslate: undefined, 23673 allowThresholdMove: undefined, 23674 // Form elements to match 23675 formElements: 'input, select, option, textarea, button, video, label', 23676 // Last click time 23677 lastClickTime: Utils.now(), 23678 clickTimeout: undefined, 23679 // Velocities 23680 velocities: [], 23681 allowMomentumBounce: undefined, 23682 isTouchEvent: undefined, 23683 startMoving: undefined 23684 }, 23685 // Clicks 23686 allowClick: true, 23687 // Touches 23688 allowTouchMove: swiper.params.allowTouchMove, 23689 touches: { 23690 startX: 0, 23691 startY: 0, 23692 currentX: 0, 23693 currentY: 0, 23694 diff: 0 23695 }, 23696 // Images 23697 imagesToLoad: [], 23698 imagesLoaded: 0 23699 }); 23700 23701 // Install Modules 23702 swiper.useModules(); 23703 23704 // Init 23705 if (swiper.params.init) { 23706 swiper.init(); 23707 } 23708 23709 // Return app instance 23710 return _possibleConstructorReturn(_this, swiper); 23711 } 23712 _inherits(Swiper, _SwiperClass); 23713 return _createClass(Swiper, [{ 23714 key: "slidesPerViewDynamic", 23715 value: function slidesPerViewDynamic() { 23716 var swiper = this; 23717 var params = swiper.params, 23718 slides = swiper.slides, 23719 slidesGrid = swiper.slidesGrid, 23720 swiperSize = swiper.size, 23721 activeIndex = swiper.activeIndex; 23722 var spv = 1; 23723 if (params.centeredSlides) { 23724 var slideSize = slides[activeIndex].swiperSlideSize; 23725 var breakLoop; 23726 for (var i = activeIndex + 1; i < slides.length; i += 1) { 23727 if (slides[i] && !breakLoop) { 23728 slideSize += slides[i].swiperSlideSize; 23729 spv += 1; 23730 if (slideSize > swiperSize) breakLoop = true; 23731 } 23732 } 23733 for (var _i7 = activeIndex - 1; _i7 >= 0; _i7 -= 1) { 23734 if (slides[_i7] && !breakLoop) { 23735 slideSize += slides[_i7].swiperSlideSize; 23736 spv += 1; 23737 if (slideSize > swiperSize) breakLoop = true; 23738 } 23739 } 23740 } else { 23741 for (var _i8 = activeIndex + 1; _i8 < slides.length; _i8 += 1) { 23742 if (slidesGrid[_i8] - slidesGrid[activeIndex] < swiperSize) { 23743 spv += 1; 23744 } 23745 } 23746 } 23747 return spv; 23748 } 23749 }, { 23750 key: "update", 23751 value: function update() { 23752 var swiper = this; 23753 if (!swiper || swiper.destroyed) return; 23754 var snapGrid = swiper.snapGrid, 23755 params = swiper.params; 23756 // Breakpoints 23757 if (params.breakpoints) { 23758 swiper.setBreakpoint(); 23759 } 23760 swiper.updateSize(); 23761 swiper.updateSlides(); 23762 swiper.updateProgress(); 23763 swiper.updateSlidesClasses(); 23764 function setTranslate() { 23765 var translateValue = swiper.rtlTranslate ? swiper.translate * -1 : swiper.translate; 23766 var newTranslate = Math.min(Math.max(translateValue, swiper.maxTranslate()), swiper.minTranslate()); 23767 swiper.setTranslate(newTranslate); 23768 swiper.updateActiveIndex(); 23769 swiper.updateSlidesClasses(); 23770 } 23771 var translated; 23772 if (swiper.params.freeMode) { 23773 setTranslate(); 23774 if (swiper.params.autoHeight) { 23775 swiper.updateAutoHeight(); 23776 } 23777 } else { 23778 if ((swiper.params.slidesPerView === 'auto' || swiper.params.slidesPerView > 1) && swiper.isEnd && !swiper.params.centeredSlides) { 23779 translated = swiper.slideTo(swiper.slides.length - 1, 0, false, true); 23780 } else { 23781 translated = swiper.slideTo(swiper.activeIndex, 0, false, true); 23782 } 23783 if (!translated) { 23784 setTranslate(); 23785 } 23786 } 23787 if (params.watchOverflow && snapGrid !== swiper.snapGrid) { 23788 swiper.checkOverflow(); 23789 } 23790 swiper.emit('update'); 23791 } 23792 }, { 23793 key: "changeDirection", 23794 value: function changeDirection(newDirection) { 23795 var needUpdate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 23796 var swiper = this; 23797 var currentDirection = swiper.params.direction; 23798 if (!newDirection) { 23799 // eslint-disable-next-line 23800 newDirection = currentDirection === 'horizontal' ? 'vertical' : 'horizontal'; 23801 } 23802 if (newDirection === currentDirection || newDirection !== 'horizontal' && newDirection !== 'vertical') { 23803 return swiper; 23804 } 23805 swiper.$el.removeClass("".concat(swiper.params.containerModifierClass).concat(currentDirection)).addClass("".concat(swiper.params.containerModifierClass).concat(newDirection)); 23806 swiper.params.direction = newDirection; 23807 swiper.slides.each(function (slideIndex, slideEl) { 23808 if (newDirection === 'vertical') { 23809 slideEl.style.width = ''; 23810 } else { 23811 slideEl.style.height = ''; 23812 } 23813 }); 23814 swiper.emit('changeDirection'); 23815 if (needUpdate) swiper.update(); 23816 return swiper; 23817 } 23818 }, { 23819 key: "init", 23820 value: function init() { 23821 var swiper = this; 23822 if (swiper.initialized) return; 23823 swiper.emit('beforeInit'); 23824 23825 // Set breakpoint 23826 if (swiper.params.breakpoints) { 23827 swiper.setBreakpoint(); 23828 } 23829 23830 // Add Classes 23831 swiper.addClasses(); 23832 23833 // Create loop 23834 if (swiper.params.loop) { 23835 swiper.loopCreate(); 23836 } 23837 23838 // Update size 23839 swiper.updateSize(); 23840 23841 // Update slides 23842 swiper.updateSlides(); 23843 if (swiper.params.watchOverflow) { 23844 swiper.checkOverflow(); 23845 } 23846 23847 // Set Grab Cursor 23848 if (swiper.params.grabCursor) { 23849 swiper.setGrabCursor(); 23850 } 23851 if (swiper.params.preloadImages) { 23852 swiper.preloadImages(); 23853 } 23854 23855 // Slide To Initial Slide 23856 if (swiper.params.loop) { 23857 swiper.slideTo(swiper.params.initialSlide + swiper.loopedSlides, 0, swiper.params.runCallbacksOnInit); 23858 } else { 23859 swiper.slideTo(swiper.params.initialSlide, 0, swiper.params.runCallbacksOnInit); 23860 } 23861 23862 // Attach events 23863 swiper.attachEvents(); 23864 23865 // Init Flag 23866 swiper.initialized = true; 23867 23868 // Emit 23869 swiper.emit('init'); 23870 } 23871 }, { 23872 key: "destroy", 23873 value: function destroy() { 23874 var deleteInstance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true; 23875 var cleanStyles = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 23876 var swiper = this; 23877 var params = swiper.params, 23878 $el = swiper.$el, 23879 $wrapperEl = swiper.$wrapperEl, 23880 slides = swiper.slides; 23881 if (typeof swiper.params === 'undefined' || swiper.destroyed) { 23882 return null; 23883 } 23884 swiper.emit('beforeDestroy'); 23885 23886 // Init Flag 23887 swiper.initialized = false; 23888 23889 // Detach events 23890 swiper.detachEvents(); 23891 23892 // Destroy loop 23893 if (params.loop) { 23894 swiper.loopDestroy(); 23895 } 23896 23897 // Cleanup styles 23898 if (cleanStyles) { 23899 swiper.removeClasses(); 23900 $el.removeAttr('style'); 23901 $wrapperEl.removeAttr('style'); 23902 if (slides && slides.length) { 23903 slides.removeClass([params.slideVisibleClass, params.slideActiveClass, params.slideNextClass, params.slidePrevClass].join(' ')).removeAttr('style').removeAttr('data-swiper-slide-index'); 23904 } 23905 } 23906 swiper.emit('destroy'); 23907 23908 // Detach emitter events 23909 Object.keys(swiper.eventsListeners).forEach(function (eventName) { 23910 swiper.off(eventName); 23911 }); 23912 if (deleteInstance !== false) { 23913 swiper.$el[0].swiper = null; 23914 swiper.$el.data('swiper', null); 23915 Utils.deleteProps(swiper); 23916 } 23917 swiper.destroyed = true; 23918 return null; 23919 } 23920 }], [{ 23921 key: "extendDefaults", 23922 value: function extendDefaults(newDefaults) { 23923 Utils.extend(extendedDefaults, newDefaults); 23924 } 23925 }, { 23926 key: "extendedDefaults", 23927 get: function get() { 23928 return extendedDefaults; 23929 } 23930 }, { 23931 key: "defaults", 23932 get: function get() { 23933 return defaults; 23934 } 23935 }, { 23936 key: "Class", 23937 get: function get() { 23938 return SwiperClass; 23939 } 23940 }, { 23941 key: "$", 23942 get: function get() { 23943 return dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"]; 23944 } 23945 }]); 23946}(SwiperClass); 23947var Device$1 = { 23948 name: 'device', 23949 proto: { 23950 device: Device 23951 }, 23952 static: { 23953 device: Device 23954 } 23955}; 23956var Support$1 = { 23957 name: 'support', 23958 proto: { 23959 support: Support 23960 }, 23961 static: { 23962 support: Support 23963 } 23964}; 23965var Browser = function Browser() { 23966 function isSafari() { 23967 var ua = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].navigator.userAgent.toLowerCase(); 23968 return ua.indexOf('safari') >= 0 && ua.indexOf('chrome') < 0 && ua.indexOf('android') < 0; 23969 } 23970 return { 23971 isEdge: !!ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].navigator.userAgent.match(/Edge/g), 23972 isSafari: isSafari(), 23973 isWebView: /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].navigator.userAgent) 23974 }; 23975}(); 23976var Browser$1 = { 23977 name: 'browser', 23978 proto: { 23979 browser: Browser 23980 }, 23981 static: { 23982 browser: Browser 23983 } 23984}; 23985var Resize = { 23986 name: 'resize', 23987 create: function create() { 23988 var swiper = this; 23989 Utils.extend(swiper, { 23990 resize: { 23991 resizeHandler: function resizeHandler() { 23992 if (!swiper || swiper.destroyed || !swiper.initialized) return; 23993 swiper.emit('beforeResize'); 23994 swiper.emit('resize'); 23995 }, 23996 orientationChangeHandler: function orientationChangeHandler() { 23997 if (!swiper || swiper.destroyed || !swiper.initialized) return; 23998 swiper.emit('orientationchange'); 23999 } 24000 } 24001 }); 24002 }, 24003 on: { 24004 init: function init() { 24005 var swiper = this; 24006 // Emit resize 24007 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('resize', swiper.resize.resizeHandler); 24008 24009 // Emit orientationchange 24010 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('orientationchange', swiper.resize.orientationChangeHandler); 24011 }, 24012 destroy: function destroy() { 24013 var swiper = this; 24014 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].removeEventListener('resize', swiper.resize.resizeHandler); 24015 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].removeEventListener('orientationchange', swiper.resize.orientationChangeHandler); 24016 } 24017 } 24018}; 24019var Observer = { 24020 func: ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].MutationObserver || ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].WebkitMutationObserver, 24021 attach: function attach(target) { 24022 var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; 24023 var swiper = this; 24024 var ObserverFunc = Observer.func; 24025 var observer = new ObserverFunc(function (mutations) { 24026 // The observerUpdate event should only be triggered 24027 // once despite the number of mutations. Additional 24028 // triggers are redundant and are very costly 24029 if (mutations.length === 1) { 24030 swiper.emit('observerUpdate', mutations[0]); 24031 return; 24032 } 24033 var observerUpdate = function observerUpdate() { 24034 swiper.emit('observerUpdate', mutations[0]); 24035 }; 24036 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].requestAnimationFrame) { 24037 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].requestAnimationFrame(observerUpdate); 24038 } else { 24039 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].setTimeout(observerUpdate, 0); 24040 } 24041 }); 24042 observer.observe(target, { 24043 attributes: typeof options.attributes === 'undefined' ? true : options.attributes, 24044 childList: typeof options.childList === 'undefined' ? true : options.childList, 24045 characterData: typeof options.characterData === 'undefined' ? true : options.characterData 24046 }); 24047 swiper.observer.observers.push(observer); 24048 }, 24049 init: function init() { 24050 var swiper = this; 24051 if (!Support.observer || !swiper.params.observer) return; 24052 if (swiper.params.observeParents) { 24053 var containerParents = swiper.$el.parents(); 24054 for (var i = 0; i < containerParents.length; i += 1) { 24055 swiper.observer.attach(containerParents[i]); 24056 } 24057 } 24058 // Observe container 24059 swiper.observer.attach(swiper.$el[0], { 24060 childList: swiper.params.observeSlideChildren 24061 }); 24062 24063 // Observe wrapper 24064 swiper.observer.attach(swiper.$wrapperEl[0], { 24065 attributes: false 24066 }); 24067 }, 24068 destroy: function destroy() { 24069 var swiper = this; 24070 swiper.observer.observers.forEach(function (observer) { 24071 observer.disconnect(); 24072 }); 24073 swiper.observer.observers = []; 24074 } 24075}; 24076var Observer$1 = { 24077 name: 'observer', 24078 params: { 24079 observer: false, 24080 observeParents: false, 24081 observeSlideChildren: false 24082 }, 24083 create: function create() { 24084 var swiper = this; 24085 Utils.extend(swiper, { 24086 observer: { 24087 init: Observer.init.bind(swiper), 24088 attach: Observer.attach.bind(swiper), 24089 destroy: Observer.destroy.bind(swiper), 24090 observers: [] 24091 } 24092 }); 24093 }, 24094 on: { 24095 init: function init() { 24096 var swiper = this; 24097 swiper.observer.init(); 24098 }, 24099 destroy: function destroy() { 24100 var swiper = this; 24101 swiper.observer.destroy(); 24102 } 24103 } 24104}; 24105var Virtual = { 24106 update: function update(force) { 24107 var swiper = this; 24108 var _swiper$params = swiper.params, 24109 slidesPerView = _swiper$params.slidesPerView, 24110 slidesPerGroup = _swiper$params.slidesPerGroup, 24111 centeredSlides = _swiper$params.centeredSlides; 24112 var _swiper$params$virtua = swiper.params.virtual, 24113 addSlidesBefore = _swiper$params$virtua.addSlidesBefore, 24114 addSlidesAfter = _swiper$params$virtua.addSlidesAfter; 24115 var _swiper$virtual = swiper.virtual, 24116 previousFrom = _swiper$virtual.from, 24117 previousTo = _swiper$virtual.to, 24118 slides = _swiper$virtual.slides, 24119 previousSlidesGrid = _swiper$virtual.slidesGrid, 24120 renderSlide = _swiper$virtual.renderSlide, 24121 previousOffset = _swiper$virtual.offset; 24122 swiper.updateActiveIndex(); 24123 var activeIndex = swiper.activeIndex || 0; 24124 var offsetProp; 24125 if (swiper.rtlTranslate) offsetProp = 'right';else offsetProp = swiper.isHorizontal() ? 'left' : 'top'; 24126 var slidesAfter; 24127 var slidesBefore; 24128 if (centeredSlides) { 24129 slidesAfter = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesBefore; 24130 slidesBefore = Math.floor(slidesPerView / 2) + slidesPerGroup + addSlidesAfter; 24131 } else { 24132 slidesAfter = slidesPerView + (slidesPerGroup - 1) + addSlidesBefore; 24133 slidesBefore = slidesPerGroup + addSlidesAfter; 24134 } 24135 var from = Math.max((activeIndex || 0) - slidesBefore, 0); 24136 var to = Math.min((activeIndex || 0) + slidesAfter, slides.length - 1); 24137 var offset = (swiper.slidesGrid[from] || 0) - (swiper.slidesGrid[0] || 0); 24138 Utils.extend(swiper.virtual, { 24139 from: from, 24140 to: to, 24141 offset: offset, 24142 slidesGrid: swiper.slidesGrid 24143 }); 24144 function onRendered() { 24145 swiper.updateSlides(); 24146 swiper.updateProgress(); 24147 swiper.updateSlidesClasses(); 24148 if (swiper.lazy && swiper.params.lazy.enabled) { 24149 swiper.lazy.load(); 24150 } 24151 } 24152 if (previousFrom === from && previousTo === to && !force) { 24153 if (swiper.slidesGrid !== previousSlidesGrid && offset !== previousOffset) { 24154 swiper.slides.css(offsetProp, "".concat(offset, "px")); 24155 } 24156 swiper.updateProgress(); 24157 return; 24158 } 24159 if (swiper.params.virtual.renderExternal) { 24160 swiper.params.virtual.renderExternal.call(swiper, { 24161 offset: offset, 24162 from: from, 24163 to: to, 24164 slides: function getSlides() { 24165 var slidesToRender = []; 24166 for (var i = from; i <= to; i += 1) { 24167 slidesToRender.push(slides[i]); 24168 } 24169 return slidesToRender; 24170 }() 24171 }); 24172 onRendered(); 24173 return; 24174 } 24175 var prependIndexes = []; 24176 var appendIndexes = []; 24177 if (force) { 24178 swiper.$wrapperEl.find(".".concat(swiper.params.slideClass)).remove(); 24179 } else { 24180 for (var i = previousFrom; i <= previousTo; i += 1) { 24181 if (i < from || i > to) { 24182 swiper.$wrapperEl.find(".".concat(swiper.params.slideClass, "[data-swiper-slide-index=\"").concat(i, "\"]")).remove(); 24183 } 24184 } 24185 } 24186 for (var _i9 = 0; _i9 < slides.length; _i9 += 1) { 24187 if (_i9 >= from && _i9 <= to) { 24188 if (typeof previousTo === 'undefined' || force) { 24189 appendIndexes.push(_i9); 24190 } else { 24191 if (_i9 > previousTo) appendIndexes.push(_i9); 24192 if (_i9 < previousFrom) prependIndexes.push(_i9); 24193 } 24194 } 24195 } 24196 appendIndexes.forEach(function (index) { 24197 swiper.$wrapperEl.append(renderSlide(slides[index], index)); 24198 }); 24199 prependIndexes.sort(function (a, b) { 24200 return b - a; 24201 }).forEach(function (index) { 24202 swiper.$wrapperEl.prepend(renderSlide(slides[index], index)); 24203 }); 24204 swiper.$wrapperEl.children('.swiper-slide').css(offsetProp, "".concat(offset, "px")); 24205 onRendered(); 24206 }, 24207 renderSlide: function renderSlide(slide, index) { 24208 var swiper = this; 24209 var params = swiper.params.virtual; 24210 if (params.cache && swiper.virtual.cache[index]) { 24211 return swiper.virtual.cache[index]; 24212 } 24213 var $slideEl = params.renderSlide ? Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(params.renderSlide.call(swiper, slide, index)) : Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])("<div class=\"".concat(swiper.params.slideClass, "\" data-swiper-slide-index=\"").concat(index, "\">").concat(slide, "</div>")); 24214 if (!$slideEl.attr('data-swiper-slide-index')) $slideEl.attr('data-swiper-slide-index', index); 24215 if (params.cache) swiper.virtual.cache[index] = $slideEl; 24216 return $slideEl; 24217 }, 24218 appendSlide: function appendSlide(slides) { 24219 var swiper = this; 24220 if (_typeof(slides) === 'object' && 'length' in slides) { 24221 for (var i = 0; i < slides.length; i += 1) { 24222 if (slides[i]) swiper.virtual.slides.push(slides[i]); 24223 } 24224 } else { 24225 swiper.virtual.slides.push(slides); 24226 } 24227 swiper.virtual.update(true); 24228 }, 24229 prependSlide: function prependSlide(slides) { 24230 var swiper = this; 24231 var activeIndex = swiper.activeIndex; 24232 var newActiveIndex = activeIndex + 1; 24233 var numberOfNewSlides = 1; 24234 if (Array.isArray(slides)) { 24235 for (var i = 0; i < slides.length; i += 1) { 24236 if (slides[i]) swiper.virtual.slides.unshift(slides[i]); 24237 } 24238 newActiveIndex = activeIndex + slides.length; 24239 numberOfNewSlides = slides.length; 24240 } else { 24241 swiper.virtual.slides.unshift(slides); 24242 } 24243 if (swiper.params.virtual.cache) { 24244 var cache = swiper.virtual.cache; 24245 var newCache = {}; 24246 Object.keys(cache).forEach(function (cachedIndex) { 24247 var $cachedEl = cache[cachedIndex]; 24248 var cachedElIndex = $cachedEl.attr('data-swiper-slide-index'); 24249 if (cachedElIndex) { 24250 $cachedEl.attr('data-swiper-slide-index', parseInt(cachedElIndex, 10) + 1); 24251 } 24252 newCache[parseInt(cachedIndex, 10) + numberOfNewSlides] = $cachedEl; 24253 }); 24254 swiper.virtual.cache = newCache; 24255 } 24256 swiper.virtual.update(true); 24257 swiper.slideTo(newActiveIndex, 0); 24258 }, 24259 removeSlide: function removeSlide(slidesIndexes) { 24260 var swiper = this; 24261 if (typeof slidesIndexes === 'undefined' || slidesIndexes === null) return; 24262 var activeIndex = swiper.activeIndex; 24263 if (Array.isArray(slidesIndexes)) { 24264 for (var i = slidesIndexes.length - 1; i >= 0; i -= 1) { 24265 swiper.virtual.slides.splice(slidesIndexes[i], 1); 24266 if (swiper.params.virtual.cache) { 24267 delete swiper.virtual.cache[slidesIndexes[i]]; 24268 } 24269 if (slidesIndexes[i] < activeIndex) activeIndex -= 1; 24270 activeIndex = Math.max(activeIndex, 0); 24271 } 24272 } else { 24273 swiper.virtual.slides.splice(slidesIndexes, 1); 24274 if (swiper.params.virtual.cache) { 24275 delete swiper.virtual.cache[slidesIndexes]; 24276 } 24277 if (slidesIndexes < activeIndex) activeIndex -= 1; 24278 activeIndex = Math.max(activeIndex, 0); 24279 } 24280 swiper.virtual.update(true); 24281 swiper.slideTo(activeIndex, 0); 24282 }, 24283 removeAllSlides: function removeAllSlides() { 24284 var swiper = this; 24285 swiper.virtual.slides = []; 24286 if (swiper.params.virtual.cache) { 24287 swiper.virtual.cache = {}; 24288 } 24289 swiper.virtual.update(true); 24290 swiper.slideTo(0, 0); 24291 } 24292}; 24293var Virtual$1 = { 24294 name: 'virtual', 24295 params: { 24296 virtual: { 24297 enabled: false, 24298 slides: [], 24299 cache: true, 24300 renderSlide: null, 24301 renderExternal: null, 24302 addSlidesBefore: 0, 24303 addSlidesAfter: 0 24304 } 24305 }, 24306 create: function create() { 24307 var swiper = this; 24308 Utils.extend(swiper, { 24309 virtual: { 24310 update: Virtual.update.bind(swiper), 24311 appendSlide: Virtual.appendSlide.bind(swiper), 24312 prependSlide: Virtual.prependSlide.bind(swiper), 24313 removeSlide: Virtual.removeSlide.bind(swiper), 24314 removeAllSlides: Virtual.removeAllSlides.bind(swiper), 24315 renderSlide: Virtual.renderSlide.bind(swiper), 24316 slides: swiper.params.virtual.slides, 24317 cache: {} 24318 } 24319 }); 24320 }, 24321 on: { 24322 beforeInit: function beforeInit() { 24323 var swiper = this; 24324 if (!swiper.params.virtual.enabled) return; 24325 swiper.classNames.push("".concat(swiper.params.containerModifierClass, "virtual")); 24326 var overwriteParams = { 24327 watchSlidesProgress: true 24328 }; 24329 Utils.extend(swiper.params, overwriteParams); 24330 Utils.extend(swiper.originalParams, overwriteParams); 24331 if (!swiper.params.initialSlide) { 24332 swiper.virtual.update(); 24333 } 24334 }, 24335 setTranslate: function setTranslate() { 24336 var swiper = this; 24337 if (!swiper.params.virtual.enabled) return; 24338 swiper.virtual.update(); 24339 } 24340 } 24341}; 24342var Keyboard = { 24343 handle: function handle(event) { 24344 var swiper = this; 24345 var rtl = swiper.rtlTranslate; 24346 var e = event; 24347 if (e.originalEvent) e = e.originalEvent; // jquery fix 24348 var kc = e.keyCode || e.charCode; 24349 var pageUpDown = swiper.params.keyboard.pageUpDown; 24350 var isPageUp = pageUpDown && kc === 33; 24351 var isPageDown = pageUpDown && kc === 34; 24352 var isArrowLeft = kc === 37; 24353 var isArrowRight = kc === 39; 24354 var isArrowUp = kc === 38; 24355 var isArrowDown = kc === 40; 24356 // Directions locks 24357 if (!swiper.allowSlideNext && (swiper.isHorizontal() && isArrowRight || swiper.isVertical() && isArrowDown || isPageDown)) { 24358 return false; 24359 } 24360 if (!swiper.allowSlidePrev && (swiper.isHorizontal() && isArrowLeft || swiper.isVertical() && isArrowUp || isPageUp)) { 24361 return false; 24362 } 24363 if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey) { 24364 return undefined; 24365 } 24366 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement && ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement.nodeName && (ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement.nodeName.toLowerCase() === 'input' || ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].activeElement.nodeName.toLowerCase() === 'textarea')) { 24367 return undefined; 24368 } 24369 if (swiper.params.keyboard.onlyInViewport && (isPageUp || isPageDown || isArrowLeft || isArrowRight || isArrowUp || isArrowDown)) { 24370 var inView = false; 24371 // Check that swiper should be inside of visible area of window 24372 if (swiper.$el.parents(".".concat(swiper.params.slideClass)).length > 0 && swiper.$el.parents(".".concat(swiper.params.slideActiveClass)).length === 0) { 24373 return undefined; 24374 } 24375 var windowWidth = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].innerWidth; 24376 var windowHeight = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].innerHeight; 24377 var swiperOffset = swiper.$el.offset(); 24378 if (rtl) swiperOffset.left -= swiper.$el[0].scrollLeft; 24379 var swiperCoord = [[swiperOffset.left, swiperOffset.top], [swiperOffset.left + swiper.width, swiperOffset.top], [swiperOffset.left, swiperOffset.top + swiper.height], [swiperOffset.left + swiper.width, swiperOffset.top + swiper.height]]; 24380 for (var i = 0; i < swiperCoord.length; i += 1) { 24381 var point = swiperCoord[i]; 24382 if (point[0] >= 0 && point[0] <= windowWidth && point[1] >= 0 && point[1] <= windowHeight) { 24383 inView = true; 24384 } 24385 } 24386 if (!inView) return undefined; 24387 } 24388 if (swiper.isHorizontal()) { 24389 if (isPageUp || isPageDown || isArrowLeft || isArrowRight) { 24390 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 24391 } 24392 if ((isPageDown || isArrowRight) && !rtl || (isPageUp || isArrowLeft) && rtl) swiper.slideNext(); 24393 if ((isPageUp || isArrowLeft) && !rtl || (isPageDown || isArrowRight) && rtl) swiper.slidePrev(); 24394 } else { 24395 if (isPageUp || isPageDown || isArrowUp || isArrowDown) { 24396 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 24397 } 24398 if (isPageDown || isArrowDown) swiper.slideNext(); 24399 if (isPageUp || isArrowUp) swiper.slidePrev(); 24400 } 24401 swiper.emit('keyPress', kc); 24402 return undefined; 24403 }, 24404 enable: function enable() { 24405 var swiper = this; 24406 if (swiper.keyboard.enabled) return; 24407 Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"]).on('keydown', swiper.keyboard.handle); 24408 swiper.keyboard.enabled = true; 24409 }, 24410 disable: function disable() { 24411 var swiper = this; 24412 if (!swiper.keyboard.enabled) return; 24413 Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"]).off('keydown', swiper.keyboard.handle); 24414 swiper.keyboard.enabled = false; 24415 } 24416}; 24417var Keyboard$1 = { 24418 name: 'keyboard', 24419 params: { 24420 keyboard: { 24421 enabled: false, 24422 onlyInViewport: true, 24423 pageUpDown: true 24424 } 24425 }, 24426 create: function create() { 24427 var swiper = this; 24428 Utils.extend(swiper, { 24429 keyboard: { 24430 enabled: false, 24431 enable: Keyboard.enable.bind(swiper), 24432 disable: Keyboard.disable.bind(swiper), 24433 handle: Keyboard.handle.bind(swiper) 24434 } 24435 }); 24436 }, 24437 on: { 24438 init: function init() { 24439 var swiper = this; 24440 if (swiper.params.keyboard.enabled) { 24441 swiper.keyboard.enable(); 24442 } 24443 }, 24444 destroy: function destroy() { 24445 var swiper = this; 24446 if (swiper.keyboard.enabled) { 24447 swiper.keyboard.disable(); 24448 } 24449 } 24450 } 24451}; 24452function isEventSupported() { 24453 var eventName = 'onwheel'; 24454 var isSupported = (eventName in ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"]); 24455 if (!isSupported) { 24456 var element = ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].createElement('div'); 24457 element.setAttribute(eventName, 'return;'); 24458 isSupported = typeof element[eventName] === 'function'; 24459 } 24460 if (!isSupported && ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].implementation && ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].implementation.hasFeature 24461 // always returns true in newer browsers as per the standard. 24462 // @see http://dom.spec.whatwg.org/#dom-domimplementation-hasfeature 24463 && ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].implementation.hasFeature('', '') !== true) { 24464 // This is the only way to test support for the `wheel` event in IE9+. 24465 isSupported = ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].implementation.hasFeature('Events.wheel', '3.0'); 24466 } 24467 return isSupported; 24468} 24469var Mousewheel = { 24470 lastScrollTime: Utils.now(), 24471 lastEventBeforeSnap: undefined, 24472 recentWheelEvents: [], 24473 event: function event() { 24474 if (ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].navigator.userAgent.indexOf('firefox') > -1) return 'DOMMouseScroll'; 24475 return isEventSupported() ? 'wheel' : 'mousewheel'; 24476 }, 24477 normalize: function normalize(e) { 24478 // Reasonable defaults 24479 var PIXEL_STEP = 10; 24480 var LINE_HEIGHT = 40; 24481 var PAGE_HEIGHT = 800; 24482 var sX = 0; 24483 var sY = 0; // spinX, spinY 24484 var pX = 0; 24485 var pY = 0; // pixelX, pixelY 24486 24487 // Legacy 24488 if ('detail' in e) { 24489 sY = e.detail; 24490 } 24491 if ('wheelDelta' in e) { 24492 sY = -e.wheelDelta / 120; 24493 } 24494 if ('wheelDeltaY' in e) { 24495 sY = -e.wheelDeltaY / 120; 24496 } 24497 if ('wheelDeltaX' in e) { 24498 sX = -e.wheelDeltaX / 120; 24499 } 24500 24501 // side scrolling on FF with DOMMouseScroll 24502 if ('axis' in e && e.axis === e.HORIZONTAL_AXIS) { 24503 sX = sY; 24504 sY = 0; 24505 } 24506 pX = sX * PIXEL_STEP; 24507 pY = sY * PIXEL_STEP; 24508 if ('deltaY' in e) { 24509 pY = e.deltaY; 24510 } 24511 if ('deltaX' in e) { 24512 pX = e.deltaX; 24513 } 24514 if (e.shiftKey && !pX) { 24515 // if user scrolls with shift he wants horizontal scroll 24516 pX = pY; 24517 pY = 0; 24518 } 24519 if ((pX || pY) && e.deltaMode) { 24520 if (e.deltaMode === 1) { 24521 // delta in LINE units 24522 pX *= LINE_HEIGHT; 24523 pY *= LINE_HEIGHT; 24524 } else { 24525 // delta in PAGE units 24526 pX *= PAGE_HEIGHT; 24527 pY *= PAGE_HEIGHT; 24528 } 24529 } 24530 24531 // Fall-back if spin cannot be determined 24532 if (pX && !sX) { 24533 sX = pX < 1 ? -1 : 1; 24534 } 24535 if (pY && !sY) { 24536 sY = pY < 1 ? -1 : 1; 24537 } 24538 return { 24539 spinX: sX, 24540 spinY: sY, 24541 pixelX: pX, 24542 pixelY: pY 24543 }; 24544 }, 24545 handleMouseEnter: function handleMouseEnter() { 24546 var swiper = this; 24547 swiper.mouseEntered = true; 24548 }, 24549 handleMouseLeave: function handleMouseLeave() { 24550 var swiper = this; 24551 swiper.mouseEntered = false; 24552 }, 24553 handle: function handle(event) { 24554 var e = event; 24555 var swiper = this; 24556 var params = swiper.params.mousewheel; 24557 if (swiper.params.cssMode) { 24558 e.preventDefault(); 24559 } 24560 var target = swiper.$el; 24561 if (swiper.params.mousewheel.eventsTarged !== 'container') { 24562 target = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(swiper.params.mousewheel.eventsTarged); 24563 } 24564 if (!swiper.mouseEntered && !target[0].contains(e.target) && !params.releaseOnEdges) return true; 24565 if (e.originalEvent) e = e.originalEvent; // jquery fix 24566 var delta = 0; 24567 var rtlFactor = swiper.rtlTranslate ? -1 : 1; 24568 var data = Mousewheel.normalize(e); 24569 if (params.forceToAxis) { 24570 if (swiper.isHorizontal()) { 24571 if (Math.abs(data.pixelX) > Math.abs(data.pixelY)) delta = -data.pixelX * rtlFactor;else return true; 24572 } else if (Math.abs(data.pixelY) > Math.abs(data.pixelX)) delta = -data.pixelY;else return true; 24573 } else { 24574 delta = Math.abs(data.pixelX) > Math.abs(data.pixelY) ? -data.pixelX * rtlFactor : -data.pixelY; 24575 } 24576 if (delta === 0) return true; 24577 if (params.invert) delta = -delta; 24578 if (!swiper.params.freeMode) { 24579 // Register the new event in a variable which stores the relevant data 24580 var newEvent = { 24581 time: Utils.now(), 24582 delta: Math.abs(delta), 24583 direction: Math.sign(delta), 24584 raw: event 24585 }; 24586 24587 // Keep the most recent events 24588 var recentWheelEvents = swiper.mousewheel.recentWheelEvents; 24589 if (recentWheelEvents.length >= 2) { 24590 recentWheelEvents.shift(); // only store the last N events 24591 } 24592 var prevEvent = recentWheelEvents.length ? recentWheelEvents[recentWheelEvents.length - 1] : undefined; 24593 recentWheelEvents.push(newEvent); 24594 24595 // If there is at least one previous recorded event: 24596 // If direction has changed or 24597 // if the scroll is quicker than the previous one: 24598 // Animate the slider. 24599 // Else (this is the first time the wheel is moved): 24600 // Animate the slider. 24601 if (prevEvent) { 24602 if (newEvent.direction !== prevEvent.direction || newEvent.delta > prevEvent.delta || newEvent.time > prevEvent.time + 150) { 24603 swiper.mousewheel.animateSlider(newEvent); 24604 } 24605 } else { 24606 swiper.mousewheel.animateSlider(newEvent); 24607 } 24608 24609 // If it's time to release the scroll: 24610 // Return now so you don't hit the preventDefault. 24611 if (swiper.mousewheel.releaseScroll(newEvent)) { 24612 return true; 24613 } 24614 } else { 24615 // Freemode or scrollContainer: 24616 24617 // If we recently snapped after a momentum scroll, then ignore wheel events 24618 // to give time for the deceleration to finish. Stop ignoring after 500 msecs 24619 // or if it's a new scroll (larger delta or inverse sign as last event before 24620 // an end-of-momentum snap). 24621 var _newEvent = { 24622 time: Utils.now(), 24623 delta: Math.abs(delta), 24624 direction: Math.sign(delta) 24625 }; 24626 var lastEventBeforeSnap = swiper.mousewheel.lastEventBeforeSnap; 24627 var ignoreWheelEvents = lastEventBeforeSnap && _newEvent.time < lastEventBeforeSnap.time + 500 && _newEvent.delta <= lastEventBeforeSnap.delta && _newEvent.direction === lastEventBeforeSnap.direction; 24628 if (!ignoreWheelEvents) { 24629 swiper.mousewheel.lastEventBeforeSnap = undefined; 24630 if (swiper.params.loop) { 24631 swiper.loopFix(); 24632 } 24633 var position = swiper.getTranslate() + delta * params.sensitivity; 24634 var wasBeginning = swiper.isBeginning; 24635 var wasEnd = swiper.isEnd; 24636 if (position >= swiper.minTranslate()) position = swiper.minTranslate(); 24637 if (position <= swiper.maxTranslate()) position = swiper.maxTranslate(); 24638 swiper.setTransition(0); 24639 swiper.setTranslate(position); 24640 swiper.updateProgress(); 24641 swiper.updateActiveIndex(); 24642 swiper.updateSlidesClasses(); 24643 if (!wasBeginning && swiper.isBeginning || !wasEnd && swiper.isEnd) { 24644 swiper.updateSlidesClasses(); 24645 } 24646 if (swiper.params.freeModeSticky) { 24647 // When wheel scrolling starts with sticky (aka snap) enabled, then detect 24648 // the end of a momentum scroll by storing recent (N=15?) wheel events. 24649 // 1. do all N events have decreasing or same (absolute value) delta? 24650 // 2. did all N events arrive in the last M (M=500?) msecs? 24651 // 3. does the earliest event have an (absolute value) delta that's 24652 // at least P (P=1?) larger than the most recent event's delta? 24653 // 4. does the latest event have a delta that's smaller than Q (Q=6?) pixels? 24654 // If 1-4 are "yes" then we're near the end of a momuntum scroll deceleration. 24655 // Snap immediately and ignore remaining wheel events in this scroll. 24656 // See comment above for "remaining wheel events in this scroll" determination. 24657 // If 1-4 aren't satisfied, then wait to snap until 500ms after the last event. 24658 clearTimeout(swiper.mousewheel.timeout); 24659 swiper.mousewheel.timeout = undefined; 24660 var _recentWheelEvents = swiper.mousewheel.recentWheelEvents; 24661 if (_recentWheelEvents.length >= 15) { 24662 _recentWheelEvents.shift(); // only store the last N events 24663 } 24664 var _prevEvent = _recentWheelEvents.length ? _recentWheelEvents[_recentWheelEvents.length - 1] : undefined; 24665 var firstEvent = _recentWheelEvents[0]; 24666 _recentWheelEvents.push(_newEvent); 24667 if (_prevEvent && (_newEvent.delta > _prevEvent.delta || _newEvent.direction !== _prevEvent.direction)) { 24668 // Increasing or reverse-sign delta means the user started scrolling again. Clear the wheel event log. 24669 _recentWheelEvents.splice(0); 24670 } else if (_recentWheelEvents.length >= 15 && _newEvent.time - firstEvent.time < 500 && firstEvent.delta - _newEvent.delta >= 1 && _newEvent.delta <= 6) { 24671 // We're at the end of the deceleration of a momentum scroll, so there's no need 24672 // to wait for more events. Snap ASAP on the next tick. 24673 // Also, because there's some remaining momentum we'll bias the snap in the 24674 // direction of the ongoing scroll because it's better UX for the scroll to snap 24675 // in the same direction as the scroll instead of reversing to snap. Therefore, 24676 // if it's already scrolled more than 20% in the current direction, keep going. 24677 var snapToThreshold = delta > 0 ? 0.8 : 0.2; 24678 swiper.mousewheel.lastEventBeforeSnap = _newEvent; 24679 _recentWheelEvents.splice(0); 24680 swiper.mousewheel.timeout = Utils.nextTick(function () { 24681 swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); 24682 }, 0); // no delay; move on next tick 24683 } 24684 if (!swiper.mousewheel.timeout) { 24685 // if we get here, then we haven't detected the end of a momentum scroll, so 24686 // we'll consider a scroll "complete" when there haven't been any wheel events 24687 // for 500ms. 24688 swiper.mousewheel.timeout = Utils.nextTick(function () { 24689 var snapToThreshold = 0.5; 24690 swiper.mousewheel.lastEventBeforeSnap = _newEvent; 24691 _recentWheelEvents.splice(0); 24692 swiper.slideToClosest(swiper.params.speed, true, undefined, snapToThreshold); 24693 }, 500); 24694 } 24695 } 24696 24697 // Emit event 24698 if (!ignoreWheelEvents) swiper.emit('scroll', e); 24699 24700 // Stop autoplay 24701 if (swiper.params.autoplay && swiper.params.autoplayDisableOnInteraction) swiper.autoplay.stop(); 24702 // Return page scroll on edge positions 24703 if (position === swiper.minTranslate() || position === swiper.maxTranslate()) return true; 24704 } 24705 } 24706 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 24707 return false; 24708 }, 24709 animateSlider: function animateSlider(newEvent) { 24710 var swiper = this; 24711 // If the movement is NOT big enough and 24712 // if the last time the user scrolled was too close to the current one (avoid continuously triggering the slider): 24713 // Don't go any further (avoid insignificant scroll movement). 24714 if (newEvent.delta >= 6 && Utils.now() - swiper.mousewheel.lastScrollTime < 60) { 24715 // Return false as a default 24716 return true; 24717 } 24718 // If user is scrolling towards the end: 24719 // If the slider hasn't hit the latest slide or 24720 // if the slider is a loop and 24721 // if the slider isn't moving right now: 24722 // Go to next slide and 24723 // emit a scroll event. 24724 // Else (the user is scrolling towards the beginning) and 24725 // if the slider hasn't hit the first slide or 24726 // if the slider is a loop and 24727 // if the slider isn't moving right now: 24728 // Go to prev slide and 24729 // emit a scroll event. 24730 if (newEvent.direction < 0) { 24731 if ((!swiper.isEnd || swiper.params.loop) && !swiper.animating) { 24732 swiper.slideNext(); 24733 swiper.emit('scroll', newEvent.raw); 24734 } 24735 } else if ((!swiper.isBeginning || swiper.params.loop) && !swiper.animating) { 24736 swiper.slidePrev(); 24737 swiper.emit('scroll', newEvent.raw); 24738 } 24739 // If you got here is because an animation has been triggered so store the current time 24740 swiper.mousewheel.lastScrollTime = new ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].Date().getTime(); 24741 // Return false as a default 24742 return false; 24743 }, 24744 releaseScroll: function releaseScroll(newEvent) { 24745 var swiper = this; 24746 var params = swiper.params.mousewheel; 24747 if (newEvent.direction < 0) { 24748 if (swiper.isEnd && !swiper.params.loop && params.releaseOnEdges) { 24749 // Return true to animate scroll on edges 24750 return true; 24751 } 24752 } else if (swiper.isBeginning && !swiper.params.loop && params.releaseOnEdges) { 24753 // Return true to animate scroll on edges 24754 return true; 24755 } 24756 return false; 24757 }, 24758 enable: function enable() { 24759 var swiper = this; 24760 var event = Mousewheel.event(); 24761 if (swiper.params.cssMode) { 24762 swiper.wrapperEl.removeEventListener(event, swiper.mousewheel.handle); 24763 return true; 24764 } 24765 if (!event) return false; 24766 if (swiper.mousewheel.enabled) return false; 24767 var target = swiper.$el; 24768 if (swiper.params.mousewheel.eventsTarged !== 'container') { 24769 target = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(swiper.params.mousewheel.eventsTarged); 24770 } 24771 target.on('mouseenter', swiper.mousewheel.handleMouseEnter); 24772 target.on('mouseleave', swiper.mousewheel.handleMouseLeave); 24773 target.on(event, swiper.mousewheel.handle); 24774 swiper.mousewheel.enabled = true; 24775 return true; 24776 }, 24777 disable: function disable() { 24778 var swiper = this; 24779 var event = Mousewheel.event(); 24780 if (swiper.params.cssMode) { 24781 swiper.wrapperEl.addEventListener(event, swiper.mousewheel.handle); 24782 return true; 24783 } 24784 if (!event) return false; 24785 if (!swiper.mousewheel.enabled) return false; 24786 var target = swiper.$el; 24787 if (swiper.params.mousewheel.eventsTarged !== 'container') { 24788 target = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(swiper.params.mousewheel.eventsTarged); 24789 } 24790 target.off(event, swiper.mousewheel.handle); 24791 swiper.mousewheel.enabled = false; 24792 return true; 24793 } 24794}; 24795var Mousewheel$1 = { 24796 name: 'mousewheel', 24797 params: { 24798 mousewheel: { 24799 enabled: false, 24800 releaseOnEdges: false, 24801 invert: false, 24802 forceToAxis: false, 24803 sensitivity: 1, 24804 eventsTarged: 'container' 24805 } 24806 }, 24807 create: function create() { 24808 var swiper = this; 24809 Utils.extend(swiper, { 24810 mousewheel: { 24811 enabled: false, 24812 enable: Mousewheel.enable.bind(swiper), 24813 disable: Mousewheel.disable.bind(swiper), 24814 handle: Mousewheel.handle.bind(swiper), 24815 handleMouseEnter: Mousewheel.handleMouseEnter.bind(swiper), 24816 handleMouseLeave: Mousewheel.handleMouseLeave.bind(swiper), 24817 animateSlider: Mousewheel.animateSlider.bind(swiper), 24818 releaseScroll: Mousewheel.releaseScroll.bind(swiper), 24819 lastScrollTime: Utils.now(), 24820 lastEventBeforeSnap: undefined, 24821 recentWheelEvents: [] 24822 } 24823 }); 24824 }, 24825 on: { 24826 init: function init() { 24827 var swiper = this; 24828 if (!swiper.params.mousewheel.enabled && swiper.params.cssMode) { 24829 swiper.mousewheel.disable(); 24830 } 24831 if (swiper.params.mousewheel.enabled) swiper.mousewheel.enable(); 24832 }, 24833 destroy: function destroy() { 24834 var swiper = this; 24835 if (swiper.params.cssMode) { 24836 swiper.mousewheel.enable(); 24837 } 24838 if (swiper.mousewheel.enabled) swiper.mousewheel.disable(); 24839 } 24840 } 24841}; 24842var Navigation = { 24843 update: function update() { 24844 // Update Navigation Buttons 24845 var swiper = this; 24846 var params = swiper.params.navigation; 24847 if (swiper.params.loop) return; 24848 var _swiper$navigation = swiper.navigation, 24849 $nextEl = _swiper$navigation.$nextEl, 24850 $prevEl = _swiper$navigation.$prevEl; 24851 if ($prevEl && $prevEl.length > 0) { 24852 if (swiper.isBeginning) { 24853 $prevEl.addClass(params.disabledClass); 24854 } else { 24855 $prevEl.removeClass(params.disabledClass); 24856 } 24857 $prevEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); 24858 } 24859 if ($nextEl && $nextEl.length > 0) { 24860 if (swiper.isEnd) { 24861 $nextEl.addClass(params.disabledClass); 24862 } else { 24863 $nextEl.removeClass(params.disabledClass); 24864 } 24865 $nextEl[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); 24866 } 24867 }, 24868 onPrevClick: function onPrevClick(e) { 24869 var swiper = this; 24870 e.preventDefault(); 24871 if (swiper.isBeginning && !swiper.params.loop) return; 24872 swiper.slidePrev(); 24873 }, 24874 onNextClick: function onNextClick(e) { 24875 var swiper = this; 24876 e.preventDefault(); 24877 if (swiper.isEnd && !swiper.params.loop) return; 24878 swiper.slideNext(); 24879 }, 24880 init: function init() { 24881 var swiper = this; 24882 var params = swiper.params.navigation; 24883 if (!(params.nextEl || params.prevEl)) return; 24884 var $nextEl; 24885 var $prevEl; 24886 if (params.nextEl) { 24887 $nextEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(params.nextEl); 24888 if (swiper.params.uniqueNavElements && typeof params.nextEl === 'string' && $nextEl.length > 1 && swiper.$el.find(params.nextEl).length === 1) { 24889 $nextEl = swiper.$el.find(params.nextEl); 24890 } 24891 } 24892 if (params.prevEl) { 24893 $prevEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(params.prevEl); 24894 if (swiper.params.uniqueNavElements && typeof params.prevEl === 'string' && $prevEl.length > 1 && swiper.$el.find(params.prevEl).length === 1) { 24895 $prevEl = swiper.$el.find(params.prevEl); 24896 } 24897 } 24898 if ($nextEl && $nextEl.length > 0) { 24899 $nextEl.on('click', swiper.navigation.onNextClick); 24900 } 24901 if ($prevEl && $prevEl.length > 0) { 24902 $prevEl.on('click', swiper.navigation.onPrevClick); 24903 } 24904 Utils.extend(swiper.navigation, { 24905 $nextEl: $nextEl, 24906 nextEl: $nextEl && $nextEl[0], 24907 $prevEl: $prevEl, 24908 prevEl: $prevEl && $prevEl[0] 24909 }); 24910 }, 24911 destroy: function destroy() { 24912 var swiper = this; 24913 var _swiper$navigation2 = swiper.navigation, 24914 $nextEl = _swiper$navigation2.$nextEl, 24915 $prevEl = _swiper$navigation2.$prevEl; 24916 if ($nextEl && $nextEl.length) { 24917 $nextEl.off('click', swiper.navigation.onNextClick); 24918 $nextEl.removeClass(swiper.params.navigation.disabledClass); 24919 } 24920 if ($prevEl && $prevEl.length) { 24921 $prevEl.off('click', swiper.navigation.onPrevClick); 24922 $prevEl.removeClass(swiper.params.navigation.disabledClass); 24923 } 24924 } 24925}; 24926var Navigation$1 = { 24927 name: 'navigation', 24928 params: { 24929 navigation: { 24930 nextEl: null, 24931 prevEl: null, 24932 hideOnClick: false, 24933 disabledClass: 'swiper-button-disabled', 24934 hiddenClass: 'swiper-button-hidden', 24935 lockClass: 'swiper-button-lock' 24936 } 24937 }, 24938 create: function create() { 24939 var swiper = this; 24940 Utils.extend(swiper, { 24941 navigation: { 24942 init: Navigation.init.bind(swiper), 24943 update: Navigation.update.bind(swiper), 24944 destroy: Navigation.destroy.bind(swiper), 24945 onNextClick: Navigation.onNextClick.bind(swiper), 24946 onPrevClick: Navigation.onPrevClick.bind(swiper) 24947 } 24948 }); 24949 }, 24950 on: { 24951 init: function init() { 24952 var swiper = this; 24953 swiper.navigation.init(); 24954 swiper.navigation.update(); 24955 }, 24956 toEdge: function toEdge() { 24957 var swiper = this; 24958 swiper.navigation.update(); 24959 }, 24960 fromEdge: function fromEdge() { 24961 var swiper = this; 24962 swiper.navigation.update(); 24963 }, 24964 destroy: function destroy() { 24965 var swiper = this; 24966 swiper.navigation.destroy(); 24967 }, 24968 click: function click(e) { 24969 var swiper = this; 24970 var _swiper$navigation3 = swiper.navigation, 24971 $nextEl = _swiper$navigation3.$nextEl, 24972 $prevEl = _swiper$navigation3.$prevEl; 24973 if (swiper.params.navigation.hideOnClick && !Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(e.target).is($prevEl) && !Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(e.target).is($nextEl)) { 24974 var isHidden; 24975 if ($nextEl) { 24976 isHidden = $nextEl.hasClass(swiper.params.navigation.hiddenClass); 24977 } else if ($prevEl) { 24978 isHidden = $prevEl.hasClass(swiper.params.navigation.hiddenClass); 24979 } 24980 if (isHidden === true) { 24981 swiper.emit('navigationShow', swiper); 24982 } else { 24983 swiper.emit('navigationHide', swiper); 24984 } 24985 if ($nextEl) { 24986 $nextEl.toggleClass(swiper.params.navigation.hiddenClass); 24987 } 24988 if ($prevEl) { 24989 $prevEl.toggleClass(swiper.params.navigation.hiddenClass); 24990 } 24991 } 24992 } 24993 } 24994}; 24995var Pagination = { 24996 update: function update() { 24997 // Render || Update Pagination bullets/items 24998 var swiper = this; 24999 var rtl = swiper.rtl; 25000 var params = swiper.params.pagination; 25001 if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return; 25002 var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; 25003 var $el = swiper.pagination.$el; 25004 // Current/Total 25005 var current; 25006 var total = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 25007 if (swiper.params.loop) { 25008 current = Math.ceil((swiper.activeIndex - swiper.loopedSlides) / swiper.params.slidesPerGroup); 25009 if (current > slidesLength - 1 - swiper.loopedSlides * 2) { 25010 current -= slidesLength - swiper.loopedSlides * 2; 25011 } 25012 if (current > total - 1) current -= total; 25013 if (current < 0 && swiper.params.paginationType !== 'bullets') current = total + current; 25014 } else if (typeof swiper.snapIndex !== 'undefined') { 25015 current = swiper.snapIndex; 25016 } else { 25017 current = swiper.activeIndex || 0; 25018 } 25019 // Types 25020 if (params.type === 'bullets' && swiper.pagination.bullets && swiper.pagination.bullets.length > 0) { 25021 var bullets = swiper.pagination.bullets; 25022 var firstIndex; 25023 var lastIndex; 25024 var midIndex; 25025 if (params.dynamicBullets) { 25026 swiper.pagination.bulletSize = bullets.eq(0)[swiper.isHorizontal() ? 'outerWidth' : 'outerHeight'](true); 25027 $el.css(swiper.isHorizontal() ? 'width' : 'height', "".concat(swiper.pagination.bulletSize * (params.dynamicMainBullets + 4), "px")); 25028 if (params.dynamicMainBullets > 1 && swiper.previousIndex !== undefined) { 25029 swiper.pagination.dynamicBulletIndex += current - swiper.previousIndex; 25030 if (swiper.pagination.dynamicBulletIndex > params.dynamicMainBullets - 1) { 25031 swiper.pagination.dynamicBulletIndex = params.dynamicMainBullets - 1; 25032 } else if (swiper.pagination.dynamicBulletIndex < 0) { 25033 swiper.pagination.dynamicBulletIndex = 0; 25034 } 25035 } 25036 firstIndex = current - swiper.pagination.dynamicBulletIndex; 25037 lastIndex = firstIndex + (Math.min(bullets.length, params.dynamicMainBullets) - 1); 25038 midIndex = (lastIndex + firstIndex) / 2; 25039 } 25040 bullets.removeClass("".concat(params.bulletActiveClass, " ").concat(params.bulletActiveClass, "-next ").concat(params.bulletActiveClass, "-next-next ").concat(params.bulletActiveClass, "-prev ").concat(params.bulletActiveClass, "-prev-prev ").concat(params.bulletActiveClass, "-main")); 25041 if ($el.length > 1) { 25042 bullets.each(function (index, bullet) { 25043 var $bullet = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(bullet); 25044 var bulletIndex = $bullet.index(); 25045 if (bulletIndex === current) { 25046 $bullet.addClass(params.bulletActiveClass); 25047 } 25048 if (params.dynamicBullets) { 25049 if (bulletIndex >= firstIndex && bulletIndex <= lastIndex) { 25050 $bullet.addClass("".concat(params.bulletActiveClass, "-main")); 25051 } 25052 if (bulletIndex === firstIndex) { 25053 $bullet.prev().addClass("".concat(params.bulletActiveClass, "-prev")).prev().addClass("".concat(params.bulletActiveClass, "-prev-prev")); 25054 } 25055 if (bulletIndex === lastIndex) { 25056 $bullet.next().addClass("".concat(params.bulletActiveClass, "-next")).next().addClass("".concat(params.bulletActiveClass, "-next-next")); 25057 } 25058 } 25059 }); 25060 } else { 25061 var $bullet = bullets.eq(current); 25062 var bulletIndex = $bullet.index(); 25063 $bullet.addClass(params.bulletActiveClass); 25064 if (params.dynamicBullets) { 25065 var $firstDisplayedBullet = bullets.eq(firstIndex); 25066 var $lastDisplayedBullet = bullets.eq(lastIndex); 25067 for (var i = firstIndex; i <= lastIndex; i += 1) { 25068 bullets.eq(i).addClass("".concat(params.bulletActiveClass, "-main")); 25069 } 25070 if (swiper.params.loop) { 25071 if (bulletIndex >= bullets.length - params.dynamicMainBullets) { 25072 for (var _i10 = params.dynamicMainBullets; _i10 >= 0; _i10 -= 1) { 25073 bullets.eq(bullets.length - _i10).addClass("".concat(params.bulletActiveClass, "-main")); 25074 } 25075 bullets.eq(bullets.length - params.dynamicMainBullets - 1).addClass("".concat(params.bulletActiveClass, "-prev")); 25076 } else { 25077 $firstDisplayedBullet.prev().addClass("".concat(params.bulletActiveClass, "-prev")).prev().addClass("".concat(params.bulletActiveClass, "-prev-prev")); 25078 $lastDisplayedBullet.next().addClass("".concat(params.bulletActiveClass, "-next")).next().addClass("".concat(params.bulletActiveClass, "-next-next")); 25079 } 25080 } else { 25081 $firstDisplayedBullet.prev().addClass("".concat(params.bulletActiveClass, "-prev")).prev().addClass("".concat(params.bulletActiveClass, "-prev-prev")); 25082 $lastDisplayedBullet.next().addClass("".concat(params.bulletActiveClass, "-next")).next().addClass("".concat(params.bulletActiveClass, "-next-next")); 25083 } 25084 } 25085 } 25086 if (params.dynamicBullets) { 25087 var dynamicBulletsLength = Math.min(bullets.length, params.dynamicMainBullets + 4); 25088 var bulletsOffset = (swiper.pagination.bulletSize * dynamicBulletsLength - swiper.pagination.bulletSize) / 2 - midIndex * swiper.pagination.bulletSize; 25089 var offsetProp = rtl ? 'right' : 'left'; 25090 bullets.css(swiper.isHorizontal() ? offsetProp : 'top', "".concat(bulletsOffset, "px")); 25091 } 25092 } 25093 if (params.type === 'fraction') { 25094 $el.find(".".concat(params.currentClass)).text(params.formatFractionCurrent(current + 1)); 25095 $el.find(".".concat(params.totalClass)).text(params.formatFractionTotal(total)); 25096 } 25097 if (params.type === 'progressbar') { 25098 var progressbarDirection; 25099 if (params.progressbarOpposite) { 25100 progressbarDirection = swiper.isHorizontal() ? 'vertical' : 'horizontal'; 25101 } else { 25102 progressbarDirection = swiper.isHorizontal() ? 'horizontal' : 'vertical'; 25103 } 25104 var scale = (current + 1) / total; 25105 var scaleX = 1; 25106 var scaleY = 1; 25107 if (progressbarDirection === 'horizontal') { 25108 scaleX = scale; 25109 } else { 25110 scaleY = scale; 25111 } 25112 $el.find(".".concat(params.progressbarFillClass)).transform("translate3d(0,0,0) scaleX(".concat(scaleX, ") scaleY(").concat(scaleY, ")")).transition(swiper.params.speed); 25113 } 25114 if (params.type === 'custom' && params.renderCustom) { 25115 $el.html(params.renderCustom(swiper, current + 1, total)); 25116 swiper.emit('paginationRender', swiper, $el[0]); 25117 } else { 25118 swiper.emit('paginationUpdate', swiper, $el[0]); 25119 } 25120 $el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](params.lockClass); 25121 }, 25122 render: function render() { 25123 // Render Container 25124 var swiper = this; 25125 var params = swiper.params.pagination; 25126 if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return; 25127 var slidesLength = swiper.virtual && swiper.params.virtual.enabled ? swiper.virtual.slides.length : swiper.slides.length; 25128 var $el = swiper.pagination.$el; 25129 var paginationHTML = ''; 25130 if (params.type === 'bullets') { 25131 var numberOfBullets = swiper.params.loop ? Math.ceil((slidesLength - swiper.loopedSlides * 2) / swiper.params.slidesPerGroup) : swiper.snapGrid.length; 25132 for (var i = 0; i < numberOfBullets; i += 1) { 25133 if (params.renderBullet) { 25134 paginationHTML += params.renderBullet.call(swiper, i, params.bulletClass); 25135 } else { 25136 paginationHTML += "<".concat(params.bulletElement, " class=\"").concat(params.bulletClass, "\"></").concat(params.bulletElement, ">"); 25137 } 25138 } 25139 $el.html(paginationHTML); 25140 swiper.pagination.bullets = $el.find(".".concat(params.bulletClass)); 25141 } 25142 if (params.type === 'fraction') { 25143 if (params.renderFraction) { 25144 paginationHTML = params.renderFraction.call(swiper, params.currentClass, params.totalClass); 25145 } else { 25146 paginationHTML = "<span class=\"".concat(params.currentClass, "\"></span>") + ' / ' + "<span class=\"".concat(params.totalClass, "\"></span>"); 25147 } 25148 $el.html(paginationHTML); 25149 } 25150 if (params.type === 'progressbar') { 25151 if (params.renderProgressbar) { 25152 paginationHTML = params.renderProgressbar.call(swiper, params.progressbarFillClass); 25153 } else { 25154 paginationHTML = "<span class=\"".concat(params.progressbarFillClass, "\"></span>"); 25155 } 25156 $el.html(paginationHTML); 25157 } 25158 if (params.type !== 'custom') { 25159 swiper.emit('paginationRender', swiper.pagination.$el[0]); 25160 } 25161 }, 25162 init: function init() { 25163 var swiper = this; 25164 var params = swiper.params.pagination; 25165 if (!params.el) return; 25166 var $el = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(params.el); 25167 if ($el.length === 0) return; 25168 if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1) { 25169 $el = swiper.$el.find(params.el); 25170 } 25171 if (params.type === 'bullets' && params.clickable) { 25172 $el.addClass(params.clickableClass); 25173 } 25174 $el.addClass(params.modifierClass + params.type); 25175 if (params.type === 'bullets' && params.dynamicBullets) { 25176 $el.addClass("".concat(params.modifierClass).concat(params.type, "-dynamic")); 25177 swiper.pagination.dynamicBulletIndex = 0; 25178 if (params.dynamicMainBullets < 1) { 25179 params.dynamicMainBullets = 1; 25180 } 25181 } 25182 if (params.type === 'progressbar' && params.progressbarOpposite) { 25183 $el.addClass(params.progressbarOppositeClass); 25184 } 25185 if (params.clickable) { 25186 $el.on('click', ".".concat(params.bulletClass), function onClick(e) { 25187 e.preventDefault(); 25188 var index = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(this).index() * swiper.params.slidesPerGroup; 25189 if (swiper.params.loop) index += swiper.loopedSlides; 25190 swiper.slideTo(index); 25191 }); 25192 } 25193 Utils.extend(swiper.pagination, { 25194 $el: $el, 25195 el: $el[0] 25196 }); 25197 }, 25198 destroy: function destroy() { 25199 var swiper = this; 25200 var params = swiper.params.pagination; 25201 if (!params.el || !swiper.pagination.el || !swiper.pagination.$el || swiper.pagination.$el.length === 0) return; 25202 var $el = swiper.pagination.$el; 25203 $el.removeClass(params.hiddenClass); 25204 $el.removeClass(params.modifierClass + params.type); 25205 if (swiper.pagination.bullets) swiper.pagination.bullets.removeClass(params.bulletActiveClass); 25206 if (params.clickable) { 25207 $el.off('click', ".".concat(params.bulletClass)); 25208 } 25209 } 25210}; 25211var Pagination$1 = { 25212 name: 'pagination', 25213 params: { 25214 pagination: { 25215 el: null, 25216 bulletElement: 'span', 25217 clickable: false, 25218 hideOnClick: false, 25219 renderBullet: null, 25220 renderProgressbar: null, 25221 renderFraction: null, 25222 renderCustom: null, 25223 progressbarOpposite: false, 25224 type: 'bullets', 25225 // 'bullets' or 'progressbar' or 'fraction' or 'custom' 25226 dynamicBullets: false, 25227 dynamicMainBullets: 1, 25228 formatFractionCurrent: function formatFractionCurrent(number) { 25229 return number; 25230 }, 25231 formatFractionTotal: function formatFractionTotal(number) { 25232 return number; 25233 }, 25234 bulletClass: 'swiper-pagination-bullet', 25235 bulletActiveClass: 'swiper-pagination-bullet-active', 25236 modifierClass: 'swiper-pagination-', 25237 // NEW 25238 currentClass: 'swiper-pagination-current', 25239 totalClass: 'swiper-pagination-total', 25240 hiddenClass: 'swiper-pagination-hidden', 25241 progressbarFillClass: 'swiper-pagination-progressbar-fill', 25242 progressbarOppositeClass: 'swiper-pagination-progressbar-opposite', 25243 clickableClass: 'swiper-pagination-clickable', 25244 // NEW 25245 lockClass: 'swiper-pagination-lock' 25246 } 25247 }, 25248 create: function create() { 25249 var swiper = this; 25250 Utils.extend(swiper, { 25251 pagination: { 25252 init: Pagination.init.bind(swiper), 25253 render: Pagination.render.bind(swiper), 25254 update: Pagination.update.bind(swiper), 25255 destroy: Pagination.destroy.bind(swiper), 25256 dynamicBulletIndex: 0 25257 } 25258 }); 25259 }, 25260 on: { 25261 init: function init() { 25262 var swiper = this; 25263 swiper.pagination.init(); 25264 swiper.pagination.render(); 25265 swiper.pagination.update(); 25266 }, 25267 activeIndexChange: function activeIndexChange() { 25268 var swiper = this; 25269 if (swiper.params.loop) { 25270 swiper.pagination.update(); 25271 } else if (typeof swiper.snapIndex === 'undefined') { 25272 swiper.pagination.update(); 25273 } 25274 }, 25275 snapIndexChange: function snapIndexChange() { 25276 var swiper = this; 25277 if (!swiper.params.loop) { 25278 swiper.pagination.update(); 25279 } 25280 }, 25281 slidesLengthChange: function slidesLengthChange() { 25282 var swiper = this; 25283 if (swiper.params.loop) { 25284 swiper.pagination.render(); 25285 swiper.pagination.update(); 25286 } 25287 }, 25288 snapGridLengthChange: function snapGridLengthChange() { 25289 var swiper = this; 25290 if (!swiper.params.loop) { 25291 swiper.pagination.render(); 25292 swiper.pagination.update(); 25293 } 25294 }, 25295 destroy: function destroy() { 25296 var swiper = this; 25297 swiper.pagination.destroy(); 25298 }, 25299 click: function click(e) { 25300 var swiper = this; 25301 if (swiper.params.pagination.el && swiper.params.pagination.hideOnClick && swiper.pagination.$el.length > 0 && !Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(e.target).hasClass(swiper.params.pagination.bulletClass)) { 25302 var isHidden = swiper.pagination.$el.hasClass(swiper.params.pagination.hiddenClass); 25303 if (isHidden === true) { 25304 swiper.emit('paginationShow', swiper); 25305 } else { 25306 swiper.emit('paginationHide', swiper); 25307 } 25308 swiper.pagination.$el.toggleClass(swiper.params.pagination.hiddenClass); 25309 } 25310 } 25311 } 25312}; 25313var Scrollbar = { 25314 setTranslate: function setTranslate() { 25315 var swiper = this; 25316 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 25317 var scrollbar = swiper.scrollbar, 25318 rtl = swiper.rtlTranslate, 25319 progress = swiper.progress; 25320 var dragSize = scrollbar.dragSize, 25321 trackSize = scrollbar.trackSize, 25322 $dragEl = scrollbar.$dragEl, 25323 $el = scrollbar.$el; 25324 var params = swiper.params.scrollbar; 25325 var newSize = dragSize; 25326 var newPos = (trackSize - dragSize) * progress; 25327 if (rtl) { 25328 newPos = -newPos; 25329 if (newPos > 0) { 25330 newSize = dragSize - newPos; 25331 newPos = 0; 25332 } else if (-newPos + dragSize > trackSize) { 25333 newSize = trackSize + newPos; 25334 } 25335 } else if (newPos < 0) { 25336 newSize = dragSize + newPos; 25337 newPos = 0; 25338 } else if (newPos + dragSize > trackSize) { 25339 newSize = trackSize - newPos; 25340 } 25341 if (swiper.isHorizontal()) { 25342 $dragEl.transform("translate3d(".concat(newPos, "px, 0, 0)")); 25343 $dragEl[0].style.width = "".concat(newSize, "px"); 25344 } else { 25345 $dragEl.transform("translate3d(0px, ".concat(newPos, "px, 0)")); 25346 $dragEl[0].style.height = "".concat(newSize, "px"); 25347 } 25348 if (params.hide) { 25349 clearTimeout(swiper.scrollbar.timeout); 25350 $el[0].style.opacity = 1; 25351 swiper.scrollbar.timeout = setTimeout(function () { 25352 $el[0].style.opacity = 0; 25353 $el.transition(400); 25354 }, 1000); 25355 } 25356 }, 25357 setTransition: function setTransition(duration) { 25358 var swiper = this; 25359 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 25360 swiper.scrollbar.$dragEl.transition(duration); 25361 }, 25362 updateSize: function updateSize() { 25363 var swiper = this; 25364 if (!swiper.params.scrollbar.el || !swiper.scrollbar.el) return; 25365 var scrollbar = swiper.scrollbar; 25366 var $dragEl = scrollbar.$dragEl, 25367 $el = scrollbar.$el; 25368 $dragEl[0].style.width = ''; 25369 $dragEl[0].style.height = ''; 25370 var trackSize = swiper.isHorizontal() ? $el[0].offsetWidth : $el[0].offsetHeight; 25371 var divider = swiper.size / swiper.virtualSize; 25372 var moveDivider = divider * (trackSize / swiper.size); 25373 var dragSize; 25374 if (swiper.params.scrollbar.dragSize === 'auto') { 25375 dragSize = trackSize * divider; 25376 } else { 25377 dragSize = parseInt(swiper.params.scrollbar.dragSize, 10); 25378 } 25379 if (swiper.isHorizontal()) { 25380 $dragEl[0].style.width = "".concat(dragSize, "px"); 25381 } else { 25382 $dragEl[0].style.height = "".concat(dragSize, "px"); 25383 } 25384 if (divider >= 1) { 25385 $el[0].style.display = 'none'; 25386 } else { 25387 $el[0].style.display = ''; 25388 } 25389 if (swiper.params.scrollbar.hide) { 25390 $el[0].style.opacity = 0; 25391 } 25392 Utils.extend(scrollbar, { 25393 trackSize: trackSize, 25394 divider: divider, 25395 moveDivider: moveDivider, 25396 dragSize: dragSize 25397 }); 25398 scrollbar.$el[swiper.params.watchOverflow && swiper.isLocked ? 'addClass' : 'removeClass'](swiper.params.scrollbar.lockClass); 25399 }, 25400 getPointerPosition: function getPointerPosition(e) { 25401 var swiper = this; 25402 if (swiper.isHorizontal()) { 25403 return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientX : e.clientX; 25404 } 25405 return e.type === 'touchstart' || e.type === 'touchmove' ? e.targetTouches[0].clientY : e.clientY; 25406 }, 25407 setDragPosition: function setDragPosition(e) { 25408 var swiper = this; 25409 var scrollbar = swiper.scrollbar, 25410 rtl = swiper.rtlTranslate; 25411 var $el = scrollbar.$el, 25412 dragSize = scrollbar.dragSize, 25413 trackSize = scrollbar.trackSize, 25414 dragStartPos = scrollbar.dragStartPos; 25415 var positionRatio; 25416 positionRatio = (scrollbar.getPointerPosition(e) - $el.offset()[swiper.isHorizontal() ? 'left' : 'top'] - (dragStartPos !== null ? dragStartPos : dragSize / 2)) / (trackSize - dragSize); 25417 positionRatio = Math.max(Math.min(positionRatio, 1), 0); 25418 if (rtl) { 25419 positionRatio = 1 - positionRatio; 25420 } 25421 var position = swiper.minTranslate() + (swiper.maxTranslate() - swiper.minTranslate()) * positionRatio; 25422 swiper.updateProgress(position); 25423 swiper.setTranslate(position); 25424 swiper.updateActiveIndex(); 25425 swiper.updateSlidesClasses(); 25426 }, 25427 onDragStart: function onDragStart(e) { 25428 var swiper = this; 25429 var params = swiper.params.scrollbar; 25430 var scrollbar = swiper.scrollbar, 25431 $wrapperEl = swiper.$wrapperEl; 25432 var $el = scrollbar.$el, 25433 $dragEl = scrollbar.$dragEl; 25434 swiper.scrollbar.isTouched = true; 25435 swiper.scrollbar.dragStartPos = e.target === $dragEl[0] || e.target === $dragEl ? scrollbar.getPointerPosition(e) - e.target.getBoundingClientRect()[swiper.isHorizontal() ? 'left' : 'top'] : null; 25436 e.preventDefault(); 25437 e.stopPropagation(); 25438 $wrapperEl.transition(100); 25439 $dragEl.transition(100); 25440 scrollbar.setDragPosition(e); 25441 clearTimeout(swiper.scrollbar.dragTimeout); 25442 $el.transition(0); 25443 if (params.hide) { 25444 $el.css('opacity', 1); 25445 } 25446 if (swiper.params.cssMode) { 25447 swiper.$wrapperEl.css('scroll-snap-type', 'none'); 25448 } 25449 swiper.emit('scrollbarDragStart', e); 25450 }, 25451 onDragMove: function onDragMove(e) { 25452 var swiper = this; 25453 var scrollbar = swiper.scrollbar, 25454 $wrapperEl = swiper.$wrapperEl; 25455 var $el = scrollbar.$el, 25456 $dragEl = scrollbar.$dragEl; 25457 if (!swiper.scrollbar.isTouched) return; 25458 if (e.preventDefault) e.preventDefault();else e.returnValue = false; 25459 scrollbar.setDragPosition(e); 25460 $wrapperEl.transition(0); 25461 $el.transition(0); 25462 $dragEl.transition(0); 25463 swiper.emit('scrollbarDragMove', e); 25464 }, 25465 onDragEnd: function onDragEnd(e) { 25466 var swiper = this; 25467 var params = swiper.params.scrollbar; 25468 var scrollbar = swiper.scrollbar, 25469 $wrapperEl = swiper.$wrapperEl; 25470 var $el = scrollbar.$el; 25471 if (!swiper.scrollbar.isTouched) return; 25472 swiper.scrollbar.isTouched = false; 25473 if (swiper.params.cssMode) { 25474 swiper.$wrapperEl.css('scroll-snap-type', ''); 25475 $wrapperEl.transition(''); 25476 } 25477 if (params.hide) { 25478 clearTimeout(swiper.scrollbar.dragTimeout); 25479 swiper.scrollbar.dragTimeout = Utils.nextTick(function () { 25480 $el.css('opacity', 0); 25481 $el.transition(400); 25482 }, 1000); 25483 } 25484 swiper.emit('scrollbarDragEnd', e); 25485 if (params.snapOnRelease) { 25486 swiper.slideToClosest(); 25487 } 25488 }, 25489 enableDraggable: function enableDraggable() { 25490 var swiper = this; 25491 if (!swiper.params.scrollbar.el) return; 25492 var scrollbar = swiper.scrollbar, 25493 touchEventsTouch = swiper.touchEventsTouch, 25494 touchEventsDesktop = swiper.touchEventsDesktop, 25495 params = swiper.params; 25496 var $el = scrollbar.$el; 25497 var target = $el[0]; 25498 var activeListener = Support.passiveListener && params.passiveListeners ? { 25499 passive: false, 25500 capture: false 25501 } : false; 25502 var passiveListener = Support.passiveListener && params.passiveListeners ? { 25503 passive: true, 25504 capture: false 25505 } : false; 25506 if (!Support.touch) { 25507 target.addEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); 25508 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].addEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); 25509 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].addEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); 25510 } else { 25511 target.addEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener); 25512 target.addEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener); 25513 target.addEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener); 25514 } 25515 }, 25516 disableDraggable: function disableDraggable() { 25517 var swiper = this; 25518 if (!swiper.params.scrollbar.el) return; 25519 var scrollbar = swiper.scrollbar, 25520 touchEventsTouch = swiper.touchEventsTouch, 25521 touchEventsDesktop = swiper.touchEventsDesktop, 25522 params = swiper.params; 25523 var $el = scrollbar.$el; 25524 var target = $el[0]; 25525 var activeListener = Support.passiveListener && params.passiveListeners ? { 25526 passive: false, 25527 capture: false 25528 } : false; 25529 var passiveListener = Support.passiveListener && params.passiveListeners ? { 25530 passive: true, 25531 capture: false 25532 } : false; 25533 if (!Support.touch) { 25534 target.removeEventListener(touchEventsDesktop.start, swiper.scrollbar.onDragStart, activeListener); 25535 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].removeEventListener(touchEventsDesktop.move, swiper.scrollbar.onDragMove, activeListener); 25536 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].removeEventListener(touchEventsDesktop.end, swiper.scrollbar.onDragEnd, passiveListener); 25537 } else { 25538 target.removeEventListener(touchEventsTouch.start, swiper.scrollbar.onDragStart, activeListener); 25539 target.removeEventListener(touchEventsTouch.move, swiper.scrollbar.onDragMove, activeListener); 25540 target.removeEventListener(touchEventsTouch.end, swiper.scrollbar.onDragEnd, passiveListener); 25541 } 25542 }, 25543 init: function init() { 25544 var swiper = this; 25545 if (!swiper.params.scrollbar.el) return; 25546 var scrollbar = swiper.scrollbar, 25547 $swiperEl = swiper.$el; 25548 var params = swiper.params.scrollbar; 25549 var $el = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(params.el); 25550 if (swiper.params.uniqueNavElements && typeof params.el === 'string' && $el.length > 1 && $swiperEl.find(params.el).length === 1) { 25551 $el = $swiperEl.find(params.el); 25552 } 25553 var $dragEl = $el.find(".".concat(swiper.params.scrollbar.dragClass)); 25554 if ($dragEl.length === 0) { 25555 $dragEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])("<div class=\"".concat(swiper.params.scrollbar.dragClass, "\"></div>")); 25556 $el.append($dragEl); 25557 } 25558 Utils.extend(scrollbar, { 25559 $el: $el, 25560 el: $el[0], 25561 $dragEl: $dragEl, 25562 dragEl: $dragEl[0] 25563 }); 25564 if (params.draggable) { 25565 scrollbar.enableDraggable(); 25566 } 25567 }, 25568 destroy: function destroy() { 25569 var swiper = this; 25570 swiper.scrollbar.disableDraggable(); 25571 } 25572}; 25573var Scrollbar$1 = { 25574 name: 'scrollbar', 25575 params: { 25576 scrollbar: { 25577 el: null, 25578 dragSize: 'auto', 25579 hide: false, 25580 draggable: false, 25581 snapOnRelease: true, 25582 lockClass: 'swiper-scrollbar-lock', 25583 dragClass: 'swiper-scrollbar-drag' 25584 } 25585 }, 25586 create: function create() { 25587 var swiper = this; 25588 Utils.extend(swiper, { 25589 scrollbar: { 25590 init: Scrollbar.init.bind(swiper), 25591 destroy: Scrollbar.destroy.bind(swiper), 25592 updateSize: Scrollbar.updateSize.bind(swiper), 25593 setTranslate: Scrollbar.setTranslate.bind(swiper), 25594 setTransition: Scrollbar.setTransition.bind(swiper), 25595 enableDraggable: Scrollbar.enableDraggable.bind(swiper), 25596 disableDraggable: Scrollbar.disableDraggable.bind(swiper), 25597 setDragPosition: Scrollbar.setDragPosition.bind(swiper), 25598 getPointerPosition: Scrollbar.getPointerPosition.bind(swiper), 25599 onDragStart: Scrollbar.onDragStart.bind(swiper), 25600 onDragMove: Scrollbar.onDragMove.bind(swiper), 25601 onDragEnd: Scrollbar.onDragEnd.bind(swiper), 25602 isTouched: false, 25603 timeout: null, 25604 dragTimeout: null 25605 } 25606 }); 25607 }, 25608 on: { 25609 init: function init() { 25610 var swiper = this; 25611 swiper.scrollbar.init(); 25612 swiper.scrollbar.updateSize(); 25613 swiper.scrollbar.setTranslate(); 25614 }, 25615 update: function update() { 25616 var swiper = this; 25617 swiper.scrollbar.updateSize(); 25618 }, 25619 resize: function resize() { 25620 var swiper = this; 25621 swiper.scrollbar.updateSize(); 25622 }, 25623 observerUpdate: function observerUpdate() { 25624 var swiper = this; 25625 swiper.scrollbar.updateSize(); 25626 }, 25627 setTranslate: function setTranslate() { 25628 var swiper = this; 25629 swiper.scrollbar.setTranslate(); 25630 }, 25631 setTransition: function setTransition(duration) { 25632 var swiper = this; 25633 swiper.scrollbar.setTransition(duration); 25634 }, 25635 destroy: function destroy() { 25636 var swiper = this; 25637 swiper.scrollbar.destroy(); 25638 } 25639 } 25640}; 25641var Parallax = { 25642 setTransform: function setTransform(el, progress) { 25643 var swiper = this; 25644 var rtl = swiper.rtl; 25645 var $el = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(el); 25646 var rtlFactor = rtl ? -1 : 1; 25647 var p = $el.attr('data-swiper-parallax') || '0'; 25648 var x = $el.attr('data-swiper-parallax-x'); 25649 var y = $el.attr('data-swiper-parallax-y'); 25650 var scale = $el.attr('data-swiper-parallax-scale'); 25651 var opacity = $el.attr('data-swiper-parallax-opacity'); 25652 if (x || y) { 25653 x = x || '0'; 25654 y = y || '0'; 25655 } else if (swiper.isHorizontal()) { 25656 x = p; 25657 y = '0'; 25658 } else { 25659 y = p; 25660 x = '0'; 25661 } 25662 if (x.indexOf('%') >= 0) { 25663 x = "".concat(parseInt(x, 10) * progress * rtlFactor, "%"); 25664 } else { 25665 x = "".concat(x * progress * rtlFactor, "px"); 25666 } 25667 if (y.indexOf('%') >= 0) { 25668 y = "".concat(parseInt(y, 10) * progress, "%"); 25669 } else { 25670 y = "".concat(y * progress, "px"); 25671 } 25672 if (typeof opacity !== 'undefined' && opacity !== null) { 25673 var currentOpacity = opacity - (opacity - 1) * (1 - Math.abs(progress)); 25674 $el[0].style.opacity = currentOpacity; 25675 } 25676 if (typeof scale === 'undefined' || scale === null) { 25677 $el.transform("translate3d(".concat(x, ", ").concat(y, ", 0px)")); 25678 } else { 25679 var currentScale = scale - (scale - 1) * (1 - Math.abs(progress)); 25680 $el.transform("translate3d(".concat(x, ", ").concat(y, ", 0px) scale(").concat(currentScale, ")")); 25681 } 25682 }, 25683 setTranslate: function setTranslate() { 25684 var swiper = this; 25685 var $el = swiper.$el, 25686 slides = swiper.slides, 25687 progress = swiper.progress, 25688 snapGrid = swiper.snapGrid; 25689 $el.children('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(function (index, el) { 25690 swiper.parallax.setTransform(el, progress); 25691 }); 25692 slides.each(function (slideIndex, slideEl) { 25693 var slideProgress = slideEl.progress; 25694 if (swiper.params.slidesPerGroup > 1 && swiper.params.slidesPerView !== 'auto') { 25695 slideProgress += Math.ceil(slideIndex / 2) - progress * (snapGrid.length - 1); 25696 } 25697 slideProgress = Math.min(Math.max(slideProgress, -1), 1); 25698 Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(slideEl).find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(function (index, el) { 25699 swiper.parallax.setTransform(el, slideProgress); 25700 }); 25701 }); 25702 }, 25703 setTransition: function setTransition() { 25704 var duration = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.params.speed; 25705 var swiper = this; 25706 var $el = swiper.$el; 25707 $el.find('[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]').each(function (index, parallaxEl) { 25708 var $parallaxEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(parallaxEl); 25709 var parallaxDuration = parseInt($parallaxEl.attr('data-swiper-parallax-duration'), 10) || duration; 25710 if (duration === 0) parallaxDuration = 0; 25711 $parallaxEl.transition(parallaxDuration); 25712 }); 25713 } 25714}; 25715var Parallax$1 = { 25716 name: 'parallax', 25717 params: { 25718 parallax: { 25719 enabled: false 25720 } 25721 }, 25722 create: function create() { 25723 var swiper = this; 25724 Utils.extend(swiper, { 25725 parallax: { 25726 setTransform: Parallax.setTransform.bind(swiper), 25727 setTranslate: Parallax.setTranslate.bind(swiper), 25728 setTransition: Parallax.setTransition.bind(swiper) 25729 } 25730 }); 25731 }, 25732 on: { 25733 beforeInit: function beforeInit() { 25734 var swiper = this; 25735 if (!swiper.params.parallax.enabled) return; 25736 swiper.params.watchSlidesProgress = true; 25737 swiper.originalParams.watchSlidesProgress = true; 25738 }, 25739 init: function init() { 25740 var swiper = this; 25741 if (!swiper.params.parallax.enabled) return; 25742 swiper.parallax.setTranslate(); 25743 }, 25744 setTranslate: function setTranslate() { 25745 var swiper = this; 25746 if (!swiper.params.parallax.enabled) return; 25747 swiper.parallax.setTranslate(); 25748 }, 25749 setTransition: function setTransition(duration) { 25750 var swiper = this; 25751 if (!swiper.params.parallax.enabled) return; 25752 swiper.parallax.setTransition(duration); 25753 } 25754 } 25755}; 25756var Zoom = { 25757 // Calc Scale From Multi-touches 25758 getDistanceBetweenTouches: function getDistanceBetweenTouches(e) { 25759 if (e.targetTouches.length < 2) return 1; 25760 var x1 = e.targetTouches[0].pageX; 25761 var y1 = e.targetTouches[0].pageY; 25762 var x2 = e.targetTouches[1].pageX; 25763 var y2 = e.targetTouches[1].pageY; 25764 var distance = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); 25765 return distance; 25766 }, 25767 // Events 25768 onGestureStart: function onGestureStart(e) { 25769 var swiper = this; 25770 var params = swiper.params.zoom; 25771 var zoom = swiper.zoom; 25772 var gesture = zoom.gesture; 25773 zoom.fakeGestureTouched = false; 25774 zoom.fakeGestureMoved = false; 25775 if (!Support.gestures) { 25776 if (e.type !== 'touchstart' || e.type === 'touchstart' && e.targetTouches.length < 2) { 25777 return; 25778 } 25779 zoom.fakeGestureTouched = true; 25780 gesture.scaleStart = Zoom.getDistanceBetweenTouches(e); 25781 } 25782 if (!gesture.$slideEl || !gesture.$slideEl.length) { 25783 gesture.$slideEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(e.target).closest(".".concat(swiper.params.slideClass)); 25784 if (gesture.$slideEl.length === 0) gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); 25785 gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target'); 25786 gesture.$imageWrapEl = gesture.$imageEl.parent(".".concat(params.containerClass)); 25787 gesture.maxRatio = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; 25788 if (gesture.$imageWrapEl.length === 0) { 25789 gesture.$imageEl = undefined; 25790 return; 25791 } 25792 } 25793 if (gesture.$imageEl) { 25794 gesture.$imageEl.transition(0); 25795 } 25796 swiper.zoom.isScaling = true; 25797 }, 25798 onGestureChange: function onGestureChange(e) { 25799 var swiper = this; 25800 var params = swiper.params.zoom; 25801 var zoom = swiper.zoom; 25802 var gesture = zoom.gesture; 25803 if (!Support.gestures) { 25804 if (e.type !== 'touchmove' || e.type === 'touchmove' && e.targetTouches.length < 2) { 25805 return; 25806 } 25807 zoom.fakeGestureMoved = true; 25808 gesture.scaleMove = Zoom.getDistanceBetweenTouches(e); 25809 } 25810 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 25811 if (Support.gestures) { 25812 zoom.scale = e.scale * zoom.currentScale; 25813 } else { 25814 zoom.scale = gesture.scaleMove / gesture.scaleStart * zoom.currentScale; 25815 } 25816 if (zoom.scale > gesture.maxRatio) { 25817 zoom.scale = gesture.maxRatio - 1 + Math.pow(zoom.scale - gesture.maxRatio + 1, 0.5); 25818 } 25819 if (zoom.scale < params.minRatio) { 25820 zoom.scale = params.minRatio + 1 - Math.pow(params.minRatio - zoom.scale + 1, 0.5); 25821 } 25822 gesture.$imageEl.transform("translate3d(0,0,0) scale(".concat(zoom.scale, ")")); 25823 }, 25824 onGestureEnd: function onGestureEnd(e) { 25825 var swiper = this; 25826 var params = swiper.params.zoom; 25827 var zoom = swiper.zoom; 25828 var gesture = zoom.gesture; 25829 if (!Support.gestures) { 25830 if (!zoom.fakeGestureTouched || !zoom.fakeGestureMoved) { 25831 return; 25832 } 25833 if (e.type !== 'touchend' || e.type === 'touchend' && e.changedTouches.length < 2 && !Device.android) { 25834 return; 25835 } 25836 zoom.fakeGestureTouched = false; 25837 zoom.fakeGestureMoved = false; 25838 } 25839 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 25840 zoom.scale = Math.max(Math.min(zoom.scale, gesture.maxRatio), params.minRatio); 25841 gesture.$imageEl.transition(swiper.params.speed).transform("translate3d(0,0,0) scale(".concat(zoom.scale, ")")); 25842 zoom.currentScale = zoom.scale; 25843 zoom.isScaling = false; 25844 if (zoom.scale === 1) gesture.$slideEl = undefined; 25845 }, 25846 onTouchStart: function onTouchStart(e) { 25847 var swiper = this; 25848 var zoom = swiper.zoom; 25849 var gesture = zoom.gesture, 25850 image = zoom.image; 25851 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 25852 if (image.isTouched) return; 25853 if (Device.android && e.cancelable) e.preventDefault(); 25854 image.isTouched = true; 25855 image.touchesStart.x = e.type === 'touchstart' ? e.targetTouches[0].pageX : e.pageX; 25856 image.touchesStart.y = e.type === 'touchstart' ? e.targetTouches[0].pageY : e.pageY; 25857 }, 25858 onTouchMove: function onTouchMove(e) { 25859 var swiper = this; 25860 var zoom = swiper.zoom; 25861 var gesture = zoom.gesture, 25862 image = zoom.image, 25863 velocity = zoom.velocity; 25864 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 25865 swiper.allowClick = false; 25866 if (!image.isTouched || !gesture.$slideEl) return; 25867 if (!image.isMoved) { 25868 image.width = gesture.$imageEl[0].offsetWidth; 25869 image.height = gesture.$imageEl[0].offsetHeight; 25870 image.startX = Utils.getTranslate(gesture.$imageWrapEl[0], 'x') || 0; 25871 image.startY = Utils.getTranslate(gesture.$imageWrapEl[0], 'y') || 0; 25872 gesture.slideWidth = gesture.$slideEl[0].offsetWidth; 25873 gesture.slideHeight = gesture.$slideEl[0].offsetHeight; 25874 gesture.$imageWrapEl.transition(0); 25875 if (swiper.rtl) { 25876 image.startX = -image.startX; 25877 image.startY = -image.startY; 25878 } 25879 } 25880 // Define if we need image drag 25881 var scaledWidth = image.width * zoom.scale; 25882 var scaledHeight = image.height * zoom.scale; 25883 if (scaledWidth < gesture.slideWidth && scaledHeight < gesture.slideHeight) return; 25884 image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); 25885 image.maxX = -image.minX; 25886 image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); 25887 image.maxY = -image.minY; 25888 image.touchesCurrent.x = e.type === 'touchmove' ? e.targetTouches[0].pageX : e.pageX; 25889 image.touchesCurrent.y = e.type === 'touchmove' ? e.targetTouches[0].pageY : e.pageY; 25890 if (!image.isMoved && !zoom.isScaling) { 25891 if (swiper.isHorizontal() && (Math.floor(image.minX) === Math.floor(image.startX) && image.touchesCurrent.x < image.touchesStart.x || Math.floor(image.maxX) === Math.floor(image.startX) && image.touchesCurrent.x > image.touchesStart.x)) { 25892 image.isTouched = false; 25893 return; 25894 } 25895 if (!swiper.isHorizontal() && (Math.floor(image.minY) === Math.floor(image.startY) && image.touchesCurrent.y < image.touchesStart.y || Math.floor(image.maxY) === Math.floor(image.startY) && image.touchesCurrent.y > image.touchesStart.y)) { 25896 image.isTouched = false; 25897 return; 25898 } 25899 } 25900 if (e.cancelable) { 25901 e.preventDefault(); 25902 } 25903 e.stopPropagation(); 25904 image.isMoved = true; 25905 image.currentX = image.touchesCurrent.x - image.touchesStart.x + image.startX; 25906 image.currentY = image.touchesCurrent.y - image.touchesStart.y + image.startY; 25907 if (image.currentX < image.minX) { 25908 image.currentX = image.minX + 1 - Math.pow(image.minX - image.currentX + 1, 0.8); 25909 } 25910 if (image.currentX > image.maxX) { 25911 image.currentX = image.maxX - 1 + Math.pow(image.currentX - image.maxX + 1, 0.8); 25912 } 25913 if (image.currentY < image.minY) { 25914 image.currentY = image.minY + 1 - Math.pow(image.minY - image.currentY + 1, 0.8); 25915 } 25916 if (image.currentY > image.maxY) { 25917 image.currentY = image.maxY - 1 + Math.pow(image.currentY - image.maxY + 1, 0.8); 25918 } 25919 25920 // Velocity 25921 if (!velocity.prevPositionX) velocity.prevPositionX = image.touchesCurrent.x; 25922 if (!velocity.prevPositionY) velocity.prevPositionY = image.touchesCurrent.y; 25923 if (!velocity.prevTime) velocity.prevTime = Date.now(); 25924 velocity.x = (image.touchesCurrent.x - velocity.prevPositionX) / (Date.now() - velocity.prevTime) / 2; 25925 velocity.y = (image.touchesCurrent.y - velocity.prevPositionY) / (Date.now() - velocity.prevTime) / 2; 25926 if (Math.abs(image.touchesCurrent.x - velocity.prevPositionX) < 2) velocity.x = 0; 25927 if (Math.abs(image.touchesCurrent.y - velocity.prevPositionY) < 2) velocity.y = 0; 25928 velocity.prevPositionX = image.touchesCurrent.x; 25929 velocity.prevPositionY = image.touchesCurrent.y; 25930 velocity.prevTime = Date.now(); 25931 gesture.$imageWrapEl.transform("translate3d(".concat(image.currentX, "px, ").concat(image.currentY, "px,0)")); 25932 }, 25933 onTouchEnd: function onTouchEnd() { 25934 var swiper = this; 25935 var zoom = swiper.zoom; 25936 var gesture = zoom.gesture, 25937 image = zoom.image, 25938 velocity = zoom.velocity; 25939 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 25940 if (!image.isTouched || !image.isMoved) { 25941 image.isTouched = false; 25942 image.isMoved = false; 25943 return; 25944 } 25945 image.isTouched = false; 25946 image.isMoved = false; 25947 var momentumDurationX = 300; 25948 var momentumDurationY = 300; 25949 var momentumDistanceX = velocity.x * momentumDurationX; 25950 var newPositionX = image.currentX + momentumDistanceX; 25951 var momentumDistanceY = velocity.y * momentumDurationY; 25952 var newPositionY = image.currentY + momentumDistanceY; 25953 25954 // Fix duration 25955 if (velocity.x !== 0) momentumDurationX = Math.abs((newPositionX - image.currentX) / velocity.x); 25956 if (velocity.y !== 0) momentumDurationY = Math.abs((newPositionY - image.currentY) / velocity.y); 25957 var momentumDuration = Math.max(momentumDurationX, momentumDurationY); 25958 image.currentX = newPositionX; 25959 image.currentY = newPositionY; 25960 25961 // Define if we need image drag 25962 var scaledWidth = image.width * zoom.scale; 25963 var scaledHeight = image.height * zoom.scale; 25964 image.minX = Math.min(gesture.slideWidth / 2 - scaledWidth / 2, 0); 25965 image.maxX = -image.minX; 25966 image.minY = Math.min(gesture.slideHeight / 2 - scaledHeight / 2, 0); 25967 image.maxY = -image.minY; 25968 image.currentX = Math.max(Math.min(image.currentX, image.maxX), image.minX); 25969 image.currentY = Math.max(Math.min(image.currentY, image.maxY), image.minY); 25970 gesture.$imageWrapEl.transition(momentumDuration).transform("translate3d(".concat(image.currentX, "px, ").concat(image.currentY, "px,0)")); 25971 }, 25972 onTransitionEnd: function onTransitionEnd() { 25973 var swiper = this; 25974 var zoom = swiper.zoom; 25975 var gesture = zoom.gesture; 25976 if (gesture.$slideEl && swiper.previousIndex !== swiper.activeIndex) { 25977 if (gesture.$imageEl) { 25978 gesture.$imageEl.transform('translate3d(0,0,0) scale(1)'); 25979 } 25980 if (gesture.$imageWrapEl) { 25981 gesture.$imageWrapEl.transform('translate3d(0,0,0)'); 25982 } 25983 zoom.scale = 1; 25984 zoom.currentScale = 1; 25985 gesture.$slideEl = undefined; 25986 gesture.$imageEl = undefined; 25987 gesture.$imageWrapEl = undefined; 25988 } 25989 }, 25990 // Toggle Zoom 25991 toggle: function toggle(e) { 25992 var swiper = this; 25993 var zoom = swiper.zoom; 25994 if (zoom.scale && zoom.scale !== 1) { 25995 // Zoom Out 25996 zoom.out(); 25997 } else { 25998 // Zoom In 25999 zoom.in(e); 26000 } 26001 }, 26002 in: function _in(e) { 26003 var swiper = this; 26004 var zoom = swiper.zoom; 26005 var params = swiper.params.zoom; 26006 var gesture = zoom.gesture, 26007 image = zoom.image; 26008 if (!gesture.$slideEl) { 26009 if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { 26010 gesture.$slideEl = swiper.$wrapperEl.children(".".concat(swiper.params.slideActiveClass)); 26011 } else { 26012 gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); 26013 } 26014 gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target'); 26015 gesture.$imageWrapEl = gesture.$imageEl.parent(".".concat(params.containerClass)); 26016 } 26017 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 26018 gesture.$slideEl.addClass("".concat(params.zoomedSlideClass)); 26019 var touchX; 26020 var touchY; 26021 var offsetX; 26022 var offsetY; 26023 var diffX; 26024 var diffY; 26025 var translateX; 26026 var translateY; 26027 var imageWidth; 26028 var imageHeight; 26029 var scaledWidth; 26030 var scaledHeight; 26031 var translateMinX; 26032 var translateMinY; 26033 var translateMaxX; 26034 var translateMaxY; 26035 var slideWidth; 26036 var slideHeight; 26037 if (typeof image.touchesStart.x === 'undefined' && e) { 26038 touchX = e.type === 'touchend' ? e.changedTouches[0].pageX : e.pageX; 26039 touchY = e.type === 'touchend' ? e.changedTouches[0].pageY : e.pageY; 26040 } else { 26041 touchX = image.touchesStart.x; 26042 touchY = image.touchesStart.y; 26043 } 26044 zoom.scale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; 26045 zoom.currentScale = gesture.$imageWrapEl.attr('data-swiper-zoom') || params.maxRatio; 26046 if (e) { 26047 slideWidth = gesture.$slideEl[0].offsetWidth; 26048 slideHeight = gesture.$slideEl[0].offsetHeight; 26049 offsetX = gesture.$slideEl.offset().left; 26050 offsetY = gesture.$slideEl.offset().top; 26051 diffX = offsetX + slideWidth / 2 - touchX; 26052 diffY = offsetY + slideHeight / 2 - touchY; 26053 imageWidth = gesture.$imageEl[0].offsetWidth; 26054 imageHeight = gesture.$imageEl[0].offsetHeight; 26055 scaledWidth = imageWidth * zoom.scale; 26056 scaledHeight = imageHeight * zoom.scale; 26057 translateMinX = Math.min(slideWidth / 2 - scaledWidth / 2, 0); 26058 translateMinY = Math.min(slideHeight / 2 - scaledHeight / 2, 0); 26059 translateMaxX = -translateMinX; 26060 translateMaxY = -translateMinY; 26061 translateX = diffX * zoom.scale; 26062 translateY = diffY * zoom.scale; 26063 if (translateX < translateMinX) { 26064 translateX = translateMinX; 26065 } 26066 if (translateX > translateMaxX) { 26067 translateX = translateMaxX; 26068 } 26069 if (translateY < translateMinY) { 26070 translateY = translateMinY; 26071 } 26072 if (translateY > translateMaxY) { 26073 translateY = translateMaxY; 26074 } 26075 } else { 26076 translateX = 0; 26077 translateY = 0; 26078 } 26079 gesture.$imageWrapEl.transition(300).transform("translate3d(".concat(translateX, "px, ").concat(translateY, "px,0)")); 26080 gesture.$imageEl.transition(300).transform("translate3d(0,0,0) scale(".concat(zoom.scale, ")")); 26081 }, 26082 out: function out() { 26083 var swiper = this; 26084 var zoom = swiper.zoom; 26085 var params = swiper.params.zoom; 26086 var gesture = zoom.gesture; 26087 if (!gesture.$slideEl) { 26088 if (swiper.params.virtual && swiper.params.virtual.enabled && swiper.virtual) { 26089 gesture.$slideEl = swiper.$wrapperEl.children(".".concat(swiper.params.slideActiveClass)); 26090 } else { 26091 gesture.$slideEl = swiper.slides.eq(swiper.activeIndex); 26092 } 26093 gesture.$imageEl = gesture.$slideEl.find('img, svg, canvas, picture, .swiper-zoom-target'); 26094 gesture.$imageWrapEl = gesture.$imageEl.parent(".".concat(params.containerClass)); 26095 } 26096 if (!gesture.$imageEl || gesture.$imageEl.length === 0) return; 26097 zoom.scale = 1; 26098 zoom.currentScale = 1; 26099 gesture.$imageWrapEl.transition(300).transform('translate3d(0,0,0)'); 26100 gesture.$imageEl.transition(300).transform('translate3d(0,0,0) scale(1)'); 26101 gesture.$slideEl.removeClass("".concat(params.zoomedSlideClass)); 26102 gesture.$slideEl = undefined; 26103 }, 26104 // Attach/Detach Events 26105 enable: function enable() { 26106 var swiper = this; 26107 var zoom = swiper.zoom; 26108 if (zoom.enabled) return; 26109 zoom.enabled = true; 26110 var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { 26111 passive: true, 26112 capture: false 26113 } : false; 26114 var activeListenerWithCapture = Support.passiveListener ? { 26115 passive: false, 26116 capture: true 26117 } : true; 26118 var slideSelector = ".".concat(swiper.params.slideClass); 26119 26120 // Scale image 26121 if (Support.gestures) { 26122 swiper.$wrapperEl.on('gesturestart', slideSelector, zoom.onGestureStart, passiveListener); 26123 swiper.$wrapperEl.on('gesturechange', slideSelector, zoom.onGestureChange, passiveListener); 26124 swiper.$wrapperEl.on('gestureend', slideSelector, zoom.onGestureEnd, passiveListener); 26125 } else if (swiper.touchEvents.start === 'touchstart') { 26126 swiper.$wrapperEl.on(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener); 26127 swiper.$wrapperEl.on(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture); 26128 swiper.$wrapperEl.on(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener); 26129 if (swiper.touchEvents.cancel) { 26130 swiper.$wrapperEl.on(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener); 26131 } 26132 } 26133 26134 // Move image 26135 swiper.$wrapperEl.on(swiper.touchEvents.move, ".".concat(swiper.params.zoom.containerClass), zoom.onTouchMove, activeListenerWithCapture); 26136 }, 26137 disable: function disable() { 26138 var swiper = this; 26139 var zoom = swiper.zoom; 26140 if (!zoom.enabled) return; 26141 swiper.zoom.enabled = false; 26142 var passiveListener = swiper.touchEvents.start === 'touchstart' && Support.passiveListener && swiper.params.passiveListeners ? { 26143 passive: true, 26144 capture: false 26145 } : false; 26146 var activeListenerWithCapture = Support.passiveListener ? { 26147 passive: false, 26148 capture: true 26149 } : true; 26150 var slideSelector = ".".concat(swiper.params.slideClass); 26151 26152 // Scale image 26153 if (Support.gestures) { 26154 swiper.$wrapperEl.off('gesturestart', slideSelector, zoom.onGestureStart, passiveListener); 26155 swiper.$wrapperEl.off('gesturechange', slideSelector, zoom.onGestureChange, passiveListener); 26156 swiper.$wrapperEl.off('gestureend', slideSelector, zoom.onGestureEnd, passiveListener); 26157 } else if (swiper.touchEvents.start === 'touchstart') { 26158 swiper.$wrapperEl.off(swiper.touchEvents.start, slideSelector, zoom.onGestureStart, passiveListener); 26159 swiper.$wrapperEl.off(swiper.touchEvents.move, slideSelector, zoom.onGestureChange, activeListenerWithCapture); 26160 swiper.$wrapperEl.off(swiper.touchEvents.end, slideSelector, zoom.onGestureEnd, passiveListener); 26161 if (swiper.touchEvents.cancel) { 26162 swiper.$wrapperEl.off(swiper.touchEvents.cancel, slideSelector, zoom.onGestureEnd, passiveListener); 26163 } 26164 } 26165 26166 // Move image 26167 swiper.$wrapperEl.off(swiper.touchEvents.move, ".".concat(swiper.params.zoom.containerClass), zoom.onTouchMove, activeListenerWithCapture); 26168 } 26169}; 26170var Zoom$1 = { 26171 name: 'zoom', 26172 params: { 26173 zoom: { 26174 enabled: false, 26175 maxRatio: 3, 26176 minRatio: 1, 26177 toggle: true, 26178 containerClass: 'swiper-zoom-container', 26179 zoomedSlideClass: 'swiper-slide-zoomed' 26180 } 26181 }, 26182 create: function create() { 26183 var swiper = this; 26184 var zoom = { 26185 enabled: false, 26186 scale: 1, 26187 currentScale: 1, 26188 isScaling: false, 26189 gesture: { 26190 $slideEl: undefined, 26191 slideWidth: undefined, 26192 slideHeight: undefined, 26193 $imageEl: undefined, 26194 $imageWrapEl: undefined, 26195 maxRatio: 3 26196 }, 26197 image: { 26198 isTouched: undefined, 26199 isMoved: undefined, 26200 currentX: undefined, 26201 currentY: undefined, 26202 minX: undefined, 26203 minY: undefined, 26204 maxX: undefined, 26205 maxY: undefined, 26206 width: undefined, 26207 height: undefined, 26208 startX: undefined, 26209 startY: undefined, 26210 touchesStart: {}, 26211 touchesCurrent: {} 26212 }, 26213 velocity: { 26214 x: undefined, 26215 y: undefined, 26216 prevPositionX: undefined, 26217 prevPositionY: undefined, 26218 prevTime: undefined 26219 } 26220 }; 26221 'onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out'.split(' ').forEach(function (methodName) { 26222 zoom[methodName] = Zoom[methodName].bind(swiper); 26223 }); 26224 Utils.extend(swiper, { 26225 zoom: zoom 26226 }); 26227 var scale = 1; 26228 Object.defineProperty(swiper.zoom, 'scale', { 26229 get: function get() { 26230 return scale; 26231 }, 26232 set: function set(value) { 26233 if (scale !== value) { 26234 var imageEl = swiper.zoom.gesture.$imageEl ? swiper.zoom.gesture.$imageEl[0] : undefined; 26235 var slideEl = swiper.zoom.gesture.$slideEl ? swiper.zoom.gesture.$slideEl[0] : undefined; 26236 swiper.emit('zoomChange', value, imageEl, slideEl); 26237 } 26238 scale = value; 26239 } 26240 }); 26241 }, 26242 on: { 26243 init: function init() { 26244 var swiper = this; 26245 if (swiper.params.zoom.enabled) { 26246 swiper.zoom.enable(); 26247 } 26248 }, 26249 destroy: function destroy() { 26250 var swiper = this; 26251 swiper.zoom.disable(); 26252 }, 26253 touchStart: function touchStart(e) { 26254 var swiper = this; 26255 if (!swiper.zoom.enabled) return; 26256 swiper.zoom.onTouchStart(e); 26257 }, 26258 touchEnd: function touchEnd(e) { 26259 var swiper = this; 26260 if (!swiper.zoom.enabled) return; 26261 swiper.zoom.onTouchEnd(e); 26262 }, 26263 doubleTap: function doubleTap(e) { 26264 var swiper = this; 26265 if (swiper.params.zoom.enabled && swiper.zoom.enabled && swiper.params.zoom.toggle) { 26266 swiper.zoom.toggle(e); 26267 } 26268 }, 26269 transitionEnd: function transitionEnd() { 26270 var swiper = this; 26271 if (swiper.zoom.enabled && swiper.params.zoom.enabled) { 26272 swiper.zoom.onTransitionEnd(); 26273 } 26274 }, 26275 slideChange: function slideChange() { 26276 var swiper = this; 26277 if (swiper.zoom.enabled && swiper.params.zoom.enabled && swiper.params.cssMode) { 26278 swiper.zoom.onTransitionEnd(); 26279 } 26280 } 26281 } 26282}; 26283var Lazy = { 26284 loadInSlide: function loadInSlide(index) { 26285 var loadInDuplicate = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; 26286 var swiper = this; 26287 var params = swiper.params.lazy; 26288 if (typeof index === 'undefined') return; 26289 if (swiper.slides.length === 0) return; 26290 var isVirtual = swiper.virtual && swiper.params.virtual.enabled; 26291 var $slideEl = isVirtual ? swiper.$wrapperEl.children(".".concat(swiper.params.slideClass, "[data-swiper-slide-index=\"").concat(index, "\"]")) : swiper.slides.eq(index); 26292 var $images = $slideEl.find(".".concat(params.elementClass, ":not(.").concat(params.loadedClass, "):not(.").concat(params.loadingClass, ")")); 26293 if ($slideEl.hasClass(params.elementClass) && !$slideEl.hasClass(params.loadedClass) && !$slideEl.hasClass(params.loadingClass)) { 26294 $images = $images.add($slideEl[0]); 26295 } 26296 if ($images.length === 0) return; 26297 $images.each(function (imageIndex, imageEl) { 26298 var $imageEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(imageEl); 26299 $imageEl.addClass(params.loadingClass); 26300 var background = $imageEl.attr('data-background'); 26301 var src = $imageEl.attr('data-src'); 26302 var srcset = $imageEl.attr('data-srcset'); 26303 var sizes = $imageEl.attr('data-sizes'); 26304 var $pictureEl = $imageEl.parent('picture'); 26305 swiper.loadImage($imageEl[0], src || background, srcset, sizes, false, function () { 26306 if (typeof swiper === 'undefined' || swiper === null || !swiper || swiper && !swiper.params || swiper.destroyed) return; 26307 if (background) { 26308 $imageEl.css('background-image', "url(\"".concat(background, "\")")); 26309 $imageEl.removeAttr('data-background'); 26310 } else { 26311 if (srcset) { 26312 $imageEl.attr('srcset', srcset); 26313 $imageEl.removeAttr('data-srcset'); 26314 } 26315 if (sizes) { 26316 $imageEl.attr('sizes', sizes); 26317 $imageEl.removeAttr('data-sizes'); 26318 } 26319 if ($pictureEl.length) { 26320 $pictureEl.children('source').each(function (sourceIndex, sourceEl) { 26321 var $source = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(sourceEl); 26322 if ($source.attr('data-srcset')) { 26323 $source.attr('srcset', $source.attr('data-srcset')); 26324 $source.removeAttr('data-srcset'); 26325 } 26326 }); 26327 } 26328 if (src) { 26329 $imageEl.attr('src', src); 26330 $imageEl.removeAttr('data-src'); 26331 } 26332 } 26333 $imageEl.addClass(params.loadedClass).removeClass(params.loadingClass); 26334 $slideEl.find(".".concat(params.preloaderClass)).remove(); 26335 if (swiper.params.loop && loadInDuplicate) { 26336 var slideOriginalIndex = $slideEl.attr('data-swiper-slide-index'); 26337 if ($slideEl.hasClass(swiper.params.slideDuplicateClass)) { 26338 var originalSlide = swiper.$wrapperEl.children("[data-swiper-slide-index=\"".concat(slideOriginalIndex, "\"]:not(.").concat(swiper.params.slideDuplicateClass, ")")); 26339 swiper.lazy.loadInSlide(originalSlide.index(), false); 26340 } else { 26341 var duplicatedSlide = swiper.$wrapperEl.children(".".concat(swiper.params.slideDuplicateClass, "[data-swiper-slide-index=\"").concat(slideOriginalIndex, "\"]")); 26342 swiper.lazy.loadInSlide(duplicatedSlide.index(), false); 26343 } 26344 } 26345 swiper.emit('lazyImageReady', $slideEl[0], $imageEl[0]); 26346 if (swiper.params.autoHeight) { 26347 swiper.updateAutoHeight(); 26348 } 26349 }); 26350 swiper.emit('lazyImageLoad', $slideEl[0], $imageEl[0]); 26351 }); 26352 }, 26353 load: function load() { 26354 var swiper = this; 26355 var $wrapperEl = swiper.$wrapperEl, 26356 swiperParams = swiper.params, 26357 slides = swiper.slides, 26358 activeIndex = swiper.activeIndex; 26359 var isVirtual = swiper.virtual && swiperParams.virtual.enabled; 26360 var params = swiperParams.lazy; 26361 var slidesPerView = swiperParams.slidesPerView; 26362 if (slidesPerView === 'auto') { 26363 slidesPerView = 0; 26364 } 26365 function slideExist(index) { 26366 if (isVirtual) { 26367 if ($wrapperEl.children(".".concat(swiperParams.slideClass, "[data-swiper-slide-index=\"").concat(index, "\"]")).length) { 26368 return true; 26369 } 26370 } else if (slides[index]) return true; 26371 return false; 26372 } 26373 function slideIndex(slideEl) { 26374 if (isVirtual) { 26375 return Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(slideEl).attr('data-swiper-slide-index'); 26376 } 26377 return Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(slideEl).index(); 26378 } 26379 if (!swiper.lazy.initialImageLoaded) swiper.lazy.initialImageLoaded = true; 26380 if (swiper.params.watchSlidesVisibility) { 26381 $wrapperEl.children(".".concat(swiperParams.slideVisibleClass)).each(function (elIndex, slideEl) { 26382 var index = isVirtual ? Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(slideEl).attr('data-swiper-slide-index') : Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(slideEl).index(); 26383 swiper.lazy.loadInSlide(index); 26384 }); 26385 } else if (slidesPerView > 1) { 26386 for (var i = activeIndex; i < activeIndex + slidesPerView; i += 1) { 26387 if (slideExist(i)) swiper.lazy.loadInSlide(i); 26388 } 26389 } else { 26390 swiper.lazy.loadInSlide(activeIndex); 26391 } 26392 if (params.loadPrevNext) { 26393 if (slidesPerView > 1 || params.loadPrevNextAmount && params.loadPrevNextAmount > 1) { 26394 var amount = params.loadPrevNextAmount; 26395 var spv = slidesPerView; 26396 var maxIndex = Math.min(activeIndex + spv + Math.max(amount, spv), slides.length); 26397 var minIndex = Math.max(activeIndex - Math.max(spv, amount), 0); 26398 // Next Slides 26399 for (var _i11 = activeIndex + slidesPerView; _i11 < maxIndex; _i11 += 1) { 26400 if (slideExist(_i11)) swiper.lazy.loadInSlide(_i11); 26401 } 26402 // Prev Slides 26403 for (var _i12 = minIndex; _i12 < activeIndex; _i12 += 1) { 26404 if (slideExist(_i12)) swiper.lazy.loadInSlide(_i12); 26405 } 26406 } else { 26407 var nextSlide = $wrapperEl.children(".".concat(swiperParams.slideNextClass)); 26408 if (nextSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(nextSlide)); 26409 var prevSlide = $wrapperEl.children(".".concat(swiperParams.slidePrevClass)); 26410 if (prevSlide.length > 0) swiper.lazy.loadInSlide(slideIndex(prevSlide)); 26411 } 26412 } 26413 } 26414}; 26415var Lazy$1 = { 26416 name: 'lazy', 26417 params: { 26418 lazy: { 26419 enabled: false, 26420 loadPrevNext: false, 26421 loadPrevNextAmount: 1, 26422 loadOnTransitionStart: false, 26423 elementClass: 'swiper-lazy', 26424 loadingClass: 'swiper-lazy-loading', 26425 loadedClass: 'swiper-lazy-loaded', 26426 preloaderClass: 'swiper-lazy-preloader' 26427 } 26428 }, 26429 create: function create() { 26430 var swiper = this; 26431 Utils.extend(swiper, { 26432 lazy: { 26433 initialImageLoaded: false, 26434 load: Lazy.load.bind(swiper), 26435 loadInSlide: Lazy.loadInSlide.bind(swiper) 26436 } 26437 }); 26438 }, 26439 on: { 26440 beforeInit: function beforeInit() { 26441 var swiper = this; 26442 if (swiper.params.lazy.enabled && swiper.params.preloadImages) { 26443 swiper.params.preloadImages = false; 26444 } 26445 }, 26446 init: function init() { 26447 var swiper = this; 26448 if (swiper.params.lazy.enabled && !swiper.params.loop && swiper.params.initialSlide === 0) { 26449 swiper.lazy.load(); 26450 } 26451 }, 26452 scroll: function scroll() { 26453 var swiper = this; 26454 if (swiper.params.freeMode && !swiper.params.freeModeSticky) { 26455 swiper.lazy.load(); 26456 } 26457 }, 26458 resize: function resize() { 26459 var swiper = this; 26460 if (swiper.params.lazy.enabled) { 26461 swiper.lazy.load(); 26462 } 26463 }, 26464 scrollbarDragMove: function scrollbarDragMove() { 26465 var swiper = this; 26466 if (swiper.params.lazy.enabled) { 26467 swiper.lazy.load(); 26468 } 26469 }, 26470 transitionStart: function transitionStart() { 26471 var swiper = this; 26472 if (swiper.params.lazy.enabled) { 26473 if (swiper.params.lazy.loadOnTransitionStart || !swiper.params.lazy.loadOnTransitionStart && !swiper.lazy.initialImageLoaded) { 26474 swiper.lazy.load(); 26475 } 26476 } 26477 }, 26478 transitionEnd: function transitionEnd() { 26479 var swiper = this; 26480 if (swiper.params.lazy.enabled && !swiper.params.lazy.loadOnTransitionStart) { 26481 swiper.lazy.load(); 26482 } 26483 }, 26484 slideChange: function slideChange() { 26485 var swiper = this; 26486 if (swiper.params.lazy.enabled && swiper.params.cssMode) { 26487 swiper.lazy.load(); 26488 } 26489 } 26490 } 26491}; 26492 26493/* eslint no-bitwise: ["error", { "allow": [">>"] }] */ 26494 26495var Controller = { 26496 LinearSpline: function LinearSpline(x, y) { 26497 var binarySearch = function search() { 26498 var maxIndex; 26499 var minIndex; 26500 var guess; 26501 return function (array, val) { 26502 minIndex = -1; 26503 maxIndex = array.length; 26504 while (maxIndex - minIndex > 1) { 26505 guess = maxIndex + minIndex >> 1; 26506 if (array[guess] <= val) { 26507 minIndex = guess; 26508 } else { 26509 maxIndex = guess; 26510 } 26511 } 26512 return maxIndex; 26513 }; 26514 }(); 26515 this.x = x; 26516 this.y = y; 26517 this.lastIndex = x.length - 1; 26518 // Given an x value (x2), return the expected y2 value: 26519 // (x1,y1) is the known point before given value, 26520 // (x3,y3) is the known point after given value. 26521 var i1; 26522 var i3; 26523 this.interpolate = function interpolate(x2) { 26524 if (!x2) return 0; 26525 26526 // Get the indexes of x1 and x3 (the array indexes before and after given x2): 26527 i3 = binarySearch(this.x, x2); 26528 i1 = i3 - 1; 26529 26530 // We have our indexes i1 & i3, so we can calculate already: 26531 // y2 := ((x2−x1) × (y3−y1)) ÷ (x3−x1) + y1 26532 return (x2 - this.x[i1]) * (this.y[i3] - this.y[i1]) / (this.x[i3] - this.x[i1]) + this.y[i1]; 26533 }; 26534 return this; 26535 }, 26536 // xxx: for now i will just save one spline function to to 26537 getInterpolateFunction: function getInterpolateFunction(c) { 26538 var swiper = this; 26539 if (!swiper.controller.spline) { 26540 swiper.controller.spline = swiper.params.loop ? new Controller.LinearSpline(swiper.slidesGrid, c.slidesGrid) : new Controller.LinearSpline(swiper.snapGrid, c.snapGrid); 26541 } 26542 }, 26543 setTranslate: function setTranslate(_setTranslate, byController) { 26544 var swiper = this; 26545 var controlled = swiper.controller.control; 26546 var multiplier; 26547 var controlledTranslate; 26548 function setControlledTranslate(c) { 26549 // this will create an Interpolate function based on the snapGrids 26550 // x is the Grid of the scrolled scroller and y will be the controlled scroller 26551 // it makes sense to create this only once and recall it for the interpolation 26552 // the function does a lot of value caching for performance 26553 var translate = swiper.rtlTranslate ? -swiper.translate : swiper.translate; 26554 if (swiper.params.controller.by === 'slide') { 26555 swiper.controller.getInterpolateFunction(c); 26556 // i am not sure why the values have to be multiplicated this way, tried to invert the snapGrid 26557 // but it did not work out 26558 controlledTranslate = -swiper.controller.spline.interpolate(-translate); 26559 } 26560 if (!controlledTranslate || swiper.params.controller.by === 'container') { 26561 multiplier = (c.maxTranslate() - c.minTranslate()) / (swiper.maxTranslate() - swiper.minTranslate()); 26562 controlledTranslate = (translate - swiper.minTranslate()) * multiplier + c.minTranslate(); 26563 } 26564 if (swiper.params.controller.inverse) { 26565 controlledTranslate = c.maxTranslate() - controlledTranslate; 26566 } 26567 c.updateProgress(controlledTranslate); 26568 c.setTranslate(controlledTranslate, swiper); 26569 c.updateActiveIndex(); 26570 c.updateSlidesClasses(); 26571 } 26572 if (Array.isArray(controlled)) { 26573 for (var i = 0; i < controlled.length; i += 1) { 26574 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 26575 setControlledTranslate(controlled[i]); 26576 } 26577 } 26578 } else if (controlled instanceof Swiper && byController !== controlled) { 26579 setControlledTranslate(controlled); 26580 } 26581 }, 26582 setTransition: function setTransition(duration, byController) { 26583 var swiper = this; 26584 var controlled = swiper.controller.control; 26585 var i; 26586 function setControlledTransition(c) { 26587 c.setTransition(duration, swiper); 26588 if (duration !== 0) { 26589 c.transitionStart(); 26590 if (c.params.autoHeight) { 26591 Utils.nextTick(function () { 26592 c.updateAutoHeight(); 26593 }); 26594 } 26595 c.$wrapperEl.transitionEnd(function () { 26596 if (!controlled) return; 26597 if (c.params.loop && swiper.params.controller.by === 'slide') { 26598 c.loopFix(); 26599 } 26600 c.transitionEnd(); 26601 }); 26602 } 26603 } 26604 if (Array.isArray(controlled)) { 26605 for (i = 0; i < controlled.length; i += 1) { 26606 if (controlled[i] !== byController && controlled[i] instanceof Swiper) { 26607 setControlledTransition(controlled[i]); 26608 } 26609 } 26610 } else if (controlled instanceof Swiper && byController !== controlled) { 26611 setControlledTransition(controlled); 26612 } 26613 } 26614}; 26615var Controller$1 = { 26616 name: 'controller', 26617 params: { 26618 controller: { 26619 control: undefined, 26620 inverse: false, 26621 by: 'slide' // or 'container' 26622 } 26623 }, 26624 create: function create() { 26625 var swiper = this; 26626 Utils.extend(swiper, { 26627 controller: { 26628 control: swiper.params.controller.control, 26629 getInterpolateFunction: Controller.getInterpolateFunction.bind(swiper), 26630 setTranslate: Controller.setTranslate.bind(swiper), 26631 setTransition: Controller.setTransition.bind(swiper) 26632 } 26633 }); 26634 }, 26635 on: { 26636 update: function update() { 26637 var swiper = this; 26638 if (!swiper.controller.control) return; 26639 if (swiper.controller.spline) { 26640 swiper.controller.spline = undefined; 26641 delete swiper.controller.spline; 26642 } 26643 }, 26644 resize: function resize() { 26645 var swiper = this; 26646 if (!swiper.controller.control) return; 26647 if (swiper.controller.spline) { 26648 swiper.controller.spline = undefined; 26649 delete swiper.controller.spline; 26650 } 26651 }, 26652 observerUpdate: function observerUpdate() { 26653 var swiper = this; 26654 if (!swiper.controller.control) return; 26655 if (swiper.controller.spline) { 26656 swiper.controller.spline = undefined; 26657 delete swiper.controller.spline; 26658 } 26659 }, 26660 setTranslate: function setTranslate(translate, byController) { 26661 var swiper = this; 26662 if (!swiper.controller.control) return; 26663 swiper.controller.setTranslate(translate, byController); 26664 }, 26665 setTransition: function setTransition(duration, byController) { 26666 var swiper = this; 26667 if (!swiper.controller.control) return; 26668 swiper.controller.setTransition(duration, byController); 26669 } 26670 } 26671}; 26672var a11y = { 26673 makeElFocusable: function makeElFocusable($el) { 26674 $el.attr('tabIndex', '0'); 26675 return $el; 26676 }, 26677 makeElNotFocusable: function makeElNotFocusable($el) { 26678 $el.attr('tabIndex', '-1'); 26679 return $el; 26680 }, 26681 addElRole: function addElRole($el, role) { 26682 $el.attr('role', role); 26683 return $el; 26684 }, 26685 addElLabel: function addElLabel($el, label) { 26686 $el.attr('aria-label', label); 26687 return $el; 26688 }, 26689 disableEl: function disableEl($el) { 26690 $el.attr('aria-disabled', true); 26691 return $el; 26692 }, 26693 enableEl: function enableEl($el) { 26694 $el.attr('aria-disabled', false); 26695 return $el; 26696 }, 26697 onEnterKey: function onEnterKey(e) { 26698 var swiper = this; 26699 var params = swiper.params.a11y; 26700 if (e.keyCode !== 13) return; 26701 var $targetEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(e.target); 26702 if (swiper.navigation && swiper.navigation.$nextEl && $targetEl.is(swiper.navigation.$nextEl)) { 26703 if (!(swiper.isEnd && !swiper.params.loop)) { 26704 swiper.slideNext(); 26705 } 26706 if (swiper.isEnd) { 26707 swiper.a11y.notify(params.lastSlideMessage); 26708 } else { 26709 swiper.a11y.notify(params.nextSlideMessage); 26710 } 26711 } 26712 if (swiper.navigation && swiper.navigation.$prevEl && $targetEl.is(swiper.navigation.$prevEl)) { 26713 if (!(swiper.isBeginning && !swiper.params.loop)) { 26714 swiper.slidePrev(); 26715 } 26716 if (swiper.isBeginning) { 26717 swiper.a11y.notify(params.firstSlideMessage); 26718 } else { 26719 swiper.a11y.notify(params.prevSlideMessage); 26720 } 26721 } 26722 if (swiper.pagination && $targetEl.is(".".concat(swiper.params.pagination.bulletClass))) { 26723 $targetEl[0].click(); 26724 } 26725 }, 26726 notify: function notify(message) { 26727 var swiper = this; 26728 var notification = swiper.a11y.liveRegion; 26729 if (notification.length === 0) return; 26730 notification.html(''); 26731 notification.html(message); 26732 }, 26733 updateNavigation: function updateNavigation() { 26734 var swiper = this; 26735 if (swiper.params.loop || !swiper.navigation) return; 26736 var _swiper$navigation4 = swiper.navigation, 26737 $nextEl = _swiper$navigation4.$nextEl, 26738 $prevEl = _swiper$navigation4.$prevEl; 26739 if ($prevEl && $prevEl.length > 0) { 26740 if (swiper.isBeginning) { 26741 swiper.a11y.disableEl($prevEl); 26742 swiper.a11y.makeElNotFocusable($prevEl); 26743 } else { 26744 swiper.a11y.enableEl($prevEl); 26745 swiper.a11y.makeElFocusable($prevEl); 26746 } 26747 } 26748 if ($nextEl && $nextEl.length > 0) { 26749 if (swiper.isEnd) { 26750 swiper.a11y.disableEl($nextEl); 26751 swiper.a11y.makeElNotFocusable($nextEl); 26752 } else { 26753 swiper.a11y.enableEl($nextEl); 26754 swiper.a11y.makeElFocusable($nextEl); 26755 } 26756 } 26757 }, 26758 updatePagination: function updatePagination() { 26759 var swiper = this; 26760 var params = swiper.params.a11y; 26761 if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { 26762 swiper.pagination.bullets.each(function (bulletIndex, bulletEl) { 26763 var $bulletEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(bulletEl); 26764 swiper.a11y.makeElFocusable($bulletEl); 26765 swiper.a11y.addElRole($bulletEl, 'button'); 26766 swiper.a11y.addElLabel($bulletEl, params.paginationBulletMessage.replace(/\{\{index\}\}/, $bulletEl.index() + 1)); 26767 }); 26768 } 26769 }, 26770 init: function init() { 26771 var swiper = this; 26772 swiper.$el.append(swiper.a11y.liveRegion); 26773 26774 // Navigation 26775 var params = swiper.params.a11y; 26776 var $nextEl; 26777 var $prevEl; 26778 if (swiper.navigation && swiper.navigation.$nextEl) { 26779 $nextEl = swiper.navigation.$nextEl; 26780 } 26781 if (swiper.navigation && swiper.navigation.$prevEl) { 26782 $prevEl = swiper.navigation.$prevEl; 26783 } 26784 if ($nextEl) { 26785 swiper.a11y.makeElFocusable($nextEl); 26786 swiper.a11y.addElRole($nextEl, 'button'); 26787 swiper.a11y.addElLabel($nextEl, params.nextSlideMessage); 26788 $nextEl.on('keydown', swiper.a11y.onEnterKey); 26789 } 26790 if ($prevEl) { 26791 swiper.a11y.makeElFocusable($prevEl); 26792 swiper.a11y.addElRole($prevEl, 'button'); 26793 swiper.a11y.addElLabel($prevEl, params.prevSlideMessage); 26794 $prevEl.on('keydown', swiper.a11y.onEnterKey); 26795 } 26796 26797 // Pagination 26798 if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { 26799 swiper.pagination.$el.on('keydown', ".".concat(swiper.params.pagination.bulletClass), swiper.a11y.onEnterKey); 26800 } 26801 }, 26802 destroy: function destroy() { 26803 var swiper = this; 26804 if (swiper.a11y.liveRegion && swiper.a11y.liveRegion.length > 0) swiper.a11y.liveRegion.remove(); 26805 var $nextEl; 26806 var $prevEl; 26807 if (swiper.navigation && swiper.navigation.$nextEl) { 26808 $nextEl = swiper.navigation.$nextEl; 26809 } 26810 if (swiper.navigation && swiper.navigation.$prevEl) { 26811 $prevEl = swiper.navigation.$prevEl; 26812 } 26813 if ($nextEl) { 26814 $nextEl.off('keydown', swiper.a11y.onEnterKey); 26815 } 26816 if ($prevEl) { 26817 $prevEl.off('keydown', swiper.a11y.onEnterKey); 26818 } 26819 26820 // Pagination 26821 if (swiper.pagination && swiper.params.pagination.clickable && swiper.pagination.bullets && swiper.pagination.bullets.length) { 26822 swiper.pagination.$el.off('keydown', ".".concat(swiper.params.pagination.bulletClass), swiper.a11y.onEnterKey); 26823 } 26824 } 26825}; 26826var A11y = { 26827 name: 'a11y', 26828 params: { 26829 a11y: { 26830 enabled: true, 26831 notificationClass: 'swiper-notification', 26832 prevSlideMessage: 'Previous slide', 26833 nextSlideMessage: 'Next slide', 26834 firstSlideMessage: 'This is the first slide', 26835 lastSlideMessage: 'This is the last slide', 26836 paginationBulletMessage: 'Go to slide {{index}}' 26837 } 26838 }, 26839 create: function create() { 26840 var swiper = this; 26841 Utils.extend(swiper, { 26842 a11y: { 26843 liveRegion: Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])("<span class=\"".concat(swiper.params.a11y.notificationClass, "\" aria-live=\"assertive\" aria-atomic=\"true\"></span>")) 26844 } 26845 }); 26846 Object.keys(a11y).forEach(function (methodName) { 26847 swiper.a11y[methodName] = a11y[methodName].bind(swiper); 26848 }); 26849 }, 26850 on: { 26851 init: function init() { 26852 var swiper = this; 26853 if (!swiper.params.a11y.enabled) return; 26854 swiper.a11y.init(); 26855 swiper.a11y.updateNavigation(); 26856 }, 26857 toEdge: function toEdge() { 26858 var swiper = this; 26859 if (!swiper.params.a11y.enabled) return; 26860 swiper.a11y.updateNavigation(); 26861 }, 26862 fromEdge: function fromEdge() { 26863 var swiper = this; 26864 if (!swiper.params.a11y.enabled) return; 26865 swiper.a11y.updateNavigation(); 26866 }, 26867 paginationUpdate: function paginationUpdate() { 26868 var swiper = this; 26869 if (!swiper.params.a11y.enabled) return; 26870 swiper.a11y.updatePagination(); 26871 }, 26872 destroy: function destroy() { 26873 var swiper = this; 26874 if (!swiper.params.a11y.enabled) return; 26875 swiper.a11y.destroy(); 26876 } 26877 } 26878}; 26879var History = { 26880 init: function init() { 26881 var swiper = this; 26882 if (!swiper.params.history) return; 26883 if (!ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].history || !ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].history.pushState) { 26884 swiper.params.history.enabled = false; 26885 swiper.params.hashNavigation.enabled = true; 26886 return; 26887 } 26888 var history = swiper.history; 26889 history.initialized = true; 26890 history.paths = History.getPathValues(); 26891 if (!history.paths.key && !history.paths.value) return; 26892 history.scrollToSlide(0, history.paths.value, swiper.params.runCallbacksOnInit); 26893 if (!swiper.params.history.replaceState) { 26894 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].addEventListener('popstate', swiper.history.setHistoryPopState); 26895 } 26896 }, 26897 destroy: function destroy() { 26898 var swiper = this; 26899 if (!swiper.params.history.replaceState) { 26900 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].removeEventListener('popstate', swiper.history.setHistoryPopState); 26901 } 26902 }, 26903 setHistoryPopState: function setHistoryPopState() { 26904 var swiper = this; 26905 swiper.history.paths = History.getPathValues(); 26906 swiper.history.scrollToSlide(swiper.params.speed, swiper.history.paths.value, false); 26907 }, 26908 getPathValues: function getPathValues() { 26909 var pathArray = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].location.pathname.slice(1).split('/').filter(function (part) { 26910 return part !== ''; 26911 }); 26912 var total = pathArray.length; 26913 var key = pathArray[total - 2]; 26914 var value = pathArray[total - 1]; 26915 return { 26916 key: key, 26917 value: value 26918 }; 26919 }, 26920 setHistory: function setHistory(key, index) { 26921 var swiper = this; 26922 if (!swiper.history.initialized || !swiper.params.history.enabled) return; 26923 var slide = swiper.slides.eq(index); 26924 var value = History.slugify(slide.attr('data-history')); 26925 if (!ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].location.pathname.includes(key)) { 26926 value = "".concat(key, "/").concat(value); 26927 } 26928 var currentState = ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].history.state; 26929 if (currentState && currentState.value === value) { 26930 return; 26931 } 26932 if (swiper.params.history.replaceState) { 26933 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].history.replaceState({ 26934 value: value 26935 }, null, value); 26936 } else { 26937 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].history.pushState({ 26938 value: value 26939 }, null, value); 26940 } 26941 }, 26942 slugify: function slugify(text) { 26943 return text.toString().replace(/\s+/g, '-').replace(/[^\w-]+/g, '').replace(/--+/g, '-').replace(/^-+/, '').replace(/-+$/, ''); 26944 }, 26945 scrollToSlide: function scrollToSlide(speed, value, runCallbacks) { 26946 var swiper = this; 26947 if (value) { 26948 for (var i = 0, length = swiper.slides.length; i < length; i += 1) { 26949 var _slide3 = swiper.slides.eq(i); 26950 var slideHistory = History.slugify(_slide3.attr('data-history')); 26951 if (slideHistory === value && !_slide3.hasClass(swiper.params.slideDuplicateClass)) { 26952 var _index2 = _slide3.index(); 26953 swiper.slideTo(_index2, speed, runCallbacks); 26954 } 26955 } 26956 } else { 26957 swiper.slideTo(0, speed, runCallbacks); 26958 } 26959 } 26960}; 26961var History$1 = { 26962 name: 'history', 26963 params: { 26964 history: { 26965 enabled: false, 26966 replaceState: false, 26967 key: 'slides' 26968 } 26969 }, 26970 create: function create() { 26971 var swiper = this; 26972 Utils.extend(swiper, { 26973 history: { 26974 init: History.init.bind(swiper), 26975 setHistory: History.setHistory.bind(swiper), 26976 setHistoryPopState: History.setHistoryPopState.bind(swiper), 26977 scrollToSlide: History.scrollToSlide.bind(swiper), 26978 destroy: History.destroy.bind(swiper) 26979 } 26980 }); 26981 }, 26982 on: { 26983 init: function init() { 26984 var swiper = this; 26985 if (swiper.params.history.enabled) { 26986 swiper.history.init(); 26987 } 26988 }, 26989 destroy: function destroy() { 26990 var swiper = this; 26991 if (swiper.params.history.enabled) { 26992 swiper.history.destroy(); 26993 } 26994 }, 26995 transitionEnd: function transitionEnd() { 26996 var swiper = this; 26997 if (swiper.history.initialized) { 26998 swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex); 26999 } 27000 }, 27001 slideChange: function slideChange() { 27002 var swiper = this; 27003 if (swiper.history.initialized && swiper.params.cssMode) { 27004 swiper.history.setHistory(swiper.params.history.key, swiper.activeIndex); 27005 } 27006 } 27007 } 27008}; 27009var HashNavigation = { 27010 onHashCange: function onHashCange() { 27011 var swiper = this; 27012 swiper.emit('hashChange'); 27013 var newHash = ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].location.hash.replace('#', ''); 27014 var activeSlideHash = swiper.slides.eq(swiper.activeIndex).attr('data-hash'); 27015 if (newHash !== activeSlideHash) { 27016 var newIndex = swiper.$wrapperEl.children(".".concat(swiper.params.slideClass, "[data-hash=\"").concat(newHash, "\"]")).index(); 27017 if (typeof newIndex === 'undefined') return; 27018 swiper.slideTo(newIndex); 27019 } 27020 }, 27021 setHash: function setHash() { 27022 var swiper = this; 27023 if (!swiper.hashNavigation.initialized || !swiper.params.hashNavigation.enabled) return; 27024 if (swiper.params.hashNavigation.replaceState && ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].history && ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].history.replaceState) { 27025 ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"].history.replaceState(null, null, "#".concat(swiper.slides.eq(swiper.activeIndex).attr('data-hash')) || false); 27026 swiper.emit('hashSet'); 27027 } else { 27028 var _slide4 = swiper.slides.eq(swiper.activeIndex); 27029 var hash = _slide4.attr('data-hash') || _slide4.attr('data-history'); 27030 ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].location.hash = hash || ''; 27031 swiper.emit('hashSet'); 27032 } 27033 }, 27034 init: function init() { 27035 var swiper = this; 27036 if (!swiper.params.hashNavigation.enabled || swiper.params.history && swiper.params.history.enabled) return; 27037 swiper.hashNavigation.initialized = true; 27038 var hash = ssr_window__WEBPACK_IMPORTED_MODULE_1__["document"].location.hash.replace('#', ''); 27039 if (hash) { 27040 var speed = 0; 27041 for (var i = 0, length = swiper.slides.length; i < length; i += 1) { 27042 var _slide5 = swiper.slides.eq(i); 27043 var slideHash = _slide5.attr('data-hash') || _slide5.attr('data-history'); 27044 if (slideHash === hash && !_slide5.hasClass(swiper.params.slideDuplicateClass)) { 27045 var _index3 = _slide5.index(); 27046 swiper.slideTo(_index3, speed, swiper.params.runCallbacksOnInit, true); 27047 } 27048 } 27049 } 27050 if (swiper.params.hashNavigation.watchState) { 27051 Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"]).on('hashchange', swiper.hashNavigation.onHashCange); 27052 } 27053 }, 27054 destroy: function destroy() { 27055 var swiper = this; 27056 if (swiper.params.hashNavigation.watchState) { 27057 Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(ssr_window__WEBPACK_IMPORTED_MODULE_1__["window"]).off('hashchange', swiper.hashNavigation.onHashCange); 27058 } 27059 } 27060}; 27061var HashNavigation$1 = { 27062 name: 'hash-navigation', 27063 params: { 27064 hashNavigation: { 27065 enabled: false, 27066 replaceState: false, 27067 watchState: false 27068 } 27069 }, 27070 create: function create() { 27071 var swiper = this; 27072 Utils.extend(swiper, { 27073 hashNavigation: { 27074 initialized: false, 27075 init: HashNavigation.init.bind(swiper), 27076 destroy: HashNavigation.destroy.bind(swiper), 27077 setHash: HashNavigation.setHash.bind(swiper), 27078 onHashCange: HashNavigation.onHashCange.bind(swiper) 27079 } 27080 }); 27081 }, 27082 on: { 27083 init: function init() { 27084 var swiper = this; 27085 if (swiper.params.hashNavigation.enabled) { 27086 swiper.hashNavigation.init(); 27087 } 27088 }, 27089 destroy: function destroy() { 27090 var swiper = this; 27091 if (swiper.params.hashNavigation.enabled) { 27092 swiper.hashNavigation.destroy(); 27093 } 27094 }, 27095 transitionEnd: function transitionEnd() { 27096 var swiper = this; 27097 if (swiper.hashNavigation.initialized) { 27098 swiper.hashNavigation.setHash(); 27099 } 27100 }, 27101 slideChange: function slideChange() { 27102 var swiper = this; 27103 if (swiper.hashNavigation.initialized && swiper.params.cssMode) { 27104 swiper.hashNavigation.setHash(); 27105 } 27106 } 27107 } 27108}; 27109 27110/* eslint no-underscore-dangle: "off" */ 27111 27112var Autoplay = { 27113 run: function run() { 27114 var swiper = this; 27115 var $activeSlideEl = swiper.slides.eq(swiper.activeIndex); 27116 var delay = swiper.params.autoplay.delay; 27117 if ($activeSlideEl.attr('data-swiper-autoplay')) { 27118 delay = $activeSlideEl.attr('data-swiper-autoplay') || swiper.params.autoplay.delay; 27119 } 27120 clearTimeout(swiper.autoplay.timeout); 27121 swiper.autoplay.timeout = Utils.nextTick(function () { 27122 if (swiper.params.autoplay.reverseDirection) { 27123 if (swiper.params.loop) { 27124 swiper.loopFix(); 27125 swiper.slidePrev(swiper.params.speed, true, true); 27126 swiper.emit('autoplay'); 27127 } else if (!swiper.isBeginning) { 27128 swiper.slidePrev(swiper.params.speed, true, true); 27129 swiper.emit('autoplay'); 27130 } else if (!swiper.params.autoplay.stopOnLastSlide) { 27131 swiper.slideTo(swiper.slides.length - 1, swiper.params.speed, true, true); 27132 swiper.emit('autoplay'); 27133 } else { 27134 swiper.autoplay.stop(); 27135 } 27136 } else if (swiper.params.loop) { 27137 swiper.loopFix(); 27138 swiper.slideNext(swiper.params.speed, true, true); 27139 swiper.emit('autoplay'); 27140 } else if (!swiper.isEnd) { 27141 swiper.slideNext(swiper.params.speed, true, true); 27142 swiper.emit('autoplay'); 27143 } else if (!swiper.params.autoplay.stopOnLastSlide) { 27144 swiper.slideTo(0, swiper.params.speed, true, true); 27145 swiper.emit('autoplay'); 27146 } else { 27147 swiper.autoplay.stop(); 27148 } 27149 if (swiper.params.cssMode && swiper.autoplay.running) swiper.autoplay.run(); 27150 }, delay); 27151 }, 27152 start: function start() { 27153 var swiper = this; 27154 if (typeof swiper.autoplay.timeout !== 'undefined') return false; 27155 if (swiper.autoplay.running) return false; 27156 swiper.autoplay.running = true; 27157 swiper.emit('autoplayStart'); 27158 swiper.autoplay.run(); 27159 return true; 27160 }, 27161 stop: function stop() { 27162 var swiper = this; 27163 if (!swiper.autoplay.running) return false; 27164 if (typeof swiper.autoplay.timeout === 'undefined') return false; 27165 if (swiper.autoplay.timeout) { 27166 clearTimeout(swiper.autoplay.timeout); 27167 swiper.autoplay.timeout = undefined; 27168 } 27169 swiper.autoplay.running = false; 27170 swiper.emit('autoplayStop'); 27171 return true; 27172 }, 27173 pause: function pause(speed) { 27174 var swiper = this; 27175 if (!swiper.autoplay.running) return; 27176 if (swiper.autoplay.paused) return; 27177 if (swiper.autoplay.timeout) clearTimeout(swiper.autoplay.timeout); 27178 swiper.autoplay.paused = true; 27179 if (speed === 0 || !swiper.params.autoplay.waitForTransition) { 27180 swiper.autoplay.paused = false; 27181 swiper.autoplay.run(); 27182 } else { 27183 swiper.$wrapperEl[0].addEventListener('transitionend', swiper.autoplay.onTransitionEnd); 27184 swiper.$wrapperEl[0].addEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd); 27185 } 27186 } 27187}; 27188var Autoplay$1 = { 27189 name: 'autoplay', 27190 params: { 27191 autoplay: { 27192 enabled: false, 27193 delay: 3000, 27194 waitForTransition: true, 27195 disableOnInteraction: true, 27196 stopOnLastSlide: false, 27197 reverseDirection: false 27198 } 27199 }, 27200 create: function create() { 27201 var swiper = this; 27202 Utils.extend(swiper, { 27203 autoplay: { 27204 running: false, 27205 paused: false, 27206 run: Autoplay.run.bind(swiper), 27207 start: Autoplay.start.bind(swiper), 27208 stop: Autoplay.stop.bind(swiper), 27209 pause: Autoplay.pause.bind(swiper), 27210 onVisibilityChange: function onVisibilityChange() { 27211 if (document.visibilityState === 'hidden' && swiper.autoplay.running) { 27212 swiper.autoplay.pause(); 27213 } 27214 if (document.visibilityState === 'visible' && swiper.autoplay.paused) { 27215 swiper.autoplay.run(); 27216 swiper.autoplay.paused = false; 27217 } 27218 }, 27219 onTransitionEnd: function onTransitionEnd(e) { 27220 if (!swiper || swiper.destroyed || !swiper.$wrapperEl) return; 27221 if (e.target !== this) return; 27222 swiper.$wrapperEl[0].removeEventListener('transitionend', swiper.autoplay.onTransitionEnd); 27223 swiper.$wrapperEl[0].removeEventListener('webkitTransitionEnd', swiper.autoplay.onTransitionEnd); 27224 swiper.autoplay.paused = false; 27225 if (!swiper.autoplay.running) { 27226 swiper.autoplay.stop(); 27227 } else { 27228 swiper.autoplay.run(); 27229 } 27230 } 27231 } 27232 }); 27233 }, 27234 on: { 27235 init: function init() { 27236 var swiper = this; 27237 if (swiper.params.autoplay.enabled) { 27238 swiper.autoplay.start(); 27239 document.addEventListener('visibilitychange', swiper.autoplay.onVisibilityChange); 27240 } 27241 }, 27242 beforeTransitionStart: function beforeTransitionStart(speed, internal) { 27243 var swiper = this; 27244 if (swiper.autoplay.running) { 27245 if (internal || !swiper.params.autoplay.disableOnInteraction) { 27246 swiper.autoplay.pause(speed); 27247 } else { 27248 swiper.autoplay.stop(); 27249 } 27250 } 27251 }, 27252 sliderFirstMove: function sliderFirstMove() { 27253 var swiper = this; 27254 if (swiper.autoplay.running) { 27255 if (swiper.params.autoplay.disableOnInteraction) { 27256 swiper.autoplay.stop(); 27257 } else { 27258 swiper.autoplay.pause(); 27259 } 27260 } 27261 }, 27262 touchEnd: function touchEnd() { 27263 var swiper = this; 27264 if (swiper.params.cssMode && swiper.autoplay.paused && !swiper.params.autoplay.disableOnInteraction) { 27265 swiper.autoplay.run(); 27266 } 27267 }, 27268 destroy: function destroy() { 27269 var swiper = this; 27270 if (swiper.autoplay.running) { 27271 swiper.autoplay.stop(); 27272 } 27273 document.removeEventListener('visibilitychange', swiper.autoplay.onVisibilityChange); 27274 } 27275 } 27276}; 27277var Fade = { 27278 setTranslate: function setTranslate() { 27279 var swiper = this; 27280 var slides = swiper.slides; 27281 for (var i = 0; i < slides.length; i += 1) { 27282 var $slideEl = swiper.slides.eq(i); 27283 var _offset = $slideEl[0].swiperSlideOffset; 27284 var tx = -_offset; 27285 if (!swiper.params.virtualTranslate) tx -= swiper.translate; 27286 var ty = 0; 27287 if (!swiper.isHorizontal()) { 27288 ty = tx; 27289 tx = 0; 27290 } 27291 var slideOpacity = swiper.params.fadeEffect.crossFade ? Math.max(1 - Math.abs($slideEl[0].progress), 0) : 1 + Math.min(Math.max($slideEl[0].progress, -1), 0); 27292 $slideEl.css({ 27293 opacity: slideOpacity 27294 }).transform("translate3d(".concat(tx, "px, ").concat(ty, "px, 0px)")); 27295 } 27296 }, 27297 setTransition: function setTransition(duration) { 27298 var swiper = this; 27299 var slides = swiper.slides, 27300 $wrapperEl = swiper.$wrapperEl; 27301 slides.transition(duration); 27302 if (swiper.params.virtualTranslate && duration !== 0) { 27303 var eventTriggered = false; 27304 slides.transitionEnd(function () { 27305 if (eventTriggered) return; 27306 if (!swiper || swiper.destroyed) return; 27307 eventTriggered = true; 27308 swiper.animating = false; 27309 var triggerEvents = ['webkitTransitionEnd', 'transitionend']; 27310 for (var i = 0; i < triggerEvents.length; i += 1) { 27311 $wrapperEl.trigger(triggerEvents[i]); 27312 } 27313 }); 27314 } 27315 } 27316}; 27317var EffectFade = { 27318 name: 'effect-fade', 27319 params: { 27320 fadeEffect: { 27321 crossFade: false 27322 } 27323 }, 27324 create: function create() { 27325 var swiper = this; 27326 Utils.extend(swiper, { 27327 fadeEffect: { 27328 setTranslate: Fade.setTranslate.bind(swiper), 27329 setTransition: Fade.setTransition.bind(swiper) 27330 } 27331 }); 27332 }, 27333 on: { 27334 beforeInit: function beforeInit() { 27335 var swiper = this; 27336 if (swiper.params.effect !== 'fade') return; 27337 swiper.classNames.push("".concat(swiper.params.containerModifierClass, "fade")); 27338 var overwriteParams = { 27339 slidesPerView: 1, 27340 slidesPerColumn: 1, 27341 slidesPerGroup: 1, 27342 watchSlidesProgress: true, 27343 spaceBetween: 0, 27344 virtualTranslate: true 27345 }; 27346 Utils.extend(swiper.params, overwriteParams); 27347 Utils.extend(swiper.originalParams, overwriteParams); 27348 }, 27349 setTranslate: function setTranslate() { 27350 var swiper = this; 27351 if (swiper.params.effect !== 'fade') return; 27352 swiper.fadeEffect.setTranslate(); 27353 }, 27354 setTransition: function setTransition(duration) { 27355 var swiper = this; 27356 if (swiper.params.effect !== 'fade') return; 27357 swiper.fadeEffect.setTransition(duration); 27358 } 27359 } 27360}; 27361var Cube = { 27362 setTranslate: function setTranslate() { 27363 var swiper = this; 27364 var $el = swiper.$el, 27365 $wrapperEl = swiper.$wrapperEl, 27366 slides = swiper.slides, 27367 swiperWidth = swiper.width, 27368 swiperHeight = swiper.height, 27369 rtl = swiper.rtlTranslate, 27370 swiperSize = swiper.size; 27371 var params = swiper.params.cubeEffect; 27372 var isHorizontal = swiper.isHorizontal(); 27373 var isVirtual = swiper.virtual && swiper.params.virtual.enabled; 27374 var wrapperRotate = 0; 27375 var $cubeShadowEl; 27376 if (params.shadow) { 27377 if (isHorizontal) { 27378 $cubeShadowEl = $wrapperEl.find('.swiper-cube-shadow'); 27379 if ($cubeShadowEl.length === 0) { 27380 $cubeShadowEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])('<div class="swiper-cube-shadow"></div>'); 27381 $wrapperEl.append($cubeShadowEl); 27382 } 27383 $cubeShadowEl.css({ 27384 height: "".concat(swiperWidth, "px") 27385 }); 27386 } else { 27387 $cubeShadowEl = $el.find('.swiper-cube-shadow'); 27388 if ($cubeShadowEl.length === 0) { 27389 $cubeShadowEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])('<div class="swiper-cube-shadow"></div>'); 27390 $el.append($cubeShadowEl); 27391 } 27392 } 27393 } 27394 for (var i = 0; i < slides.length; i += 1) { 27395 var $slideEl = slides.eq(i); 27396 var slideIndex = i; 27397 if (isVirtual) { 27398 slideIndex = parseInt($slideEl.attr('data-swiper-slide-index'), 10); 27399 } 27400 var slideAngle = slideIndex * 90; 27401 var round = Math.floor(slideAngle / 360); 27402 if (rtl) { 27403 slideAngle = -slideAngle; 27404 round = Math.floor(-slideAngle / 360); 27405 } 27406 var progress = Math.max(Math.min($slideEl[0].progress, 1), -1); 27407 var tx = 0; 27408 var ty = 0; 27409 var tz = 0; 27410 if (slideIndex % 4 === 0) { 27411 tx = -round * 4 * swiperSize; 27412 tz = 0; 27413 } else if ((slideIndex - 1) % 4 === 0) { 27414 tx = 0; 27415 tz = -round * 4 * swiperSize; 27416 } else if ((slideIndex - 2) % 4 === 0) { 27417 tx = swiperSize + round * 4 * swiperSize; 27418 tz = swiperSize; 27419 } else if ((slideIndex - 3) % 4 === 0) { 27420 tx = -swiperSize; 27421 tz = 3 * swiperSize + swiperSize * 4 * round; 27422 } 27423 if (rtl) { 27424 tx = -tx; 27425 } 27426 if (!isHorizontal) { 27427 ty = tx; 27428 tx = 0; 27429 } 27430 var _transform = "rotateX(".concat(isHorizontal ? 0 : -slideAngle, "deg) rotateY(").concat(isHorizontal ? slideAngle : 0, "deg) translate3d(").concat(tx, "px, ").concat(ty, "px, ").concat(tz, "px)"); 27431 if (progress <= 1 && progress > -1) { 27432 wrapperRotate = slideIndex * 90 + progress * 90; 27433 if (rtl) wrapperRotate = -slideIndex * 90 - progress * 90; 27434 } 27435 $slideEl.transform(_transform); 27436 if (params.slideShadows) { 27437 // Set shadows 27438 var shadowBefore = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); 27439 var shadowAfter = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); 27440 if (shadowBefore.length === 0) { 27441 shadowBefore = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])("<div class=\"swiper-slide-shadow-".concat(isHorizontal ? 'left' : 'top', "\"></div>")); 27442 $slideEl.append(shadowBefore); 27443 } 27444 if (shadowAfter.length === 0) { 27445 shadowAfter = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])("<div class=\"swiper-slide-shadow-".concat(isHorizontal ? 'right' : 'bottom', "\"></div>")); 27446 $slideEl.append(shadowAfter); 27447 } 27448 if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); 27449 if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); 27450 } 27451 } 27452 $wrapperEl.css({ 27453 '-webkit-transform-origin': "50% 50% -".concat(swiperSize / 2, "px"), 27454 '-moz-transform-origin': "50% 50% -".concat(swiperSize / 2, "px"), 27455 '-ms-transform-origin': "50% 50% -".concat(swiperSize / 2, "px"), 27456 'transform-origin': "50% 50% -".concat(swiperSize / 2, "px") 27457 }); 27458 if (params.shadow) { 27459 if (isHorizontal) { 27460 $cubeShadowEl.transform("translate3d(0px, ".concat(swiperWidth / 2 + params.shadowOffset, "px, ").concat(-swiperWidth / 2, "px) rotateX(90deg) rotateZ(0deg) scale(").concat(params.shadowScale, ")")); 27461 } else { 27462 var shadowAngle = Math.abs(wrapperRotate) - Math.floor(Math.abs(wrapperRotate) / 90) * 90; 27463 var multiplier = 1.5 - (Math.sin(shadowAngle * 2 * Math.PI / 360) / 2 + Math.cos(shadowAngle * 2 * Math.PI / 360) / 2); 27464 var scale1 = params.shadowScale; 27465 var scale2 = params.shadowScale / multiplier; 27466 var _offset2 = params.shadowOffset; 27467 $cubeShadowEl.transform("scale3d(".concat(scale1, ", 1, ").concat(scale2, ") translate3d(0px, ").concat(swiperHeight / 2 + _offset2, "px, ").concat(-swiperHeight / 2 / scale2, "px) rotateX(-90deg)")); 27468 } 27469 } 27470 var zFactor = Browser.isSafari || Browser.isWebView ? -swiperSize / 2 : 0; 27471 $wrapperEl.transform("translate3d(0px,0,".concat(zFactor, "px) rotateX(").concat(swiper.isHorizontal() ? 0 : wrapperRotate, "deg) rotateY(").concat(swiper.isHorizontal() ? -wrapperRotate : 0, "deg)")); 27472 }, 27473 setTransition: function setTransition(duration) { 27474 var swiper = this; 27475 var $el = swiper.$el, 27476 slides = swiper.slides; 27477 slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); 27478 if (swiper.params.cubeEffect.shadow && !swiper.isHorizontal()) { 27479 $el.find('.swiper-cube-shadow').transition(duration); 27480 } 27481 } 27482}; 27483var EffectCube = { 27484 name: 'effect-cube', 27485 params: { 27486 cubeEffect: { 27487 slideShadows: true, 27488 shadow: true, 27489 shadowOffset: 20, 27490 shadowScale: 0.94 27491 } 27492 }, 27493 create: function create() { 27494 var swiper = this; 27495 Utils.extend(swiper, { 27496 cubeEffect: { 27497 setTranslate: Cube.setTranslate.bind(swiper), 27498 setTransition: Cube.setTransition.bind(swiper) 27499 } 27500 }); 27501 }, 27502 on: { 27503 beforeInit: function beforeInit() { 27504 var swiper = this; 27505 if (swiper.params.effect !== 'cube') return; 27506 swiper.classNames.push("".concat(swiper.params.containerModifierClass, "cube")); 27507 swiper.classNames.push("".concat(swiper.params.containerModifierClass, "3d")); 27508 var overwriteParams = { 27509 slidesPerView: 1, 27510 slidesPerColumn: 1, 27511 slidesPerGroup: 1, 27512 watchSlidesProgress: true, 27513 resistanceRatio: 0, 27514 spaceBetween: 0, 27515 centeredSlides: false, 27516 virtualTranslate: true 27517 }; 27518 Utils.extend(swiper.params, overwriteParams); 27519 Utils.extend(swiper.originalParams, overwriteParams); 27520 }, 27521 setTranslate: function setTranslate() { 27522 var swiper = this; 27523 if (swiper.params.effect !== 'cube') return; 27524 swiper.cubeEffect.setTranslate(); 27525 }, 27526 setTransition: function setTransition(duration) { 27527 var swiper = this; 27528 if (swiper.params.effect !== 'cube') return; 27529 swiper.cubeEffect.setTransition(duration); 27530 } 27531 } 27532}; 27533var Flip = { 27534 setTranslate: function setTranslate() { 27535 var swiper = this; 27536 var slides = swiper.slides, 27537 rtl = swiper.rtlTranslate; 27538 for (var i = 0; i < slides.length; i += 1) { 27539 var $slideEl = slides.eq(i); 27540 var progress = $slideEl[0].progress; 27541 if (swiper.params.flipEffect.limitRotation) { 27542 progress = Math.max(Math.min($slideEl[0].progress, 1), -1); 27543 } 27544 var _offset3 = $slideEl[0].swiperSlideOffset; 27545 var rotate = -180 * progress; 27546 var rotateY = rotate; 27547 var rotateX = 0; 27548 var tx = -_offset3; 27549 var ty = 0; 27550 if (!swiper.isHorizontal()) { 27551 ty = tx; 27552 tx = 0; 27553 rotateX = -rotateY; 27554 rotateY = 0; 27555 } else if (rtl) { 27556 rotateY = -rotateY; 27557 } 27558 $slideEl[0].style.zIndex = -Math.abs(Math.round(progress)) + slides.length; 27559 if (swiper.params.flipEffect.slideShadows) { 27560 // Set shadows 27561 var shadowBefore = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); 27562 var shadowAfter = swiper.isHorizontal() ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); 27563 if (shadowBefore.length === 0) { 27564 shadowBefore = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])("<div class=\"swiper-slide-shadow-".concat(swiper.isHorizontal() ? 'left' : 'top', "\"></div>")); 27565 $slideEl.append(shadowBefore); 27566 } 27567 if (shadowAfter.length === 0) { 27568 shadowAfter = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])("<div class=\"swiper-slide-shadow-".concat(swiper.isHorizontal() ? 'right' : 'bottom', "\"></div>")); 27569 $slideEl.append(shadowAfter); 27570 } 27571 if (shadowBefore.length) shadowBefore[0].style.opacity = Math.max(-progress, 0); 27572 if (shadowAfter.length) shadowAfter[0].style.opacity = Math.max(progress, 0); 27573 } 27574 $slideEl.transform("translate3d(".concat(tx, "px, ").concat(ty, "px, 0px) rotateX(").concat(rotateX, "deg) rotateY(").concat(rotateY, "deg)")); 27575 } 27576 }, 27577 setTransition: function setTransition(duration) { 27578 var swiper = this; 27579 var slides = swiper.slides, 27580 activeIndex = swiper.activeIndex, 27581 $wrapperEl = swiper.$wrapperEl; 27582 slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); 27583 if (swiper.params.virtualTranslate && duration !== 0) { 27584 var eventTriggered = false; 27585 // eslint-disable-next-line 27586 slides.eq(activeIndex).transitionEnd(function onTransitionEnd() { 27587 if (eventTriggered) return; 27588 if (!swiper || swiper.destroyed) return; 27589 // if (!$(this).hasClass(swiper.params.slideActiveClass)) return; 27590 eventTriggered = true; 27591 swiper.animating = false; 27592 var triggerEvents = ['webkitTransitionEnd', 'transitionend']; 27593 for (var i = 0; i < triggerEvents.length; i += 1) { 27594 $wrapperEl.trigger(triggerEvents[i]); 27595 } 27596 }); 27597 } 27598 } 27599}; 27600var EffectFlip = { 27601 name: 'effect-flip', 27602 params: { 27603 flipEffect: { 27604 slideShadows: true, 27605 limitRotation: true 27606 } 27607 }, 27608 create: function create() { 27609 var swiper = this; 27610 Utils.extend(swiper, { 27611 flipEffect: { 27612 setTranslate: Flip.setTranslate.bind(swiper), 27613 setTransition: Flip.setTransition.bind(swiper) 27614 } 27615 }); 27616 }, 27617 on: { 27618 beforeInit: function beforeInit() { 27619 var swiper = this; 27620 if (swiper.params.effect !== 'flip') return; 27621 swiper.classNames.push("".concat(swiper.params.containerModifierClass, "flip")); 27622 swiper.classNames.push("".concat(swiper.params.containerModifierClass, "3d")); 27623 var overwriteParams = { 27624 slidesPerView: 1, 27625 slidesPerColumn: 1, 27626 slidesPerGroup: 1, 27627 watchSlidesProgress: true, 27628 spaceBetween: 0, 27629 virtualTranslate: true 27630 }; 27631 Utils.extend(swiper.params, overwriteParams); 27632 Utils.extend(swiper.originalParams, overwriteParams); 27633 }, 27634 setTranslate: function setTranslate() { 27635 var swiper = this; 27636 if (swiper.params.effect !== 'flip') return; 27637 swiper.flipEffect.setTranslate(); 27638 }, 27639 setTransition: function setTransition(duration) { 27640 var swiper = this; 27641 if (swiper.params.effect !== 'flip') return; 27642 swiper.flipEffect.setTransition(duration); 27643 } 27644 } 27645}; 27646var Coverflow = { 27647 setTranslate: function setTranslate() { 27648 var swiper = this; 27649 var swiperWidth = swiper.width, 27650 swiperHeight = swiper.height, 27651 slides = swiper.slides, 27652 $wrapperEl = swiper.$wrapperEl, 27653 slidesSizesGrid = swiper.slidesSizesGrid; 27654 var params = swiper.params.coverflowEffect; 27655 var isHorizontal = swiper.isHorizontal(); 27656 var transform = swiper.translate; 27657 var center = isHorizontal ? -transform + swiperWidth / 2 : -transform + swiperHeight / 2; 27658 var rotate = isHorizontal ? params.rotate : -params.rotate; 27659 var translate = params.depth; 27660 // Each slide offset from center 27661 for (var i = 0, length = slides.length; i < length; i += 1) { 27662 var $slideEl = slides.eq(i); 27663 var slideSize = slidesSizesGrid[i]; 27664 var slideOffset = $slideEl[0].swiperSlideOffset; 27665 var offsetMultiplier = (center - slideOffset - slideSize / 2) / slideSize * params.modifier; 27666 var rotateY = isHorizontal ? rotate * offsetMultiplier : 0; 27667 var rotateX = isHorizontal ? 0 : rotate * offsetMultiplier; 27668 // var rotateZ = 0 27669 var translateZ = -translate * Math.abs(offsetMultiplier); 27670 var stretch = params.stretch; 27671 // Allow percentage to make a relative stretch for responsive sliders 27672 if (typeof stretch === 'string' && stretch.indexOf('%') !== -1) { 27673 stretch = parseFloat(params.stretch) / 100 * slideSize; 27674 } 27675 var translateY = isHorizontal ? 0 : stretch * offsetMultiplier; 27676 var translateX = isHorizontal ? stretch * offsetMultiplier : 0; 27677 var scale = 1 - (1 - params.scale) * Math.abs(offsetMultiplier); 27678 27679 // Fix for ultra small values 27680 if (Math.abs(translateX) < 0.001) translateX = 0; 27681 if (Math.abs(translateY) < 0.001) translateY = 0; 27682 if (Math.abs(translateZ) < 0.001) translateZ = 0; 27683 if (Math.abs(rotateY) < 0.001) rotateY = 0; 27684 if (Math.abs(rotateX) < 0.001) rotateX = 0; 27685 if (Math.abs(scale) < 0.001) scale = 0; 27686 var slideTransform = "translate3d(".concat(translateX, "px,").concat(translateY, "px,").concat(translateZ, "px) rotateX(").concat(rotateX, "deg) rotateY(").concat(rotateY, "deg) scale(").concat(scale, ")"); 27687 $slideEl.transform(slideTransform); 27688 $slideEl[0].style.zIndex = -Math.abs(Math.round(offsetMultiplier)) + 1; 27689 if (params.slideShadows) { 27690 // Set shadows 27691 var $shadowBeforeEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-left') : $slideEl.find('.swiper-slide-shadow-top'); 27692 var $shadowAfterEl = isHorizontal ? $slideEl.find('.swiper-slide-shadow-right') : $slideEl.find('.swiper-slide-shadow-bottom'); 27693 if ($shadowBeforeEl.length === 0) { 27694 $shadowBeforeEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])("<div class=\"swiper-slide-shadow-".concat(isHorizontal ? 'left' : 'top', "\"></div>")); 27695 $slideEl.append($shadowBeforeEl); 27696 } 27697 if ($shadowAfterEl.length === 0) { 27698 $shadowAfterEl = Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])("<div class=\"swiper-slide-shadow-".concat(isHorizontal ? 'right' : 'bottom', "\"></div>")); 27699 $slideEl.append($shadowAfterEl); 27700 } 27701 if ($shadowBeforeEl.length) $shadowBeforeEl[0].style.opacity = offsetMultiplier > 0 ? offsetMultiplier : 0; 27702 if ($shadowAfterEl.length) $shadowAfterEl[0].style.opacity = -offsetMultiplier > 0 ? -offsetMultiplier : 0; 27703 } 27704 } 27705 27706 // Set correct perspective for IE10 27707 if (Support.pointerEvents || Support.prefixedPointerEvents) { 27708 var ws = $wrapperEl[0].style; 27709 ws.perspectiveOrigin = "".concat(center, "px 50%"); 27710 } 27711 }, 27712 setTransition: function setTransition(duration) { 27713 var swiper = this; 27714 swiper.slides.transition(duration).find('.swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left').transition(duration); 27715 } 27716}; 27717var EffectCoverflow = { 27718 name: 'effect-coverflow', 27719 params: { 27720 coverflowEffect: { 27721 rotate: 50, 27722 stretch: 0, 27723 depth: 100, 27724 scale: 1, 27725 modifier: 1, 27726 slideShadows: true 27727 } 27728 }, 27729 create: function create() { 27730 var swiper = this; 27731 Utils.extend(swiper, { 27732 coverflowEffect: { 27733 setTranslate: Coverflow.setTranslate.bind(swiper), 27734 setTransition: Coverflow.setTransition.bind(swiper) 27735 } 27736 }); 27737 }, 27738 on: { 27739 beforeInit: function beforeInit() { 27740 var swiper = this; 27741 if (swiper.params.effect !== 'coverflow') return; 27742 swiper.classNames.push("".concat(swiper.params.containerModifierClass, "coverflow")); 27743 swiper.classNames.push("".concat(swiper.params.containerModifierClass, "3d")); 27744 swiper.params.watchSlidesProgress = true; 27745 swiper.originalParams.watchSlidesProgress = true; 27746 }, 27747 setTranslate: function setTranslate() { 27748 var swiper = this; 27749 if (swiper.params.effect !== 'coverflow') return; 27750 swiper.coverflowEffect.setTranslate(); 27751 }, 27752 setTransition: function setTransition(duration) { 27753 var swiper = this; 27754 if (swiper.params.effect !== 'coverflow') return; 27755 swiper.coverflowEffect.setTransition(duration); 27756 } 27757 } 27758}; 27759var Thumbs = { 27760 init: function init() { 27761 var swiper = this; 27762 var thumbsParams = swiper.params.thumbs; 27763 var SwiperClass = swiper.constructor; 27764 if (thumbsParams.swiper instanceof SwiperClass) { 27765 swiper.thumbs.swiper = thumbsParams.swiper; 27766 Utils.extend(swiper.thumbs.swiper.originalParams, { 27767 watchSlidesProgress: true, 27768 slideToClickedSlide: false 27769 }); 27770 Utils.extend(swiper.thumbs.swiper.params, { 27771 watchSlidesProgress: true, 27772 slideToClickedSlide: false 27773 }); 27774 } else if (Utils.isObject(thumbsParams.swiper)) { 27775 swiper.thumbs.swiper = new SwiperClass(Utils.extend({}, thumbsParams.swiper, { 27776 watchSlidesVisibility: true, 27777 watchSlidesProgress: true, 27778 slideToClickedSlide: false 27779 })); 27780 swiper.thumbs.swiperCreated = true; 27781 } 27782 swiper.thumbs.swiper.$el.addClass(swiper.params.thumbs.thumbsContainerClass); 27783 swiper.thumbs.swiper.on('tap', swiper.thumbs.onThumbClick); 27784 }, 27785 onThumbClick: function onThumbClick() { 27786 var swiper = this; 27787 var thumbsSwiper = swiper.thumbs.swiper; 27788 if (!thumbsSwiper) return; 27789 var clickedIndex = thumbsSwiper.clickedIndex; 27790 var clickedSlide = thumbsSwiper.clickedSlide; 27791 if (clickedSlide && Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(clickedSlide).hasClass(swiper.params.thumbs.slideThumbActiveClass)) return; 27792 if (typeof clickedIndex === 'undefined' || clickedIndex === null) return; 27793 var slideToIndex; 27794 if (thumbsSwiper.params.loop) { 27795 slideToIndex = parseInt(Object(dom7_dist_dom7_modular__WEBPACK_IMPORTED_MODULE_0__["$"])(thumbsSwiper.clickedSlide).attr('data-swiper-slide-index'), 10); 27796 } else { 27797 slideToIndex = clickedIndex; 27798 } 27799 if (swiper.params.loop) { 27800 var currentIndex = swiper.activeIndex; 27801 if (swiper.slides.eq(currentIndex).hasClass(swiper.params.slideDuplicateClass)) { 27802 swiper.loopFix(); 27803 // eslint-disable-next-line 27804 swiper._clientLeft = swiper.$wrapperEl[0].clientLeft; 27805 currentIndex = swiper.activeIndex; 27806 } 27807 var prevIndex = swiper.slides.eq(currentIndex).prevAll("[data-swiper-slide-index=\"".concat(slideToIndex, "\"]")).eq(0).index(); 27808 var nextIndex = swiper.slides.eq(currentIndex).nextAll("[data-swiper-slide-index=\"".concat(slideToIndex, "\"]")).eq(0).index(); 27809 if (typeof prevIndex === 'undefined') slideToIndex = nextIndex;else if (typeof nextIndex === 'undefined') slideToIndex = prevIndex;else if (nextIndex - currentIndex < currentIndex - prevIndex) slideToIndex = nextIndex;else slideToIndex = prevIndex; 27810 } 27811 swiper.slideTo(slideToIndex); 27812 }, 27813 update: function update(initial) { 27814 var swiper = this; 27815 var thumbsSwiper = swiper.thumbs.swiper; 27816 if (!thumbsSwiper) return; 27817 var slidesPerView = thumbsSwiper.params.slidesPerView === 'auto' ? thumbsSwiper.slidesPerViewDynamic() : thumbsSwiper.params.slidesPerView; 27818 var autoScrollOffset = swiper.params.thumbs.autoScrollOffset; 27819 var useOffset = autoScrollOffset && !thumbsSwiper.params.loop; 27820 if (swiper.realIndex !== thumbsSwiper.realIndex || useOffset) { 27821 var currentThumbsIndex = thumbsSwiper.activeIndex; 27822 var newThumbsIndex; 27823 var direction; 27824 if (thumbsSwiper.params.loop) { 27825 if (thumbsSwiper.slides.eq(currentThumbsIndex).hasClass(thumbsSwiper.params.slideDuplicateClass)) { 27826 thumbsSwiper.loopFix(); 27827 // eslint-disable-next-line 27828 thumbsSwiper._clientLeft = thumbsSwiper.$wrapperEl[0].clientLeft; 27829 currentThumbsIndex = thumbsSwiper.activeIndex; 27830 } 27831 // Find actual thumbs index to slide to 27832 var prevThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).prevAll("[data-swiper-slide-index=\"".concat(swiper.realIndex, "\"]")).eq(0).index(); 27833 var nextThumbsIndex = thumbsSwiper.slides.eq(currentThumbsIndex).nextAll("[data-swiper-slide-index=\"".concat(swiper.realIndex, "\"]")).eq(0).index(); 27834 if (typeof prevThumbsIndex === 'undefined') newThumbsIndex = nextThumbsIndex;else if (typeof nextThumbsIndex === 'undefined') newThumbsIndex = prevThumbsIndex;else if (nextThumbsIndex - currentThumbsIndex === currentThumbsIndex - prevThumbsIndex) newThumbsIndex = currentThumbsIndex;else if (nextThumbsIndex - currentThumbsIndex < currentThumbsIndex - prevThumbsIndex) newThumbsIndex = nextThumbsIndex;else newThumbsIndex = prevThumbsIndex; 27835 direction = swiper.activeIndex > swiper.previousIndex ? 'next' : 'prev'; 27836 } else { 27837 newThumbsIndex = swiper.realIndex; 27838 direction = newThumbsIndex > swiper.previousIndex ? 'next' : 'prev'; 27839 } 27840 if (useOffset) { 27841 newThumbsIndex += direction === 'next' ? autoScrollOffset : -1 * autoScrollOffset; 27842 } 27843 if (thumbsSwiper.visibleSlidesIndexes && thumbsSwiper.visibleSlidesIndexes.indexOf(newThumbsIndex) < 0) { 27844 if (thumbsSwiper.params.centeredSlides) { 27845 if (newThumbsIndex > currentThumbsIndex) { 27846 newThumbsIndex = newThumbsIndex - Math.floor(slidesPerView / 2) + 1; 27847 } else { 27848 newThumbsIndex = newThumbsIndex + Math.floor(slidesPerView / 2) - 1; 27849 } 27850 } else if (newThumbsIndex > currentThumbsIndex) { 27851 newThumbsIndex = newThumbsIndex - slidesPerView + 1; 27852 } 27853 thumbsSwiper.slideTo(newThumbsIndex, initial ? 0 : undefined); 27854 } 27855 } 27856 27857 // Activate thumbs 27858 var thumbsToActivate = 1; 27859 var thumbActiveClass = swiper.params.thumbs.slideThumbActiveClass; 27860 if (swiper.params.slidesPerView > 1 && !swiper.params.centeredSlides) { 27861 thumbsToActivate = swiper.params.slidesPerView; 27862 } 27863 if (!swiper.params.thumbs.multipleActiveThumbs) { 27864 thumbsToActivate = 1; 27865 } 27866 thumbsToActivate = Math.floor(thumbsToActivate); 27867 thumbsSwiper.slides.removeClass(thumbActiveClass); 27868 if (thumbsSwiper.params.loop || thumbsSwiper.params.virtual && thumbsSwiper.params.virtual.enabled) { 27869 for (var i = 0; i < thumbsToActivate; i += 1) { 27870 thumbsSwiper.$wrapperEl.children("[data-swiper-slide-index=\"".concat(swiper.realIndex + i, "\"]")).addClass(thumbActiveClass); 27871 } 27872 } else { 27873 for (var _i13 = 0; _i13 < thumbsToActivate; _i13 += 1) { 27874 thumbsSwiper.slides.eq(swiper.realIndex + _i13).addClass(thumbActiveClass); 27875 } 27876 } 27877 } 27878}; 27879var Thumbs$1 = { 27880 name: 'thumbs', 27881 params: { 27882 thumbs: { 27883 swiper: null, 27884 multipleActiveThumbs: true, 27885 autoScrollOffset: 0, 27886 slideThumbActiveClass: 'swiper-slide-thumb-active', 27887 thumbsContainerClass: 'swiper-container-thumbs' 27888 } 27889 }, 27890 create: function create() { 27891 var swiper = this; 27892 Utils.extend(swiper, { 27893 thumbs: { 27894 swiper: null, 27895 init: Thumbs.init.bind(swiper), 27896 update: Thumbs.update.bind(swiper), 27897 onThumbClick: Thumbs.onThumbClick.bind(swiper) 27898 } 27899 }); 27900 }, 27901 on: { 27902 beforeInit: function beforeInit() { 27903 var swiper = this; 27904 var thumbs = swiper.params.thumbs; 27905 if (!thumbs || !thumbs.swiper) return; 27906 swiper.thumbs.init(); 27907 swiper.thumbs.update(true); 27908 }, 27909 slideChange: function slideChange() { 27910 var swiper = this; 27911 if (!swiper.thumbs.swiper) return; 27912 swiper.thumbs.update(); 27913 }, 27914 update: function update() { 27915 var swiper = this; 27916 if (!swiper.thumbs.swiper) return; 27917 swiper.thumbs.update(); 27918 }, 27919 resize: function resize() { 27920 var swiper = this; 27921 if (!swiper.thumbs.swiper) return; 27922 swiper.thumbs.update(); 27923 }, 27924 observerUpdate: function observerUpdate() { 27925 var swiper = this; 27926 if (!swiper.thumbs.swiper) return; 27927 swiper.thumbs.update(); 27928 }, 27929 setTransition: function setTransition(duration) { 27930 var swiper = this; 27931 var thumbsSwiper = swiper.thumbs.swiper; 27932 if (!thumbsSwiper) return; 27933 thumbsSwiper.setTransition(duration); 27934 }, 27935 beforeDestroy: function beforeDestroy() { 27936 var swiper = this; 27937 var thumbsSwiper = swiper.thumbs.swiper; 27938 if (!thumbsSwiper) return; 27939 if (swiper.thumbs.swiperCreated && thumbsSwiper) { 27940 thumbsSwiper.destroy(); 27941 } 27942 } 27943 } 27944}; 27945 27946// Swiper Class 27947 27948var components = [Device$1, Support$1, Browser$1, Resize, Observer$1, Virtual$1, Keyboard$1, Mousewheel$1, Navigation$1, Pagination$1, Scrollbar$1, Parallax$1, Zoom$1, Lazy$1, Controller$1, A11y, History$1, HashNavigation$1, Autoplay$1, EffectFade, EffectCube, EffectFlip, EffectCoverflow, Thumbs$1]; 27949if (typeof Swiper.use === 'undefined') { 27950 Swiper.use = Swiper.Class.use; 27951 Swiper.installModule = Swiper.Class.installModule; 27952} 27953Swiper.use(components); 27954/* harmony default export */ __webpack_exports__["default"] = (Swiper); 27955 27956/***/ }), 27957
vendor: 724 bytes, lines 27958-27988
27958/***/ "./node_modules/webpack/buildin/global.js": 27959/*!***********************************!*\ 27960 !*** (webpack)/buildin/global.js ***! 27961 \***********************************/ 27962/*! no static exports found */ 27963/***/ (function(module, exports) { 27964 27965var g; 27966 27967// This works in non-strict mode 27968g = (function() { 27969 return this; 27970})(); 27971 27972try { 27973 // This works if eval is allowed (see CSP) 27974 g = g || new Function("return this")(); 27975} catch (e) { 27976 // This works if the window reference is available 27977 if (typeof window === "object") g = window; 27978} 27979 27980// g can still be undefined, but nothing to do about it... 27981// We return undefined, instead of nothing here, so it's 27982// easier to handle this case. if(!global) { ...} 27983 27984module.exports = g; 27985 27986 27987/***/ }), 27988
27989/***/ "./src/css/style.sass": 27990/*!****************************!*\ 27991 !*** ./src/css/style.sass ***! 27992 \****************************/ 27993/*! no static exports found */ 27994/***/ (function(module, exports, __webpack_require__) { 27995 27996// extracted by mini-css-extract-plugin 27997 27998/***/ }), 27999
28000/***/ "./src/js/index.js": 28001/*!*************************!*\ 28002 !*** ./src/js/index.js ***! 28003 \*************************/ 28004/*! no exports provided */ 28005/***/ (function(module, __webpack_exports__, __webpack_require__) { 28006 28007"use strict"; 28008__webpack_require__.r(__webpack_exports__); 28009/* harmony import */ var _polyfills_polyfill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./polyfills/polyfill */ "./src/js/polyfills/polyfill.js"); 28010/* harmony import */ var _polyfills_polyfill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_polyfills_polyfill__WEBPACK_IMPORTED_MODULE_0__); 28011/* harmony import */ var bootstrap_dist_css_bootstrap_grid_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! bootstrap/dist/css/bootstrap-grid.css */ "./node_modules/bootstrap/dist/css/bootstrap-grid.css"); 28012/* harmony import */ var bootstrap_dist_css_bootstrap_grid_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(bootstrap_dist_css_bootstrap_grid_css__WEBPACK_IMPORTED_MODULE_1__); 28013/* harmony import */ var _css_style_sass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../css/style.sass */ "./src/css/style.sass"); 28014/* harmony import */ var _css_style_sass__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_css_style_sass__WEBPACK_IMPORTED_MODULE_2__); 28015/* harmony import */ var plyr_dist_plyr_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! plyr/dist/plyr.css */ "./node_modules/plyr/dist/plyr.css"); 28016/* harmony import */ var plyr_dist_plyr_css__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(plyr_dist_plyr_css__WEBPACK_IMPORTED_MODULE_3__); 28017/* harmony import */ var swiper_css_swiper_css__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! swiper/css/swiper.css */ "./node_modules/swiper/css/swiper.css"); 28018/* harmony import */ var swiper_css_swiper_css__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(swiper_css_swiper_css__WEBPACK_IMPORTED_MODULE_4__); 28019/* harmony import */ var glightbox_dist_css_glightbox_css__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! glightbox/dist/css/glightbox.css */ "./node_modules/glightbox/dist/css/glightbox.css"); 28020/* harmony import */ var glightbox_dist_css_glightbox_css__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(glightbox_dist_css_glightbox_css__WEBPACK_IMPORTED_MODULE_5__); 28021/* harmony import */ var glightbox__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! glightbox */ "./node_modules/glightbox/dist/js/glightbox.min.js"); 28022/* harmony import */ var glightbox__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(glightbox__WEBPACK_IMPORTED_MODULE_6__); 28023/* harmony import */ var gsap__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! gsap */ "./node_modules/gsap/index.js"); 28024/* harmony import */ var gsap_all__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! gsap/all */ "./node_modules/gsap/all.js"); 28025/* harmony import */ var swiper__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! swiper */ "./node_modules/swiper/js/swiper.esm.bundle.js"); 28026/* harmony import */ var smooth_scroll__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! smooth-scroll */ "./node_modules/smooth-scroll/dist/smooth-scroll.polyfills.min.js"); 28027/* harmony import */ var smooth_scroll__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(smooth_scroll__WEBPACK_IMPORTED_MODULE_10__); 28028function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 28029function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); } 28030function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } } 28031function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; } 28032function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } 28033function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
28034/////// Polyfill 28035 28036 28037////////////////////////// 28038// IMPORT CSS 28039////////////////////////// 28040 28041/////// LIBRARIES CSS 28042 28043/////// MAIN CSS 28044 28045 28046 28047 28048////////////////////////// 28049// IMPORT LIBRARIES JS 28050////////////////////////// 28051 28052// Library name 28053 28054 28055// Glightbox 28056 28057// import example from "example"; 28058 28059 28060gsap__WEBPACK_IMPORTED_MODULE_7__["default"].registerPlugin(gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"], gsap_all__WEBPACK_IMPORTED_MODULE_8__["TimelineMax"], gsap_all__WEBPACK_IMPORTED_MODULE_8__["Power2"], gsap_all__WEBPACK_IMPORTED_MODULE_8__["Elastic"], gsap_all__WEBPACK_IMPORTED_MODULE_8__["Linear"]); 28061// import Swiper JS 28062 28063// Smooth scroll 28064 28065// Plyr 28066// import Plyr from "plyr"; 28067// Lazy load 28068// import "lazysizes"; 28069// import a plugin 28070// import "lazysizes/plugins/parent-fit/ls.parent-fit"; 28071 28072//add simple support for background images: 28073document.addEventListener("lazybeforeunveil", function (e) { 28074 var bg = e.target.getAttribute("data-bg"); 28075 if (bg) { 28076 e.target.style.backgroundImage = "url(" + bg + ")"; 28077 } 28078}); 28079////////////////////////// 28080// CLASS BLOCKS 28081////////////////////////// 28082 28083//to skip btn 28084var ScrollPage = /*#__PURE__*/function () { 28085 function ScrollPage() { 28086 _classCallCheck(this, ScrollPage); 28087 this.skip = document.querySelectorAll(".js-next-section"); 28088 this.top = document.querySelector(".photoTop"); 28089 this.start(); 28090 } 28091 return _createClass(ScrollPage, [{ 28092 key: "start", 28093 value: function start() { 28094 if (this.top) { 28095 this.top.href = "#photo"; 28096 var scroll = new smooth_scroll__WEBPACK_IMPORTED_MODULE_10___default.a('a[href="#photo"]'); 28097 } 28098 if (this.skip.length > 0) { 28099 var next_container = document.querySelector("#primary").children[1]; 28100 if (next_container) { 28101 next_container.id = "next-section"; 28102 this.skip.href = "#next-section"; 28103 var scroll = new smooth_scroll__WEBPACK_IMPORTED_MODULE_10___default.a('a[href="#next-section"]'); 28104 } 28105 } 28106 } 28107 }]); 28108}(); //to formlightbox 28109var Formlightbox = /*#__PURE__*/function () { 28110 function Formlightbox() { 28111 _classCallCheck(this, Formlightbox); 28112 this.formcontainer = document.querySelectorAll(".js-lightboxForm--container"); 28113 this.start(); 28114 } 28115 return _createClass(Formlightbox, [{ 28116 key: "start", 28117 value: function start() { 28118 if (this.formcontainer[2]) { 28119 var btn = document.querySelector(".js-lightboxForm"); 28120 var form = document.querySelector(".join"); 28121 var formClose = document.querySelector(".join__close"); 28122 btn.addEventListener("click", function () { 28123 form.style.display = "flex"; 28124 }); 28125 formClose.addEventListener("click", function () { 28126 form.style.display = "none"; 28127 }); 28128 } 28129 } 28130 }]); 28131}(); //header 28132var Header = /*#__PURE__*/function () { 28133 function Header() { 28134 _classCallCheck(this, Header); 28135 this.toggleMenu = this.toggleMenu.bind(this); 28136 this.headerContainer = document.querySelector("#header"); 28137 this.state = { 28138 menuActive: false, 28139 subMenuActive: false 28140 }; 28141 this.start(); 28142 } 28143 return _createClass(Header, [{ 28144 key: "start", 28145 value: function start() { 28146 if (this.headerContainer) { 28147 // Sticky container 28148 this.stickyContainer = this.headerContainer.querySelector(".header-fix"); 28149 // Responsive menu 28150 this.menuButton = this.headerContainer.querySelector("#button__menu"); 28151 this.mainMenu = this.headerContainer.querySelector("#main__menu"); 28152 this.overlayMenu = this.headerContainer.querySelector(".header__overlay"); 28153 // Sub menu system 28154 this.menuItems = this.headerContainer.querySelectorAll(".menu > .menu-item"); 28155 this.menuItems2 = this.headerContainer.querySelector(".header__menu--info "); 28156 this.subMenuContainer = this.headerContainer.querySelectorAll(".main-menu > .menu-item-has-children"); 28157 this.subMenuContainerL2 = this.headerContainer.querySelectorAll(".main-menu > .menu-item-has-children"); 28158 // Sticky menu 28159 this.stickyTransparent(); 28160 28161 // Listeners 28162 this.menuButton.addEventListener("click", this.toggleMenu); 28163 28164 // this.closeAcc.addEventListener("click", this.toggleMenu); 28165 // for (let i = 0; i < this.subMenuContainer.length; i++) { 28166 // const item = this.subMenuContainer[i]; 28167 // item.addEventListener("mouseenter", (e) => this.subMenuToggle(e)); 28168 // item.addEventListener("mouseleave", (e) => this.subMenuToggle(e)); 28169 // } 28170 // for (let index = 0; index < this.subMenuContainerL2.length; index++) { 28171 // const item = this.subMenuContainerL2[index]; 28172 // item.addEventListener("click", (e) => this.subMenuToggle(e)); 28173 // } 28174 } 28175 } 28176 }, { 28177 key: "toggleMenu", 28178 value: function toggleMenu() { 28179 var _this = this; 28180 if (this.state.menuActive === false) { 28181 this.menuButton.classList.add("is-active"); 28182 this.mainMenu.classList.add("is-active"); 28183 this.headerContainer.classList.add("is-active"); 28184 document.body.classList.add("hidde"); 28185 // this.accesibilityInit({matches: true}); 28186 28187 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].to(this.mainMenu, 0.7, { 28188 delay: 0.2, 28189 width: "100%", 28190 opacity: 1, 28191 left: "20%", 28192 overflow: "hidden", 28193 onComplete: function onComplete() {
28194 _this.menuItems.forEach(function () { 28195 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].to(_this.menuItems, 0.2, { 28196 // delay: , 28197 opacity: 1, 28198 // x: 40, 28199 stagger: 0.1 28200 }); 28201 }); 28202 } 28203 }); 28204 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].to(this.menuItems2, 0.5, { 28205 delay: 0.7, 28206 x: 0, 28207 opacity: 1 28208 }); 28209 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].to(this.overlayMenu, 0.5, { 28210 width: "100%", 28211 opacity: 0.0 28212 }); 28213 setTimeout(function () { 28214 _this.state.menuActive = true; 28215 }, 800); 28216 } else { 28217 this.menuButton.classList.remove("is-active"); 28218 // this.mainMenu.classList.remove("is-active"); 28219 this.headerContainer.classList.remove("is-active"); 28220 document.body.classList.remove("hidde"); 28221 // this.accesibilityInit({matches: false}); 28222 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].to(this.mainMenu, 0.7, { 28223 delay: 0.2, 28224 width: 0, 28225 left: "100%", 28226 opacity: 0, 28227 onComplete: function onComplete() { 28228 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].set(_this.mainMenu, { 28229 clearProps: "all" 28230 }); 28231 } 28232 }); 28233 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].to(this.menuItems2, 0.5, { 28234 delay: 0.7, 28235 x: 300, 28236 opacity: 0 28237 }); 28238 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].to(this.overlayMenu, 0.3, { 28239 delay: 0.2, 28240 right: 0, 28241 opacity: 0, 28242 onComplete: function onComplete() { 28243 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].set(_this.overlayMenu, { 28244 clearProps: "all" 28245 }); 28246 } 28247 }); 28248 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].to(this.menuItems, 0.1, { 28249 opacity: 0, 28250 y: "20px", 28251 onComplete: function onComplete() { 28252 gsap_all__WEBPACK_IMPORTED_MODULE_8__["TweenMax"].set(_this.menuItems, { 28253 clearProps: "all" 28254 }); 28255 } 28256 }); 28257 setTimeout(function () { 28258 _this.state.menuActive = false; 28259 }, 400); 28260 } 28261 } 28262 // subMenuToggle(e) { 28263 // if (this.subMenuContainer.length > 0) { 28264 // const item = e.target; 28265 // if (this.state.subMenuActive && item.classList.contains("is-active")) { 28266 // item.classList.remove("is-active"); 28267 // } else { 28268 // item.classList.add("is-active"); 28269 // this.state.subMenuActive = true; 28270 // } 28271 // } 28272 // } 28273 }, { 28274 key: "stickyTransparent", 28275 value: function stickyTransparent() { 28276 var _this2 = this; 28277 window.onscroll = function () { 28278 var trigger = _this2.headerContainer.offsetHeight; 28279 if (window.pageYOffset > trigger - _this2.headerContainer.offsetHeight / 2) { 28280 _this2.headerContainer.classList.add("is-sticky"); 28281 } else { 28282 _this2.headerContainer.classList.remove("is-sticky"); 28283 } 28284 }; 28285 } 28286 }]); 28287}(); // Video System 28288var VideoApp = /*#__PURE__*/function () { 28289 function VideoApp() { 28290 _classCallCheck(this, VideoApp); 28291 this.fileVideo = document.getElementById("player-background"); 28292 this.frameVideo = document.querySelectorAll(".player-background-frame"); 28293 this.fileVideohome = document.querySelectorAll("#player-backgroundhome"); 28294 this.vimeoVideohome = document.querySelectorAll("#player-background-vimeohome "); 28295 this.youtubeVideohome = document.querySelector("#player-background-youtubehome"); 28296 this.bigVideo = document.querySelector(".bigVideo"); 28297 this.homeVideo = document.querySelector(".homeVideo"); 28298 this.start(); 28299 } 28300 return _createClass(VideoApp, [{ 28301 key: "start", 28302 value: function start() { 28303 if (this.fileVideo) { 28304 var videoFile = new Plyr(this.fileVideo, { 28305 mute: true, 28306 autoplay: true, 28307 controls: [], 28308 clickToPlay: false, 28309 loop: { 28310 active: true 28311 } 28312 }); 28313 } 28314 if (this.frameVideo.length > 0) { 28315 var videoFrame = new Plyr(this.frameVideo, { 28316 mute: true, 28317 autoplay: true, 28318 controls: [],
28319 clickToPlay: false, 28320 loop: { 28321 active: true 28322 } 28323 }); 28324 videoFrame.volume = 0; 28325 videoFrame.muted = true; 28326 videoFrame.autoplay = true; 28327 videoFrame.on("play", function (data) { 28328 videoFrame.muted = true; 28329 videoFrame.loop = true; 28330 videoFrame.volume = 0; 28331 }); 28332 } 28333 if (this.bigVideo) { 28334 if (this.fileVideo) { 28335 var _videoFile = new Plyr(this.fileVideo, { 28336 mute: true, 28337 autoplay: true, 28338 controls: ["play-large"], 28339 clickToPlay: false, 28340 loop: { 28341 active: true 28342 } 28343 }); 28344 } 28345 if (this.frameVideo) { 28346 var _videoFrame = new Plyr(this.frameVideo, { 28347 mute: true, 28348 autoplay: true, 28349 controls: [], 28350 clickToPlay: false, 28351 loop: { 28352 active: true 28353 } 28354 }); 28355 _videoFrame.volume = 0; 28356 _videoFrame.muted = true; 28357 _videoFrame.autoplay = true; 28358 _videoFrame.on("play", function (data) { 28359 _videoFrame.muted = true; 28360 _videoFrame.loop = true; 28361 _videoFrame.volume = 0; 28362 }); 28363 } 28364 } 28365 if (this.homeVideo) { 28366 if (this.fileVideo) { 28367 var videoHome = new Plyr(this.fileVideohome, { 28368 mute: true, 28369 autoplay: false, 28370 controls: ["play-large"], 28371 clickToPlay: false, 28372 loop: { 28373 active: true 28374 } 28375 }); 28376 } 28377 if (this.vimeoVideo) { 28378 var _videoHome = new Plyr(this.vimeoVideohome, { 28379 mute: true, 28380 autoplay: true, 28381 controls: ["play"], 28382 clickToPlay: false, 28383 loop: { 28384 active: true 28385 } 28386 }); 28387 _videoHome.muted = true; 28388 _videoHome.autoplay = true; 28389 _videoHome.on("play", function (data) { 28390 _videoHome.muted = true; 28391 _videoHome.loop = true; 28392 }); 28393 } 28394 if (this.youtubeVideohome) { 28395 var _videoHome2 = new Plyr(this.youtubeVideohome, { 28396 mute: true, 28397 autoplay: true, 28398 controls: ["play-large", "play", "progress", "current-time", "mute", "volume", "captions", "settings", "pip", "airplay", "fullscreen"], 28399 clickToPlay: true, 28400 loop: { 28401 active: true 28402 } 28403 }); 28404 _videoHome2.volume = 0; 28405 _videoHome2.muted = true; 28406 _videoHome2.autoplay = false; 28407 _videoHome2.on("play", function (data) { 28408 _videoHome2.muted = true; 28409 _videoHome2.loop = true; 28410 _videoHome2.volume = 0; 28411 }); 28412 } 28413 } 28414 } 28415 }]); 28416}(); //slider 28417var Slider = /*#__PURE__*/function () { 28418 function Slider() { 28419 _classCallCheck(this, Slider); 28420 this.SliderUs = document.querySelectorAll(".js-sliderUs"); 28421 this.directors = document.querySelectorAll(".js-directors"); 28422 this.recentNewSlide = document.querySelector("#js-recentNews"); 28423 this.studentTest = document.querySelectorAll(".js-stuydenttestimonial"); 28424 this.heroSlider = document.querySelectorAll(".js-hero-slider"); 28425 this.give = document.querySelectorAll(".js-give"); 28426 this.recentNewSlideOption2 = document.querySelector("#js-recentNews-option2"); 28427 this.start(); 28428 } 28429 return _createClass(Slider, [{ 28430 key: "start", 28431 value: function start() { 28432 if (this.SliderUs) { 28433 var _mySwiper = new swiper__WEBPACK_IMPORTED_MODULE_9__["default"](this.SliderUs, { 28434 navigation: { 28435 nextEl: ".swiper-button-next", 28436 prevEl: ".swiper-button-prev" 28437 }, 28438 slidesPerView: 1.3, 28439 spaceBetween: 20, 28440 breakpoints: { 28441 // when window width is >= 992px 28442 768: { 28443 slidesPerView: 2.4, 28444 spaceBetween: 20 28445 }, 28446 992: { 28447 slidesPerView: 3.2, 28448 spaceBetween: 15 28449 }, 28450 1200: { 28451 slidesPerView: 3.4, 28452 spaceBetween: 40 28453 } 28454 } 28455 }); 28456 } 28457 if (this.heroSlider) { 28458 var _mySwiper2 = new swiper__WEBPACK_IMPORTED_MODULE_9__["default"](this.heroSlider, { 28459 slidesPerView: 1, 28460 autoplay: { 28461 delay: 10000 28462 }, 28463 loop: true 28464 }); 28465 } 28466 if (this.recentNewSlide) { 28467 var mySwiper = new swiper__WEBPACK_IMPORTED_MODULE_9__["default"](this.recentNewSlide, { 28468 slidesPerView: 3, 28469 spaceBetween: 30, 28470 loop: "true", 28471 navigation: { 28472 nextEl: ".swiper-button-next", 28473 prevEl: ".swiper-button-prev" 28474 }, 28475 breakpoints: { 28476 320: { 28477 slidesPerView: 1 28478 // spaceBetween: 30, 28479 }, 28480 768: { 28481 slidesPerView: 2, 28482 spaceBetween: 60 28483 }, 28484 992: { 28485 slidesPerView: 3, 28486 spaceBetween: 60 28487 }, 28488 1024: { 28489 slidesPerView: 3, 28490 spaceBetween: 60 28491 } 28492 } 28493 }); 28494 } 28495 if (this.recentNewSlideOption2) { 28496 var mySwiper = new swiper__WEBPACK_IMPORTED_MODULE_9__["default"](this.recentNewSlideOption2, { 28497 slidesPerView: 3, 28498 spaceBetween: 30, 28499 loop: "true", 28500 navigation: { 28501 nextEl: ".swiper-button-next", 28502 prevEl: ".swiper-button-prev" 28503 }, 28504 breakpoints: { 28505 320: { 28506 slidesPerView: 1 28507 // spaceBetween: 30, 28508 }, 28509 768: { 28510 slidesPerView: 2, 28511 spaceBetween: 40 28512 }, 28513 1024: { 28514 slidesPerView: 3, 28515 spaceBetween: 40 28516 } 28517 } 28518 }); 28519 } 28520 if (this.studentTest) { 28521 var mySwiper = new swiper__WEBPACK_IMPORTED_MODULE_9__["default"](this.studentTest, { 28522 slidesPerView: 1, 28523 // spaceBetween: 30, 28524 // loop: "true", 28525 navigation: { 28526 nextEl: ".swiper-button-next", 28527 prevEl: ".swiper-button-prev" 28528 }, 28529 breakpoints: { 28530 320: { 28531 slidesPerView: 1 28532 // spaceBetween: 30, 28533 }, 28534 768: { 28535 slidesPerView: 1, 28536 spaceBetween: 60 28537 }, 28538 1024: { 28539 slidesPerView: 1, 28540 spaceBetween: 60 28541 } 28542 } 28543 }); 28544 } 28545 if (this.give) { 28546 var mySwiper = new swiper__WEBPACK_IMPORTED_MODULE_9__["default"](this.give, { 28547 slidesPerView: 1, 28548 // spaceBetween: 30, 28549 // loop: "true", 28550 navigation: { 28551 nextEl: ".swiper-button-next", 28552 prevEl: ".swiper-button-prev" 28553 }, 28554 breakpoints: { 28555 // 769: { 28556 // slidesPerView: 2, 28557 // spaceBetween: 40, 28558 // }, 28559 } 28560 }); 28561 // const medium = window.matchMedia("(min-width: 768px)"); 28562 // if (medium.matches) { 28563 // mySwiper.destroy(true, false); 28564 // } 28565 } 28566 if (this.directors.length > 0) { 28567 var _mySwiper3 = new swiper__WEBPACK_IMPORTED_MODULE_9__["default"](this.directors, { 28568 navigation: { 28569 nextEl: ".swiper-button-next", 28570 prevEl: ".swiper-button-prev" 28571 }, 28572 slidesPerView: 1.3, 28573 spaceBetween: 20, 28574 breakpoints: { 28575 768: { 28576 slidesPerView: "auto", 28577 spaceBetween: 20 28578 } 28579 } 28580 }); 28581 var medium = window.matchMedia("(min-width: 768px)"); 28582 if (medium.matches && _mySwiper3) { 28583 _mySwiper3.destroy(true, false); 28584 } 28585 } 28586 } 28587 }]); 28588}(); // Utils 28589var Lightbox = /*#__PURE__*/function () { 28590 function Lightbox() { 28591 _classCallCheck(this, Lightbox); 28592 this.videoContainer = document.querySelector(".videoGrid"); 28593 this.photoContainer = document.querySelector(".photogallery"); 28594 this.spolightContainer = document.querySelector(".lastNews"); 28595 this.slideContainer = document.querySelector(".sliderUs"); 28596 this.lightBoxVideo = document.querySelectorAll(".lightbox--item"); 28597 this.lightBoxPeople = document.querySelectorAll(".lightbox--people"); 28598 this.lightBoxSpolight = document.querySelectorAll(".lightbox--spolight"); 28599 this.eventLightbox = document.querySelectorAll('.js-eventsLightbox'); 28600 this.start(); 28601 } 28602 return _createClass(Lightbox, [{ 28603 key: "start", 28604 value: function start() { 28605 if (this.videoContainer) { 28606 for (var i = 0; i < this.lightBoxVideo.length; i++) { 28607 var item = this.lightBoxVideo[i]; 28608 item.classList.add("lightbox--item--".concat(i)); 28609 var lightboxDescription = glightbox__WEBPACK_IMPORTED_MODULE_6___default()({ 28610 selector: ".lightbox--item--".concat(i) 28611 }); 28612 } 28613 } 28614 // if (this.slideContainer) { 28615 // for (let i = 0; i < this.lightBoxPeople.length; i++) { 28616 // const item = this.lightBoxPeople[i]; 28617 // item.classList.add(`lightbox--item--${i}`); 28618 // let lightboxDescription = GLightbox({ 28619 // selector: `.lightbox--item--${i}`, 28620 // svg: { 28621 // next: 28622 // '<svg xmlns="http://www.w3.org/2000/svg" width="48.185" height="23.445" viewB
28622ox="0 0 48.185 23.445"><defs><style>.a{fill:none;stroke:#28282B;stroke-width:2px;}</style></defs><g transform="translate(0 0.708)"><path class="a" d="M294.607,737.92l11.086,11.045-11.086,10.981" transform="translate(-258.927 -737.92)"/><line class="a" x1="46.961" transform="translate(0 11.043)"/></g></svg> ', 28623 // prev: 28624 // '<svg xmlns="http://www.w3.org/2000/svg" width="48.185" height="23.445" viewBox="0 0 48.185 23.445"><defs><style>.a{fill:none;stroke:#28282B;stroke-width:2px;}</style></defs><g transform="translate(1.224 0.708)"><path class="a" d="M305.693,737.92l-11.086,11.045,11.086,10.981" transform="translate(-294.413 -737.92)"/><line class="a" x2="46.961" transform="translate(0 11.043)"/></g></svg>', 28625 // }, 28626 // }); 28627 // } 28628 // } 28629 if (this.spolightContainer) { 28630 for (var _i = 0; _i < this.lightBoxSpolight.length; _i++) { 28631 var _item = this.lightBoxSpolight[_i]; 28632 _item.classList.add("lightbox--item--".concat(_i)); 28633 var _lightboxDescription = glightbox__WEBPACK_IMPORTED_MODULE_6___default()({ 28634 selector: ".lightbox--item--".concat(_i), 28635 svg: { 28636 next: '<svg xmlns="http://www.w3.org/2000/svg" width="48.185" height="23.445" viewBox="0 0 48.185 23.445"><defs><style>.a{fill:none;stroke:#28282B;stroke-width:2px;}</style></defs><g transform="translate(0 0.708)"><path class="a" d="M294.607,737.92l11.086,11.045-11.086,10.981" transform="translate(-258.927 -737.92)"/><line class="a" x1="46.961" transform="translate(0 11.043)"/></g></svg> ', 28637 prev: '<svg xmlns="http://www.w3.org/2000/svg" width="48.185" height="23.445" viewBox="0 0 48.185 23.445"><defs><style>.a{fill:none;stroke:#28282B;stroke-width:2px;}</style></defs><g transform="translate(1.224 0.708)"><path class="a" d="M305.693,737.92l-11.086,11.045,11.086,10.981" transform="translate(-294.413 -737.92)"/><line class="a" x2="46.961" transform="translate(0 11.043)"/></g></svg>' 28638 } 28639 }); 28640 } 28641 } 28642 if (this.eventLightbox) { 28643 for (var _i2 = 0; _i2 < this.eventLightbox.length; _i2++) { 28644 var _item2 = this.eventLightbox[_i2]; 28645 // item.classList.add(`lightbox--item--${i}`); 28646 var _lightboxDescription2 = glightbox__WEBPACK_IMPORTED_MODULE_6___default()({ 28647 selector: '.eventsGlightbox' 28648 }); 28649 } 28650 } 28651 } 28652 }]); 28653}(); // Search bar 28654var SearchBar = /*#__PURE__*/function () { 28655 function SearchBar() { 28656 _classCallCheck(this, SearchBar); 28657 this.btnSearch = document.querySelector("#js-search-icon"); 28658 this.start(); 28659 } 28660 return _createClass(SearchBar, [{ 28661 key: "start", 28662 value: function start() { 28663 var _this3 = this; 28664 if (this.btnSearch) { 28665 var searchBar = document.querySelector(".header__navigation--searchBar"); 28666 var allItems = searchBar.querySelectorAll("*"); 28667 var state = false; 28668 var checkClick = function checkClick(items, target) { 28669 var sw = false; 28670 for (var i = 0; i < items.length; i++) { 28671 var item = items[i]; 28672 if (item === target) { 28673 sw = true; 28674 break; 28675 } 28676 } 28677 return sw; 28678 }; 28679 var toggleBar = function toggleBar(e) { 28680 if (!state && e.target === _this3.btnSearch) { 28681 searchBar.style.display = "block"; 28682 setTimeout(function () { 28683 searchBar.style.opacity = 1; 28684 }, 100); 28685 state = true; 28686 } else { 28687 if (!checkClick(allItems, e.target) && e.target != _this3.btnSearch && state) { 28688 searchBar.style.opacity = 0; 28689 setTimeout(function () { 28690 searchBar.style.display = "none"; 28691 }, 100); 28692 state = false; 28693 } 28694 } 28695 }; 28696 this.btnSearch.addEventListener("click", function (e) { 28697 e.preventDefault(); 28698 toggleBar(e); 28699 }); 28700 window.addEventListener("click", function (e) { 28701 return toggleBar(e); 28702 }); 28703 } 28704 } 28705 }]); 28706}(); 28707var Filter = /*#__PURE__*/function () { 28708 function Filter() { 28709 _classCallCheck(this, Filter); 28710 this.CONTAINER = document.querySelector(".filterArchive"); 28711 this.state = { 28712 monthselected: [], 28713 yearselected: [] 28714 }; 28715 this.start(); 28716 } 28717 return _createClass(Filter, [{ 28718 key: "start", 28719 value: function start() { 28720 var _this4 = this; 28721 if (this.CONTAINER) { 28722 var API = "".concat(window.location.origin, "/wp-json/wp/v2/newsletters?_embed"); 28723 var monthSelect = this.CONTAINER.querySelector("#month"); 28724 var yearSelect = this.CONTAINER.querySelector("#year"); 28725 var resetSelect = this.CONTAINER.querySelector("#reset"); 28726 var results_container = this.CONTAINER.querySelector(".js-filter-results"); 28727 var results_title = this.CONTAINER.querySelector(".js-filter-title"); 28728 // request api 28729 var getData = function getData(type, value) { 28730 fetch(API).then(function (response) { 28731 return response.json(); 28732 }).then(function (response) { 28733 var results; 28734 if (type === "all") { 28735 results = response.filter(function (item, index) { 28736 return index < 4; 28737 }); 28738 } 28739 // console.log(this.state); 28740 28741 if (type === "filter-both") { 28742 // debugger; 28743 results = response.filter(function (item) { 28744 var isFilter = 0; 28745 var d = new Date(item.date_gmt); 28746 var publication_mounth = d.getMonth() + 1; 28747 var publication_year = d.getFullYear(); 28748 if (publication_year === value.year[value.year.length - 1] && publication_mounth === value.month) { 28749 return item; 28750 } else if (publication_year === value.year && publication_mounth === value.month[value.month.length - 1]) { 28751 return item; 28752 } 28753 }); 28754 } 28755 if (type === "filter-post-month") { 28756 results = response.filter(function (item) { 28757 var isFilter = 0; 28758 var d = new Date(item.date_gmt); 28759 var publication_mounth = d.getMonth() + 1; 28760 return publication_mounth === value; 28761 }); 28762 // console.log("results", results); 28763 if (_this4.state.yearselected.length) { 28764 results = results.filter(function (item) { 28765 var d = new Date(item.date_gmt); 28766 var publication_year = d.getFullYear(); 28767 return publication_year === _this4.state.yearselected && publication_mounth === value; 28768 }); 28769 } 28770 } 28771 if (type === "filter-post-year") { 28772 results = response.filter(function (item) { 28773 var isFilter = 0; 28774 var d = new Date(item.date_gmt); 28775 var publication_year = d.getFullYear(); 28776 return publication_year === value; 28777 }); 28778 } 28779 printInfo(results); 28780 }).catch(function (error) { 28781 return console.log(error); 28782 }); 28783 }; 28784 28785 // print info 28786 var printInfo = function printInfo(arr) { 28787 var output;
28788 // Delete all content 28789 results_container.innerHTML = ""; 28790 28791 // create template 28792 if (arr.length > 0) { 28793 output = arr.map(function (item) { 28794 var categories; 28795 var image; 28796 // Check if item have categories 28797 if (item._embedded && item._embedded["wp:term"] && item._embedded["wp:term"][0]) { 28798 categories = item._embedded["wp:term"][0].map(function (item) { 28799 return item.name; 28800 }).join(", "); 28801 } else { 28802 categories = ""; 28803 } 28804 // Check if image is linked 28805 if (item._embedded && item._embedded["wp:featuredmedia"] && item._embedded["wp:featuredmedia"][0]) { 28806 image = item._embedded["wp:featuredmedia"][0].link; 28807 } else { 28808 image = "".concat(window.location.origin, "/wp-content/uploads/2020/09/1e974808-d29e-33b2-8726-78b2ca453cbf.png"); 28809 } 28810 28811 // Format date 28812 var d = new Date(item.date_gmt); 28813 28814 // Return html 28815 return "\n <div class=\"col-12 col-lg-6 gridNews__card\">\n <figure class=\"gridNews__card--img\">\n <img src=\"".concat(image, "\" alt=\"\" />\n </figure>\n <div class=\"gridNews__card--info filter__card\">\n <h2 class=\"heading\">").concat(item.title.rendered, "</h2>\n <div class=\"text\">\n ").concat(item.excerpt.rendered, "\n </div>\n <a class=\"textImage__btn\" href=\"").concat(item.link, "\" class=\"textImage__btn\">\n Learn More\n\n <svg class=\"arrow\" viewBox=\"0 0 26.896 13.043\">\n <defs>\n <style>\n .a {\n fill: none;\n stroke: #fff;\n }\n </style>\n </defs>\n <g transform=\"translate(0 0.354)\">\n <path class=\"a\" d=\"M294.607,737.92l6.207,6.185-6.207,6.149\"\n transform=\"translate(-274.628 -737.92)\" />\n <line class=\"a\" x1=\"26.295\" transform=\"translate(0 6.183)\" />\n </g>\n </svg>\n </a>\n </div>\n </div>\n "); 28816 }).join(""); 28817 } else { 28818 output = "\n <div class=\"col-12\">\n <div class=\"filter-notfound\">\n <div class=\"\">\n <a>\n No results found <br>\n <span>Try with another search</span>\n </a>\n </div>\n </div>\n </div>\n "; 28819 } 28820 results_container.innerHTML = output; 28821 results_container.classList.remove("waiting"); 28822 results_container.removeAttribute("style"); 28823 }; 28824 28825 // Listener checkboxes for publications 28826 if (monthSelect.value === "month" && yearSelect.value === "year") { 28827 // debugger; 28828 results_title.innerHTML = "\n <div class=\"col-12 gridNews__title filter-title\">\n <div class=\"heading\">results</div>\n </div>\n "; 28829 getData("all"); 28830 } 28831 var monthselected = function monthselected(n) { 28832 if (n === 1) return "JANUARY"; 28833 if (n === 2) return "February"; 28834 if (n === 3) return "March"; 28835 if (n === 4) return "April"; 28836 if (n === 5) return "May"; 28837 if (n === 6) return "June"; 28838 if (n === 7) return "July"; 28839 if (n === 8) return "August"; 28840 if (n === 9) return "September"; 28841 if (n === 10) return "October"; 28842 if (n === 11) return "November"; 28843 if (n === 12) return "December"; 28844 return ""; 28845 }; 28846 monthSelect.addEventListener("change", function (event) { 28847 event.preventDefault(); 28848 event.stopImmediatePropagation(); 28849 var value = parseInt(event.target.value); 28850 results_title.innerHTML = "\n <div class=\"col-12 gridNews__title filter-title\">\n <div class=\"heading\">".concat(monthselected(value), "</div>\n </div>\n "); 28851 _this4.state.monthselected.push(value); 28852 // console.log(this.state); 28853 if (!_this4.state.yearselected.length > 0) { 28854 getData("filter-post-month", value); 28855 } else { 28856 var date = { 28857 year: _this4.state.yearselected, 28858 month: parseInt(event.target.value) 28859 }; 28860 getData("filter-both", date); 28861 } 28862 resetSelect.style.display = "flex"; 28863 }); 28864 yearSelect.addEventListener("change", function (event) { 28865 event.preventDefault(); 28866 event.stopImmediatePropagation(); 28867 var value = parseInt(event.target.value); 28868 _this4.state.yearselected.push(value); 28869 if (!_this4.state.monthselected.length > 0) { 28870 getData("filter-post-year", value); 28871 } else { 28872 var date = { 28873 month: _this4.state.monthselected, 28874 year: value 28875 }; 28876 getData("filter-both", date); 28877 } 28878 resetSelect.style.display = "flex"; 28879 }); 28880 resetSelect.addEventListener("click", function (event) { 28881 event.preventDefault(); 28882 event.stopImmediatePropagation(); 28883 var value = ""; 28884 results_title.innerHTML = "\n <div class=\"col-12 gridNews__title filter-title\">\n <div class=\"heading\">results</div>\n </div>\n "; 28885 getData("all"); 28886 resetSelect.style.display = "none"; 28887 }); 28888 } 28889 } 28890 }]); 28891}(); 28892var ViewMoreNoRequest = /*#__PURE__*/function () { 28893 function ViewMoreNoRequest() { 28894 _classCallCheck(this, ViewMoreNoRequest); 28895 this.CONTAINER_SIMPLE = document.querySelector(".photogallery__container"); 28896 this.start(); 28897 } 28898 return _createClass(ViewMoreNoRequest, [{ 28899 key: "start", 28900 value: function start() { 28901 if (this.CONTAINER_SIMPLE) { 28902 var articles = this.CONTAINER_SIMPLE.querySelectorAll(".photogrid__figure"); 28903 var btn = this.CONTAINER_SIMPLE.querySelector(".photo__btn"); 28904 console.log(this.CONTAINER_SIMPLE); 28905 console.log(articles); 28906 console.log(btn); 28907 var showPost = function showPost(arr) { 28908 var limit = 24; 28909 var actual = 0; 28910 var total = 0; 28911 for (var i = 0; i < arr.length; i++) { 28912 var item = arr[i]; 28913 var img = item.querySelector("img"); 28914 if (!item.classList.contains("active") && actual < limit) { 28915 item.classList.add("active"); 28916 actual++; 28917 } 28918 if (item.classList.contains("active")) { 28919 total++; 28920 } 28921 } 28922 if (arr.length === total) { 28923 btn.style.display = "none"; 28924 } 28925 }; 28926 btn.addEventListener("click", function (e) { 28927 e.preventDefault(); 28928 showPost(articles); 28929 }); 28930 showPost(articles); 28931 } 28932 } 28933 }]); 28934}(); //////////////////// 28935// Run apps 28936//////////////////// 28937document.addEventListener("DOMContentLoaded", function () { 28938 var video = new VideoApp(); 28939 var header = new Header(); 28940 var formlightbox = new Formlightbox(); 28941 var lightbox = new Lightbox(); 28942 var scrollspecifics = new ScrollPage(); 28943 var search = new SearchBar(); 28944 var filter = new Filter(); 28945 // var morePhoto = new MorePhoto(); 28946 var viewore = new ViewMoreNoRequest(); 28947 var slides = new Slider(); 28948}); 28949 28950//////////////////// 28951// Import components 28952//////////////////// 28953
28954//////////////////// 28955// Copyright 28956//////////////////// 28957window.SayMyName = function () { 28958 console.log("%c\n \n MADE WITH TOO MUCH SKILLS: \n \n \n 333333 666 00000 PPPPPP MM MM IIIII \n 3333 66 00 00 PP PP MMM MMM III \n 3333 666666 00 00 PPPPPP MM MM MM III \n 333 66 66 00 00 PP MM MM III \n 333333 66666 00000 PP MM MM IIIII \n \n \n https://360pmi.com/ \n", "background: #e8404b; color: white"); 28959}; 28960 28961//////////////////// 28962// IE Detecter 28963//////////////////// 28964 28965/* Sample function that returns boolean in case the browser is Internet Explorer*/ 28966 28967var isIE = function isIE() { 28968 var ua = navigator.userAgent; 28969 /* MSIE used to detect old browsers and Trident used to newer ones*/ 28970 var is_ie = ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1; 28971 return is_ie; 28972}; 28973var checkIeCookie = function checkIeCookie(name) { 28974 var dc = document.cookie; 28975 var prefix = name + "="; 28976 var begin = dc.indexOf("; " + prefix); 28977 if (begin == -1) { 28978 begin = dc.indexOf(prefix); 28979 if (begin != 0) return null; 28980 } else { 28981 begin += 2; 28982 var end = document.cookie.indexOf(";", begin); 28983 if (end == -1) { 28984 end = dc.length; 28985 } 28986 } 28987 // because unescape has been deprecated, replaced with decodeURI 28988 //return unescape(dc.substring(begin + prefix.length, end)); 28989 return decodeURI(dc.substring(begin + prefix.length, end)); 28990}; 28991 28992/* Create an alert to show if the browser is IE or not */ 28993if (isIE() && !checkIeCookie("ie_cookie")) { 28994 var container = document.createElement("div"); 28995 container.classList.add("ie-notification"); 28996 container.innerHTML = "\n <p>Your web browser (Internet Explorer) is out of date. Please update your browser for more security, speed, and for the best experience on this site.</p>\n <div>\n <div>\n <a href=\"https://browsehappy.com/\" target=\"_blank\">Update my browser</a>\n <button class=\"ignore-update\">Ignore</button>\n </div>\n "; 28997 document.body.appendChild(container); 28998 var ignoreUpdate = document.querySelector(".ignore-update"); 28999 ignoreUpdate.addEventListener("click", function (e) { 29000 var d = new Date(); 29001 d.setTime(d.getTime() + 1 * 60 * 60 * 1000); 29002 var expires = "expires=" + d.toUTCString(); 29003 document.cookie = "ie_cookie" + "=" + 1 + ";" + expires + ";path=/"; 29004 container.style.display = "none"; 29005 }); 29006} 29007 29008/***/ }), 29009
29010/***/ "./src/js/polyfills/polyfill.js": 29011/*!**************************************!*\ 29012 !*** ./src/js/polyfills/polyfill.js ***! 29013 \**************************************/ 29014/*! no static exports found */ 29015/***/ (function(module, exports, __webpack_require__) { 29016 29017/* WEBPACK VAR INJECTION */(function(global, process) {var require;var require;function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } 29018!function e(t, n, r) { 29019 function s(o, u) { 29020 if (!n[o]) { 29021 if (!t[o]) { 29022 var c = "function" == typeof require && require; 29023 if (!u && c) return require(o, !0); 29024 if (i) return i(o, !0); 29025 var f = new Error("Cannot find module '" + o + "'"); 29026 throw f.code = "MODULE_NOT_FOUND", f; 29027 } 29028 var a = n[o] = { 29029 exports: {} 29030 }; 29031 t[o][0].call(a.exports, function (n) { 29032 var r = t[o][1][n]; 29033 return s(r ? r : n); 29034 }, a, a.exports, e, t, n, r); 29035 } 29036 return n[o].exports; 29037 } 29038 for (var i = "function" == typeof require && require, o = 0; o < r.length; o++) s(r[o]); 29039 return s; 29040}({ 29041 1: [function (t, n, r) { 29042 (function (n) { 29043 "use strict"; 29044 29045 function define(t, n, e) { 29046 t[n] || Object[r](t, n, { 29047 writable: !0, 29048 configurable: !0, 29049 value: e 29050 }); 29051 } 29052 if (t(295), t(296), t(2), n._babelPolyfill) throw new Error("only one instance of babel-polyfill is allowed"); 29053 n._babelPolyfill = !0; 29054 var r = "defineProperty"; 29055 define(String.prototype, "padLeft", "".padStart), define(String.prototype, "padRight", "".padEnd), "pop,reverse,shift,keys,values,entries,indexOf,every,some,forEach,map,filter,find,findIndex,includes,join,slice,concat,push,splice,unshift,sort,lastIndexOf,reduce,reduceRight,copyWithin,fill".split(",").forEach(function (t) { 29056 [][t] && define(Array, t, Function.call.bind([][t])); 29057 }); 29058 }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); 29059 }, { 29060 2: 2, 29061 295: 295, 29062 296: 296 29063 }], 29064 2: [function (t, n, r) { 29065 t(119), n.exports = t(23).RegExp.escape; 29066 }, { 29067 119: 119, 29068 23: 23 29069 }], 29070 3: [function (t, n, r) { 29071 n.exports = function (t) { 29072 if ("function" != typeof t) throw TypeError(t + " is not a function!"); 29073 return t; 29074 }; 29075 }, {}], 29076 4: [function (t, n, r) { 29077 var e = t(18); 29078 n.exports = function (t, n) { 29079 if ("number" != typeof t && "Number" != e(t)) throw TypeError(n); 29080 return +t; 29081 }; 29082 }, { 29083 18: 18 29084 }], 29085 5: [function (t, n, r) { 29086 var e = t(117)("unscopables"), 29087 i = Array.prototype; 29088 void 0 == i[e] && t(40)(i, e, {}), n.exports = function (t) { 29089 i[e][t] = !0; 29090 }; 29091 }, { 29092 117: 117, 29093 40: 40 29094 }], 29095 6: [function (t, n, r) { 29096 n.exports = function (t, n, r, e) { 29097 if (!(t instanceof n) || void 0 !== e && e in t) throw TypeError(r + ": incorrect invocation!"); 29098 return t; 29099 }; 29100 }, {}], 29101 7: [function (t, n, r) { 29102 var e = t(49); 29103 n.exports = function (t) { 29104 if (!e(t)) throw TypeError(t + " is not an object!"); 29105 return t; 29106 }; 29107 }, { 29108 49: 49 29109 }], 29110 8: [function (t, n, r) { 29111 "use strict"; 29112 29113 var e = t(109), 29114 i = t(105), 29115 o = t(108); 29116 n.exports = [].copyWithin || function copyWithin(t, n) { 29117 var r = e(this), 29118 u = o(r.length), 29119 c = i(t, u), 29120 f = i(n, u), 29121 a = arguments.length > 2 ? arguments[2] : void 0, 29122 s = Math.min((void 0 === a ? u : i(a, u)) - f, u - c), 29123 l = 1; 29124 for (f < c && c < f + s && (l = -1, f += s - 1, c += s - 1); s-- > 0;) f in r ? r[c] = r[f] : delete r[c], c += l, f += l; 29125 return r; 29126 }; 29127 }, { 29128 105: 105, 29129 108: 108, 29130 109: 109 29131 }], 29132 9: [function (t, n, r) { 29133 "use strict"; 29134 29135 var e = t(109), 29136 i = t(105), 29137 o = t(108); 29138 n.exports = function fill(t) { 29139 for (var n = e(this), r = o(n.length), u = arguments.length, c = i(u > 1 ? arguments[1] : void 0, r), f = u > 2 ? arguments[2] : void 0, a = void 0 === f ? r : i(f, r); a > c;) n[c++] = t; 29140 return n; 29141 }; 29142 }, { 29143 105: 105, 29144 108: 108, 29145 109: 109 29146 }], 29147 10: [function (t, n, r) { 29148 var e = t(37); 29149 n.exports = function (t, n) { 29150 var r = []; 29151 return e(t, !1, r.push, r, n), r; 29152 }; 29153 }, { 29154 37: 37 29155 }], 29156 11: [function (t, n, r) { 29157 var e = t(107), 29158 i = t(108), 29159 o = t(105); 29160 n.exports = function (t) { 29161 return function (n, r, u) { 29162 var c, 29163 f = e(n), 29164 a = i(f.length), 29165 s = o(u, a); 29166 if (t && r != r) { 29167 for (; a > s;) if (c = f[s++], c != c) return !0; 29168 } else for (; a > s; s++) if ((t || s in f) && f[s] === r) return t || s || 0; 29169 return !t && -1; 29170 }; 29171 }; 29172 }, { 29173 105: 105, 29174 107: 107, 29175 108: 108 29176 }], 29177 12: [function (t, n, r) { 29178 var e = t(25), 29179 i = t(45), 29180 o = t(109), 29181 u = t(108), 29182 c = t(15); 29183 n.exports = function (t, n) { 29184 var r = 1 == t, 29185 f = 2 == t, 29186 a = 3 == t, 29187 s = 4 == t, 29188 l = 6 == t, 29189 h = 5 == t || l, 29190 v = n || c; 29191 return function (n, c, p) { 29192 for (var d, y, g = o(n), b = i(g), x = e(c, p, 3), m = u(b.length), w = 0, S = r ? v(n, m) : f ? v(n, 0) : void 0; m > w; w++) if ((h || w in b) && (d = b[w], y = x(d, w, g), t)) if (r) S[w] = y;else if (y) switch (t) { 29193 case 3: 29194 return !0; 29195 case 5: 29196 return d; 29197 case 6: 29198 return w; 29199 case 2: 29200 S.push(d); 29201 } else if (s) return !1; 29202 return l ? -1 : a || s ? s : S; 29203 }; 29204 }; 29205 }, { 29206 108: 108, 29207 109: 109, 29208 15: 15, 29209 25: 25, 29210 45: 45 29211 }], 29212 13: [function (t, n, r) { 29213 var e = t(3), 29214 i = t(109), 29215 o = t(45), 29216 u = t(108); 29217 n.exports = function (t, n, r, c, f) { 29218 e(n); 29219 var a = i(t), 29220 s = o(a), 29221 l = u(a.length), 29222 h = f ? l - 1 : 0, 29223 v = f ? -1 : 1; 29224 if (r < 2) for (;;) { 29225 if (h in s) { 29226 c = s[h], h += v; 29227 break; 29228 } 29229 if (h += v, f ? h < 0 : l <= h) throw TypeError("Reduce of empty array with
29229no initial value"); 29230 } 29231 for (; f ? h >= 0 : l > h; h += v) h in s && (c = n(c, s[h], h, a)); 29232 return c; 29233 }; 29234 }, { 29235 108: 108, 29236 109: 109, 29237 3: 3, 29238 45: 45 29239 }], 29240 14: [function (t, n, r) { 29241 var e = t(49), 29242 i = t(47), 29243 o = t(117)("species"); 29244 n.exports = function (t) { 29245 var n; 29246 return i(t) && (n = t.constructor, "function" != typeof n || n !== Array && !i(n.prototype) || (n = void 0), e(n) && (n = n[o], null === n && (n = void 0))), void 0 === n ? Array : n; 29247 }; 29248 }, { 29249 117: 117, 29250 47: 47, 29251 49: 49 29252 }], 29253 15: [function (t, n, r) { 29254 var e = t(14); 29255 n.exports = function (t, n) { 29256 return new (e(t))(n); 29257 }; 29258 }, { 29259 14: 14 29260 }], 29261 16: [function (t, n, r) { 29262 "use strict"; 29263 29264 var e = t(3), 29265 i = t(49), 29266 o = t(44), 29267 u = [].slice, 29268 c = {}, 29269 f = function f(t, n, r) { 29270 if (!(n in c)) { 29271 for (var e = [], i = 0; i < n; i++) e[i] = "a[" + i + "]"; 29272 c[n] = Function("F,a", "return new F(" + e.join(",") + ")"); 29273 } 29274 return c[n](t, r); 29275 }; 29276 n.exports = Function.bind || function bind(t) { 29277 var n = e(this), 29278 r = u.call(arguments, 1), 29279 c = function c() { 29280 var e = r.concat(u.call(arguments)); 29281 return this instanceof c ? f(n, e.length, e) : o(n, e, t); 29282 }; 29283 return i(n.prototype) && (c.prototype = n.prototype), c; 29284 }; 29285 }, { 29286 3: 3, 29287 44: 44, 29288 49: 49 29289 }], 29290 17: [function (t, n, r) { 29291 var e = t(18), 29292 i = t(117)("toStringTag"), 29293 o = "Arguments" == e(function () { 29294 return arguments; 29295 }()), 29296 u = function u(t, n) { 29297 try { 29298 return t[n]; 29299 } catch (t) {} 29300 }; 29301 n.exports = function (t) { 29302 var n, r, c; 29303 return void 0 === t ? "Undefined" : null === t ? "Null" : "string" == typeof (r = u(n = Object(t), i)) ? r : o ? e(n) : "Object" == (c = e(n)) && "function" == typeof n.callee ? "Arguments" : c; 29304 }; 29305 }, { 29306 117: 117, 29307 18: 18 29308 }], 29309 18: [function (t, n, r) { 29310 var e = {}.toString; 29311 n.exports = function (t) { 29312 return e.call(t).slice(8, -1); 29313 }; 29314 }, {}], 29315 19: [function (t, n, r) { 29316 "use strict"; 29317 29318 var e = t(67).f, 29319 i = t(66), 29320 o = t(86), 29321 u = t(25), 29322 c = t(6), 29323 f = t(27), 29324 a = t(37), 29325 s = t(53), 29326 l = t(55), 29327 h = t(91), 29328 v = t(28), 29329 p = t(62).fastKey, 29330 d = v ? "_s" : "size", 29331 y = function y(t, n) { 29332 var r, 29333 e = p(n); 29334 if ("F" !== e) return t._i[e]; 29335 for (r = t._f; r; r = r.n) if (r.k == n) return r; 29336 }; 29337 n.exports = { 29338 getConstructor: function getConstructor(t, n, r, s) { 29339 var l = t(function (t, e) { 29340 c(t, l, n, "_i"), t._i = i(null), t._f = void 0, t._l = void 0, t[d] = 0, void 0 != e && a(e, r, t[s], t); 29341 }); 29342 return o(l.prototype, { 29343 clear: function clear() { 29344 for (var t = this, n = t._i, r = t._f; r; r = r.n) r.r = !0, r.p && (r.p = r.p.n = void 0), delete n[r.i]; 29345 t._f = t._l = void 0, t[d] = 0; 29346 }, 29347 delete: function _delete(t) { 29348 var n = this, 29349 r = y(n, t); 29350 if (r) { 29351 var e = r.n, 29352 i = r.p; 29353 delete n._i[r.i], r.r = !0, i && (i.n = e), e && (e.p = i), n._f == r && (n._f = e), n._l == r && (n._l = i), n[d]--; 29354 } 29355 return !!r; 29356 }, 29357 forEach: function forEach(t) { 29358 c(this, l, "forEach"); 29359 for (var n, r = u(t, arguments.length > 1 ? arguments[1] : void 0, 3); n = n ? n.n : this._f;) for (r(n.v, n.k, this); n && n.r;) n = n.p; 29360 }, 29361 has: function has(t) { 29362 return !!y(this, t); 29363 } 29364 }), v && e(l.prototype, "size", { 29365 get: function get() { 29366 return f(this[d]); 29367 } 29368 }), l; 29369 }, 29370 def: function def(t, n, r) { 29371 var e, 29372 i, 29373 o = y(t, n); 29374 return o ? o.v = r : (t._l = o = { 29375 i: i = p(n, !0), 29376 k: n, 29377 v: r, 29378 p: e = t._l, 29379 n: void 0, 29380 r: !1 29381 }, t._f || (t._f = o), e && (e.n = o), t[d]++, "F" !== i && (t._i[i] = o)), t; 29382 }, 29383 getEntry: y, 29384 setStrong: function setStrong(t, n, r) { 29385 s(t, n, function (t, n) { 29386 this._t = t, this._k = n, this._l = void 0; 29387 }, function () { 29388 for (var t = this, n = t._k, r = t._l; r && r.r;) r = r.p; 29389 return t._t && (t._l = r = r ? r.n : t._t._f) ? "keys" == n ? l(0, r.k) : "values" == n ? l(0, r.v) : l(0, [r.k, r.v]) : (t._t = void 0, l(1)); 29390 }, r ? "entries" : "values", !r, !0), h(n); 29391 } 29392 }; 29393 }, { 29394 25: 25, 29395 27: 27, 29396 28: 28, 29397 37: 37, 29398 53: 53, 29399 55: 55, 29400 6: 6, 29401 62: 62, 29402 66: 66, 29403 67: 67, 29404 86: 86, 29405 91: 91 29406 }], 29407 20: [function (t, n, r) { 29408 var e = t(17), 29409 i = t(10); 29410 n.exports = function (t) { 29411 return function toJSON() { 29412 if (e(this) != t) throw TypeError(t + "#toJSON isn't generic"); 29413 return i(this); 29414 }; 29415 }; 29416 }, { 29417 10: 10, 29418 17: 17 29419 }], 29420 21: [function (t, n, r) { 29421 "use strict"; 29422 29423 var e = t(86), 29424 i = t(62).getWeak, 29425 o = t(7), 29426 u = t(49), 29427 c = t(6), 29428 f = t(37), 29429 a = t(12), 29430 s = t(39), 29431 l = a(5), 29432 h = a(6), 29433 v = 0, 29434 p = function p(t) { 29435 return t._l || (t._l = new d()); 29436 }, 29437 d = function d() { 29438 this.a = []; 29439 }, 29440 y = function y(t, n) { 29441 return l(t.a, function (t) { 29442 return t[0] === n; 29443 }); 29444 }; 29445 d.prototype = { 29446 get: function get(t) { 29447 var n = y(this, t); 29448 if (n) return n[1]; 29449 }, 29450 has: function has(t) { 29451 return !!y(this, t); 29452 }, 29453 set: function set(t, n) { 29454 var r = y(this, t); 29455 r ? r[1] = n : this.a.push([t, n]); 29456 }, 29457 delete: function _delete(t) { 29458 var n = h(this.a, function (n) { 29459 return n[0] === t; 29460 }); 29461 return ~n && this.a.splice(n, 1), !!~n; 29462 } 29463 }, n.exports = { 29464 getConstructor: function getConstructor(t, n, r, o) { 29465 var a = t(function (t, e) { 29466 c(t, a, n, "_i"), t._i = v++, t._l = void 0, void 0 != e && f(e, r, t[o], t); 29467 }); 29468 return e(a.prototype, { 29469 delete: function _delete(t) { 29470 if (!u(t)) return !1; 29471 var n = i(t); 29472 return n === !0 ? p(this).delete(t) : n && s(n, this._i) && delete n[this._i]; 29473 }, 29474 has: function has(t) { 29475 if (!u(t)) return !1; 29476 var n = i(t); 29477 return n === !0 ? p(this).has(t) : n && s(n, this._i); 29478 } 29479 }), a; 29480 }, 29481 def: function def(t, n, r) { 29482 var e = i(o(n), !0); 29483 return e === !0 ? p(t).set(n, r) : e[t._i] = r, t; 29484 }, 29485 ufstore: p 29486 }; 29487 }, { 29488 12: 12, 29489 37: 37, 29490 39: 39, 29491 49: 49, 29492 6: 6, 29493 62: 62, 29494 7: 7, 29495 86: 86 29496 }], 29497 22: [function (t, n, r) { 29498 "use strict"; 29499 29500 var e = t(38), 29501 i = t(32), 29502 o = t(87), 29503 u = t(86), 29504 c = t(62), 29505 f = t(37), 29506 a = t(6), 29507 s = t(49), 29508 l = t(34), 29509 h = t(54), 29510 v = t(92), 29511 p = t(43); 29512 n.exports = function (t, n, r, d, y, g) { 29513 var b = e[t], 29514 x = b, 29515 m = y ? "set" : "add", 29516 w = x && x.prototype, 29517 S = {}, 29518 _ = function _(t) { 29519 var n = w[t]; 29520 o(w, t, "delete" == t ? function (t) { 29521 return !(g && !s(t)) && n.call(this, 0 === t ? 0 : t); 29522 } : "has" == t ? function has(t) { 29523 return !(g && !s(t)) && n.call(this, 0 === t ? 0 : t); 29524 } : "get" == t ? function get(t) { 29525 return g && !s(t) ? void 0 : n.call(this, 0 === t ? 0 : t); 29526 } : "add" == t ? function add(t) { 29527 return n.call(this, 0 === t ? 0 : t), this; 29528 } : function set(t, r) { 29529 return n.call(this, 0 === t ? 0 : t, r), this; 29530 }); 29531 };
29532 if ("function" == typeof x && (g || w.forEach && !l(function () { 29533 new x().entries().next(); 29534 }))) { 29535 var E = new x(), 29536 O = E[m](g ? {} : -0, 1) != E, 29537 F = l(function () { 29538 E.has(1); 29539 }), 29540 P = h(function (t) { 29541 new x(t); 29542 }), 29543 M = !g && l(function () { 29544 for (var t = new x(), n = 5; n--;) t[m](n, n); 29545 return !t.has(-0); 29546 }); 29547 P || (x = n(function (n, r) { 29548 a(n, x, t); 29549 var e = p(new b(), n, x); 29550 return void 0 != r && f(r, y, e[m], e), e; 29551 }), x.prototype = w, w.constructor = x), (F || M) && (_("delete"), _("has"), y && _("get")), (M || O) && _(m), g && w.clear && delete w.clear; 29552 } else x = d.getConstructor(n, t, y, m), u(x.prototype, r), c.NEED = !0; 29553 return v(x, t), S[t] = x, i(i.G + i.W + i.F * (x != b), S), g || d.setStrong(x, t, y), x; 29554 }; 29555 }, { 29556 32: 32, 29557 34: 34, 29558 37: 37, 29559 38: 38, 29560 43: 43, 29561 49: 49, 29562 54: 54, 29563 6: 6, 29564 62: 62, 29565 86: 86, 29566 87: 87, 29567 92: 92 29568 }], 29569 23: [function (t, n, r) { 29570 var e = n.exports = { 29571 version: "2.4.0" 29572 }; 29573 "number" == typeof __e && (__e = e); 29574 }, {}], 29575 24: [function (t, n, r) { 29576 "use strict"; 29577 29578 var e = t(67), 29579 i = t(85); 29580 n.exports = function (t, n, r) { 29581 n in t ? e.f(t, n, i(0, r)) : t[n] = r; 29582 }; 29583 }, { 29584 67: 67, 29585 85: 85 29586 }], 29587 25: [function (t, n, r) { 29588 var e = t(3); 29589 n.exports = function (t, n, r) { 29590 if (e(t), void 0 === n) return t; 29591 switch (r) { 29592 case 1: 29593 return function (r) { 29594 return t.call(n, r); 29595 }; 29596 case 2: 29597 return function (r, e) { 29598 return t.call(n, r, e); 29599 }; 29600 case 3: 29601 return function (r, e, i) { 29602 return t.call(n, r, e, i); 29603 }; 29604 } 29605 return function () { 29606 return t.apply(n, arguments); 29607 }; 29608 }; 29609 }, { 29610 3: 3 29611 }], 29612 26: [function (t, n, r) { 29613 "use strict"; 29614 29615 var e = t(7), 29616 i = t(110), 29617 o = "number"; 29618 n.exports = function (t) { 29619 if ("string" !== t && t !== o && "default" !== t) throw TypeError("Incorrect hint"); 29620 return i(e(this), t != o); 29621 }; 29622 }, { 29623 110: 110, 29624 7: 7 29625 }], 29626 27: [function (t, n, r) { 29627 n.exports = function (t) { 29628 if (void 0 == t) throw TypeError("Can't call method on " + t); 29629 return t; 29630 }; 29631 }, {}], 29632 28: [function (t, n, r) { 29633 n.exports = !t(34)(function () { 29634 return 7 != Object.defineProperty({}, "a", { 29635 get: function get() { 29636 return 7; 29637 } 29638 }).a; 29639 }); 29640 }, { 29641 34: 34 29642 }], 29643 29: [function (t, n, r) { 29644 var e = t(49), 29645 i = t(38).document, 29646 o = e(i) && e(i.createElement); 29647 n.exports = function (t) { 29648 return o ? i.createElement(t) : {}; 29649 }; 29650 }, { 29651 38: 38, 29652 49: 49 29653 }], 29654 30: [function (t, n, r) { 29655 n.exports = "constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","); 29656 }, {}], 29657 31: [function (t, n, r) { 29658 var e = t(76), 29659 i = t(73), 29660 o = t(77); 29661 n.exports = function (t) { 29662 var n = e(t), 29663 r = i.f; 29664 if (r) for (var u, c = r(t), f = o.f, a = 0; c.length > a;) f.call(t, u = c[a++]) && n.push(u); 29665 return n; 29666 }; 29667 }, { 29668 73: 73, 29669 76: 76, 29670 77: 77 29671 }], 29672 32: [function (t, n, r) { 29673 var e = t(38), 29674 i = t(23), 29675 o = t(40), 29676 u = t(87), 29677 c = t(25), 29678 f = "prototype", 29679 a = function a(t, n, r) { 29680 var s, 29681 l, 29682 h, 29683 v, 29684 p = t & a.F, 29685 d = t & a.G, 29686 y = t & a.S, 29687 g = t & a.P, 29688 b = t & a.B, 29689 x = d ? e : y ? e[n] || (e[n] = {}) : (e[n] || {})[f], 29690 m = d ? i : i[n] || (i[n] = {}), 29691 w = m[f] || (m[f] = {}); 29692 d && (r = n); 29693 for (s in r) l = !p && x && void 0 !== x[s], h = (l ? x : r)[s], v = b && l ? c(h, e) : g && "function" == typeof h ? c(Function.call, h) : h, x && u(x, s, h, t & a.U), m[s] != h && o(m, s, v), g && w[s] != h && (w[s] = h); 29694 }; 29695 e.core = i, a.F = 1, a.G = 2, a.S = 4, a.P = 8, a.B = 16, a.W = 32, a.U = 64, a.R = 128, n.exports = a; 29696 }, { 29697 23: 23, 29698 25: 25, 29699 38: 38, 29700 40: 40, 29701 87: 87 29702 }], 29703 33: [function (t, n, r) { 29704 var e = t(117)("match"); 29705 n.exports = function (t) { 29706 var n = /./;
29707 try { 29708 "/./"[t](n); 29709 } catch (r) { 29710 try { 29711 return n[e] = !1, !"/./"[t](n); 29712 } catch (t) {} 29713 } 29714 return !0; 29715 }; 29716 }, { 29717 117: 117 29718 }], 29719 34: [function (t, n, r) { 29720 n.exports = function (t) { 29721 try { 29722 return !!t(); 29723 } catch (t) { 29724 return !0; 29725 } 29726 }; 29727 }, {}], 29728 35: [function (t, n, r) { 29729 "use strict"; 29730 29731 var e = t(40), 29732 i = t(87), 29733 o = t(34), 29734 u = t(27), 29735 c = t(117); 29736 n.exports = function (t, n, r) { 29737 var f = c(t), 29738 a = r(u, f, ""[t]), 29739 s = a[0], 29740 l = a[1]; 29741 o(function () { 29742 var n = {}; 29743 return n[f] = function () { 29744 return 7; 29745 }, 7 != ""[t](n); 29746 }) && (i(String.prototype, t, s), e(RegExp.prototype, f, 2 == n ? function (t, n) { 29747 return l.call(t, this, n); 29748 } : function (t) { 29749 return l.call(t, this); 29750 })); 29751 }; 29752 }, { 29753 117: 117, 29754 27: 27, 29755 34: 34, 29756 40: 40, 29757 87: 87 29758 }], 29759 36: [function (t, n, r) { 29760 "use strict"; 29761 29762 var e = t(7); 29763 n.exports = function () { 29764 var t = e(this), 29765 n = ""; 29766 return t.global && (n += "g"), t.ignoreCase && (n += "i"), t.multiline && (n += "m"), t.unicode && (n += "u"), t.sticky && (n += "y"), n; 29767 }; 29768 }, { 29769 7: 7 29770 }], 29771 37: [function (t, n, r) { 29772 var e = t(25), 29773 i = t(51), 29774 o = t(46), 29775 u = t(7), 29776 c = t(108), 29777 f = t(118), 29778 a = {}, 29779 s = {}, 29780 r = n.exports = function (t, n, r, l, h) { 29781 var v, 29782 p, 29783 d, 29784 y, 29785 g = h ? function () { 29786 return t; 29787 } : f(t), 29788 b = e(r, l, n ? 2 : 1), 29789 x = 0; 29790 if ("function" != typeof g) throw TypeError(t + " is not iterable!"); 29791 if (o(g)) { 29792 for (v = c(t.length); v > x; x++) if (y = n ? b(u(p = t[x])[0], p[1]) : b(t[x]), y === a || y === s) return y; 29793 } else for (d = g.call(t); !(p = d.next()).done;) if (y = i(d, b, p.value, n), y === a || y === s) return y; 29794 }; 29795 r.BREAK = a, r.RETURN = s; 29796 }, { 29797 108: 108, 29798 118: 118, 29799 25: 25, 29800 46: 46, 29801 51: 51, 29802 7: 7 29803 }], 29804 38: [function (t, n, r) { 29805 var e = n.exports = "undefined" != typeof window && window.Math == Math ? window : "undefined" != typeof self && self.Math == Math ? self : Function("return this")(); 29806 "number" == typeof __g && (__g = e); 29807 }, {}], 29808 39: [function (t, n, r) { 29809 var e = {}.hasOwnProperty; 29810 n.exports = function (t, n) { 29811 return e.call(t, n); 29812 }; 29813 }, {}], 29814 40: [function (t, n, r) { 29815 var e = t(67), 29816 i = t(85); 29817 n.exports = t(28) ? function (t, n, r) { 29818 return e.f(t, n, i(1, r)); 29819 } : function (t, n, r) { 29820 return t[n] = r, t; 29821 }; 29822 }, { 29823 28: 28, 29824 67: 67, 29825 85: 85 29826 }], 29827 41: [function (t, n, r) { 29828 n.exports = t(38).document && document.documentElement; 29829 }, { 29830 38: 38 29831 }], 29832 42: [function (t, n, r) { 29833 n.exports = !t(28) && !t(34)(function () { 29834 return 7 != Object.defineProperty(t(29)("div"), "a", { 29835 get: function get() { 29836 return 7; 29837 } 29838 }).a; 29839 }); 29840 }, { 29841 28: 28, 29842 29: 29, 29843 34: 34 29844 }], 29845 43: [function (t, n, r) { 29846 var e = t(49), 29847 i = t(90).set; 29848 n.exports = function (t, n, r) { 29849 var o, 29850 u = n.constructor; 29851 return u !== r && "function" == typeof u && (o = u.prototype) !== r.prototype && e(o) && i && i(t, o), t; 29852 }; 29853 }, { 29854 49: 49, 29855 90: 90 29856 }], 29857 44: [function (t, n, r) { 29858 n.exports = function (t, n, r) { 29859 var e = void 0 === r; 29860 switch (n.length) { 29861 case 0: 29862 return e ? t() : t.call(r); 29863 case 1: 29864 return e ? t(n[0]) : t.call(r, n[0]); 29865 case 2: 29866 return e ? t(n[0], n[1]) : t.call(r, n[0], n[1]); 29867 case 3: 29868 return e ? t(n[0], n[1], n[2]) : t.call(r, n[0], n[1], n[2]); 29869 case 4: 29870 return e ? t(n[0], n[1], n[2], n[3]) : t.call(r, n[0], n[1], n[2], n[3]); 29871 } 29872 return t.apply(r, n); 29873 }; 29874 }, {}], 29875 45: [function (t, n, r) { 29876 var e = t(18); 29877 n.exports = Object("z").propertyIsEnumerable(0) ? Object : function (t) { 29878 return "String" == e(t) ? t.split("") : Object(t); 29879 }; 29880 }, { 29881 18: 18 29882 }], 29883 46: [function (t, n, r) { 29884 var e = t(56), 29885 i = t(117)("iterator"), 29886 o = Array.prototype; 29887 n.exports = function (t) { 29888 return void 0 !== t && (e.Array === t || o[i] === t); 29889 }; 29890 }, { 29891 117: 117, 29892 56: 56 29893 }], 29894 47: [function (t, n, r) { 29895 var e = t(18); 29896 n.exports = Array.isArray || function isArray(t) { 29897 return "Array" == e(t); 29898 }; 29899 }, { 29900 18: 18 29901 }], 29902 48: [function (t, n, r) { 29903 var e = t(49), 29904 i = Math.floor; 29905 n.exports = function isInteger(t) { 29906 return !e(t) && isFinite(t) && i(t) === t; 29907 }; 29908 }, { 29909 49: 49 29910 }], 29911 49: [function (t, n, r) { 29912 n.exports = function (t) { 29913 return "object" == _typeof(t) ? null !== t : "function" == typeof t; 29914 }; 29915 }, {}], 29916 50: [function (t, n, r) { 29917 var e = t(49), 29918 i = t(18), 29919 o = t(117)("match"); 29920 n.exports = function (t) { 29921 var n; 29922 return e(t) && (void 0 !== (n = t[o]) ? !!n : "RegExp" == i(t)); 29923 }; 29924 }, { 29925 117: 117, 29926 18: 18, 29927 49: 49 29928 }], 29929 51: [function (t, n, r) { 29930 var e = t(7); 29931 n.exports = function (t, n, r, i) {
29932 try { 29933 return i ? n(e(r)[0], r[1]) : n(r); 29934 } catch (n) { 29935 var o = t.return; 29936 throw void 0 !== o && e(o.call(t)), n; 29937 } 29938 }; 29939 }, { 29940 7: 7 29941 }], 29942 52: [function (t, n, r) { 29943 "use strict"; 29944 29945 var e = t(66), 29946 i = t(85), 29947 o = t(92), 29948 u = {}; 29949 t(40)(u, t(117)("iterator"), function () { 29950 return this; 29951 }), n.exports = function (t, n, r) { 29952 t.prototype = e(u, { 29953 next: i(1, r) 29954 }), o(t, n + " Iterator"); 29955 }; 29956 }, { 29957 117: 117, 29958 40: 40, 29959 66: 66, 29960 85: 85, 29961 92: 92 29962 }], 29963 53: [function (t, n, r) { 29964 "use strict"; 29965 29966 var e = t(58), 29967 i = t(32), 29968 o = t(87), 29969 u = t(40), 29970 c = t(39), 29971 f = t(56), 29972 a = t(52), 29973 s = t(92), 29974 l = t(74), 29975 h = t(117)("iterator"), 29976 v = !([].keys && "next" in [].keys()), 29977 p = "@@iterator", 29978 d = "keys", 29979 y = "values", 29980 g = function g() { 29981 return this; 29982 }; 29983 n.exports = function (t, n, r, b, x, m, w) { 29984 a(r, n, b); 29985 var S, 29986 _, 29987 E, 29988 O = function O(t) { 29989 if (!v && t in A) return A[t]; 29990 switch (t) { 29991 case d: 29992 return function keys() { 29993 return new r(this, t); 29994 }; 29995 case y: 29996 return function values() { 29997 return new r(this, t); 29998 }; 29999 } 30000 return function entries() { 30001 return new r(this, t); 30002 }; 30003 }, 30004 F = n + " Iterator", 30005 P = x == y, 30006 M = !1, 30007 A = t.prototype, 30008 I = A[h] || A[p] || x && A[x], 30009 j = I || O(x), 30010 N = x ? P ? O("entries") : j : void 0, 30011 k = "Array" == n ? A.entries || I : I; 30012 if (k && (E = l(k.call(new t())), E !== Object.prototype && (s(E, F, !0), e || c(E, h) || u(E, h, g))), P && I && I.name !== y && (M = !0, j = function values() { 30013 return I.call(this); 30014 }), e && !w || !v && !M && A[h] || u(A, h, j), f[n] = j, f[F] = g, x) if (S = { 30015 values: P ? j : O(y), 30016 keys: m ? j : O(d), 30017 entries: N 30018 }, w) for (_ in S) _ in A || o(A, _, S[_]);else i(i.P + i.F * (v || M), n, S); 30019 return S; 30020 }; 30021 }, { 30022 117: 117, 30023 32: 32, 30024 39: 39, 30025 40: 40, 30026 52: 52, 30027 56: 56, 30028 58: 58, 30029 74: 74, 30030 87: 87, 30031 92: 92 30032 }], 30033 54: [function (t, n, r) { 30034 var e = t(117)("iterator"), 30035 i = !1; 30036 try { 30037 var o = [7][e](); 30038 o.return = function () { 30039 i = !0; 30040 }, Array.from(o, function () { 30041 throw 2; 30042 }); 30043 } catch (t) {} 30044 n.exports = function (t, n) { 30045 if (!n && !i) return !1; 30046 var r = !1; 30047 try { 30048 var o = [7], 30049 u = o[e](); 30050 u.next = function () { 30051 return { 30052 done: r = !0 30053 }; 30054 }, o[e] = function () { 30055 return u; 30056 }, t(o); 30057 } catch (t) {} 30058 return r; 30059 }; 30060 }, { 30061 117: 117 30062 }], 30063 55: [function (t, n, r) { 30064 n.exports = function (t, n) { 30065 return { 30066 value: n, 30067 done: !!t 30068 }; 30069 }; 30070 }, {}], 30071 56: [function (t, n, r) { 30072 n.exports = {}; 30073 }, {}], 30074 57: [function (t, n, r) { 30075 var e = t(76), 30076 i = t(107); 30077 n.exports = function (t, n) { 30078 for (var r, o = i(t), u = e(o), c = u.length, f = 0; c > f;) if (o[r = u[f++]] === n) return r; 30079 }; 30080 }, { 30081 107: 107, 30082 76: 76 30083 }], 30084 58: [function (t, n, r) { 30085 n.exports = !1; 30086 }, {}], 30087 59: [function (t, n, r) { 30088 var e = Math.expm1; 30089 n.exports = !e || e(10) > 22025.465794806718 || e(10) < 22025.465794806718 || e(-2e-17) != -2e-17 ? function expm1(t) { 30090 return 0 == (t = +t) ? t : t > -1e-6 && t < 1e-6 ? t + t * t / 2 : Math.exp(t) - 1; 30091 } : e; 30092 }, {}], 30093 60: [function (t, n, r) { 30094 n.exports = Math.log1p || function log1p(t) { 30095 return (t = +t) > -1e-8 && t < 1e-8 ? t - t * t / 2 : Math.log(1 + t); 30096 }; 30097 }, {}], 30098 61: [function (t, n, r) { 30099 n.exports = Math.sign || function sign(t) { 30100 return 0 == (t = +t) || t != t ? t : t < 0 ? -1 : 1; 30101 }; 30102 }, {}], 30103 62: [function (t, n, r) { 30104 var e = t(114)("meta"), 30105 i = t(49), 30106 o = t(39), 30107 u = t(67).f, 30108 c = 0, 30109 f = Object.isExtensible || function () { 30110 return !0; 30111 }, 30112 a = !t(34)(function () { 30113 return f(Object.preventExtensions({})); 30114 }), 30115 s = function s(t) { 30116 u(t, e, { 30117 value: { 30118 i: "O" + ++c, 30119 w: {} 30120 } 30121 }); 30122 }, 30123 l = function l(t, n) { 30124 if (!i(t)) return "symbol" == _typeof(t) ? t : ("string" == typeof t ? "S" : "P") + t; 30125 if (!o(t, e)) { 30126 if (!f(t)) return "F";
30127 if (!n) return "E"; 30128 s(t); 30129 } 30130 return t[e].i; 30131 }, 30132 h = function h(t, n) { 30133 if (!o(t, e)) { 30134 if (!f(t)) return !0; 30135 if (!n) return !1; 30136 s(t); 30137 } 30138 return t[e].w; 30139 }, 30140 v = function v(t) { 30141 return a && p.NEED && f(t) && !o(t, e) && s(t), t; 30142 }, 30143 p = n.exports = { 30144 KEY: e, 30145 NEED: !1, 30146 fastKey: l, 30147 getWeak: h, 30148 onFreeze: v 30149 }; 30150 }, { 30151 114: 114, 30152 34: 34, 30153 39: 39, 30154 49: 49, 30155 67: 67 30156 }], 30157 63: [function (t, n, r) { 30158 var e = t(149), 30159 i = t(32), 30160 o = t(94)("metadata"), 30161 u = o.store || (o.store = new (t(255))()), 30162 c = function c(t, n, r) { 30163 var i = u.get(t); 30164 if (!i) { 30165 if (!r) return; 30166 u.set(t, i = new e()); 30167 } 30168 var o = i.get(n); 30169 if (!o) { 30170 if (!r) return; 30171 i.set(n, o = new e()); 30172 } 30173 return o; 30174 }, 30175 f = function f(t, n, r) { 30176 var e = c(n, r, !1); 30177 return void 0 !== e && e.has(t); 30178 }, 30179 a = function a(t, n, r) { 30180 var e = c(n, r, !1); 30181 return void 0 === e ? void 0 : e.get(t); 30182 }, 30183 s = function s(t, n, r, e) { 30184 c(r, e, !0).set(t, n); 30185 }, 30186 l = function l(t, n) { 30187 var r = c(t, n, !1), 30188 e = []; 30189 return r && r.forEach(function (t, n) { 30190 e.push(n); 30191 }), e; 30192 }, 30193 h = function h(t) { 30194 return void 0 === t || "symbol" == _typeof(t) ? t : String(t); 30195 }, 30196 v = function v(t) { 30197 i(i.S, "Reflect", t); 30198 }; 30199 n.exports = { 30200 store: u, 30201 map: c, 30202 has: f, 30203 get: a, 30204 set: s, 30205 keys: l, 30206 key: h, 30207 exp: v 30208 }; 30209 }, { 30210 149: 149, 30211 255: 255, 30212 32: 32, 30213 94: 94 30214 }], 30215 64: [function (t, n, r) { 30216 var e = t(38), 30217 i = t(104).set, 30218 o = e.MutationObserver || e.WebKitMutationObserver, 30219 u = e.process, 30220 c = e.Promise, 30221 f = "process" == t(18)(u); 30222 n.exports = function () { 30223 var t, 30224 n, 30225 r, 30226 a = function a() { 30227 var e, i; 30228 for (f && (e = u.domain) && e.exit(); t;) { 30229 i = t.fn, t = t.next; 30230 try { 30231 i(); 30232 } catch (e) { 30233 throw t ? r() : n = void 0, e; 30234 } 30235 } 30236 n = void 0, e && e.enter(); 30237 }; 30238 if (f) r = function r() { 30239 u.nextTick(a); 30240 };else if (o) { 30241 var s = !0, 30242 l = document.createTextNode(""); 30243 new o(a).observe(l, { 30244 characterData: !0 30245 }), r = function r() { 30246 l.data = s = !s; 30247 }; 30248 } else if (c && c.resolve) { 30249 var h = c.resolve(); 30250 r = function r() { 30251 h.then(a); 30252 }; 30253 } else r = function r() { 30254 i.call(e, a); 30255 }; 30256 return function (e) { 30257 var i = { 30258 fn: e, 30259 next: void 0 30260 }; 30261 n && (n.next = i), t || (t = i, r()), n = i; 30262 }; 30263 }; 30264 }, { 30265 104: 104, 30266 18: 18, 30267 38: 38 30268 }], 30269 65: [function (t, n, r) { 30270 "use strict"; 30271 30272 var e = t(76), 30273 i = t(73), 30274 o = t(77), 30275 u = t(109), 30276 c = t(45), 30277 f = Object.assign; 30278 n.exports = !f || t(34)(function () { 30279 var t = {}, 30280 n = {}, 30281 r = Symbol(), 30282 e = "abcdefghijklmnopqrst"; 30283 return t[r] = 7, e.split("").forEach(function (t) { 30284 n[t] = t; 30285 }), 7 != f({}, t)[r] || Object.keys(f({}, n)).join("") != e; 30286 }) ? function assign(t, n) { 30287 for (var r = u(t), f = arguments.length, a = 1, s = i.f, l = o.f; f > a;) for (var h, v = c(arguments[a++]), p = s ? e(v).concat(s(v)) : e(v), d = p.length, y = 0; d > y;) l.call(v, h = p[y++]) && (r[h] = v[h]); 30288 return r; 30289 } : f; 30290 }, { 30291 109: 109, 30292 34: 34, 30293 45: 45, 30294 73: 73, 30295 76: 76, 30296 77: 77 30297 }], 30298 66: [function (t, n, r) { 30299 var e = t(7), 30300 i = t(68), 30301 o = t(30), 30302 u = t(93)("IE_PROTO"), 30303 c = function c() {}, 30304 f = "prototype", 30305 _a = function a() { 30306 var n, 30307 r = t(29)("iframe"), 30308 e = o.length, 30309 i = "<", 30310 u = ">"; 30311 for (r.style.display = "none", t(41).appendChild(r), r.src = "javascript:", n = r.contentWindow.document, n.open(), n.write(i + "script" + u + "document.F=Object" + i + "/script" + u), n.close(), _a = n.F; e--;) delete _a[f][o[e]]; 30312 return _a(); 30313 }; 30314 n.exports = Object.create || function create(t, n) { 30315 var r; 30316 return null !== t ? (c[f] = e(t), r = new c(), c[f] = null, r[u] = t)
30316: r = _a(), void 0 === n ? r : i(r, n); 30317 }; 30318 }, { 30319 29: 29, 30320 30: 30, 30321 41: 41, 30322 68: 68, 30323 7: 7, 30324 93: 93 30325 }], 30326 67: [function (t, n, r) { 30327 var e = t(7), 30328 i = t(42), 30329 o = t(110), 30330 u = Object.defineProperty; 30331 r.f = t(28) ? Object.defineProperty : function defineProperty(t, n, r) { 30332 if (e(t), n = o(n, !0), e(r), i) try { 30333 return u(t, n, r); 30334 } catch (t) {} 30335 if ("get" in r || "set" in r) throw TypeError("Accessors not supported!"); 30336 return "value" in r && (t[n] = r.value), t; 30337 }; 30338 }, { 30339 110: 110, 30340 28: 28, 30341 42: 42, 30342 7: 7 30343 }], 30344 68: [function (t, n, r) { 30345 var e = t(67), 30346 i = t(7), 30347 o = t(76); 30348 n.exports = t(28) ? Object.defineProperties : function defineProperties(t, n) { 30349 i(t); 30350 for (var r, u = o(n), c = u.length, f = 0; c > f;) e.f(t, r = u[f++], n[r]); 30351 return t; 30352 }; 30353 }, { 30354 28: 28, 30355 67: 67, 30356 7: 7, 30357 76: 76 30358 }], 30359 69: [function (t, n, r) { 30360 n.exports = t(58) || !t(34)(function () { 30361 var n = Math.random(); 30362 __defineSetter__.call(null, n, function () {}), delete t(38)[n]; 30363 }); 30364 }, { 30365 34: 34, 30366 38: 38, 30367 58: 58 30368 }], 30369 70: [function (t, n, r) { 30370 var e = t(77), 30371 i = t(85), 30372 o = t(107), 30373 u = t(110), 30374 c = t(39), 30375 f = t(42), 30376 a = Object.getOwnPropertyDescriptor; 30377 r.f = t(28) ? a : function getOwnPropertyDescriptor(t, n) { 30378 if (t = o(t), n = u(n, !0), f) try { 30379 return a(t, n); 30380 } catch (t) {} 30381 if (c(t, n)) return i(!e.f.call(t, n), t[n]); 30382 }; 30383 }, { 30384 107: 107, 30385 110: 110, 30386 28: 28, 30387 39: 39, 30388 42: 42, 30389 77: 77, 30390 85: 85 30391 }], 30392 71: [function (t, n, r) { 30393 var e = t(107), 30394 i = t(72).f, 30395 o = {}.toString, 30396 u = "object" == (typeof window === "undefined" ? "undefined" : _typeof(window)) && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : [], 30397 c = function c(t) { 30398 try { 30399 return i(t); 30400 } catch (t) { 30401 return u.slice(); 30402 } 30403 }; 30404 n.exports.f = function getOwnPropertyNames(t) { 30405 return u && "[object Window]" == o.call(t) ? c(t) : i(e(t)); 30406 }; 30407 }, { 30408 107: 107, 30409 72: 72 30410 }], 30411 72: [function (t, n, r) { 30412 var e = t(75), 30413 i = t(30).concat("length", "prototype"); 30414 r.f = Object.getOwnPropertyNames || function getOwnPropertyNames(t) { 30415 return e(t, i); 30416 }; 30417 }, { 30418 30: 30, 30419 75: 75 30420 }], 30421 73: [function (t, n, r) { 30422 r.f = Object.getOwnPropertySymbols; 30423 }, {}], 30424 74: [function (t, n, r) { 30425 var e = t(39), 30426 i = t(109), 30427 o = t(93)("IE_PROTO"), 30428 u = Object.prototype; 30429 n.exports = Object.getPrototypeOf || function (t) { 30430 return t = i(t), e(t, o) ? t[o] : "function" == typeof t.constructor && t instanceof t.constructor ? t.constructor.prototype : t instanceof Object ? u : null; 30431 }; 30432 }, { 30433 109: 109, 30434 39: 39, 30435 93: 93 30436 }], 30437 75: [function (t, n, r) { 30438 var e = t(39), 30439 i = t(107), 30440 o = t(11)(!1), 30441 u = t(93)("IE_PROTO"); 30442 n.exports = function (t, n) { 30443 var r, 30444 c = i(t), 30445 f = 0, 30446 a = []; 30447 for (r in c) r != u && e(c, r) && a.push(r); 30448 for (; n.length > f;) e(c, r = n[f++]) && (~o(a, r) || a.push(r)); 30449 return a; 30450 }; 30451 }, { 30452 107: 107, 30453 11: 11, 30454 39: 39, 30455 93: 93 30456 }], 30457 76: [function (t, n, r) { 30458 var e = t(75), 30459 i = t(30); 30460 n.exports = Object.keys || function keys(t) { 30461 return e(t, i); 30462 }; 30463 }, { 30464 30: 30, 30465 75: 75 30466 }], 30467 77: [function (t, n, r) { 30468 r.f = {}.propertyIsEnumerable; 30469 }, {}], 30470 78: [function (t, n, r) { 30471 var e = t(32), 30472 i = t(23), 30473 o = t(34); 30474 n.exports = function (t, n) { 30475 var r = (i.Object || {})[t] || Object[t], 30476 u = {}; 30477 u[t] = n(r), e(e.S + e.F * o(function () { 30478 r(1); 30479 }), "Object", u); 30480 }; 30481 }, { 30482 23: 23, 30483 32: 32, 30484 34: 34 30485 }], 30486 79: [function (t, n, r) { 30487 var e = t(76), 30488 i = t(107), 30489 o = t(77).f; 30490 n.exports = function (t) { 30491 return function (n) { 30492 for (var r, u = i(n), c = e(u), f = c.length, a = 0, s = []; f > a;) o.call(u, r = c[a++]) && s.push(t ? [r, u[r]] : u[r]); 30493 return s; 30494 }; 30495 }; 30496 }, { 30497 107: 107, 30498 76: 76, 30499 77: 77 30500 }], 30501 80: [function (t, n, r) { 30502 var e = t(72), 30503 i = t(73), 30504 o = t(7), 30505 u = t(38).Reflect; 30506 n.exports = u && u.ownKeys || function ownKeys(t) { 30507 var n = e.f(o(t)), 30508 r = i.f; 30509 return r ? n.concat(r(t)) : n; 30510 }; 30511 }, { 30512 38: 38, 30513 7: 7, 30514 72: 72, 30515 73: 73 30516 }], 30517 81: [function (t, n, r) { 30518 var e = t(38).parseFloat, 30519 i = t(102).trim; 30520 n.exports = 1 / e(t(103) + "-0") !== -(1 / 0) ? function parseFloat(t) { 30521 var n = i(String(t), 3), 30522 r = e(n); 30523 return 0 === r && "-" == n.charAt(0) ? -0 : r; 30524 } : e; 30525 }, { 30526 102: 102,
30527 103: 103, 30528 38: 38 30529 }], 30530 82: [function (t, n, r) { 30531 var e = t(38).parseInt, 30532 i = t(102).trim, 30533 o = t(103), 30534 u = /^[\-+]?0[xX]/; 30535 n.exports = 8 !== e(o + "08") || 22 !== e(o + "0x16") ? function parseInt(t, n) { 30536 var r = i(String(t), 3); 30537 return e(r, n >>> 0 || (u.test(r) ? 16 : 10)); 30538 } : e; 30539 }, { 30540 102: 102, 30541 103: 103, 30542 38: 38 30543 }], 30544 83: [function (t, n, r) { 30545 "use strict"; 30546 30547 var e = t(84), 30548 i = t(44), 30549 o = t(3); 30550 n.exports = function () { 30551 for (var t = o(this), n = arguments.length, r = Array(n), u = 0, c = e._, f = !1; n > u;) (r[u] = arguments[u++]) === c && (f = !0); 30552 return function () { 30553 var e, 30554 o = this, 30555 u = arguments.length, 30556 a = 0, 30557 s = 0; 30558 if (!f && !u) return i(t, r, o); 30559 if (e = r.slice(), f) for (; n > a; a++) e[a] === c && (e[a] = arguments[s++]); 30560 for (; u > s;) e.push(arguments[s++]); 30561 return i(t, e, o); 30562 }; 30563 }; 30564 }, { 30565 3: 3, 30566 44: 44, 30567 84: 84 30568 }], 30569 84: [function (t, n, r) { 30570 n.exports = t(38); 30571 }, { 30572 38: 38 30573 }], 30574 85: [function (t, n, r) { 30575 n.exports = function (t, n) { 30576 return { 30577 enumerable: !(1 & t), 30578 configurable: !(2 & t), 30579 writable: !(4 & t), 30580 value: n 30581 }; 30582 }; 30583 }, {}], 30584 86: [function (t, n, r) { 30585 var e = t(87); 30586 n.exports = function (t, n, r) { 30587 for (var i in n) e(t, i, n[i], r); 30588 return t; 30589 }; 30590 }, { 30591 87: 87 30592 }], 30593 87: [function (t, n, r) { 30594 var e = t(38), 30595 i = t(40), 30596 o = t(39), 30597 u = t(114)("src"), 30598 c = "toString", 30599 f = Function[c], 30600 a = ("" + f).split(c); 30601 t(23).inspectSource = function (t) { 30602 return f.call(t); 30603 }, (n.exports = function (t, n, r, c) { 30604 var f = "function" == typeof r; 30605 f && (o(r, "name") || i(r, "name", n)), t[n] !== r && (f && (o(r, u) || i(r, u, t[n] ? "" + t[n] : a.join(String(n)))), t === e ? t[n] = r : c ? t[n] ? t[n] = r : i(t, n, r) : (delete t[n], i(t, n, r))); 30606 })(Function.prototype, c, function toString() { 30607 return "function" == typeof this && this[u] || f.call(this); 30608 }); 30609 }, { 30610 114: 114, 30611 23: 23, 30612 38: 38, 30613 39: 39, 30614 40: 40 30615 }], 30616 88: [function (t, n, r) { 30617 n.exports = function (t, n) { 30618 var r = n === Object(n) ? function (t) { 30619 return n[t]; 30620 } : n; 30621 return function (n) { 30622 return String(n).replace(t, r); 30623 }; 30624 }; 30625 }, {}], 30626 89: [function (t, n, r) { 30627 n.exports = Object.is || function is(t, n) { 30628 return t === n ? 0 !== t || 1 / t === 1 / n : t != t && n != n; 30629 }; 30630 }, {}], 30631 90: [function (t, n, r) { 30632 var e = t(49), 30633 i = t(7), 30634 o = function o(t, n) { 30635 if (i(t), !e(n) && null !== n) throw TypeError(n + ": can't set as prototype!"); 30636 }; 30637 n.exports = { 30638 set: Object.setPrototypeOf || ("__proto__" in {} ? function (n, r, e) { 30639 try { 30640 e = t(25)(Function.call, t(70).f(Object.prototype, "__proto__").set, 2), e(n, []), r = !(n instanceof Array); 30641 } catch (t) { 30642 r = !0; 30643 } 30644 return function setPrototypeOf(t, n) { 30645 return o(t, n), r ? t.__proto__ = n : e(t, n), t; 30646 }; 30647 }({}, !1) : void 0), 30648 check: o 30649 }; 30650 }, { 30651 25: 25, 30652 49: 49, 30653 7: 7, 30654 70: 70 30655 }], 30656 91: [function (t, n, r) { 30657 "use strict"; 30658 30659 var e = t(38), 30660 i = t(67), 30661 o = t(28), 30662 u = t(117)("species"); 30663 n.exports = function (t) { 30664 var n = e[t]; 30665 o && n && !n[u] && i.f(n, u, { 30666 configurable: !0, 30667 get: function get() { 30668 return this; 30669 } 30670 }); 30671 }; 30672 }, { 30673 117: 117, 30674 28: 28, 30675 38: 38, 30676 67: 67 30677 }], 30678 92: [function (t, n, r) { 30679 var e = t(67).f, 30680 i = t(39), 30681 o = t(117)("toStringTag"); 30682 n.exports = function (t, n, r) { 30683 t && !i(t = r ? t : t.prototype, o) && e(t, o, { 30684 configurable: !0, 30685 value: n 30686 }); 30687 }; 30688 }, { 30689 117: 117, 30690 39: 39, 30691 67: 67 30692 }], 30693 93: [function (t, n, r) { 30694 var e = t(94)("keys"), 30695 i = t(114); 30696 n.exports = function (t) { 30697 return e[t] || (e[t] = i(t)); 30698 }; 30699 }, { 30700 114: 114, 30701 94: 94 30702 }], 30703 94: [function (t, n, r) { 30704 var e = t(38), 30705 i = "__core-js_shared__", 30706 o = e[i] || (e[i] = {}); 30707 n.exports = function (t) { 30708 return o[t] || (o[t] = {}); 30709 }; 30710 }, { 30711 38: 38 30712 }], 30713 95: [function (t, n, r) { 30714 var e = t(7), 30715 i = t(3), 30716 o = t(117)("species"); 30717 n.exports = function (t, n) { 30718 var r, 30719 u = e(t).constructor; 30720 return void 0 === u || void 0 == (r = e(u)[o]) ? n : i(r); 30721 }; 30722 }, { 30723 117: 117, 30724 3: 3, 30725 7: 7 30726 }], 30727 96: [function (t, n, r) { 30728 var e = t(34); 30729 n.exports = function (t, n) { 30730 return !!t && e(function () { 30731 n ? t.call(null, function () {}, 1) : t.call(null); 30732 }); 30733 }; 30734 }, { 30735 34: 34 30736 }], 30737 97: [function (t, n, r) { 30738 var e = t(106), 30739 i = t(27); 30740 n.exports = function (t) { 30741 return function (n, r) { 30742 var o, 30743 u, 30744 c = String(i(n)), 30745 f = e(r), 30746 a = c.length; 30747 return f < 0 || f >
30747= a ? t ? "" : void 0 : (o = c.charCodeAt(f), o < 55296 || o > 56319 || f + 1 === a || (u = c.charCodeAt(f + 1)) < 56320 || u > 57343 ? t ? c.charAt(f) : o : t ? c.slice(f, f + 2) : (o - 55296 << 10) + (u - 56320) + 65536); 30748 }; 30749 }; 30750 }, { 30751 106: 106, 30752 27: 27 30753 }], 30754 98: [function (t, n, r) { 30755 var e = t(50), 30756 i = t(27); 30757 n.exports = function (t, n, r) { 30758 if (e(n)) throw TypeError("String#" + r + " doesn't accept regex!"); 30759 return String(i(t)); 30760 }; 30761 }, { 30762 27: 27, 30763 50: 50 30764 }], 30765 99: [function (t, n, r) { 30766 var e = t(32), 30767 i = t(34), 30768 o = t(27), 30769 u = /"/g, 30770 c = function c(t, n, r, e) { 30771 var i = String(o(t)), 30772 c = "<" + n; 30773 return "" !== r && (c += " " + r + '="' + String(e).replace(u, """) + '"'), c + ">" + i + "</" + n + ">"; 30774 }; 30775 n.exports = function (t, n) { 30776 var r = {}; 30777 r[t] = n(c), e(e.P + e.F * i(function () { 30778 var n = ""[t]('"'); 30779 return n !== n.toLowerCase() || n.split('"').length > 3; 30780 }), "String", r); 30781 }; 30782 }, { 30783 27: 27, 30784 32: 32, 30785 34: 34 30786 }], 30787 100: [function (t, n, r) { 30788 var e = t(108), 30789 i = t(101), 30790 o = t(27); 30791 n.exports = function (t, n, r, u) { 30792 var c = String(o(t)), 30793 f = c.length, 30794 a = void 0 === r ? " " : String(r), 30795 s = e(n); 30796 if (s <= f || "" == a) return c; 30797 var l = s - f, 30798 h = i.call(a, Math.ceil(l / a.length)); 30799 return h.length > l && (h = h.slice(0, l)), u ? h + c : c + h; 30800 }; 30801 }, { 30802 101: 101, 30803 108: 108, 30804 27: 27 30805 }], 30806 101: [function (t, n, r) { 30807 "use strict"; 30808 30809 var e = t(106), 30810 i = t(27); 30811 n.exports = function repeat(t) { 30812 var n = String(i(this)), 30813 r = "", 30814 o = e(t); 30815 if (o < 0 || o == 1 / 0) throw RangeError("Count can't be negative"); 30816 for (; o > 0; (o >>>= 1) && (n += n)) 1 & o && (r += n); 30817 return r; 30818 }; 30819 }, { 30820 106: 106, 30821 27: 27 30822 }], 30823 102: [function (t, n, r) { 30824 var e = t(32), 30825 i = t(27), 30826 o = t(34), 30827 u = t(103), 30828 c = "[" + u + "]", 30829 f = "​…", 30830 a = RegExp("^" + c + c + "*"), 30831 s = RegExp(c + c + "*$"), 30832 l = function l(t, n, r) { 30833 var i = {}, 30834 c = o(function () { 30835 return !!u[t]() || f[t]() != f; 30836 }), 30837 a = i[t] = c ? n(h) : u[t]; 30838 r && (i[r] = a), e(e.P + e.F * c, "String", i); 30839 }, 30840 h = l.trim = function (t, n) { 30841 return t = String(i(t)), 1 & n && (t = t.replace(a, "")), 2 & n && (t = t.replace(s, "")), t; 30842 }; 30843 n.exports = l; 30844 }, { 30845 103: 103, 30846 27: 27, 30847 32: 32, 30848 34: 34 30849 }], 30850 103: [function (t, n, r) { 30851 n.exports = "\t\n\x0B\f\r \u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF"; 30852 }, {}], 30853 104: [function (t, n, r) { 30854 var e, 30855 i, 30856 o, 30857 u = t(25), 30858 c = t(44), 30859 f = t(41), 30860 a = t(29), 30861 s = t(38), 30862 l = s.process, 30863 h = s.setImmediate, 30864 v = s.clearImmediate, 30865 p = s.MessageChannel, 30866 d = 0, 30867 y = {}, 30868 g = "onreadystatechange", 30869 b = function b() { 30870 var t = +this; 30871 if (y.hasOwnProperty(t)) { 30872 var n = y[t]; 30873 delete y[t], n(); 30874 } 30875 }, 30876 x = function x(t) { 30877 b.call(t.data); 30878 }; 30879 h && v || (h = function setImmediate(t) { 30880 for (var n = [], r = 1; arguments.length > r;) n.push(arguments[r++]); 30881 return y[++d] = function () { 30882 c("function" == typeof t ? t : Function(t), n); 30883 }, e(d), d; 30884 }, v = function clearImmediate(t) { 30885 delete y[t]; 30886 }, "process" == t(18)(l) ? e = function e(t) { 30887 l.nextTick(u(b, t, 1)); 30888 } : p ? (i = new p(), o = i.port2, i.port1.onmessage = x, e = u(o.postMessage, o, 1)) : s.addEventListener && "function" == typeof postMessage && !s.importScripts ? (e = function e(t) { 30889 s.postMessage(t + "", "*"); 30890 }, s.addEventListener("message", x, !1)) : e = g in a("script") ? function (t) { 30891 f.appendChild(a("script"))[g] = function () { 30892 f.removeChild(this), b.call(t); 30893 }; 30894 } : function (t) { 30895 setTimeout(u(b, t, 1), 0); 30896 }), n.exports = { 30897 set: h, 30898 clear: v 30899 }; 30900 }, { 30901 18: 18, 30902 25: 25, 30903 29: 29, 30904 38: 38, 30905 41: 41, 30906 44: 44 30907 }], 30908 105: [function (t, n, r) { 30909 var e = t(106), 30910 i = Math.max, 30911 o = Math.min; 30912 n.exports = function (t, n) { 30913 return t = e(t), t < 0 ? i(t + n, 0) : o(t, n); 30914 }; 30915 }, { 30916 106: 106 30917 }], 30918 106: [function (t, n, r) {
30919 var e = Math.ceil, 30920 i = Math.floor; 30921 n.exports = function (t) { 30922 return isNaN(t = +t) ? 0 : (t > 0 ? i : e)(t); 30923 }; 30924 }, {}], 30925 107: [function (t, n, r) { 30926 var e = t(45), 30927 i = t(27); 30928 n.exports = function (t) { 30929 return e(i(t)); 30930 }; 30931 }, { 30932 27: 27, 30933 45: 45 30934 }], 30935 108: [function (t, n, r) { 30936 var e = t(106), 30937 i = Math.min; 30938 n.exports = function (t) { 30939 return t > 0 ? i(e(t), 9007199254740991) : 0; 30940 }; 30941 }, { 30942 106: 106 30943 }], 30944 109: [function (t, n, r) { 30945 var e = t(27); 30946 n.exports = function (t) { 30947 return Object(e(t)); 30948 }; 30949 }, { 30950 27: 27 30951 }], 30952 110: [function (t, n, r) { 30953 var e = t(49); 30954 n.exports = function (t, n) { 30955 if (!e(t)) return t; 30956 var r, i; 30957 if (n && "function" == typeof (r = t.toString) && !e(i = r.call(t))) return i; 30958 if ("function" == typeof (r = t.valueOf) && !e(i = r.call(t))) return i; 30959 if (!n && "function" == typeof (r = t.toString) && !e(i = r.call(t))) return i; 30960 throw TypeError("Can't convert object to primitive value"); 30961 }; 30962 }, { 30963 49: 49 30964 }], 30965 111: [function (t, n, r) { 30966 "use strict"; 30967 30968 if (t(28)) { 30969 var e = t(58), 30970 i = t(38), 30971 o = t(34), 30972 u = t(32), 30973 c = t(113), 30974 f = t(112), 30975 a = t(25), 30976 s = t(6), 30977 l = t(85), 30978 h = t(40), 30979 v = t(86), 30980 p = t(106), 30981 d = t(108), 30982 y = t(105), 30983 g = t(110), 30984 b = t(39), 30985 x = t(89), 30986 m = t(17), 30987 w = t(49), 30988 S = t(109), 30989 _ = t(46), 30990 E = t(66), 30991 O = t(74), 30992 F = t(72).f, 30993 P = t(118), 30994 M = t(114), 30995 A = t(117), 30996 I = t(12), 30997 j = t(11), 30998 N = t(95), 30999 k = t(130), 31000 R = t(56), 31001 T = t(54), 31002 L = t(91), 31003 C = t(9), 31004 U = t(8), 31005 G = t(67), 31006 D = t(70), 31007 W = G.f, 31008 B = D.f, 31009 V = i.RangeError, 31010 z = i.TypeError, 31011 K = i.Uint8Array, 31012 J = "ArrayBuffer", 31013 Y = "Shared" + J, 31014 q = "BYTES_PER_ELEMENT", 31015 X = "prototype", 31016 $ = Array[X], 31017 H = f.ArrayBuffer, 31018 Z = f.DataView, 31019 Q = I(0), 31020 tt = I(2), 31021 nt = I(3), 31022 rt = I(4), 31023 et = I(5), 31024 it = I(6), 31025 ot = j(!0), 31026 ut = j(!1), 31027 ct = k.values, 31028 ft = k.keys, 31029 at = k.entries, 31030 st = $.lastIndexOf, 31031 lt = $.reduce, 31032 ht = $.reduceRight, 31033 vt = $.join, 31034 pt = $.sort, 31035 dt = $.slice, 31036 yt = $.toString, 31037 gt = $.toLocaleString, 31038 bt = A("iterator"), 31039 xt = A("toStringTag"), 31040 mt = M("typed_constructor"), 31041 wt = M("def_constructor"), 31042 St = c.CONSTR, 31043 _t = c.TYPED, 31044 Et = c.VIEW, 31045 Ot = "Wrong length!", 31046 Ft = I(1, function (t, n) { 31047 return Nt(N(t, t[wt]), n); 31048 }), 31049 Pt = o(function () { 31050 return 1 === new K(new Uint16Array([1]).buffer)[0]; 31051 }), 31052 Mt = !!K && !!K[X].set && o(function () { 31053 new K(1).set({}); 31054 }), 31055 At = function At(t, n) { 31056 if (void 0 === t) throw z(Ot); 31057 var r = +t, 31058 e = d(t); 31059 if (n && !x(r, e)) throw V(Ot); 31060 return e; 31061 }, 31062 It = function It(t, n) { 31063 var r = p(t); 31064 if (r < 0 || r % n) throw V("Wrong offset!"); 31065 return r; 31066 }, 31067 jt = function jt(t) { 31068 if (w(t) && _t in t) return t; 31069 throw z(t + " is not a typed array!"); 31070 }, 31071 Nt = function Nt(t, n) { 31072 if (!(w(t) && mt in t)) throw z("It is not a typed array constructor!"); 31073 return new t(n); 31074 }, 31075 kt = function kt(t, n) { 31076 return Rt(N(t, t[wt]), n); 31077 }, 31078 Rt = function Rt(t, n) { 31079 for (var r = 0, e = n.length, i = Nt(t, e); e > r;) i[r] = n[r++]; 31080 return i; 31081 }, 31082 Tt = function Tt(t, n, r) { 31083 W(t, n, { 31084 get: function get() { 31085 return this._d[r]; 31086 } 31087 }); 31088 }, 31089 Lt = function from(t) { 31090 var n, 31091 r, 31092 e, 31093 i, 31094 o, 31095 u, 31096 c = S(t), 31097 f = arguments.length, 31098 s = f > 1 ? arguments[1] : void 0, 31099 l = void 0 !== s, 31100 h = P(c); 31101 if (void 0 != h && !_(h)) { 31102 for (u = h.call(c), e = [], n = 0; !(o = u.next()).done; n++) e.push(o.value); 31103 c = e; 31104 } 31105 for (l && f > 2 && (s = a(s, arguments[2], 2)), n = 0, r = d(c.length), i = Nt(this, r); r > n; n++) i[n] = l ? s(c[n], n) : c[n]; 31106 return i; 31107 }, 31108 Ct = function of() { 31109 for (var t = 0, n = arguments.length, r = Nt(this, n); n > t;) r[t] = arguments[t++]; 31110 return r; 31111 }, 31112 Ut = !!K && o(function () { 31113 gt.call(new K(1)); 31114 }),
31115 Gt = function toLocaleString() { 31116 return gt.apply(Ut ? dt.call(jt(this)) : jt(this), arguments); 31117 }, 31118 Dt = { 31119 copyWithin: function copyWithin(t, n) { 31120 return U.call(jt(this), t, n, arguments.length > 2 ? arguments[2] : void 0); 31121 }, 31122 every: function every(t) { 31123 return rt(jt(this), t, arguments.length > 1 ? arguments[1] : void 0); 31124 }, 31125 fill: function fill(t) { 31126 return C.apply(jt(this), arguments); 31127 }, 31128 filter: function filter(t) { 31129 return kt(this, tt(jt(this), t, arguments.length > 1 ? arguments[1] : void 0)); 31130 }, 31131 find: function find(t) { 31132 return et(jt(this), t, arguments.length > 1 ? arguments[1] : void 0); 31133 }, 31134 findIndex: function findIndex(t) { 31135 return it(jt(this), t, arguments.length > 1 ? arguments[1] : void 0); 31136 }, 31137 forEach: function forEach(t) { 31138 Q(jt(this), t, arguments.length > 1 ? arguments[1] : void 0); 31139 }, 31140 indexOf: function indexOf(t) { 31141 return ut(jt(this), t, arguments.length > 1 ? arguments[1] : void 0); 31142 }, 31143 includes: function includes(t) { 31144 return ot(jt(this), t, arguments.length > 1 ? arguments[1] : void 0); 31145 }, 31146 join: function join(t) { 31147 return vt.apply(jt(this), arguments); 31148 }, 31149 lastIndexOf: function lastIndexOf(t) { 31150 return st.apply(jt(this), arguments); 31151 }, 31152 map: function map(t) { 31153 return Ft(jt(this), t, arguments.length > 1 ? arguments[1] : void 0); 31154 }, 31155 reduce: function reduce(t) { 31156 return lt.apply(jt(this), arguments); 31157 }, 31158 reduceRight: function reduceRight(t) { 31159 return ht.apply(jt(this), arguments); 31160 }, 31161 reverse: function reverse() { 31162 for (var t, n = this, r = jt(n).length, e = Math.floor(r / 2), i = 0; i < e;) t = n[i], n[i++] = n[--r], n[r] = t; 31163 return n; 31164 }, 31165 some: function some(t) { 31166 return nt(jt(this), t, arguments.length > 1 ? arguments[1] : void 0); 31167 }, 31168 sort: function sort(t) { 31169 return pt.call(jt(this), t); 31170 }, 31171 subarray: function subarray(t, n) { 31172 var r = jt(this), 31173 e = r.length, 31174 i = y(t, e); 31175 return new (N(r, r[wt]))(r.buffer, r.byteOffset + i * r.BYTES_PER_ELEMENT, d((void 0 === n ? e : y(n, e)) - i)); 31176 } 31177 }, 31178 Wt = function slice(t, n) { 31179 return kt(this, dt.call(jt(this), t, n)); 31180 }, 31181 Bt = function set(t) { 31182 jt(this); 31183 var n = It(arguments[1], 1), 31184 r = this.length, 31185 e = S(t), 31186 i = d(e.length), 31187 o = 0; 31188 if (i + n > r) throw V(Ot); 31189 for (; o < i;) this[n + o] = e[o++]; 31190 }, 31191 Vt = { 31192 entries: function entries() { 31193 return at.call(jt(this)); 31194 }, 31195 keys: function keys() { 31196 return ft.call(jt(this)); 31197 }, 31198 values: function values() { 31199 return ct.call(jt(this)); 31200 } 31201 }, 31202 zt = function zt(t, n) { 31203 return w(t) && t[_t] && "symbol" != _typeof(n) && n in t && String(+n) == String(n); 31204 }, 31205 Kt = function getOwnPropertyDescriptor(t, n) { 31206 return zt(t, n = g(n, !0)) ? l(2, t[n]) : B(t, n); 31207 }, 31208 Jt = function defineProperty(t, n, r) { 31209 return !(zt(t, n = g(n, !0)) && w(r) && b(r, "value")) || b(r, "get") || b(r, "set") || r.configurable || b(r, "writable") && !r.writable || b(r, "enumerable") && !r.enumerable ? W(t, n, r) : (t[n] = r.value, t); 31210 }; 31211 St || (D.f = Kt, G.f = Jt), u(u.S + u.F * !St, "Object", { 31212 getOwnPropertyDescriptor: Kt, 31213 defineProperty: Jt 31214 }), o(function () { 31215 yt.call({}); 31216 }) && (yt = gt = function toString() { 31217 return vt.call(this); 31218 }); 31219 var Yt = v({}, Dt); 31220 v(Yt, Vt), h(Yt, bt, Vt.values), v(Yt, { 31221 slice: Wt, 31222 set: Bt, 31223 constructor: function constructor() {}, 31224 toString: yt,
31225 toLocaleString: Gt 31226 }), Tt(Yt, "buffer", "b"), Tt(Yt, "byteOffset", "o"), Tt(Yt, "byteLength", "l"), Tt(Yt, "length", "e"), W(Yt, xt, { 31227 get: function get() { 31228 return this[_t]; 31229 } 31230 }), n.exports = function (t, n, r, f) { 31231 f = !!f; 31232 var a = t + (f ? "Clamped" : "") + "Array", 31233 l = "Uint8Array" != a, 31234 v = "get" + t, 31235 p = "set" + t, 31236 y = i[a], 31237 g = y || {}, 31238 b = y && O(y), 31239 x = !y || !c.ABV, 31240 S = {}, 31241 _ = y && y[X], 31242 P = function P(t, r) { 31243 var e = t._d; 31244 return e.v[v](r * n + e.o, Pt); 31245 }, 31246 M = function M(t, r, e) { 31247 var i = t._d; 31248 f && (e = (e = Math.round(e)) < 0 ? 0 : e > 255 ? 255 : 255 & e), i.v[p](r * n + i.o, e, Pt); 31249 }, 31250 A = function A(t, n) { 31251 W(t, n, { 31252 get: function get() { 31253 return P(this, n); 31254 }, 31255 set: function set(t) { 31256 return M(this, n, t); 31257 }, 31258 enumerable: !0 31259 }); 31260 }; 31261 x ? (y = r(function (t, r, e, i) { 31262 s(t, y, a, "_d"); 31263 var o, 31264 u, 31265 c, 31266 f, 31267 l = 0, 31268 v = 0; 31269 if (w(r)) { 31270 if (!(r instanceof H || (f = m(r)) == J || f == Y)) return _t in r ? Rt(y, r) : Lt.call(y, r); 31271 o = r, v = It(e, n); 31272 var p = r.byteLength; 31273 if (void 0 === i) { 31274 if (p % n) throw V(Ot); 31275 if (u = p - v, u < 0) throw V(Ot); 31276 } else if (u = d(i) * n, u + v > p) throw V(Ot); 31277 c = u / n; 31278 } else c = At(r, !0), u = c * n, o = new H(u); 31279 for (h(t, "_d", { 31280 b: o, 31281 o: v, 31282 l: u, 31283 e: c, 31284 v: new Z(o) 31285 }); l < c;) A(t, l++); 31286 }), _ = y[X] = E(Yt), h(_, "constructor", y)) : T(function (t) { 31287 new y(null), new y(t); 31288 }, !0) || (y = r(function (t, r, e, i) { 31289 s(t, y, a); 31290 var o; 31291 return w(r) ? r instanceof H || (o = m(r)) == J || o == Y ? void 0 !== i ? new g(r, It(e, n), i) : void 0 !== e ? new g(r, It(e, n)) : new g(r) : _t in r ? Rt(y, r) : Lt.call(y, r) : new g(At(r, l)); 31292 }), Q(b !== Function.prototype ? F(g).concat(F(b)) : F(g), function (t) { 31293 t in y || h(y, t, g[t]); 31294 }), y[X] = _, e || (_.constructor = y)); 31295 var I = _[bt], 31296 j = !!I && ("values" == I.name || void 0 == I.name), 31297 N = Vt.values; 31298 h(y, mt, !0), h(_, _t, a), h(_, Et, !0), h(_, wt, y), (f ? new y(1)[xt] == a : xt in _) || W(_, xt, { 31299 get: function get() { 31300 return a; 31301 } 31302 }), S[a] = y, u(u.G + u.W + u.F * (y != g), S), u(u.S, a, { 31303 BYTES_PER_ELEMENT: n, 31304 from: Lt, 31305 of: Ct 31306 }), q in _ || h(_, q, n), u(u.P, a, Dt), L(a), u(u.P + u.F * Mt, a, { 31307 set: Bt 31308 }), u(u.P + u.F * !j, a, Vt), u(u.P + u.F * (_.toString != yt), a, { 31309 toString: yt 31310 }), u(u.P + u.F * o(function () { 31311 new y(1).slice(); 31312 }), a, { 31313 slice: Wt 31314 }), u(u.P + u.F * (o(function () { 31315 return [1, 2].toLocaleString() != new y([1, 2]).toLocaleString(); 31316 }) || !o(function () { 31317 _.toLocaleString.call([1, 2]); 31318 })), a, { 31319 toLocaleString: Gt 31320 }), R[a] = j ? I : N, e || j || h(_, bt, N); 31321 }; 31322 } else n.exports = function () {}; 31323 }, { 31324 105: 105, 31325 106: 106, 31326 108: 108, 31327 109: 109, 31328 11: 11, 31329 110: 110, 31330 112: 112, 31331 113: 113, 31332 114: 114, 31333 117: 117, 31334 118: 118, 31335 12: 12, 31336 130: 130, 31337 17: 17, 31338 25: 25, 31339 28: 28, 31340 32: 32, 31341 34: 34, 31342 38: 38, 31343 39: 39, 31344 40: 40, 31345 46: 46, 31346 49: 49, 31347 54: 54, 31348 56: 56, 31349 58: 58, 31350 6: 6, 31351 66: 66, 31352 67: 67, 31353 70: 70, 31354 72: 72, 31355 74: 74, 31356 8: 8, 31357 85: 85, 31358 86: 86, 31359 89: 89, 31360 9: 9, 31361 91: 91, 31362 95: 95 31363 }], 31364 112: [function (t, n, r) { 31365 "use strict"; 31366 31367 var e = t(38), 31368 i = t(28), 31369 o = t(58), 31370 u = t(113), 31371 c = t(40), 31372 f = t(86), 31373 a = t(34), 31374 s = t(6), 31375 l = t(106), 31376 h = t(108), 31377 v = t(72).f, 31378 p = t(67).f, 31379 d = t(9), 31380 y = t(92), 31381 g = "ArrayBuffer", 31382 b = "DataView", 31383 x = "prototype", 31384 m = "Wrong length!", 31385 w = "Wrong index!", 31386 S = e[g], 31387 _ = e[b], 31388 E = e.Math, 31389 O = e.RangeError, 31390 F = e.Infinity, 31391 P = S, 31392 M = E.abs, 31393 A = E.pow, 31394 I = E.floor, 31395 j = E.log, 31396 N = E.LN2, 31397 k = "buffer", 31398 R = "byteLength", 31399 T = "byteOffset", 31400 L = i ? "_b" : k, 31401 C = i ? "_l" : R, 31402 U = i ? "_o" : T, 31403 G = function G(t, n, r) { 31404 var e, 31405 i, 31406 o, 31407 u = Array(r), 31408 c = 8 * r - n - 1, 31409 f = (1 << c) - 1, 31410 a = f >> 1, 31411 s = 23 === n ? A(2, -24) - A(2, -77) : 0, 31412 l = 0, 31413 h = t < 0 || 0 === t && 1 / t < 0 ? 1 : 0; 31414 for (t = M(t), t != t || t === F ? (i = t != t ? 1 : 0, e = f) : (e = I(j(t) / N), t * (o = A(2, -e)) < 1 && (e--, o *= 2), t += e + a >= 1 ? s / o : s * A(2, 1 - a), t * o >= 2 && (e++, o /= 2), e + a >= f ? (i = 0, e = f) : e + a >= 1 ? (i = (t * o - 1) * A(2, n), e += a) : (i = t * A(2, a - 1) * A(2, n), e = 0)); n >= 8; u[l++] = 255 & i, i /= 256, n -= 8); 31415 for (e = e << n | i, c += n;
31415 c > 0; u[l++] = 255 & e, e /= 256, c -= 8); 31416 return u[--l] |= 128 * h, u; 31417 }, 31418 D = function D(t, n, r) { 31419 var e, 31420 i = 8 * r - n - 1, 31421 o = (1 << i) - 1, 31422 u = o >> 1, 31423 c = i - 7, 31424 f = r - 1, 31425 a = t[f--], 31426 s = 127 & a; 31427 for (a >>= 7; c > 0; s = 256 * s + t[f], f--, c -= 8); 31428 for (e = s & (1 << -c) - 1, s >>= -c, c += n; c > 0; e = 256 * e + t[f], f--, c -= 8); 31429 if (0 === s) s = 1 - u;else { 31430 if (s === o) return e ? NaN : a ? -F : F; 31431 e += A(2, n), s -= u; 31432 } 31433 return (a ? -1 : 1) * e * A(2, s - n); 31434 }, 31435 W = function W(t) { 31436 return t[3] << 24 | t[2] << 16 | t[1] << 8 | t[0]; 31437 }, 31438 B = function B(t) { 31439 return [255 & t]; 31440 }, 31441 V = function V(t) { 31442 return [255 & t, t >> 8 & 255]; 31443 }, 31444 z = function z(t) { 31445 return [255 & t, t >> 8 & 255, t >> 16 & 255, t >> 24 & 255]; 31446 }, 31447 K = function K(t) { 31448 return G(t, 52, 8); 31449 }, 31450 J = function J(t) { 31451 return G(t, 23, 4); 31452 }, 31453 Y = function Y(t, n, r) { 31454 p(t[x], n, { 31455 get: function get() { 31456 return this[r]; 31457 } 31458 }); 31459 }, 31460 q = function q(t, n, r, e) { 31461 var i = +r, 31462 o = l(i); 31463 if (i != o || o < 0 || o + n > t[C]) throw O(w); 31464 var u = t[L]._b, 31465 c = o + t[U], 31466 f = u.slice(c, c + n); 31467 return e ? f : f.reverse(); 31468 }, 31469 X = function X(t, n, r, e, i, o) { 31470 var u = +r, 31471 c = l(u); 31472 if (u != c || c < 0 || c + n > t[C]) throw O(w); 31473 for (var f = t[L]._b, a = c + t[U], s = e(+i), h = 0; h < n; h++) f[a + h] = s[o ? h : n - h - 1]; 31474 }, 31475 $ = function $(t, n) { 31476 s(t, S, g); 31477 var r = +n, 31478 e = h(r); 31479 if (r != e) throw O(m); 31480 return e; 31481 }; 31482 if (u.ABV) { 31483 if (!a(function () { 31484 new S(); 31485 }) || !a(function () { 31486 new S(.5); 31487 })) { 31488 S = function ArrayBuffer(t) { 31489 return new P($(this, t)); 31490 }; 31491 for (var H, Z = S[x] = P[x], Q = v(P), tt = 0; Q.length > tt;) (H = Q[tt++]) in S || c(S, H, P[H]); 31492 o || (Z.constructor = S); 31493 } 31494 var nt = new _(new S(2)), 31495 rt = _[x].setInt8; 31496 nt.setInt8(0, 2147483648), nt.setInt8(1, 2147483649), !nt.getInt8(0) && nt.getInt8(1) || f(_[x], { 31497 setInt8: function setInt8(t, n) { 31498 rt.call(this, t, n << 24 >> 24); 31499 }, 31500 setUint8: function setUint8(t, n) { 31501 rt.call(this, t, n << 24 >> 24); 31502 } 31503 }, !0); 31504 } else S = function ArrayBuffer(t) { 31505 var n = $(this, t); 31506 this._b = d.call(Array(n), 0), this[C] = n; 31507 }, _ = function DataView(t, n, r) { 31508 s(this, _, b), s(t, S, b); 31509 var e = t[C], 31510 i = l(n); 31511 if (i < 0 || i > e) throw O("Wrong offset!"); 31512 if (r = void 0 === r ? e - i : h(r), i + r > e) throw O(m); 31513 this[L] = t, this[U] = i, this[C] = r; 31514 }, i && (Y(S, R, "_l"), Y(_, k, "_b"), Y(_, R, "_l"), Y(_, T, "_o")), f(_[x], { 31515 getInt8: function getInt8(t) { 31516 return q(this, 1, t)[0] << 24 >> 24; 31517 }, 31518 getUint8: function getUint8(t) { 31519 return q(this, 1, t)[0]; 31520 }, 31521 getInt16: function getInt16(t) { 31522 var n = q(this, 2, t, arguments[1]); 31523 return (n[1] << 8 | n[0]) << 16 >> 16; 31524 }, 31525 getUint16: function getUint16(t) { 31526 var n = q(this, 2, t, arguments[1]); 31527 return n[1] << 8 | n[0]; 31528 }, 31529 getInt32: function getInt32(t) { 31530 return W(q(this, 4, t, arguments[1])); 31531 }, 31532 getUint32: function getUint32(t) { 31533 return W(q(this, 4, t, arguments[1])) >>> 0; 31534 }, 31535 getFloat32: function getFloat32(t) { 31536 return D(q(this, 4, t, arguments[1]), 23, 4); 31537 }, 31538 getFloat64: function getFloat64(t) { 31539 return D(q(this, 8, t, arguments[1]), 52, 8); 31540 }, 31541 setInt8: function setInt8(t, n) { 31542 X(this, 1, t, B, n); 31543 }, 31544 setUint8: function setUint8(t, n) { 31545 X(this, 1, t, B, n); 31546 }, 31547 setInt16: function setInt16(t, n) { 31548 X(this, 2, t, V, n, arguments[2]); 31549 }, 31550 setUint16: function setUint16(t, n) { 31551 X(this, 2, t, V, n, arguments[2]); 31552 }, 31553 setInt32: function setInt32(t, n) { 31554 X(this, 4, t, z, n, arguments[2]); 31555 }, 31556 setUint32: function setUint32(t, n) { 31557 X(this, 4, t, z, n, arguments[2]); 31558 }, 31559 setFloat32: function setFloat32(t, n) { 31560 X(this, 4, t, J, n, arguments[2]); 31561 }, 31562 setFloat64: function setFloat64(t, n) { 31563 X(this, 8, t, K, n, arguments[2]); 31564 } 31565 }); 31566 y(S, g), y(_, b), c(_[x], u.VIEW, !0), r[g] = S, r[b] = _; 31567 }, { 31568 106: 106, 31569 108: 108, 31570 113: 113, 31571 28: 28, 31572 34: 34, 31573 38: 38, 31574 40: 40, 31575 58: 58, 31576 6: 6, 31577 67: 67, 31578 72: 72, 31579 86: 86, 31580 9: 9, 31581 92: 92 31582 }], 31583 113: [function (t, n, r) { 31584 for (var e, i = t(38), o = t(40), u = t(114), c = u("typed_array"), f = u
31584("view"), a = !(!i.ArrayBuffer || !i.DataView), s = a, l = 0, h = 9, v = "Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(","); l < h;) (e = i[v[l++]]) ? (o(e.prototype, c, !0), o(e.prototype, f, !0)) : s = !1; 31585 n.exports = { 31586 ABV: a, 31587 CONSTR: s, 31588 TYPED: c, 31589 VIEW: f 31590 }; 31591 }, { 31592 114: 114, 31593 38: 38, 31594 40: 40 31595 }], 31596 114: [function (t, n, r) { 31597 var e = 0, 31598 i = Math.random(); 31599 n.exports = function (t) { 31600 return "Symbol(".concat(void 0 === t ? "" : t, ")_", (++e + i).toString(36)); 31601 }; 31602 }, {}], 31603 115: [function (t, n, r) { 31604 var e = t(38), 31605 i = t(23), 31606 o = t(58), 31607 u = t(116), 31608 c = t(67).f; 31609 n.exports = function (t) { 31610 var n = i.Symbol || (i.Symbol = o ? {} : e.Symbol || {}); 31611 "_" == t.charAt(0) || t in n || c(n, t, { 31612 value: u.f(t) 31613 }); 31614 }; 31615 }, { 31616 116: 116, 31617 23: 23, 31618 38: 38, 31619 58: 58, 31620 67: 67 31621 }], 31622 116: [function (t, n, r) { 31623 r.f = t(117); 31624 }, { 31625 117: 117 31626 }], 31627 117: [function (t, n, r) { 31628 var e = t(94)("wks"), 31629 i = t(114), 31630 o = t(38).Symbol, 31631 u = "function" == typeof o, 31632 c = n.exports = function (t) { 31633 return e[t] || (e[t] = u && o[t] || (u ? o : i)("Symbol." + t)); 31634 }; 31635 c.store = e; 31636 }, { 31637 114: 114, 31638 38: 38, 31639 94: 94 31640 }], 31641 118: [function (t, n, r) { 31642 var e = t(17), 31643 i = t(117)("iterator"), 31644 o = t(56); 31645 n.exports = t(23).getIteratorMethod = function (t) { 31646 if (void 0 != t) return t[i] || t["@@iterator"] || o[e(t)]; 31647 }; 31648 }, { 31649 117: 117, 31650 17: 17, 31651 23: 23, 31652 56: 56 31653 }], 31654 119: [function (t, n, r) { 31655 var e = t(32), 31656 i = t(88)(/[\\^$*+?.()|[\]{}]/g, "\\$&"); 31657 e(e.S, "RegExp", { 31658 escape: function escape(t) { 31659 return i(t); 31660 } 31661 }); 31662 }, { 31663 32: 32, 31664 88: 88 31665 }], 31666 120: [function (t, n, r) { 31667 var e = t(32); 31668 e(e.P, "Array", { 31669 copyWithin: t(8) 31670 }), t(5)("copyWithin"); 31671 }, { 31672 32: 32, 31673 5: 5, 31674 8: 8 31675 }], 31676 121: [function (t, n, r) { 31677 "use strict"; 31678 31679 var e = t(32), 31680 i = t(12)(4); 31681 e(e.P + e.F * !t(96)([].every, !0), "Array", { 31682 every: function every(t) { 31683 return i(this, t, arguments[1]); 31684 } 31685 }); 31686 }, { 31687 12: 12, 31688 32: 32, 31689 96: 96 31690 }], 31691 122: [function (t, n, r) { 31692 var e = t(32); 31693 e(e.P, "Array", { 31694 fill: t(9) 31695 }), t(5)("fill"); 31696 }, { 31697 32: 32, 31698 5: 5, 31699 9: 9 31700 }], 31701 123: [function (t, n, r) { 31702 "use strict"; 31703 31704 var e = t(32), 31705 i = t(12)(2); 31706 e(e.P + e.F * !t(96)([].filter, !0), "Array", { 31707 filter: function filter(t) { 31708 return i(this, t, arguments[1]); 31709 } 31710 }); 31711 }, { 31712 12: 12, 31713 32: 32, 31714 96: 96 31715 }], 31716 124: [function (t, n, r) { 31717 "use strict"; 31718 31719 var e = t(32), 31720 i = t(12)(6), 31721 o = "findIndex", 31722 u = !0; 31723 o in [] && Array(1)[o](function () { 31724 u = !1; 31725 }), e(e.P + e.F * u, "Array", { 31726 findIndex: function findIndex(t) { 31727 return i(this, t, arguments.length > 1 ? arguments[1] : void 0); 31728 } 31729 }), t(5)(o); 31730 }, { 31731 12: 12, 31732 32: 32, 31733 5: 5 31734 }], 31735 125: [function (t, n, r) { 31736 "use strict"; 31737 31738 var e = t(32), 31739 i = t(12)(5), 31740 o = "find", 31741 u = !0; 31742 o in [] && Array(1)[o](function () { 31743 u = !1; 31744 }), e(e.P + e.F * u, "Array", { 31745 find: function find(t) { 31746 return i(this, t, arguments.length > 1 ? arguments[1] : void 0); 31747 } 31748 }), t(5)(o); 31749 }, { 31750 12: 12, 31751 32: 32, 31752 5: 5 31753 }], 31754 126: [function (t, n, r) { 31755 "use strict"; 31756 31757 var e = t(32), 31758 i = t(12)(0), 31759 o = t(96)([].forEach, !0); 31760 e(e.P + e.F * !o, "Array", { 31761 forEach: function forEach(t) { 31762 return i(this, t, arguments[1]); 31763 } 31764 }); 31765 }, { 31766 12: 12, 31767 32: 32, 31768 96: 96 31769 }], 31770 127: [function (t, n, r) { 31771 "use strict"; 31772 31773 var e = t(25), 31774 i = t(32), 31775 o = t(109), 31776 u = t(51), 31777 c = t(46), 31778 f = t(108), 31779 a = t(24), 31780 s = t(118); 31781 i(i.S + i.F * !t(54)(function (t) { 31782 Array.from(t); 31783 }), "Array", { 31784 from: function from(t) { 31785 var n, 31786 r, 31787 i, 31788 l, 31789 h = o(t),
31790 v = "function" == typeof this ? this : Array, 31791 p = arguments.length, 31792 d = p > 1 ? arguments[1] : void 0, 31793 y = void 0 !== d, 31794 g = 0, 31795 b = s(h); 31796 if (y && (d = e(d, p > 2 ? arguments[2] : void 0, 2)), void 0 == b || v == Array && c(b)) for (n = f(h.length), r = new v(n); n > g; g++) a(r, g, y ? d(h[g], g) : h[g]);else for (l = b.call(h), r = new v(); !(i = l.next()).done; g++) a(r, g, y ? u(l, d, [i.value, g], !0) : i.value); 31797 return r.length = g, r; 31798 } 31799 }); 31800 }, { 31801 108: 108, 31802 109: 109, 31803 118: 118, 31804 24: 24, 31805 25: 25, 31806 32: 32, 31807 46: 46, 31808 51: 51, 31809 54: 54 31810 }], 31811 128: [function (t, n, r) { 31812 "use strict"; 31813 31814 var e = t(32), 31815 i = t(11)(!1), 31816 o = [].indexOf, 31817 u = !!o && 1 / [1].indexOf(1, -0) < 0; 31818 e(e.P + e.F * (u || !t(96)(o)), "Array", { 31819 indexOf: function indexOf(t) { 31820 return u ? o.apply(this, arguments) || 0 : i(this, t, arguments[1]); 31821 } 31822 }); 31823 }, { 31824 11: 11, 31825 32: 32, 31826 96: 96 31827 }], 31828 129: [function (t, n, r) { 31829 var e = t(32); 31830 e(e.S, "Array", { 31831 isArray: t(47) 31832 }); 31833 }, { 31834 32: 32, 31835 47: 47 31836 }], 31837 130: [function (t, n, r) { 31838 "use strict"; 31839 31840 var e = t(5), 31841 i = t(55), 31842 o = t(56), 31843 u = t(107); 31844 n.exports = t(53)(Array, "Array", function (t, n) { 31845 this._t = u(t), this._i = 0, this._k = n; 31846 }, function () { 31847 var t = this._t, 31848 n = this._k, 31849 r = this._i++; 31850 return !t || r >= t.length ? (this._t = void 0, i(1)) : "keys" == n ? i(0, r) : "values" == n ? i(0, t[r]) : i(0, [r, t[r]]); 31851 }, "values"), o.Arguments = o.Array, e("keys"), e("values"), e("entries"); 31852 }, { 31853 107: 107, 31854 5: 5, 31855 53: 53, 31856 55: 55, 31857 56: 56 31858 }], 31859 131: [function (t, n, r) { 31860 "use strict"; 31861 31862 var e = t(32), 31863 i = t(107), 31864 o = [].join; 31865 e(e.P + e.F * (t(45) != Object || !t(96)(o)), "Array", { 31866 join: function join(t) { 31867 return o.call(i(this), void 0 === t ? "," : t); 31868 } 31869 }); 31870 }, { 31871 107: 107, 31872 32: 32, 31873 45: 45, 31874 96: 96 31875 }], 31876 132: [function (t, n, r) { 31877 "use strict"; 31878 31879 var e = t(32), 31880 i = t(107), 31881 o = t(106), 31882 u = t(108), 31883 c = [].lastIndexOf, 31884 f = !!c && 1 / [1].lastIndexOf(1, -0) < 0; 31885 e(e.P + e.F * (f || !t(96)(c)), "Array", { 31886 lastIndexOf: function lastIndexOf(t) { 31887 if (f) return c.apply(this, arguments) || 0; 31888 var n = i(this), 31889 r = u(n.length), 31890 e = r - 1; 31891 for (arguments.length > 1 && (e = Math.min(e, o(arguments[1]))), e < 0 && (e = r + e); e >= 0; e--) if (e in n && n[e] === t) return e || 0; 31892 return -1; 31893 } 31894 }); 31895 }, { 31896 106: 106, 31897 107: 107, 31898 108: 108, 31899 32: 32, 31900 96: 96 31901 }], 31902 133: [function (t, n, r) { 31903 "use strict"; 31904 31905 var e = t(32), 31906 i = t(12)(1); 31907 e(e.P + e.F * !t(96)([].map, !0), "Array", { 31908 map: function map(t) { 31909 return i(this, t, arguments[1]); 31910 } 31911 }); 31912 }, { 31913 12: 12, 31914 32: 32, 31915 96: 96 31916 }], 31917 134: [function (t, n, r) { 31918 "use strict"; 31919 31920 var e = t(32), 31921 i = t(24); 31922 e(e.S + e.F * t(34)(function () { 31923 function F() {} 31924 return !(Array.of.call(F) instanceof F); 31925 }), "Array", { 31926 of: function of() { 31927 for (var t = 0, n = arguments.length, r = new ("function" == typeof this ? this : Array)(n); n > t;) i(r, t, arguments[t++]); 31928 return r.length = n, r; 31929 } 31930 }); 31931 }, { 31932 24: 24, 31933 32: 32, 31934 34: 34 31935 }], 31936 135: [function (t, n, r) { 31937 "use strict"; 31938 31939 var e = t(32), 31940 i = t(13); 31941 e(e.P + e.F * !t(96)([].reduceRight, !0), "Array", { 31942 reduceRight: function reduceRight(t) { 31943 return i(this, t, arguments.length, arguments[1], !0); 31944 } 31945 }); 31946 }, { 31947 13: 13, 31948 32: 32, 31949 96: 96 31950 }], 31951 136: [function (t, n, r) { 31952 "use strict"; 31953 31954 var e = t(32), 31955 i = t(13); 31956 e(e.P + e.F * !t(96)([].reduce, !0), "Array", { 31957 reduce: function reduce(t) { 31958 return i(this, t, arguments.length, arguments[1], !1); 31959 } 31960 }); 31961 }, { 31962 13: 13, 31963 32: 32, 31964 96: 96 31965 }], 31966 137: [function (t, n, r) { 31967 "use strict"; 31968 31969 var e = t(32), 31970 i = t(41), 31971 o = t(18), 31972 u = t(105), 31973 c = t(108), 31974 f = [].slice; 31975 e(e.P + e.F * t(34)(function () { 31976 i && f.call(i); 31977 }), "Array", { 31978 slice: function slice(t, n) { 31979 var r = c(this.length), 31980 e = o(this); 31981 if (n = void 0 === n ? r : n, "Array" == e) return f.call(this, t, n); 31982 for (var i = u(t, r), a = u(n, r), s = c(a - i), l = Array(s), h = 0; h < s; h++) l[h] = "String" == e ? this.charAt(i + h) : this[i + h]; 31983 return l; 31984 } 31985 }); 31986 }, { 31987 105: 105, 31988 108: 108, 31989 18: 18, 31990 32: 32, 31991 34: 34, 31992 41: 41 31993 }], 31994 138: [function (t, n, r) { 31995 "use strict"; 31996 31997 var e = t(32), 31998 i = t(12)(3); 31999 e(e.P + e.F * !t(96)([].some, !0), "Array", { 32000 some: function some(t) { 32001 return i(this, t, arguments[1]); 32002 } 32003 }); 32004 }, { 32005 12: 12, 32006 32: 32, 32007 96: 96 32008 }], 32009 139: [function (t, n, r) { 32010 "use strict"; 32011 32012 var e = t(32), 32013 i = t(3), 32014 o = t(109), 32015 u = t(34), 32016 c = [].sort, 32017 f = [1, 2, 3]; 32018 e(e.P + e.F * (u(function () { 32019 f.sort(void 0); 32020 }) || !u(function () { 32021 f.sort(null); 32022 }) || !t(96)(c)), "Array", { 32023 sort: function sort(t) { 32024 return void 0 === t ? c.call(o(this)) : c.call(o(this), i(t)); 32025 } 32026 }); 32027 }, { 32028 109: 109, 32029 3: 3, 32030 32: 32, 32031 34: 34, 32032 96: 96 32033 }], 32034 140: [function (t, n, r) { 32035 t(91)("Array"); 32036 }, { 32037 91: 91 32038 }], 32039 141: [function (t, n, r) { 32040 var e = t(32); 32041 e(e.S, "Date", { 32042 now: function now() { 32043 return new Date().getTime(); 32044 } 32045 }); 32046 }, { 32047 32: 32 32048 }], 32049 142: [function (t, n, r) { 32050 "use strict"; 32051 32052 var e = t(32), 32053 i = t(34), 32054 o = Date.prototype.getTime, 32055 u = function u(t) { 32056 return t > 9 ? t : "0" + t; 32057 }; 32058 e(e.P + e.F * (i(function () { 32059 return "0385-07-25T07:06:39.999Z" != new Date(-5e13 - 1).toISOString(); 32060 }) || !i(function () { 32061 new Date(NaN).toISOString(); 32062 })), "Date", { 32063 toISOString: function toISOString() { 32064 if (!isFinite(o.call(this))) throw RangeError("Invalid time value"); 32065 var t = this, 32066 n = t.getUTCFullYear(), 32067 r = t.getUTCMilliseconds(), 32068 e = n < 0 ? "-" : n > 9999 ? "+" : ""; 32069 return e + ("00000" + Math.abs(n)).slice(e ? -6 : -4) + "-" + u(t.getUTCMonth() + 1) + "-" + u(t.getUTCDate()) + "T" + u(t.getUTCHours()) + ":" + u(t.getUTCMinutes()) + ":" + u(t.getUTCSeconds()) + "." + (r > 99 ? r : "0" + u(r)) + "Z"; 32070 } 32071 }); 32072 }, { 32073 32: 32, 32074 34: 34 32075 }], 32076 143: [function (t, n, r) { 32077 "use strict"; 32078 32079 var e = t(32), 32080 i = t(109), 32081 o = t(110); 32082 e(e.P + e.F * t(34)(function () { 32083 return null !== new Date(NaN).toJSON() || 1 !== Date.prototype.toJSON.call({ 32084 toISOString: function toISOString() { 32085 return 1; 32086 } 32087 }); 32088 }), "Date", { 32089 toJSON: function toJSON(t) { 32090 var n = i(this), 32091 r = o(n); 32092 return "number" != typeof r || isFinite(r) ? n.toISOString() : null; 32093 } 32094 }); 32095 }, { 32096 109: 109, 32097 110: 110, 32098 32: 32, 32099 34: 34 32100 }], 32101 144: [function (t, n, r) { 32102 var e = t(117)("toPrimitive"), 32103 i = Date.prototype; 32104 e in i || t(40)(i, e, t(26)); 32105 }, { 32106 117: 117, 32107 26: 26, 32108 40: 40 32109 }], 32110 145: [function (t, n, r) { 32111 var e = Date.prototype, 32112 i = "Invalid Date", 32113 o = "toString", 32114 u = e[o], 32115 c = e.getTime; 32116 new Date(NaN) + "" != i && t(87)(e, o, function toString() { 32117 var t = c.call(this); 32118 return t === t ? u.call(this) : i; 32119 }); 32120 }, { 32121 87: 87 32122 }], 32123 146: [function (t, n, r) { 32124 var e = t(32); 32125 e(e.P, "Function", { 32126 bind: t(16) 32127 }); 32128 }, { 32129 16: 16, 32130 32: 32 32131 }], 32132 147: [function (t, n, r) { 32133 "use strict"; 32134 32135 var e = t(49), 32136 i = t(74), 32137 o = t(117)("hasInstance"), 32138 u = Function.prototype; 32139 o in u || t(67).f(u, o, { 32140 value: function value(t) { 32141 if ("function" != typeof this || !e(t)) return !1; 32142 if (!e(this.prototype)) return t instanceof this; 32143 for (; t = i(t);) if (this.prototype === t) return !0; 32144 return !1; 32145 } 32146 }); 32147 }, { 32148 117: 117, 32149 49: 49, 32150 67: 67, 32151 74: 74 32152 }], 32153 148: [function (t, n, r) { 32154 var e = t(67).f, 32155 i = t(85), 32156 o = t(39), 32157 u = Function.prototype, 32158 c = /^\s*function ([^ (]*)/, 32159 f = "name", 32160 a = Object.isExtensible || function () { 32161 return !0; 32162 }; 32163 f in u || t(28) && e(u, f, { 32164 configurable: !0, 32165 get: function get() { 32166 try { 32167 var t = this, 32168 n = ("" + t).match(c)[1]; 32169 return o(t, f) || !a(t) || e(t, f, i(5, n)), n; 32170 } catch (t) { 32171 return ""; 32172 } 32173 } 32174 }); 32175 }, { 32176 28: 28, 32177 39: 39, 32178 67: 67, 32179 85: 85 32180 }], 32181 149: [function (t, n, r) { 32182 "use strict"; 32183 32184 var e = t(19); 32185 n.exports = t(22)("Map", function (t) { 32186 return function Map() { 32187 return t(this, arguments.length > 0 ? arguments[0] : void 0); 32188 }; 32189 }, {
32190 get: function get(t) { 32191 var n = e.getEntry(this, t); 32192 return n && n.v; 32193 }, 32194 set: function set(t, n) { 32195 return e.def(this, 0 === t ? 0 : t, n); 32196 } 32197 }, e, !0); 32198 }, { 32199 19: 19, 32200 22: 22 32201 }], 32202 150: [function (t, n, r) { 32203 var e = t(32), 32204 i = t(60), 32205 o = Math.sqrt, 32206 u = Math.acosh; 32207 e(e.S + e.F * !(u && 710 == Math.floor(u(Number.MAX_VALUE)) && u(1 / 0) == 1 / 0), "Math", { 32208 acosh: function acosh(t) { 32209 return (t = +t) < 1 ? NaN : t > 94906265.62425156 ? Math.log(t) + Math.LN2 : i(t - 1 + o(t - 1) * o(t + 1)); 32210 } 32211 }); 32212 }, { 32213 32: 32, 32214 60: 60 32215 }], 32216 151: [function (t, n, r) { 32217 function asinh(t) { 32218 return isFinite(t = +t) && 0 != t ? t < 0 ? -asinh(-t) : Math.log(t + Math.sqrt(t * t + 1)) : t; 32219 } 32220 var e = t(32), 32221 i = Math.asinh; 32222 e(e.S + e.F * !(i && 1 / i(0) > 0), "Math", { 32223 asinh: asinh 32224 }); 32225 }, { 32226 32: 32 32227 }], 32228 152: [function (t, n, r) { 32229 var e = t(32), 32230 i = Math.atanh; 32231 e(e.S + e.F * !(i && 1 / i(-0) < 0), "Math", { 32232 atanh: function atanh(t) { 32233 return 0 == (t = +t) ? t : Math.log((1 + t) / (1 - t)) / 2; 32234 } 32235 }); 32236 }, { 32237 32: 32 32238 }], 32239 153: [function (t, n, r) { 32240 var e = t(32), 32241 i = t(61); 32242 e(e.S, "Math", { 32243 cbrt: function cbrt(t) { 32244 return i(t = +t) * Math.pow(Math.abs(t), 1 / 3); 32245 } 32246 }); 32247 }, { 32248 32: 32, 32249 61: 61 32250 }], 32251 154: [function (t, n, r) { 32252 var e = t(32); 32253 e(e.S, "Math", { 32254 clz32: function clz32(t) { 32255 return (t >>>= 0) ? 31 - Math.floor(Math.log(t + .5) * Math.LOG2E) : 32; 32256 } 32257 }); 32258 }, { 32259 32: 32 32260 }], 32261 155: [function (t, n, r) { 32262 var e = t(32), 32263 i = Math.exp; 32264 e(e.S, "Math", { 32265 cosh: function cosh(t) { 32266 return (i(t = +t) + i(-t)) / 2; 32267 } 32268 }); 32269 }, { 32270 32: 32 32271 }], 32272 156: [function (t, n, r) { 32273 var e = t(32), 32274 i = t(59); 32275 e(e.S + e.F * (i != Math.expm1), "Math", { 32276 expm1: i 32277 }); 32278 }, { 32279 32: 32, 32280 59: 59 32281 }], 32282 157: [function (t, n, r) { 32283 var e = t(32), 32284 i = t(61), 32285 o = Math.pow, 32286 u = o(2, -52), 32287 c = o(2, -23), 32288 f = o(2, 127) * (2 - c), 32289 a = o(2, -126), 32290 s = function s(t) { 32291 return t + 1 / u - 1 / u; 32292 }; 32293 e(e.S, "Math", { 32294 fround: function fround(t) { 32295 var n, 32296 r, 32297 e = Math.abs(t), 32298 o = i(t); 32299 return e < a ? o * s(e / a / c) * a * c : (n = (1 + c / u) * e, r = n - (n - e), r > f || r != r ? o * (1 / 0) : o * r); 32300 } 32301 }); 32302 }, { 32303 32: 32, 32304 61: 61 32305 }], 32306 158: [function (t, n, r) { 32307 var e = t(32), 32308 i = Math.abs; 32309 e(e.S, "Math", { 32310 hypot: function hypot(t, n) { 32311 for (var r, e, o = 0, u = 0, c = arguments.length, f = 0; u < c;) r = i(arguments[u++]), f < r ? (e = f / r, o = o * e * e + 1, f = r) : r > 0 ? (e = r / f, o += e * e) : o += r; 32312 return f === 1 / 0 ? 1 / 0 : f * Math.sqrt(o); 32313 } 32314 }); 32315 }, { 32316 32: 32 32317 }], 32318 159: [function (t, n, r) { 32319 var e = t(32), 32320 i = Math.imul; 32321 e(e.S + e.F * t(34)(function () { 32322 return i(4294967295, 5) != -5 || 2 != i.length; 32323 }), "Math", { 32324 imul: function imul(t, n) { 32325 var r = 65535, 32326 e = +t, 32327 i = +n, 32328 o = r & e, 32329 u = r & i; 32330 return 0 | o * u + ((r & e >>> 16) * u + o * (r & i >>> 16) << 16 >>> 0); 32331 } 32332 }); 32333 }, { 32334 32: 32, 32335 34: 34 32336 }], 32337 160: [function (t, n, r) { 32338 var e = t(32); 32339 e(e.S, "Math", { 32340 log10: function log10(t) { 32341 return Math.log(t) / Math.LN10; 32342 } 32343 }); 32344 }, { 32345 32: 32 32346 }], 32347 161: [function (t, n, r) { 32348 var e = t(32); 32349 e(e.S, "Math", { 32350 log1p: t(60) 32351 }); 32352 }, { 32353 32: 32, 32354 60: 60 32355 }], 32356 162: [function (t, n, r) { 32357 var e = t(32); 32358 e(e.S, "Math", { 32359 log2: function log2(t) { 32360 return Math.log(t) / Math.LN2; 32361 } 32362 }); 32363 }, { 32364 32: 32 32365 }], 32366 163: [function (t, n, r) { 32367 var e = t(32); 32368 e(e.S, "Math", { 32369 sign: t(61) 32370 }); 32371 }, { 32372 32: 32, 32373 61: 61 32374 }], 32375 164: [function (t, n, r) { 32376 var e = t(32), 32377 i = t(59), 32378 o = Math.exp; 32379 e(e.S + e.F * t(34)(function () { 32380 return !Math.sinh(-2e-17) != -2e-17; 32381 }), "Math", { 32382 sinh: function sinh(t) { 32383 return Math.abs(t = +t) < 1 ? (i(t) - i(-t)) / 2 : (o(t - 1) - o(-t - 1)) * (Math.E / 2); 32384 } 32385 }); 32386 }, { 32387 32: 32, 32388 34: 34, 32389 59: 59 32390 }], 32391 165: [function (t, n, r) { 32392 var e = t(32), 32393 i = t(59), 32394 o = Math.exp; 32395 e(e.S, "Math", { 32396 tanh: function tanh(t) { 32397 var n = i(t = +t), 32398 r = i(-t); 32399 return n == 1 / 0 ? 1 : r == 1 / 0 ? -1 : (n - r) / (o(t) + o(-t)); 32400 } 32401 }); 32402 }, { 32403 32: 32, 32404 59: 59 32405 }], 32406 166: [function (t, n, r) { 32407 var e = t(32); 32408 e(e.S, "Math", { 32409 trunc: function trunc(t) { 32410 return (t >
32410 0 ? Math.floor : Math.ceil)(t); 32411 } 32412 }); 32413 }, { 32414 32: 32 32415 }], 32416 167: [function (t, n, r) { 32417 "use strict"; 32418 32419 var e = t(38), 32420 i = t(39), 32421 o = t(18), 32422 u = t(43), 32423 c = t(110), 32424 f = t(34), 32425 a = t(72).f, 32426 s = t(70).f, 32427 l = t(67).f, 32428 h = t(102).trim, 32429 v = "Number", 32430 p = e[v], 32431 d = p, 32432 y = p.prototype, 32433 g = o(t(66)(y)) == v, 32434 b = ("trim" in String.prototype), 32435 x = function x(t) { 32436 var n = c(t, !1); 32437 if ("string" == typeof n && n.length > 2) { 32438 n = b ? n.trim() : h(n, 3); 32439 var r, 32440 e, 32441 i, 32442 o = n.charCodeAt(0); 32443 if (43 === o || 45 === o) { 32444 if (r = n.charCodeAt(2), 88 === r || 120 === r) return NaN; 32445 } else if (48 === o) { 32446 switch (n.charCodeAt(1)) { 32447 case 66: 32448 case 98: 32449 e = 2, i = 49; 32450 break; 32451 case 79: 32452 case 111: 32453 e = 8, i = 55; 32454 break; 32455 default: 32456 return +n; 32457 } 32458 for (var u, f = n.slice(2), a = 0, s = f.length; a < s; a++) if (u = f.charCodeAt(a), u < 48 || u > i) return NaN; 32459 return parseInt(f, e); 32460 } 32461 } 32462 return +n; 32463 }; 32464 if (!p(" 0o1") || !p("0b1") || p("+0x1")) { 32465 p = function Number(t) { 32466 var n = arguments.length < 1 ? 0 : t, 32467 r = this; 32468 return r instanceof p && (g ? f(function () { 32469 y.valueOf.call(r); 32470 }) : o(r) != v) ? u(new d(x(n)), r, p) : x(n); 32471 }; 32472 for (var m, w = t(28) ? a(d) : "MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","), S = 0; w.length > S; S++) i(d, m = w[S]) && !i(p, m) && l(p, m, s(d, m)); 32473 p.prototype = y, y.constructor = p, t(87)(e, v, p); 32474 } 32475 }, { 32476 102: 102, 32477 110: 110, 32478 18: 18, 32479 28: 28, 32480 34: 34, 32481 38: 38, 32482 39: 39, 32483 43: 43, 32484 66: 66, 32485 67: 67, 32486 70: 70, 32487 72: 72, 32488 87: 87 32489 }], 32490 168: [function (t, n, r) { 32491 var e = t(32); 32492 e(e.S, "Number", { 32493 EPSILON: Math.pow(2, -52) 32494 }); 32495 }, { 32496 32: 32 32497 }], 32498 169: [function (t, n, r) { 32499 var e = t(32), 32500 i = t(38).isFinite; 32501 e(e.S, "Number", { 32502 isFinite: function isFinite(t) { 32503 return "number" == typeof t && i(t); 32504 } 32505 }); 32506 }, { 32507 32: 32, 32508 38: 38 32509 }], 32510 170: [function (t, n, r) { 32511 var e = t(32); 32512 e(e.S, "Number", { 32513 isInteger: t(48) 32514 }); 32515 }, { 32516 32: 32, 32517 48: 48 32518 }], 32519 171: [function (t, n, r) { 32520 var e = t(32); 32521 e(e.S, "Number", { 32522 isNaN: function isNaN(t) { 32523 return t != t; 32524 } 32525 }); 32526 }, { 32527 32: 32 32528 }], 32529 172: [function (t, n, r) { 32530 var e = t(32), 32531 i = t(48), 32532 o = Math.abs; 32533 e(e.S, "Number", { 32534 isSafeInteger: function isSafeInteger(t) { 32535 return i(t) && o(t) <= 9007199254740991; 32536 } 32537 }); 32538 }, { 32539 32: 32, 32540 48: 48 32541 }], 32542 173: [function (t, n, r) { 32543 var e = t(32); 32544 e(e.S, "Number", { 32545 MAX_SAFE_INTEGER: 9007199254740991 32546 }); 32547 }, { 32548 32: 32 32549 }], 32550 174: [function (t, n, r) { 32551 var e = t(32); 32552 e(e.S, "Number", { 32553 MIN_SAFE_INTEGER: -9007199254740991 32554 }); 32555 }, { 32556 32: 32 32557 }], 32558 175: [function (t, n, r) { 32559 var e = t(32), 32560 i = t(81); 32561 e(e.S + e.F * (Number.parseFloat != i), "Number", { 32562 parseFloat: i 32563 }); 32564 }, { 32565 32: 32, 32566 81: 81 32567 }], 32568 176: [function (t, n, r) { 32569 var e = t(32), 32570 i = t(82); 32571 e(e.S + e.F * (Number.parseInt != i), "Number", { 32572 parseInt: i 32573 }); 32574 }, { 32575 32: 32, 32576 82: 82 32577 }], 32578 177: [function (t, n, r) { 32579 "use strict"; 32580 32581 var e = t(32), 32582 i = t(106), 32583 o = t(4), 32584 u = t(101), 32585 c = 1..toFixed, 32586 f = Math.floor, 32587 a = [0, 0, 0, 0, 0, 0], 32588 s = "Number.toFixed: incorrect invocation!", 32589 l = "0", 32590 h = function h(t, n) { 32591 for (var r = -1, e = n; ++r < 6;) e += t * a[r], a[r] = e % 1e7, e = f(e / 1e7); 32592 }, 32593 v = function v(t) { 32594 for (var n = 6, r = 0; --n >= 0;) r += a[n], a[n] = f(r / t), r = r % t * 1e7; 32595 }, 32596 p = function p() { 32597 for (var t = 6, n = ""; --t >= 0;) if ("" !== n || 0 === t || 0 !== a[t]) { 32598 var r = String(a[t]); 32599 n = "" === n ? r : n + u.call(l, 7 - r.length) + r; 32600 } 32601 return n; 32602 }, 32603 d = function d(t, n, r) { 32604 return 0 === n ? r : n % 2 === 1 ? d(t, n - 1, r * t) : d(t * t, n / 2, r); 32605 }, 32606 y = function y(t) { 32607 for (var n = 0, r = t; r >= 4096;) n += 12, r /= 4096; 32608 for (; r >= 2;) n += 1, r /= 2; 32609 return n; 32610 }; 32611 e(e.P + e.F * (!!c && ("0.000" !== 8e-5.toFixed(3) || "1" !== .9.toFixed(0) || "1.25" !== 1.255.toFixed(2) || "1000000000000000128" !== 0xde0b6b3a7640080.toFixed(0)) || !t(34)(function () { 32612 c.call({}); 32613 })), "Number", { 32614 toFixed: function toFixed(t) { 32615 var n, 32616 r, 32617 e, 32618 c, 32619 f = o(this, s), 32620 a = i(t), 32621 g = "", 32622 b = l; 32623 if (a < 0 || a > 20) throw RangeError(s); 32624 if (f != f) return "NaN"; 32625 if (f <= -1e21 || f >= 1e21) return String(f); 32626 if (f < 0 && (g = "-", f = -f), f > 1e-21) if (n = y(f * d(2, 69, 1)) - 69, r = n < 0 ? f * d(2, -n, 1) : f / d(2, n, 1), r *= 4503599627370496, n = 52 - n, n > 0) { 32627 for (h(0, r), e = a; e >= 7;) h(1e7, 0), e -= 7;
32628 for (h(d(10, e, 1), 0), e = n - 1; e >= 23;) v(1 << 23), e -= 23; 32629 v(1 << e), h(1, 1), v(2), b = p(); 32630 } else h(0, r), h(1 << -n, 0), b = p() + u.call(l, a); 32631 return a > 0 ? (c = b.length, b = g + (c <= a ? "0." + u.call(l, a - c) + b : b.slice(0, c - a) + "." + b.slice(c - a))) : b = g + b, b; 32632 } 32633 }); 32634 }, { 32635 101: 101, 32636 106: 106, 32637 32: 32, 32638 34: 34, 32639 4: 4 32640 }], 32641 178: [function (t, n, r) { 32642 "use strict"; 32643 32644 var e = t(32), 32645 i = t(34), 32646 o = t(4), 32647 u = 1..toPrecision; 32648 e(e.P + e.F * (i(function () { 32649 return "1" !== u.call(1, void 0); 32650 }) || !i(function () { 32651 u.call({}); 32652 })), "Number", { 32653 toPrecision: function toPrecision(t) { 32654 var n = o(this, "Number#toPrecision: incorrect invocation!"); 32655 return void 0 === t ? u.call(n) : u.call(n, t); 32656 } 32657 }); 32658 }, { 32659 32: 32, 32660 34: 34, 32661 4: 4 32662 }], 32663 179: [function (t, n, r) { 32664 var e = t(32); 32665 e(e.S + e.F, "Object", { 32666 assign: t(65) 32667 }); 32668 }, { 32669 32: 32, 32670 65: 65 32671 }], 32672 180: [function (t, n, r) { 32673 var e = t(32); 32674 e(e.S, "Object", { 32675 create: t(66) 32676 }); 32677 }, { 32678 32: 32, 32679 66: 66 32680 }], 32681 181: [function (t, n, r) { 32682 var e = t(32); 32683 e(e.S + e.F * !t(28), "Object", { 32684 defineProperties: t(68) 32685 }); 32686 }, { 32687 28: 28, 32688 32: 32, 32689 68: 68 32690 }], 32691 182: [function (t, n, r) { 32692 var e = t(32); 32693 e(e.S + e.F * !t(28), "Object", { 32694 defineProperty: t(67).f 32695 }); 32696 }, { 32697 28: 28, 32698 32: 32, 32699 67: 67 32700 }], 32701 183: [function (t, n, r) { 32702 var e = t(49), 32703 i = t(62).onFreeze; 32704 t(78)("freeze", function (t) { 32705 return function freeze(n) { 32706 return t && e(n) ? t(i(n)) : n; 32707 }; 32708 }); 32709 }, { 32710 49: 49, 32711 62: 62, 32712 78: 78 32713 }], 32714 184: [function (t, n, r) { 32715 var e = t(107), 32716 i = t(70).f; 32717 t(78)("getOwnPropertyDescriptor", function () { 32718 return function getOwnPropertyDescriptor(t, n) { 32719 return i(e(t), n); 32720 }; 32721 }); 32722 }, { 32723 107: 107, 32724 70: 70, 32725 78: 78 32726 }], 32727 185: [function (t, n, r) { 32728 t(78)("getOwnPropertyNames", function () { 32729 return t(71).f; 32730 }); 32731 }, { 32732 71: 71, 32733 78: 78 32734 }], 32735 186: [function (t, n, r) { 32736 var e = t(109), 32737 i = t(74); 32738 t(78)("getPrototypeOf", function () { 32739 return function getPrototypeOf(t) { 32740 return i(e(t)); 32741 }; 32742 }); 32743 }, { 32744 109: 109, 32745 74: 74, 32746 78: 78 32747 }], 32748 187: [function (t, n, r) { 32749 var e = t(49); 32750 t(78)("isExtensible", function (t) { 32751 return function isExtensible(n) { 32752 return !!e(n) && (!t || t(n)); 32753 }; 32754 }); 32755 }, { 32756 49: 49, 32757 78: 78 32758 }], 32759 188: [function (t, n, r) { 32760 var e = t(49); 32761 t(78)("isFrozen", function (t) { 32762 return function isFrozen(n) { 32763 return !e(n) || !!t && t(n); 32764 }; 32765 }); 32766 }, { 32767 49: 49, 32768 78: 78 32769 }], 32770 189: [function (t, n, r) { 32771 var e = t(49); 32772 t(78)("isSealed", function (t) { 32773 return function isSealed(n) { 32774 return !e(n) || !!t && t(n); 32775 }; 32776 }); 32777 }, { 32778 49: 49, 32779 78: 78 32780 }], 32781 190: [function (t, n, r) { 32782 var e = t(32); 32783 e(e.S, "Object", { 32784 is: t(89) 32785 }); 32786 }, { 32787 32: 32, 32788 89: 89 32789 }], 32790 191: [function (t, n, r) { 32791 var e = t(109), 32792 i = t(76); 32793 t(78)("keys", function () { 32794 return function keys(t) { 32795 return i(e(t)); 32796 }; 32797 }); 32798 }, { 32799 109: 109, 32800 76: 76, 32801 78: 78 32802 }], 32803 192: [function (t, n, r) { 32804 var e = t(49), 32805 i = t(62).onFreeze; 32806 t(78)("preventExtensions", function (t) { 32807 return function preventExtensions(n) { 32808 return t && e(n) ? t(i(n)) : n; 32809 }; 32810 }); 32811 }, { 32812 49: 49, 32813 62: 62, 32814 78: 78 32815 }], 32816 193: [function (t, n, r) { 32817 var e = t(49), 32818 i = t(62).onFreeze; 32819 t(78)("seal", function (t) { 32820 return function seal(n) { 32821 return t && e(n) ? t(i(n)) : n; 32822 }; 32823 }); 32824 }, { 32825 49: 49, 32826 62: 62, 32827 78: 78 32828 }], 32829 194: [function (t, n, r) { 32830 var e = t(32); 32831 e(e.S, "Object", { 32832 setPrototypeOf: t(90).set 32833 }); 32834 }, { 32835 32: 32, 32836 90: 90 32837 }], 32838 195: [function (t, n, r) { 32839 "use strict"; 32840 32841 var e = t(17), 32842 i = {}; 32843 i[t(117)("toStringTag")] = "z", i + "" != "[object z]" && t(87)(Object.prototype, "toString", function toString() { 32844 return "[object " + e(this) + "]"; 32845 }, !0); 32846 }, { 32847 117: 117, 32848 17: 17, 32849 87: 87 32850 }], 32851 196: [function (t, n, r) { 32852 var e = t(32), 32853 i = t(81); 32854 e(e.G + e.F * (parseFloat != i), { 32855 parseFloat: i 32856 }); 32857 }, { 32858 32: 32, 32859 81: 81 32860 }], 32861 197: [function (t, n, r) { 32862 var e = t(32), 32863 i = t(82); 32864 e(e.G + e.F * (parseInt != i), { 32865 parseInt: i 32866 }); 32867 }, { 32868 32: 32, 32869 82: 82 32870 }], 32871 198: [function (t, n, r) { 32872 "use strict"; 32873 32874 var e, 32875 i, 32876 o, 32877 u = t(58), 32878 c = t(38), 32879 f = t(25), 32880 a = t(17), 32881 s = t(32), 32882 l = t(49), 32883 h = t(3), 32884 v = t(6), 32885 p = t(37), 32886 d = t(95), 32887 y = t(104).set, 32888 g = t(64)(), 32889 b = "Promise", 32890 x = c.TypeError, 32891 m = c.process, 32892 w = c[b], 32893 m = c.process, 32894 S = "process" == a(m), 32895 _ = function _() {}, 32896 E = !!function () { 32897 try { 32898 var n = w.resolve(1), 32899 r = (n.constructor = {})[t(117)("species")] = function (t) { 32900 t(_, _); 32901 }; 32902 return (S || "function" == typeof PromiseRejectionEvent) && n.then(_) instanceof r; 32903 } catch (t) {} 32904 }(), 32905 O = function O(t, n) { 32906 return t === n || t === w && n === o; 32907 }, 32908 F = function F(t) { 32909 var n; 32910 return !(!l(t) || "function" != typeof (n = t.then)) && n; 32911 }, 32912 P = function P(t) { 32913 return O(w, t) ? new M(t) : new i(t); 32914 }, 32915 M = i = function i(t) { 32916 var n, r; 32917 this.promise = new t(function (t, e) { 32918 if (void 0 !== n || void 0 !== r) throw x("Bad Promise constructor"); 32919 n = t, r = e; 32920 }), this.resolve = h(n), this.reject = h(r); 32921 }, 32922 A = function A(t) { 32923 try { 32924 t(); 32925 } catch (t) { 32926 return { 32927 error: t 32928 }; 32929 } 32930 }, 32931 I = function I(t, n) { 32932 if (!t._n) { 32933 t._n = !0; 32934 var r = t._c; 32935 g(function () { 32936 for (var e = t._v, i = 1 == t._s, o = 0, u = function u(n) { 32937 var r, 32938 o, 32939 u = i ? n.ok : n.fail, 32940 c = n.resolve, 32941 f = n.reject, 32942 a = n.domain; 32943 try { 32944 u ? (i || (2 == t._h && k(t), t._h = 1), u === !0 ? r = e : (a && a.enter(), r = u(e), a && a.exit()), r === n.promise ? f(x("Promise-chain cycle")) : (o = F(r)) ? o.call(r, c, f) : c(r)) : f(e); 32945 } catch (t) { 32946 f(t); 32947 } 32948 }; r.length > o;) u(r[o++]); 32949 t._c = [], t._n = !1, n && !t._h && j(t); 32950 }); 32951 } 32952 }, 32953 j = function j(t) { 32954 y.call(c, function () { 32955 var n, 32956 r, 32957 e, 32958 i = t._v; 32959 if (N(t) && (n = A(function () { 32960 S ? m.emit("unhandledRejection", i, t) : (r = c.onunhandledrejection) ? r({ 32961 promise: t, 32962 reason: i 32963 }) : (e = c.console) && e.error && e.error("Unhandled promise rejection", i); 32964 }), t._h = S || N(t) ? 2 : 1), t._a = void 0, n) throw n.error; 32965 }); 32966 }, 32967 N = function N(t) { 32968 if (1 == t._h) return !1; 32969 for (var n, r = t._a || t._c, e = 0; r.length > e;) if (n = r[e++], n.fail || !N(n.promise)) return !1; 32970 return !0; 32971 }, 32972 k = function k(t) { 32973 y.call(c, function () { 32974 var n; 32975 S ? m.emit("rejectionHandled", t) : (n = c.onrejectionhandled) && n({ 32976 promise: t, 32977 reason: t._v 32978 }); 32979 }); 32980 }, 32981 R = function R(t) { 32982 var n = this; 32983 n._d || (n._d = !0, n = n._w || n, n._v = t, n._s = 2, n._a || (n._a = n._c.slice()), I(n, !0)); 32984 }, 32985 T = function T(t) { 32986 var n, 32987 r = this; 32988 if (!r._d) { 32989 r._d = !0, r = r._w || r; 32990 try {
32991 if (r === t) throw x("Promise can't be resolved itself"); 32992 (n = F(t)) ? g(function () { 32993 var e = { 32994 _w: r, 32995 _d: !1 32996 }; 32997 try { 32998 n.call(t, f(T, e, 1), f(R, e, 1)); 32999 } catch (t) { 33000 R.call(e, t); 33001 } 33002 }) : (r._v = t, r._s = 1, I(r, !1)); 33003 } catch (t) { 33004 R.call({ 33005 _w: r, 33006 _d: !1 33007 }, t); 33008 } 33009 } 33010 }; 33011 E || (w = function Promise(t) { 33012 v(this, w, b, "_h"), h(t), e.call(this); 33013 try { 33014 t(f(T, this, 1), f(R, this, 1)); 33015 } catch (t) { 33016 R.call(this, t); 33017 } 33018 }, e = function Promise(t) { 33019 this._c = [], this._a = void 0, this._s = 0, this._d = !1, this._v = void 0, this._h = 0, this._n = !1; 33020 }, e.prototype = t(86)(w.prototype, { 33021 then: function then(t, n) { 33022 var r = P(d(this, w)); 33023 return r.ok = "function" != typeof t || t, r.fail = "function" == typeof n && n, r.domain = S ? m.domain : void 0, this._c.push(r), this._a && this._a.push(r), this._s && I(this, !1), r.promise; 33024 }, 33025 catch: function _catch(t) { 33026 return this.then(void 0, t); 33027 } 33028 }), M = function M() { 33029 var t = new e(); 33030 this.promise = t, this.resolve = f(T, t, 1), this.reject = f(R, t, 1); 33031 }), s(s.G + s.W + s.F * !E, { 33032 Promise: w 33033 }), t(92)(w, b), t(91)(b), o = t(23)[b], s(s.S + s.F * !E, b, { 33034 reject: function reject(t) { 33035 var n = P(this), 33036 r = n.reject; 33037 return r(t), n.promise; 33038 } 33039 }), s(s.S + s.F * (u || !E), b, { 33040 resolve: function resolve(t) { 33041 if (t instanceof w && O(t.constructor, this)) return t; 33042 var n = P(this), 33043 r = n.resolve; 33044 return r(t), n.promise; 33045 } 33046 }), s(s.S + s.F * !(E && t(54)(function (t) { 33047 w.all(t).catch(_); 33048 })), b, { 33049 all: function all(t) { 33050 var n = this, 33051 r = P(n), 33052 e = r.resolve, 33053 i = r.reject, 33054 o = A(function () { 33055 var r = [], 33056 o = 0, 33057 u = 1; 33058 p(t, !1, function (t) { 33059 var c = o++, 33060 f = !1; 33061 r.push(void 0), u++, n.resolve(t).then(function (t) { 33062 f || (f = !0, r[c] = t, --u || e(r)); 33063 }, i); 33064 }), --u || e(r); 33065 }); 33066 return o && i(o.error), r.promise; 33067 }, 33068 race: function race(t) { 33069 var n = this, 33070 r = P(n), 33071 e = r.reject, 33072 i = A(function () { 33073 p(t, !1, function (t) { 33074 n.resolve(t).then(r.resolve, e); 33075 }); 33076 }); 33077 return i && e(i.error), r.promise; 33078 } 33079 }); 33080 }, { 33081 104: 104, 33082 117: 117, 33083 17: 17, 33084 23: 23, 33085 25: 25, 33086 3: 3, 33087 32: 32, 33088 37: 37, 33089 38: 38, 33090 49: 49, 33091 54: 54, 33092 58: 58, 33093 6: 6, 33094 64: 64, 33095 86: 86, 33096 91: 91, 33097 92: 92, 33098 95: 95 33099 }], 33100 199: [function (t, n, r) { 33101 var e = t(32), 33102 i = t(3), 33103 o = t(7), 33104 u = (t(38).Reflect || {}).apply, 33105 c = Function.apply; 33106 e(e.S + e.F * !t(34)(function () { 33107 u(function () {}); 33108 }), "Reflect", { 33109 apply: function apply(t, n, r) { 33110 var e = i(t), 33111 f = o(r); 33112 return u ? u(e, n, f) : c.call(e, n, f); 33113 } 33114 }); 33115 }, { 33116 3: 3, 33117 32: 32, 33118 34: 34, 33119 38: 38, 33120 7: 7 33121 }], 33122 200: [function (t, n, r) { 33123 var e = t(32), 33124 i = t(66), 33125 o = t(3), 33126 u = t(7), 33127 c = t(49), 33128 f = t(34), 33129 a = t(16), 33130 s = (t(38).Reflect || {}).construct, 33131 l = f(function () { 33132 function F() {} 33133 return !(s(function () {}, [], F) instanceof F); 33134 }), 33135 h = !f(function () { 33136 s(function () {}); 33137 }); 33138 e(e.S + e.F * (l || h), "Reflect", { 33139 construct: function construct(t, n) { 33140 o(t), u(n); 33141 var r = arguments.length < 3 ? t : o(arguments[2]); 33142 if (h && !l) return s(t, n, r); 33143 if (t == r) { 33144 switch (n.length) { 33145 case 0: 33146 return new t(); 33147 case 1: 33148 return new t(n[0]); 33149 case 2: 33150 return new t(n[0], n[1]); 33151 case 3: 33152 return new t(n[0], n[1], n[2]); 33153 case 4: 33154 return new t(n[0], n[1], n[2], n[3]); 33155 } 33156 var e = [null]; 33157 return e.push.apply(e, n), new (a.apply(t, e))(); 33158 } 33159 var f = r.prototype, 33160 v = i(c(f) ? f : Object.prototype), 33161 p = Function.apply.call(t, v, n); 33162 return c(p) ? p : v; 33163 } 33164 }); 33165 }, { 33166 16: 16, 33167 3: 3, 33168 32: 32, 33169 34: 34, 33170 38: 38, 33171 49: 49, 33172 66: 66, 33173 7: 7 33174 }], 33175 201: [function (t, n, r) { 33176 var e = t(67), 33177 i = t(32), 33178 o = t(7), 33179 u = t(110); 33180 i(i.S + i.F * t(34)(function () { 33181 Reflect.defineProperty(e.f({}, 1, { 33182 value: 1 33183 }), 1, { 33184 value: 2 33185 }); 33186 }), "Reflect", { 33187 defineProperty: function defineProperty(t, n, r) { 33188 o(t), n = u(n, !0), o(r); 33189 try { 33190 return e.f(t, n, r), !0; 33191 } catch (t) { 33192 return !1; 33193 } 33194 } 33195 }); 33196 }, { 33197 110: 110, 33198 32: 32, 33199 34: 34, 33200 67: 67, 33201 7: 7 33202 }], 33203 202: [function (t, n, r) { 33204 var e = t(32), 33205 i = t(70).f, 33206 o = t(7); 33207 e(e.S, "Reflect", { 33208 deleteProperty: function deleteProperty(t, n) { 33209 var r = i(o(t), n); 33210 return !(r && !r.configurable) && delete t[n]; 33211 } 33212 }); 33213 }, { 33214 32: 32, 33215 7: 7, 33216 70: 70 33217 }], 33218 203: [function (t, n, r) { 33219 "use strict"; 33220 33221 var e = t(32), 33222 i = t(7), 33223 o = function o(t) { 33224 this._t = i(t), this._i = 0; 33225 var n, 33226 r = this._k = []; 33227 for (n in t) r.push(n); 33228 }; 33229 t(52)(o, "Object", function () { 33230 var t, 33231 n = this, 33232 r = n._k; 33233 do if (n._i >= r.length) return { 33234 value: void 0, 33235 done: !0 33236 }; while (!((t = r[n._i++]) in n._t)); 33237 return { 33238 value: t, 33239 done: !1 33240 }; 33241 }), e(e.S, "Reflect", { 33242 enumerate: function enumerate(t) { 33243 return new o(t); 33244 } 33245 }); 33246 }, { 33247 32: 32, 33248 52: 52, 33249 7: 7 33250 }], 33251 204: [function (t, n, r) { 33252 var e = t(70), 33253 i = t(32), 33254 o = t(7); 33255 i(i.S, "Reflect", { 33256 getOwnPropertyDescriptor: function getOwnPropertyDescriptor(t, n) { 33257 return e.f(o(t), n); 33258 } 33259 }); 33260 }, { 33261 32: 32, 33262 7: 7, 33263 70: 70 33264 }], 33265 205: [function (t, n, r) { 33266 var e = t(32), 33267 i = t(74), 33268 o = t(7); 33269 e(e.S, "Reflect", { 33270 getPrototypeOf: function getPrototypeOf(t) { 33271 return i(o(t)); 33272 } 33273 }); 33274 }, { 33275 32: 32, 33276 7: 7, 33277 74: 74 33278 }], 33279 206: [function (t, n, r) { 33280 function get(t, n) { 33281 var r, 33282 u, 33283 a = arguments.length < 3 ? t : arguments[2]; 33284 return f(t) === a ? t[n] : (r = e.f(t, n)) ? o(r, "value") ? r.value : void 0 !== r.get ? r.get.call(a) : void 0 : c(u = i(t)) ? get(u, n, a) : void 0; 33285 } 33286 var e = t(70), 33287 i = t(74), 33288 o = t(39), 33289 u = t(32), 33290 c = t(49), 33291 f = t(7); 33292 u(u.S, "Reflect", { 33293 get: get 33294 }); 33295 }, { 33296 32: 32, 33297 39: 39, 33298 49: 49, 33299 7: 7, 33300 70: 70, 33301 74: 74 33302 }], 33303 207: [function (t, n, r) { 33304 var e = t(32); 33305 e(e.S, "Reflect", { 33306 has: function has(t, n) { 33307 return n in t; 33308 } 33309 }); 33310 }, { 33311 32: 32 33312 }], 33313 208: [function (t, n, r) { 33314 var e = t(32), 33315 i = t(7), 33316 o = Object.isExtensible; 33317 e(e.S, "Reflect", { 33318 isExtensible: function isExtensible(t) { 33319 return i(t), !o || o(t); 33320 } 33321 }); 33322 }, { 33323 32: 32, 33324 7: 7 33325 }], 33326 209: [function (t, n, r) { 33327 var e = t(32); 33328 e(e.S, "Reflect", { 33329 ownKeys: t(80) 33330 }); 33331 }, { 33332 32: 32, 33333 80: 80 33334 }], 33335 210: [function (t, n, r) { 33336 var e = t(32), 33337 i = t(7), 33338 o = Object.preventExtensions; 33339 e(e.S, "Reflect", { 33340 preventExtensions: function preventExtensions(t) { 33341 i(t); 33342 try { 33343 return o && o(t), !0; 33344 } catch (t) { 33345 return !1; 33346 } 33347 } 33348 }); 33349 }, { 33350 32: 32, 33351 7: 7 33352 }], 33353 211: [function (t, n, r) { 33354 var e = t(32), 33355 i = t(90); 33356 i && e(e.S, "Reflect", { 33357 setPrototypeOf: function setPrototypeOf(t, n) { 33358 i.check(t, n); 33359 try { 33360 return i.set(t, n), !0; 33361 } catch (t) { 33362 return !1; 33363 } 33364 } 33365 }); 33366 }, { 33367 32: 32, 33368 90: 90 33369 }], 33370 212: [function (t, n, r) { 33371 function set(t, n, r) { 33372 var c, 33373 l, 33374 h = arguments.length < 4 ? t : arguments[3], 33375 v = i.f(a(t), n); 33376 if (!v) { 33377 if (s(l = o(t))) return set(l, n, r, h); 33378 v = f(0); 33379 } 33380 return u(v, "value") ? !(v.writable === !1 || !s(h)) && (c = i.f(h, n) || f(0), c.value = r, e.f(h, n, c), !0) : void 0 !== v.set && (v.set.call(h, r), !0); 33381 } 33382 var e = t(67), 33383 i = t(70), 33384 o = t(74), 33385 u = t(39), 33386 c = t(32), 33387 f = t(85), 33388 a = t(7), 33389 s = t(49); 33390 c(c.S, "Reflect", { 33391 set: set 33392 }); 33393 }, { 33394 32: 32, 33395 39: 39, 33396 49: 49, 33397 67: 67, 33398 7: 7, 33399 70: 70, 33400 74: 74, 33401 85: 85 33402 }], 33403 213: [function (t, n, r) { 33404 var e = t(38), 33405 i = t(43), 33406 o = t(67).f, 33407 u = t(72).f, 33408 c = t(50), 33409 f = t(36), 33410 a = e.RegExp, 33411 s = a, 33412 l = a.prototype, 33413 h = /a/g, 33414 v = /a/g, 33415 p = new a(h) !== h; 33416 if (t(28) && (!p || t(34)(function () { 33417 return v[t(117)("match")] = !1, a(h) != h || a(v) == v || "/a/i" != a(h, "i"); 33418 }
33418))) { 33419 a = function RegExp(t, n) { 33420 var r = this instanceof a, 33421 e = c(t), 33422 o = void 0 === n; 33423 return !r && e && t.constructor === a && o ? t : i(p ? new s(e && !o ? t.source : t, n) : s((e = t instanceof a) ? t.source : t, e && o ? f.call(t) : n), r ? this : l, a); 33424 }; 33425 for (var d = function d(t) { 33426 (t in a) || o(a, t, { 33427 configurable: !0, 33428 get: function get() { 33429 return s[t]; 33430 }, 33431 set: function set(n) { 33432 s[t] = n; 33433 } 33434 }); 33435 }, y = u(s), g = 0; y.length > g;) d(y[g++]); 33436 l.constructor = a, a.prototype = l, t(87)(e, "RegExp", a); 33437 } 33438 t(91)("RegExp"); 33439 }, { 33440 117: 117, 33441 28: 28, 33442 34: 34, 33443 36: 36, 33444 38: 38, 33445 43: 43, 33446 50: 50, 33447 67: 67, 33448 72: 72, 33449 87: 87, 33450 91: 91 33451 }], 33452 214: [function (t, n, r) { 33453 t(28) && "g" != /./g.flags && t(67).f(RegExp.prototype, "flags", { 33454 configurable: !0, 33455 get: t(36) 33456 }); 33457 }, { 33458 28: 28, 33459 36: 36, 33460 67: 67 33461 }], 33462 215: [function (t, n, r) { 33463 t(35)("match", 1, function (t, n, r) { 33464 return [function match(r) { 33465 "use strict"; 33466 33467 var e = t(this), 33468 i = void 0 == r ? void 0 : r[n]; 33469 return void 0 !== i ? i.call(r, e) : new RegExp(r)[n](String(e)); 33470 }, r]; 33471 }); 33472 }, { 33473 35: 35 33474 }], 33475 216: [function (t, n, r) { 33476 t(35)("replace", 2, function (t, n, r) { 33477 return [function replace(e, i) { 33478 "use strict"; 33479 33480 var o = t(this), 33481 u = void 0 == e ? void 0 : e[n]; 33482 return void 0 !== u ? u.call(e, o, i) : r.call(String(o), e, i); 33483 }, r]; 33484 }); 33485 }, { 33486 35: 35 33487 }], 33488 217: [function (t, n, r) { 33489 t(35)("search", 1, function (t, n, r) { 33490 return [function search(r) { 33491 "use strict"; 33492 33493 var e = t(this), 33494 i = void 0 == r ? void 0 : r[n]; 33495 return void 0 !== i ? i.call(r, e) : new RegExp(r)[n](String(e)); 33496 }, r]; 33497 }); 33498 }, { 33499 35: 35 33500 }], 33501 218: [function (t, n, r) { 33502 t(35)("split", 2, function (n, r, e) { 33503 "use strict"; 33504 33505 var i = t(50), 33506 o = e, 33507 u = [].push, 33508 c = "split", 33509 f = "length", 33510 a = "lastIndex"; 33511 if ("c" == "abbc"[c](/(b)*/)[1] || 4 != "test"[c](/(?:)/, -1)[f] || 2 != "ab"[c](/(?:ab)*/)[f] || 4 != "."[c](/(.?)(.?)/)[f] || "."[c](/()()/)[f] > 1 || ""[c](/.?/)[f]) { 33512 var s = void 0 === /()??/.exec("")[1]; 33513 e = function e(t, n) { 33514 var r = String(this); 33515 if (void 0 === t && 0 === n) return []; 33516 if (!i(t)) return o.call(r, t, n); 33517 var e, 33518 c, 33519 l, 33520 h, 33521 v, 33522 p = [], 33523 d = (t.ignoreCase ? "i" : "") + (t.multiline ? "m" : "") + (t.unicode ? "u" : "") + (t.sticky ? "y" : ""), 33524 y = 0, 33525 g = void 0 === n ? 4294967295 : n >>> 0, 33526 b = new RegExp(t.source, d + "g"); 33527 for (s || (e = new RegExp("^" + b.source + "$(?!\\s)", d)); (c = b.exec(r)) && (l = c.index + c[0][f], !(l > y && (p.push(r.slice(y, c.index)), !s && c[f] > 1 && c[0].replace(e, function () { 33528 for (v = 1; v < arguments[f] - 2; v++) void 0 === arguments[v] && (c[v] = void 0); 33529 }), c[f] > 1 && c.index < r[f] && u.apply(p, c.slice(1)), h = c[0][f], y = l, p[f] >= g)));) b[a] === c.index && b[a]++; 33530 return y === r[f] ? !h && b.test("") || p.push("") : p.push(r.slice(y)), p[f] > g ? p.slice(0, g) : p; 33531 }; 33532 } else "0"[c](void 0, 0)[f] && (e = function e(t, n) { 33533 return void 0 === t && 0 === n ? [] : o.call(this, t, n); 33534 }); 33535 return [function split(t, i) { 33536 var o = n(this), 33537 u = void 0 == t ? void 0 : t[r]; 33538 return void 0 !== u ? u.call(t, o, i) : e.call(String(o), t, i); 33539 }, e]; 33540 }); 33541 }, { 33542 35: 35, 33543 50: 50 33544 }], 33545 219: [function (t, n, r) { 33546 "use strict"; 33547 33548 t(214); 33549 var e = t(7), 33550 i = t(36), 33551 o = t(28), 33552 u = "toString", 33553 c = /./[u], 33554 f = function f(n) { 33555 t(87)(RegExp.prototype, u, n, !0); 33556 }; 33557 t(34)(function () { 33558 return "/a/b" != c.call({ 33559 source: "a", 33560 flags: "b" 33561 }); 33562 }) ? f(function toString() { 33563 var t = e(this); 33564 return "/".concat(t.source, "/", "flags" in t ? t.flags : !o && t instanceof RegExp ? i.call(t) : void 0); 33565 }) : c.name != u && f(function toString() { 33566 return c.call(this); 33567 }); 33568 }, { 33569 214: 214, 33570 28: 28, 33571 34: 34, 33572 36: 36, 33573 7: 7, 33574 87: 87 33575 }], 33576 220: [function (t, n, r) { 33577 "use strict"; 33578 33579 var e = t(19); 33580 n.exports = t(22)("Set", function (t) { 33581 return function Set() { 33582 return t(this, arguments.length > 0 ? arguments[0] : void 0); 33583 }; 33584 }, {
33585 add: function add(t) { 33586 return e.def(this, t = 0 === t ? 0 : t, t); 33587 } 33588 }, e); 33589 }, { 33590 19: 19, 33591 22: 22 33592 }], 33593 221: [function (t, n, r) { 33594 "use strict"; 33595 33596 t(99)("anchor", function (t) { 33597 return function anchor(n) { 33598 return t(this, "a", "name", n); 33599 }; 33600 }); 33601 }, { 33602 99: 99 33603 }], 33604 222: [function (t, n, r) { 33605 "use strict"; 33606 33607 t(99)("big", function (t) { 33608 return function big() { 33609 return t(this, "big", "", ""); 33610 }; 33611 }); 33612 }, { 33613 99: 99 33614 }], 33615 223: [function (t, n, r) { 33616 "use strict"; 33617 33618 t(99)("blink", function (t) { 33619 return function blink() { 33620 return t(this, "blink", "", ""); 33621 }; 33622 }); 33623 }, { 33624 99: 99 33625 }], 33626 224: [function (t, n, r) { 33627 "use strict"; 33628 33629 t(99)("bold", function (t) { 33630 return function bold() { 33631 return t(this, "b", "", ""); 33632 }; 33633 }); 33634 }, { 33635 99: 99 33636 }], 33637 225: [function (t, n, r) { 33638 "use strict"; 33639 33640 var e = t(32), 33641 i = t(97)(!1); 33642 e(e.P, "String", { 33643 codePointAt: function codePointAt(t) { 33644 return i(this, t); 33645 } 33646 }); 33647 }, { 33648 32: 32, 33649 97: 97 33650 }], 33651 226: [function (t, n, r) { 33652 "use strict"; 33653 33654 var e = t(32), 33655 i = t(108), 33656 o = t(98), 33657 u = "endsWith", 33658 c = ""[u]; 33659 e(e.P + e.F * t(33)(u), "String", { 33660 endsWith: function endsWith(t) { 33661 var n = o(this, t, u), 33662 r = arguments.length > 1 ? arguments[1] : void 0, 33663 e = i(n.length), 33664 f = void 0 === r ? e : Math.min(i(r), e), 33665 a = String(t); 33666 return c ? c.call(n, a, f) : n.slice(f - a.length, f) === a; 33667 } 33668 }); 33669 }, { 33670 108: 108, 33671 32: 32, 33672 33: 33, 33673 98: 98 33674 }], 33675 227: [function (t, n, r) { 33676 "use strict"; 33677 33678 t(99)("fixed", function (t) { 33679 return function fixed() { 33680 return t(this, "tt", "", ""); 33681 }; 33682 }); 33683 }, { 33684 99: 99 33685 }], 33686 228: [function (t, n, r) { 33687 "use strict"; 33688 33689 t(99)("fontcolor", function (t) { 33690 return function fontcolor(n) { 33691 return t(this, "font", "color", n); 33692 }; 33693 }); 33694 }, { 33695 99: 99 33696 }], 33697 229: [function (t, n, r) { 33698 "use strict"; 33699 33700 t(99)("fontsize", function (t) { 33701 return function fontsize(n) { 33702 return t(this, "font", "size", n); 33703 }; 33704 }); 33705 }, { 33706 99: 99 33707 }], 33708 230: [function (t, n, r) { 33709 var e = t(32), 33710 i = t(105), 33711 o = String.fromCharCode, 33712 u = String.fromCodePoint; 33713 e(e.S + e.F * (!!u && 1 != u.length), "String", { 33714 fromCodePoint: function fromCodePoint(t) { 33715 for (var n, r = [], e = arguments.length, u = 0; e > u;) { 33716 if (n = +arguments[u++], i(n, 1114111) !== n) throw RangeError(n + " is not a valid code point"); 33717 r.push(n < 65536 ? o(n) : o(((n -= 65536) >> 10) + 55296, n % 1024 + 56320)); 33718 } 33719 return r.join(""); 33720 } 33721 }); 33722 }, { 33723 105: 105, 33724 32: 32 33725 }], 33726 231: [function (t, n, r) { 33727 "use strict"; 33728 33729 var e = t(32), 33730 i = t(98), 33731 o = "includes"; 33732 e(e.P + e.F * t(33)(o), "String", { 33733 includes: function includes(t) { 33734 return !!~i(this, t, o).indexOf(t, arguments.length > 1 ? arguments[1] : void 0); 33735 } 33736 }); 33737 }, { 33738 32: 32, 33739 33: 33, 33740 98: 98 33741 }], 33742 232: [function (t, n, r) { 33743 "use strict"; 33744 33745 t(99)("italics", function (t) { 33746 return function italics() { 33747 return t(this, "i", "", ""); 33748 }; 33749 }); 33750 }, { 33751 99: 99 33752 }], 33753 233: [function (t, n, r) { 33754 "use strict"; 33755 33756 var e = t(97)(!0); 33757 t(53)(String, "String", function (t) { 33758 this._t = String(t), this._i = 0; 33759 }, function () { 33760 var t, 33761 n = this._t, 33762 r = this._i; 33763 return r >= n.length ? { 33764 value: void 0, 33765 done: !0 33766 } : (t = e(n, r), this._i += t.length, { 33767 value: t, 33768 done: !1 33769 }); 33770 }); 33771 }, { 33772 53: 53, 33773 97: 97 33774 }], 33775 234: [function (t, n, r) { 33776 "use strict"; 33777 33778 t(99)("link", function (t) { 33779 return function link(n) { 33780 return t(this, "a", "href", n); 33781 }; 33782 }); 33783 }, { 33784 99: 99 33785 }], 33786 235: [function (t, n, r) { 33787 var e = t(32), 33788 i = t(107), 33789 o = t(108); 33790 e(e.S, "String", { 33791 raw: function raw(t) { 33792 for (var n = i(t.raw), r = o(n.length), e = arguments.length, u = [], c = 0; r > c;) u.push(String(n[c++])), c < e && u.push(String(arguments[c])); 33793 return u.join(""); 33794 } 33795 }); 33796 }, { 33797 107: 107, 33798 108: 108, 33799 32: 32 33800 }], 33801 236: [function (t, n, r) { 33802 var e = t(32); 33803 e(e.P, "String", { 33804 repeat: t(101) 33805 }); 33806 }, { 33807 101: 101, 33808 32: 32 33809 }], 33810 237: [function (t, n, r) { 33811 "use strict"; 33812 33813 t(99)("small", function (t) { 33814 return function small() { 33815 return t(this, "small", "", ""); 33816 }; 33817 }); 33818 }, { 33819 99: 99 33820 }], 33821 238: [function (t, n, r) { 33822 "use strict"; 33823 33824 var e = t(32), 33825 i = t(108), 33826 o = t(98), 33827 u = "startsWith", 33828 c = ""[u]; 33829 e(e.P + e.F * t(33)(u), "String", { 33830 startsWith: function startsWith(t) { 33831 var n = o(this, t, u), 33832 r = i(Math.min(arguments.length > 1 ? arguments[1] : void 0, n.length)), 33833 e = String(t); 33834 return c ? c.call(n, e, r) : n.slice(r, r + e.length) === e; 33835 } 33836 }); 33837 }, { 33838 108: 108, 33839 32: 32, 33840 33: 33, 33841 98: 98 33842 }], 33843 239: [function (t, n, r) { 33844 "use strict"; 33845 33846 t(99)("strike", function (t) { 33847 return function strike() { 33848 return t(this, "strike", "", ""); 33849 }; 33850 }); 33851 }, { 33852 99: 99 33853 }], 33854 240: [function (t, n, r) { 33855 "use strict"; 33856 33857 t(99)("sub", function (t) { 33858 return function sub() { 33859 return t(this, "sub", "", ""); 33860 }; 33861 }); 33862 }, { 33863 99: 99 33864 }], 33865 241: [function (t, n, r) { 33866 "use strict"; 33867 33868 t(99)("sup", function (t) { 33869 return function sup() { 33870 return t(this, "sup", "", ""); 33871 }; 33872 }); 33873 }, { 33874 99: 99 33875 }], 33876 242: [function (t, n, r) { 33877 "use strict"; 33878 33879 t(102)("trim", function (t) { 33880 return function trim() { 33881 return t(this, 3); 33882 }; 33883 }); 33884 }, { 33885 102: 102 33886 }], 33887 243: [function (t, n, r) { 33888 "use strict"; 33889 33890 var e = t(38), 33891 i = t(39), 33892 o = t(28), 33893 u = t(32), 33894 c = t(87), 33895 f = t(62).KEY, 33896 a = t(34), 33897 s = t(94), 33898 l = t(92), 33899 h = t(114), 33900 v = t(117), 33901 p = t(116), 33902 d = t(115), 33903 y = t(57), 33904 g = t(31), 33905 b = t(47), 33906 x = t(7), 33907 m = t(107), 33908 w = t(110), 33909 S = t(85), 33910 _ = t(66), 33911 E = t(71), 33912 O = t(70), 33913 F = t(67), 33914 P = t(76), 33915 M = O.f, 33916 A = F.f, 33917 I = E.f, 33918 j = e.Symbol, 33919 N = e.JSON, 33920 k = N && N.stringify, 33921 R = "prototype", 33922 T = v("_hidden"), 33923 L = v("toPrimitive"), 33924 C = {}.propertyIsEnumerable, 33925 U = s("symbol-registry"), 33926 G = s("symbols"),
33927 D = s("op-symbols"), 33928 W = Object[R], 33929 B = "function" == typeof j, 33930 V = e.QObject, 33931 z = !V || !V[R] || !V[R].findChild, 33932 K = o && a(function () { 33933 return 7 != _(A({}, "a", { 33934 get: function get() { 33935 return A(this, "a", { 33936 value: 7 33937 }).a; 33938 } 33939 })).a; 33940 }) ? function (t, n, r) { 33941 var e = M(W, n); 33942 e && delete W[n], A(t, n, r), e && t !== W && A(W, n, e); 33943 } : A, 33944 J = function J(t) { 33945 var n = G[t] = _(j[R]); 33946 return n._k = t, n; 33947 }, 33948 Y = B && "symbol" == _typeof(j.iterator) ? function (t) { 33949 return "symbol" == _typeof(t); 33950 } : function (t) { 33951 return t instanceof j; 33952 }, 33953 q = function defineProperty(t, n, r) { 33954 return t === W && q(D, n, r), x(t), n = w(n, !0), x(r), i(G, n) ? (r.enumerable ? (i(t, T) && t[T][n] && (t[T][n] = !1), r = _(r, { 33955 enumerable: S(0, !1) 33956 })) : (i(t, T) || A(t, T, S(1, {})), t[T][n] = !0), K(t, n, r)) : A(t, n, r); 33957 }, 33958 X = function defineProperties(t, n) { 33959 x(t); 33960 for (var r, e = g(n = m(n)), i = 0, o = e.length; o > i;) q(t, r = e[i++], n[r]); 33961 return t; 33962 }, 33963 $ = function create(t, n) { 33964 return void 0 === n ? _(t) : X(_(t), n); 33965 }, 33966 H = function propertyIsEnumerable(t) { 33967 var n = C.call(this, t = w(t, !0)); 33968 return !(this === W && i(G, t) && !i(D, t)) && (!(n || !i(this, t) || !i(G, t) || i(this, T) && this[T][t]) || n); 33969 }, 33970 Z = function getOwnPropertyDescriptor(t, n) { 33971 if (t = m(t), n = w(n, !0), t !== W || !i(G, n) || i(D, n)) { 33972 var r = M(t, n); 33973 return !r || !i(G, n) || i(t, T) && t[T][n] || (r.enumerable = !0), r; 33974 } 33975 }, 33976 Q = function getOwnPropertyNames(t) { 33977 for (var n, r = I(m(t)), e = [], o = 0; r.length > o;) i(G, n = r[o++]) || n == T || n == f || e.push(n); 33978 return e; 33979 }, 33980 tt = function getOwnPropertySymbols(t) { 33981 for (var n, r = t === W, e = I(r ? D : m(t)), o = [], u = 0; e.length > u;) !i(G, n = e[u++]) || r && !i(W, n) || o.push(G[n]); 33982 return o; 33983 }; 33984 B || (j = function _Symbol() { 33985 if (this instanceof j) throw TypeError("Symbol is not a constructor!"); 33986 var t = h(arguments.length > 0 ? arguments[0] : void 0), 33987 n = function n(r) { 33988 this === W && n.call(D, r), i(this, T) && i(this[T], t) && (this[T][t] = !1), K(this, t, S(1, r)); 33989 }; 33990 return o && z && K(W, t, { 33991 configurable: !0, 33992 set: n 33993 }), J(t); 33994 }, c(j[R], "toString", function toString() { 33995 return this._k; 33996 }), O.f = Z, F.f = q, t(72).f = E.f = Q, t(77).f = H, t(73).f = tt, o && !t(58) && c(W, "propertyIsEnumerable", H, !0), p.f = function (t) { 33997 return J(v(t)); 33998 }), u(u.G + u.W + u.F * !B, { 33999 Symbol: j 34000 }); 34001 for (var nt = "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","), rt = 0; nt.length > rt;) v(nt[rt++]); 34002 for (var nt = P(v.store), rt = 0; nt.length > rt;) d(nt[rt++]); 34003 u(u.S + u.F * !B, "Symbol", { 34004 for: function _for(t) { 34005 return i(U, t += "") ? U[t] : U[t] = j(t); 34006 }, 34007 keyFor: function keyFor(t) { 34008 if (Y(t)) return y(U, t); 34009 throw TypeError(t + " is not a symbol!"); 34010 }, 34011 useSetter: function useSetter() { 34012 z = !0; 34013 }, 34014 useSimple: function useSimple() { 34015 z = !1; 34016 } 34017 }), u(u.S + u.F * !B, "Object", { 34018 create: $, 34019 defineProperty: q, 34020 defineProperties: X, 34021 getOwnPropertyDescriptor: Z, 34022 getOwnPropertyNames: Q, 34023 getOwnPropertySymbols: tt 34024 }), N && u(u.S + u.F * (!B || a(function () { 34025 var t = j(); 34026 return "[null]" != k([t]) || "{}" != k({ 34027 a: t 34028 }) || "{}" != k(Object(t)); 34029 })), "JSON", { 34030 stringify: function stringify(t) { 34031 if (void 0 !== t && !Y(t)) { 34032 for (var n, r, e = [t], i = 1; arguments.length > i;) e.push(arguments[i++]); 34033 return n = e[1], "function" == typeof n && (r = n), !r && b(n) || (n = function n(t, _n) { 34034 if (r && (_n = r.call(this, t, _n)), !Y(_n)) return _n; 34035 }), e[1] = n, k.apply(N, e); 34036 } 34037 } 34038 }), j[R][L] || t(40)(j[R], L, j[R].valueOf), l(j, "Symbol"), l(Math, "Math", !0), l(e.JSON, "JSON", !0); 34039 }, { 34040 107: 107, 34041 110: 110, 34042 114: 114, 34043 115: 115, 34044 116: 116, 34045 117: 117, 34046 28: 28, 34047 31: 31, 34048 32: 32, 34049 34: 34, 34050 38: 38, 34051 39: 39, 34052 40: 40, 34053 47: 47, 34054 57: 57, 34055 58: 58, 34056 62: 62, 34057 66: 66, 34058 67: 67, 34059 7: 7, 34060 70: 70, 34061 71: 71, 34062 72: 72, 34063 73: 73, 34064 76: 76, 34065 77: 77, 34066 85: 85, 34067 87: 87, 34068 92: 92, 34069 94: 94 34070 }], 34071 244: [function (t, n, r) { 34072 "use strict"; 34073 34074 var e = t(32), 34075 i = t(113), 34076 o = t(112), 34077 u = t(7), 34078 c = t(105), 34079 f = t(108), 34080 a = t(49), 34081 s = t(38).ArrayBuffer, 34082 l = t(95), 34083 h = o.ArrayBuffer, 34084 v = o.DataView, 34085 p = i.ABV && s.isView, 34086 d = h.prototype.slice, 34087 y = i.VIEW, 34088 g = "ArrayBuffer"; 34089 e(e.G + e.W + e.F * (s !== h), { 34090 ArrayBuffer: h 34091 }), e(e.S + e.F * !i.CONSTR, g, { 34092 isView: function isView(t) { 34093 return p && p(t) || a(t) && y in t; 34094 } 34095 }), e(e.P + e.U + e.F * t(34)(function () {
34096 return !new h(2).slice(1, void 0).byteLength; 34097 }), g, { 34098 slice: function slice(t, n) { 34099 if (void 0 !== d && void 0 === n) return d.call(u(this), t); 34100 for (var r = u(this).byteLength, e = c(t, r), i = c(void 0 === n ? r : n, r), o = new (l(this, h))(f(i - e)), a = new v(this), s = new v(o), p = 0; e < i;) s.setUint8(p++, a.getUint8(e++)); 34101 return o; 34102 } 34103 }), t(91)(g); 34104 }, { 34105 105: 105, 34106 108: 108, 34107 112: 112, 34108 113: 113, 34109 32: 32, 34110 34: 34, 34111 38: 38, 34112 49: 49, 34113 7: 7, 34114 91: 91, 34115 95: 95 34116 }], 34117 245: [function (t, n, r) { 34118 var e = t(32); 34119 e(e.G + e.W + e.F * !t(113).ABV, { 34120 DataView: t(112).DataView 34121 }); 34122 }, { 34123 112: 112, 34124 113: 113, 34125 32: 32 34126 }], 34127 246: [function (t, n, r) { 34128 t(111)("Float32", 4, function (t) { 34129 return function Float32Array(n, r, e) { 34130 return t(this, n, r, e); 34131 }; 34132 }); 34133 }, { 34134 111: 111 34135 }], 34136 247: [function (t, n, r) { 34137 t(111)("Float64", 8, function (t) { 34138 return function Float64Array(n, r, e) { 34139 return t(this, n, r, e); 34140 }; 34141 }); 34142 }, { 34143 111: 111 34144 }], 34145 248: [function (t, n, r) { 34146 t(111)("Int16", 2, function (t) { 34147 return function Int16Array(n, r, e) { 34148 return t(this, n, r, e); 34149 }; 34150 }); 34151 }, { 34152 111: 111 34153 }], 34154 249: [function (t, n, r) { 34155 t(111)("Int32", 4, function (t) { 34156 return function Int32Array(n, r, e) { 34157 return t(this, n, r, e); 34158 }; 34159 }); 34160 }, { 34161 111: 111 34162 }], 34163 250: [function (t, n, r) { 34164 t(111)("Int8", 1, function (t) { 34165 return function Int8Array(n, r, e) { 34166 return t(this, n, r, e); 34167 }; 34168 }); 34169 }, { 34170 111: 111 34171 }], 34172 251: [function (t, n, r) { 34173 t(111)("Uint16", 2, function (t) { 34174 return function Uint16Array(n, r, e) { 34175 return t(this, n, r, e); 34176 }; 34177 }); 34178 }, { 34179 111: 111 34180 }], 34181 252: [function (t, n, r) { 34182 t(111)("Uint32", 4, function (t) { 34183 return function Uint32Array(n, r, e) { 34184 return t(this, n, r, e); 34185 }; 34186 }); 34187 }, { 34188 111: 111 34189 }], 34190 253: [function (t, n, r) { 34191 t(111)("Uint8", 1, function (t) { 34192 return function Uint8Array(n, r, e) { 34193 return t(this, n, r, e); 34194 }; 34195 }); 34196 }, { 34197 111: 111 34198 }], 34199 254: [function (t, n, r) { 34200 t(111)("Uint8", 1, function (t) { 34201 return function Uint8ClampedArray(n, r, e) { 34202 return t(this, n, r, e); 34203 }; 34204 }, !0); 34205 }, { 34206 111: 111 34207 }], 34208 255: [function (t, n, r) { 34209 "use strict"; 34210 34211 var e, 34212 i = t(12)(0), 34213 o = t(87), 34214 u = t(62), 34215 c = t(65), 34216 f = t(21), 34217 a = t(49), 34218 s = u.getWeak, 34219 l = Object.isExtensible, 34220 h = f.ufstore, 34221 v = {}, 34222 p = function p(t) { 34223 return function WeakMap() { 34224 return t(this, arguments.length > 0 ? arguments[0] : void 0); 34225 }; 34226 }, 34227 d = { 34228 get: function get(t) { 34229 if (a(t)) { 34230 var n = s(t); 34231 return n === !0 ? h(this).get(t) : n ? n[this._i] : void 0; 34232 } 34233 }, 34234 set: function set(t, n) { 34235 return f.def(this, t, n); 34236 } 34237 }, 34238 y = n.exports = t(22)("WeakMap", p, d, f, !0, !0); 34239 7 != new y().set((Object.freeze || Object)(v), 7).get(v) && (e = f.getConstructor(p), c(e.prototype, d), u.NEED = !0, i(["delete", "has", "get", "set"], function (t) { 34240 var n = y.prototype, 34241 r = n[t]; 34242 o(n, t, function (n, i) { 34243 if (a(n) && !l(n)) { 34244 this._f || (this._f = new e()); 34245 var o = this._f[t](n, i); 34246 return "set" == t ? this : o; 34247 } 34248 return r.call(this, n, i); 34249 }); 34250 })); 34251 }, { 34252 12: 12, 34253 21: 21, 34254 22: 22, 34255 49: 49, 34256 62: 62, 34257 65: 65, 34258 87: 87 34259 }], 34260 256: [function (t, n, r) { 34261 "use strict"; 34262 34263 var e = t(21); 34264 t(22)("WeakSet", function (t) { 34265 return function WeakSet() { 34266 return t(this, arguments.length > 0 ? arguments[0] : void 0); 34267 }; 34268 }, { 34269 add: function add(t) { 34270 return e.def(this, t, !0); 34271 } 34272 }, e, !1, !0); 34273 }, { 34274 21: 21, 34275 22: 22 34276 }], 34277 257: [function (t, n, r) { 34278 "use strict"; 34279 34280 var e = t(32), 34281 i = t(11)(!0); 34282 e(e.P, "Array", { 34283 includes: function includes(t) { 34284 return i(this, t, arguments.length > 1 ? arguments[1] : void 0); 34285 } 34286 }), t(5)("includes"); 34287 }, { 34288 11: 11, 34289 32: 32, 34290 5: 5 34291 }], 34292 258: [function (t, n, r) { 34293 var e = t(32), 34294 i = t(64)(), 34295 o = t(38).process, 34296 u = "process" == t(18)(o); 34297 e(e.G, { 34298 asap: function asap(t) { 34299 var n = u && o.domain; 34300 i(n ? n.bind(t) : t); 34301 } 34302 }); 34303 }, { 34304 18: 18, 34305 32: 32, 34306 38: 38, 34307 64: 64 34308 }], 34309 259: [function (t, n, r) { 34310 var e = t(32), 34311 i = t(18); 34312 e(e.S, "Error", { 34313 isError: function isError(t) {
34314 return "Error" === i(t); 34315 } 34316 }); 34317 }, { 34318 18: 18, 34319 32: 32 34320 }], 34321 260: [function (t, n, r) { 34322 var e = t(32); 34323 e(e.P + e.R, "Map", { 34324 toJSON: t(20)("Map") 34325 }); 34326 }, { 34327 20: 20, 34328 32: 32 34329 }], 34330 261: [function (t, n, r) { 34331 var e = t(32); 34332 e(e.S, "Math", { 34333 iaddh: function iaddh(t, n, r, e) { 34334 var i = t >>> 0, 34335 o = n >>> 0, 34336 u = r >>> 0; 34337 return o + (e >>> 0) + ((i & u | (i | u) & ~(i + u >>> 0)) >>> 31) | 0; 34338 } 34339 }); 34340 }, { 34341 32: 32 34342 }], 34343 262: [function (t, n, r) { 34344 var e = t(32); 34345 e(e.S, "Math", { 34346 imulh: function imulh(t, n) { 34347 var r = 65535, 34348 e = +t, 34349 i = +n, 34350 o = e & r, 34351 u = i & r, 34352 c = e >> 16, 34353 f = i >> 16, 34354 a = (c * u >>> 0) + (o * u >>> 16); 34355 return c * f + (a >> 16) + ((o * f >>> 0) + (a & r) >> 16); 34356 } 34357 }); 34358 }, { 34359 32: 32 34360 }], 34361 263: [function (t, n, r) { 34362 var e = t(32); 34363 e(e.S, "Math", { 34364 isubh: function isubh(t, n, r, e) { 34365 var i = t >>> 0, 34366 o = n >>> 0, 34367 u = r >>> 0; 34368 return o - (e >>> 0) - ((~i & u | ~(i ^ u) & i - u >>> 0) >>> 31) | 0; 34369 } 34370 }); 34371 }, { 34372 32: 32 34373 }], 34374 264: [function (t, n, r) { 34375 var e = t(32); 34376 e(e.S, "Math", { 34377 umulh: function umulh(t, n) { 34378 var r = 65535, 34379 e = +t, 34380 i = +n, 34381 o = e & r, 34382 u = i & r, 34383 c = e >>> 16, 34384 f = i >>> 16, 34385 a = (c * u >>> 0) + (o * u >>> 16); 34386 return c * f + (a >>> 16) + ((o * f >>> 0) + (a & r) >>> 16); 34387 } 34388 }); 34389 }, { 34390 32: 32 34391 }], 34392 265: [function (t, n, r) { 34393 "use strict"; 34394 34395 var e = t(32), 34396 i = t(109), 34397 o = t(3), 34398 u = t(67); 34399 t(28) && e(e.P + t(69), "Object", { 34400 __defineGetter__: function __defineGetter__(t, n) { 34401 u.f(i(this), t, { 34402 get: o(n), 34403 enumerable: !0, 34404 configurable: !0 34405 }); 34406 } 34407 }); 34408 }, { 34409 109: 109, 34410 28: 28, 34411 3: 3, 34412 32: 32, 34413 67: 67, 34414 69: 69 34415 }], 34416 266: [function (t, n, r) { 34417 "use strict"; 34418 34419 var e = t(32), 34420 i = t(109), 34421 o = t(3), 34422 u = t(67); 34423 t(28) && e(e.P + t(69), "Object", { 34424 __defineSetter__: function __defineSetter__(t, n) { 34425 u.f(i(this), t, { 34426 set: o(n), 34427 enumerable: !0, 34428 configurable: !0 34429 }); 34430 } 34431 }); 34432 }, { 34433 109: 109, 34434 28: 28, 34435 3: 3, 34436 32: 32, 34437 67: 67, 34438 69: 69 34439 }], 34440 267: [function (t, n, r) { 34441 var e = t(32), 34442 i = t(79)(!0); 34443 e(e.S, "Object", { 34444 entries: function entries(t) { 34445 return i(t); 34446 } 34447 }); 34448 }, { 34449 32: 32, 34450 79: 79 34451 }], 34452 268: [function (t, n, r) { 34453 var e = t(32), 34454 i = t(80), 34455 o = t(107), 34456 u = t(70), 34457 c = t(24); 34458 e(e.S, "Object", { 34459 getOwnPropertyDescriptors: function getOwnPropertyDescriptors(t) { 34460 for (var n, r = o(t), e = u.f, f = i(r), a = {}, s = 0; f.length > s;) c(a, n = f[s++], e(r, n)); 34461 return a; 34462 } 34463 }); 34464 }, { 34465 107: 107, 34466 24: 24, 34467 32: 32, 34468 70: 70, 34469 80: 80 34470 }], 34471 269: [function (t, n, r) { 34472 "use strict"; 34473 34474 var e = t(32), 34475 i = t(109), 34476 o = t(110), 34477 u = t(74), 34478 c = t(70).f; 34479 t(28) && e(e.P + t(69), "Object", { 34480 __lookupGetter__: function __lookupGetter__(t) { 34481 var n, 34482 r = i(this), 34483 e = o(t, !0); 34484 do if (n = c(r, e)) return n.get; while (r = u(r)); 34485 } 34486 }); 34487 }, { 34488 109: 109, 34489 110: 110, 34490 28: 28, 34491 32: 32, 34492 69: 69, 34493 70: 70, 34494 74: 74 34495 }], 34496 270: [function (t, n, r) { 34497 "use strict"; 34498 34499 var e = t(32), 34500 i = t(109), 34501 o = t(110), 34502 u = t(74), 34503 c = t(70).f; 34504 t(28) && e(e.P + t(69), "Object", { 34505 __lookupSetter__: function __lookupSetter__(t) { 34506 var n, 34507 r = i(this), 34508 e = o(t, !0); 34509 do if (n = c(r, e)) return n.set; while (r = u(r)); 34510 } 34511 }); 34512 }, { 34513 109: 109, 34514 110: 110, 34515 28: 28, 34516 32: 32, 34517 69: 69, 34518 70: 70, 34519 74: 74 34520 }], 34521 271: [function (t, n, r) { 34522 var e = t(32), 34523 i = t(79)(!1); 34524 e(e.S, "Object", { 34525 values: function values(t) { 34526 return i(t); 34527 } 34528 }); 34529 }, { 34530 32: 32, 34531 79: 79 34532 }], 34533 272: [function (t, n, r) { 34534 "use strict"; 34535 34536 var e = t(32), 34537 i = t(38), 34538 o = t(23), 34539 u = t(64)(), 34540 c = t(117)("observable"), 34541 f = t(3), 34542 a = t(7), 34543 s = t(6), 34544 l = t(86), 34545 h = t(40), 34546 v = t(37), 34547 p = v.RETURN, 34548 d = function d(t) { 34549 return null == t ? void 0 : f(t); 34550 }, 34551 y = function y(t) { 34552 var n = t._c; 34553 n && (t._c = void 0, n()); 34554 }, 34555 g = function g(t) { 34556 return void 0 === t._o; 34557 }, 34558 b = function b(t) { 34559 g(t) || (t._o = void 0, y(t)); 34560 }, 34561 x = function x(t, n) { 34562 a(t), this._c = void 0, this._o = t, t = new m(this); 34563 try { 34564 var r = n(t), 34565 e = r; 34566 null != r && ("function" == typeof r.unsubscribe ? r = function r() { 34567 e.unsubscribe(); 34568 } : f(r), this._c = r); 34569 } catch (n) { 34570 return void t.error(n); 34571 } 34572 g(this) && y(this); 34573 }; 34574 x.prototype = l({}, { 34575 unsubscribe: function unsubscribe() { 34576 b(this); 34577 } 34578 }); 34579 var m = function m(t) { 34580 this._s = t; 34581 }; 34582 m.prototype = l({}, { 34583 next: function next(t) { 34584 var n = this._s; 34585 if (!g(n)) { 34586 var r = n._o; 34587 try { 34588 var e = d(r.next); 34589 if (e) return e.call(r, t); 34590 } catch (t) { 34591 try { 34592 b(n); 34593 } finally { 34594 throw t; 34595 } 34596 } 34597 } 34598 }, 34599 error: function error(t) { 34600 var n = this._s; 34601 if (g(n)) throw t; 34602 var r = n._o; 34603 n._o = void 0; 34604 try { 34605 var e = d(r.error); 34606 if (!e) throw t; 34607 t = e.call(r, t); 34608 } catch (t) { 34609 try { 34610 y(n); 34611 } finally { 34612 throw t; 34613 } 34614 } 34615 return y(n), t;
34616 }, 34617 complete: function complete(t) { 34618 var n = this._s; 34619 if (!g(n)) { 34620 var r = n._o; 34621 n._o = void 0; 34622 try { 34623 var e = d(r.complete); 34624 t = e ? e.call(r, t) : void 0; 34625 } catch (t) { 34626 try { 34627 y(n); 34628 } finally { 34629 throw t; 34630 } 34631 } 34632 return y(n), t; 34633 } 34634 } 34635 }); 34636 var w = function Observable(t) { 34637 s(this, w, "Observable", "_f")._f = f(t); 34638 }; 34639 l(w.prototype, { 34640 subscribe: function subscribe(t) { 34641 return new x(t, this._f); 34642 }, 34643 forEach: function forEach(t) { 34644 var n = this; 34645 return new (o.Promise || i.Promise)(function (r, e) { 34646 f(t); 34647 var i = n.subscribe({ 34648 next: function next(n) { 34649 try { 34650 return t(n); 34651 } catch (t) { 34652 e(t), i.unsubscribe(); 34653 } 34654 }, 34655 error: e, 34656 complete: r 34657 }); 34658 }); 34659 } 34660 }), l(w, { 34661 from: function from(t) { 34662 var n = "function" == typeof this ? this : w, 34663 r = d(a(t)[c]); 34664 if (r) { 34665 var e = a(r.call(t)); 34666 return e.constructor === n ? e : new n(function (t) { 34667 return e.subscribe(t); 34668 }); 34669 } 34670 return new n(function (n) { 34671 var r = !1; 34672 return u(function () { 34673 if (!r) { 34674 try { 34675 if (v(t, !1, function (t) { 34676 if (n.next(t), r) return p; 34677 }) === p) return; 34678 } catch (t) { 34679 if (r) throw t; 34680 return void n.error(t); 34681 } 34682 n.complete(); 34683 } 34684 }), function () { 34685 r = !0; 34686 }; 34687 }); 34688 }, 34689 of: function of() { 34690 for (var t = 0, n = arguments.length, r = Array(n); t < n;) r[t] = arguments[t++]; 34691 return new ("function" == typeof this ? this : w)(function (t) { 34692 var n = !1; 34693 return u(function () { 34694 if (!n) { 34695 for (var e = 0; e < r.length; ++e) if (t.next(r[e]), n) return; 34696 t.complete(); 34697 } 34698 }), function () { 34699 n = !0; 34700 }; 34701 }); 34702 } 34703 }), h(w.prototype, c, function () { 34704 return this; 34705 }), e(e.G, { 34706 Observable: w 34707 }), t(91)("Observable"); 34708 }, { 34709 117: 117, 34710 23: 23, 34711 3: 3, 34712 32: 32, 34713 37: 37, 34714 38: 38, 34715 40: 40, 34716 6: 6, 34717 64: 64, 34718 7: 7, 34719 86: 86, 34720 91: 91 34721 }], 34722 273: [function (t, n, r) { 34723 var e = t(63), 34724 i = t(7), 34725 o = e.key, 34726 u = e.set; 34727 e.exp({ 34728 defineMetadata: function defineMetadata(t, n, r, e) { 34729 u(t, n, i(r), o(e)); 34730 } 34731 }); 34732 }, { 34733 63: 63, 34734 7: 7 34735 }], 34736 274: [function (t, n, r) { 34737 var e = t(63), 34738 i = t(7), 34739 o = e.key, 34740 u = e.map, 34741 c = e.store; 34742 e.exp({ 34743 deleteMetadata: function deleteMetadata(t, n) { 34744 var r = arguments.length < 3 ? void 0 : o(arguments[2]), 34745 e = u(i(n), r, !1); 34746 if (void 0 === e || !e.delete(t)) return !1; 34747 if (e.size) return !0; 34748 var f = c.get(n); 34749 return f.delete(r), !!f.size || c.delete(n); 34750 } 34751 }); 34752 }, { 34753 63: 63, 34754 7: 7 34755 }], 34756 275: [function (t, n, r) { 34757 var e = t(220), 34758 i = t(10), 34759 o = t(63), 34760 u = t(7), 34761 c = t(74), 34762 f = o.keys, 34763 a = o.key, 34764 s = function s(t, n) { 34765 var r = f(t, n), 34766 o = c(t); 34767 if (null === o) return r; 34768 var u = s(o, n); 34769 return u.length ? r.length ? i(new e(r.concat(u))) : u : r; 34770 }; 34771 o.exp({ 34772 getMetadataKeys: function getMetadataKeys(t) { 34773 return s(u(t), arguments.length < 2 ? void 0 : a(arguments[1])); 34774 } 34775 }); 34776 }, { 34777 10: 10, 34778 220: 220, 34779 63: 63, 34780 7: 7, 34781 74: 74 34782 }], 34783 276: [function (t, n, r) { 34784 var e = t(63), 34785 i = t(7), 34786 o = t(74), 34787 u = e.has, 34788 c = e.get, 34789 f = e.key, 34790 a = function a(t, n, r) { 34791 var e = u(t, n, r); 34792 if (e) return c(t, n, r); 34793 var i = o(n); 34794 return null !== i ? a(t, i, r) : void 0; 34795 }; 34796 e.exp({ 34797 getMetadata: function getMetadata(t, n) { 34798 return a(t, i(n), arguments.length < 3 ? void 0 : f(arguments[2])); 34799 } 34800 }); 34801 }, { 34802 63: 63, 34803 7: 7, 34804 74: 74 34805 }], 34806 277: [function (t, n, r) { 34807 var e = t(63), 34808 i = t(7), 34809 o = e.keys, 34810 u = e.key; 34811 e.exp({ 34812 getOwnMetadataKeys: function getOwnMetadataKeys(t) { 34813 return o(i(t), arguments.length < 2 ? void 0 : u(arguments[1])); 34814 } 34815 }); 34816 }, { 34817 63: 63, 34818 7: 7 34819 }], 34820 278: [function (t, n, r) { 34821 var e = t(63), 34822 i = t(7), 34823 o = e.get, 34824 u = e.key; 34825 e.exp({ 34826 getOwnMetadata: function getOwnMetadata(t, n) { 34827 return o(t, i(n), arguments.length < 3 ? void 0 : u(arguments[2])); 34828 } 34829 }); 34830 }, { 34831 63: 63, 34832 7: 7 34833 }], 34834 279: [function (t, n, r) { 34835 var e = t(63), 34836 i = t(7), 34837 o = t(74), 34838 u = e.has, 34839 c = e.key, 34840 f = function f(t, n, r) { 34841 var e = u(t, n, r); 34842 if (e) return !0; 34843 var i = o(n); 34844 return null !== i && f(t, i, r); 34845 }; 34846 e.exp({ 34847 hasMetadata: function hasMetadata(t, n) { 34848 return f(t, i(n), arguments.length < 3 ? void 0 : c(arguments[2])); 34849 } 34850 }); 34851 }, { 34852 63: 63, 34853 7: 7, 34854 74: 74 34855 }], 34856 280: [function (t, n, r) { 34857 var e = t(63), 34858 i = t(7), 34859 o = e.has, 34860 u = e.key; 34861 e.exp({ 34862 hasOwnMetadata: function hasOwnMetadata(t, n) { 34863 return o(t, i(n), arguments.length < 3 ? void 0 : u(arguments[2])); 34864 } 34865 }); 34866 }, { 34867 63: 63, 34868 7: 7 34869 }], 34870 281: [function (t, n, r) { 34871 var e = t(63), 34872 i = t(7), 34873 o = t(3), 34874 u = e.key, 34875 c = e.set; 34876 e.exp({ 34877 metadata: function metadata(t, n) { 34878 return function decorator(r, e) { 34879 c(t, n, (void 0 !== e ? i : o)(r), u(e)); 34880 }; 34881 } 34882 }); 34883 }, { 34884 3: 3, 34885 63: 63, 34886 7: 7 34887 }], 34888 282: [function (t, n, r) { 34889 var e = t(32); 34890 e(e.P + e.R, "Set", { 34891 toJSON: t(20)("Set") 34892 }); 34893 }, { 34894 20: 20, 34895 32: 32 34896 }], 34897 283: [function (t, n, r) { 34898 "use strict"; 34899 34900 var e = t(32), 34901 i = t(97)(!0); 34902 e(e.P, "String", { 34903 at: function at(t) { 34904 return i(this, t); 34905 } 34906 }); 34907 }, { 34908 32: 32, 34909 97: 97 34910 }], 34911 284: [function (t, n, r) { 34912 "use strict"; 34913 34914 var e = t(32), 34915 i = t(27), 34916 o = t(108), 34917 u = t(50), 34918 c = t(36), 34919 f = RegExp.prototype, 34920 a = function a(t, n) { 34921 this._r = t, this._s = n; 34922 }; 34923 t(52)(a, "RegExp String", function next() { 34924 var t = this._r.exec(this._s); 34925 return { 34926 value: t, 34927 done: null === t 34928 }; 34929 }), e(e.P, "String", { 34930 matchAll: function matchAll(t) { 34931 if (i(this), !u(t)) throw TypeError(t + " is not a regexp!"); 34932 var n = String(this), 34933 r = "flags" in f ? String(t.flags) : c.call(t), 34934 e = new RegExp(t.source, ~r.indexOf("g") ? r : "g" + r); 34935 return e.lastIndex = o(t.lastIndex), new a(e, n); 34936 } 34937 }); 34938 }, { 34939 108: 108, 34940 27: 27, 34941 32: 32, 34942 36: 36, 34943 50: 50, 34944 52: 52 34945 }], 34946 285: [function (t, n, r) { 34947 "use strict"; 34948 34949 var e = t(32), 34950 i = t(100); 34951 e(e.P, "String", { 34952 padEnd: function padEnd(t) { 34953 return i(this, t, arguments.length > 1 ? arguments[1] : void 0, !1); 34954 } 34955 }); 34956 }, { 34957 100: 100, 34958 32: 32 34959 }], 34960 286: [function (t, n, r) { 34961 "use strict"; 34962 34963 var e = t(32), 34964 i = t(100); 34965 e(e.P, "String", { 34966 padStart: function padStart(t) { 34967 return i(this, t, arguments.length > 1 ? arguments[1] : void 0, !0); 34968 } 34969 }); 34970 }, { 34971 100: 100, 34972 32: 32 34973 }], 34974 287: [function (t, n, r) { 34975 "use strict"; 34976 34977 t(102)("trimLeft", function (t) { 34978 return function trimLeft() { 34979 return t(this, 1); 34980 }; 34981 }, "trimStart"); 34982 }, { 34983 102: 102 34984 }], 34985 288: [function (t, n, r) { 34986 "use strict"; 34987 34988 t(102)("trimRight", function (t) { 34989 return function trimRight() { 34990 return t(this, 2); 34991 }; 34992 }, "trimEnd"); 34993 }, { 34994 102: 102 34995 }], 34996 289: [function (t, n, r) { 34997 t(115)("asyncIterator"); 34998 }, { 34999 115: 115 35000 }], 35001 290: [function (t, n, r) { 35002 t(115)("observable"); 35003 }, { 35004 115: 115 35005 }], 35006 291: [function (t, n, r) { 35007 var e = t(32); 35008 e(e.S, "System", { 35009 global: t(38) 35010 }); 35011 }, { 35012 32: 32, 35013 38: 38 35014 }], 35015 292: [function (t, n, r) { 35016 for (var e = t(130), i = t(87), o = t(38), u = t(40), c = t(56), f = t(117), a = f("iterator"), s = f("toStringTag"), l = c.Array, h = ["NodeList", "DOMTokenList", "MediaList", "StyleSheetList", "CSSRuleList"], v = 0; v < 5; v++) { 35017 var p, 35018 d = h[v], 35019 y = o[d], 35020 g = y && y.prototype; 35021 if (g) { 35022 g[a] || u(g, a, l), g[s] || u(g, s, d), c[d] = l; 35023 for (p in e) g[p] || i(g, p, e[p], !0); 35024 } 35025 } 35026 }, { 35027 117: 117, 35028 130: 130, 35029 38: 38, 35030 40: 40, 35031 56: 56, 35032 87: 87 35033 }], 35034 293: [function (t, n, r) { 35035 var e = t(32), 35036 i = t(104); 35037 e(e.G + e.B, { 35038 setImmediate: i.set, 35039 clearImmediate: i.clear 35040 }); 35041 }, { 35042 104: 104, 35043 32: 32 35044 }], 35045 294: [function (t, n, r) { 35046 var e = t(38), 35047 i = t(32), 35048 o = t(44), 35049 u = t(83), 35050 c = e.navigator, 35051 f = !!c && /MSIE .\./.test(c.userAgent), 35052 a = function a(t) { 35053 return f ? function (n, r) { 35054 return t(o(u, [].slice.call(arguments, 2), "function" == typeof n ? n : Function(n)), r); 35055 } : t; 35056 }; 35057 i(i.G + i.B + i.F * f, { 35058 setTimeout: a(e.setTimeout), 35059 setInterval: a(e.setInterval) 35060 }); 35061 }, { 35062 32: 32, 35063 38: 38, 35064 44: 44, 35065 83: 83 35066 }], 35067 295: [function (t, n, r) { 35068 t(243), t(180), t(182), t(181), t(184), t(186), t(191), t(185), t(183), t(193), t(192), t(188), t(189), t(187), t(179), t(190), t(194), t(195), t(146), t(148), t(147), t(197), t(196), t(167), t(177), t(178), t(168), t(169), t(170), t(171), t(172), t(173), t(174), t(175), t(176), t(150), t(151), t(152), t(153), t(154), t(155), t(156), t(157), t(158), t(159), t(160), t(161), t(162), t(163), t(164), t(165), t(166), t(230), t(235), t(242), t(233), t(225), t(226), t(231), t(236), t(238), t(221), t(222), t(223), t(224), t(227), t(228), t(229), t(232), t(234), t(237), t(239), t(240), t(241), t(141), t(143), t(142), t(145), t(144), t(129), t(127), t(134), t(131), t(137), t(139), t(126), t(133), t(123), t(138), t(121), t(136), t(135), t(128), t(132), t(120), t(122), t(125), t(124), t(140), t(130), t(213), t(219), t(214), t(215), t(216), t(217), t(218), t(198), t(149), t(220), t(255), t(256), t(244), t(245), t(250), t(253), t(254), t(248), t(251), t(249), t(252), t(246), t(247), t(199), t(200), t(201), t(202), t(203), t(206), t(204), t(205), t(207), t(208), t(209), t(210), t(212), t(211), t(257), t(283), t(286), t(285), t(287), t(288), t(284), t(289), t(290), t(268), t(271), t(267), t(265), t(266), t(269), t(270), t(260), t(282), t(29
350681), t(259), t(261), t(263), t(262), t(264), t(273), t(274), t(276), t(275), t(278), t(277), t(279), t(280), t(281), t(258), t(272), t(294), t(293), t(292), n.exports = t(23); 35069 }, { 35070 120: 120, 35071 121: 121, 35072 122: 122, 35073 123: 123, 35074 124: 124, 35075 125: 125, 35076 126: 126, 35077 127: 127, 35078 128: 128, 35079 129: 129, 35080 130: 130, 35081 131: 131, 35082 132: 132, 35083 133: 133, 35084 134: 134, 35085 135: 135, 35086 136: 136, 35087 137: 137, 35088 138: 138, 35089 139: 139, 35090 140: 140, 35091 141: 141, 35092 142: 142, 35093 143: 143, 35094 144: 144, 35095 145: 145, 35096 146: 146, 35097 147: 147, 35098 148: 148, 35099 149: 149, 35100 150: 150, 35101 151: 151, 35102 152: 152, 35103 153: 153, 35104 154: 154, 35105 155: 155, 35106 156: 156, 35107 157: 157, 35108 158: 158, 35109 159: 159, 35110 160: 160, 35111 161: 161, 35112 162: 162, 35113 163: 163, 35114 164: 164, 35115 165: 165, 35116 166: 166, 35117 167: 167, 35118 168: 168, 35119 169: 169, 35120 170: 170, 35121 171: 171, 35122 172: 172, 35123 173: 173, 35124 174: 174, 35125 175: 175, 35126 176: 176, 35127 177: 177, 35128 178: 178, 35129 179: 179, 35130 180: 180, 35131 181: 181, 35132 182: 182, 35133 183: 183, 35134 184: 184, 35135 185: 185, 35136 186: 186, 35137 187: 187, 35138 188: 188, 35139 189: 189, 35140 190: 190, 35141 191: 191, 35142 192: 192, 35143 193: 193, 35144 194: 194, 35145 195: 195, 35146 196: 196, 35147 197: 197, 35148 198: 198, 35149 199: 199, 35150 200: 200, 35151 201: 201, 35152 202: 202, 35153 203: 203, 35154 204: 204, 35155 205: 205, 35156 206: 206, 35157 207: 207, 35158 208: 208, 35159 209: 209, 35160 210: 210, 35161 211: 211, 35162 212: 212, 35163 213: 213, 35164 214: 214, 35165 215: 215, 35166 216: 216, 35167 217: 217, 35168 218: 218, 35169 219: 219, 35170 220: 220, 35171 221: 221, 35172 222: 222, 35173 223: 223, 35174 224: 224, 35175 225: 225, 35176 226: 226, 35177 227: 227, 35178 228: 228, 35179 229: 229, 35180 23: 23, 35181 230: 230, 35182 231: 231, 35183 232: 232, 35184 233: 233, 35185 234: 234, 35186 235: 235, 35187 236: 236, 35188 237: 237, 35189 238: 238, 35190 239: 239, 35191 240: 240, 35192 241: 241, 35193 242: 242, 35194 243: 243, 35195 244: 244, 35196 245: 245, 35197 246: 246, 35198 247: 247, 35199 248: 248, 35200 249: 249, 35201 250: 250, 35202 251: 251, 35203 252: 252, 35204 253: 253, 35205 254: 254, 35206 255: 255, 35207 256: 256, 35208 257: 257, 35209 258: 258, 35210 259: 259, 35211 260: 260, 35212 261: 261, 35213 262: 262, 35214 263: 263, 35215 264: 264, 35216 265: 265, 35217 266: 266, 35218 267: 267, 35219 268: 268, 35220 269: 269, 35221 270: 270, 35222 271: 271, 35223 272: 272, 35224 273: 273, 35225 274: 274, 35226 275: 275, 35227 276: 276, 35228 277: 277, 35229 278: 278, 35230 279: 279, 35231 280: 280, 35232 281: 281, 35233 282: 282, 35234 283: 283, 35235 284: 284, 35236 285: 285, 35237 286: 286, 35238 287: 287, 35239 288: 288, 35240 289: 289, 35241 290: 290, 35242 291: 291, 35243 292: 292, 35244 293: 293, 35245 294: 294 35246 }], 35247 296: [function (t, n, r) { 35248 (function (t) { 35249 !function (t) { 35250 "use strict"; 35251 35252 function wrap(t, n, r, e) { 35253 var i = n && n.prototype instanceof Generator ? n : Generator, 35254 o = Object.create(i.prototype), 35255 u = new Context(e || []); 35256 return o._invoke = makeInvokeMethod(t, r, u), o; 35257 } 35258 function tryCatch(t, n, r) { 35259 try { 35260 return { 35261 type: "normal", 35262 arg: t.call(n, r) 35263 }; 35264 } catch (t) { 35265 return { 35266 type: "throw", 35267 arg: t 35268 }; 35269 } 35270 } 35271 function Generator() {} 35272 function GeneratorFunction() {} 35273 function GeneratorFunctionPrototype() {} 35274 function defineIteratorMethods(t) { 35275 ["next", "throw", "return"].forEach(function (n) { 35276 t[n] = function (t) { 35277 return this._invoke(n, t); 35278 }; 35279 }); 35280 } 35281 function AsyncIterator(t) { 35282 function invoke(n, r, e, o) { 35283 var u = tryCatch(t[n], t, r); 35284 if ("throw" !== u.type) { 35285 var c = u.arg, 35286 f = c.value; 35287 return f && "object" == _typeof(f) && i.call(f, "__await") ? Promise.resolve(f.__await).then(function (t) { 35288 invoke("next", t, e, o); 35289 }, function (t) { 35290 invoke("throw", t, e, o); 35291 }) : Promise.resolve(f).then(function (t) { 35292 c.value = t, e(c); 35293 }, o); 35294 } 35295 o(u.arg); 35296 } 35297 function enqueue(t, r) { 35298 function callInvokeWithMethodAndArg() { 35299 return new Promise(function (n, e) { 35300 invoke(t, r, n, e); 35301 }); 35302 } 35303 return n = n ? n.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); 35304 } 35305 "object" == (typeof process === "undefined" ? "undefined" : _typeof(process)) && process.domain && (invoke = process.domain.bind(invoke)); 35306 var n; 35307 this._invoke = enqueue; 35308 } 35309 function makeInvokeMethod(t, n, e) { 35310 var i = s; 35311 return function invoke(o, u) { 35312 if (i === h) throw new Error("Generator is already running"); 35313 if (i === v) { 35314 if ("throw" === o) throw u; 35315 return doneResult(); 35316 } 35317 for (;;) { 35318 var c = e.delegate; 35319 if (c) { 35320 if ("return" === o || "throw" === o && c.iterator[o] === r) { 35321 e.delegate = null; 35322 var f = c.iterator.return; 35323 if (f) { 35324 var a = tryCatch(f, c.iterator, u); 35325 if ("throw" === a.type) { 35326 o = "throw", u = a.arg; 35327 continue; 35328 } 35329 } 35330 if ("return" === o) continue; 35331 } 35332 var a = tryCatch(c.iterator[o], c.iterator, u); 35333 if ("throw" === a.type) { 35334 e.delegate = null, o = "throw", u = a.arg; 35335 continue; 35336 } 35337 o = "next", u = r; 35338 var d = a.arg; 35339 if (!d.done) return i = l, d; 35340 e[c.resultName] = d.value, e.next = c.nextLoc, e.delegate = null; 35341 } 35342 if ("next" === o) e.sent = e._sent = u;else if ("throw" === o) { 35343 if (i === s) throw i = v, u; 35344 e.dispatchException(u) && (o = "next", u = r); 35345 } else "return" === o && e.abrupt("return", u); 35346 i = h; 35347 var a = tryCatch(t, n, e); 35348 if ("normal" === a.type) { 35349 i = e.done ? v : l; 35350 var d = { 35351 value: a.arg, 35352 done: e.done 35353 }; 35354 if (a.arg !== p) return d; 35355 e.delegate && "next" === o && (u = r); 35356 } else "throw" === a.type && (i = v, o = "throw", u = a.arg); 35357 } 35358 }; 35359 } 35360 function pushTryEntry(t) { 35361 var n = { 35362 tryLoc: t[0] 35363 }; 35364 1 in t && (n.catchLoc = t[1]), 2 in t && (n.finallyLoc = t[2], n.afterLoc = t[3]), this.tryEntries.push(n); 35365 } 35366 function resetTryEntry(t) { 35367 var n = t.completion || {}; 35368 n.type = "normal", delete n.arg, t.completion = n; 35369 } 35370 function Context(t) { 35371 this.tryEntries = [{ 35372 tryLoc: "root" 35373 }], t.forEach(pushTryEntry, this), this.reset(!0); 35374 } 35375 function values(t) { 35376 if (t) { 35377 var n = t[u]; 35378 if (n) return n.call(t); 35379 if ("function" == typeof t.next) return t; 35380 if (!isNaN(t.length)) { 35381 var e = -1, 35382 o = function next() { 35383 for (; ++e < t.length;) if (i.call(t, e)) return next.value = t[e], next.done = !1, next; 35384 return next.value = r, next.done = !0, next; 35385 }; 35386 return o.next = o; 35387 } 35388 } 35389 return { 35390 next: doneResult 35391 }; 35392 } 35393 function doneResult() { 35394 return { 35395 value: r, 35396 done: !0 35397 }; 35398 } 35399 var r, 35400 e = Object.prototype, 35401 i = e.hasOwnProperty, 35402 o = "function" == typeof Symbol ? Symbol : {}, 35403 u = o.iterator || "@@iterator", 35404 c = o.toStringTag || "@@toStringTag", 35405 f = "object" == _typeof(n), 35406 a = t.regeneratorRuntime; 35407 if (a) return void (f && (n.exports = a)); 35408 a = t.regeneratorRuntime = f ? n.exports : {}, a.wrap = wrap; 35409 var s = "suspendedStart", 35410 l = "suspendedYield", 35411 h = "executing", 35412 v = "completed", 35413 p = {}, 35414 d = {}; 35415 d[u] = function () { 35416 return this; 35417 }; 35418 var y = Object.getPrototypeOf, 35419 g = y && y(y(values([]))); 35420 g && g !== e && i.call(g, u) && (d = g); 35421 var b = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(d); 35422 GeneratorFunction.prototype = b.constructor = GeneratorFunctionPrototype, GeneratorFunctionPrototype.constructor = GeneratorFunction, GeneratorFunctionPrototype[c] = GeneratorFunction.displayName = "GeneratorFunction", a.isGeneratorFunction = function (t) { 35423 var n = "function" == typeof t && t.constructor; 35424 return !!n && (n === GeneratorFunction || "GeneratorFunction" === (n.displayName || n.name)); 35425 }, a.mark = function (t) { 35426 return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, c in t || (t[c] = "GeneratorFunction")), t.prototype = Object.create(b), t; 35427 }, a.awrap = function (t) { 35428 return { 35429 __await: t 35430 }; 35431 }, defineIteratorMethods(AsyncIterator.prototype), a.AsyncIterator = AsyncIterator, a.async = function (t, n, r, e) { 35432 var i = new AsyncIterator(wrap(t, n, r, e)); 35433 return a.isGeneratorFunction(n) ? i : i.next().then(function (t) { 35434 return t.done ? t.value : i.next(); 35435 }); 35436 }, defineIteratorMethods(b), b[c] = "Generator", b.toString = function () { 35437 return "[object Generator]"; 35438 }, a.keys = function (t) { 35439 var n = [];
35440 for (var r in t) n.push(r); 35441 return n.reverse(), function next() { 35442 for (; n.length;) { 35443 var r = n.pop(); 35444 if (r in t) return next.value = r, next.done = !1, next; 35445 } 35446 return next.done = !0, next; 35447 }; 35448 }, a.values = values, Context.prototype = { 35449 constructor: Context, 35450 reset: function reset(t) { 35451 if (this.prev = 0, this.next = 0, this.sent = this._sent = r, this.done = !1, this.delegate = null, this.tryEntries.forEach(resetTryEntry), !t) for (var n in this) "t" === n.charAt(0) && i.call(this, n) && !isNaN(+n.slice(1)) && (this[n] = r); 35452 }, 35453 stop: function stop() { 35454 this.done = !0; 35455 var t = this.tryEntries[0], 35456 n = t.completion; 35457 if ("throw" === n.type) throw n.arg; 35458 return this.rval; 35459 }, 35460 dispatchException: function dispatchException(t) { 35461 function handle(r, e) { 35462 return o.type = "throw", o.arg = t, n.next = r, !!e; 35463 } 35464 if (this.done) throw t; 35465 for (var n = this, r = this.tryEntries.length - 1; r >= 0; --r) { 35466 var e = this.tryEntries[r], 35467 o = e.completion; 35468 if ("root" === e.tryLoc) return handle("end"); 35469 if (e.tryLoc <= this.prev) { 35470 var u = i.call(e, "catchLoc"), 35471 c = i.call(e, "finallyLoc"); 35472 if (u && c) { 35473 if (this.prev < e.catchLoc) return handle(e.catchLoc, !0); 35474 if (this.prev < e.finallyLoc) return handle(e.finallyLoc); 35475 } else if (u) { 35476 if (this.prev < e.catchLoc) return handle(e.catchLoc, !0); 35477 } else { 35478 if (!c) throw new Error("try statement without catch or finally"); 35479 if (this.prev < e.finallyLoc) return handle(e.finallyLoc); 35480 } 35481 } 35482 } 35483 }, 35484 abrupt: function abrupt(t, n) { 35485 for (var r = this.tryEntries.length - 1; r >= 0; --r) { 35486 var e = this.tryEntries[r]; 35487 if (e.tryLoc <= this.prev && i.call(e, "finallyLoc") && this.prev < e.finallyLoc) { 35488 var o = e; 35489 break; 35490 } 35491 } 35492 o && ("break" === t || "continue" === t) && o.tryLoc <= n && n <= o.finallyLoc && (o = null); 35493 var u = o ? o.completion : {}; 35494 return u.type = t, u.arg = n, o ? this.next = o.finallyLoc : this.complete(u), p; 35495 }, 35496 complete: function complete(t, n) { 35497 if ("throw" === t.type) throw t.arg; 35498 "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = t.arg, this.next = "end") : "normal" === t.type && n && (this.next = n); 35499 }, 35500 finish: function finish(t) { 35501 for (var n = this.tryEntries.length - 1; n >= 0; --n) { 35502 var r = this.tryEntries[n]; 35503 if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), p; 35504 } 35505 }, 35506 catch: function _catch(t) { 35507 for (var n = this.tryEntries.length - 1; n >= 0; --n) { 35508 var r = this.tryEntries[n]; 35509 if (r.tryLoc === t) { 35510 var e = r.completion; 35511 if ("throw" === e.type) { 35512 var i = e.arg; 35513 resetTryEntry(r); 35514 } 35515 return i; 35516 } 35517 } 35518 throw new Error("illegal catch attempt"); 35519 }, 35520 delegateYield: function delegateYield(t, n, r) { 35521 return this.delegate = { 35522 iterator: values(t), 35523 resultName: n, 35524 nextLoc: r 35525 }, p; 35526 } 35527 }; 35528 }("object" == _typeof(t) ? t : "object" == (typeof window === "undefined" ? "undefined" : _typeof(window)) ? window : "object" == (typeof self === "undefined" ? "undefined" : _typeof(self)) ? self : this); 35529 }).call(this, "undefined" != typeof global ? global : "undefined" != typeof self ? self : "undefined" != typeof window ? window : {}); 35530 }, {}] 35531}, {}, [1]); 35532/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node_modules/webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js"), __webpack_require__(/*! ./../../../node_modules/process/browser.js */ "./node_modules/process/browser.js"))) 35533 35534/***/ })
35534, 35535 35536/***/ 0: 35537/*!*******************************!*\ 35538 !*** multi ./src/js/index.js ***! 35539 \*******************************/ 35540/*! no static exports found */ 35541/***/ (function(module, exports, __webpack_require__) { 35542 35543module.exports = __webpack_require__(/*! ./src/js/index.js */"./src/js/index.js"); 35544 35545 35546/***/ }) 35547 35548/******/ });
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.