vendor: 3,594 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 = ""; 81/******/ 82/******/ 83/******/ // Load entry module and return exports 84/******/ return __webpack_require__(__webpack_require__.s = 0); 85/******/ }) 86/************************************************************************/ 87/******/ ({ 88
vendor: 545 bytes, lines 89-103
89/***/ "../../../../../node_modules/es6-object-assign/auto.js": 90/*!*********************************************************************************!*\ 91 !*** /Users/mauro/Sites/eternalsunspire/node_modules/es6-object-assign/auto.js ***! 92 \*********************************************************************************/ 93/*! no static exports found */ 94/***/ (function(module, exports, __webpack_require__) { 95 96"use strict"; 97 98 99__webpack_require__(/*! ./index */ "../../../../../node_modules/es6-object-assign/index.js").polyfill(); 100 101 102/***/ }), 103
vendor: 1,593 bytes, lines 104-161
104/***/ "../../../../../node_modules/es6-object-assign/index.js": 105/*!**********************************************************************************!*\ 106 !*** /Users/mauro/Sites/eternalsunspire/node_modules/es6-object-assign/index.js ***! 107 \**********************************************************************************/ 108/*! no static exports found */ 109/***/ (function(module, exports, __webpack_require__) { 110 111"use strict"; 112/** 113 * Code refactored from Mozilla Developer Network: 114 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign 115 */ 116 117 118 119function assign(target, firstSource) { 120 if (target === undefined || target === null) { 121 throw new TypeError('Cannot convert first argument to object'); 122 } 123 124 var to = Object(target); 125 for (var i = 1; i < arguments.length; i++) { 126 var nextSource = arguments[i]; 127 if (nextSource === undefined || nextSource === null) { 128 continue; 129 } 130 131 var keysArray = Object.keys(Object(nextSource)); 132 for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { 133 var nextKey = keysArray[nextIndex]; 134 var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); 135 if (desc !== undefined && desc.enumerable) { 136 to[nextKey] = nextSource[nextKey]; 137 } 138 } 139 } 140 return to; 141} 142 143function polyfill() { 144 if (!Object.assign) { 145 Object.defineProperty(Object, 'assign', { 146 enumerable: false, 147 configurable: true, 148 writable: true, 149 value: assign 150 }); 151 } 152} 153 154module.exports = { 155 assign: assign, 156 polyfill: polyfill 157}; 158 159 160/***/ }), 161
vendor: 1,975 bytes, lines 162-220
162/***/ "../../../../../node_modules/gsap/AttrPlugin.js": 163/*!**************************************************************************!*\ 164 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/AttrPlugin.js ***! 165 \**************************************************************************/ 166/*! exports provided: AttrPlugin, default */ 167/***/ (function(module, __webpack_exports__, __webpack_require__) { 168 169"use strict"; 170__webpack_require__.r(__webpack_exports__); 171/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AttrPlugin", function() { return AttrPlugin; }); 172/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return AttrPlugin; }); 173/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 174/*! 175 * VERSION: 0.6.1 176 * DATE: 2018-08-27 177 * UPDATES AND DOCS AT: http://greensock.com 178 * 179 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 180 * This work is subject to the terms at http://greensock.com/standard-license or for 181 * Club GreenSock members, the software agreement that was issued with your membership. 182 * 183 * @author: Jack Doyle, [email protected] 184 */ 185/* eslint-disable */ 186 187 188 189var AttrPlugin = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine.plugin({ 190 propName: "attr", 191 API: 2, 192 version: "0.6.1", 193 194 //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run. 195 init: function(target, value, tween, index) { 196 var p, end; 197 if (typeof(target.setAttribute) !== "function") { 198 return false; 199 } 200 for (p in value) { 201 end = value[p]; 202 if (typeof(end) === "function") { 203 end = end(index, target); 204 } 205 this._addTween(target, "setAttribute", target.getAttribute(p) + "", end + "", p, false, p); 206 this._overwriteProps.push(p); 207 } 208 return true; 209 } 210 211}); 212 213 214 215 216 217 218 219/***/ }), 220
vendor: 20,566 bytes, lines 221-839
221/***/ "../../../../../node_modules/gsap/BezierPlugin.js": 222/*!****************************************************************************!*\ 223 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/BezierPlugin.js ***! 224 \****************************************************************************/ 225/*! exports provided: BezierPlugin, default */ 226/***/ (function(module, __webpack_exports__, __webpack_require__) { 227 228"use strict"; 229__webpack_require__.r(__webpack_exports__); 230/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BezierPlugin", function() { return BezierPlugin; }); 231/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return BezierPlugin; }); 232/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 233/*! 234 * VERSION: 1.3.9 235 * DATE: 2019-05-17 236 * UPDATES AND DOCS AT: http://greensock.com 237 * 238 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 239 * This work is subject to the terms at http://greensock.com/standard-license or for 240 * Club GreenSock members, the software agreement that was issued with your membership. 241 * 242 * @author: Jack Doyle, [email protected] 243 **/ 244/* eslint-disable */ 245 246 247 var _RAD2DEG = 180 / Math.PI, 248 _r1 = [], 249 _r2 = [], 250 _r3 = [], 251 _corProps = {}, 252 _globals = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine.globals, 253 Segment = function(a, b, c, d) { 254 if (c === d) { //if c and d match, the final autoRotate value could lock at -90 degrees, so differentiate them slightly. 255 c = d - (d - b) / 1000000; 256 } 257 if (a === b) { //if a and b match, the starting autoRotate value could lock at -90 degrees, so differentiate them slightly. 258 b = a + (c - a) / 1000000; 259 } 260 this.a = a; 261 this.b = b; 262 this.c = c; 263 this.d = d; 264 this.da = d - a; 265 this.ca = c - a; 266 this.ba = b - a; 267 }, 268 _correlate = ",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,", 269 cubicToQuadratic = function(a, b, c, d) { 270 var q1 = {a:a}, 271 q2 = {}, 272 q3 = {}, 273 q4 = {c:d}, 274 mab = (a + b) / 2, 275 mbc = (b + c) / 2, 276 mcd = (c + d) / 2, 277 mabc = (mab + mbc) / 2, 278 mbcd = (mbc + mcd) / 2, 279 m8 = (mbcd - mabc) / 8; 280 q1.b = mab + (a - mab) / 4; 281 q2.b = mabc + m8; 282 q1.c = q2.a = (q1.b + q2.b) / 2; 283 q2.c = q3.a = (mabc + mbcd) / 2; 284 q3.b = mbcd - m8; 285 q4.b = mcd + (d - mcd) / 4; 286 q3.c = q4.a = (q3.b + q4.b) / 2; 287 return [q1, q2, q3, q4]; 288 }, 289 _calculateControlPoints = function(a, curviness, quad, basic, correlate) { 290 var l = a.length - 1, 291 ii = 0, 292 cp1 = a[0].a, 293 i, p1, p2, p3, seg, m1, m2, mm, cp2, qb, r1, r2, tl; 294 for (i = 0; i < l; i++) { 295 seg = a[ii]; 296 p1 = seg.a; 297 p2 = seg.d; 298 p3 = a[ii+1].d; 299 300 if (correlate) { 301 r1 = _r1[i]; 302 r2 = _r2[i]; 303 tl = ((r2 + r1) * curviness * 0.25) / (basic ? 0.5 : _r3[i] || 0.5); 304 m1 = p2 - (p2 - p1) * (basic ? curviness * 0.5 : (r1 !== 0 ? tl / r1 : 0)); 305 m2 = p2 + (p3 - p2) * (basic ? curviness * 0.5 : (r2 !== 0 ? tl / r2 : 0)); 306 mm = p2 - (m1 + (((m2 - m1) * ((r1 * 3 / (r1 + r2)) + 0.5) / 4) || 0)); 307 } else { 308 m1 = p2 - (p2 - p1) * curviness * 0.5; 309 m2 = p2 + (p3 - p2) * curviness * 0.5; 310 mm = p2 - (m1 + m2) / 2; 311 } 312 m1 += mm; 313 m2 += mm; 314 315 seg.c = cp2 = m1; 316 if (i !== 0) { 317 seg.b = cp1; 318 } else { 319 seg.b = cp1 = seg.a + (seg.c - seg.a) * 0.6; //instead of placing b on a exactly, we move it inline with c so that if the user specifies an ease like Back.easeIn or Elastic.easeIn which goes BEYOND the beginning, it will do so smoothly. 320 } 321 322 seg.da = p2 - p1; 323 seg.ca = cp2 - p1; 324 seg.ba = cp1 - p1; 325 326 if (quad) { 327 qb = cubicToQuadratic(p1, cp1, cp2, p2); 328 a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]); 329 ii += 4; 330 } else { 331 ii++; 332 } 333 334 cp1 = m2; 335 } 336 seg = a[ii]; 337 seg.b = cp1; 338 seg.c = cp1 + (seg.d - cp1) * 0.4; //instead of placing c on d exactly, we move it inline with b so that if the user specifies an ease like Back.easeOut or Elastic.easeOut which goes BEYOND the end, it will do so smoothly. 339 seg.da = seg.d - seg.a; 340 seg.ca = seg.c - seg.a; 341 seg.ba = cp1 - seg.a; 342 if (quad) { 343 qb = cubicToQuadratic(seg.a, cp1, seg.c, seg.d); 344 a.splice(ii, 1, qb[0], qb[1], qb[2], qb[3]); 345 } 346 }, 347 _parseAnchors = function(values, p, correlate, prepend) { 348 var a = [], 349 l, i, p1, p2, p3, tmp; 350 if (prepend) { 351 values = [prepend].concat(values); 352 i = values.length; 353 while (--i > -1) { 354 if (typeof( (tmp = values[i][p]) ) === "string") if (tmp.charAt(1) === "=") { 355 values[i][p] = prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)); //accommodate relative values. Do it inline instead of breaking it out into a function for speed reasons 356 } 357 } 358 } 359 l = values.length - 2; 360 if (l < 0) { 361 a[0] = new Segment(values[0][p], 0, 0, values[0][p]); 362 return a; 363 } 364 for (i = 0; i < l; i++) { 365 p1 = values[i][p]; 366 p2 = values[i+1][p]; 367 a[i] = new Segment(p1, 0, 0, p2); 368 if (correlate) { 369 p3 = values[i+2][p]; 370 _r1[i] = (_r1[i] || 0) + (p2 - p1) * (p2 - p1); 371 _r2[i] = (_r2[i] || 0) + (p3 - p2) * (p3 - p2); 372 } 373 } 374 a[i] = new Segment(values[i][p], 0, 0, values[i+1][p]); 375 return a; 376 }, 377 bezierThrough = function(values, curviness, quadratic, basic, correlate, prepend) { 378 var obj = {}, 379 props = [], 380 first = prepend || values[0], 381 i, p, a, j, r, l, seamless, last; 382 correlate = (typeof(correlate) === "string") ? ","+correlate+"," : _correlate; 383 if (curviness == null) { 384 curviness = 1; 385 } 386 for (p in values[0]) { 387 props.push(p); 388 } 389 //check to see if the last and first values are identical (well, within 0.05). If so, make seamless by appending the second element to the very end of the values array and the 2nd-to-last element to the very beginning (we'll remove those segments later) 390 if (values.length > 1) { 391 last = values[values.length - 1]; 392 seamless = true; 393 i = props.length; 394 while (--i > -1) { 395 p = props[i]; 396 if (Math.abs(first[p] - last[p]) > 0.05) { //build in a tolerance of +/-0.05 to accommodate rounding errors. 397 seamless = false; 398 break; 399 } 400 } 401 if (seamless) { 402 values = values.concat(); //duplicate the array to avoid contaminating the original which the user may be reusing for other tweens 403 if (prepend) { 404 values.unshift(prepend); 405 } 406 values.push(values[1]); 407 prepend = values[values.length - 3]; 408 } 409 } 410 _r1.length = _r2.length = _r3.length = 0; 411 i = props.length; 412 while (--i > -1) { 413 p = props[i]; 414 _corProps[p] = (correlate.indexOf(","+p+",") !== -1); 415 obj[p] = _parseAnchors(values, p, _corProps[p], prepend); 416 } 417 i = _r1.length; 418 while (--i > -1) { 419 _r1[i] = Math.sqrt(_r1[i]); 420 _r2[i] = Math.sqrt(_r2[i]); 421 } 422 if (!basic) { 423 i = props.length; 424 while (--i > -1) { 425 if (_corProps[p]) { 426 a = obj[props[i]]; 427 l = a.length - 1; 428 for (j = 0; j < l; j++) { 429 r = (a[j+1].da / _r2[j] + a[j].da / _r1[j]) || 0; 430 _r3[j] = (_r3[j] || 0) + r * r; 431 } 432 } 433 } 434 i = _r3.length; 435 while (--i > -1) { 436 _r3[i] = Math.sqrt(_r3[i]); 437 } 438 } 439 i = props.length; 440 j = quadratic ? 4 : 1; 441 while (--i > -1) { 442 p = props[i]; 443 a = obj[p]; 444 _calculateControlPoints(a, curviness, quadratic, basic, _corProps[p]); //this method requires that _parseAnchors() and _setSegmentRatios() ran first so that _r1, _r2, and _r3 values are populated for all properties 445 if (seamless) { 446 a.splice(0, j); 447 a.splice(a.length - j, j); 448 } 449 } 450 return obj; 451 }, 452 _parseBezierData = function(values, type, prepend) { 453 type = type || "soft"; 454 var obj = {}, 455 inc = (type === "cubic") ? 3 : 2, 456 soft = (type === "soft"), 457 props = [], 458 a, b, c, d, cur, i, j, l, p, cnt, tmp; 459 if (soft && prepend) { 460 values = [prepend].concat(values); 461 } 462 if (values == null || values.length < inc + 1) { throw "invalid Bezier data"; } 463 for (p in values[0]) { 464 props.push(p); 465 } 466 i = props.length; 467 while (--i > -1) { 468 p = props[i]; 469 obj[p] = cur = []; 470 cnt = 0; 471 l = values.length; 472 for (j = 0; j < l; j++) { 473 a = (prepend == null) ? values[j][p] : (typeof( (tmp = values[j][p]) ) === "string" && tmp.charAt(1) === "=") ? prepend[p] + Number(tmp.charAt(0) + tmp.substr(2)) : Number(tmp); 474 if (soft) if (j > 1) if (j < l - 1) { 475 cur[cnt++] = (a + cur[cnt-2]) / 2; 476 } 477 cur[cnt++] = a; 478 } 479 l = cnt - inc + 1; 480 cnt = 0; 481 for (j = 0; j < l; j += inc) { 482 a = cur[j]; 483 b = cur[j+1]; 484 c = cur[j+2]; 485 d = (inc === 2) ? 0 : cur[j+3]; 486 cur[cnt++] = tmp = (inc === 3) ? new Segment(a, b, c, d) : new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c); 487 } 488 cur.length = cnt; 489 } 490 return obj; 491 }, 492 _addCubicLengths = function(a, steps, resolution) { 493 var inc = 1 / resolution, 494 j = a.length, 495 d, d1, s, da, ca, ba, p, i, inv, bez, index; 496 while (--j > -1) { 497 bez = a[j]; 498 s = bez.a; 499 da = bez.d - s; 500 ca = bez.c - s; 501 ba = bez.b - s; 502 d = d1 = 0; 503 for (i = 1; i <= resolution; i++) { 504 p = inc * i; 505 inv = 1 - p; 506 d = d1 - (d1 = (p * p * da + 3 * inv * (p * ca + inv * ba)) * p); 507 index = j * resolution + i - 1; 508 steps[index] = (steps[index] || 0) + d * d; 509 } 510 } 511 }, 512 _parseLengthData = function(obj, resolution) { 513 resolution = resolution >> 0 || 6; 514 var a = [], 515 lengths = [], 516 d = 0, 517 total = 0, 518 threshold = resolution - 1, 519 segments = [], 520 curLS = [], //current length segments array 521 p, i, l, index; 522 for (p in obj) { 523 _addCubicLengths(obj[p], a, resolution); 524 } 525 l = a.length; 526 for (i = 0; i < l; i++) { 527 d += Math.sqrt(a[i]); 528 index = i % resolution; 529 curLS[index] = d; 530 if (index === threshold) { 531 total += d; 532 index = (i / resolution) >> 0; 533 segments[index] = curLS; 534 lengths[index] = total; 535 d = 0; 536 curLS = []; 537 } 538 } 539 return {length:total, lengths:lengths, segments:segments}; 540 }, 541 542 543 544 BezierPlugin = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine.plugin({ 545 propName: "bezier", 546 priority: -1, 547 version: "1.3.9", 548 API: 2, 549 global:true, 550 551 //gets called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run. 552 init: function(target, vars, tween) { 553 this._target = target; 554 if (vars instanceof Array) { 555 vars = {values:vars}; 556 } 557 this._func = {}; 558 this._mod = {}; 559 this._props = []; 560 this._timeRes = (vars.timeResolution == null) ? 6 : parseInt(vars.timeResolution, 10); 561 var values = vars.values || [], 562 first = {}, 563 second = values[0], 564 autoRotate = vars.autoRotate || tween.vars.orientToBezier, 565 p, isFunc, i, j, prepend; 566 567 this._autoRotate = autoRotate ? (autoRotate instanceof Array) ? autoRotate : [["x","y","rotation",((autoRotate === true) ? 0 : Number(autoRotate) || 0)]] : null; 568 for (p in second) { 569 this._props.push(p); 570 } 571 572 i = this._props.length; 573 while (--i > -1) { 574 p = this._props[i]; 575 576 this._overwriteProps.push(p); 577 isFunc = this._func[p] = (typeof(target[p]) === "function"); 578 first[p] = (!isFunc) ? parseFloat(target[p]) : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ](); 579 if (!prepend) if (first[p] !== values[0][p]) { 580 prepend = first; 581 } 582 } 583 this._beziers = (vars.type !== "cubic" && vars.type !== "quadratic" && vars.type !== "soft") ? bezierThrough(values, isNaN(vars.curviness) ? 1 : vars.curviness, false, (vars.type === "thruBasic"), vars.correlate, prepend) : _parseBezierData(values, vars.type, first); 584 this._segCount = this._beziers[p].length; 585 586 if (this._timeRes) { 587 var ld = _parseLengthData(this._beziers, this._timeRes); 588 this._length = ld.length; 589 this._lengths = ld.lengths; 590 this._segments = ld.segments; 591 this._l1 = this._li = this._s1 = this._si = 0; 592 this._l2 = this._lengths[0]; 593 this._curSeg = this._segments[0]; 594 this._s2 = this._curSeg[0]; 595 this._prec = 1 / this._curSeg.length; 596 } 597 598 if ((autoRotate = this._autoRotate)) { 599 this._initialRotations = []; 600 if (!(autoRotate[0] instanceof Array)) { 601 this._autoRotate = autoRotate = [autoRotate]; 602 } 603 i = autoRotate.length; 604 while (--i > -1) { 605 for (j = 0; j < 3; j++) { 606 p = autoRotate[i][j]; 607 this._func[p] = (typeof(target[p]) === "function") ? target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ] : false; 608 } 609 p = autoRotate[i][2]; 610 this._initialRotations[i] = (this._func[p] ? this._func[p].call(this._target) : this._target[p]) || 0; 611 this._overwriteProps.push(p); 612 } 613 } 614 this._startRatio = tween.vars.runBackwards ? 1 : 0; //we determine the starting ratio when the tween inits which is always 0 unless the tween has runBackwards:true (indicating it's a from() tween) in which case it's 1. 615 return true; 616 }, 617 618 //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.) 619 set: function(v) { 620 var segments = this._segCount, 621 func = this._func, 622 target = this._target, 623 notStart = (v !== this._startRatio), 624 curIndex, inv, i, p, b, t, val, l, lengths, curSeg, v1; 625 if (!this._timeRes) { 626 curIndex = (v < 0) ? 0 : (v >= 1) ? segments - 1 : (segments * v) >> 0; 627 t = (v - (curIndex * (1 / segments))) * segments; 628 } else { 629 lengths = this._lengths; 630 curSeg = this._curSeg; 631 v1 = v * this._length; 632 i = this._li; 633 //find the appropriate segment (if the currently cached one isn't correct) 634 if (v1 > this._l2 && i < segments - 1) { 635 l = segments - 1; 636 while (i < l && (this._l2 = lengths[++i]) <= v1) { } 637 this._l1 = lengths[i-1]; 638 this._li = i; 639 this._curSeg = curSeg = this._segments[i]; 640 this._s2 = curSeg[(this._s1 = this._si = 0)]; 641 } else if (v1 < this._l1 && i > 0) { 642 while (i > 0 && (this._l1 = lengths[--i]) >= v1) { } 643 if (i === 0 && v1 < this._l1) { 644 this._l1 = 0; 645 } else { 646 i++; 647 } 648 this._l2 = lengths[i]; 649 this._li = i; 650 this._curSeg = curSeg = this._segments[i]; 651 this._s1 = curSeg[(this._si = curSeg.length - 1) - 1] || 0; 652 this._s2 = curSeg[this._si]; 653 } 654 curIndex = i; 655 //now find the appropriate sub-segment (we split it into the number of pieces that was defined by "precision" and measured each one) 656 v1 -= this._l1; 657 i = this._si; 658 if (v1 > this._s2 && i < curSeg.length - 1) { 659 l = curSeg.length - 1; 660 while (i < l && (this._s2 = curSeg[++i]) <= v1) { } 661 this._s1 = curSeg[i-1]; 662 this._si = i; 663 } else if (v1 < this._s1 && i > 0) { 664 while (i > 0 && (this._s1 = curSeg[--i]) >= v1) { } 665 if (i === 0 && v1 < this._s1) { 666 this._s1 = 0; 667 } else { 668 i++; 669 } 670 this._s2 = curSeg[i]; 671 this._si = i; 672 } 673 t = (v === 1) ? 1 : ((i + (v1 - this._s1) / (this._s2 - this._s1)) * this._prec) || 0; 674 } 675 inv = 1 - t; 676 677 i = this._props.length; 678 while (--i > -1) { 679 p = this._props[i]; 680 b = this._beziers[p][curIndex]; 681 val = (t * t * b.da + 3 * inv * (t * b.ca + inv * b.ba)) * t + b.a; 682 if (this._mod[p]) { 683 val = this._mod[p](val, target); 684 } 685 if (func[p]) { 686 target[p](val); 687 } else { 688 target[p] = val; 689 } 690 } 691 692 if (this._autoRotate) { 693 var ar = this._autoRotate, 694 b2, x1, y1, x2, y2, add, conv; 695 i = ar.length; 696 while (--i > -1) { 697 p = ar[i][2]; 698 add = ar[i][3] || 0; 699 conv = (ar[i][4] === true) ? 1 : _RAD2DEG; 700 b = this._beziers[ar[i][0]]; 701 b2 = this._beziers[ar[i][1]]; 702 703 if (b && b2) { //in case one of the properties got overwritten. 704 b = b[curIndex]; 705 b2 = b2[curIndex]; 706 707 x1 = b.a + (b.b - b.a) * t; 708 x2 = b.b + (b.c - b.b) * t; 709 x1 += (x2 - x1) * t; 710 x2 += ((b.c + (b.d - b.c) * t) - x2) * t; 711 712 y1 = b2.a + (b2.b - b2.a) * t; 713 y2 = b2.b + (b2.c - b2.b) * t; 714 y1 += (y2 - y1) * t; 715 y2 += ((b2.c + (b2.d - b2.c) * t) - y2) * t; 716 717 val = notStart ? Math.atan2(y2 - y1, x2 - x1) * conv + add : this._initialRotations[i]; 718 719 if (this._mod[p]) { 720 val = this._mod[p](val, target); //for modProps 721 } 722 723 if (func[p]) { 724 target[p](val); 725 } else { 726 target[p] = val; 727 } 728 } 729 } 730 } 731 } 732 }), 733 p = BezierPlugin.prototype; 734 735 736 BezierPlugin.bezierThrough = bezierThrough; 737 BezierPlugin.cubicToQuadratic = cubicToQuadratic; 738 BezierPlugin._autoCSS = true; //indicates that this plugin can be inserted into the "css" object using the autoCSS feature of TweenLite 739 BezierPlugin.quadraticToCubic = function(a, b, c) { 740 return new Segment(a, (2 * b + a) / 3, (2 * b + c) / 3, c); 741 }; 742 743 BezierPlugin._cssRegister = function() { 744 var CSSPlugin = _globals.CSSPlugin; 745 if (!CSSPlugin) { 746 return; 747 } 748 var _internals = CSSPlugin._internals, 749 _parseToProxy = _internals._parseToProxy, 750 _setPluginRatio = _internals._setPluginRatio, 751 CSSPropTween = _internals.CSSPropTween; 752 _internals._registerComplexSpecialProp("bezier", {parser:function(t, e, prop, cssp, pt, plugin) { 753 if (e instanceof Array) { 754 e = {values:e}; 755 } 756 plugin = new BezierPlugin(); 757 var values = e.values, 758 l = values.length - 1, 759 pluginValues = [], 760 v = {}, 761 i, p, data; 762 if (l < 0) { 763 return pt; 764 } 765 for (i = 0; i <= l; i++) { 766 data = _parseToProxy(t, values[i], cssp, pt, plugin, (l !== i)); 767 pluginValues[i] = data.end; 768 } 769 for (p in e) { 770 v[p] = e[p]; //duplicate the vars object because we need to alter some things which would cause problems if the user plans to reuse the same vars object for another tween. 771 } 772 v.values = pluginValues; 773 pt = new CSSPropTween(t, "bezier", 0, 0, data.pt, 2); 774 pt.data = data; 775 pt.plugin = plugin; 776 pt.setRatio = _setPluginRatio; 777 if (v.autoRotate === 0) { 778 v.autoRotate = true; 779 } 780 if (v.autoRotate && !(v.autoRotate instanceof Array)) { 781 i = (v.autoRotate === true) ? 0 : Number(v.autoRotate); 782 v.autoRotate = (data.end.left != null) ? [["left","top","rotation",i,false]] : (data.end.x != null) ? [["x","y","rotation",i,false]] : false; 783 } 784 if (v.autoRotate) { 785 if (!cssp._transform) { 786 cssp._enableTransforms(false); 787 } 788 data.autoRotate = cssp._target._gsTransform; 789 data.proxy.rotation = data.autoRotate.rotation || 0; 790 cssp._overwriteProps.push("rotation"); 791 } 792 plugin._onInitTween(data.proxy, v, cssp._tween); 793 return pt; 794 }}); 795 }; 796 797 p._mod = function(lookup) { 798 var op = this._overwriteProps, 799 i = op.length, 800 val; 801 while (--i > -1) { 802 val = lookup[op[i]]; 803 if (val && typeof(val) === "function") { 804 this._mod[op[i]] = val; 805 } 806 } 807 }; 808 809 p._kill = function(lookup) { 810 var a = this._props, 811 p, i; 812 for (p in this._beziers) { 813 if (p in lookup) { 814 delete this._beziers[p]; 815 delete this._func[p]; 816 i = a.length; 817 while (--i > -1) { 818 if (a[i] === p) { 819 a.splice(i, 1); 820 } 821 } 822 } 823 } 824 a = this._autoRotate; 825 if (a) { 826 i = a.length; 827 while (--i > -1) { 828 if (lookup[a[i][2]]) { 829 a.splice(i, 1); 830 } 831 } 832 } 833 return this._super._kill.call(this, lookup); 834 }; 835 836 837 838/***/ }), 839
vendor: 164,976 bytes, lines 840-3775
840/***/ "../../../../../node_modules/gsap/CSSPlugin.js": 841/*!*************************************************************************!*\ 842 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/CSSPlugin.js ***! 843 \*************************************************************************/ 844/*! exports provided: CSSPlugin, default */ 845/***/ (function(module, __webpack_exports__, __webpack_require__) { 846 847"use strict"; 848__webpack_require__.r(__webpack_exports__); 849/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return CSSPlugin; }); 850/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return CSSPlugin; }); 851/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 852/*! 853 * VERSION: 2.1.3 854 * DATE: 2019-05-17 855 * UPDATES AND DOCS AT: http://greensock.com 856 * 857 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 858 * This work is subject to the terms at http://greensock.com/standard-license or for 859 * Club GreenSock members, the software agreement that was issued with your membership. 860 * 861 * @author: Jack Doyle, [email protected] 862 */ 863/* eslint-disable */ 864 865 866 867 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine("plugins.CSSPlugin", ["plugins.TweenPlugin","TweenLite"], function() { 868 869 /** @constructor **/ 870 var CSSPlugin = function() { 871 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["TweenPlugin"].call(this, "css"); 872 this._overwriteProps.length = 0; 873 this.setRatio = CSSPlugin.prototype.setRatio; //speed optimization (avoid prototype lookup on this "hot" method) 874 }, 875 _globals = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine.globals, 876 _hasPriority, //turns true whenever a CSSPropTween instance is created that has a priority other than 0. This helps us discern whether or not we should spend the time organizing the linked list or not after a CSSPlugin's _onInitTween() method is called. 877 _suffixMap, //we set this in _onInitTween() each time as a way to have a persistent variable we can use in other methods like _parse() without having to pass it around as a parameter and we keep _parse() decoupled from a particular CSSPlugin instance 878 _cs, //computed style (we store this in a shared variable to conserve memory and make minification tighter 879 _overwriteProps, //alias to the currently instantiating CSSPlugin's _overwriteProps array. We use this closure in order to avoid having to pass a reference around from method to method and aid in minification. 880 _specialProps = {}, 881 p = CSSPlugin.prototype = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["TweenPlugin"]("css"); 882 883 p.constructor = CSSPlugin; 884 CSSPlugin.version = "2.1.3"; 885 CSSPlugin.API = 2; 886 CSSPlugin.defaultTransformPerspective = 0; 887 CSSPlugin.defaultSkewType = "compensated"; 888 CSSPlugin.defaultSmoothOrigin = true; 889 p = "px"; //we'll reuse the "p" variable to keep file size down 890 CSSPlugin.suffixMap = {top:p, right:p, bottom:p, left:p, width:p, height:p, fontSize:p, padding:p, margin:p, perspective:p, lineHeight:""}; 891 892 893 var _numExp = /(?:\-|\.|\b)(\d|\.|e\-)+/g, 894 _relNumExp = /(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g, 895 _valuesExp = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)" 896 _valuesExpWithCommas = /(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b),?/gi, //finds all the values that begin with numbers or += or -= and then a number. Includes suffixes. We use this to split complex values apart like "1px 5px 20px rgb(255,102,51)" 897 _NaNExp = /(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g, //also allows scientific notation and doesn't kill the leading -/+ in -= and += 898 _suffixExp = /(?:\d|\-|\+|=|#|\.)*/g, 899 _opacityExp = /opacity *= *([^)]*)/i, 900 _opacityValExp = /opacity:([^;]*)/i, 901 _alphaFilterExp = /alpha\(opacity *=.+?\)/i, 902 _rgbhslExp = /^(rgb|hsl)/, 903 _capsExp = /([A-Z])/g, 904 _camelExp = /-([a-z])/gi, 905 _urlExp = /(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi, //for pulling out urls from url(...) or url("...") strings (some browsers wrap urls in quotes, some don't when reporting things like backgroundImage) 906 _camelFunc = function(s, g) { return g.toUpperCase(); }, 907 _horizExp = /(?:Left|Right|Width)/i, 908 _ieGetMatrixExp = /(M11|M12|M21|M22)=[\d\-\.e]+/gi, 909 _ieSetMatrixExp = /progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i, 910 _commasOutsideParenExp = /,(?=[^\)]*(?:\(|$))/gi, //finds any commas that are not within parenthesis 911 _complexExp = /[\s,\(]/i, //for testing a string to find if it has a space, comma, or open parenthesis (clues that it's a complex value) 912 _DEG2RAD = Math.PI / 180, 913 _RAD2DEG = 180 / Math.PI, 914 _forcePT = {}, 915 _dummyElement = {style:{}}, 916 _doc = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"].document || {createElement: function() {return _dummyElement;}}, 917 _createElement = function(type, ns) { 918 var e = _doc.createElementNS ? _doc.createElementNS(ns || "http://www.w3.org/1999/xhtml", type) : _doc.createElement(type); 919 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://greensock.com/forums/topic/20215-problem-using-tweenmax-in-standalone-self-containing-svg-file-err-cannot-set-property-csstext-of-undefined/). 920 }, 921 _tempDiv = _createElement("div"), 922 _tempImg = _createElement("img"), 923 _internals = CSSPlugin._internals = {_specialProps:_specialProps}, //provides a hook to a few internal methods that we need to access from inside other plugins 924 _agent = (_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"].navigator || {}).userAgent || "", 925 _autoRound, 926 _reqSafariFix, //we won't apply the Safari transform fix until we actually come across a tween that affects a transform property (to maintain best performance). 927 928 _isSafari, 929 _isFirefox, //Firefox has a bug that causes 3D transformed elements to randomly disappear unless a repaint is forced after each update on each element. 930 _isSafariLT6, //Safari (and Android 4 which uses a flavor of Safari) has a bug that prevents changes to "top" and "left" properties from rendering properly if changed on the same frame as a transform UNLESS we set the element's WebkitBackfaceVisibility to hidden (weird, I know). Doing this for Android 3 and earlier seems to actually cause other problems, though (fun!) 931 _ieVers, 932 _supportsOpacity = (function() { //we set _isSafari, _ieVers, _isFirefox, and _supportsOpacity all in one function here to reduce file size slightly, especially in the minified version. 933 var i = _agent.indexOf("Android"), 934 a = _createElement("a"); 935 _isSafari = (_agent.indexOf("Safari") !== -1 && _agent.indexOf("Chrome") === -1 && (i === -1 || parseFloat(_agent.substr(i+8, 2)) > 3)); 936 _isSafariLT6 = (_isSafari && (parseFloat(_agent.substr(_agent.indexOf("Version/")+8, 2)) < 6)); 937 _isFirefox = (_agent.indexOf("Firefox") !== -1); 938 if ((/MSIE ([0-9]{1,}[\.0-9]{0,})/).exec(_agent) || (/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/).exec(_agent)) { 939 _ieVers = parseFloat( RegExp.$1 ); 940 } 941 if (!a) { 942 return false; 943 } 944 a.style.cssText = "top:1px;opacity:.55;"; 945 return /^0.55/.test(a.style.opacity); 946 }()), 947 _getIEOpacity = function(v) { 948 return (_opacityExp.test( ((typeof(v) === "string") ? v : (v.currentStyle ? v.currentStyle.filter : v.style.filter) || "") ) ? ( parseFloat( RegExp.$1 ) / 100 ) : 1); 949 }, 950 _log = function(s) {//for logging messages, but in a way that won't throw errors in old versions of IE. 951 if (_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"].console) { 952 console.log(s); 953 } 954 }, 955 _target, //when initting a CSSPlugin, we set this variable so that we can access it from within many other functions without having to pass it around as params 956 _index, //when initting a CSSPlugin, we set this variable so that we can access it from within many other functions without having to pass it around as params 957 958 _prefixCSS = "", //the non-camelCase vendor prefix like "-o-", "-moz-", "-ms-", or "-webkit-" 959 _prefix = "", //camelCase vendor prefix like "O", "ms", "Webkit", or "Moz". 960 961 // @private feed in a camelCase property name like "transform" and it will check to see if it is valid as-is or if it needs a vendor prefix. It returns the corrected camelCase property name (i.e. "WebkitTransform" or "MozTransform" or "transform" or null if no such property is found, like if the browser is IE8 or before, "transform" won't be found at all) 962 _checkPropPrefix = function(p, e) { 963 e = e || _tempDiv; 964 var s = e.style, 965 a, i; 966 if (s[p] !== undefined) { 967 return p; 968 } 969 p = p.charAt(0).toUpperCase() + p.substr(1); 970 a = ["O","Moz","ms","Ms","Webkit"]; 971 i = 5; 972 while (--i > -1 && s[a[i]+p] === undefined) { } 973 if (i >= 0) { 974 _prefix = (i === 3) ? "ms" : a[i]; 975 _prefixCSS = "-" + _prefix.toLowerCase() + "-"; 976 return _prefix + p; 977 } 978 return null; 979 }, 980 981 _computedStyleScope = (typeof(window) !== "undefined" ? window : _doc.defaultView || {getComputedStyle:function() {}}), 982 _getComputedStyle = function(e) { 983 return _computedStyleScope.getComputedStyle(e); //to avoid errors in Microsoft Edge, we need to call getComputedStyle() from a specific scope, typically window. 984 }, 985 986 /** 987 * @private Returns the css style for a particular property of an element. For example, to get whatever the current "left" css value for an element with an ID of "myElement", you could do: 988 * var currentLeft = CSSPlugin.getStyle( document.getElementById("myElement"), "left"); 989 * 990 * @param {!Object} t Target element whose style property you want to query 991 * @param {!string} p Property name (like "left" or "top" or "marginTop", etc.) 992 * @param {Object=} cs Computed style object. This just provides a way to speed processing if you're going to get several properties on the same element in quick succession - you can reuse the result of the getComputedStyle() call. 993 * @param {boolean=} calc If true, the value will not be read directly from the element's "style" property (if it exists there), but instead the getComputedStyle() result will be used. This can be useful when you want to ensure that the browser itself is interpreting the value. 994 * @param {string=} dflt Default value that should be returned in the place of null, "none", "auto" or "auto auto". 995 * @return {?string} The current property value 996 */ 997 _getStyle = CSSPlugin.getStyle = function(t, p, cs, calc, dflt) { 998 var rv; 999 if (!_supportsOpacity) if (p === "opacity") { //several versions of IE don't use the standard "opacity" property - they use things like filter:alpha(opacity=50), so we parse that here. 1000 return _getIEOpacity(t); 1001 } 1002 if (!calc && t.style[p]) { 1003 rv = t.style[p]; 1004 } else if ((cs = cs || _getComputedStyle(t))) { 1005 rv = cs[p] || cs.getPropertyValue(p) || cs.getPropertyValue(p.replace(_capsExp, "-$1").toLowerCase()); 1006 } else if (t.currentStyle) { 1007 rv = t.currentStyle[p]; 1008 } 1009 return (dflt != null && (!rv || rv === "none" || rv === "auto" || rv === "auto auto")) ? dflt : rv; 1010 }, 1011 1012 /** 1013 * @private Pass the target element, the property name, the numeric value, and the suffix (like "%", "em", "px", etc.) and it will spit back the equivalent pixel number. 1014 * @param {!Object} t Target element 1015 * @param {!string} p Property name (like "left", "top", "marginLeft", etc.) 1016 * @param {!number} v Value 1017 * @param {string=} sfx Suffix (like "px" or "%" or "em") 1018 * @param {boolean=} recurse If true, the call is a recursive one. In some browsers (like IE7/8), occasionally the value isn't accurately reported initially, but if we run the function again it will take effect. 1019 * @return {number} value in pixels 1020 */ 1021 _convertToPixels = _internals.convertToPixels = function(t, p, v, sfx, recurse) { 1022 if (sfx === "px" || (!sfx && p !== "lineHeight")) { return v; } 1023 if (sfx === "auto" || !v) { return 0; } 1024 var horiz = _horizExp.test(p), 1025 node = t, 1026 style = _tempDiv.style, 1027 neg = (v < 0), 1028 precise = (v === 1), 1029 pix, cache, time; 1030 if (neg) { 1031 v = -v; 1032 } 1033 if (precise) { 1034 v *= 100; 1035 } 1036 if (p === "lineHeight" && !sfx) { //special case of when a simple lineHeight (without a unit) is used. Set it to the value, read back the computed value, and then revert. 1037 cache = _getComputedStyle(t).lineHeight; 1038 t.style.lineHeight = v; 1039 pix = parseFloat(_getComputedStyle(t).lineHeight); 1040 t.style.lineHeight = cache; 1041 } else if (sfx === "%" && p.indexOf("border") !== -1) { 1042 pix = (v / 100) * (horiz ? t.clientWidth : t.clientHeight); 1043 } else { 1044 style.cssText = "border:0 solid red;position:" + _getStyle(t, "position") + ";line-height:0;"; 1045 if (sfx === "%" || !node.appendChild || sfx.charAt(0) === "v" || sfx === "rem") { 1046 node = t.parentNode || _doc.body; 1047 if (_getStyle(node, "display").indexOf("flex") !== -1) { //Edge and IE11 have a bug that causes offsetWidth to report as 0 if the container has display:flex and the child is position:relative. Switching to position: absolute solves it. 1048 style.position = "absolute"; 1049 } 1050 cache = node._gsCache; 1051 time = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].ticker.frame; 1052 if (cache && horiz && cache.time === time) { //performance optimization: we record the width of elements along with the ticker frame so that we can quickly get it again on the same tick (seems relatively safe to assume it wouldn't change on the same tick) 1053 return cache.width * v / 100; 1054 } 1055 style[(horiz ? "width" : "height")] = v + sfx; 1056 } else { 1057 style[(horiz ? "borderLeftWidth" : "borderTopWidth")] = v + sfx; 1058 } 1059 node.appendChild(_tempDiv); 1060 pix = parseFloat(_tempDiv[(horiz ? "offsetWidth" : "offsetHeight")]); 1061 node.removeChild(_tempDiv); 1062 if (horiz && sfx === "%" && CSSPlugin.cacheWidths !== false) { 1063 cache = node._gsCache = node._gsCache || {}; 1064 cache.time = time; 1065 cache.width = pix / v * 100; 1066 } 1067 if (pix === 0 && !recurse) { 1068 pix = _convertToPixels(t, p, v, sfx, true); 1069 } 1070 } 1071 if (precise) { 1072 pix /= 100; 1073 } 1074 return neg ? -pix : pix; 1075 }, 1076 _calculateOffset = _internals.calculateOffset = function(t, p, cs) { //for figuring out "top" or "left" in px when it's "auto". We need to factor in margin with the offsetLeft/offsetTop 1077 if (_getStyle(t, "position", cs) !== "absolute") { return 0; } 1078 var dim = ((p === "left") ? "Left" : "Top"), 1079 v = _getStyle(t, "margin" + dim, cs); 1080 return t["offset" + dim] - (_convertToPixels(t, p, parseFloat(v), v.replace(_suffixExp, "")) || 0); 1081 }, 1082 1083 // @private returns at object containing ALL of the style properties in camelCase and their associated values. 1084 _getAllStyles = function(t, cs) { 1085 var s = {}, 1086 i, tr, p; 1087 if ((cs = cs || _getComputedStyle(t, null))) { 1088 if ((i = cs.length)) { 1089 while (--i > -1) { 1090 p = cs[i]; 1091 if (p.indexOf("-transform") === -1 || _transformPropCSS === p) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here. 1092 s[p.replace(_camelExp, _camelFunc)] = cs.getPropertyValue(p); 1093 } 1094 } 1095 } else { //some browsers behave differently - cs.length is always 0, so we must do a for...in loop. 1096 for (i in cs) { 1097 if (i.indexOf("Transform") === -1 || _transformProp === i) { //Some webkit browsers duplicate transform values, one non-prefixed and one prefixed ("transform" and "WebkitTransform"), so we must weed out the extra one here. 1098 s[i] = cs[i]; 1099 } 1100 } 1101 } 1102 } else if ((cs = t.currentStyle || t.style)) { 1103 for (i in cs) { 1104 if (typeof(i) === "string" && s[i] === undefined) { 1105 s[i.replace(_camelExp, _camelFunc)] = cs[i]; 1106 } 1107 } 1108 } 1109 if (!_supportsOpacity) { 1110 s.opacity = _getIEOpacity(t); 1111 } 1112 tr = _getTransform(t, cs, false); 1113 s.rotation = tr.rotation; 1114 s.skewX = tr.skewX; 1115 s.scaleX = tr.scaleX; 1116 s.scaleY = tr.scaleY; 1117 s.x = tr.x; 1118 s.y = tr.y; 1119 if (_supports3D) { 1120 s.z = tr.z; 1121 s.rotationX = tr.rotationX; 1122 s.rotationY = tr.rotationY; 1123 s.scaleZ = tr.scaleZ; 1124 } 1125 if (s.filters) { 1126 delete s.filters; 1127 } 1128 return s; 1129 }, 1130 1131 // @private analyzes two style objects (as returned by _getAllStyles()) and only looks for differences between them that contain tweenable values (like a number or color). It returns an object with a "difs" property which refers to an object containing only those isolated properties and values for tweening, and a "firstMPT" property which refers to the first MiniPropTween instance in a linked list that recorded all the starting values of the different properties so that we can revert to them at the end or beginning of the tween - we don't want the cascading to get messed up. The forceLookup parameter is an optional generic object with properties that should be forced into the results - this is necessary for className tweens that are overwriting others because imagine a scenario where a rollover/rollout adds/removes a class and the user swipes the mouse over the target SUPER fast, thus nothing actually changed yet and the subsequent comparison of the properties would indicate they match (especially when px rounding is taken into consideration), thus no tweening is necessary even though it SHOULD tween and remove those properties after the tween (otherwise the inline styles will contaminate things). See the className SpecialProp code for details. 1132 _cssDif = function(t, s1, s2, vars, forceLookup) { 1133 var difs = {}, 1134 style = t.style, 1135 val, p, mpt; 1136 for (p in s2) { 1137 if (p !== "cssText") if (p !== "length") if (isNaN(p)) if (s1[p] !== (val = s2[p]) || (forceLookup && forceLookup[p])) if (p.indexOf("Origin") === -1) if (typeof(val) === "number" || typeof(val) === "string") { 1138 difs[p] = (val === "auto" && (p === "left" || p === "top")) ? _calculateOffset(t, p) : ((val === "" || val === "auto" || val === "none") && typeof(s1[p]) === "string" && s1[p].replace(_NaNExp, "") !== "") ? 0 : val; //if the ending value is defaulting ("" or "auto"), we check the starting value and if it can be parsed into a number (a string which could have a suffix too, like 700px), then we swap in 0 for "" or "auto" so that things actually tween. 1139 if (style[p] !== undefined) { //for className tweens, we must remember which properties already existed inline - the ones that didn't should be removed when the tween isn't in progress because they were only introduced to facilitate the transition between classes. 1140 mpt = new MiniPropTween(style, p, style[p], mpt); 1141 } 1142 } 1143 } 1144 if (vars) { 1145 for (p in vars) { //copy properties (except className) 1146 if (p !== "className") { 1147 difs[p] = vars[p]; 1148 } 1149 } 1150 } 1151 return {difs:difs, firstMPT:mpt}; 1152 }, 1153 _dimensions = {width:["Left","Right"], height:["Top","Bottom"]}, 1154 _margins = ["marginLeft","marginRight","marginTop","marginBottom"], 1155 1156 /** 1157 * @private Gets the width or height of an element 1158 * @param {!Object} t Target element 1159 * @param {!string} p Property name ("width" or "height") 1160 * @param {Object=} cs Computed style object (if one exists). Just a speed optimization. 1161 * @return {number} Dimension (in pixels) 1162 */ 1163 _getDimension = function(t, p, cs) { 1164 if ((t.nodeName + "").toLowerCase() === "svg") { //Chrome no longer supports offsetWidth/offsetHeight on SVG elements. 1165 return (cs || _getComputedStyle(t))[p] || 0; 1166 } else if (t.getCTM && _isSVG(t)) { 1167 return t.getBBox()[p] || 0; 1168 } 1169 var v = parseFloat((p === "width") ? t.offsetWidth : t.offsetHeight), 1170 a = _dimensions[p], 1171 i = a.length; 1172 cs = cs || _getComputedStyle(t, null); 1173 while (--i > -1) { 1174 v -= parseFloat( _getStyle(t, "padding" + a[i], cs, true) ) || 0; 1175 v -= parseFloat( _getStyle(t, "border" + a[i] + "Width", cs, true) ) || 0; 1176 } 1177 return v; 1178 }, 1179 1180 // @private Parses position-related complex strings like "top left" or "50px 10px" or "70% 20%", etc. which are used for things like transformOrigin or backgroundPosition. Optionally decorates a supplied object (recObj) with the following properties: "ox" (offsetX), "oy" (offsetY), "oxp" (if true, "ox" is a percentage not a pixel value), and "oxy" (if true, "oy" is a percentage not a pixel value) 1181 _parsePosition = function(v, recObj) { 1182 if (v === "contain" || v === "auto" || v === "auto auto") { //note: Firefox uses "auto auto" as default whereas Chrome uses "auto". 1183 return v + " "; 1184 } 1185 if (v == null || v === "") { 1186 v = "0 0"; 1187 } 1188 var a = v.split(" "), 1189 x = (v.indexOf("left") !== -1) ? "0%" : (v.indexOf("right") !== -1) ? "100%" : a[0], 1190 y = (v.indexOf("top") !== -1) ? "0%" : (v.indexOf("bottom") !== -1) ? "100%" : a[1], 1191 i; 1192 if (a.length > 3 && !recObj) { //multiple positions 1193 a = v.split(", ").join(",").split(","); 1194 v = []; 1195 for (i = 0; i < a.length; i++) { 1196 v.push(_parsePosition(a[i])); 1197 } 1198 return v.join(","); 1199 } 1200 if (y == null) { 1201 y = (x === "center") ? "50%" : "0"; 1202 } else if (y === "center") { 1203 y = "50%"; 1204 } 1205 if (x === "center" || (isNaN(parseFloat(x)) && (x + "").indexOf("=") === -1)) { //remember, the user could flip-flop the values and say "bottom center" or "center bottom", etc. "center" is ambiguous because it could be used to describe horizontal or vertical, hence the isNaN(). If there's an "=" sign in the value, it's relative. 1206 x = "50%"; 1207 } 1208 v = x + " " + y + ((a.length > 2) ? " " + a[2] : ""); 1209 if (recObj) { 1210 recObj.oxp = (x.indexOf("%") !== -1); 1211 recObj.oyp = (y.indexOf("%") !== -1); 1212 recObj.oxr = (x.charAt(1) === "="); 1213 recObj.oyr = (y.charAt(1) === "="); 1214 recObj.ox = parseFloat(x.replace(_NaNExp, "")); 1215 recObj.oy = parseFloat(y.replace(_NaNExp, "")); 1216 recObj.v = v; 1217 } 1218 return recObj || v; 1219 }, 1220 1221 /** 1222 * @private Takes an ending value (typically a string, but can be a number) and a starting value and returns the change between the two, looking for relative value indicators like += and -= and it also ignores suffixes (but make sure the ending value starts with a number or +=/-= and that the starting value is a NUMBER!) 1223 * @param {(number|string)} e End value which is typically a string, but could be a number 1224 * @param {(number|string)} b Beginning value which is typically a string but could be a number 1225 * @return {number} Amount of change between the beginning and ending values (relative values that have a "+=" or "-=" are recognized) 1226 */ 1227 _parseChange = function(e, b) { 1228 if (typeof(e) === "function") { 1229 e = e(_index, _target); 1230 } 1231 return (typeof(e) === "string" && e.charAt(1) === "=") ? parseInt(e.charAt(0) + "1", 10) * parseFloat(e.substr(2)) : (parseFloat(e) - parseFloat(b)) || 0; 1232 }, 1233 1234 /** 1235 * @private Takes a value and a default number, checks if the value is relative, null, or numeric and spits back a normalized number accordingly. Primarily used in the _parseTransform() function. 1236 * @param {Object} v Value to be parsed 1237 * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter) 1238 * @return {number} Parsed value 1239 */ 1240 _parseVal = function(v, d) { 1241 if (typeof(v) === "function") { 1242 v = v(_index, _target); 1243 } 1244 var isRelative = (typeof(v) === "string" && v.charAt(1) === "="); 1245 if (typeof(v) === "string" && v.charAt(v.length - 2) === "v") { //convert vw and vh into px-equivalents. 1246 v = (isRelative ? v.substr(0, 2) : 0) + (window["inner" + ((v.substr(-2) === "vh") ? "Height" : "Width")] * (parseFloat(isRelative ? v.substr(2) : v) / 100)); 1247 } 1248 return (v == null) ? d : isRelative ? parseInt(v.charAt(0) + "1", 10) * parseFloat(v.substr(2)) + d : parseFloat(v) || 0; 1249 }, 1250 1251 /** 1252 * @private Translates strings like "40deg" or "40" or 40rad" or "+=40deg" or "270_short" or "-90_cw" or "+=45_ccw" to a numeric radian angle. Of course a starting/default value must be fed in too so that relative values can be calculated properly. 1253 * @param {Object} v Value to be parsed 1254 * @param {!number} d Default value (which is also used for relative calculations if "+=" or "-=" is found in the first parameter) 1255 * @param {string=} p property name for directionalEnd (optional - only used when the parsed value is directional ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation). Property name would be "rotation", "rotationX", or "rotationY" 1256 * @param {Object=} directionalEnd An object that will store the raw end values for directional angles ("_short", "_cw", or "_ccw" suffix). We need a way to store the uncompensated value so that at the end of the tween, we set it to exactly what was requested with no directional compensation. 1257 * @return {number} parsed angle in radians 1258 */ 1259 _parseAngle = function(v, d, p, directionalEnd) { 1260 var min = 0.000001, 1261 cap, split, dif, result, isRelative; 1262 if (typeof(v) === "function") { 1263 v = v(_index, _target); 1264 } 1265 if (v == null) { 1266 result = d; 1267 } else if (typeof(v) === "number") { 1268 result = v; 1269 } else { 1270 cap = 360; 1271 split = v.split("_"); 1272 isRelative = (v.charAt(1) === "="); 1273 dif = (isRelative ? parseInt(v.charAt(0) + "1", 10) * parseFloat(split[0].substr(2)) : parseFloat(split[0])) * ((v.indexOf("rad") === -1) ? 1 : _RAD2DEG) - (isRelative ? 0 : d); 1274 if (split.length) { 1275 if (directionalEnd) { 1276 directionalEnd[p] = d + dif; 1277 } 1278 if (v.indexOf("short") !== -1) { 1279 dif = dif % cap; 1280 if (dif !== dif % (cap / 2)) { 1281 dif = (dif < 0) ? dif + cap : dif - cap; 1282 } 1283 } 1284 if (v.indexOf("_cw") !== -1 && dif < 0) { 1285 dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 1286 } else if (v.indexOf("ccw") !== -1 && dif > 0) { 1287 dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 1288 } 1289 } 1290 result = d + dif; 1291 } 1292 if (result < min && result > -min) { 1293 result = 0; 1294 } 1295 return result; 1296 }, 1297 1298 _colorLookup = {aqua:[0,255,255], 1299 lime:[0,255,0], 1300 silver:[192,192,192], 1301 black:[0,0,0], 1302 maroon:[128,0,0], 1303 teal:[0,128,128], 1304 blue:[0,0,255], 1305 navy:[0,0,128], 1306 white:[255,255,255], 1307 fuchsia:[255,0,255], 1308 olive:[128,128,0], 1309 yellow:[255,255,0], 1310 orange:[255,165,0], 1311 gray:[128,128,128], 1312 purple:[128,0,128], 1313 green:[0,128,0], 1314 red:[255,0,0], 1315 pink:[255,192,203], 1316 cyan:[0,255,255], 1317 transparent:[255,255,255,0]}, 1318 1319 _hue = function(h, m1, m2) { 1320 h = (h < 0) ? h + 1 : (h > 1) ? h - 1 : h; 1321 return ((((h * 6 < 1) ? m1 + (m2 - m1) * h * 6 : (h < 0.5) ? m2 : (h * 3 < 2) ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * 255) + 0.5) | 0; 1322 }, 1323 1324 /** 1325 * @private Parses a color (like #9F0, #FF9900, rgb(255,51,153) or hsl(108, 50%, 10%)) into an array with 3 elements for red, green, and blue or if toHSL parameter is true, it will populate the array with hue, saturation, and lightness values. If a relative value is found in an hsl() or hsla() string, it will preserve those relative prefixes and all the values in the array will be strings instead of numbers (in all other cases it will be populated with numbers). 1326 * @param {(string|number)} v The value the should be parsed which could be a string like #9F0 or rgb(255,102,51) or rgba(255,0,0,0.5) or it could be a number like 0xFF00CC or even a named color like red, blue, purple, etc. 1327 * @param {(boolean)} toHSL If true, an hsl() or hsla() value will be returned instead of rgb() or rgba() 1328 * @return {Array.<number>} An array containing red, green, and blue (and optionally alpha) in that order, or if the toHSL parameter was true, the array will contain hue, saturation and lightness (and optionally alpha) in that order. Always numbers unless there's a relative prefix found in an hsl() or hsla() string and toHSL is true. 1329 */ 1330 _parseColor = CSSPlugin.parseColor = function(v, toHSL) { 1331 var a, r, g, b, h, s, l, max, min, d, wasHSL; 1332 if (!v) { 1333 a = _colorLookup.black; 1334 } else if (typeof(v) === "number") { 1335 a = [v >> 16, (v >> 8) & 255, v & 255]; 1336 } else { 1337 if (v.charAt(v.length - 1) === ",") { //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. 1338 v = v.substr(0, v.length - 1); 1339 } 1340 if (_colorLookup[v]) { 1341 a = _colorLookup[v]; 1342 } else if (v.charAt(0) === "#") { 1343 if (v.length === 4) { //for shorthand like #9F0 1344 r = v.charAt(1); 1345 g = v.charAt(2); 1346 b = v.charAt(3); 1347 v = "#" + r + r + g + g + b + b; 1348 } 1349 v = parseInt(v.substr(1), 16); 1350 a = [v >> 16, (v >> 8) & 255, v & 255]; 1351 } else if (v.substr(0, 3) === "hsl") { 1352 a = wasHSL = v.match(_numExp); 1353 if (!toHSL) { 1354 h = (Number(a[0]) % 360) / 360; 1355 s = Number(a[1]) / 100; 1356 l = Number(a[2]) / 100; 1357 g = (l <= 0.5) ? l * (s + 1) : l + s - l * s; 1358 r = l * 2 - g; 1359 if (a.length > 3) { 1360 a[3] = Number(a[3]); 1361 } 1362 a[0] = _hue(h + 1 / 3, r, g); 1363 a[1] = _hue(h, r, g); 1364 a[2] = _hue(h - 1 / 3, r, g); 1365 } else if (v.indexOf("=") !== -1) { //if relative values are found, just return the raw strings with the relative prefixes in place. 1366 return v.match(_relNumExp); 1367 } 1368 } else { 1369 a = v.match(_numExp) || _colorLookup.transparent; 1370 } 1371 a[0] = Number(a[0]); 1372 a[1] = Number(a[1]); 1373 a[2] = Number(a[2]); 1374 if (a.length > 3) { 1375 a[3] = Number(a[3]); 1376 } 1377 } 1378 if (toHSL && !wasHSL) { 1379 r = a[0] / 255; 1380 g = a[1] / 255; 1381 b = a[2] / 255; 1382 max = Math.max(r, g, b); 1383 min = Math.min(r, g, b); 1384 l = (max + min) / 2; 1385 if (max === min) { 1386 h = s = 0; 1387 } else { 1388 d = max - min; 1389 s = l > 0.5 ? d / (2 - max - min) : d / (max + min); 1390 h = (max === r) ? (g - b) / d + (g < b ? 6 : 0) : (max === g) ? (b - r) / d + 2 : (r - g) / d + 4; 1391 h *= 60; 1392 } 1393 a[0] = (h + 0.5) | 0; 1394 a[1] = (s * 100 + 0.5) | 0; 1395 a[2] = (l * 100 + 0.5) | 0; 1396 } 1397 return a; 1398 }, 1399 _formatColors = function(s, toHSL) { 1400 var colors = s.match(_colorExp) || [], 1401 charIndex = 0, 1402 parsed = "", 1403 i, color, temp; 1404 if (!colors.length) { 1405 return s; 1406 } 1407 for (i = 0; i < colors.length; i++) { 1408 color = colors[i]; 1409 temp = s.substr(charIndex, s.indexOf(color, charIndex)-charIndex); 1410 charIndex += temp.length + color.length; 1411 color = _parseColor(color, toHSL); 1412 if (color.length === 3) { 1413 color.push(1); 1414 } 1415 parsed += temp + (toHSL ? "hsla(" + color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : "rgba(" + color.join(",")) + ")"; 1416 } 1417 return parsed + s.substr(charIndex); 1418 }, 1419 _colorExp = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b"; //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. 1420 1421 for (p in _colorLookup) { 1422 _colorExp += "|" + p + "\\b"; 1423 } 1424 _colorExp = new RegExp(_colorExp+")", "gi"); 1425 1426 CSSPlugin.colorStringFilter = function(a) { 1427 var combined = a[0] + " " + a[1], 1428 toHSL; 1429 if (_colorExp.test(combined)) { 1430 toHSL = (combined.indexOf("hsl(") !== -1 || combined.indexOf("hsla(") !== -1); 1431 a[0] = _formatColors(a[0], toHSL); 1432 a[1] = _formatColors(a[1], toHSL); 1433 } 1434 _colorExp.lastIndex = 0; 1435 }; 1436 1437 if (!_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].defaultStringFilter) { 1438 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].defaultStringFilter = CSSPlugin.colorStringFilter; 1439 } 1440 1441 /** 1442 * @private Returns a formatter function that handles taking a string (or number in some cases) and returning a consistently formatted one in terms of delimiters, quantity of values, etc. For example, we may get boxShadow values defined as "0px red" or "0px 0px 10px rgb(255,0,0)" or "0px 0px 20px 20px #F00" and we need to ensure that what we get back is described with 4 numbers and a color. This allows us to feed it into the _parseComplex() method and split the values up appropriately. The neat thing about this _getFormatter() function is that the dflt defines a pattern as well as a default, so for example, _getFormatter("0px 0px 0px 0px #777", true) not only sets the default as 0px for all distances and #777 for the color, but also sets the pattern such that 4 numbers and a color will always get returned. 1443 * @param {!string} dflt The default value and pattern to follow. So "0px 0px 0px 0px #777" will ensure that 4 numbers and a color will always get returned. 1444 * @param {boolean=} clr If true, the values should be searched for color-related data. For example, boxShadow values typically contain a color whereas borderRadius don't. 1445 * @param {boolean=} collapsible If true, the value is a top/left/right/bottom style one that acts like margin or padding, where if only one value is received, it's used for all 4; if 2 are received, the first is duplicated for 3rd (bottom) and the 2nd is duplicated for the 4th spot (left), etc. 1446 * @return {Function} formatter function 1447 */ 1448 var _getFormatter = function(dflt, clr, collapsible, multi) { 1449 if (dflt == null) { 1450 return function(v) {return v;}; 1451 } 1452 var dColor = clr ? (dflt.match(_colorExp) || [""])[0] : "", 1453 dVals = dflt.split(dColor).join("").match(_valuesExp) || [], 1454 pfx = dflt.substr(0, dflt.indexOf(dVals[0])), 1455 sfx = (dflt.charAt(dflt.length - 1) === ")") ? ")" : "", 1456 delim = (dflt.indexOf(" ") !== -1) ? " " : ",", 1457 numVals = dVals.length, 1458 dSfx = (numVals > 0) ? dVals[0].replace(_numExp, "") : "", 1459 formatter; 1460 if (!numVals) { 1461 return function(v) {return v;}; 1462 } 1463 if (clr) { 1464 formatter = function(v) { 1465 var color, vals, i, a; 1466 if (typeof(v) === "number") { 1467 v += dSfx; 1468 } else if (multi && _commasOutsideParenExp.test(v)) { 1469 a = v.replace(_commasOutsideParenExp, "|").split("|"); 1470 for (i = 0; i < a.length; i++) { 1471 a[i] = formatter(a[i]); 1472 } 1473 return a.join(","); 1474 } 1475 color = (v.match(_colorExp) || [dColor])[0]; 1476 vals = v.split(color).join("").match(_valuesExp) || []; 1477 i = vals.length; 1478 if (numVals > i--) { 1479 while (++i < numVals) { 1480 vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i]; 1481 } 1482 } 1483 return pfx + vals.join(delim) + delim + color + sfx + (v.indexOf("inset") !== -1 ? " inset" : ""); 1484 }; 1485 return formatter; 1486 1487 } 1488 formatter = function(v) { 1489 var vals, a, i; 1490 if (typeof(v) === "number") { 1491 v += dSfx; 1492 } else if (multi && _commasOutsideParenExp.test(v)) { 1493 a = v.replace(_commasOutsideParenExp, "|").split("|"); 1494 for (i = 0; i < a.length; i++) { 1495 a[i] = formatter(a[i]); 1496 } 1497 return a.join(","); 1498 } 1499 vals = v.match(delim === "," ? _valuesExp : _valuesExpWithCommas) || []; 1500 i = vals.length; 1501 if (numVals > i--) { 1502 while (++i < numVals) { 1503 vals[i] = collapsible ? vals[(((i - 1) / 2) | 0)] : dVals[i]; 1504 } 1505 } 1506 return ((pfx && v !== "none") ? v.substr(0, v.indexOf(vals[0])) || pfx : pfx) + vals.join(delim) + sfx; //note: prefix might be different, like for clipPath it could start with inset( or polygon( 1507 }; 1508 return formatter; 1509 }, 1510 1511 /** 1512 * @private returns a formatter function that's used for edge-related values like marginTop, marginLeft, paddingBottom, paddingRight, etc. Just pass a comma-delimited list of property names related to the edges. 1513 * @param {!string} props a comma-delimited list of property names in order from top to left, like "marginTop,marginRight,marginBottom,marginLeft" 1514 * @return {Function} a formatter function 1515 */ 1516 _getEdgeParser = function(props) { 1517 props = props.split(","); 1518 return function(t, e, p, cssp, pt, plugin, vars) { 1519 var a = (e + "").split(" "), 1520 i; 1521 vars = {}; 1522 for (i = 0; i < 4; i++) { 1523 vars[props[i]] = a[i] = a[i] || a[(((i - 1) / 2) >> 0)]; 1524 } 1525 return cssp.parse(t, vars, pt, plugin); 1526 }; 1527 }, 1528 1529 // @private used when other plugins must tween values first, like BezierPlugin or ThrowPropsPlugin, etc. That plugin's setRatio() gets called first so that the values are updated, and then we loop through the MiniPropTweens which handle copying the values into their appropriate slots so that they can then be applied correctly in the main CSSPlugin setRatio() method. Remember, we typically create a proxy object that has a bunch of uniquely-named properties that we feed to the sub-plugin and it does its magic normally, and then we must interpret those values and apply them to the css because often numbers must get combined/concatenated, suffixes added, etc. to work with css, like boxShadow could have 4 values plus a color. 1530 _setPluginRatio = _internals._setPluginRatio = function(v) { 1531 this.plugin.setRatio(v); 1532 var d = this.data, 1533 proxy = d.proxy, 1534 mpt = d.firstMPT, 1535 min = 0.000001, 1536 val, pt, i, str, p; 1537 while (mpt) { 1538 val = proxy[mpt.v]; 1539 if (mpt.r) { 1540 val = mpt.r(val); 1541 } else if (val < min && val > -min) { 1542 val = 0; 1543 } 1544 mpt.t[mpt.p] = val; 1545 mpt = mpt._next; 1546 } 1547 if (d.autoRotate) { 1548 d.autoRotate.rotation = d.mod ? d.mod.call(this._tween, proxy.rotation, this.t, this._tween) : proxy.rotation; //special case for ModifyPlugin to hook into an auto-rotating bezier 1549 } 1550 //at the end, we must set the CSSPropTween's "e" (end) value dynamically here because that's what is used in the final setRatio() method. Same for "b" at the beginning. 1551 if (v === 1 || v === 0) { 1552 mpt = d.firstMPT; 1553 p = (v === 1) ? "e" : "b"; 1554 while (mpt) { 1555 pt = mpt.t; 1556 if (!pt.type) { 1557 pt[p] = pt.s + pt.xs0; 1558 } else if (pt.type === 1) { 1559 str = pt.xs0 + pt.s + pt.xs1; 1560 for (i = 1; i < pt.l; i++) { 1561 str += pt["xn"+i] + pt["xs"+(i+1)]; 1562 } 1563 pt[p] = str; 1564 } 1565 mpt = mpt._next; 1566 } 1567 } 1568 }, 1569 1570 /** 1571 * @private @constructor Used by a few SpecialProps to hold important values for proxies. For example, _parseToProxy() creates a MiniPropTween instance for each property that must get tweened on the proxy, and we record the original property name as well as the unique one we create for the proxy, plus whether or not the value needs to be rounded plus the original value. 1572 * @param {!Object} t target object whose property we're tweening (often a CSSPropTween) 1573 * @param {!string} p property name 1574 * @param {(number|string|object)} v value 1575 * @param {MiniPropTween=} next next MiniPropTween in the linked list 1576 * @param {boolean=} r if true, the tweened value should be rounded to the nearest integer 1577 */ 1578 MiniPropTween = function(t, p, v, next, r) { 1579 this.t = t; 1580 this.p = p; 1581 this.v = v; 1582 this.r = r; 1583 if (next) { 1584 next._prev = this; 1585 this._next = next; 1586 } 1587 }, 1588 1589 /** 1590 * @private Most other plugins (like BezierPlugin and ThrowPropsPlugin and others) can only tween numeric values, but CSSPlugin must accommodate special values that have a bunch of extra data (like a suffix or strings between numeric values, etc.). For example, boxShadow has values like "10px 10px 20px 30px rgb(255,0,0)" which would utterly confuse other plugins. This method allows us to split that data apart and grab only the numeric data and attach it to uniquely-named properties of a generic proxy object ({}) so that we can feed that to virtually any plugin to have the numbers tweened. However, we must also keep track of which properties from the proxy go with which CSSPropTween values and instances. So we create a linked list of MiniPropTweens. Each one records a target (the original CSSPropTween), property (like "s" or "xn1" or "xn2") that we're tweening and the unique property name that was used for the proxy (like "boxShadow_xn1" and "boxShadow_xn2") and whether or not they need to be rounded. That way, in the _setPluginRatio() method we can simply copy the values over from the proxy to the CSSPropTween instance(s). Then, when the main CSSPlugin setRatio() method runs and applies the CSSPropTween values accordingly, they're updated nicely. So the external plugin tweens the numbers, _setPluginRatio() copies them over, and setRatio() acts normally, applying css-specific values to the element. 1591 * This method returns an object that has the following properties: 1592 * - proxy: a generic object containing the starting values for all the properties that will be tweened by the external plugin. This is what we feed to the external _onInitTween() as the target 1593 * - end: a generic object containing the ending values for all the properties that will be tweened by the external plugin. This is what we feed to the external plugin's _onInitTween() as the destination values 1594 * - firstMPT: the first MiniPropTween in the linked list 1595 * - pt: the first CSSPropTween in the linked list that was created when parsing. If shallow is true, this linked list will NOT attach to the one passed into the _parseToProxy() as the "pt" (4th) parameter. 1596 * @param {!Object} t target object to be tweened 1597 * @param {!(Object|string)} vars the object containing the information about the tweening values (typically the end/destination values) that should be parsed 1598 * @param {!CSSPlugin} cssp The CSSPlugin instance 1599 * @param {CSSPropTween=} pt the next CSSPropTween in the linked list 1600 * @param {TweenPlugin=} plugin the external TweenPlugin instance that will be handling tweening the numeric values 1601 * @param {boolean=} shallow if true, the resulting linked list from the parse will NOT be attached to the CSSPropTween that was passed in as the "pt" (4th) parameter. 1602 * @return An object containing the following properties: proxy, end, firstMPT, and pt (see above for descriptions) 1603 */ 1604 _parseToProxy = _internals._parseToProxy = function(t, vars, cssp, pt, plugin, shallow) { 1605 var bpt = pt, 1606 start = {}, 1607 end = {}, 1608 transform = cssp._transform, 1609 oldForce = _forcePT, 1610 i, p, xp, mpt, firstPT; 1611 cssp._transform = null; 1612 _forcePT = vars; 1613 pt = firstPT = cssp.parse(t, vars, pt, plugin); 1614 _forcePT = oldForce; 1615 //break off from the linked list so the new ones are isolated. 1616 if (shallow) { 1617 cssp._transform = transform; 1618 if (bpt) { 1619 bpt._prev = null; 1620 if (bpt._prev) { 1621 bpt._prev._next = null; 1622 } 1623 } 1624 } 1625 while (pt && pt !== bpt) { 1626 if (pt.type <= 1) { 1627 p = pt.p; 1628 end[p] = pt.s + pt.c; 1629 start[p] = pt.s; 1630 if (!shallow) { 1631 mpt = new MiniPropTween(pt, "s", p, mpt, pt.r); 1632 pt.c = 0; 1633 } 1634 if (pt.type === 1) { 1635 i = pt.l; 1636 while (--i > 0) { 1637 xp = "xn" + i; 1638 p = pt.p + "_" + xp; 1639 end[p] = pt.data[xp]; 1640 start[p] = pt[xp]; 1641 if (!shallow) { 1642 mpt = new MiniPropTween(pt, xp, p, mpt, pt.rxp[xp]); 1643 } 1644 } 1645 } 1646 } 1647 pt = pt._next; 1648 } 1649 return {proxy:start, end:end, firstMPT:mpt, pt:firstPT}; 1650 }, 1651 1652 1653 1654 /** 1655 * @constructor Each property that is tweened has at least one CSSPropTween associated with it. These instances store important information like the target, property, starting value, amount of change, etc. They can also optionally have a number of "extra" strings and numeric values named xs1, xn1, xs2, xn2, xs3, xn3, etc. where "s" indicates string and "n" indicates number. These can be pieced together in a complex-value tween (type:1) that has alternating types of data like a string, number, string, number, etc. For example, boxShadow could be "5px 5px 8px rgb(102, 102, 51)". In that value, there are 6 numbers that may need to tween and then pieced back together into a string again with spaces, suffixes, etc. xs0 is special in that it stores the suffix for standard (type:0) tweens, -OR- the first string (prefix) in a complex-value (type:1) CSSPropTween -OR- it can be the non-tweening value in a type:-1 CSSPropTween. We do this to conserve memory. 1656 * CSSPropTweens have the following optional properties as well (not defined through the constructor): 1657 * - l: Length in terms of the number of extra properties that the CSSPropTween has (default: 0). For example, for a boxShadow we may need to tween 5 numbers in which case l would be 5; Keep in mind that the start/end values for the first number that's tweened are always stored in the s and c properties to conserve memory. All additional values thereafter are stored in xn1, xn2, etc. 1658 * - xfirst: The first instance of any sub-CSSPropTweens that are tweening properties of this instance. For example, we may split up a boxShadow tween so that there's a main CSSPropTween of type:1 that has various xs* and xn* values associated with the h-shadow, v-shadow, blur, color, etc. Then we spawn a CSSPropTween for each of those that has a higher priority and runs BEFORE the main CSSPropTween so that the values are all set by the time it needs to re-assemble them. The xfirst gives us an easy way to identify the first one in that chain which typically ends at the main one (because they're all prepende to the linked list) 1659 * - plugin: The TweenPlugin instance that will handle the tweening of any complex values. For example, sometimes we don't want to use normal subtweens (like xfirst refers to) to tween the values - we might want ThrowPropsPlugin or BezierPlugin some other plugin to do the actual tweening, so we create a plugin instance and store a reference here. We need this reference so that if we get a request to round values or disable a tween, we can pass along that request. 1660 * - data: Arbitrary data that needs to be stored with the CSSPropTween. Typically if we're going to have a plugin handle the tweening of a complex-value tween, we create a generic object that stores the END values that we're tweening to and the CSSPropTween's xs1, xs2, etc. have the starting values. We store that object as data. That way, we can simply pass that object to the plugin and use the CSSPropTween as the target. 1661 * - setRatio: Only used for type:2 tweens that require custom functionality. In this case, we call the CSSPropTween's setRatio() method and pass the ratio each time the tween updates. This isn't quite as efficient as doing things directly in the CSSPlugin's setRatio() method, but it's very convenient and flexible. 1662 * @param {!Object} t Target object whose property will be tweened. Often a DOM element, but not always. It could be anything. 1663 * @param {string} p Property to tween (name). For example, to tween element.width, p would be "width". 1664 * @param {number} s Starting numeric value 1665 * @param {number} c Change in numeric value over the course of the entire tween. For example, if element.width starts at 5 and should end at 100, c would be 95. 1666 * @param {CSSPropTween=} next The next CSSPropTween in the linked list. If one is defined, we will define its _prev as the new instance, and the new instance's _next will be pointed at it. 1667 * @param {number=} type The type of CSSPropTween where -1 = a non-tweening value, 0 = a standard simple tween, 1 = a complex value (like one that has multiple numbers in a comma- or space-delimited string like border:"1px solid red"), and 2 = one that uses a custom setRatio function that does all of the work of applying the values on each update. 1668 * @param {string=} n Name of the property that should be used for overwriting purposes which is typically the same as p but not always. For example, we may need to create a subtween for the 2nd part of a "clip:rect(...)" tween in which case "p" might be xs1 but "n" is still "clip" 1669 * @param {boolean=} r If true, the value(s) should be rounded 1670 * @param {number=} pr Priority in the linked list order. Higher priority CSSPropTweens will be updated before lower priority ones. The default priority is 0. 1671 * @param {string=} b Beginning value. We store this to ensure that it is EXACTLY what it was when the tween began without any risk of interpretation issues. 1672 * @param {string=} e Ending value. We store this to ensure that it is EXACTLY what the user defined at the end of the tween without any risk of interpretation issues. 1673 */ 1674 CSSPropTween = _internals.CSSPropTween = function(t, p, s, c, next, type, n, r, pr, b, e) { 1675 this.t = t; //target 1676 this.p = p; //property 1677 this.s = s; //starting value 1678 this.c = c; //change value 1679 this.n = n || p; //name that this CSSPropTween should be associated to (usually the same as p, but not always - n is what overwriting looks at) 1680 if (!(t instanceof CSSPropTween)) { 1681 _overwriteProps.push(this.n); 1682 } 1683 this.r = !r ? r : (typeof(r) === "function") ? r : Math.round; //round (boolean) 1684 this.type = type || 0; //0 = normal tween, -1 = non-tweening (in which case xs0 will be applied to the target's property, like tp.t[tp.p] = tp.xs0), 1 = complex-value SpecialProp, 2 = custom setRatio() that does all the work 1685 if (pr) { 1686 this.pr = pr; 1687 _hasPriority = true; 1688 } 1689 this.b = (b === undefined) ? s : b; 1690 this.e = (e === undefined) ? s + c : e; 1691 if (next) { 1692 this._next = next; 1693 next._prev = this; 1694 } 1695 }, 1696 1697 _addNonTweeningNumericPT = function(target, prop, start, end, next, overwriteProp) { //cleans up some code redundancies and helps minification. Just a fast way to add a NUMERIC non-tweening CSSPropTween 1698 var pt = new CSSPropTween(target, prop, start, end - start, next, -1, overwriteProp); 1699 pt.b = start; 1700 pt.e = pt.xs0 = end; 1701 return pt; 1702 }, 1703 1704 /** 1705 * Takes a target, the beginning value and ending value (as strings) and parses them into a CSSPropTween (possibly with child CSSPropTweens) that accommodates multiple numbers, colors, comma-delimited values, etc. For example: 1706 * sp.parseComplex(element, "boxShadow", "5px 10px 20px rgb(255,102,51)", "0px 0px 0px red", true, "0px 0px 0px rgb(0,0,0,0)", pt); 1707 * It will walk through the beginning and ending values (which should be in the same format with the same number and type of values) and figure out which parts are numbers, what strings separate the numeric/tweenable values, and then create the CSSPropTweens accordingly. If a plugin is defined, no child CSSPropTweens will be created. Instead, the ending values will be stored in the "data" property of the returned CSSPropTween like: {s:-5, xn1:-10, xn2:-20, xn3:255, xn4:0, xn5:0} so that it can be fed to any other plugin and it'll be plain numeric tweens but the recomposition of the complex value will be handled inside CSSPlugin's setRatio(). 1708 * If a setRatio is defined, the type of the CSSPropTween will be set to 2 and recomposition of the values will be the responsibility of that method. 1709 * 1710 * @param {!Object} t Target whose property will be tweened 1711 * @param {!string} p Property that will be tweened (its name, like "left" or "backgroundColor" or "boxShadow") 1712 * @param {string} b Beginning value 1713 * @param {string} e Ending value 1714 * @param {boolean} clrs If true, the value could contain a color value like "rgb(255,0,0)" or "#F00" or "red". The default is false, so no colors will be recognized (a performance optimization) 1715 * @param {(string|number|Object)} dflt The default beginning value that should be used if no valid beginning value is defined or if the number of values inside the complex beginning and ending values don't match 1716 * @param {?CSSPropTween} pt CSSPropTween instance that is the current head of the linked list (we'll prepend to this). 1717 * @param {number=} pr Priority in the linked list order. Higher priority properties will be updated before lower priority ones. The default priority is 0. 1718 * @param {TweenPlugin=} plugin If a plugin should handle the tweening of extra properties, pass the plugin instance here. If one is defined, then NO subtweens will be created for any extra properties (the properties will be created - just not additional CSSPropTween instances to tween them) because the plugin is expected to do so. However, the end values WILL be populated in the "data" property, like {s:100, xn1:50, xn2:300} 1719 * @param {function(number)=} setRatio If values should be set in a custom function instead of being pieced together in a type:1 (complex-value) CSSPropTween, define that custom function here. 1720 * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parseComplex() call. 1721 */ 1722 _parseComplex = CSSPlugin.parseComplex = function(t, p, b, e, clrs, dflt, pt, pr, plugin, setRatio) { 1723 //DEBUG: _log("parseComplex: "+p+", b: "+b+", e: "+e); 1724 b = b || dflt || ""; 1725 if (typeof(e) === "function") { 1726 e = e(_index, _target); 1727 } 1728 pt = new CSSPropTween(t, p, 0, 0, pt, (setRatio ? 2 : 1), null, false, pr, b, e); 1729 e += ""; //ensures it's a string 1730 if (clrs && _colorExp.test(e + b)) { //if colors are found, normalize the formatting to rgba() or hsla(). 1731 e = [b, e]; 1732 CSSPlugin.colorStringFilter(e); 1733 b = e[0]; 1734 e = e[1]; 1735 } 1736 var ba = b.split(", ").join(",").split(" "), //beginning array 1737 ea = e.split(", ").join(",").split(" "), //ending array 1738 l = ba.length, 1739 autoRound = (_autoRound !== false), 1740 i, xi, ni, bv, ev, bnums, enums, bn, hasAlpha, temp, cv, str, useHSL; 1741 if (e.indexOf(",") !== -1 || b.indexOf(",") !== -1) { 1742 if ((e + b).indexOf("rgb") !== -1 || (e + b).indexOf("hsl") !== -1) { //keep rgb(), rgba(), hsl(), and hsla() values together! (remember, we're splitting on spaces) 1743 ba = ba.join(" ").replace(_commasOutsideParenExp, ", ").split(" "); 1744 ea = ea.join(" ").replace(_commasOutsideParenExp, ", ").split(" "); 1745 } else { 1746 ba = ba.join(" ").split(",").join(", ").split(" "); 1747 ea = ea.join(" ").split(",").join(", ").split(" "); 1748 } 1749 l = ba.length; 1750 } 1751 if (l !== ea.length) { 1752 //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")"); 1753 ba = (dflt || "").split(" "); 1754 l = ba.length; 1755 } 1756 pt.plugin = plugin; 1757 pt.setRatio = setRatio; 1758 _colorExp.lastIndex = 0; 1759 for (i = 0; i < l; i++) { 1760 bv = ba[i]; 1761 ev = ea[i] + ""; 1762 bn = parseFloat(bv); 1763 //if the value begins with a number (most common). It's fine if it has a suffix like px 1764 if (bn || bn === 0) { 1765 pt.appendXtra("", bn, _parseChange(ev, bn), ev.replace(_relNumExp, ""), (autoRound && ev.indexOf("px") !== -1) ? Math.round : false, true); 1766 1767 //if the value is a color 1768 } else if (clrs && _colorExp.test(bv)) { 1769 str = ev.indexOf(")") + 1; 1770 str = ")" + (str ? ev.substr(str) : ""); //if there's a comma or ) at the end, retain it. 1771 useHSL = (ev.indexOf("hsl") !== -1 && _supportsOpacity); 1772 temp = ev; //original string value so we can look for any prefix later. 1773 bv = _parseColor(bv, useHSL); 1774 ev = _parseColor(ev, useHSL); 1775 hasAlpha = (bv.length + ev.length > 6); 1776 if (hasAlpha && !_supportsOpacity && ev[3] === 0) { //older versions of IE don't support rgba(), so if the destination alpha is 0, just use "transparent" for the end color 1777 pt["xs" + pt.l] += pt.l ? " transparent" : "transparent"; 1778 pt.e = pt.e.split(ea[i]).join("transparent"); 1779 } else { 1780 if (!_supportsOpacity) { //old versions of IE don't support rgba(). 1781 hasAlpha = false; 1782 } 1783 if (useHSL) { 1784 pt.appendXtra(temp.substr(0, temp.indexOf("hsl")) + (hasAlpha ? "hsla(" : "hsl("), bv[0], _parseChange(ev[0], bv[0]), ",", false, true) 1785 .appendXtra("", bv[1], _parseChange(ev[1], bv[1]), "%,", false) 1786 .appendXtra("", bv[2], _parseChange(ev[2], bv[2]), (hasAlpha ? "%," : "%" + str), false); 1787 } else { 1788 pt.appendXtra(temp.substr(0, temp.indexOf("rgb")) + (hasAlpha ? "rgba(" : "rgb("), bv[0], ev[0] - bv[0], ",", Math.round, true) 1789 .appendXtra("", bv[1], ev[1] - bv[1], ",", Math.round) 1790 .appendXtra("", bv[2], ev[2] - bv[2], (hasAlpha ? "," : str), Math.round); 1791 } 1792 1793 if (hasAlpha) { 1794 bv = (bv.length < 4) ? 1 : bv[3]; 1795 pt.appendXtra("", bv, ((ev.length < 4) ? 1 : ev[3]) - bv, str, false); 1796 } 1797 } 1798 _colorExp.lastIndex = 0; //otherwise the test() on the RegExp could move the lastIndex and taint future results. 1799 1800 } else { 1801 bnums = bv.match(_numExp); //gets each group of numbers in the beginning value string and drops them into an array 1802 1803 //if no number is found, treat it as a non-tweening value and just append the string to the current xs. 1804 if (!bnums) { 1805 pt["xs" + pt.l] += (pt.l || pt["xs" + pt.l]) ? " " + ev : ev; 1806 1807 //loop through all the numbers that are found and construct the extra values on the pt. 1808 } else { 1809 enums = ev.match(_relNumExp); //get each group of numbers in the end value string and drop them into an array. We allow relative values too, like +=50 or -=.5 1810 if (!enums || enums.length !== bnums.length) { 1811 //DEBUG: _log("mismatched formatting detected on " + p + " (" + b + " vs " + e + ")"); 1812 return pt; 1813 } 1814 ni = 0; 1815 for (xi = 0; xi < bnums.length; xi++) { 1816 cv = bnums[xi]; 1817 temp = bv.indexOf(cv, ni); 1818 pt.appendXtra(bv.substr(ni, temp - ni), Number(cv), _parseChange(enums[xi], cv), "", (autoRound && bv.substr(temp + cv.length, 2) === "px") ? Math.round : false, (xi === 0)); 1819 ni = temp + cv.length; 1820 } 1821 pt["xs" + pt.l] += bv.substr(ni); 1822 } 1823 } 1824 } 1825 //if there are relative values ("+=" or "-=" prefix), we need to adjust the ending value to eliminate the prefixes and combine the values properly. 1826 if (e.indexOf("=") !== -1) if (pt.data) { 1827 str = pt.xs0 + pt.data.s; 1828 for (i = 1; i < pt.l; i++) { 1829 str += pt["xs" + i] + pt.data["xn" + i]; 1830 } 1831 pt.e = str + pt["xs" + i]; 1832 } 1833 if (!pt.l) { 1834 pt.type = -1; 1835 pt.xs0 = pt.e; 1836 } 1837 return pt.xfirst || pt; 1838 }, 1839 i = 9; 1840 1841 1842 p = CSSPropTween.prototype; 1843 p.l = p.pr = 0; //length (number of extra properties like xn1, xn2, xn3, etc. 1844 while (--i > 0) { 1845 p["xn" + i] = 0; 1846 p["xs" + i] = ""; 1847 } 1848 p.xs0 = ""; 1849 p._next = p._prev = p.xfirst = p.data = p.plugin = p.setRatio = p.rxp = null; 1850 1851 1852 /** 1853 * Appends and extra tweening value to a CSSPropTween and automatically manages any prefix and suffix strings. The first extra value is stored in the s and c of the main CSSPropTween instance, but thereafter any extras are stored in the xn1, xn2, xn3, etc. The prefixes and suffixes are stored in the xs0, xs1, xs2, etc. properties. For example, if I walk through a clip value like "rect(10px, 5px, 0px, 20px)", the values would be stored like this: 1854 * xs0:"rect(", s:10, xs1:"px, ", xn1:5, xs2:"px, ", xn2:0, xs3:"px, ", xn3:20, xn4:"px)" 1855 * And they'd all get joined together when the CSSPlugin renders (in the setRatio() method). 1856 * @param {string=} pfx Prefix (if any) 1857 * @param {!number} s Starting value 1858 * @param {!number} c Change in numeric value over the course of the entire tween. For example, if the start is 5 and the end is 100, the change would be 95. 1859 * @param {string=} sfx Suffix (if any) 1860 * @param {boolean=} r Round (if true). 1861 * @param {boolean=} pad If true, this extra value should be separated by the previous one by a space. If there is no previous extra and pad is true, it will automatically drop the space. 1862 * @return {CSSPropTween} returns itself so that multiple methods can be chained together. 1863 */ 1864 p.appendXtra = function(pfx, s, c, sfx, r, pad) { 1865 var pt = this, 1866 l = pt.l; 1867 pt["xs" + l] += (pad && (l || pt["xs" + l])) ? " " + pfx : pfx || ""; 1868 if (!c) if (l !== 0 && !pt.plugin) { //typically we'll combine non-changing values right into the xs to optimize performance, but we don't combine them when there's a plugin that will be tweening the values because it may depend on the values being split apart, like for a bezier, if a value doesn't change between the first and second iteration but then it does on the 3rd, we'll run into trouble because there's no xn slot for that value! 1869 pt["xs" + l] += s + (sfx || ""); 1870 return pt; 1871 } 1872 pt.l++; 1873 pt.type = pt.setRatio ? 2 : 1; 1874 pt["xs" + pt.l] = sfx || ""; 1875 if (l > 0) { 1876 pt.data["xn" + l] = s + c; 1877 pt.rxp["xn" + l] = r; //round extra property (we need to tap into this in the _parseToProxy() method) 1878 pt["xn" + l] = s; 1879 if (!pt.plugin) { 1880 pt.xfirst = new CSSPropTween(pt, "xn" + l, s, c, pt.xfirst || pt, 0, pt.n, r, pt.pr); 1881 pt.xfirst.xs0 = 0; //just to ensure that the property stays numeric which helps modern browsers speed up processing. Remember, in the setRatio() method, we do pt.t[pt.p] = val + pt.xs0 so if pt.xs0 is "" (the default), it'll cast the end value as a string. When a property is a number sometimes and a string sometimes, it prevents the compiler from locking in the data type, slowing things down slightly. 1882 } 1883 return pt; 1884 } 1885 pt.data = {s:s + c}; 1886 pt.rxp = {}; 1887 pt.s = s; 1888 pt.c = c; 1889 pt.r = r; 1890 return pt; 1891 }; 1892 1893 /** 1894 * @constructor A SpecialProp is basically a css property that needs to be treated in a non-standard way, like if it may contain a complex value like boxShadow:"5px 10px 15px rgb(255, 102, 51)" or if it is associated with another plugin like ThrowPropsPlugin or BezierPlugin. Every SpecialProp is associated with a particular property name like "boxShadow" or "throwProps" or "bezier" and it will intercept those values in the vars object that's passed to the CSSPlugin and handle them accordingly. 1895 * @param {!string} p Property name (like "boxShadow" or "throwProps") 1896 * @param {Object=} options An object containing any of the following configuration options: 1897 * - defaultValue: the default value 1898 * - parser: A function that should be called when the associated property name is found in the vars. This function should return a CSSPropTween instance and it should ensure that it is properly inserted into the linked list. It will receive 4 paramters: 1) The target, 2) The value defined in the vars, 3) The CSSPlugin instance (whose _firstPT should be used for the linked list), and 4) A computed style object if one was calculated (this is a speed optimization that allows retrieval of starting values quicker) 1899 * - formatter: a function that formats any value received for this special property (for example, boxShadow could take "5px 5px red" and format it to "5px 5px 0px 0px red" so that both the beginning and ending values have a common order and quantity of values.) 1900 * - prefix: if true, we'll determine whether or not this property requires a vendor prefix (like Webkit or Moz or ms or O) 1901 * - color: set this to true if the value for this SpecialProp may contain color-related values like rgb(), rgba(), etc. 1902 * - priority: priority in the linked list order. Higher priority SpecialProps will be updated before lower priority ones. The default priority is 0. 1903 * - multi: if true, the formatter should accommodate a comma-delimited list of values, like boxShadow could have multiple boxShadows listed out. 1904 * - collapsible: if true, the formatter should treat the value like it's a top/right/bottom/left value that could be collapsed, like "5px" would apply to all, "5px, 10px" would use 5px for top/bottom and 10px for right/left, etc. 1905 * - keyword: a special keyword that can [optionally] be found inside the value (like "inset" for boxShadow). This allows us to validate beginning/ending values to make sure they match (if the keyword is found in one, it'll be added to the other for consistency by default). 1906 */ 1907 var SpecialProp = function(p, options) { 1908 options = options || {}; 1909 this.p = options.prefix ? _checkPropPrefix(p) || p : p; 1910 _specialProps[p] = _specialProps[this.p] = this; 1911 this.format = options.formatter || _getFormatter(options.defaultValue, options.color, options.collapsible, options.multi); 1912 if (options.parser) { 1913 this.parse = options.parser; 1914 } 1915 this.clrs = options.color; 1916 this.multi = options.multi; 1917 this.keyword = options.keyword; 1918 this.dflt = options.defaultValue; 1919 this.allowFunc = options.allowFunc; 1920 this.pr = options.priority || 0; 1921 }, 1922 1923 //shortcut for creating a new SpecialProp that can accept multiple properties as a comma-delimited list (helps minification). dflt can be an array for multiple values (we don't do a comma-delimited list because the default value may contain commas, like rect(0px,0px,0px,0px)). We attach this method to the SpecialProp class/object instead of using a private _createSpecialProp() method so that we can tap into it externally if necessary, like from another plugin. 1924 _registerComplexSpecialProp = _internals._registerComplexSpecialProp = function(p, options, defaults) { 1925 if (typeof(options) !== "object") { 1926 options = {parser:defaults}; //to make backwards compatible with older versions of BezierPlugin and ThrowPropsPlugin 1927 } 1928 var a = p.split(","), 1929 d = options.defaultValue, 1930 i, temp; 1931 defaults = defaults || [d]; 1932 for (i = 0; i < a.length; i++) { 1933 options.prefix = (i === 0 && options.prefix); 1934 options.defaultValue = defaults[i] || d; 1935 temp = new SpecialProp(a[i], options); 1936 } 1937 }, 1938 1939 //creates a placeholder special prop for a plugin so that the property gets caught the first time a tween of it is attempted, and at that time it makes the plugin register itself, thus taking over for all future tweens of that property. This allows us to not mandate that things load in a particular order and it also allows us to log() an error that informs the user when they attempt to tween an external plugin-related property without loading its .js file. 1940 _registerPluginProp = _internals._registerPluginProp = function(p) { 1941 if (!_specialProps[p]) { 1942 var pluginName = p.charAt(0).toUpperCase() + p.substr(1) + "Plugin"; 1943 _registerComplexSpecialProp(p, {parser:function(t, e, p, cssp, pt, plugin, vars) { 1944 var pluginClass = _globals.com.greensock.plugins[pluginName]; 1945 if (!pluginClass) { 1946 _log("Error: " + pluginName + " js file not loaded."); 1947 return pt; 1948 } 1949 pluginClass._cssRegister(); 1950 return _specialProps[p].parse(t, e, p, cssp, pt, plugin, vars); 1951 }}); 1952 } 1953 }; 1954 1955 1956 p = SpecialProp.prototype; 1957 1958 /** 1959 * Alias for _parseComplex() that automatically plugs in certain values for this SpecialProp, like its property name, whether or not colors should be sensed, the default value, and priority. It also looks for any keyword that the SpecialProp defines (like "inset" for boxShadow) and ensures that the beginning and ending values have the same number of values for SpecialProps where multi is true (like boxShadow and textShadow can have a comma-delimited list) 1960 * @param {!Object} t target element 1961 * @param {(string|number|object)} b beginning value 1962 * @param {(string|number|object)} e ending (destination) value 1963 * @param {CSSPropTween=} pt next CSSPropTween in the linked list 1964 * @param {TweenPlugin=} plugin If another plugin will be tweening the complex value, that TweenPlugin instance goes here. 1965 * @param {function=} setRatio If a custom setRatio() method should be used to handle this complex value, that goes here. 1966 * @return {CSSPropTween=} First CSSPropTween in the linked list 1967 */ 1968 p.parseComplex = function(t, b, e, pt, plugin, setRatio) { 1969 var kwd = this.keyword, 1970 i, ba, ea, l, bi, ei; 1971 //if this SpecialProp's value can contain a comma-delimited list of values (like boxShadow or textShadow), we must parse them in a special way, and look for a keyword (like "inset" for boxShadow) and ensure that the beginning and ending BOTH have it if the end defines it as such. We also must ensure that there are an equal number of values specified (we can't tween 1 boxShadow to 3 for example) 1972 if (this.multi) if (_commasOutsideParenExp.test(e) || _commasOutsideParenExp.test(b)) { 1973 ba = b.replace(_commasOutsideParenExp, "|").split("|"); 1974 ea = e.replace(_commasOutsideParenExp, "|").split("|"); 1975 } else if (kwd) { 1976 ba = [b]; 1977 ea = [e]; 1978 } 1979 if (ea) { 1980 l = (ea.length > ba.length) ? ea.length : ba.length; 1981 for (i = 0; i < l; i++) { 1982 b = ba[i] = ba[i] || this.dflt; 1983 e = ea[i] = ea[i] || this.dflt; 1984 if (kwd) { 1985 bi = b.indexOf(kwd); 1986 ei = e.indexOf(kwd); 1987 if (bi !== ei) { 1988 if (ei === -1) { //if the keyword isn't in the end value, remove it from the beginning one. 1989 ba[i] = ba[i].split(kwd).join(""); 1990 } else if (bi === -1) { //if the keyword isn't in the beginning, add it. 1991 ba[i] += " " + kwd; 1992 } 1993 } 1994 } 1995 } 1996 b = ba.join(", "); 1997 e = ea.join(", "); 1998 } 1999 return _parseComplex(t, this.p, b, e, this.clrs, this.dflt, pt, this.pr, plugin, setRatio); 2000 }; 2001 2002 /** 2003 * Accepts a target and end value and spits back a CSSPropTween that has been inserted into the CSSPlugin's linked list and conforms with all the conventions we use internally, like type:-1, 0, 1, or 2, setting up any extra property tweens, priority, etc. For example, if we have a boxShadow SpecialProp and call: 2004 * this._firstPT = sp.parse(element, "5px 10px 20px rgb(2550,102,51)", "boxShadow", this); 2005 * It should figure out the starting value of the element's boxShadow, compare it to the provided end value and create all the necessary CSSPropTweens of the appropriate types to tween the boxShadow. The CSSPropTween that gets spit back should already be inserted into the linked list (the 4th parameter is the current head, so prepend to that). 2006 * @param {!Object} t Target object whose property is being tweened 2007 * @param {Object} e End value as provided in the vars object (typically a string, but not always - like a throwProps would be an object). 2008 * @param {!string} p Property name 2009 * @param {!CSSPlugin} cssp The CSSPlugin instance that should be associated with this tween. 2010 * @param {?CSSPropTween} pt The CSSPropTween that is the current head of the linked list (we'll prepend to it) 2011 * @param {TweenPlugin=} plugin If a plugin will be used to tween the parsed value, this is the plugin instance. 2012 * @param {Object=} vars Original vars object that contains the data for parsing. 2013 * @return {CSSPropTween} The first CSSPropTween in the linked list which includes the new one(s) added by the parse() call. 2014 */ 2015 p.parse = function(t, e, p, cssp, pt, plugin, vars) { 2016 return this.parseComplex(t.style, this.format(_getStyle(t, this.p, _cs, false, this.dflt)), this.format(e), pt, plugin); 2017 }; 2018 2019 /** 2020 * Registers a special property that should be intercepted from any "css" objects defined in tweens. This allows you to handle them however you want without CSSPlugin doing it for you. The 2nd parameter should be a function that accepts 3 parameters: 2021 * 1) Target object whose property should be tweened (typically a DOM element) 2022 * 2) The end/destination value (could be a string, number, object, or whatever you want) 2023 * 3) The tween instance (you probably don't need to worry about this, but it can be useful for looking up information like the duration) 2024 * 2025 * Then, your function should return a function which will be called each time the tween gets rendered, passing a numeric "ratio" parameter to your function that indicates the change factor (usually between 0 and 1). For example: 2026 * 2027 * CSSPlugin.registerSpecialProp("myCustomProp", function(target, value, tween) { 2028 * var start = target.style.width; 2029 * return function(ratio) { 2030 * target.style.width = (start + value * ratio) + "px"; 2031 * console.log("set width to " + target.style.width); 2032 * } 2033 * }, 0); 2034 * 2035 * Then, when I do this tween, it will trigger my special property: 2036 * 2037 * TweenLite.to(element, 1, {css:{myCustomProp:100}}); 2038 * 2039 * In the example, of course, we're just changing the width, but you can do anything you want. 2040 * 2041 * @param {!string} name Property name (or comma-delimited list of property names) that should be intercepted and handled by your function. For example, if I define "myCustomProp", then it would handle that portion of the following tween: TweenLite.to(element, 1, {css:{myCustomProp:100}}) 2042 * @param {!function(Object, Object, Object, string):function(number)} onInitTween The function that will be called when a tween of this special property is performed. The function will receive 4 parameters: 1) Target object that should be tweened, 2) Value that was passed to the tween, 3) The tween instance itself (rarely used), and 4) The property name that's being tweened. Your function should return a function that should be called on every update of the tween. That function will receive a single parameter that is a "change factor" value (typically between 0 and 1) indicating the amount of change as a ratio. You can use this to determine how to set the values appropriately in your function. 2043 * @param {number=} priority Priority that helps the engine determine the order in which to set the properties (default: 0). Higher priority properties will be updated before lower priority ones. 2044 */ 2045 CSSPlugin.registerSpecialProp = function(name, onInitTween, priority) { 2046 _registerComplexSpecialProp(name, {parser:function(t, e, p, cssp, pt, plugin, vars) { 2047 var rv = new CSSPropTween(t, p, 0, 0, pt, 2, p, false, priority); 2048 rv.plugin = plugin; 2049 rv.setRatio = onInitTween(t, e, cssp._tween, p); 2050 return rv; 2051 }, priority:priority}); 2052 }; 2053 2054 2055 2056 2057 2058 2059 //transform-related methods and properties 2060 CSSPlugin.useSVGTransformAttr = true; //Safari and Firefox both have some rendering bugs when applying CSS transforms to SVG elements, so default to using the "transform" attribute instead (users can override this). 2061 var _transformProps = ("scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent").split(","), 2062 _transformProp = _checkPropPrefix("transform"), //the Javascript (camelCase) transform property, like msTransform, WebkitTransform, MozTransform, or OTransform. 2063 _transformPropCSS = _prefixCSS + "transform", 2064 _transformOriginProp = _checkPropPrefix("transformOrigin"), 2065 _supports3D = (_checkPropPrefix("perspective") !== null), 2066 Transform = _internals.Transform = function() { 2067 this.perspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0; 2068 this.force3D = (CSSPlugin.defaultForce3D === false || !_supports3D) ? false : CSSPlugin.defaultForce3D || "auto"; 2069 }, 2070 _SVGElement = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"].SVGElement, 2071 _useSVGTransformAttr, 2072 //Some browsers (like Firefox and IE) don't honor transform-origin properly in SVG elements, so we need to manually adjust the matrix accordingly. We feature detect here rather than always doing the conversion for certain browsers because they may fix the problem at some point in the future. 2073 2074 _createSVG = function(type, container, attributes) { 2075 var element = _doc.createElementNS("http://www.w3.org/2000/svg", type), 2076 reg = /([a-z])([A-Z])/g, 2077 p; 2078 for (p in attributes) { 2079 element.setAttributeNS(null, p.replace(reg, "$1-$2").toLowerCase(), attributes[p]); 2080 } 2081 container.appendChild(element); 2082 return element; 2083 }, 2084 _docElement = _doc.documentElement || {}, 2085 _forceSVGTransformAttr = (function() { 2086 //IE and Android stock don't support CSS transforms on SVG elements, so we must write them to the "transform" attribute. We populate this variable in the _parseTransform() method, and only if/when we come across an SVG element 2087 var force = _ieVers || (/Android/i.test(_agent) && !_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"].chrome), 2088 svg, rect, width; 2089 if (_doc.createElementNS && _docElement.appendChild && !force) { //IE8 and earlier doesn't support SVG anyway 2090 svg = _createSVG("svg", _docElement); 2091 rect = _createSVG("rect", svg, {width:100, height:50, x:100}); 2092 width = rect.getBoundingClientRect().width; 2093 rect.style[_transformOriginProp] = "50% 50%"; 2094 rect.style[_transformProp] = "scaleX(0.5)"; 2095 force = (width === rect.getBoundingClientRect().width && !(_isFirefox && _supports3D)); //note: Firefox fails the test even though it does support CSS transforms in 3D. Since we can't push 3D stuff into the transform attribute, we force Firefox to pass the test here (as long as it does truly support 3D). 2096 _docElement.removeChild(svg); 2097 } 2098 return force; 2099 })(), 2100 _parseSVGOrigin = function(e, local, decoratee, absolute, smoothOrigin, skipRecord) { 2101 var tm = e._gsTransform, 2102 m = _getMatrix(e, true), 2103 v, x, y, xOrigin, yOrigin, a, b, c, d, tx, ty, determinant, xOriginOld, yOriginOld; 2104 if (tm) { 2105 xOriginOld = tm.xOrigin; //record the original values before we alter them. 2106 yOriginOld = tm.yOrigin; 2107 } 2108 if (!absolute || (v = absolute.split(" ")).length < 2) { 2109 b = e.getBBox(); 2110 if (b.x === 0 && b.y === 0 && b.width + b.height === 0) { //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. 2111 b = {x: parseFloat(e.hasAttribute("x") ? e.getAttribute("x") : e.hasAttribute("cx") ? e.getAttribute("cx") : 0) || 0, y: parseFloat(e.hasAttribute("y") ? e.getAttribute("y") : e.hasAttribute("cy") ? e.getAttribute("cy") : 0) || 0, width:0, height:0}; 2112 } 2113 local = _parsePosition(local).split(" "); 2114 v = [(local[0].indexOf("%") !== -1 ? parseFloat(local[0]) / 100 * b.width : parseFloat(local[0])) + b.x, 2115 (local[1].indexOf("%") !== -1 ? parseFloat(local[1]) / 100 * b.height : parseFloat(local[1])) + b.y]; 2116 } 2117 decoratee.xOrigin = xOrigin = parseFloat(v[0]); 2118 decoratee.yOrigin = yOrigin = parseFloat(v[1]); 2119 if (absolute && m !== _identity2DMatrix) { //if svgOrigin is being set, we must invert the matrix and determine where the absolute point is, factoring in the current transforms. Otherwise, the svgOrigin would be based on the element's non-transformed position on the canvas. 2120 a = m[0]; 2121 b = m[1]; 2122 c = m[2]; 2123 d = m[3]; 2124 tx = m[4]; 2125 ty = m[5]; 2126 determinant = (a * d - b * c); 2127 if (determinant) { //if it's zero (like if scaleX and scaleY are zero), skip it to avoid errors with dividing by zero. 2128 x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + ((c * ty - d * tx) / determinant); 2129 y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - ((a * ty - b * tx) / determinant); 2130 xOrigin = decoratee.xOrigin = v[0] = x; 2131 yOrigin = decoratee.yOrigin = v[1] = y; 2132 } 2133 } 2134 if (tm) { //avoid jump when transformOrigin is changed - adjust the x/y values accordingly 2135 if (skipRecord) { 2136 decoratee.xOffset = tm.xOffset; 2137 decoratee.yOffset = tm.yOffset; 2138 tm = decoratee; 2139 } 2140 if (smoothOrigin || (smoothOrigin !== false && CSSPlugin.defaultSmoothOrigin !== false)) { 2141 x = xOrigin - xOriginOld; 2142 y = yOrigin - yOriginOld; 2143 //originally, we simply adjusted the x and y values, but that would cause problems if, for example, you created a rotational tween part-way through an x/y tween. Managing the offset in a separate variable gives us ultimate flexibility. 2144 //tm.x -= x - (x * m[0] + y * m[2]); 2145 //tm.y -= y - (x * m[1] + y * m[3]); 2146 tm.xOffset += (x * m[0] + y * m[2]) - x; 2147 tm.yOffset += (x * m[1] + y * m[3]) - y; 2148 } else { 2149 tm.xOffset = tm.yOffset = 0; 2150 } 2151 } 2152 if (!skipRecord) { 2153 e.setAttribute("data-svg-origin", v.join(" ")); 2154 } 2155 }, 2156 _getBBoxHack = function(swapIfPossible) { //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). 2157 var svg = _createElement("svg", (this.ownerSVGElement && this.ownerSVGElement.getAttribute("xmlns")) || "http://www.w3.org/2000/svg"), 2158 oldParent = this.parentNode, 2159 oldSibling = this.nextSibling, 2160 oldCSS = this.style.cssText, 2161 bbox; 2162 _docElement.appendChild(svg); 2163 svg.appendChild(this); 2164 this.style.display = "block"; 2165 if (swapIfPossible) { 2166 try { 2167 bbox = this.getBBox(); 2168 this._originalGetBBox = this.getBBox; 2169 this.getBBox = _getBBoxHack; 2170 } catch (e) { } 2171 } else if (this._originalGetBBox) { 2172 bbox = this._originalGetBBox(); 2173 } 2174 if (oldSibling) { 2175 oldParent.insertBefore(this, oldSibling); 2176 } else { 2177 oldParent.appendChild(this); 2178 } 2179 _docElement.removeChild(svg); 2180 this.style.cssText = oldCSS; 2181 return bbox; 2182 }, 2183 _getBBox = function(e) { 2184 try { 2185 return e.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 2186 } catch (error) { 2187 return _getBBoxHack.call(e, true); 2188 } 2189 }, 2190 _isSVG = function(e) { //reports if the element is an SVG on which getBBox() actually works 2191 return !!(_SVGElement && e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e)); 2192 }, 2193 _identity2DMatrix = [1,0,0,1,0,0], 2194 _getMatrix = function(e, force2D) { 2195 var tm = e._gsTransform || new Transform(), 2196 rnd = 100000, 2197 style = e.style, 2198 isDefault, s, m, n, dec, nextSibling, parent; 2199 if (_transformProp) { 2200 s = _getStyle(e, _transformPropCSS, null, true); 2201 } else if (e.currentStyle) { 2202 //for older versions of IE, we need to interpret the filter portion that is in the format: progid:DXImageTransform.Microsoft.Matrix(M11=6.123233995736766e-17, M12=-1, M21=1, M22=6.123233995736766e-17, sizingMethod='auto expand') Notice that we need to swap b and c compared to a normal matrix. 2203 s = e.currentStyle.filter.match(_ieGetMatrixExp); 2204 s = (s && s.length === 4) ? [s[0].substr(4), Number(s[2].substr(4)), Number(s[1].substr(4)), s[3].substr(4), (tm.x || 0), (tm.y || 0)].join(",") : ""; 2205 } 2206 isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)"); 2207 if (_transformProp && isDefault && !e.offsetParent && e !== _docElement) { //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 2208 //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). 2209 n = style.display; 2210 style.display = "block"; 2211 parent = e.parentNode; 2212 if (!parent || !e.offsetParent) { 2213 dec = 1; //flag 2214 nextSibling = e.nextSibling; 2215 _docElement.appendChild(e); //we must add it to the DOM in order to get values properly 2216 } 2217 s = _getStyle(e, _transformPropCSS, null, true); 2218 isDefault = (!s || s === "none" || s === "matrix(1, 0, 0, 1, 0, 0)"); 2219 if (n) { 2220 style.display = n; 2221 } else { 2222 _removeProp(style, "display"); 2223 } 2224 if (dec) { 2225 if (nextSibling) { 2226 parent.insertBefore(e, nextSibling); 2227 } else if (parent) { 2228 parent.appendChild(e); 2229 } else { 2230 _docElement.removeChild(e); 2231 } 2232 } 2233 } 2234 if (tm.svg || (e.getCTM && _isSVG(e))) { 2235 if (isDefault && (style[_transformProp] + "").indexOf("matrix") !== -1) { //some browsers (like Chrome 40) don't correctly report transforms that are applied inline on an SVG element (they don't get included in the computed style), so we double-check here and accept matrix values 2236 s = style[_transformProp]; 2237 isDefault = 0; 2238 } 2239 m = e.getAttribute("transform"); 2240 if (isDefault && m) { 2241 m = e.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. 2242 s = "matrix(" + m.a + "," + m.b + "," + m.c + "," + m.d + "," + m.e + "," + m.f + ")"; 2243 isDefault = 0; 2244 } 2245 } 2246 if (isDefault) { 2247 return _identity2DMatrix; 2248 } 2249 //split the matrix values out into an array (m for matrix) 2250 m = (s || "").match(_numExp) || []; 2251 i = m.length; 2252 while (--i > -1) { 2253 n = Number(m[i]); 2254 m[i] = (dec = n - (n |= 0)) ? ((dec * rnd + (dec < 0 ? -0.5 : 0.5)) | 0) / rnd + n : n; //convert strings to Numbers and round to 5 decimal places to avoid issues with tiny numbers. Roughly 20x faster than Number.toFixed(). We also must make sure to round before dividing so that values like 0.9999999999 become 1 to avoid glitches in browser rendering and interpretation of flipped/rotated 3D matrices. And don't just multiply the number by rnd, floor it, and then divide by rnd because the bitwise operations max out at a 32-bit signed integer, thus it could get clipped at a relatively low value (like 22,000.00000 for example). 2255 } 2256 return (force2D && m.length > 6) ? [m[0], m[1], m[4], m[5], m[12], m[13]] : m; 2257 }, 2258 2259 /** 2260 * Parses the transform values for an element, returning an object with x, y, z, scaleX, scaleY, scaleZ, rotation, rotationX, rotationY, skewX, and skewY properties. Note: by default (for performance reasons), all skewing is combined into skewX and rotation but skewY still has a place in the transform object so that we can record how much of the skew is attributed to skewX vs skewY. Remember, a skewY of 10 looks the same as a rotation of 10 and skewX of -10. 2261 * @param {!Object} t target element 2262 * @param {Object=} cs computed style object (optional) 2263 * @param {boolean=} rec if true, the transform values will be recorded to the target element's _gsTransform object, like target._gsTransform = {x:0, y:0, z:0, scaleX:1...} 2264 * @param {boolean=} parse if true, we'll ignore any _gsTransform values that already exist on the element, and force a reparsing of the css (calculated style) 2265 * @return {object} object containing all of the transform properties/values like {x:0, y:0, z:0, scaleX:1...} 2266 */ 2267 _getTransform = _internals.getTransform = function(t, cs, rec, parse) { 2268 if (t._gsTransform && rec && !parse) { 2269 return t._gsTransform; //if the element already has a _gsTransform, use that. Note: some browsers don't accurately return the calculated style for the transform (particularly for SVG), so it's almost always safest to just use the values we've already applied rather than re-parsing things. 2270 } 2271 var tm = rec ? t._gsTransform || new Transform() : new Transform(), 2272 invX = (tm.scaleX < 0), //in order to interpret things properly, we need to know if the user applied a negative scaleX previously so that we can adjust the rotation and skewX accordingly. Otherwise, if we always interpret a flipped matrix as affecting scaleY and the user only wants to tween the scaleX on multiple sequential tweens, it would keep the negative scaleY without that being the user's intent. 2273 min = 0.00002, 2274 rnd = 100000, 2275 zOrigin = _supports3D ? parseFloat(_getStyle(t, _transformOriginProp, cs, false, "0 0 0").split(" ")[2]) || tm.zOrigin || 0 : 0, 2276 defaultTransformPerspective = parseFloat(CSSPlugin.defaultTransformPerspective) || 0, 2277 m, i, scaleX, scaleY, rotation, skewX; 2278 2279 tm.svg = !!(t.getCTM && _isSVG(t)); 2280 if (tm.svg) { 2281 _parseSVGOrigin(t, _getStyle(t, _transformOriginProp, cs, false, "50% 50%") + "", tm, t.getAttribute("data-svg-origin")); 2282 _useSVGTransformAttr = CSSPlugin.useSVGTransformAttr || _forceSVGTransformAttr; 2283 } 2284 m = _getMatrix(t); 2285 if (m !== _identity2DMatrix) { 2286 2287 if (m.length === 16) { 2288 //we'll only look at these position-related 6 variables first because if x/y/z all match, it's relatively safe to assume we don't need to re-parse everything which risks losing important rotational information (like rotationX:180 plus rotationY:180 would look the same as rotation:180 - there's no way to know for sure which direction was taken based solely on the matrix3d() values) 2289 var a11 = m[0], a21 = m[1], a31 = m[2], a41 = m[3], 2290 a12 = m[4], a22 = m[5], a32 = m[6], a42 = m[7], 2291 a13 = m[8], a23 = m[9], a33 = m[10], 2292 a14 = m[12], a24 = m[13], a34 = m[14], 2293 a43 = m[11], 2294 angle = Math.atan2(a32, a33), 2295 t1, t2, t3, t4, cos, sin; 2296 //we manually compensate for non-zero z component of transformOrigin to work around bugs in Safari 2297 if (tm.zOrigin) { 2298 a34 = -tm.zOrigin; 2299 a14 = a13*a34-m[12]; 2300 a24 = a23*a34-m[13]; 2301 a34 = a33*a34+tm.zOrigin-m[14]; 2302 } 2303 //note for possible future consolidation: rotationX: Math.atan2(a32, a33), rotationY: Math.atan2(-a31, Math.sqrt(a33 * a33 + a32 * a32)), rotation: Math.atan2(a21, a11), skew: Math.atan2(a12, a22). However, it doesn't seem to be quite as reliable as the full-on backwards rotation procedure. 2304 tm.rotationX = angle * _RAD2DEG; 2305 //rotationX 2306 if (angle) { 2307 cos = Math.cos(-angle); 2308 sin = Math.sin(-angle); 2309 t1 = a12*cos+a13*sin; 2310 t2 = a22*cos+a23*sin; 2311 t3 = a32*cos+a33*sin; 2312 a13 = a12*-sin+a13*cos; 2313 a23 = a22*-sin+a23*cos; 2314 a33 = a32*-sin+a33*cos; 2315 a43 = a42*-sin+a43*cos; 2316 a12 = t1; 2317 a22 = t2; 2318 a32 = t3; 2319 } 2320 //rotationY 2321 angle = Math.atan2(-a31, a33); 2322 tm.rotationY = angle * _RAD2DEG; 2323 if (angle) { 2324 cos = Math.cos(-angle); 2325 sin = Math.sin(-angle); 2326 t1 = a11*cos-a13*sin; 2327 t2 = a21*cos-a23*sin; 2328 t3 = a31*cos-a33*sin; 2329 a23 = a21*sin+a23*cos; 2330 a33 = a31*sin+a33*cos; 2331 a43 = a41*sin+a43*cos; 2332 a11 = t1; 2333 a21 = t2; 2334 a31 = t3; 2335 } 2336 //rotationZ 2337 angle = Math.atan2(a21, a11); 2338 tm.rotation = angle * _RAD2DEG; 2339 if (angle) { 2340 cos = Math.cos(angle); 2341 sin = Math.sin(angle); 2342 t1 = a11*cos+a21*sin; 2343 t2 = a12*cos+a22*sin; 2344 t3 = a13*cos+a23*sin; 2345 a21 = a21*cos-a11*sin; 2346 a22 = a22*cos-a12*sin; 2347 a23 = a23*cos-a13*sin; 2348 a11 = t1; 2349 a12 = t2; 2350 a13 = t3; 2351 } 2352 2353 if (tm.rotationX && Math.abs(tm.rotationX) + Math.abs(tm.rotation) > 359.9) { //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. 2354 tm.rotationX = tm.rotation = 0; 2355 tm.rotationY = 180 - tm.rotationY; 2356 } 2357 2358 //skewX 2359 angle = Math.atan2(a12, a22); 2360 2361 //scales 2362 tm.scaleX = ((Math.sqrt(a11 * a11 + a21 * a21 + a31 * a31) * rnd + 0.5) | 0) / rnd; 2363 tm.scaleY = ((Math.sqrt(a22 * a22 + a32 * a32) * rnd + 0.5) | 0) / rnd; 2364 tm.scaleZ = ((Math.sqrt(a13 * a13 + a23 * a23 + a33 * a33) * rnd + 0.5) | 0) / rnd; 2365 a11 /= tm.scaleX; 2366 a12 /= tm.scaleY; 2367 a21 /= tm.scaleX; 2368 a22 /= tm.scaleY; 2369 if (Math.abs(angle) > min) { 2370 tm.skewX = angle * _RAD2DEG; 2371 a12 = 0; //unskews 2372 if (tm.skewType !== "simple") { 2373 tm.scaleY *= 1 / Math.cos(angle); //by default, we compensate the scale based on the skew so that the element maintains a similar proportion when skewed, so we have to alter the scaleY here accordingly to match the default (non-adjusted) skewing that CSS does (stretching more and more as it skews). 2374 } 2375 2376 } else { 2377 tm.skewX = 0; 2378 } 2379 2380 /* //for testing purposes 2381 var transform = "matrix3d(", 2382 comma = ",", 2383 zero = "0"; 2384 a13 /= tm.scaleZ; 2385 a23 /= tm.scaleZ; 2386 a31 /= tm.scaleX; 2387 a32 /= tm.scaleY; 2388 a33 /= tm.scaleZ; 2389 transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31); 2390 transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22); 2391 transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13); 2392 transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma; 2393 transform += a14 + comma + a24 + comma + a34 + comma + (tm.perspective ? (1 + (-a34 / tm.perspective)) : 1) + ")"; 2394 console.log(transform); 2395 document.querySelector(".test").style[_transformProp] = transform; 2396 */ 2397 2398 tm.perspective = a43 ? 1 / ((a43 < 0) ? -a43 : a43) : 0; 2399 tm.x = a14; 2400 tm.y = a24; 2401 tm.z = a34; 2402 if (tm.svg) { 2403 tm.x -= tm.xOrigin - (tm.xOrigin * a11 - tm.yOrigin * a12); 2404 tm.y -= tm.yOrigin - (tm.yOrigin * a21 - tm.xOrigin * a22); 2405 } 2406 2407 } else if ((!_supports3D || parse || !m.length || tm.x !== m[4] || tm.y !== m[5] || (!tm.rotationX && !tm.rotationY))) { //sometimes a 6-element matrix is returned even when we performed 3D transforms, like if rotationX and rotationY are 180. In cases like this, we still need to honor the 3D transforms. If we just rely on the 2D info, it could affect how the data is interpreted, like scaleY might get set to -1 or rotation could get offset by 180 degrees. For example, do a TweenLite.to(element, 1, {css:{rotationX:180, rotationY:180}}) and then later, TweenLite.to(element, 1, {css:{rotationX:0}}) and without this conditional logic in place, it'd jump to a state of being unrotated when the 2nd tween starts. Then again, we need to honor the fact that the user COULD alter the transforms outside of CSSPlugin, like by manually applying new css, so we try to sense that by looking at x and y because if those changed, we know the changes were made outside CSSPlugin and we force a reinterpretation of the matrix values. Also, in Webkit browsers, if the element's "display" is "none", its calculated style value will always return empty, so if we've already recorded the values in the _gsTransform object, we'll just rely on those. 2408 var k = (m.length >= 6), 2409 a = k ? m[0] : 1, 2410 b = m[1] || 0, 2411 c = m[2] || 0, 2412 d = k ? m[3] : 1; 2413 tm.x = m[4] || 0; 2414 tm.y = m[5] || 0; 2415 scaleX = Math.sqrt(a * a + b * b); 2416 scaleY = Math.sqrt(d * d + c * c); 2417 rotation = (a || b) ? Math.atan2(b, a) * _RAD2DEG : tm.rotation || 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). 2418 skewX = (c || d) ? Math.atan2(c, d) * _RAD2DEG + rotation : tm.skewX || 0; 2419 tm.scaleX = scaleX; 2420 tm.scaleY = scaleY; 2421 tm.rotation = rotation; 2422 tm.skewX = skewX; 2423 if (_supports3D) { 2424 tm.rotationX = tm.rotationY = tm.z = 0; 2425 tm.perspective = defaultTransformPerspective; 2426 tm.scaleZ = 1; 2427 } 2428 if (tm.svg) { 2429 tm.x -= tm.xOrigin - (tm.xOrigin * a + tm.yOrigin * c); 2430 tm.y -= tm.yOrigin - (tm.xOrigin * b + tm.yOrigin * d); 2431 } 2432 } 2433 if (Math.abs(tm.skewX) > 90 && Math.abs(tm.skewX) < 270) { 2434 if (invX) { 2435 tm.scaleX *= -1; 2436 tm.skewX += (tm.rotation <= 0) ? 180 : -180; 2437 tm.rotation += (tm.rotation <= 0) ? 180 : -180; 2438 } else { 2439 tm.scaleY *= -1; 2440 tm.skewX += (tm.skewX <= 0) ? 180 : -180; 2441 } 2442 } 2443 tm.zOrigin = zOrigin; 2444 //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 0 in these cases. The conditional logic here is faster than calling Math.abs(). Also, browsers tend to render a SLIGHTLY rotated object in a fuzzy way, so we need to snap to exactly 0 when appropriate. 2445 for (i in tm) { 2446 if (tm[i] < min) if (tm[i] > -min) { 2447 tm[i] = 0; 2448 } 2449 } 2450 } 2451 //DEBUG: _log("parsed rotation of " + t.getAttribute("id")+": "+(tm.rotationX)+", "+(tm.rotationY)+", "+(tm.rotation)+", scale: "+tm.scaleX+", "+tm.scaleY+", "+tm.scaleZ+", position: "+tm.x+", "+tm.y+", "+tm.z+", perspective: "+tm.perspective+ ", origin: "+ tm.xOrigin+ ","+ tm.yOrigin); 2452 if (rec) { 2453 t._gsTransform = tm; //record to the object's _gsTransform which we use so that tweens can control individual properties independently (we need all the properties to accurately recompose the matrix in the setRatio() method) 2454 if (tm.svg) { //if we're supposed to apply transforms to the SVG element's "transform" attribute, make sure there aren't any CSS transforms applied or they'll override the attribute ones. Also clear the transform attribute if we're using CSS, just to be clean. 2455 if (_useSVGTransformAttr && t.style[_transformProp]) { 2456 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].delayedCall(0.001, function(){ //if we apply this right away (before anything has rendered), we risk there being no transforms for a brief moment and it also interferes with adjusting the transformOrigin in a tween with immediateRender:true (it'd try reading the matrix and it wouldn't have the appropriate data in place because we just removed it). 2457 _removeProp(t.style, _transformProp); 2458 }); 2459 } else if (!_useSVGTransformAttr && t.getAttribute("transform")) { 2460 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].delayedCall(0.001, function(){ 2461 t.removeAttribute("transform"); 2462 }); 2463 } 2464 } 2465 } 2466 return tm; 2467 }, 2468 2469 //for setting 2D transforms in IE6, IE7, and IE8 (must use a "filter" to emulate the behavior of modern day browser transforms) 2470 _setIETransformRatio = function(v) { 2471 var t = this.data, //refers to the element's _gsTransform object 2472 ang = -t.rotation * _DEG2RAD, 2473 skew = ang + t.skewX * _DEG2RAD, 2474 rnd = 100000, 2475 a = ((Math.cos(ang) * t.scaleX * rnd) | 0) / rnd, 2476 b = ((Math.sin(ang) * t.scaleX * rnd) | 0) / rnd, 2477 c = ((Math.sin(skew) * -t.scaleY * rnd) | 0) / rnd, 2478 d = ((Math.cos(skew) * t.scaleY * rnd) | 0) / rnd, 2479 style = this.t.style, 2480 cs = this.t.currentStyle, 2481 filters, val; 2482 if (!cs) { 2483 return; 2484 } 2485 val = b; //just for swapping the variables an inverting them (reused "val" to avoid creating another variable in memory). IE's filter matrix uses a non-standard matrix configuration (angle goes the opposite way, and b and c are reversed and inverted) 2486 b = -c; 2487 c = -val; 2488 filters = cs.filter; 2489 style.filter = ""; //remove filters so that we can accurately measure offsetWidth/offsetHeight 2490 var w = this.t.offsetWidth, 2491 h = this.t.offsetHeight, 2492 clip = (cs.position !== "absolute"), 2493 m = "progid:DXImageTransform.Microsoft.Matrix(M11=" + a + ", M12=" + b + ", M21=" + c + ", M22=" + d, 2494 ox = t.x + (w * t.xPercent / 100), 2495 oy = t.y + (h * t.yPercent / 100), 2496 dx, dy; 2497 2498 //if transformOrigin is being used, adjust the offset x and y 2499 if (t.ox != null) { 2500 dx = ((t.oxp) ? w * t.ox * 0.01 : t.ox) - w / 2; 2501 dy = ((t.oyp) ? h * t.oy * 0.01 : t.oy) - h / 2; 2502 ox += dx - (dx * a + dy * b); 2503 oy += dy - (dx * c + dy * d); 2504 } 2505 2506 if (!clip) { 2507 m += ", sizingMethod='auto expand')"; 2508 } else { 2509 dx = (w / 2); 2510 dy = (h / 2); 2511 //translate to ensure that transformations occur around the correct origin (default is center). 2512 m += ", Dx=" + (dx - (dx * a + dy * b) + ox) + ", Dy=" + (dy - (dx * c + dy * d) + oy) + ")"; 2513 } 2514 if (filters.indexOf("DXImageTransform.Microsoft.Matrix(") !== -1) { 2515 style.filter = filters.replace(_ieSetMatrixExp, m); 2516 } else { 2517 style.filter = m + " " + filters; //we must always put the transform/matrix FIRST (before alpha(opacity=xx)) to avoid an IE bug that slices part of the object when rotation is applied with alpha. 2518 } 2519 2520 //at the end or beginning of the tween, if the matrix is normal (1, 0, 0, 1) and opacity is 100 (or doesn't exist), remove the filter to improve browser performance. 2521 if (v === 0 || v === 1) if (a === 1) if (b === 0) if (c === 0) if (d === 1) if (!clip || m.indexOf("Dx=0, Dy=0") !== -1) if (!_opacityExp.test(filters) || parseFloat(RegExp.$1) === 100) if (filters.indexOf( true && filters.indexOf("Alpha")) === -1) { 2522 style.removeAttribute("filter"); 2523 } 2524 2525 //we must set the margins AFTER applying the filter in order to avoid some bugs in IE8 that could (in rare scenarios) cause them to be ignored intermittently (vibration). 2526 if (!clip) { 2527 var mult = (_ieVers < 8) ? 1 : -1, //in Internet Explorer 7 and before, the box model is broken, causing the browser to treat the width/height of the actual rotated filtered image as the width/height of the box itself, but Microsoft corrected that in IE8. We must use a negative offset in IE8 on the right/bottom 2528 marg, prop, dif; 2529 dx = t.ieOffsetX || 0; 2530 dy = t.ieOffsetY || 0; 2531 t.ieOffsetX = Math.round((w - ((a < 0 ? -a : a) * w + (b < 0 ? -b : b) * h)) / 2 + ox); 2532 t.ieOffsetY = Math.round((h - ((d < 0 ? -d : d) * h + (c < 0 ? -c : c) * w)) / 2 + oy); 2533 for (i = 0; i < 4; i++) { 2534 prop = _margins[i]; 2535 marg = cs[prop]; 2536 //we need to get the current margin in case it is being tweened separately (we want to respect that tween's changes) 2537 val = (marg.indexOf("px") !== -1) ? parseFloat(marg) : _convertToPixels(this.t, prop, parseFloat(marg), marg.replace(_suffixExp, "")) || 0; 2538 if (val !== t[prop]) { 2539 dif = (i < 2) ? -t.ieOffsetX : -t.ieOffsetY; //if another tween is controlling a margin, we cannot only apply the difference in the ieOffsets, so we essentially zero-out the dx and dy here in that case. We record the margin(s) later so that we can keep comparing them, making this code very flexible. 2540 } else { 2541 dif = (i < 2) ? dx - t.ieOffsetX : dy - t.ieOffsetY; 2542 } 2543 style[prop] = (t[prop] = Math.round( val - dif * ((i === 0 || i === 2) ? 1 : mult) )) + "px"; 2544 } 2545 } 2546 }, 2547 2548 /* translates a super small decimal to a string WITHOUT scientific notation 2549 _safeDecimal = function(n) { 2550 var s = (n < 0 ? -n : n) + "", 2551 a = s.split("e-"); 2552 return (n < 0 ? "-0." : "0.") + new Array(parseInt(a[1], 10) || 0).join("0") + a[0].split(".").join(""); 2553 }, 2554 */ 2555 2556 _setTransformRatio = _internals.set3DTransformRatio = _internals.setTransformRatio = function(v) { 2557 var t = this.data, //refers to the element's _gsTransform object 2558 style = this.t.style, 2559 angle = t.rotation, 2560 rotationX = t.rotationX, 2561 rotationY = t.rotationY, 2562 sx = t.scaleX, 2563 sy = t.scaleY, 2564 sz = t.scaleZ, 2565 x = t.x, 2566 y = t.y, 2567 z = t.z, 2568 isSVG = t.svg, 2569 perspective = t.perspective, 2570 force3D = t.force3D, 2571 skewY = t.skewY, 2572 skewX = t.skewX, 2573 t1, a11, a12, a13, a21, a22, a23, a31, a32, a33, a41, a42, a43, 2574 zOrigin, min, cos, sin, t2, transform, comma, zero, skew, rnd; 2575 if (skewY) { //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. 2576 skewX += skewY; 2577 angle += skewY; 2578 } 2579 2580 //check to see if we should render as 2D (and SVGs must use 2D when _useSVGTransformAttr is true) 2581 if (((((v === 1 || v === 0) && force3D === "auto" && (this.tween._totalTime === this.tween._totalDuration || !this.tween._totalTime)) || !force3D) && !z && !perspective && !rotationY && !rotationX && sz === 1) || (_useSVGTransformAttr && isSVG) || !_supports3D) { //on the final render (which could be 0 for a from tween), if there are no 3D aspects, render in 2D to free up memory and improve performance especially on mobile devices. Check the tween's totalTime/totalDuration too in order to make sure it doesn't happen between repeats if it's a repeating tween. 2582 2583 //2D 2584 if (angle || skewX || isSVG) { 2585 angle *= _DEG2RAD; 2586 skew = skewX * _DEG2RAD; 2587 rnd = 100000; 2588 a11 = Math.cos(angle) * sx; 2589 a21 = Math.sin(angle) * sx; 2590 a12 = Math.sin(angle - skew) * -sy; 2591 a22 = Math.cos(angle - skew) * sy; 2592 if (skew && t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does 2593 t1 = Math.tan(skew - skewY * _DEG2RAD); 2594 t1 = Math.sqrt(1 + t1 * t1); 2595 a12 *= t1; 2596 a22 *= t1; 2597 if (skewY) { 2598 t1 = Math.tan(skewY * _DEG2RAD); 2599 t1 = Math.sqrt(1 + t1 * t1); 2600 a11 *= t1; 2601 a21 *= t1; 2602 } 2603 } 2604 if (isSVG) { 2605 x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset; 2606 y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset; 2607 if (_useSVGTransformAttr && (t.xPercent || t.yPercent)) { //The SVG spec doesn't support percentage-based translation in the "transform" attribute, so we merge it into the matrix to simulate it. 2608 min = this.t.getBBox(); 2609 x += t.xPercent * 0.01 * min.width; 2610 y += t.yPercent * 0.01 * min.height; 2611 } 2612 min = 0.000001; 2613 if (x < min) if (x > -min) { 2614 x = 0; 2615 } 2616 if (y < min) if (y > -min) { 2617 y = 0; 2618 } 2619 } 2620 transform = (((a11 * rnd) | 0) / rnd) + "," + (((a21 * rnd) | 0) / rnd) + "," + (((a12 * rnd) | 0) / rnd) + "," + (((a22 * rnd) | 0) / rnd) + "," + x + "," + y + ")"; 2621 if (isSVG && _useSVGTransformAttr) { 2622 this.t.setAttribute("transform", "matrix(" + transform); 2623 } else { 2624 //some browsers have a hard time with very small values like 2.4492935982947064e-16 (notice the "e-" towards the end) and would render the object slightly off. So we round to 5 decimal places. 2625 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + transform; 2626 } 2627 } else { 2628 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix(" : "matrix(") + sx + ",0,0," + sy + "," + x + "," + y + ")"; 2629 } 2630 return; 2631 2632 } 2633 if (_isFirefox) { //Firefox has a bug (at least in v25) that causes it to render the transparent part of 32-bit PNG images as black when displayed inside an iframe and the 3D scale is very small and doesn't change sufficiently enough between renders (like if you use a Power4.easeInOut to scale from 0 to 1 where the beginning values only change a tiny amount to begin the tween before accelerating). In this case, we force the scale to be 0.00002 instead which is visually the same but works around the Firefox issue. 2634 min = 0.0001; 2635 if (sx < min && sx > -min) { 2636 sx = sz = 0.00002; 2637 } 2638 if (sy < min && sy > -min) { 2639 sy = sz = 0.00002; 2640 } 2641 if (perspective && !t.z && !t.rotationX && !t.rotationY) { //Firefox has a bug that causes elements to have an odd super-thin, broken/dotted black border on elements that have a perspective set but aren't utilizing 3D space (no rotationX, rotationY, or z). 2642 perspective = 0; 2643 } 2644 } 2645 if (angle || skewX) { 2646 angle *= _DEG2RAD; 2647 cos = a11 = Math.cos(angle); 2648 sin = a21 = Math.sin(angle); 2649 if (skewX) { 2650 angle -= skewX * _DEG2RAD; 2651 cos = Math.cos(angle); 2652 sin = Math.sin(angle); 2653 if (t.skewType === "simple") { //by default, we compensate skewing on the other axis to make it look more natural, but you can set the skewType to "simple" to use the uncompensated skewing that CSS does 2654 t1 = Math.tan((skewX - skewY) * _DEG2RAD); 2655 t1 = Math.sqrt(1 + t1 * t1); 2656 cos *= t1; 2657 sin *= t1; 2658 if (t.skewY) { 2659 t1 = Math.tan(skewY * _DEG2RAD); 2660 t1 = Math.sqrt(1 + t1 * t1); 2661 a11 *= t1; 2662 a21 *= t1; 2663 } 2664 } 2665 } 2666 a12 = -sin; 2667 a22 = cos; 2668 2669 } else if (!rotationY && !rotationX && sz === 1 && !perspective && !isSVG) { //if we're only translating and/or 2D scaling, this is faster... 2670 style[_transformProp] = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) translate3d(" : "translate3d(") + x + "px," + y + "px," + z +"px)" + ((sx !== 1 || sy !== 1) ? " scale(" + sx + "," + sy + ")" : ""); 2671 return; 2672 } else { 2673 a11 = a22 = 1; 2674 a12 = a21 = 0; 2675 } 2676 // KEY INDEX AFFECTS a[row][column] 2677 // a11 0 rotation, rotationY, scaleX 2678 // a21 1 rotation, rotationY, scaleX 2679 // a31 2 rotationY, scaleX 2680 // a41 3 rotationY, scaleX 2681 // a12 4 rotation, skewX, rotationX, scaleY 2682 // a22 5 rotation, skewX, rotationX, scaleY 2683 // a32 6 rotationX, scaleY 2684 // a42 7 rotationX, scaleY 2685 // a13 8 rotationY, rotationX, scaleZ 2686 // a23 9 rotationY, rotationX, scaleZ 2687 // a33 10 rotationY, rotationX, scaleZ 2688 // a43 11 rotationY, rotationX, perspective, scaleZ 2689 // a14 12 x, zOrigin, svgOrigin 2690 // a24 13 y, zOrigin, svgOrigin 2691 // a34 14 z, zOrigin 2692 // a44 15 2693 // rotation: Math.atan2(a21, a11) 2694 // rotationY: Math.atan2(a13, a33) (or Math.atan2(a13, a11)) 2695 // rotationX: Math.atan2(a32, a33) 2696 a33 = 1; 2697 a13 = a23 = a31 = a32 = a41 = a42 = 0; 2698 a43 = (perspective) ? -1 / perspective : 0; 2699 zOrigin = t.zOrigin; 2700 min = 0.000001; //threshold below which browsers use scientific notation which won't work. 2701 comma = ","; 2702 zero = "0"; 2703 angle = rotationY * _DEG2RAD; 2704 if (angle) { 2705 cos = Math.cos(angle); 2706 sin = Math.sin(angle); 2707 a31 = -sin; 2708 a41 = a43*-sin; 2709 a13 = a11*sin; 2710 a23 = a21*sin; 2711 a33 = cos; 2712 a43 *= cos; 2713 a11 *= cos; 2714 a21 *= cos; 2715 } 2716 angle = rotationX * _DEG2RAD; 2717 if (angle) { 2718 cos = Math.cos(angle); 2719 sin = Math.sin(angle); 2720 t1 = a12*cos+a13*sin; 2721 t2 = a22*cos+a23*sin; 2722 a32 = a33*sin; 2723 a42 = a43*sin; 2724 a13 = a12*-sin+a13*cos; 2725 a23 = a22*-sin+a23*cos; 2726 a33 = a33*cos; 2727 a43 = a43*cos; 2728 a12 = t1; 2729 a22 = t2; 2730 } 2731 if (sz !== 1) { 2732 a13*=sz; 2733 a23*=sz; 2734 a33*=sz; 2735 a43*=sz; 2736 } 2737 if (sy !== 1) { 2738 a12*=sy; 2739 a22*=sy; 2740 a32*=sy; 2741 a42*=sy; 2742 } 2743 if (sx !== 1) { 2744 a11*=sx; 2745 a21*=sx; 2746 a31*=sx; 2747 a41*=sx; 2748 } 2749 2750 if (zOrigin || isSVG) { 2751 if (zOrigin) { 2752 x += a13*-zOrigin; 2753 y += a23*-zOrigin; 2754 z += a33*-zOrigin+zOrigin; 2755 } 2756 if (isSVG) { //due to bugs in some browsers, we need to manage the transform-origin of SVG manually 2757 x += t.xOrigin - (t.xOrigin * a11 + t.yOrigin * a12) + t.xOffset; 2758 y += t.yOrigin - (t.xOrigin * a21 + t.yOrigin * a22) + t.yOffset; 2759 } 2760 if (x < min && x > -min) { 2761 x = zero; 2762 } 2763 if (y < min && y > -min) { 2764 y = zero; 2765 } 2766 if (z < min && z > -min) { 2767 z = 0; //don't use string because we calculate perspective later and need the number. 2768 } 2769 } 2770 2771 //optimized way of concatenating all the values into a string. If we do it all in one shot, it's slower because of the way browsers have to create temp strings and the way it affects memory. If we do it piece-by-piece with +=, it's a bit slower too. We found that doing it in these sized chunks works best overall: 2772 transform = ((t.xPercent || t.yPercent) ? "translate(" + t.xPercent + "%," + t.yPercent + "%) matrix3d(" : "matrix3d("); 2773 transform += ((a11 < min && a11 > -min) ? zero : a11) + comma + ((a21 < min && a21 > -min) ? zero : a21) + comma + ((a31 < min && a31 > -min) ? zero : a31); 2774 transform += comma + ((a41 < min && a41 > -min) ? zero : a41) + comma + ((a12 < min && a12 > -min) ? zero : a12) + comma + ((a22 < min && a22 > -min) ? zero : a22); 2775 if (rotationX || rotationY || sz !== 1) { //performance optimization (often there's no rotationX or rotationY, so we can skip these calculations) 2776 transform += comma + ((a32 < min && a32 > -min) ? zero : a32) + comma + ((a42 < min && a42 > -min) ? zero : a42) + comma + ((a13 < min && a13 > -min) ? zero : a13); 2777 transform += comma + ((a23 < min && a23 > -min) ? zero : a23) + comma + ((a33 < min && a33 > -min) ? zero : a33) + comma + ((a43 < min && a43 > -min) ? zero : a43) + comma; 2778 } else { 2779 transform += ",0,0,0,0,1,0,"; 2780 } 2781 transform += x + comma + y + comma + z + comma + (perspective ? (1 + (-z / perspective)) : 1) + ")"; 2782 2783 style[_transformProp] = transform; 2784 }; 2785 2786 p = Transform.prototype; 2787 p.x = p.y = p.z = p.skewX = p.skewY = p.rotation = p.rotationX = p.rotationY = p.zOrigin = p.xPercent = p.yPercent = p.xOffset = p.yOffset = 0; 2788 p.scaleX = p.scaleY = p.scaleZ = 1; 2789 2790 _registerComplexSpecialProp("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin", {parser:function(t, e, parsingProp, cssp, pt, plugin, vars) { 2791 if (cssp._lastParsedTransform === vars) { return pt; } //only need to parse the transform once, and only if the browser supports it. 2792 cssp._lastParsedTransform = vars; 2793 var scaleFunc = (vars.scale && typeof(vars.scale) === "function") ? vars.scale : 0; //if there's a function-based "scale" value, swap in the resulting numeric value temporarily. Otherwise, if it's called for both scaleX and scaleY independently, they may not match (like if the function uses Math.random()). 2794 if (scaleFunc) { 2795 vars.scale = scaleFunc(_index, t); 2796 } 2797 var originalGSTransform = t._gsTransform, 2798 style = t.style, 2799 min = 0.000001, 2800 i = _transformProps.length, 2801 v = vars, 2802 endRotations = {}, 2803 transformOriginString = "transformOrigin", 2804 m1 = _getTransform(t, _cs, true, v.parseTransform), 2805 orig = v.transform && ((typeof(v.transform) === "function") ? v.transform(_index, _target) : v.transform), 2806 m2, copy, has3D, hasChange, dr, x, y, matrix, p; 2807 m1.skewType = v.skewType || m1.skewType || CSSPlugin.defaultSkewType; 2808 cssp._transform = m1; 2809 if ("rotationZ" in v) { 2810 v.rotation = v.rotationZ; 2811 } 2812 if (orig && typeof(orig) === "string" && _transformProp) { //for values like transform:"rotate(60deg) scale(0.5, 0.8)" 2813 copy = _tempDiv.style; //don't use the original target because it might be SVG in which case some browsers don't report computed style correctly. 2814 copy[_transformProp] = orig; 2815 copy.display = "block"; //if display is "none", the browser often refuses to report the transform properties correctly. 2816 copy.position = "absolute"; 2817 if (orig.indexOf("%") !== -1) { //%-based translations will fail unless we set the width/height to match the original target... 2818 copy.width = _getStyle(t, "width"); 2819 copy.height = _getStyle(t, "height"); 2820 } 2821 _doc.body.appendChild(_tempDiv); 2822 m2 = _getTransform(_tempDiv, null, false); 2823 if (m1.skewType === "simple") { //the default _getTransform() reports the skewX/scaleY as if skewType is "compensated", thus we need to adjust that here if skewType is "simple". 2824 m2.scaleY *= Math.cos(m2.skewX * _DEG2RAD); 2825 } 2826 if (m1.svg) { //if it's an SVG element, x/y part of the matrix will be affected by whatever we use as the origin and the offsets, so compensate here... 2827 x = m1.xOrigin; 2828 y = m1.yOrigin; 2829 m2.x -= m1.xOffset; 2830 m2.y -= m1.yOffset; 2831 if (v.transformOrigin || v.svgOrigin) { //if this tween is altering the origin, we must factor that in here. The actual work of recording the transformOrigin values and setting up the PropTween is done later (still inside this function) so we cannot leave the changes intact here - we only want to update the x/y accordingly. 2832 orig = {}; 2833 _parseSVGOrigin(t, _parsePosition(v.transformOrigin), orig, v.svgOrigin, v.smoothOrigin, true); 2834 x = orig.xOrigin; 2835 y = orig.yOrigin; 2836 m2.x -= orig.xOffset - m1.xOffset; 2837 m2.y -= orig.yOffset - m1.yOffset; 2838 } 2839 if (x || y) { 2840 matrix = _getMatrix(_tempDiv, true); 2841 m2.x -= x - (x * matrix[0] + y * matrix[2]); 2842 m2.y -= y - (x * matrix[1] + y * matrix[3]); 2843 } 2844 } 2845 _doc.body.removeChild(_tempDiv); 2846 if (!m2.perspective) { 2847 m2.perspective = m1.perspective; //tweening to no perspective gives very unintuitive results - just keep the same perspective in that case. 2848 } 2849 if (v.xPercent != null) { 2850 m2.xPercent = _parseVal(v.xPercent, m1.xPercent); 2851 } 2852 if (v.yPercent != null) { 2853 m2.yPercent = _parseVal(v.yPercent, m1.yPercent); 2854 } 2855 } else if (typeof(v) === "object") { //for values like scaleX, scaleY, rotation, x, y, skewX, and skewY or transform:{...} (object) 2856 m2 = {scaleX:_parseVal((v.scaleX != null) ? v.scaleX : v.scale, m1.scaleX), 2857 scaleY:_parseVal((v.scaleY != null) ? v.scaleY : v.scale, m1.scaleY), 2858 scaleZ:_parseVal(v.scaleZ, m1.scaleZ), 2859 x:_parseVal(v.x, m1.x), 2860 y:_parseVal(v.y, m1.y), 2861 z:_parseVal(v.z, m1.z), 2862 xPercent:_parseVal(v.xPercent, m1.xPercent), 2863 yPercent:_parseVal(v.yPercent, m1.yPercent), 2864 perspective:_parseVal(v.transformPerspective, m1.perspective)}; 2865 dr = v.directionalRotation; 2866 if (dr != null) { 2867 if (typeof(dr) === "object") { 2868 for (copy in dr) { 2869 v[copy] = dr[copy]; 2870 } 2871 } else { 2872 v.rotation = dr; 2873 } 2874 } 2875 if (typeof(v.x) === "string" && v.x.indexOf("%") !== -1) { 2876 m2.x = 0; 2877 m2.xPercent = _parseVal(v.x, m1.xPercent); 2878 } 2879 if (typeof(v.y) === "string" && v.y.indexOf("%") !== -1) { 2880 m2.y = 0; 2881 m2.yPercent = _parseVal(v.y, m1.yPercent); 2882 } 2883 2884 m2.rotation = _parseAngle(("rotation" in v) ? v.rotation : ("shortRotation" in v) ? v.shortRotation + "_short" : m1.rotation, m1.rotation, "rotation", endRotations); 2885 if (_supports3D) { 2886 m2.rotationX = _parseAngle(("rotationX" in v) ? v.rotationX : ("shortRotationX" in v) ? v.shortRotationX + "_short" : m1.rotationX || 0, m1.rotationX, "rotationX", endRotations); 2887 m2.rotationY = _parseAngle(("rotationY" in v) ? v.rotationY : ("shortRotationY" in v) ? v.shortRotationY + "_short" : m1.rotationY || 0, m1.rotationY, "rotationY", endRotations); 2888 } 2889 m2.skewX = _parseAngle(v.skewX, m1.skewX); 2890 m2.skewY = _parseAngle(v.skewY, m1.skewY); 2891 } 2892 if (_supports3D && v.force3D != null) { 2893 m1.force3D = v.force3D; 2894 hasChange = true; 2895 } 2896 2897 has3D = (m1.force3D || m1.z || m1.rotationX || m1.rotationY || m2.z || m2.rotationX || m2.rotationY || m2.perspective); 2898 if (!has3D && v.scale != null) { 2899 m2.scaleZ = 1; //no need to tween scaleZ. 2900 } 2901 2902 while (--i > -1) { 2903 p = _transformProps[i]; 2904 orig = m2[p] - m1[p]; 2905 if (orig > min || orig < -min || v[p] != null || _forcePT[p] != null) { 2906 hasChange = true; 2907 pt = new CSSPropTween(m1, p, m1[p], orig, pt); 2908 if (p in endRotations) { 2909 pt.e = endRotations[p]; //directional rotations typically have compensated values during the tween, but we need to make sure they end at exactly what the user requested 2910 } 2911 pt.xs0 = 0; //ensures the value stays numeric in setRatio() 2912 pt.plugin = plugin; 2913 cssp._overwriteProps.push(pt.n); 2914 } 2915 } 2916 2917 orig = (typeof(v.transformOrigin) === "function") ? v.transformOrigin(_index, _target) : v.transformOrigin; 2918 if (m1.svg && (orig || v.svgOrigin)) { 2919 x = m1.xOffset; //when we change the origin, in order to prevent things from jumping we adjust the x/y so we must record those here so that we can create PropTweens for them and flip them at the same time as the origin 2920 y = m1.yOffset; 2921 _parseSVGOrigin(t, _parsePosition(orig), m2, v.svgOrigin, v.smoothOrigin); 2922 pt = _addNonTweeningNumericPT(m1, "xOrigin", (originalGSTransform ? m1 : m2).xOrigin, m2.xOrigin, pt, transformOriginString); //note: if there wasn't a transformOrigin defined yet, just start with the destination one; it's wasteful otherwise, and it causes problems with fromTo() tweens. For example, TweenLite.to("#wheel", 3, {rotation:180, transformOrigin:"50% 50%", delay:1}); TweenLite.fromTo("#wheel", 3, {scale:0.5, transformOrigin:"50% 50%"}, {scale:1, delay:2}); would cause a jump when the from values revert at the beginning of the 2nd tween. 2923 pt = _addNonTweeningNumericPT(m1, "yOrigin", (originalGSTransform ? m1 : m2).yOrigin, m2.yOrigin, pt, transformOriginString); 2924 if (x !== m1.xOffset || y !== m1.yOffset) { 2925 pt = _addNonTweeningNumericPT(m1, "xOffset", (originalGSTransform ? x : m1.xOffset), m1.xOffset, pt, transformOriginString); 2926 pt = _addNonTweeningNumericPT(m1, "yOffset", (originalGSTransform ? y : m1.yOffset), m1.yOffset, pt, transformOriginString); 2927 } 2928 orig = "0px 0px"; //certain browsers (like firefox) completely botch transform-origin, so we must remove it to prevent it from contaminating transforms. We manage it ourselves with xOrigin and yOrigin 2929 } 2930 if (orig || (_supports3D && has3D && m1.zOrigin)) { //if anything 3D is happening and there's a transformOrigin with a z component that's non-zero, we must ensure that the transformOrigin's z-component is set to 0 so that we can manually do those calculations to get around Safari bugs. Even if the user didn't specifically define a "transformOrigin" in this particular tween (maybe they did it via css directly). 2931 if (_transformProp) { 2932 hasChange = true; 2933 p = _transformOriginProp; 2934 if (!orig) { 2935 orig = (_getStyle(t, p, _cs, false, "50% 50%") + "").split(" "); 2936 orig = orig[0] + " " + orig[1] + " " + m1.zOrigin + "px"; 2937 } 2938 orig += ""; 2939 pt = new CSSPropTween(style, p, 0, 0, pt, -1, transformOriginString); 2940 pt.b = style[p]; 2941 pt.plugin = plugin; 2942 if (_supports3D) { 2943 copy = m1.zOrigin; 2944 orig = orig.split(" "); 2945 m1.zOrigin = ((orig.length > 2) ? parseFloat(orig[2]) : copy) || 0; //Safari doesn't handle the z part of transformOrigin correctly, so we'll manually handle it in the _set3DTransformRatio() method. 2946 pt.xs0 = pt.e = orig[0] + " " + (orig[1] || "50%") + " 0px"; //we must define a z value of 0px specifically otherwise iOS 5 Safari will stick with the old one (if one was defined)! 2947 pt = new CSSPropTween(m1, "zOrigin", 0, 0, pt, -1, pt.n); //we must create a CSSPropTween for the _gsTransform.zOrigin so that it gets reset properly at the beginning if the tween runs backward (as opposed to just setting m1.zOrigin here) 2948 pt.b = copy; 2949 pt.xs0 = pt.e = m1.zOrigin; 2950 } else { 2951 pt.xs0 = pt.e = orig; 2952 } 2953 2954 //for older versions of IE (6-8), we need to manually calculate things inside the setRatio() function. We record origin x and y (ox and oy) and whether or not the values are percentages (oxp and oyp). 2955 } else { 2956 _parsePosition(orig + "", m1); 2957 } 2958 } 2959 if (hasChange) { 2960 cssp._transformType = (!(m1.svg && _useSVGTransformAttr) && (has3D || this._transformType === 3)) ? 3 : 2; //quicker than calling cssp._enableTransforms(); 2961 } 2962 if (scaleFunc) { 2963 vars.scale = scaleFunc; 2964 } 2965 return pt; 2966 }, allowFunc:true, prefix:true}); 2967 2968 _registerComplexSpecialProp("boxShadow", {defaultValue:"0px 0px 0px 0px #999", prefix:true, color:true, multi:true, keyword:"inset"}); 2969 _registerComplexSpecialProp("clipPath", {defaultValue:"inset(0%)", prefix:true, multi:true, formatter:_getFormatter("inset(0% 0% 0% 0%)", false, true)}); 2970 2971 _registerComplexSpecialProp("borderRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) { 2972 e = this.format(e); 2973 var props = ["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"], 2974 style = t.style, 2975 ea1, i, es2, bs2, bs, es, bn, en, w, h, esfx, bsfx, rel, hn, vn, em; 2976 w = parseFloat(t.offsetWidth); 2977 h = parseFloat(t.offsetHeight); 2978 ea1 = e.split(" "); 2979 for (i = 0; i < props.length; i++) { //if we're dealing with percentages, we must convert things separately for the horizontal and vertical axis! 2980 if (this.p.indexOf("border")) { //older browsers used a prefix 2981 props[i] = _checkPropPrefix(props[i]); 2982 } 2983 bs = bs2 = _getStyle(t, props[i], _cs, false, "0px"); 2984 if (bs.indexOf(" ") !== -1) { 2985 bs2 = bs.split(" "); 2986 bs = bs2[0]; 2987 bs2 = bs2[1]; 2988 } 2989 es = es2 = ea1[i]; 2990 bn = parseFloat(bs); 2991 bsfx = bs.substr((bn + "").length); 2992 rel = (es.charAt(1) === "="); 2993 if (rel) { 2994 en = parseInt(es.charAt(0)+"1", 10); 2995 es = es.substr(2); 2996 en *= parseFloat(es); 2997 esfx = es.substr((en + "").length - (en < 0 ? 1 : 0)) || ""; 2998 } else { 2999 en = parseFloat(es); 3000 esfx = es.substr((en + "").length); 3001 } 3002 if (esfx === "") { 3003 esfx = _suffixMap[p] || bsfx; 3004 } 3005 if (esfx !== bsfx) { 3006 hn = _convertToPixels(t, "borderLeft", bn, bsfx); //horizontal number (we use a bogus "borderLeft" property just because the _convertToPixels() method searches for the keywords "Left", "Right", "Top", and "Bottom" to determine of it's a horizontal or vertical property, and we need "border" in the name so that it knows it should measure relative to the element itself, not its parent. 3007 vn = _convertToPixels(t, "borderTop", bn, bsfx); //vertical number 3008 if (esfx === "%") { 3009 bs = (hn / w * 100) + "%"; 3010 bs2 = (vn / h * 100) + "%"; 3011 } else if (esfx === "em") { 3012 em = _convertToPixels(t, "borderLeft", 1, "em"); 3013 bs = (hn / em) + "em"; 3014 bs2 = (vn / em) + "em"; 3015 } else { 3016 bs = hn + "px"; 3017 bs2 = vn + "px"; 3018 } 3019 if (rel) { 3020 es = (parseFloat(bs) + en) + esfx; 3021 es2 = (parseFloat(bs2) + en) + esfx; 3022 } 3023 } 3024 pt = _parseComplex(style, props[i], bs + " " + bs2, es + " " + es2, false, "0px", pt); 3025 } 3026 return pt; 3027 }, prefix:true, formatter:_getFormatter("0px 0px 0px 0px", false, true)}); 3028 _registerComplexSpecialProp("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius", {defaultValue:"0px", parser:function(t, e, p, cssp, pt, plugin) { 3029 return _parseComplex(t.style, p, this.format(_getStyle(t, p, _cs, false, "0px 0px")), this.format(e), false, "0px", pt); 3030 }, prefix:true, formatter:_getFormatter("0px 0px", false, true)}); 3031 _registerComplexSpecialProp("backgroundPosition", {defaultValue:"0 0", parser:function(t, e, p, cssp, pt, plugin) { 3032 var bp = "background-position", 3033 cs = (_cs || _getComputedStyle(t, null)), 3034 bs = this.format( ((cs) ? _ieVers ? cs.getPropertyValue(bp + "-x") + " " + cs.getPropertyValue(bp + "-y") : cs.getPropertyValue(bp) : t.currentStyle.backgroundPositionX + " " + t.currentStyle.backgroundPositionY) || "0 0"), //Internet Explorer doesn't report background-position correctly - we must query background-position-x and background-position-y and combine them (even in IE10). Before IE9, we must do the same with the currentStyle object and use camelCase 3035 es = this.format(e), 3036 ba, ea, i, pct, overlap, src; 3037 if ((bs.indexOf("%") !== -1) !== (es.indexOf("%") !== -1) && es.split(",").length < 2) { 3038 src = _getStyle(t, "backgroundImage").replace(_urlExp, ""); 3039 if (src && src !== "none") { 3040 ba = bs.split(" "); 3041 ea = es.split(" "); 3042 _tempImg.setAttribute("src", src); //set the temp IMG's src to the background-image so that we can measure its width/height 3043 i = 2; 3044 while (--i > -1) { 3045 bs = ba[i]; 3046 pct = (bs.indexOf("%") !== -1); 3047 if (pct !== (ea[i].indexOf("%") !== -1)) { 3048 overlap = (i === 0) ? t.offsetWidth - _tempImg.width : t.offsetHeight - _tempImg.height; 3049 ba[i] = pct ? (parseFloat(bs) / 100 * overlap) + "px" : (parseFloat(bs) / overlap * 100) + "%"; 3050 } 3051 } 3052 bs = ba.join(" "); 3053 } 3054 } 3055 return this.parseComplex(t.style, bs, es, pt, plugin); 3056 }, formatter:_parsePosition}); 3057 _registerComplexSpecialProp("backgroundSize", {defaultValue:"0 0", formatter:function(v) { 3058 v += ""; //ensure it's a string 3059 return (v.substr(0,2) === "co") ? v : _parsePosition(v.indexOf(" ") === -1 ? v + " " + v : v); //if set to something like "100% 100%", Safari typically reports the computed style as just "100%" (no 2nd value), but we should ensure that there are two values, so copy the first one. Otherwise, it'd be interpreted as "100% 0" (wrong). Also remember that it could be "cover" or "contain" which we can't tween but should be able to set. 3060 }}); 3061 _registerComplexSpecialProp("perspective", {defaultValue:"0px", prefix:true}); 3062 _registerComplexSpecialProp("perspectiveOrigin", {defaultValue:"50% 50%", prefix:true}); 3063 _registerComplexSpecialProp("transformStyle", {prefix:true}); 3064 _registerComplexSpecialProp("backfaceVisibility", {prefix:true}); 3065 _registerComplexSpecialProp("userSelect", {prefix:true}); 3066 _registerComplexSpecialProp("margin", {parser:_getEdgeParser("marginTop,marginRight,marginBottom,marginLeft")}); 3067 _registerComplexSpecialProp("padding", {parser:_getEdgeParser("paddingTop,paddingRight,paddingBottom,paddingLeft")}); 3068 _registerComplexSpecialProp("clip", {defaultValue:"rect(0px,0px,0px,0px)", parser:function(t, e, p, cssp, pt, plugin){ 3069 var b, cs, delim; 3070 if (_ieVers < 9) { //IE8 and earlier don't report a "clip" value in the currentStyle - instead, the values are split apart into clipTop, clipRight, clipBottom, and clipLeft. Also, in IE7 and earlier, the values inside rect() are space-delimited, not comma-delimited. 3071 cs = t.currentStyle; 3072 delim = _ieVers < 8 ? " " : ","; 3073 b = "rect(" + cs.clipTop + delim + cs.clipRight + delim + cs.clipBottom + delim + cs.clipLeft + ")"; 3074 e = this.format(e).split(",").join(delim); 3075 } else { 3076 b = this.format(_getStyle(t, this.p, _cs, false, this.dflt)); 3077 e = this.format(e); 3078 } 3079 return this.parseComplex(t.style, b, e, pt, plugin); 3080 }}); 3081 _registerComplexSpecialProp("textShadow", {defaultValue:"0px 0px 0px #999", color:true, multi:true}); 3082 _registerComplexSpecialProp("autoRound,strictUnits", {parser:function(t, e, p, cssp, pt) {return pt;}}); //just so that we can ignore these properties (not tween them) 3083 _registerComplexSpecialProp("border", {defaultValue:"0px solid #000", parser:function(t, e, p, cssp, pt, plugin) { 3084 var bw = _getStyle(t, "borderTopWidth", _cs, false, "0px"), 3085 end = this.format(e).split(" "), 3086 esfx = end[0].replace(_suffixExp, ""); 3087 if (esfx !== "px") { //if we're animating to a non-px value, we need to convert the beginning width to that unit. 3088 bw = (parseFloat(bw) / _convertToPixels(t, "borderTopWidth", 1, esfx)) + esfx; 3089 } 3090 return this.parseComplex(t.style, this.format(bw + " " + _getStyle(t, "borderTopStyle", _cs, false, "solid") + " " + _getStyle(t, "borderTopColor", _cs, false, "#000")), end.join(" "), pt, plugin); 3091 }, color:true, formatter:function(v) { 3092 var a = v.split(" "); 3093 return a[0] + " " + (a[1] || "solid") + " " + (v.match(_colorExp) || ["#000"])[0]; 3094 }}); 3095 _registerComplexSpecialProp("borderWidth", {parser:_getEdgeParser("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}); //Firefox doesn't pick up on borderWidth set in style sheets (only inline). 3096 _registerComplexSpecialProp("float,cssFloat,styleFloat", {parser:function(t, e, p, cssp, pt, plugin) { 3097 var s = t.style, 3098 prop = ("cssFloat" in s) ? "cssFloat" : "styleFloat"; 3099 return new CSSPropTween(s, prop, 0, 0, pt, -1, p, false, 0, s[prop], e); 3100 }}); 3101 3102 //opacity-related 3103 var _setIEOpacityRatio = function(v) { 3104 var t = this.t, //refers to the element's style property 3105 filters = t.filter || _getStyle(this.data, "filter") || "", 3106 val = (this.s + this.c * v) | 0, 3107 skip; 3108 if (val === 100) { //for older versions of IE that need to use a filter to apply opacity, we should remove the filter if opacity hits 1 in order to improve performance, but make sure there isn't a transform (matrix) or gradient in the filters. 3109 if (filters.indexOf("atrix(") === -1 && filters.indexOf("radient(") === -1 && filters.indexOf("oader(") === -1) { 3110 t.removeAttribute("filter"); 3111 skip = (!_getStyle(this.data, "filter")); //if a class is applied that has an alpha filter, it will take effect (we don't want that), so re-apply our alpha filter in that case. We must first remove it and then check. 3112 } else { 3113 t.filter = filters.replace(_alphaFilterExp, ""); 3114 skip = true; 3115 } 3116 } 3117 if (!skip) { 3118 if (this.xn1) { 3119 t.filter = filters = filters || ("alpha(opacity=" + val + ")"); //works around bug in IE7/8 that prevents changes to "visibility" from being applied properly if the filter is changed to a different alpha on the same frame. 3120 } 3121 if (filters.indexOf("pacity") === -1) { //only used if browser doesn't support the standard opacity style property (IE 7 and 8). We omit the "O" to avoid case-sensitivity issues 3122 if (val !== 0 || !this.xn1) { //bugs in IE7/8 won't render the filter properly if opacity is ADDED on the same frame/render as "visibility" changes (this.xn1 is 1 if this tween is an "autoAlpha" tween) 3123 t.filter = filters + " alpha(opacity=" + val + ")"; //we round the value because otherwise, bugs in IE7/8 can prevent "visibility" changes from being applied properly. 3124 } 3125 } else { 3126 t.filter = filters.replace(_opacityExp, "opacity=" + val); 3127 } 3128 } 3129 }; 3130 _registerComplexSpecialProp("opacity,alpha,autoAlpha", {defaultValue:"1", parser:function(t, e, p, cssp, pt, plugin) { 3131 var b = parseFloat(_getStyle(t, "opacity", _cs, false, "1")), 3132 style = t.style, 3133 isAutoAlpha = (p === "autoAlpha"); 3134 if (typeof(e) === "string" && e.charAt(1) === "=") { 3135 e = ((e.charAt(0) === "-") ? -1 : 1) * parseFloat(e.substr(2)) + b; 3136 } 3137 if (isAutoAlpha && b === 1 && _getStyle(t, "visibility", _cs) === "hidden" && e !== 0) { //if visibility is initially set to "hidden", we should interpret that as intent to make opacity 0 (a convenience) 3138 b = 0; 3139 } 3140 if (_supportsOpacity) { 3141 pt = new CSSPropTween(style, "opacity", b, e - b, pt); 3142 } else { 3143 pt = new CSSPropTween(style, "opacity", b * 100, (e - b) * 100, pt); 3144 pt.xn1 = isAutoAlpha ? 1 : 0; //we need to record whether or not this is an autoAlpha so that in the setRatio(), we know to duplicate the setting of the alpha in order to work around a bug in IE7 and IE8 that prevents changes to "visibility" from taking effect if the filter is changed to a different alpha(opacity) at the same time. Setting it to the SAME value first, then the new value works around the IE7/8 bug. 3145 style.zoom = 1; //helps correct an IE issue. 3146 pt.type = 2; 3147 pt.b = "alpha(opacity=" + pt.s + ")"; 3148 pt.e = "alpha(opacity=" + (pt.s + pt.c) + ")"; 3149 pt.data = t; 3150 pt.plugin = plugin; 3151 pt.setRatio = _setIEOpacityRatio; 3152 } 3153 if (isAutoAlpha) { //we have to create the "visibility" PropTween after the opacity one in the linked list so that they run in the order that works properly in IE8 and earlier 3154 pt = new CSSPropTween(style, "visibility", 0, 0, pt, -1, null, false, 0, ((b !== 0) ? "inherit" : "hidden"), ((e === 0) ? "hidden" : "inherit")); 3155 pt.xs0 = "inherit"; 3156 cssp._overwriteProps.push(pt.n); 3157 cssp._overwriteProps.push(p); 3158 } 3159 return pt; 3160 }}); 3161 3162 3163 var _removeProp = function(s, p) { 3164 if (p) { 3165 if (s.removeProperty) { 3166 if (p.substr(0,2) === "ms" || p.substr(0,6) === "webkit") { //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) 3167 p = "-" + p; 3168 } 3169 s.removeProperty(p.replace(_capsExp, "-$1").toLowerCase()); 3170 } else { //note: old versions of IE use "removeAttribute()" instead of "removeProperty()" 3171 s.removeAttribute(p); 3172 } 3173 } 3174 }, 3175 _setClassNameRatio = function(v) { 3176 this.t._gsClassPT = this; 3177 if (v === 1 || v === 0) { 3178 this.t.setAttribute("class", (v === 0) ? this.b : this.e); 3179 var mpt = this.data, //first MiniPropTween 3180 s = this.t.style; 3181 while (mpt) { 3182 if (!mpt.v) { 3183 _removeProp(s, mpt.p); 3184 } else { 3185 s[mpt.p] = mpt.v; 3186 } 3187 mpt = mpt._next; 3188 } 3189 if (v === 1 && this.t._gsClassPT === this) { 3190 this.t._gsClassPT = null; 3191 } 3192 } else if (this.t.getAttribute("class") !== this.e) { 3193 this.t.setAttribute("class", this.e); 3194 } 3195 }; 3196 _registerComplexSpecialProp("className", {parser:function(t, e, p, cssp, pt, plugin, vars) { 3197 var b = t.getAttribute("class") || "", //don't use t.className because it doesn't work consistently on SVG elements; getAttribute("class") and setAttribute("class", value") is more reliable. 3198 cssText = t.style.cssText, 3199 difData, bs, cnpt, cnptLookup, mpt; 3200 pt = cssp._classNamePT = new CSSPropTween(t, p, 0, 0, pt, 2); 3201 pt.setRatio = _setClassNameRatio; 3202 pt.pr = -11; 3203 _hasPriority = true; 3204 pt.b = b; 3205 bs = _getAllStyles(t, _cs); 3206 //if there's a className tween already operating on the target, force it to its end so that the necessary inline styles are removed and the class name is applied before we determine the end state (we don't want inline styles interfering that were there just for class-specific values) 3207 cnpt = t._gsClassPT; 3208 if (cnpt) { 3209 cnptLookup = {}; 3210 mpt = cnpt.data; //first MiniPropTween which stores the inline styles - we need to force these so that the inline styles don't contaminate things. Otherwise, there's a small chance that a tween could start and the inline values match the destination values and they never get cleaned. 3211 while (mpt) { 3212 cnptLookup[mpt.p] = 1; 3213 mpt = mpt._next; 3214 } 3215 cnpt.setRatio(1); 3216 } 3217 t._gsClassPT = pt; 3218 pt.e = (e.charAt(1) !== "=") ? e : b.replace(new RegExp("(?:\\s|^)" + e.substr(2) + "(?![\\w-])"), "") + ((e.charAt(0) === "+") ? " " + e.substr(2) : ""); 3219 t.setAttribute("class", pt.e); 3220 difData = _cssDif(t, bs, _getAllStyles(t), vars, cnptLookup); 3221 t.setAttribute("class", b); 3222 pt.data = difData.firstMPT; 3223 if (t.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://greensock.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/. 3224 t.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). 3225 } 3226 pt = pt.xfirst = cssp.parse(t, difData.difs, pt, plugin); //we record the CSSPropTween as the xfirst so that we can handle overwriting propertly (if "className" gets overwritten, we must kill all the properties associated with the className part of the tween, so we can loop through from xfirst to the pt itself) 3227 return pt; 3228 }}); 3229 3230 3231 var _setClearPropsRatio = function(v) { 3232 if (v === 1 || v === 0) if (this.data._totalTime === this.data._totalDuration && this.data.data !== "isFromStart") { //this.data refers to the tween. Only clear at the END of the tween (remember, from() tweens make the ratio go from 1 to 0, so we can't just check that and if the tween is the zero-duration one that's created internally to render the starting values in a from() tween, ignore that because otherwise, for example, 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). 3233 var s = this.t.style, 3234 transformParse = _specialProps.transform.parse, 3235 a, p, i, clearTransform, transform; 3236 if (this.e === "all") { 3237 s.cssText = ""; 3238 clearTransform = true; 3239 } else { 3240 a = this.e.split(" ").join("").split(","); 3241 i = a.length; 3242 while (--i > -1) { 3243 p = a[i]; 3244 if (_specialProps[p]) { 3245 if (_specialProps[p].parse === transformParse) { 3246 clearTransform = true; 3247 } else { 3248 p = (p === "transformOrigin") ? _transformOriginProp : _specialProps[p].p; //ensures that special properties use the proper browser-specific property name, like "scaleX" might be "-webkit-transform" or "boxShadow" might be "-moz-box-shadow" 3249 } 3250 } 3251 _removeProp(s, p); 3252 } 3253 } 3254 if (clearTransform) { 3255 _removeProp(s, _transformProp); 3256 transform = this.t._gsTransform; 3257 if (transform) { 3258 if (transform.svg) { 3259 this.t.removeAttribute("data-svg-origin"); 3260 this.t.removeAttribute("transform"); 3261 } 3262 delete this.t._gsTransform; 3263 } 3264 } 3265 3266 } 3267 }; 3268 _registerComplexSpecialProp("clearProps", {parser:function(t, e, p, cssp, pt) { 3269 pt = new CSSPropTween(t, p, 0, 0, pt, 2); 3270 pt.setRatio = _setClearPropsRatio; 3271 pt.e = e; 3272 pt.pr = -10; 3273 pt.data = cssp._tween; 3274 _hasPriority = true; 3275 return pt; 3276 }}); 3277 3278 p = "bezier,throwProps,physicsProps,physics2D".split(","); 3279 i = p.length; 3280 while (i--) { 3281 _registerPluginProp(p[i]); 3282 } 3283 3284 3285 3286 3287 3288 3289 3290 3291 p = CSSPlugin.prototype; 3292 p._firstPT = p._lastParsedTransform = p._transform = null; 3293 3294 //gets called when the tween renders for the first time. This kicks everything off, recording start/end values, etc. 3295 p._onInitTween = function(target, vars, tween, index) { 3296 if (!target.nodeType) { //css is only for dom elements 3297 return false; 3298 } 3299 this._target = _target = target; 3300 this._tween = tween; 3301 this._vars = vars; 3302 _index = index; 3303 _autoRound = vars.autoRound; 3304 _hasPriority = false; 3305 _suffixMap = vars.suffixMap || CSSPlugin.suffixMap; 3306 _cs = _getComputedStyle(target, ""); 3307 _overwriteProps = this._overwriteProps; 3308 var style = target.style, 3309 v, pt, pt2, first, last, next, zIndex, tpt, threeD; 3310 if (_reqSafariFix) if (style.zIndex === "") { 3311 v = _getStyle(target, "zIndex", _cs); 3312 if (v === "auto" || v === "") { 3313 //corrects a bug in [non-Android] Safari that prevents it from repainting elements in their new positions if they don't have a zIndex set. We also can't just apply this inside _parseTransform() because anything that's moved in any way (like using "left" or "top" instead of transforms like "x" and "y") can be affected, so it is best to ensure that anything that's tweening has a z-index. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. Plus zIndex is less memory-intensive. 3314 this._addLazySet(style, "zIndex", 0); 3315 } 3316 } 3317 3318 if (typeof(vars) === "string") { 3319 first = style.cssText; 3320 v = _getAllStyles(target, _cs); 3321 style.cssText = first + ";" + vars; 3322 v = _cssDif(target, v, _getAllStyles(target)).difs; 3323 if (!_supportsOpacity && _opacityValExp.test(vars)) { 3324 v.opacity = parseFloat( RegExp.$1 ); 3325 } 3326 vars = v; 3327 style.cssText = first; 3328 } 3329 3330 if (vars.className) { //className tweens will combine any differences they find in the css with the vars that are passed in, so {className:"myClass", scale:0.5, left:20} would work. 3331 this._firstPT = pt = _specialProps.className.parse(target, vars.className, "className", this, null, null, vars); 3332 } else { 3333 this._firstPT = pt = this.parse(target, vars, null); 3334 } 3335 3336 if (this._transformType) { 3337 threeD = (this._transformType === 3); 3338 if (!_transformProp) { 3339 style.zoom = 1; //helps correct an IE issue. 3340 } else if (_isSafari) { 3341 _reqSafariFix = true; 3342 //if zIndex isn't set, iOS Safari doesn't repaint things correctly sometimes (seemingly at random). 3343 if (style.zIndex === "") { 3344 zIndex = _getStyle(target, "zIndex", _cs); 3345 if (zIndex === "auto" || zIndex === "") { 3346 this._addLazySet(style, "zIndex", 0); 3347 } 3348 } 3349 //Setting WebkitBackfaceVisibility corrects 3 bugs: 3350 // 1) [non-Android] Safari skips rendering changes to "top" and "left" that are made on the same frame/render as a transform update. 3351 // 2) iOS Safari sometimes neglects to repaint elements in their new positions. Setting "WebkitPerspective" to a non-zero value worked too except that on iOS Safari things would flicker randomly. 3352 // 3) Safari sometimes displayed odd artifacts when tweening the transform (or WebkitTransform) property, like ghosts of the edges of the element remained. Definitely a browser bug. 3353 //Note: we allow the user to override the auto-setting by defining WebkitBackfaceVisibility in the vars of the tween. 3354 if (_isSafariLT6) { 3355 this._addLazySet(style, "WebkitBackfaceVisibility", this._vars.WebkitBackfaceVisibility || (threeD ? "visible" : "hidden")); 3356 } 3357 } 3358 pt2 = pt; 3359 while (pt2 && pt2._next) { 3360 pt2 = pt2._next; 3361 } 3362 tpt = new CSSPropTween(target, "transform", 0, 0, null, 2); 3363 this._linkCSSP(tpt, null, pt2); 3364 tpt.setRatio = _transformProp ? _setTransformRatio : _setIETransformRatio; 3365 tpt.data = this._transform || _getTransform(target, _cs, true); 3366 tpt.tween = tween; 3367 tpt.pr = -1; //ensures that the transforms get applied after the components are updated. 3368 _overwriteProps.pop(); //we don't want to force the overwrite of all "transform" tweens of the target - we only care about individual transform properties like scaleX, rotation, etc. The CSSPropTween constructor automatically adds the property to _overwriteProps which is why we need to pop() here. 3369 } 3370 3371 if (_hasPriority) { 3372 //reorders the linked list in order of pr (priority) 3373 while (pt) { 3374 next = pt._next; 3375 pt2 = first; 3376 while (pt2 && pt2.pr > pt.pr) { 3377 pt2 = pt2._next; 3378 } 3379 if ((pt._prev = pt2 ? pt2._prev : last)) { 3380 pt._prev._next = pt; 3381 } else { 3382 first = pt; 3383 } 3384 if ((pt._next = pt2)) { 3385 pt2._prev = pt; 3386 } else { 3387 last = pt; 3388 } 3389 pt = next; 3390 } 3391 this._firstPT = first; 3392 } 3393 return true; 3394 }; 3395 3396 3397 p.parse = function(target, vars, pt, plugin) { 3398 var style = target.style, 3399 p, sp, bn, en, bs, es, bsfx, esfx, isStr, rel; 3400 for (p in vars) { 3401 es = vars[p]; //ending value string 3402 sp = _specialProps[p]; //SpecialProp lookup. 3403 if (typeof(es) === "function" && !(sp && sp.allowFunc)) { 3404 es = es(_index, _target); 3405 } 3406 if (sp) { 3407 pt = sp.parse(target, es, p, this, pt, plugin, vars); 3408 } else if (p.substr(0,2) === "--") { //for tweening CSS variables (which always start with "--"). To maximize performance and simplicity, we bypass CSSPlugin altogether and just add a normal property tween to the tween instance itself. 3409 this._tween._propLookup[p] = this._addTween.call(this._tween, target.style, "setProperty", _getComputedStyle(target).getPropertyValue(p) + "", es + "", p, false, p); 3410 continue; 3411 } else { 3412 bs = _getStyle(target, p, _cs) + ""; 3413 isStr = (typeof(es) === "string"); 3414 if (p === "color" || p === "fill" || p === "stroke" || p.indexOf("Color") !== -1 || (isStr && _rgbhslExp.test(es))) { //Opera uses background: to define color sometimes in addition to backgroundColor: 3415 if (!isStr) { 3416 es = _parseColor(es); 3417 es = ((es.length > 3) ? "rgba(" : "rgb(") + es.join(",") + ")"; 3418 } 3419 pt = _parseComplex(style, p, bs, es, true, "transparent", pt, 0, plugin); 3420 3421 } else if (isStr && _complexExp.test(es)) { 3422 pt = _parseComplex(style, p, bs, es, true, null, pt, 0, plugin); 3423 3424 } else { 3425 bn = parseFloat(bs); 3426 bsfx = (bn || bn === 0) ? bs.substr((bn + "").length) : ""; //remember, bs could be non-numeric like "normal" for fontWeight, so we should default to a blank suffix in that case. 3427 3428 if (bs === "" || bs === "auto") { 3429 if (p === "width" || p === "height") { 3430 bn = _getDimension(target, p, _cs); 3431 bsfx = "px"; 3432 } else if (p === "left" || p === "top") { 3433 bn = _calculateOffset(target, p, _cs); 3434 bsfx = "px"; 3435 } else { 3436 bn = (p !== "opacity") ? 0 : 1; 3437 bsfx = ""; 3438 } 3439 } 3440 3441 rel = (isStr && es.charAt(1) === "="); 3442 if (rel) { 3443 en = parseInt(es.charAt(0) + "1", 10); 3444 es = es.substr(2); 3445 en *= parseFloat(es); 3446 esfx = es.replace(_suffixExp, ""); 3447 } else { 3448 en = parseFloat(es); 3449 esfx = isStr ? es.replace(_suffixExp, "") : ""; 3450 } 3451 3452 if (esfx === "") { 3453 esfx = (p in _suffixMap) ? _suffixMap[p] : bsfx; //populate the end suffix, prioritizing the map, then if none is found, use the beginning suffix. 3454 } 3455 3456 es = (en || en === 0) ? (rel ? en + bn : en) + esfx : vars[p]; //ensures that any += or -= prefixes are taken care of. Record the end value before normalizing the suffix because we always want to end the tween on exactly what they intended even if it doesn't match the beginning value's suffix. 3457 //if the beginning/ending suffixes don't match, normalize them... 3458 if (bsfx !== esfx) if (esfx !== "" || p === "lineHeight") if (en || en === 0) if (bn) { //note: if the beginning value (bn) is 0, we don't need to convert units! 3459 bn = _convertToPixels(target, p, bn, bsfx); 3460 if (esfx === "%") { 3461 bn /= _convertToPixels(target, p, 100, "%") / 100; 3462 if (vars.strictUnits !== true) { //some browsers report only "px" values instead of allowing "%" with getComputedStyle(), so we assume that if we're tweening to a %, we should start there too unless strictUnits:true is defined. This approach is particularly useful for responsive designs that use from() tweens. 3463 bs = bn + "%"; 3464 } 3465 3466 } else if (esfx === "em" || esfx === "rem" || esfx === "vw" || esfx === "vh") { 3467 bn /= _convertToPixels(target, p, 1, esfx); 3468 3469 //otherwise convert to pixels. 3470 } else if (esfx !== "px") { 3471 en = _convertToPixels(target, p, en, esfx); 3472 esfx = "px"; //we don't use bsfx after this, so we don't need to set it to px too. 3473 } 3474 if (rel) if (en || en === 0) { 3475 es = (en + bn) + esfx; //the changes we made affect relative calculations, so adjust the end value here. 3476 } 3477 } 3478 3479 if (rel) { 3480 en += bn; 3481 } 3482 3483 if ((bn || bn === 0) && (en || en === 0)) { //faster than isNaN(). Also, previously we required en !== bn but that doesn't really gain much performance and it prevents _parseToProxy() from working properly if beginning and ending values match but need to get tweened by an external plugin anyway. For example, a bezier tween where the target starts at left:0 and has these points: [{left:50},{left:0}] wouldn't work properly because when parsing the last point, it'd match the first (current) one and a non-tweening CSSPropTween would be recorded when we actually need a normal tween (type:0) so that things get updated during the tween properly. 3484 pt = new CSSPropTween(style, p, bn, en - bn, pt, 0, p, (_autoRound !== false && (esfx === "px" || p === "zIndex")), 0, bs, es); 3485 pt.xs0 = esfx; 3486 //DEBUG: _log("tween "+p+" from "+pt.b+" ("+bn+esfx+") to "+pt.e+" with suffix: "+pt.xs0); 3487 } else if (style[p] === undefined || !es && (es + "" === "NaN" || es == null)) { 3488 _log("invalid " + p + " tween value: " + vars[p]); 3489 } else { 3490 pt = new CSSPropTween(style, p, en || bn || 0, 0, pt, -1, p, false, 0, bs, es); 3491 pt.xs0 = (es === "none" && (p === "display" || p.indexOf("Style") !== -1)) ? bs : es; //intermediate value should typically be set immediately (end value) except for "display" or things like borderTopStyle, borderBottomStyle, etc. which should use the beginning value during the tween. 3492 //DEBUG: _log("non-tweening value "+p+": "+pt.xs0); 3493 } 3494 } 3495 } 3496 if (plugin) if (pt && !pt.plugin) { 3497 pt.plugin = plugin; 3498 } 3499 } 3500 return pt; 3501 }; 3502 3503 3504 //gets called every time the tween updates, passing the new ratio (typically a value between 0 and 1, but not always (for example, if an Elastic.easeOut is used, the value can jump above 1 mid-tween). It will always start and 0 and end at 1. 3505 p.setRatio = function(v) { 3506 var pt = this._firstPT, 3507 min = 0.000001, 3508 val, str, i; 3509 //at the end of the tween, we set the values to exactly what we received in order to make sure non-tweening values (like "position" or "float" or whatever) are set and so that if the beginning/ending suffixes (units) didn't match and we normalized to px, the value that the user passed in is used here. We check to see if the tween is at its beginning in case it's a from() tween in which case the ratio will actually go from 1 to 0 over the course of the tween (backwards). 3510 if (v === 1 && (this._tween._time === this._tween._duration || this._tween._time === 0)) { 3511 while (pt) { 3512 if (pt.type !== 2) { 3513 if (pt.r && pt.type !== -1) { 3514 val = pt.r(pt.s + pt.c); 3515 if (!pt.type) { 3516 pt.t[pt.p] = val + pt.xs0; 3517 } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)" 3518 i = pt.l; 3519 str = pt.xs0 + val + pt.xs1; 3520 for (i = 1; i < pt.l; i++) { 3521 str += pt["xn"+i] + pt["xs"+(i+1)]; 3522 } 3523 pt.t[pt.p] = str; 3524 } 3525 } else { 3526 pt.t[pt.p] = pt.e; 3527 } 3528 } else { 3529 pt.setRatio(v); 3530 } 3531 pt = pt._next; 3532 } 3533 3534 } else if (v || !(this._tween._time === this._tween._duration || this._tween._time === 0) || this._tween._rawPrevTime === -0.000001) { 3535 while (pt) { 3536 val = pt.c * v + pt.s; 3537 if (pt.r) { 3538 val = pt.r(val); 3539 } else if (val < min) if (val > -min) { 3540 val = 0; 3541 } 3542 if (!pt.type) { 3543 pt.t[pt.p] = val + pt.xs0; 3544 } else if (pt.type === 1) { //complex value (one that typically has multiple numbers inside a string, like "rect(5px,10px,20px,25px)" 3545 i = pt.l; 3546 if (i === 2) { 3547 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2; 3548 } else if (i === 3) { 3549 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3; 3550 } else if (i === 4) { 3551 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4; 3552 } else if (i === 5) { 3553 pt.t[pt.p] = pt.xs0 + val + pt.xs1 + pt.xn1 + pt.xs2 + pt.xn2 + pt.xs3 + pt.xn3 + pt.xs4 + pt.xn4 + pt.xs5; 3554 } else { 3555 str = pt.xs0 + val + pt.xs1; 3556 for (i = 1; i < pt.l; i++) { 3557 str += pt["xn"+i] + pt["xs"+(i+1)]; 3558 } 3559 pt.t[pt.p] = str; 3560 } 3561 3562 } else if (pt.type === -1) { //non-tweening value 3563 pt.t[pt.p] = pt.xs0; 3564 3565 } else if (pt.setRatio) { //custom setRatio() for things like SpecialProps, external plugins, etc. 3566 pt.setRatio(v); 3567 } 3568 pt = pt._next; 3569 } 3570 3571 //if the tween is reversed all the way back to the beginning, we need to restore the original values which may have different units (like % instead of px or em or whatever). 3572 } else { 3573 while (pt) { 3574 if (pt.type !== 2) { 3575 pt.t[pt.p] = pt.b; 3576 } else { 3577 pt.setRatio(v); 3578 } 3579 pt = pt._next; 3580 } 3581 } 3582 }; 3583 3584 /** 3585 * @private 3586 * Forces rendering of the target's transforms (rotation, scale, etc.) whenever the CSSPlugin's setRatio() is called. 3587 * Basically, this tells the CSSPlugin to create a CSSPropTween (type 2) after instantiation that runs last in the linked 3588 * list and calls the appropriate (3D or 2D) rendering function. We separate this into its own method so that we can call 3589 * it from other plugins like BezierPlugin if, for example, it needs to apply an autoRotation and this CSSPlugin 3590 * doesn't have any transform-related properties of its own. You can call this method as many times as you 3591 * want and it won't create duplicate CSSPropTweens. 3592 * 3593 * @param {boolean} threeD if true, it should apply 3D tweens (otherwise, just 2D ones are fine and typically faster) 3594 */ 3595 p._enableTransforms = function(threeD) { 3596 this._transform = this._transform || _getTransform(this._target, _cs, true); //ensures that the element has a _gsTransform property with the appropriate values. 3597 this._transformType = (!(this._transform.svg && _useSVGTransformAttr) && (threeD || this._transformType === 3)) ? 3 : 2; 3598 }; 3599 3600 var lazySet = function(v) { 3601 this.t[this.p] = this.e; 3602 this.data._linkCSSP(this, this._next, null, true); //we purposefully keep this._next even though it'd make sense to null it, but this is a performance optimization, as this happens during the while (pt) {} loop in setRatio() at the bottom of which it sets pt = pt._next, so if we null it, the linked list will be broken in that loop. 3603 }; 3604 /** @private Gives us a way to set a value on the first render (and only the first render). **/ 3605 p._addLazySet = function(t, p, v) { 3606 var pt = this._firstPT = new CSSPropTween(t, p, 0, 0, this._firstPT, 2); 3607 pt.e = v; 3608 pt.setRatio = lazySet; 3609 pt.data = this; 3610 }; 3611 3612 /** @private **/ 3613 p._linkCSSP = function(pt, next, prev, remove) { 3614 if (pt) { 3615 if (next) { 3616 next._prev = pt; 3617 } 3618 if (pt._next) { 3619 pt._next._prev = pt._prev; 3620 } 3621 if (pt._prev) { 3622 pt._prev._next = pt._next; 3623 } else if (this._firstPT === pt) { 3624 this._firstPT = pt._next; 3625 remove = true; //just to prevent resetting this._firstPT 5 lines down in case pt._next is null. (optimized for speed) 3626 } 3627 if (prev) { 3628 prev._next = pt; 3629 } else if (!remove && this._firstPT === null) { 3630 this._firstPT = pt; 3631 } 3632 pt._next = next; 3633 pt._prev = prev; 3634 } 3635 return pt; 3636 }; 3637 3638 p._mod = function(lookup) { 3639 var pt = this._firstPT; 3640 while (pt) { 3641 if (typeof(lookup[pt.p]) === "function") { //only gets called by RoundPropsPlugin (ModifyPlugin manages all the rendering internally for CSSPlugin properties that need modification). Remember, we handle rounding a bit differently in this plugin for performance reasons, leveraging "r" as an indicator that the value should be rounded internally. 3642 pt.r = lookup[pt.p]; 3643 } 3644 pt = pt._next; 3645 } 3646 }; 3647 3648 //we need to make sure that if alpha or autoAlpha is killed, opacity is too. And autoAlpha affects the "visibility" property. 3649 p._kill = function(lookup) { 3650 var copy = lookup, 3651 pt, p, xfirst; 3652 if (lookup.autoAlpha || lookup.alpha) { 3653 copy = {}; 3654 for (p in lookup) { //copy the lookup so that we're not changing the original which may be passed elsewhere. 3655 copy[p] = lookup[p]; 3656 } 3657 copy.opacity = 1; 3658 if (copy.autoAlpha) { 3659 copy.visibility = 1; 3660 } 3661 } 3662 if (lookup.className && (pt = this._classNamePT)) { //for className tweens, we need to kill any associated CSSPropTweens too; a linked list starts at the className's "xfirst". 3663 xfirst = pt.xfirst; 3664 if (xfirst && xfirst._prev) { 3665 this._linkCSSP(xfirst._prev, pt._next, xfirst._prev._prev); //break off the prev 3666 } else if (xfirst === this._firstPT) { 3667 this._firstPT = pt._next; 3668 } 3669 if (pt._next) { 3670 this._linkCSSP(pt._next, pt._next._next, xfirst._prev); 3671 } 3672 this._classNamePT = null; 3673 } 3674 pt = this._firstPT; 3675 while (pt) { 3676 if (pt.plugin && pt.plugin !== p && pt.plugin._kill) { //for plugins that are registered with CSSPlugin, we should notify them of the kill. 3677 pt.plugin._kill(lookup); 3678 p = pt.plugin; 3679 } 3680 pt = pt._next; 3681 } 3682 return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["TweenPlugin"].prototype._kill.call(this, copy); 3683 }; 3684 3685 3686 3687 //used by cascadeTo() for gathering all the style properties of each child element into an array for comparison. 3688 var _getChildStyles = function(e, props, targets) { 3689 var children, i, child, type; 3690 if (e.slice) { 3691 i = e.length; 3692 while (--i > -1) { 3693 _getChildStyles(e[i], props, targets); 3694 } 3695 return; 3696 } 3697 children = e.childNodes; 3698 i = children.length; 3699 while (--i > -1) { 3700 child = children[i]; 3701 type = child.type; 3702 if (child.style) { 3703 props.push(_getAllStyles(child)); 3704 if (targets) { 3705 targets.push(child); 3706 } 3707 } 3708 if ((type === 1 || type === 9 || type === 11) && child.childNodes.length) { 3709 _getChildStyles(child, props, targets); 3710 } 3711 } 3712 }; 3713 3714 /** 3715 * Typically only useful for className tweens that may affect child elements, this method creates a TweenLite 3716 * and then compares the style properties of all the target's child elements at the tween's start and end, and 3717 * if any are different, it also creates tweens for those and returns an array containing ALL of the resulting 3718 * tweens (so that you can easily add() them to a TimelineLite, for example). The reason this functionality is 3719 * wrapped into a separate static method of CSSPlugin instead of being integrated into all regular className tweens 3720 * is because it creates entirely new tweens that may have completely different targets than the original tween, 3721 * so if they were all lumped into the original tween instance, it would be inconsistent with the rest of the API 3722 * and it would create other problems. For example: 3723 * - If I create a tween of elementA, that tween instance may suddenly change its target to include 50 other elements (unintuitive if I specifically defined the target I wanted) 3724 * - We can't just create new independent tweens because otherwise, what happens if the original/parent tween is reversed or pause or dropped into a TimelineLite for tight control? You'd expect that tween's behavior to affect all the others. 3725 * - Analyzing every style property of every child before and after the tween is an expensive operation when there are many children, so this behavior shouldn't be imposed on all className tweens by default, especially since it's probably rare that this extra functionality is needed. 3726 * 3727 * @param {Object} target object to be tweened 3728 * @param {number} Duration in seconds (or frames for frames-based tweens) 3729 * @param {Object} Object containing the end values, like {className:"newClass", ease:Linear.easeNone} 3730 * @return {Array} An array of TweenLite instances 3731 */ 3732 CSSPlugin.cascadeTo = function(target, duration, vars) { 3733 var tween = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].to(target, duration, vars), 3734 results = [tween], 3735 b = [], 3736 e = [], 3737 targets = [], 3738 _reservedProps = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]._internals.reservedProps, 3739 i, difs, p, from; 3740 target = tween._targets || tween.target; 3741 _getChildStyles(target, b, targets); 3742 tween.render(duration, true, true); 3743 _getChildStyles(target, e); 3744 tween.render(0, true, true); 3745 tween._enabled(true); 3746 i = targets.length; 3747 while (--i > -1) { 3748 difs = _cssDif(targets[i], b[i], e[i]); 3749 if (difs.firstMPT) { 3750 difs = difs.difs; 3751 for (p in vars) { 3752 if (_reservedProps[p]) { 3753 difs[p] = vars[p]; 3754 } 3755 } 3756 from = {}; 3757 for (p in difs) { 3758 from[p] = b[i][p]; 3759 } 3760 results.push(_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].fromTo(targets[i], duration, from, difs)); 3761 } 3762 } 3763 return results; 3764 }; 3765 3766 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["TweenPlugin"].activate([CSSPlugin]); 3767 return CSSPlugin; 3768 3769 }, true); 3770 3771var CSSPlugin = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].CSSPlugin; 3772 3773 3774/***/ }), 3775
vendor: 3,791 bytes, lines 3776-3876
3776/***/ "../../../../../node_modules/gsap/DirectionalRotationPlugin.js": 3777/*!*****************************************************************************************!*\ 3778 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/DirectionalRotationPlugin.js ***! 3779 \*****************************************************************************************/ 3780/*! exports provided: DirectionalRotationPlugin, default */ 3781/***/ (function(module, __webpack_exports__, __webpack_require__) { 3782 3783"use strict"; 3784__webpack_require__.r(__webpack_exports__); 3785/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DirectionalRotationPlugin", function() { return DirectionalRotationPlugin; }); 3786/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return DirectionalRotationPlugin; }); 3787/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 3788/*! 3789 * VERSION: 0.3.1 3790 * DATE: 2018-08-27 3791 * UPDATES AND DOCS AT: http://greensock.com 3792 * 3793 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 3794 * This work is subject to the terms at http://greensock.com/standard-license or for 3795 * Club GreenSock members, the software agreement that was issued with your membership. 3796 * 3797 * @author: Jack Doyle, [email protected] 3798 **/ 3799/* eslint-disable */ 3800 3801 3802 3803var DirectionalRotationPlugin = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine.plugin({ 3804 propName: "directionalRotation", 3805 version: "0.3.1", 3806 API: 2, 3807 3808 //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run. 3809 init: function(target, value, tween, index) { 3810 if (typeof(value) !== "object") { 3811 value = {rotation:value}; 3812 } 3813 this.finals = {}; 3814 var cap = (value.useRadians === true) ? Math.PI * 2 : 360, 3815 min = 0.000001, 3816 p, v, start, end, dif, split; 3817 for (p in value) { 3818 if (p !== "useRadians") { 3819 end = value[p]; 3820 if (typeof(end) === "function") { 3821 end = end(index, target); 3822 } 3823 split = (end + "").split("_"); 3824 v = split[0]; 3825 start = parseFloat( (typeof(target[p]) !== "function") ? target[p] : target[ ((p.indexOf("set") || typeof(target["get" + p.substr(3)]) !== "function") ? p : "get" + p.substr(3)) ]() ); 3826 end = this.finals[p] = (typeof(v) === "string" && v.charAt(1) === "=") ? start + parseInt(v.charAt(0) + "1", 10) * Number(v.substr(2)) : Number(v) || 0; 3827 dif = end - start; 3828 if (split.length) { 3829 v = split.join("_"); 3830 if (v.indexOf("short") !== -1) { 3831 dif = dif % cap; 3832 if (dif !== dif % (cap / 2)) { 3833 dif = (dif < 0) ? dif + cap : dif - cap; 3834 } 3835 } 3836 if (v.indexOf("_cw") !== -1 && dif < 0) { 3837 dif = ((dif + cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 3838 } else if (v.indexOf("ccw") !== -1 && dif > 0) { 3839 dif = ((dif - cap * 9999999999) % cap) - ((dif / cap) | 0) * cap; 3840 } 3841 } 3842 if (dif > min || dif < -min) { 3843 this._addTween(target, p, start, start + dif, p); 3844 this._overwriteProps.push(p); 3845 } 3846 } 3847 } 3848 return true; 3849 }, 3850 3851 //called each time the values should be updated, and the ratio gets passed as the only parameter (typically it's a value between 0 and 1, but it can exceed those when using an ease like Elastic.easeOut or Back.easeOut, etc.) 3852 set: function(ratio) { 3853 var pt; 3854 if (ratio !== 1) { 3855 this._super.setRatio.call(this, ratio); 3856 } else { 3857 pt = this._firstPT; 3858 while (pt) { 3859 if (pt.f) { 3860 pt.t[pt.p](this.finals[pt.p]); 3861 } else { 3862 pt.t[pt.p] = this.finals[pt.p]; 3863 } 3864 pt = pt._next; 3865 } 3866 } 3867 } 3868 3869 }); 3870 3871DirectionalRotationPlugin._autoCSS = true; 3872 3873 3874 3875/***/ }), 3876
vendor: 14,902 bytes, lines 3877-4286
3877/***/ "../../../../../node_modules/gsap/EasePack.js": 3878/*!************************************************************************!*\ 3879 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/EasePack.js ***! 3880 \************************************************************************/ 3881/*! exports provided: Back, Elastic, Bounce, RoughEase, SlowMo, SteppedEase, Circ, Expo, Sine, ExpoScaleEase, Linear, Power0, Power1, Power2, Power3, Power4 */ 3882/***/ (function(module, __webpack_exports__, __webpack_require__) { 3883 3884"use strict"; 3885__webpack_require__.r(__webpack_exports__); 3886/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return Back; }); 3887/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return Elastic; }); 3888/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return Bounce; }); 3889/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RoughEase", function() { return RoughEase; }); 3890/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SlowMo", function() { return SlowMo; }); 3891/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return SteppedEase; }); 3892/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return Circ; }); 3893/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return Expo; }); 3894/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return Sine; }); 3895/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ExpoScaleEase", function() { return ExpoScaleEase; }); 3896/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 3897/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Linear"]; }); 3898 3899/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power0"]; }); 3900 3901/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power1"]; }); 3902 3903/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power2"]; }); 3904 3905/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power3"]; }); 3906 3907/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power4"]; }); 3908 3909/*! 3910 * VERSION: 1.16.1 3911 * DATE: 2018-08-27 3912 * UPDATES AND DOCS AT: http://greensock.com 3913 * 3914 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 3915 * This work is subject to the terms at http://greensock.com/standard-license or for 3916 * Club GreenSock members, the software agreement that was issued with your membership. 3917 * 3918 * @author: Jack Doyle, [email protected] 3919 **/ 3920/* eslint-disable */ 3921 3922 3923 3924_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine("easing.Back", ["easing.Ease"], function() { 3925 3926 var w = (_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"].GreenSockGlobals || _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]), 3927 gs = w.com.greensock, 3928 _2PI = Math.PI * 2, 3929 _HALF_PI = Math.PI / 2, 3930 _class = gs._class, 3931 _create = function(n, f) { 3932 var C = _class("easing." + n, function(){}, true), 3933 p = C.prototype = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"](); 3934 p.constructor = C; 3935 p.getRatio = f; 3936 return C; 3937 }, 3938 _easeReg = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"].register || function(){}, //put an empty function in place just as a safety measure in case someone loads an OLD version of TweenLite.js where Ease.register doesn't exist. 3939 _wrap = function(name, EaseOut, EaseIn, EaseInOut, aliases) { 3940 var C = _class("easing."+name, { 3941 easeOut:new EaseOut(), 3942 easeIn:new EaseIn(), 3943 easeInOut:new EaseInOut() 3944 }, true); 3945 _easeReg(C, name); 3946 return C; 3947 }, 3948 EasePoint = function(time, value, next) { 3949 this.t = time; 3950 this.v = value; 3951 if (next) { 3952 this.next = next; 3953 next.prev = this; 3954 this.c = next.v - value; 3955 this.gap = next.t - time; 3956 } 3957 }, 3958 3959 //Back 3960 _createBack = function(n, f) { 3961 var C = _class("easing." + n, function(overshoot) { 3962 this._p1 = (overshoot || overshoot === 0) ? overshoot : 1.70158; 3963 this._p2 = this._p1 * 1.525; 3964 }, true), 3965 p = C.prototype = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"](); 3966 p.constructor = C; 3967 p.getRatio = f; 3968 p.config = function(overshoot) { 3969 return new C(overshoot); 3970 }; 3971 return C; 3972 }, 3973 3974 Back = _wrap("Back", 3975 _createBack("BackOut", function(p) { 3976 return ((p = p - 1) * p * ((this._p1 + 1) * p + this._p1) + 1); 3977 }), 3978 _createBack("BackIn", function(p) { 3979 return p * p * ((this._p1 + 1) * p - this._p1); 3980 }), 3981 _createBack("BackInOut", function(p) { 3982 return ((p *= 2) < 1) ? 0.5 * p * p * ((this._p2 + 1) * p - this._p2) : 0.5 * ((p -= 2) * p * ((this._p2 + 1) * p + this._p2) + 2); 3983 }) 3984 ), 3985 3986 3987 //SlowMo 3988 SlowMo = _class("easing.SlowMo", function(linearRatio, power, yoyoMode) { 3989 power = (power || power === 0) ? power : 0.7; 3990 if (linearRatio == null) { 3991 linearRatio = 0.7; 3992 } else if (linearRatio > 1) { 3993 linearRatio = 1; 3994 } 3995 this._p = (linearRatio !== 1) ? power : 0; 3996 this._p1 = (1 - linearRatio) / 2; 3997 this._p2 = linearRatio; 3998 this._p3 = this._p1 + this._p2; 3999 this._calcEnd = (yoyoMode === true); 4000 }, true), 4001 p = SlowMo.prototype = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"](), 4002 SteppedEase, ExpoScaleEase, RoughEase, _createElastic; 4003 4004 p.constructor = SlowMo; 4005 p.getRatio = function(p) { 4006 var r = p + (0.5 - p) * this._p; 4007 if (p < this._p1) { 4008 return this._calcEnd ? 1 - ((p = 1 - (p / this._p1)) * p) : r - ((p = 1 - (p / this._p1)) * p * p * p * r); 4009 } else if (p > this._p3) { 4010 return this._calcEnd ? (p === 1 ? 0 : 1 - (p = (p - this._p3) / this._p1) * p) : r + ((p - r) * (p = (p - this._p3) / this._p1) * p * p * p); //added p === 1 ? 0 to avoid floating point rounding errors from affecting the final value, like 1 - 0.7 = 0.30000000000000004 instead of 0.3 4011 } 4012 return this._calcEnd ? 1 : r; 4013 }; 4014 SlowMo.ease = new SlowMo(0.7, 0.7); 4015 4016 p.config = SlowMo.config = function(linearRatio, power, yoyoMode) { 4017 return new SlowMo(linearRatio, power, yoyoMode); 4018 }; 4019 4020 4021 //SteppedEase 4022 SteppedEase = _class("easing.SteppedEase", function(steps, immediateStart) { 4023 steps = steps || 1; 4024 this._p1 = 1 / steps; 4025 this._p2 = steps + (immediateStart ? 0 : 1); 4026 this._p3 = immediateStart ? 1 : 0; 4027 }, true); 4028 p = SteppedEase.prototype = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"](); 4029 p.constructor = SteppedEase; 4030 p.getRatio = function(p) { 4031 if (p < 0) { 4032 p = 0; 4033 } else if (p >= 1) { 4034 p = 0.999999999; 4035 } 4036 return (((this._p2 * p) | 0) + this._p3) * this._p1; 4037 }; 4038 p.config = SteppedEase.config = function(steps, immediateStart) { 4039 return new SteppedEase(steps, immediateStart); 4040 }; 4041 4042 4043 //ExpoScaleEase 4044 ExpoScaleEase = _class("easing.ExpoScaleEase", function(start, end, ease) { 4045 this._p1 = Math.log(end / start); 4046 this._p2 = end - start; 4047 this._p3 = start; 4048 this._ease = ease; 4049 }, true); 4050 p = ExpoScaleEase.prototype = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"](); 4051 p.constructor = ExpoScaleEase; 4052 p.getRatio = function(p) { 4053 if (this._ease) { 4054 p = this._ease.getRatio(p); 4055 } 4056 return (this._p3 * Math.exp(this._p1 * p) - this._p3) / this._p2; 4057 }; 4058 p.config = ExpoScaleEase.config = function(start, end, ease) { 4059 return new ExpoScaleEase(start, end, ease); 4060 }; 4061 4062 4063 //RoughEase 4064 RoughEase = _class("easing.RoughEase", function(vars) { 4065 vars = vars || {}; 4066 var taper = vars.taper || "none", 4067 a = [], 4068 cnt = 0, 4069 points = (vars.points || 20) | 0, 4070 i = points, 4071 randomize = (vars.randomize !== false), 4072 clamp = (vars.clamp === true), 4073 template = (vars.template instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"]) ? vars.template : null, 4074 strength = (typeof(vars.strength) === "number") ? vars.strength * 0.4 : 0.4, 4075 x, y, bump, invX, obj, pnt; 4076 while (--i > -1) { 4077 x = randomize ? Math.random() : (1 / points) * i; 4078 y = template ? template.getRatio(x) : x; 4079 if (taper === "none") { 4080 bump = strength; 4081 } else if (taper === "out") { 4082 invX = 1 - x; 4083 bump = invX * invX * strength; 4084 } else if (taper === "in") { 4085 bump = x * x * strength; 4086 } else if (x < 0.5) { //"both" (start) 4087 invX = x * 2; 4088 bump = invX * invX * 0.5 * strength; 4089 } else { //"both" (end) 4090 invX = (1 - x) * 2; 4091 bump = invX * invX * 0.5 * strength; 4092 } 4093 if (randomize) { 4094 y += (Math.random() * bump) - (bump * 0.5); 4095 } else if (i % 2) { 4096 y += bump * 0.5; 4097 } else { 4098 y -= bump * 0.5; 4099 } 4100 if (clamp) { 4101 if (y > 1) { 4102 y = 1; 4103 } else if (y < 0) { 4104 y = 0; 4105 } 4106 } 4107 a[cnt++] = {x:x, y:y}; 4108 } 4109 a.sort(function(a, b) { 4110 return a.x - b.x; 4111 }); 4112 4113 pnt = new EasePoint(1, 1, null); 4114 i = points; 4115 while (--i > -1) { 4116 obj = a[i]; 4117 pnt = new EasePoint(obj.x, obj.y, pnt); 4118 } 4119 4120 this._prev = new EasePoint(0, 0, (pnt.t !== 0) ? pnt : pnt.next); 4121 }, true); 4122 p = RoughEase.prototype = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"](); 4123 p.constructor = RoughEase; 4124 p.getRatio = function(p) { 4125 var pnt = this._prev; 4126 if (p > pnt.t) { 4127 while (pnt.next && p >= pnt.t) { 4128 pnt = pnt.next; 4129 } 4130 pnt = pnt.prev; 4131 } else { 4132 while (pnt.prev && p <= pnt.t) { 4133 pnt = pnt.prev; 4134 } 4135 } 4136 this._prev = pnt; 4137 return (pnt.v + ((p - pnt.t) / pnt.gap) * pnt.c); 4138 }; 4139 p.config = function(vars) { 4140 return new RoughEase(vars); 4141 }; 4142 RoughEase.ease = new RoughEase(); 4143 4144 4145 //Bounce 4146 _wrap("Bounce", 4147 _create("BounceOut", function(p) { 4148 if (p < 1 / 2.75) { 4149 return 7.5625 * p * p; 4150 } else if (p < 2 / 2.75) { 4151 return 7.5625 * (p -= 1.5 / 2.75) * p + 0.75; 4152 } else if (p < 2.5 / 2.75) { 4153 return 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375; 4154 } 4155 return 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375; 4156 }), 4157 _create("BounceIn", function(p) { 4158 if ((p = 1 - p) < 1 / 2.75) { 4159 return 1 - (7.5625 * p * p); 4160 } else if (p < 2 / 2.75) { 4161 return 1 - (7.5625 * (p -= 1.5 / 2.75) * p + 0.75); 4162 } else if (p < 2.5 / 2.75) { 4163 return 1 - (7.5625 * (p -= 2.25 / 2.75) * p + 0.9375); 4164 } 4165 return 1 - (7.5625 * (p -= 2.625 / 2.75) * p + 0.984375); 4166 }), 4167 _create("BounceInOut", function(p) { 4168 var invert = (p < 0.5); 4169 if (invert) { 4170 p = 1 - (p * 2); 4171 } else { 4172 p = (p * 2) - 1; 4173 } 4174 if (p < 1 / 2.75) { 4175 p = 7.5625 * p * p; 4176 } else if (p < 2 / 2.75) { 4177 p = 7.5625 * (p -= 1.5 / 2.75) * p + 0.75; 4178 } else if (p < 2.5 / 2.75) { 4179 p = 7.5625 * (p -= 2.25 / 2.75) * p + 0.9375; 4180 } else { 4181 p = 7.5625 * (p -= 2.625 / 2.75) * p + 0.984375; 4182 } 4183 return invert ? (1 - p) * 0.5 : p * 0.5 + 0.5; 4184 }) 4185 ); 4186 4187 4188 //CIRC 4189 _wrap("Circ", 4190 _create("CircOut", function(p) { 4191 return Math.sqrt(1 - (p = p - 1) * p); 4192 }), 4193 _create("CircIn", function(p) { 4194 return -(Math.sqrt(1 - (p * p)) - 1); 4195 }), 4196 _create("CircInOut", function(p) { 4197 return ((p*=2) < 1) ? -0.5 * (Math.sqrt(1 - p * p) - 1) : 0.5 * (Math.sqrt(1 - (p -= 2) * p) + 1); 4198 }) 4199 ); 4200 4201 4202 //Elastic 4203 _createElastic = function(n, f, def) { 4204 var C = _class("easing." + n, function(amplitude, period) { 4205 this._p1 = (amplitude >= 1) ? amplitude : 1; //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. 4206 this._p2 = (period || def) / (amplitude < 1 ? amplitude : 1); 4207 this._p3 = this._p2 / _2PI * (Math.asin(1 / this._p1) || 0); 4208 this._p2 = _2PI / this._p2; //precalculate to optimize 4209 }, true), 4210 p = C.prototype = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"](); 4211 p.constructor = C; 4212 p.getRatio = f; 4213 p.config = function(amplitude, period) { 4214 return new C(amplitude, period); 4215 }; 4216 return C; 4217 }; 4218 _wrap("Elastic", 4219 _createElastic("ElasticOut", function(p) { 4220 return this._p1 * Math.pow(2, -10 * p) * Math.sin( (p - this._p3) * this._p2 ) + 1; 4221 }, 0.3), 4222 _createElastic("ElasticIn", function(p) { 4223 return -(this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2 )); 4224 }, 0.3), 4225 _createElastic("ElasticInOut", function(p) { 4226 return ((p *= 2) < 1) ? -0.5 * (this._p1 * Math.pow(2, 10 * (p -= 1)) * Math.sin( (p - this._p3) * this._p2)) : this._p1 * Math.pow(2, -10 *(p -= 1)) * Math.sin( (p - this._p3) * this._p2 ) * 0.5 + 1; 4227 }, 0.45) 4228 ); 4229 4230 4231 //Expo 4232 _wrap("Expo", 4233 _create("ExpoOut", function(p) { 4234 return 1 - Math.pow(2, -10 * p); 4235 }), 4236 _create("ExpoIn", function(p) { 4237 return Math.pow(2, 10 * (p - 1)) - 0.001; 4238 }), 4239 _create("ExpoInOut", function(p) { 4240 return ((p *= 2) < 1) ? 0.5 * Math.pow(2, 10 * (p - 1)) : 0.5 * (2 - Math.pow(2, -10 * (p - 1))); 4241 }) 4242 ); 4243 4244 4245 //Sine 4246 _wrap("Sine", 4247 _create("SineOut", function(p) { 4248 return Math.sin(p * _HALF_PI); 4249 }), 4250 _create("SineIn", function(p) { 4251 return -Math.cos(p * _HALF_PI) + 1; 4252 }), 4253 _create("SineInOut", function(p) { 4254 return -0.5 * (Math.cos(Math.PI * p) - 1); 4255 }) 4256 ); 4257 4258 _class("easing.EaseLookup", { 4259 find:function(s) { 4260 return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"].map[s]; 4261 } 4262 }, true); 4263 4264 //register the non-standard eases 4265 _easeReg(w.SlowMo, "SlowMo", "ease,"); 4266 _easeReg(RoughEase, "RoughEase", "ease,"); 4267 _easeReg(SteppedEase, "SteppedEase", "ease,"); 4268 4269 return Back; 4270 4271 }, true); 4272 4273var Back = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].Back; 4274var Elastic = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].Elastic; 4275var Bounce = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].Bounce; 4276var RoughEase = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].RoughEase; 4277var SlowMo = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].SlowMo; 4278var SteppedEase = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].SteppedEase; 4279var Circ = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].Circ; 4280var Expo = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].Expo; 4281var Sine = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].Sine; 4282var ExpoScaleEase = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].ExpoScaleEase; 4283 4284 4285/***/ }), 4286
vendor: 4,209 bytes, lines 4287-4405
4287/***/ "../../../../../node_modules/gsap/RoundPropsPlugin.js": 4288/*!********************************************************************************!*\ 4289 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/RoundPropsPlugin.js ***! 4290 \********************************************************************************/ 4291/*! exports provided: RoundPropsPlugin, _getRoundFunc, _roundLinkedList, p, default */ 4292/***/ (function(module, __webpack_exports__, __webpack_require__) { 4293 4294"use strict"; 4295__webpack_require__.r(__webpack_exports__); 4296/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RoundPropsPlugin", function() { return RoundPropsPlugin; }); 4297/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_getRoundFunc", function() { return _getRoundFunc; }); 4298/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_roundLinkedList", function() { return _roundLinkedList; }); 4299/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return p; }); 4300/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return RoundPropsPlugin; }); 4301/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 4302/*! 4303 * VERSION: 1.6.0 4304 * DATE: 2018-08-27 4305 * UPDATES AND DOCS AT: http://greensock.com 4306 * 4307 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 4308 * This work is subject to the terms at http://greensock.com/standard-license or for 4309 * Club GreenSock members, the software agreement that was issued with your membership. 4310 * 4311 * @author: Jack Doyle, [email protected] 4312 **/ 4313/* eslint-disable */ 4314 4315 4316 4317var RoundPropsPlugin = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine.plugin({ 4318 propName: "roundProps", 4319 version: "1.7.0", 4320 priority: -1, 4321 API: 2, 4322 4323 //called when the tween renders for the first time. This is where initial values should be recorded and any setup routines should run. 4324 init: function(target, value, tween) { 4325 this._tween = tween; 4326 return true; 4327 } 4328 4329 }), 4330 _getRoundFunc = function(v) { //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. 4331 var p = v < 1 ? Math.pow(10, (v + "").length - 2) : 1; //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() 4332 return function(n) { 4333 return ((Math.round(n / v) * v * p) | 0) / p; 4334 }; 4335 }, 4336 _roundLinkedList = function(node, mod) { 4337 while (node) { 4338 if (!node.f && !node.blob) { 4339 node.m = mod || Math.round; 4340 } 4341 node = node._next; 4342 } 4343 }, 4344 p = RoundPropsPlugin.prototype; 4345 4346 p._onInitAllProps = function() { 4347 var tween = this._tween, 4348 rp = tween.vars.roundProps, 4349 lookup = {}, 4350 rpt = tween._propLookup.roundProps, 4351 pt, next, i, p; 4352 if (typeof(rp) === "object" && !rp.push) { 4353 for (p in rp) { 4354 lookup[p] = _getRoundFunc(rp[p]); 4355 } 4356 } else { 4357 if (typeof(rp) === "string") { 4358 rp = rp.split(","); 4359 } 4360 i = rp.length; 4361 while (--i > -1) { 4362 lookup[rp[i]] = Math.round; 4363 } 4364 } 4365 4366 for (p in lookup) { 4367 pt = tween._firstPT; 4368 while (pt) { 4369 next = pt._next; //record here, because it may get removed 4370 if (pt.pg) { 4371 pt.t._mod(lookup); 4372 } else if (pt.n === p) { 4373 if (pt.f === 2 && pt.t) { //a blob (text containing multiple numeric values) 4374 _roundLinkedList(pt.t._firstPT, lookup[p]); 4375 } else { 4376 this._add(pt.t, p, pt.s, pt.c, lookup[p]); 4377 //remove from linked list 4378 if (next) { 4379 next._prev = pt._prev; 4380 } 4381 if (pt._prev) { 4382 pt._prev._next = next; 4383 } else if (tween._firstPT === pt) { 4384 tween._firstPT = next; 4385 } 4386 pt._next = pt._prev = null; 4387 tween._propLookup[p] = rpt; 4388 } 4389 } 4390 pt = next; 4391 } 4392 } 4393 return false; 4394 }; 4395 4396 p._add = function(target, p, s, c, mod) { 4397 this._addTween(target, p, s, s + c, p, mod || Math.round); 4398 this._overwriteProps.push(p); 4399 }; 4400 4401 4402 4403 4404/***/ }), 4405
vendor: 39,562 bytes, lines 4406-5264
4406/***/ "../../../../../node_modules/gsap/TimelineLite.js": 4407/*!****************************************************************************!*\ 4408 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/TimelineLite.js ***! 4409 \****************************************************************************/ 4410/*! exports provided: TimelineLite, default */ 4411/***/ (function(module, __webpack_exports__, __webpack_require__) { 4412 4413"use strict"; 4414__webpack_require__.r(__webpack_exports__); 4415/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return TimelineLite; }); 4416/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TimelineLite; }); 4417/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 4418/*! 4419 * VERSION: 2.1.3 4420 * DATE: 2019-05-17 4421 * UPDATES AND DOCS AT: http://greensock.com 4422 * 4423 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 4424 * This work is subject to the terms at http://greensock.com/standard-license or for 4425 * Club GreenSock members, the software agreement that was issued with your membership. 4426 * 4427 * @author: Jack Doyle, [email protected] 4428 */ 4429/* eslint-disable */ 4430 4431 4432 4433_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine("TimelineLite", ["core.Animation","core.SimpleTimeline","TweenLite"], function() { 4434 4435 var TimelineLite = function(vars) { 4436 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["SimpleTimeline"].call(this, vars); 4437 var self = this, 4438 v = self.vars, 4439 val, p; 4440 self._labels = {}; 4441 self.autoRemoveChildren = !!v.autoRemoveChildren; 4442 self.smoothChildTiming = !!v.smoothChildTiming; 4443 self._sortChildren = true; 4444 self._onUpdate = v.onUpdate; 4445 for (p in v) { 4446 val = v[p]; 4447 if (_isArray(val)) if (val.join("").indexOf("{self}") !== -1) { 4448 v[p] = self._swapSelfInParams(val); 4449 } 4450 } 4451 if (_isArray(v.tweens)) { 4452 self.add(v.tweens, 0, v.align, v.stagger); 4453 } 4454 }, 4455 _tinyNum = 0.00000001, 4456 TweenLiteInternals = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]._internals, 4457 _internals = TimelineLite._internals = {}, 4458 _isSelector = TweenLiteInternals.isSelector, 4459 _isArray = TweenLiteInternals.isArray, 4460 _lazyTweens = TweenLiteInternals.lazyTweens, 4461 _lazyRender = TweenLiteInternals.lazyRender, 4462 _globals = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine.globals, 4463 _copy = function(vars) { 4464 var copy = {}, p; 4465 for (p in vars) { 4466 copy[p] = vars[p]; 4467 } 4468 return copy; 4469 }, 4470 _applyCycle = function(vars, targets, i) { 4471 var alt = vars.cycle, 4472 p, val; 4473 for (p in alt) { 4474 val = alt[p]; 4475 vars[p] = (typeof(val) === "function") ? val(i, targets[i], targets) : val[i % val.length]; 4476 } 4477 delete vars.cycle; 4478 }, 4479 _pauseCallback = _internals.pauseCallback = function() {}, 4480 _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 4481 var b = [], 4482 l = a.length, 4483 i; 4484 for (i = 0; i !== l; b.push(a[i++])); 4485 return b; 4486 }, 4487 _defaultImmediateRender = function(tl, toVars, fromVars, defaultFalse) { //default to immediateRender:true unless otherwise set in toVars, fromVars or if defaultFalse is passed in as true 4488 var ir = "immediateRender"; 4489 if (!(ir in toVars)) { 4490 toVars[ir] = !((fromVars && fromVars[ir] === false) || defaultFalse); 4491 } 4492 return toVars; 4493 }, 4494 //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 4495 _distribute = function(v) { 4496 if (typeof(v) === "function") { 4497 return v; 4498 } 4499 var vars = (typeof(v) === "object") ? v : {each:v}, //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. 4500 ease = vars.ease, 4501 from = vars.from || 0, 4502 base = vars.base || 0, 4503 cache = {}, 4504 isFromKeyword = isNaN(from), 4505 axis = vars.axis, 4506 ratio = {center:0.5, end:1}[from] || 0; 4507 return function(i, target, a) { 4508 var l = (a || vars).length, 4509 distances = cache[l], 4510 originX, originY, x, y, d, j, max, min, wrap; 4511 if (!distances) { 4512 wrap = (vars.grid === "auto") ? 0 : (vars.grid || [Infinity])[0]; 4513 if (!wrap) { 4514 max = -Infinity; 4515 while (max < (max = a[wrap++].getBoundingClientRect().left) && wrap < l) { } 4516 wrap--; 4517 } 4518 distances = cache[l] = []; 4519 originX = isFromKeyword ? (Math.min(wrap, l) * ratio) - 0.5 : from % wrap; 4520 originY = isFromKeyword ? l * ratio / wrap - 0.5 : (from / wrap) | 0; 4521 max = 0; 4522 min = Infinity; 4523 for (j = 0; j < l; j++) { 4524 x = (j % wrap) - originX; 4525 y = originY - ((j / wrap) | 0); 4526 distances[j] = d = !axis ? Math.sqrt(x * x + y * y) : Math.abs((axis === "y") ? y : x); 4527 if (d > max) { 4528 max = d; 4529 } 4530 if (d < min) { 4531 min = d; 4532 } 4533 } 4534 distances.max = max - min; 4535 distances.min = min; 4536 distances.v = l = vars.amount || (vars.each * (wrap > l ? l - 1 : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0; 4537 distances.b = (l < 0) ? base - l : base; 4538 } 4539 l = (distances[i] - distances.min) / distances.max; 4540 return distances.b + (ease ? ease.getRatio(l) : l) * distances.v; 4541 }; 4542 }, 4543 p = TimelineLite.prototype = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["SimpleTimeline"](); 4544 4545 TimelineLite.version = "2.1.3"; 4546 TimelineLite.distribute = _distribute; 4547 p.constructor = TimelineLite; 4548 p.kill()._gc = p._forcingPlayhead = p._hasPause = false; 4549 4550 /* might use later... 4551 //translates a local time inside an animation to the corresponding time on the root/global timeline, factoring in all nesting and timeScales. 4552 function localToGlobal(time, animation) { 4553 while (animation) { 4554 time = (time / animation._timeScale) + animation._startTime; 4555 animation = animation.timeline; 4556 } 4557 return time; 4558 } 4559 4560 //translates the supplied time on the root/global timeline into the corresponding local time inside a particular animation, factoring in all nesting and timeScales 4561 function globalToLocal(time, animation) { 4562 var scale = 1; 4563 time -= localToGlobal(0, animation); 4564 while (animation) { 4565 scale *= animation._timeScale; 4566 animation = animation.timeline; 4567 } 4568 return time * scale; 4569 } 4570 */ 4571 4572 p.to = function(target, duration, vars, position) { 4573 var Engine = (vars.repeat && _globals.TweenMax) || _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]; 4574 return duration ? this.add( new Engine(target, duration, vars), position) : this.set(target, vars, position); 4575 }; 4576 4577 p.from = function(target, duration, vars, position) { 4578 return this.add( ((vars.repeat && _globals.TweenMax) || _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]).from(target, duration, _defaultImmediateRender(this, vars)), position); 4579 }; 4580 4581 p.fromTo = function(target, duration, fromVars, toVars, position) { 4582 var Engine = (toVars.repeat && _globals.TweenMax) || _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]; 4583 toVars = _defaultImmediateRender(this, toVars, fromVars); 4584 return duration ? this.add( Engine.fromTo(target, duration, fromVars, toVars), position) : this.set(target, toVars, position); 4585 }; 4586 4587 p.staggerTo = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 4588 var tl = new TimelineLite({onComplete:onCompleteAll, onCompleteParams:onCompleteAllParams, callbackScope:onCompleteAllScope, smoothChildTiming:this.smoothChildTiming}), 4589 staggerFunc = _distribute(vars.stagger || stagger), 4590 startAt = vars.startAt, 4591 cycle = vars.cycle, 4592 copy, i; 4593 if (typeof(targets) === "string") { 4594 targets = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].selector(targets) || targets; 4595 } 4596 targets = targets || []; 4597 if (_isSelector(targets)) { //if the targets object is a selector, translate it into an array. 4598 targets = _slice(targets); 4599 } 4600 for (i = 0; i < targets.length; i++) { 4601 copy = _copy(vars); 4602 if (startAt) { 4603 copy.startAt = _copy(startAt); 4604 if (startAt.cycle) { 4605 _applyCycle(copy.startAt, targets, i); 4606 } 4607 } 4608 if (cycle) { 4609 _applyCycle(copy, targets, i); 4610 if (copy.duration != null) { 4611 duration = copy.duration; 4612 delete copy.duration; 4613 } 4614 } 4615 tl.to(targets[i], duration, copy, staggerFunc(i, targets[i], targets)); 4616 } 4617 return this.add(tl, position); 4618 }; 4619 4620 p.staggerFrom = function(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 4621 vars.runBackwards = true; 4622 return this.staggerTo(targets, duration, _defaultImmediateRender(this, vars), stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 4623 }; 4624 4625 p.staggerFromTo = function(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 4626 toVars.startAt = fromVars; 4627 return this.staggerTo(targets, duration, _defaultImmediateRender(this, toVars, fromVars), stagger, position, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 4628 }; 4629 4630 p.call = function(callback, params, scope, position) { 4631 return this.add( _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].delayedCall(0, callback, params, scope), position); 4632 }; 4633 4634 p.set = function(target, vars, position) { 4635 return this.add( new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"](target, 0, _defaultImmediateRender(this, vars, null, true)), position); 4636 }; 4637 4638 TimelineLite.exportRoot = function(vars, ignoreDelayedCalls) { 4639 vars = vars || {}; 4640 if (vars.smoothChildTiming == null) { 4641 vars.smoothChildTiming = true; 4642 } 4643 var tl = new TimelineLite(vars), 4644 root = tl._timeline, 4645 hasNegativeStart, time, tween, next; 4646 if (ignoreDelayedCalls == null) { 4647 ignoreDelayedCalls = true; 4648 } 4649 root._remove(tl, true); 4650 tl._startTime = 0; 4651 tl._rawPrevTime = tl._time = tl._totalTime = root._time; 4652 tween = root._first; 4653 while (tween) { 4654 next = tween._next; 4655 if (!ignoreDelayedCalls || !(tween instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"] && tween.target === tween.vars.onComplete)) { 4656 time = tween._startTime - tween._delay; 4657 if (time < 0) { 4658 hasNegativeStart = 1; 4659 } 4660 tl.add(tween, time); 4661 } 4662 tween = next; 4663 } 4664 root.add(tl, 0); 4665 if (hasNegativeStart) { //calling totalDuration() will force the adjustment necessary to shift the children forward so none of them start before zero, and moves the timeline backwards the same amount, so the playhead is still aligned where it should be globally, but the timeline doesn't have illegal children that start before zero. 4666 tl.totalDuration(); 4667 } 4668 return tl; 4669 }; 4670 4671 p.add = function(value, position, align, stagger) { 4672 var self = this, 4673 curTime, l, i, child, tl, beforeRawTime; 4674 if (typeof(position) !== "number") { 4675 position = self._parseTimeOrLabel(position, 0, true, value); 4676 } 4677 if (!(value instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"])) { 4678 if ((value instanceof Array) || (value && value.push && _isArray(value))) { 4679 align = align || "normal"; 4680 stagger = stagger || 0; 4681 curTime = position; 4682 l = value.length; 4683 for (i = 0; i < l; i++) { 4684 if (_isArray(child = value[i])) { 4685 child = new TimelineLite({tweens:child}); 4686 } 4687 self.add(child, curTime); 4688 if (typeof(child) !== "string" && typeof(child) !== "function") { 4689 if (align === "sequence") { 4690 curTime = child._startTime + (child.totalDuration() / child._timeScale); 4691 } else if (align === "start") { 4692 child._startTime -= child.delay(); 4693 } 4694 } 4695 curTime += stagger; 4696 } 4697 return self._uncache(true); 4698 } else if (typeof(value) === "string") { 4699 return self.addLabel(value, position); 4700 } else if (typeof(value) === "function") { 4701 value = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].delayedCall(0, value); 4702 } else { 4703 throw("Cannot add " + value + " into the timeline; it is not a tween, timeline, function, or string."); 4704 } 4705 } 4706 4707 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["SimpleTimeline"].prototype.add.call(self, value, position); 4708 4709 if (value._time || (!value._duration && value._initted)) { //in case, for example, the _startTime is moved on a tween that has already rendered. 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. 4710 curTime = (self.rawTime() - value._startTime) * value._timeScale; 4711 if (!value._duration || Math.abs(Math.max(0, Math.min(value.totalDuration(), curTime))) - value._totalTime > 0.00001) { 4712 value.render(curTime, false, false); 4713 } 4714 } 4715 4716 //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. 4717 if (self._gc || self._time === self._duration) if (!self._paused) if (self._duration < self.duration()) { 4718 //in case any of the ancestors had completed but should now be enabled... 4719 tl = self; 4720 beforeRawTime = (tl.rawTime() > value._startTime); //if the tween is placed on the timeline so that it starts BEFORE the current rawTime, we should align the playhead (move the timeline). This is because sometimes users will create a timeline, let it finish, and much later append a tween and expect it to run instead of jumping to its end state. While technically one could argue that it should jump to its end state, that's not what users intuitively expect. 4721 while (tl._timeline) { 4722 if (beforeRawTime && tl._timeline.smoothChildTiming) { 4723 tl.totalTime(tl._totalTime, true); //moves the timeline (shifts its startTime) if necessary, and also enables it. 4724 } else if (tl._gc) { 4725 tl._enabled(true, false); 4726 } 4727 tl = tl._timeline; 4728 } 4729 } 4730 4731 return self; 4732 }; 4733 4734 p.remove = function(value) { 4735 if (value instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"]) { 4736 this._remove(value, false); 4737 var tl = value._timeline = value.vars.useFrames ? _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"]._rootFramesTimeline : _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"]._rootTimeline; //now that it's removed, default it to the root timeline so that if it gets played again, it doesn't jump back into this timeline. 4738 value._startTime = (value._paused ? value._pauseTime : tl._time) - ((!value._reversed ? value._totalTime : value.totalDuration() - value._totalTime) / value._timeScale); //ensure that if it gets played again, the timing is correct. 4739 return this; 4740 } else if (value instanceof Array || (value && value.push && _isArray(value))) { 4741 var i = value.length; 4742 while (--i > -1) { 4743 this.remove(value[i]); 4744 } 4745 return this; 4746 } else if (typeof(value) === "string") { 4747 return this.removeLabel(value); 4748 } 4749 return this.kill(null, value); 4750 }; 4751 4752 p._remove = function(tween, skipDisable) { 4753 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["SimpleTimeline"].prototype._remove.call(this, tween, skipDisable); 4754 var last = this._last; 4755 if (!last) { 4756 this._time = this._totalTime = this._duration = this._totalDuration = 0; 4757 } else if (this._time > this.duration()) { 4758 this._time = this._duration; 4759 this._totalTime = this._totalDuration; 4760 } 4761 return this; 4762 }; 4763 4764 p.append = function(value, offsetOrLabel) { 4765 return this.add(value, this._parseTimeOrLabel(null, offsetOrLabel, true, value)); 4766 }; 4767 4768 p.insert = p.insertMultiple = function(value, position, align, stagger) { 4769 return this.add(value, position || 0, align, stagger); 4770 }; 4771 4772 p.appendMultiple = function(tweens, offsetOrLabel, align, stagger) { 4773 return this.add(tweens, this._parseTimeOrLabel(null, offsetOrLabel, true, tweens), align, stagger); 4774 }; 4775 4776 p.addLabel = function(label, position) { 4777 this._labels[label] = this._parseTimeOrLabel(position); 4778 return this; 4779 }; 4780 4781 p.addPause = function(position, callback, params, scope) { 4782 var t = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].delayedCall(0, _pauseCallback, params, scope || this); 4783 t.vars.onComplete = t.vars.onReverseComplete = callback; 4784 t.data = "isPause"; 4785 this._hasPause = true; 4786 return this.add(t, position); 4787 }; 4788 4789 p.removeLabel = function(label) { 4790 delete this._labels[label]; 4791 return this; 4792 }; 4793 4794 p.getLabelTime = function(label) { 4795 return (this._labels[label] != null) ? this._labels[label] : -1; 4796 }; 4797 4798 p._parseTimeOrLabel = function(timeOrLabel, offsetOrLabel, appendIfAbsent, ignore) { 4799 var clippedDuration, i; 4800 //if we're about to add a tween/timeline (or an array of them) that's already a child of this timeline, we should remove it first so that it doesn't contaminate the duration(). 4801 if (ignore instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"] && ignore.timeline === this) { 4802 this.remove(ignore); 4803 } else if (ignore && ((ignore instanceof Array) || (ignore.push && _isArray(ignore)))) { 4804 i = ignore.length; 4805 while (--i > -1) { 4806 if (ignore[i] instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"] && ignore[i].timeline === this) { 4807 this.remove(ignore[i]); 4808 } 4809 } 4810 } 4811 clippedDuration = (typeof(timeOrLabel) === "number" && !offsetOrLabel) ? 0 : (this.duration() > 99999999999) ? this.recent().endTime(false) : this._duration; //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. 4812 if (typeof(offsetOrLabel) === "string") { 4813 return this._parseTimeOrLabel(offsetOrLabel, (appendIfAbsent && typeof(timeOrLabel) === "number" && this._labels[offsetOrLabel] == null) ? timeOrLabel - clippedDuration : 0, appendIfAbsent); 4814 } 4815 offsetOrLabel = offsetOrLabel || 0; 4816 if (typeof(timeOrLabel) === "string" && (isNaN(timeOrLabel) || this._labels[timeOrLabel] != null)) { //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). 4817 i = timeOrLabel.indexOf("="); 4818 if (i === -1) { 4819 if (this._labels[timeOrLabel] == null) { 4820 return appendIfAbsent ? (this._labels[timeOrLabel] = clippedDuration + offsetOrLabel) : offsetOrLabel; 4821 } 4822 return this._labels[timeOrLabel] + offsetOrLabel; 4823 } 4824 offsetOrLabel = parseInt(timeOrLabel.charAt(i-1) + "1", 10) * Number(timeOrLabel.substr(i+1)); 4825 timeOrLabel = (i > 1) ? this._parseTimeOrLabel(timeOrLabel.substr(0, i-1), 0, appendIfAbsent) : clippedDuration; 4826 } else if (timeOrLabel == null) { 4827 timeOrLabel = clippedDuration; 4828 } 4829 return Number(timeOrLabel) + offsetOrLabel; 4830 }; 4831 4832 p.seek = function(position, suppressEvents) { 4833 return this.totalTime((typeof(position) === "number") ? position : this._parseTimeOrLabel(position), (suppressEvents !== false)); 4834 }; 4835 4836 p.stop = function() { 4837 return this.paused(true); 4838 }; 4839 4840 p.gotoAndPlay = function(position, suppressEvents) { 4841 return this.play(position, suppressEvents); 4842 }; 4843 4844 p.gotoAndStop = function(position, suppressEvents) { 4845 return this.pause(position, suppressEvents); 4846 }; 4847 4848 p.render = function(time, suppressEvents, force) { 4849 if (this._gc) { 4850 this._enabled(true, false); 4851 } 4852 var self = this, 4853 prevTime = self._time, 4854 totalDur = (!self._dirty) ? self._totalDuration : self.totalDuration(), 4855 prevStart = self._startTime, 4856 prevTimeScale = self._timeScale, 4857 prevPaused = self._paused, 4858 tween, isComplete, next, callback, internalForce, pauseTween, curTime, pauseTime; 4859 if (prevTime !== self._time) { //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). 4860 time += self._time - prevTime; 4861 } 4862 if (self._hasPause && !self._forcingPlayhead && !suppressEvents) { 4863 if (time > prevTime) { 4864 tween = self._first; 4865 while (tween && tween._startTime <= time && !pauseTween) { 4866 if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) { 4867 pauseTween = tween; 4868 } 4869 tween = tween._next; 4870 } 4871 } else { 4872 tween = self._last; 4873 while (tween && tween._startTime >= time && !pauseTween) { 4874 if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) { 4875 pauseTween = tween; 4876 } 4877 tween = tween._prev; 4878 } 4879 } 4880 if (pauseTween) { 4881 self._time = self._totalTime = time = pauseTween._startTime; 4882 pauseTime = self._startTime + (self._reversed ? self._duration - time : time) / self._timeScale; 4883 } 4884 } 4885 if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 4886 self._totalTime = self._time = totalDur; 4887 if (!self._reversed) if (!self._hasPausedChild()) { 4888 isComplete = true; 4889 callback = "onComplete"; 4890 internalForce = !!self._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 4891 if (self._duration === 0) if ((time <= 0 && time >= -_tinyNum) || self._rawPrevTime < 0 || self._rawPrevTime === _tinyNum) if (self._rawPrevTime !== time && self._first) { 4892 internalForce = true; 4893 if (self._rawPrevTime > _tinyNum) { 4894 callback = "onReverseComplete"; 4895 } 4896 } 4897 } 4898 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or 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. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 4899 time = totalDur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. 4900 4901 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 4902 self._totalTime = self._time = 0; 4903 if (time > -_tinyNum) { 4904 time = 0; 4905 } 4906 if (prevTime !== 0 || (self._duration === 0 && self._rawPrevTime !== _tinyNum && (self._rawPrevTime > 0 || (time < 0 && self._rawPrevTime >= 0)))) { 4907 callback = "onReverseComplete"; 4908 isComplete = self._reversed; 4909 } 4910 if (time < 0) { 4911 self._active = false; 4912 if (self._timeline.autoRemoveChildren && self._reversed) { //ensures proper GC if a timeline is resumed after it's finished reversing. 4913 internalForce = isComplete = true; 4914 callback = "onReverseComplete"; 4915 } else if (self._rawPrevTime >= 0 && self._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state. 4916 internalForce = true; 4917 } 4918 self._rawPrevTime = time; 4919 } else { 4920 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or 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. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 4921 if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good). 4922 tween = self._first; 4923 while (tween && tween._startTime === 0) { 4924 if (!tween._duration) { 4925 isComplete = false; 4926 } 4927 tween = tween._next; 4928 } 4929 } 4930 time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline) 4931 if (!self._initted) { 4932 internalForce = true; 4933 } 4934 } 4935 4936 } else { 4937 self._totalTime = self._time = self._rawPrevTime = time; 4938 } 4939 if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) { 4940 return; 4941 } else if (!self._initted) { 4942 self._initted = true; 4943 } 4944 4945 if (!self._active) if (!self._paused && self._time !== prevTime && time > 0) { 4946 self._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example. 4947 } 4948 4949 if (prevTime === 0) if (self.vars.onStart) if (self._time !== 0 || !self._duration) if (!suppressEvents) { 4950 self._callback("onStart"); 4951 } 4952 4953 curTime = self._time; 4954 if (curTime >= prevTime) { 4955 tween = self._first; 4956 while (tween) { 4957 next = tween._next; //record it here because the value could change after rendering... 4958 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 4959 break; 4960 } else if (tween._active || (tween._startTime <= curTime && !tween._paused && !tween._gc)) { 4961 if (pauseTween === tween) { 4962 self.pause(); 4963 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 4964 } 4965 if (!tween._reversed) { 4966 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 4967 } else { 4968 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 4969 } 4970 } 4971 tween = next; 4972 } 4973 } else { 4974 tween = self._last; 4975 while (tween) { 4976 next = tween._prev; //record it here because the value could change after rendering... 4977 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 4978 break; 4979 } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) { 4980 if (pauseTween === tween) { 4981 pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse. 4982 while (pauseTween && pauseTween.endTime() > self._time) { 4983 pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force); 4984 pauseTween = pauseTween._prev; 4985 } 4986 pauseTween = null; 4987 self.pause(); 4988 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 4989 } 4990 if (!tween._reversed) { 4991 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 4992 } else { 4993 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 4994 } 4995 } 4996 tween = next; 4997 } 4998 } 4999 5000 if (self._onUpdate) if (!suppressEvents) { 5001 if (_lazyTweens.length) { //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. 5002 _lazyRender(); 5003 } 5004 self._callback("onUpdate"); 5005 } 5006 5007 if (callback) if (!self._gc) if (prevStart === self._startTime || prevTimeScale !== self._timeScale) if (self._time === 0 || totalDur >= self.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate 5008 if (isComplete) { 5009 if (_lazyTweens.length) { //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 onComplete on a timeline that reports/checks tweened values. 5010 _lazyRender(); 5011 } 5012 if (self._timeline.autoRemoveChildren) { 5013 self._enabled(false, false); 5014 } 5015 self._active = false; 5016 } 5017 if (!suppressEvents && self.vars[callback]) { 5018 self._callback(callback); 5019 } 5020 } 5021 }; 5022 5023 p._hasPausedChild = function() { 5024 var tween = this._first; 5025 while (tween) { 5026 if (tween._paused || ((tween instanceof TimelineLite) && tween._hasPausedChild())) { 5027 return true; 5028 } 5029 tween = tween._next; 5030 } 5031 return false; 5032 }; 5033 5034 p.getChildren = function(nested, tweens, timelines, ignoreBeforeTime) { 5035 ignoreBeforeTime = ignoreBeforeTime || -9999999999; 5036 var a = [], 5037 tween = this._first, 5038 cnt = 0; 5039 while (tween) { 5040 if (tween._startTime < ignoreBeforeTime) { 5041 //do nothing 5042 } else if (tween instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { 5043 if (tweens !== false) { 5044 a[cnt++] = tween; 5045 } 5046 } else { 5047 if (timelines !== false) { 5048 a[cnt++] = tween; 5049 } 5050 if (nested !== false) { 5051 a = a.concat(tween.getChildren(true, tweens, timelines)); 5052 cnt = a.length; 5053 } 5054 } 5055 tween = tween._next; 5056 } 5057 return a; 5058 }; 5059 5060 p.getTweensOf = function(target, nested) { 5061 var disabled = this._gc, 5062 a = [], 5063 cnt = 0, 5064 tweens, i; 5065 if (disabled) { 5066 this._enabled(true, true); //getTweensOf() filters out disabled tweens, and we have to mark them as _gc = true when the timeline completes in order to allow clean garbage collection, so temporarily re-enable the timeline here. 5067 } 5068 tweens = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].getTweensOf(target); 5069 i = tweens.length; 5070 while (--i > -1) { 5071 if (tweens[i].timeline === this || (nested && this._contains(tweens[i]))) { 5072 a[cnt++] = tweens[i]; 5073 } 5074 } 5075 if (disabled) { 5076 this._enabled(false, true); 5077 } 5078 return a; 5079 }; 5080 5081 p.recent = function() { 5082 return this._recent; 5083 }; 5084 5085 p._contains = function(tween) { 5086 var tl = tween.timeline; 5087 while (tl) { 5088 if (tl === this) { 5089 return true; 5090 } 5091 tl = tl.timeline; 5092 } 5093 return false; 5094 }; 5095 5096 p.shiftChildren = function(amount, adjustLabels, ignoreBeforeTime) { 5097 ignoreBeforeTime = ignoreBeforeTime || 0; 5098 var tween = this._first, 5099 labels = this._labels, 5100 p; 5101 while (tween) { 5102 if (tween._startTime >= ignoreBeforeTime) { 5103 tween._startTime += amount; 5104 } 5105 tween = tween._next; 5106 } 5107 if (adjustLabels) { 5108 for (p in labels) { 5109 if (labels[p] >= ignoreBeforeTime) { 5110 labels[p] += amount; 5111 } 5112 } 5113 } 5114 return this._uncache(true); 5115 }; 5116 5117 p._kill = function(vars, target) { 5118 if (!vars && !target) { 5119 return this._enabled(false, false); 5120 } 5121 var tweens = (!target) ? this.getChildren(true, true, false) : this.getTweensOf(target), 5122 i = tweens.length, 5123 changed = false; 5124 while (--i > -1) { 5125 if (tweens[i]._kill(vars, target)) { 5126 changed = true; 5127 } 5128 } 5129 return changed; 5130 }; 5131 5132 p.clear = function(labels) { 5133 var tweens = this.getChildren(false, true, true), 5134 i = tweens.length; 5135 this._time = this._totalTime = 0; 5136 while (--i > -1) { 5137 tweens[i]._enabled(false, false); 5138 } 5139 if (labels !== false) { 5140 this._labels = {}; 5141 } 5142 return this._uncache(true); 5143 }; 5144 5145 p.invalidate = function() { 5146 var tween = this._first; 5147 while (tween) { 5148 tween.invalidate(); 5149 tween = tween._next; 5150 } 5151 return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"].prototype.invalidate.call(this);; 5152 }; 5153 5154 p._enabled = function(enabled, ignoreTimeline) { 5155 if (enabled === this._gc) { 5156 var tween = this._first; 5157 while (tween) { 5158 tween._enabled(enabled, true); 5159 tween = tween._next; 5160 } 5161 } 5162 return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["SimpleTimeline"].prototype._enabled.call(this, enabled, ignoreTimeline); 5163 }; 5164 5165 p.totalTime = function(time, suppressEvents, uncapped) { 5166 this._forcingPlayhead = true; 5167 var val = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"].prototype.totalTime.apply(this, arguments); 5168 this._forcingPlayhead = false; 5169 return val; 5170 }; 5171 5172 p.duration = function(value) { 5173 if (!arguments.length) { 5174 if (this._dirty) { 5175 this.totalDuration(); //just triggers recalculation 5176 } 5177 return this._duration; 5178 } 5179 if (this.duration() !== 0 && value !== 0) { 5180 this.timeScale(this._duration / value); 5181 } 5182 return this; 5183 }; 5184 5185 p.totalDuration = function(value) { 5186 if (!arguments.length) { 5187 if (this._dirty) { 5188 var max = 0, 5189 self = this, 5190 tween = self._last, 5191 prevStart = 999999999999, 5192 prev, end; 5193 while (tween) { 5194 prev = tween._prev; //record it here in case the tween changes position in the sequence... 5195 if (tween._dirty) { 5196 tween.totalDuration(); //could change the tween._startTime, so make sure the tween's cache is clean before analyzing it. 5197 } 5198 if (tween._startTime > prevStart && self._sortChildren && !tween._paused && !self._calculatingDuration) { //in case one of the tweens shifted out of order, it needs to be re-inserted into the correct position in the sequence 5199 self._calculatingDuration = 1; //prevent endless recursive calls - there are methods that get triggered that check duration/totalDuration when we add(), like _parseTimeOrLabel(). 5200 self.add(tween, tween._startTime - tween._delay); 5201 self._calculatingDuration = 0; 5202 } else { 5203 prevStart = tween._startTime; 5204 } 5205 if (tween._startTime < 0 && !tween._paused) { //children aren't allowed to have negative startTimes unless smoothChildTiming is true, so adjust here if one is found. 5206 max -= tween._startTime; 5207 if (self._timeline.smoothChildTiming) { 5208 self._startTime += tween._startTime / self._timeScale; 5209 self._time -= tween._startTime; 5210 self._totalTime -= tween._startTime; 5211 self._rawPrevTime -= tween._startTime; 5212 } 5213 self.shiftChildren(-tween._startTime, false, -9999999999); 5214 prevStart = 0; 5215 } 5216 end = tween._startTime + (tween._totalDuration / tween._timeScale); 5217 if (end > max) { 5218 max = end; 5219 } 5220 tween = prev; 5221 } 5222 self._duration = self._totalDuration = max; 5223 self._dirty = false; 5224 } 5225 return this._totalDuration; 5226 } 5227 return (value && this.totalDuration()) ? this.timeScale(this._totalDuration / value) : this; 5228 }; 5229 5230 p.paused = function(value) { 5231 if (value === false && this._paused) { //if there's a pause directly at the spot from where we're unpausing, skip it. 5232 var tween = this._first; 5233 while (tween) { 5234 if (tween._startTime === this._time && tween.data === "isPause") { 5235 tween._rawPrevTime = 0; //remember, _rawPrevTime is how zero-duration tweens/callbacks sense directionality and determine whether or not to fire. If _rawPrevTime is the same as _startTime on the next render, it won't fire. 5236 } 5237 tween = tween._next; 5238 } 5239 } 5240 return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"].prototype.paused.apply(this, arguments); 5241 }; 5242 5243 p.usesFrames = function() { 5244 var tl = this._timeline; 5245 while (tl._timeline) { 5246 tl = tl._timeline; 5247 } 5248 return (tl === _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"]._rootFramesTimeline); 5249 }; 5250 5251 p.rawTime = function(wrapRepeats) { 5252 return (wrapRepeats && (this._paused || (this._repeat && this.time() > 0 && this.totalProgress() < 1))) ? this._totalTime % (this._duration + this._repeatDelay) : this._paused ? this._totalTime : (this._timeline.rawTime(wrapRepeats) - this._startTime) * this._timeScale; 5253 }; 5254 5255 return TimelineLite; 5256 5257 }, true); 5258 5259var TimelineLite = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].TimelineLite; 5260 5261 5262 5263/***/ }), 5264
vendor: 27,050 bytes, lines 5265-5804
5265/***/ "../../../../../node_modules/gsap/TimelineMax.js": 5266/*!***************************************************************************!*\ 5267 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/TimelineMax.js ***! 5268 \***************************************************************************/ 5269/*! exports provided: TimelineMax, TimelineLite, default */ 5270/***/ (function(module, __webpack_exports__, __webpack_require__) { 5271 5272"use strict"; 5273__webpack_require__.r(__webpack_exports__); 5274/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return TimelineMax; }); 5275/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TimelineMax; }); 5276/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 5277/* harmony import */ var _TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TimelineLite.js */ "../../../../../node_modules/gsap/TimelineLite.js"); 5278/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return _TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); 5279 5280/*! 5281 * VERSION: 2.1.3 5282 * DATE: 2019-05-17 5283 * UPDATES AND DOCS AT: http://greensock.com 5284 * 5285 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 5286 * This work is subject to the terms at http://greensock.com/standard-license or for 5287 * Club GreenSock members, the software agreement that was issued with your membership. 5288 * 5289 * @author: Jack Doyle, [email protected] 5290 */ 5291/* eslint-disable */ 5292 5293 5294 5295 5296_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine("TimelineMax", ["TimelineLite","TweenLite","easing.Ease"], function() { 5297 5298 var TimelineMax = function(vars) { 5299 _TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__["default"].call(this, vars); 5300 this._repeat = this.vars.repeat || 0; 5301 this._repeatDelay = this.vars.repeatDelay || 0; 5302 this._cycle = 0; 5303 this._yoyo = !!this.vars.yoyo; 5304 this._dirty = true; 5305 }, 5306 _tinyNum = 0.00000001, 5307 TweenLiteInternals = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]._internals, 5308 _lazyTweens = TweenLiteInternals.lazyTweens, 5309 _lazyRender = TweenLiteInternals.lazyRender, 5310 _globals = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine.globals, 5311 _easeNone = new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"](null, null, 1, 0), 5312 p = TimelineMax.prototype = new _TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__["default"](); 5313 5314 p.constructor = TimelineMax; 5315 p.kill()._gc = false; 5316 TimelineMax.version = "2.1.3"; 5317 5318 p.invalidate = function() { 5319 this._yoyo = !!this.vars.yoyo; 5320 this._repeat = this.vars.repeat || 0; 5321 this._repeatDelay = this.vars.repeatDelay || 0; 5322 this._uncache(true); 5323 return _TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.invalidate.call(this); 5324 }; 5325 5326 p.addCallback = function(callback, position, params, scope) { 5327 return this.add( _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].delayedCall(0, callback, params, scope), position); 5328 }; 5329 5330 p.removeCallback = function(callback, position) { 5331 if (callback) { 5332 if (position == null) { 5333 this._kill(null, callback); 5334 } else { 5335 var a = this.getTweensOf(callback, false), 5336 i = a.length, 5337 time = this._parseTimeOrLabel(position); 5338 while (--i > -1) { 5339 if (a[i]._startTime === time) { 5340 a[i]._enabled(false, false); 5341 } 5342 } 5343 } 5344 } 5345 return this; 5346 }; 5347 5348 p.removePause = function(position) { 5349 return this.removeCallback(_TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__["default"]._internals.pauseCallback, position); 5350 }; 5351 5352 p.tweenTo = function(position, vars) { 5353 vars = vars || {}; 5354 var copy = {ease:_easeNone, useFrames:this.usesFrames(), immediateRender:false, lazy:false}, 5355 Engine = (vars.repeat && _globals.TweenMax) || _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"], 5356 duration, p, t; 5357 for (p in vars) { 5358 copy[p] = vars[p]; 5359 } 5360 copy.time = this._parseTimeOrLabel(position); 5361 duration = (Math.abs(Number(copy.time) - this._time) / this._timeScale) || 0.001; 5362 t = new Engine(this, duration, copy); 5363 copy.onStart = function() { 5364 t.target.paused(true); 5365 if (t.vars.time !== t.target.time() && duration === t.duration() && !t.isFromTo) { //don't make the duration zero - if it's supposed to be zero, don't worry because it's already initting the tween and will complete immediately, effectively making the duration zero anyway. If we make duration zero, the tween won't run at all. 5366 t.duration( Math.abs( t.vars.time - t.target.time()) / t.target._timeScale ).render(t.time(), true, true); //render() right away to ensure that things look right, especially in the case of .tweenTo(0). 5367 } 5368 if (vars.onStart) { //in case the user had an onStart in the vars - we don't want to overwrite it. 5369 vars.onStart.apply(vars.onStartScope || vars.callbackScope || t, vars.onStartParams || []); //don't use t._callback("onStart") or it'll point to the copy.onStart and we'll get a recursion error. 5370 } 5371 }; 5372 return t; 5373 }; 5374 5375 p.tweenFromTo = function(fromPosition, toPosition, vars) { 5376 vars = vars || {}; 5377 fromPosition = this._parseTimeOrLabel(fromPosition); 5378 vars.startAt = {onComplete:this.seek, onCompleteParams:[fromPosition], callbackScope:this}; 5379 vars.immediateRender = (vars.immediateRender !== false); 5380 var t = this.tweenTo(toPosition, vars); 5381 t.isFromTo = 1; //to ensure we don't mess with the duration in the onStart (we've got the start and end values here, so lock it in) 5382 return t.duration((Math.abs( t.vars.time - fromPosition) / this._timeScale) || 0.001); 5383 }; 5384 5385 p.render = function(time, suppressEvents, force) { 5386 if (this._gc) { 5387 this._enabled(true, false); 5388 } 5389 var self = this, 5390 prevTime = self._time, 5391 totalDur = (!self._dirty) ? self._totalDuration : self.totalDuration(), 5392 dur = self._duration, 5393 prevTotalTime = self._totalTime, 5394 prevStart = self._startTime, 5395 prevTimeScale = self._timeScale, 5396 prevRawPrevTime = self._rawPrevTime, 5397 prevPaused = self._paused, 5398 prevCycle = self._cycle, 5399 tween, isComplete, next, callback, internalForce, cycleDuration, pauseTween, curTime, pauseTime; 5400 if (prevTime !== self._time) { //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). 5401 time += self._time - prevTime; 5402 } 5403 if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 5404 if (!self._locked) { 5405 self._totalTime = totalDur; 5406 self._cycle = self._repeat; 5407 } 5408 if (!self._reversed) if (!self._hasPausedChild()) { 5409 isComplete = true; 5410 callback = "onComplete"; 5411 internalForce = !!self._timeline.autoRemoveChildren; //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 5412 if (self._duration === 0) if ((time <= 0 && time >= -_tinyNum) || prevRawPrevTime < 0 || prevRawPrevTime === _tinyNum) if (prevRawPrevTime !== time && self._first) { 5413 internalForce = true; 5414 if (prevRawPrevTime > _tinyNum) { 5415 callback = "onReverseComplete"; 5416 } 5417 } 5418 } 5419 self._rawPrevTime = (self._duration || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or 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. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 5420 if (self._yoyo && (self._cycle & 1)) { 5421 self._time = time = 0; 5422 } else { 5423 self._time = dur; 5424 time = dur + 0.0001; //to avoid occasional floating point rounding errors - sometimes child tweens/timelines were not being fully completed (their progress might be 0.999999999999998 instead of 1 because when _time - tween._startTime is performed, floating point errors would return a value that was SLIGHTLY off). Try (999999999999.7 - 999999999999) * 1 = 0.699951171875 instead of 0.7. We cannot do less then 0.0001 because the same issue can occur when the duration is extremely large like 999999999999 in which case adding 0.00000001, for example, causes it to act like nothing was added. 5425 } 5426 5427 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 5428 if (!self._locked) { 5429 self._totalTime = self._cycle = 0; 5430 } 5431 self._time = 0; 5432 if (time > -_tinyNum) { 5433 time = 0; 5434 } 5435 if (prevTime !== 0 || (dur === 0 && prevRawPrevTime !== _tinyNum && (prevRawPrevTime > 0 || (time < 0 && prevRawPrevTime >= 0)) && !self._locked)) { //edge case for checking time < 0 && prevRawPrevTime >= 0: a zero-duration fromTo() tween inside a zero-duration timeline (yeah, very rare) 5436 callback = "onReverseComplete"; 5437 isComplete = self._reversed; 5438 } 5439 if (time < 0) { 5440 self._active = false; 5441 if (self._timeline.autoRemoveChildren && self._reversed) { 5442 internalForce = isComplete = true; 5443 callback = "onReverseComplete"; 5444 } else if (prevRawPrevTime >= 0 && self._first) { //when going back beyond the start, force a render so that zero-duration tweens that sit at the very beginning render their start values properly. Otherwise, if the parent timeline's playhead lands exactly at this timeline's startTime, and then moves backwards, the zero-duration tweens at the beginning would still be at their end state. 5445 internalForce = true; 5446 } 5447 self._rawPrevTime = time; 5448 } else { 5449 self._rawPrevTime = (dur || !suppressEvents || time || self._rawPrevTime === time) ? time : _tinyNum; //when the playhead arrives at EXACTLY time 0 (right on top) of a zero-duration timeline or 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. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 5450 if (time === 0 && isComplete) { //if there's a zero-duration tween at the very beginning of a timeline and the playhead lands EXACTLY at time 0, that tween will correctly render its end values, but we need to keep the timeline alive for one more render so that the beginning values render properly as the parent's playhead keeps moving beyond the begining. Imagine obj.x starts at 0 and then we do tl.set(obj, {x:100}).to(obj, 1, {x:200}) and then later we tl.reverse()...the goal is to have obj.x revert to 0. If the playhead happens to land on exactly 0, without this chunk of code, it'd complete the timeline and remove it from the rendering queue (not good). 5451 tween = self._first; 5452 while (tween && tween._startTime === 0) { 5453 if (!tween._duration) { 5454 isComplete = false; 5455 } 5456 tween = tween._next; 5457 } 5458 } 5459 time = 0; //to avoid occasional floating point rounding errors (could cause problems especially with zero-duration tweens at the very beginning of the timeline) 5460 if (!self._initted) { 5461 internalForce = true; 5462 } 5463 } 5464 5465 } else { 5466 if (dur === 0 && prevRawPrevTime < 0) { //without this, zero-duration repeating timelines (like with a simple callback nested at the very beginning and a repeatDelay) wouldn't render the first time through. 5467 internalForce = true; 5468 } 5469 self._time = self._rawPrevTime = time; 5470 if (!self._locked) { 5471 self._totalTime = time; 5472 if (self._repeat !== 0) { 5473 cycleDuration = dur + self._repeatDelay; 5474 self._cycle = (self._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but it gets reported as 0.79999999!) 5475 if (self._cycle) if (self._cycle === self._totalTime / cycleDuration && prevTotalTime <= time) { 5476 self._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning) 5477 } 5478 self._time = self._totalTime - (self._cycle * cycleDuration); 5479 if (self._yoyo) if (self._cycle & 1) { 5480 self._time = dur - self._time; 5481 } 5482 if (self._time > dur) { 5483 self._time = dur; 5484 time = dur + 0.0001; //to avoid occasional floating point rounding error 5485 } else if (self._time < 0) { 5486 self._time = time = 0; 5487 } else { 5488 time = self._time; 5489 } 5490 } 5491 } 5492 } 5493 5494 if (self._hasPause && !self._forcingPlayhead && !suppressEvents) { 5495 time = self._time; 5496 if (time > prevTime || (self._repeat && prevCycle !== self._cycle)) { 5497 tween = self._first; 5498 while (tween && tween._startTime <= time && !pauseTween) { 5499 if (!tween._duration) if (tween.data === "isPause" && !tween.ratio && !(tween._startTime === 0 && self._rawPrevTime === 0)) { 5500 pauseTween = tween; 5501 } 5502 tween = tween._next; 5503 } 5504 } else { 5505 tween = self._last; 5506 while (tween && tween._startTime >= time && !pauseTween) { 5507 if (!tween._duration) if (tween.data === "isPause" && tween._rawPrevTime > 0) { 5508 pauseTween = tween; 5509 } 5510 tween = tween._prev; 5511 } 5512 } 5513 if (pauseTween) { 5514 pauseTime = self._startTime + (self._reversed ? self._duration - pauseTween._startTime : pauseTween._startTime) / self._timeScale; 5515 if (pauseTween._startTime < dur) { 5516 self._time = self._rawPrevTime = time = pauseTween._startTime; 5517 self._totalTime = time + (self._cycle * (self._totalDuration + self._repeatDelay)); 5518 } 5519 } 5520 } 5521 5522 if (self._cycle !== prevCycle) if (!self._locked) { 5523 /* 5524 make sure children at the end/beginning of the timeline are rendered properly. If, for example, 5525 a 3-second long timeline rendered at 2.9 seconds previously, and now renders at 3.2 seconds (which 5526 would get translated to 2.8 seconds if the timeline yoyos or 0.2 seconds if it just repeats), there 5527 could be a callback or a short tween that's at 2.95 or 3 seconds in which wouldn't render. So 5528 we need to push the timeline to the end (and/or beginning depending on its yoyo value). Also we must 5529 ensure that zero-duration tweens at the very beginning or end of the TimelineMax work. 5530 */ 5531 var backwards = (self._yoyo && (prevCycle & 1) !== 0), 5532 wrap = (backwards === (self._yoyo && (self._cycle & 1) !== 0)), 5533 recTotalTime = self._totalTime, 5534 recCycle = self._cycle, 5535 recRawPrevTime = self._rawPrevTime, 5536 recTime = self._time; 5537 5538 self._totalTime = prevCycle * dur; 5539 if (self._cycle < prevCycle) { 5540 backwards = !backwards; 5541 } else { 5542 self._totalTime += dur; 5543 } 5544 self._time = prevTime; //temporarily revert _time so that render() renders the children in the correct order. Without this, tweens won't rewind correctly. We could arhictect things in a "cleaner" way by splitting out the rendering queue into a separate method but for performance reasons, we kept it all inside this method. 5545 5546 self._rawPrevTime = (dur === 0) ? prevRawPrevTime - 0.0001 : prevRawPrevTime; 5547 self._cycle = prevCycle; 5548 self._locked = true; //prevents changes to totalTime and skips repeat/yoyo behavior when we recursively call render() 5549 prevTime = (backwards) ? 0 : dur; 5550 self.render(prevTime, suppressEvents, (dur === 0)); 5551 if (!suppressEvents) if (!self._gc) { 5552 if (self.vars.onRepeat) { 5553 self._cycle = recCycle; //in case the onRepeat alters the playhead or invalidates(), we shouldn't stay locked or use the previous cycle. 5554 self._locked = false; 5555 self._callback("onRepeat"); 5556 } 5557 } 5558 if (prevTime !== self._time) { //in case there's a callback like onComplete in a nested tween/timeline that changes the playhead position, like via seek(), we should just abort. 5559 return; 5560 } 5561 if (wrap) { 5562 self._cycle = prevCycle; //if there's an onRepeat, we reverted this above, so make sure it's set properly again. We also unlocked in that scenario, so reset that too. 5563 self._locked = true; 5564 prevTime = (backwards) ? dur + 0.0001 : -0.0001; 5565 self.render(prevTime, true, false); 5566 } 5567 self._locked = false; 5568 if (self._paused && !prevPaused) { //if the render() triggered callback that paused this timeline, we should abort (very rare, but possible) 5569 return; 5570 } 5571 self._time = recTime; 5572 self._totalTime = recTotalTime; 5573 self._cycle = recCycle; 5574 self._rawPrevTime = recRawPrevTime; 5575 } 5576 5577 if ((self._time === prevTime || !self._first) && !force && !internalForce && !pauseTween) { 5578 if (prevTotalTime !== self._totalTime) if (self._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate. 5579 self._callback("onUpdate"); 5580 } 5581 return; 5582 } else if (!self._initted) { 5583 self._initted = true; 5584 } 5585 5586 if (!self._active) if (!self._paused && self._totalTime !== prevTotalTime && time > 0) { 5587 self._active = true; //so that if the user renders the timeline (as opposed to the parent timeline rendering it), it is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the timeline already finished but the user manually re-renders it as halfway done, for example. 5588 } 5589 5590 if (prevTotalTime === 0) if (self.vars.onStart) if (self._totalTime !== 0 || !self._totalDuration) if (!suppressEvents) { 5591 self._callback("onStart"); 5592 } 5593 5594 curTime = self._time; 5595 if (curTime >= prevTime) { 5596 tween = self._first; 5597 while (tween) { 5598 next = tween._next; //record it here because the value could change after rendering... 5599 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 5600 break; 5601 } else if (tween._active || (tween._startTime <= self._time && !tween._paused && !tween._gc)) { 5602 if (pauseTween === tween) { 5603 self.pause(); 5604 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 5605 } 5606 if (!tween._reversed) { 5607 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 5608 } else { 5609 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 5610 } 5611 } 5612 tween = next; 5613 } 5614 } else { 5615 tween = self._last; 5616 while (tween) { 5617 next = tween._prev; //record it here because the value could change after rendering... 5618 if (curTime !== self._time || (self._paused && !prevPaused)) { //in case a tween pauses or seeks the timeline when rendering, like inside of an onUpdate/onComplete 5619 break; 5620 } else if (tween._active || (tween._startTime <= prevTime && !tween._paused && !tween._gc)) { 5621 if (pauseTween === tween) { 5622 pauseTween = tween._prev; //the linked list is organized by _startTime, thus it's possible that a tween could start BEFORE the pause and end after it, in which case it would be positioned before the pause tween in the linked list, but we should render it before we pause() the timeline and cease rendering. This is only a concern when going in reverse. 5623 while (pauseTween && pauseTween.endTime() > self._time) { 5624 pauseTween.render( (pauseTween._reversed ? pauseTween.totalDuration() - ((time - pauseTween._startTime) * pauseTween._timeScale) : (time - pauseTween._startTime) * pauseTween._timeScale), suppressEvents, force); 5625 pauseTween = pauseTween._prev; 5626 } 5627 pauseTween = null; 5628 self.pause(); 5629 self._pauseTime = pauseTime; //so that when we resume(), it's starting from exactly the right spot (the pause() method uses the rawTime for the parent, but that may be a bit too far ahead) 5630 } 5631 if (!tween._reversed) { 5632 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 5633 } else { 5634 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 5635 } 5636 } 5637 tween = next; 5638 } 5639 } 5640 5641 if (self._onUpdate) if (!suppressEvents) { 5642 if (_lazyTweens.length) { //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. 5643 _lazyRender(); 5644 } 5645 self._callback("onUpdate"); 5646 } 5647 if (callback) if (!self._locked) if (!self._gc) if (prevStart === self._startTime || prevTimeScale !== self._timeScale) if (self._time === 0 || totalDur >= self.totalDuration()) { //if one of the tweens that was rendered altered this timeline's startTime (like if an onComplete reversed the timeline), it probably isn't complete. If it is, don't worry, because whatever call altered the startTime would complete if it was necessary at the new time. The only exception is the timeScale property. Also check _gc because there's a chance that kill() could be called in an onUpdate 5648 if (isComplete) { 5649 if (_lazyTweens.length) { //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 onComplete on a timeline that reports/checks tweened values. 5650 _lazyRender(); 5651 } 5652 if (self._timeline.autoRemoveChildren) { 5653 self._enabled(false, false); 5654 } 5655 self._active = false; 5656 } 5657 if (!suppressEvents && self.vars[callback]) { 5658 self._callback(callback); 5659 } 5660 } 5661 }; 5662 5663 p.getActive = function(nested, tweens, timelines) { 5664 var a = [], 5665 all = this.getChildren(nested || (nested == null), tweens || (nested == null), !!timelines), 5666 cnt = 0, 5667 l = all.length, 5668 i, tween; 5669 for (i = 0; i < l; i++) { 5670 tween = all[i]; 5671 if (tween.isActive()) { 5672 a[cnt++] = tween; 5673 } 5674 } 5675 return a; 5676 }; 5677 5678 5679 p.getLabelAfter = function(time) { 5680 if (!time) if (time !== 0) { //faster than isNan() 5681 time = this._time; 5682 } 5683 var labels = this.getLabelsArray(), 5684 l = labels.length, 5685 i; 5686 for (i = 0; i < l; i++) { 5687 if (labels[i].time > time) { 5688 return labels[i].name; 5689 } 5690 } 5691 return null; 5692 }; 5693 5694 p.getLabelBefore = function(time) { 5695 if (time == null) { 5696 time = this._time; 5697 } 5698 var labels = this.getLabelsArray(), 5699 i = labels.length; 5700 while (--i > -1) { 5701 if (labels[i].time < time) { 5702 return labels[i].name; 5703 } 5704 } 5705 return null; 5706 }; 5707 5708 p.getLabelsArray = function() { 5709 var a = [], 5710 cnt = 0, 5711 p; 5712 for (p in this._labels) { 5713 a[cnt++] = {time:this._labels[p], name:p}; 5714 } 5715 a.sort(function(a,b) { 5716 return a.time - b.time; 5717 }); 5718 return a; 5719 }; 5720 5721 p.invalidate = function() { 5722 this._locked = false; //unlock and set cycle in case invalidate() is called from inside an onRepeat 5723 return _TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.invalidate.call(this); 5724 }; 5725 5726 5727//---- GETTERS / SETTERS ------------------------------------------------------------------------------------------------------- 5728 5729 p.progress = function(value, suppressEvents) { 5730 return (!arguments.length) ? (this._time / this.duration()) || 0 : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents); 5731 }; 5732 5733 p.totalProgress = function(value, suppressEvents) { 5734 return (!arguments.length) ? (this._totalTime / this.totalDuration()) || 0 : this.totalTime( this.totalDuration() * value, suppressEvents); 5735 }; 5736 5737 p.totalDuration = function(value) { 5738 if (!arguments.length) { 5739 if (this._dirty) { 5740 _TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__["default"].prototype.totalDuration.call(this); //just forces refresh 5741 //Instead of Infinity, we use 999999999999 so that we can accommodate reverses. 5742 this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat); 5743 } 5744 return this._totalDuration; 5745 } 5746 return (this._repeat === -1 || !value) ? this : this.timeScale( this.totalDuration() / value ); 5747 }; 5748 5749 p.time = function(value, suppressEvents) { 5750 if (!arguments.length) { 5751 return this._time; 5752 } 5753 if (this._dirty) { 5754 this.totalDuration(); 5755 } 5756 var duration = this._duration, 5757 cycle = this._cycle, 5758 cycleDur = cycle * (duration + this._repeatDelay); 5759 if (value > duration) { 5760 value = duration; 5761 } 5762 return this.totalTime((this._yoyo && (cycle & 1)) ? duration - value + cycleDur : this._repeat ? value + cycleDur : value, suppressEvents); 5763 }; 5764 5765 p.repeat = function(value) { 5766 if (!arguments.length) { 5767 return this._repeat; 5768 } 5769 this._repeat = value; 5770 return this._uncache(true); 5771 }; 5772 5773 p.repeatDelay = function(value) { 5774 if (!arguments.length) { 5775 return this._repeatDelay; 5776 } 5777 this._repeatDelay = value; 5778 return this._uncache(true); 5779 }; 5780 5781 p.yoyo = function(value) { 5782 if (!arguments.length) { 5783 return this._yoyo; 5784 } 5785 this._yoyo = value; 5786 return this; 5787 }; 5788 5789 p.currentLabel = function(value) { 5790 if (!arguments.length) { 5791 return this.getLabelBefore(this._time + _tinyNum); 5792 } 5793 return this.seek(value, true); 5794 }; 5795 5796 return TimelineMax; 5797 5798 }, true); 5799 5800var TimelineMax = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].TimelineMax; 5801 5802 5803/***/ }), 5804
vendor: 89,236 bytes, lines 5805-7808
5805/***/ "../../../../../node_modules/gsap/TweenLite.js": 5806/*!*************************************************************************!*\ 5807 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/TweenLite.js ***! 5808 \*************************************************************************/ 5809/*! exports provided: _gsScope, TweenLite, globals, default, SimpleTimeline, Animation, Ease, Linear, Power0, Power1, Power2, Power3, Power4, TweenPlugin, EventDispatcher */ 5810/***/ (function(module, __webpack_exports__, __webpack_require__) { 5811 5812"use strict"; 5813__webpack_require__.r(__webpack_exports__); 5814/* WEBPACK VAR INJECTION */(function(module, global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "_gsScope", function() { return _gsScope; }); 5815/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return TweenLite; }); 5816/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "globals", function() { return globals; }); 5817/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TweenLite; }); 5818/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SimpleTimeline", function() { return SimpleTimeline; }); 5819/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Animation", function() { return Animation; }); 5820/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Ease", function() { return Ease; }); 5821/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return Linear; }); 5822/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return Power0; }); 5823/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return Power1; }); 5824/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return Power2; }); 5825/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return Power3; }); 5826/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return Power4; }); 5827/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenPlugin", function() { return TweenPlugin; }); 5828/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "EventDispatcher", function() { return EventDispatcher; }); 5829/*! 5830 * VERSION: 2.1.3 5831 * DATE: 2019-05-17 5832 * UPDATES AND DOCS AT: http://greensock.com 5833 * 5834 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 5835 * This work is subject to the terms at http://greensock.com/standard-license or for 5836 * Club GreenSock members, the software agreement that was issued with your membership. 5837 * 5838 * @author: Jack Doyle, [email protected] 5839 */ 5840/* eslint-disable */ 5841 5842/* ES6 changes: 5843 - declare and export _gsScope at top. 5844 - set var TweenLite = the result of the main function 5845 - export default TweenLite at the bottom 5846 - return TweenLite at the bottom of the main function 5847 - pass in _gsScope as the first parameter of the main function (which is actually at the bottom) 5848 - remove the "export to multiple environments" in Definition(). 5849 */ 5850var _gsScope = (typeof(window) !== "undefined") ? window : ( true && module.exports && typeof(global) !== "undefined") ? global : undefined || {}; 5851 5852var TweenLite = (function(window) { 5853 5854 "use strict"; 5855 var _exports = {}, 5856 _doc = window.document, 5857 _globals = window.GreenSockGlobals = window.GreenSockGlobals || window; 5858 if (_globals.TweenLite) { 5859 return _globals.TweenLite; //in case the core set of classes is already loaded, don't instantiate twice. 5860 } 5861 var _namespace = function(ns) { 5862 var a = ns.split("."), 5863 p = _globals, i; 5864 for (i = 0; i < a.length; i++) { 5865 p[a[i]] = p = p[a[i]] || {}; 5866 } 5867 return p; 5868 }, 5869 gs = _namespace("com.greensock"), 5870 _tinyNum = 0.00000001, 5871 _slice = function(a) { //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 5872 var b = [], 5873 l = a.length, 5874 i; 5875 for (i = 0; i !== l; b.push(a[i++])) {} 5876 return b; 5877 }, 5878 _emptyFunc = function() {}, 5879 _isArray = (function() { //works around issues in iframe environments where the Array global isn't shared, thus if the object originates in a different window/iframe, "(obj instanceof Array)" will evaluate false. We added some speed optimizations to avoid Object.prototype.toString.call() unless it's absolutely necessary because it's VERY slow (like 20x slower) 5880 var toString = Object.prototype.toString, 5881 array = toString.call([]); 5882 return function(obj) { 5883 return obj != null && (obj instanceof Array || (typeof(obj) === "object" && !!obj.push && toString.call(obj) === array)); 5884 }; 5885 }()), 5886 a, i, p, _ticker, _tickerActive, 5887 _defLookup = {}, 5888 5889 /** 5890 * @constructor 5891 * Defines a GreenSock class, optionally with an array of dependencies that must be instantiated first and passed into the definition. 5892 * This allows users to load GreenSock JS files in any order even if they have interdependencies (like CSSPlugin extends TweenPlugin which is 5893 * inside TweenLite.js, but if CSSPlugin is loaded first, it should wait to run its code until TweenLite.js loads and instantiates TweenPlugin 5894 * and then pass TweenPlugin to CSSPlugin's definition). This is all done automatically and internally. 5895 * 5896 * Every definition will be added to a "com.greensock" global object (typically window, but if a window.GreenSockGlobals object is found, 5897 * it will go there as of v1.7). For example, TweenLite will be found at window.com.greensock.TweenLite and since it's a global class that should be available anywhere, 5898 * it is ALSO referenced at window.TweenLite. However some classes aren't considered global, like the base com.greensock.core.Animation class, so 5899 * those will only be at the package like window.com.greensock.core.Animation. Again, if you define a GreenSockGlobals object on the window, everything 5900 * gets tucked neatly inside there instead of on the window directly. This allows you to do advanced things like load multiple versions of GreenSock 5901 * files and put them into distinct objects (imagine a banner ad uses a newer version but the main site uses an older one). In that case, you could 5902 * sandbox the banner one like: 5903 * 5904 * <script> 5905 * var gs = window.GreenSockGlobals = {}; //the newer version we're about to load could now be referenced in a "gs" object, like gs.TweenLite.to(...). Use whatever alias you want as long as it's unique, "gs" or "banner" or whatever. 5906 * </script> 5907 * <script src="js/greensock/v1.7/TweenMax.js"></script> 5908 * <script> 5909 * window.GreenSockGlobals = window._gsQueue = window._gsDefine = null; //reset it back to null (along with the special _gsQueue variable) so that the next load of TweenMax affects the window and we can reference things directly like TweenLite.to(...) 5910 * </script> 5911 * <script src="js/greensock/v1.6/TweenMax.js"></script> 5912 * <script> 5913 * gs.TweenLite.to(...); //would use v1.7 5914 * TweenLite.to(...); //would use v1.6 5915 * </script> 5916 * 5917 * @param {!string} ns The namespace of the class definition, leaving off "com.greensock." as that's assumed. For example, "TweenLite" or "plugins.CSSPlugin" or "easing.Back". 5918 * @param {!Array.<string>} dependencies An array of dependencies (described as their namespaces minus "com.greensock." prefix). For example ["TweenLite","plugins.TweenPlugin","core.Animation"] 5919 * @param {!function():Object} func The function that should be called and passed the resolved dependencies which will return the actual class for this definition. 5920 * @param {boolean=} global If true, the class will be added to the global scope (typically window unless you define a window.GreenSockGlobals object) 5921 */ 5922 Definition = function(ns, dependencies, func, global) { 5923 this.sc = (_defLookup[ns]) ? _defLookup[ns].sc : []; //subclasses 5924 _defLookup[ns] = this; 5925 this.gsClass = null; 5926 this.func = func; 5927 var _classes = []; 5928 this.check = function(init) { 5929 var i = dependencies.length, 5930 missing = i, 5931 cur, a, n, cl; 5932 while (--i > -1) { 5933 if ((cur = _defLookup[dependencies[i]] || new Definition(dependencies[i], [])).gsClass) { 5934 _classes[i] = cur.gsClass; 5935 missing--; 5936 } else if (init) { 5937 cur.sc.push(this); 5938 } 5939 } 5940 if (missing === 0 && func) { 5941 a = ("com.greensock." + ns).split("."); 5942 n = a.pop(); 5943 cl = _namespace(a.join("."))[n] = this.gsClass = func.apply(func, _classes); 5944 5945 //exports to multiple environments 5946 if (global) { 5947 _globals[n] = _exports[n] = cl; //provides a way to avoid global namespace pollution. By default, the main classes like TweenLite, Power1, Strong, etc. are added to window unless a GreenSockGlobals is defined. So if you want to have things added to a custom object instead, just do something like window.GreenSockGlobals = {} before loading any GreenSock files. You can even set up an alias like window.GreenSockGlobals = windows.gs = {} so that you can access everything like gs.TweenLite. Also remember that ALL classes are added to the window.com.greensock object (in their respective packages, like com.greensock.easing.Power1, com.greensock.TweenLite, etc.) 5948 /* 5949 if (typeof(module) !== "undefined" && module.exports) { //node 5950 if (ns === moduleName) { 5951 module.exports = _exports[moduleName] = cl; 5952 for (i in _exports) { 5953 cl[i] = _exports[i]; 5954 } 5955 } else if (_exports[moduleName]) { 5956 _exports[moduleName][n] = cl; 5957 } 5958 } else if (typeof(define) === "function" && define.amd){ //AMD 5959 define((window.GreenSockAMDPath ? window.GreenSockAMDPath + "/" : "") + ns.split(".").pop(), [], function() { return cl; }); 5960 } 5961 */ 5962 } 5963 for (i = 0; i < this.sc.length; i++) { 5964 this.sc[i].check(); 5965 } 5966 } 5967 }; 5968 this.check(true); 5969 }, 5970 5971 //used to create Definition instances (which basically registers a class that has dependencies). 5972 _gsDefine = window._gsDefine = function(ns, dependencies, func, global) { 5973 return new Definition(ns, dependencies, func, global); 5974 }, 5975 5976 //a quick way to create a class that doesn't have any dependencies. Returns the class, but first registers it in the GreenSock namespace so that other classes can grab it (other classes might be dependent on the class). 5977 _class = gs._class = function(ns, func, global) { 5978 func = func || function() {}; 5979 _gsDefine(ns, [], function(){ return func; }, global); 5980 return func; 5981 }; 5982 5983 _gsDefine.globals = _globals; 5984 5985 5986 5987/* 5988 * ---------------------------------------------------------------- 5989 * Ease 5990 * ---------------------------------------------------------------- 5991 */ 5992 var _baseParams = [0, 0, 1, 1], 5993 Ease = _class("easing.Ease", function(func, extraParams, type, power) { 5994 this._func = func; 5995 this._type = type || 0; 5996 this._power = power || 0; 5997 this._params = extraParams ? _baseParams.concat(extraParams) : _baseParams; 5998 }, true), 5999 _easeMap = Ease.map = {}, 6000 _easeReg = Ease.register = function(ease, names, types, create) { 6001 var na = names.split(","), 6002 i = na.length, 6003 ta = (types || "easeIn,easeOut,easeInOut").split(","), 6004 e, name, j, type; 6005 while (--i > -1) { 6006 name = na[i]; 6007 e = create ? _class("easing."+name, null, true) : gs.easing[name] || {}; 6008 j = ta.length; 6009 while (--j > -1) { 6010 type = ta[j]; 6011 _easeMap[name + "." + type] = _easeMap[type + name] = e[type] = ease.getRatio ? ease : ease[type] || new ease(); 6012 } 6013 } 6014 }; 6015 6016 p = Ease.prototype; 6017 p._calcEnd = false; 6018 p.getRatio = function(p) { 6019 if (this._func) { 6020 this._params[0] = p; 6021 return this._func.apply(null, this._params); 6022 } 6023 var t = this._type, 6024 pw = this._power, 6025 r = (t === 1) ? 1 - p : (t === 2) ? p : (p < 0.5) ? p * 2 : (1 - p) * 2; 6026 if (pw === 1) { 6027 r *= r; 6028 } else if (pw === 2) { 6029 r *= r * r; 6030 } else if (pw === 3) { 6031 r *= r * r * r; 6032 } else if (pw === 4) { 6033 r *= r * r * r * r; 6034 } 6035 return (t === 1) ? 1 - r : (t === 2) ? r : (p < 0.5) ? r / 2 : 1 - (r / 2); 6036 }; 6037 6038 //create all the standard eases like Linear, Quad, Cubic, Quart, Quint, Strong, Power0, Power1, Power2, Power3, and Power4 (each with easeIn, easeOut, and easeInOut) 6039 a = ["Linear","Quad","Cubic","Quart","Quint,Strong"]; 6040 i = a.length; 6041 while (--i > -1) { 6042 p = a[i]+",Power"+i; 6043 _easeReg(new Ease(null,null,1,i), p, "easeOut", true); 6044 _easeReg(new Ease(null,null,2,i), p, "easeIn" + ((i === 0) ? ",easeNone" : "")); 6045 _easeReg(new Ease(null,null,3,i), p, "easeInOut"); 6046 } 6047 _easeMap.linear = gs.easing.Linear.easeIn; 6048 _easeMap.swing = gs.easing.Quad.easeInOut; //for jQuery folks 6049 6050 6051/* 6052 * ---------------------------------------------------------------- 6053 * EventDispatcher 6054 * ---------------------------------------------------------------- 6055 */ 6056 var EventDispatcher = _class("events.EventDispatcher", function(target) { 6057 this._listeners = {}; 6058 this._eventTarget = target || this; 6059 }); 6060 p = EventDispatcher.prototype; 6061 6062 p.addEventListener = function(type, callback, scope, useParam, priority) { 6063 priority = priority || 0; 6064 var list = this._listeners[type], 6065 index = 0, 6066 listener, i; 6067 if (this === _ticker && !_tickerActive) { 6068 _ticker.wake(); 6069 } 6070 if (list == null) { 6071 this._listeners[type] = list = []; 6072 } 6073 i = list.length; 6074 while (--i > -1) { 6075 listener = list[i]; 6076 if (listener.c === callback && listener.s === scope) { 6077 list.splice(i, 1); 6078 } else if (index === 0 && listener.pr < priority) { 6079 index = i + 1; 6080 } 6081 } 6082 list.splice(index, 0, {c:callback, s:scope, up:useParam, pr:priority}); 6083 }; 6084 6085 p.removeEventListener = function(type, callback) { 6086 var list = this._listeners[type], i; 6087 if (list) { 6088 i = list.length; 6089 while (--i > -1) { 6090 if (list[i].c === callback) { 6091 list.splice(i, 1); 6092 return; 6093 } 6094 } 6095 } 6096 }; 6097 6098 p.dispatchEvent = function(type) { 6099 var list = this._listeners[type], 6100 i, t, listener; 6101 if (list) { 6102 i = list.length; 6103 if (i > 1) { 6104 list = list.slice(0); //in case addEventListener() is called from within a listener/callback (otherwise the index could change, resulting in a skip) 6105 } 6106 t = this._eventTarget; 6107 while (--i > -1) { 6108 listener = list[i]; 6109 if (listener) { 6110 if (listener.up) { 6111 listener.c.call(listener.s || t, {type:type, target:t}); 6112 } else { 6113 listener.c.call(listener.s || t); 6114 } 6115 } 6116 } 6117 } 6118 }; 6119 6120 6121/* 6122 * ---------------------------------------------------------------- 6123 * Ticker 6124 * ---------------------------------------------------------------- 6125 */ 6126 var _reqAnimFrame = window.requestAnimationFrame, 6127 _cancelAnimFrame = window.cancelAnimationFrame, 6128 _getTime = Date.now || function() {return new Date().getTime();}, 6129 _lastUpdate = _getTime(); 6130 6131 //now try to determine the requestAnimationFrame and cancelAnimationFrame functions and if none are found, we'll use a setTimeout()/clearTimeout() polyfill. 6132 a = ["ms","moz","webkit","o"]; 6133 i = a.length; 6134 while (--i > -1 && !_reqAnimFrame) { 6135 _reqAnimFrame = window[a[i] + "RequestAnimationFrame"]; 6136 _cancelAnimFrame = window[a[i] + "CancelAnimationFrame"] || window[a[i] + "CancelRequestAnimationFrame"]; 6137 } 6138 6139 _class("Ticker", function(fps, useRAF) { 6140 var _self = this, 6141 _startTime = _getTime(), 6142 _useRAF = (useRAF !== false && _reqAnimFrame) ? "auto" : false, 6143 _lagThreshold = 500, 6144 _adjustedLag = 33, 6145 _tickWord = "tick", //helps reduce gc burden 6146 _fps, _req, _id, _gap, _nextTime, 6147 _tick = function(manual) { 6148 var elapsed = _getTime() - _lastUpdate, 6149 overlap, dispatch; 6150 if (elapsed > _lagThreshold) { 6151 _startTime += elapsed - _adjustedLag; 6152 } 6153 _lastUpdate += elapsed; 6154 _self.time = (_lastUpdate - _startTime) / 1000; 6155 overlap = _self.time - _nextTime; 6156 if (!_fps || overlap > 0 || manual === true) { 6157 _self.frame++; 6158 _nextTime += overlap + (overlap >= _gap ? 0.004 : _gap - overlap); 6159 dispatch = true; 6160 } 6161 if (manual !== true) { //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. 6162 _id = _req(_tick); 6163 } 6164 if (dispatch) { 6165 _self.dispatchEvent(_tickWord); 6166 } 6167 }; 6168 6169 EventDispatcher.call(_self); 6170 _self.time = _self.frame = 0; 6171 _self.tick = function() { 6172 _tick(true); 6173 }; 6174 6175 _self.lagSmoothing = function(threshold, adjustedLag) { 6176 if (!arguments.length) { //if lagSmoothing() is called with no arguments, treat it like a getter that returns a boolean indicating if it's enabled or not. This is purposely undocumented and is for internal use. 6177 return (_lagThreshold < 1 / _tinyNum); 6178 } 6179 _lagThreshold = threshold || (1 / _tinyNum); //zero should be interpreted as basically unlimited 6180 _adjustedLag = Math.min(adjustedLag, _lagThreshold, 0); 6181 }; 6182 6183 _self.sleep = function() { 6184 if (_id == null) { 6185 return; 6186 } 6187 if (!_useRAF || !_cancelAnimFrame) { 6188 clearTimeout(_id); 6189 } else { 6190 _cancelAnimFrame(_id); 6191 } 6192 _req = _emptyFunc; 6193 _id = null; 6194 if (_self === _ticker) { 6195 _tickerActive = false; 6196 } 6197 }; 6198 6199 _self.wake = function(seamless) { 6200 if (_id !== null) { 6201 _self.sleep(); 6202 } else if (seamless) { 6203 _startTime += -_lastUpdate + (_lastUpdate = _getTime()); 6204 } else if (_self.frame > 10) { //don't trigger lagSmoothing if we're just waking up, and make sure that at least 10 frames have elapsed because of the iOS bug that we work around below with the 1.5-second setTimout(). 6205 _lastUpdate = _getTime() - _lagThreshold + 5; 6206 } 6207 _req = (_fps === 0) ? _emptyFunc : (!_useRAF || !_reqAnimFrame) ? function(f) { return setTimeout(f, ((_nextTime - _self.time) * 1000 + 1) | 0); } : _reqAnimFrame; 6208 if (_self === _ticker) { 6209 _tickerActive = true; 6210 } 6211 _tick(2); 6212 }; 6213 6214 _self.fps = function(value) { 6215 if (!arguments.length) { 6216 return _fps; 6217 } 6218 _fps = value; 6219 _gap = 1 / (_fps || 60); 6220 _nextTime = this.time + _gap; 6221 _self.wake(); 6222 }; 6223 6224 _self.useRAF = function(value) { 6225 if (!arguments.length) { 6226 return _useRAF; 6227 } 6228 _self.sleep(); 6229 _useRAF = value; 6230 _self.fps(_fps); 6231 }; 6232 _self.fps(fps); 6233 6234 //a bug in iOS 6 Safari occasionally prevents the requestAnimationFrame from working initially, so we use a 1.5-second timeout that automatically falls back to setTimeout() if it senses this condition. 6235 setTimeout(function() { 6236 if (_useRAF === "auto" && _self.frame < 5 && (_doc || {}).visibilityState !== "hidden") { 6237 _self.useRAF(false); 6238 } 6239 }, 1500); 6240 }); 6241 6242 p = gs.Ticker.prototype = new gs.events.EventDispatcher(); 6243 p.constructor = gs.Ticker; 6244 6245 6246/* 6247 * ---------------------------------------------------------------- 6248 * Animation 6249 * ---------------------------------------------------------------- 6250 */ 6251 var Animation = _class("core.Animation", function(duration, vars) { 6252 this.vars = vars = vars || {}; 6253 this._duration = this._totalDuration = duration || 0; 6254 this._delay = Number(vars.delay) || 0; 6255 this._timeScale = 1; 6256 this._active = !!vars.immediateRender; 6257 this.data = vars.data; 6258 this._reversed = !!vars.reversed; 6259 6260 if (!_rootTimeline) { 6261 return; 6262 } 6263 if (!_tickerActive) { //some browsers (like iOS 6 Safari) shut down JavaScript execution when the tab is disabled and they [occasionally] neglect to start up requestAnimationFrame again when returning - this code ensures that the engine starts up again properly. 6264 _ticker.wake(); 6265 } 6266 6267 var tl = this.vars.useFrames ? _rootFramesTimeline : _rootTimeline; 6268 tl.add(this, tl._time); 6269 6270 if (this.vars.paused) { 6271 this.paused(true); 6272 } 6273 }); 6274 6275 _ticker = Animation.ticker = new gs.Ticker(); 6276 p = Animation.prototype; 6277 p._dirty = p._gc = p._initted = p._paused = false; 6278 p._totalTime = p._time = 0; 6279 p._rawPrevTime = -1; 6280 p._next = p._last = p._onUpdate = p._timeline = p.timeline = null; 6281 p._paused = false; 6282 6283 6284 //some browsers (like iOS) occasionally drop the requestAnimationFrame event when the user switches to a different tab and then comes back again, so we use a 2-second setTimeout() to sense if/when that condition occurs and then wake() the ticker. 6285 var _checkTimeout = function() { 6286 if (_tickerActive && _getTime() - _lastUpdate > 2000 && ((_doc || {}).visibilityState !== "hidden" || !_ticker.lagSmoothing())) { //note: if the tab is hidden, we should still wake if lagSmoothing has been disabled. 6287 _ticker.wake(); 6288 } 6289 var t = setTimeout(_checkTimeout, 2000); 6290 if (t.unref) { 6291 // allows a node process to exit even if the timeout’s callback hasn't been invoked. Without it, the node process could hang as this function is called every two seconds. 6292 t.unref(); 6293 } 6294 }; 6295 _checkTimeout(); 6296 6297 6298 p.play = function(from, suppressEvents) { 6299 if (from != null) { 6300 this.seek(from, suppressEvents); 6301 } 6302 return this.reversed(false).paused(false); 6303 }; 6304 6305 p.pause = function(atTime, suppressEvents) { 6306 if (atTime != null) { 6307 this.seek(atTime, suppressEvents); 6308 } 6309 return this.paused(true); 6310 }; 6311 6312 p.resume = function(from, suppressEvents) { 6313 if (from != null) { 6314 this.seek(from, suppressEvents); 6315 } 6316 return this.paused(false); 6317 }; 6318 6319 p.seek = function(time, suppressEvents) { 6320 return this.totalTime(Number(time), suppressEvents !== false); 6321 }; 6322 6323 p.restart = function(includeDelay, suppressEvents) { 6324 return this.reversed(false).paused(false).totalTime(includeDelay ? -this._delay : 0, (suppressEvents !== false), true); 6325 }; 6326 6327 p.reverse = function(from, suppressEvents) { 6328 if (from != null) { 6329 this.seek((from || this.totalDuration()), suppressEvents); 6330 } 6331 return this.reversed(true).paused(false); 6332 }; 6333 6334 p.render = function(time, suppressEvents, force) { 6335 //stub - we override this method in subclasses. 6336 }; 6337 6338 p.invalidate = function() { 6339 this._time = this._totalTime = 0; 6340 this._initted = this._gc = false; 6341 this._rawPrevTime = -1; 6342 if (this._gc || !this.timeline) { 6343 this._enabled(true); 6344 } 6345 return this; 6346 }; 6347 6348 p.isActive = function() { 6349 var tl = this._timeline, //the 2 root timelines won't have a _timeline; they're always active. 6350 startTime = this._startTime, 6351 rawTime; 6352 return (!tl || (!this._gc && !this._paused && tl.isActive() && (rawTime = tl.rawTime(true)) >= startTime && rawTime < startTime + this.totalDuration() / this._timeScale - _tinyNum)); 6353 }; 6354 6355 p._enabled = function (enabled, ignoreTimeline) { 6356 if (!_tickerActive) { 6357 _ticker.wake(); 6358 } 6359 this._gc = !enabled; 6360 this._active = this.isActive(); 6361 if (ignoreTimeline !== true) { 6362 if (enabled && !this.timeline) { 6363 this._timeline.add(this, this._startTime - this._delay); 6364 } else if (!enabled && this.timeline) { 6365 this._timeline._remove(this, true); 6366 } 6367 } 6368 return false; 6369 }; 6370 6371 6372 p._kill = function(vars, target) { 6373 return this._enabled(false, false); 6374 }; 6375 6376 p.kill = function(vars, target) { 6377 this._kill(vars, target); 6378 return this; 6379 }; 6380 6381 p._uncache = function(includeSelf) { 6382 var tween = includeSelf ? this : this.timeline; 6383 while (tween) { 6384 tween._dirty = true; 6385 tween = tween.timeline; 6386 } 6387 return this; 6388 }; 6389 6390 p._swapSelfInParams = function(params) { 6391 var i = params.length, 6392 copy = params.concat(); 6393 while (--i > -1) { 6394 if (params[i] === "{self}") { 6395 copy[i] = this; 6396 } 6397 } 6398 return copy; 6399 }; 6400 6401 p._callback = function(type) { 6402 var v = this.vars, 6403 callback = v[type], 6404 params = v[type + "Params"], 6405 scope = v[type + "Scope"] || v.callbackScope || this, 6406 l = params ? params.length : 0; 6407 switch (l) { //speed optimization; call() is faster than apply() so use it when there are only a few parameters (which is by far most common). Previously we simply did var v = this.vars; v[type].apply(v[type + "Scope"] || v.callbackScope || this, v[type + "Params"] || _blankArray); 6408 case 0: callback.call(scope); break; 6409 case 1: callback.call(scope, params[0]); break; 6410 case 2: callback.call(scope, params[0], params[1]); break; 6411 default: callback.apply(scope, params); 6412 } 6413 }; 6414 6415//----Animation getters/setters -------------------------------------------------------- 6416 6417 p.eventCallback = function(type, callback, params, scope) { 6418 if ((type || "").substr(0,2) === "on") { 6419 var v = this.vars; 6420 if (arguments.length === 1) { 6421 return v[type]; 6422 } 6423 if (callback == null) { 6424 delete v[type]; 6425 } else { 6426 v[type] = callback; 6427 v[type + "Params"] = (_isArray(params) && params.join("").indexOf("{self}") !== -1) ? this._swapSelfInParams(params) : params; 6428 v[type + "Scope"] = scope; 6429 } 6430 if (type === "onUpdate") { 6431 this._onUpdate = callback; 6432 } 6433 } 6434 return this; 6435 }; 6436 6437 p.delay = function(value) { 6438 if (!arguments.length) { 6439 return this._delay; 6440 } 6441 if (this._timeline.smoothChildTiming) { 6442 this.startTime( this._startTime + value - this._delay ); 6443 } 6444 this._delay = value; 6445 return this; 6446 }; 6447 6448 p.duration = function(value) { 6449 if (!arguments.length) { 6450 this._dirty = false; 6451 return this._duration; 6452 } 6453 this._duration = this._totalDuration = value; 6454 this._uncache(true); //true in case it's a TweenMax or TimelineMax that has a repeat - we'll need to refresh the totalDuration. 6455 if (this._timeline.smoothChildTiming) if (this._time > 0) if (this._time < this._duration) if (value !== 0) { 6456 this.totalTime(this._totalTime * (value / this._duration), true); 6457 } 6458 return this; 6459 }; 6460 6461 p.totalDuration = function(value) { 6462 this._dirty = false; 6463 return (!arguments.length) ? this._totalDuration : this.duration(value); 6464 }; 6465 6466 p.time = function(value, suppressEvents) { 6467 if (!arguments.length) { 6468 return this._time; 6469 } 6470 if (this._dirty) { 6471 this.totalDuration(); 6472 } 6473 return this.totalTime((value > this._duration) ? this._duration : value, suppressEvents); 6474 }; 6475 6476 p.totalTime = function(time, suppressEvents, uncapped) { 6477 if (!_tickerActive) { 6478 _ticker.wake(); 6479 } 6480 if (!arguments.length) { 6481 return this._totalTime; 6482 } 6483 if (this._timeline) { 6484 if (time < 0 && !uncapped) { 6485 time += this.totalDuration(); 6486 } 6487 if (this._timeline.smoothChildTiming) { 6488 if (this._dirty) { 6489 this.totalDuration(); 6490 } 6491 var totalDuration = this._totalDuration, 6492 tl = this._timeline; 6493 if (time > totalDuration && !uncapped) { 6494 time = totalDuration; 6495 } 6496 this._startTime = (this._paused ? this._pauseTime : tl._time) - ((!this._reversed ? time : totalDuration - time) / this._timeScale); 6497 if (!tl._dirty) { //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. 6498 this._uncache(false); 6499 } 6500 //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 startTime of that child would get pushed out, but one of the ancestors may have completed. 6501 if (tl._timeline) { 6502 while (tl._timeline) { 6503 if (tl._timeline._time !== (tl._startTime + tl._totalTime) / tl._timeScale) { 6504 tl.totalTime(tl._totalTime, true); 6505 } 6506 tl = tl._timeline; 6507 } 6508 } 6509 } 6510 if (this._gc) { 6511 this._enabled(true, false); 6512 } 6513 if (this._totalTime !== time || this._duration === 0) { 6514 if (_lazyTweens.length) { 6515 _lazyRender(); 6516 } 6517 this.render(time, suppressEvents, false); 6518 if (_lazyTweens.length) { //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. 6519 _lazyRender(); 6520 } 6521 } 6522 } 6523 return this; 6524 }; 6525 6526 p.progress = p.totalProgress = function(value, suppressEvents) { 6527 var duration = this.duration(); 6528 return (!arguments.length) ? (duration ? this._time / duration : this.ratio) : this.totalTime(duration * value, suppressEvents); 6529 }; 6530 6531 p.startTime = function(value) { 6532 if (!arguments.length) { 6533 return this._startTime; 6534 } 6535 if (value !== this._startTime) { 6536 this._startTime = value; 6537 if (this.timeline) if (this.timeline._sortChildren) { 6538 this.timeline.add(this, value - this._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct. 6539 } 6540 } 6541 return this; 6542 }; 6543 6544 p.endTime = function(includeRepeats) { 6545 return this._startTime + ((includeRepeats != false) ? this.totalDuration() : this.duration()) / this._timeScale; 6546 }; 6547 6548 p.timeScale = function(value) { 6549 if (!arguments.length) { 6550 return this._timeScale; 6551 } 6552 var pauseTime, t; 6553 value = value || _tinyNum; //can't allow zero because it'll throw the math off 6554 if (this._timeline && this._timeline.smoothChildTiming) { 6555 pauseTime = this._pauseTime; 6556 t = (pauseTime || pauseTime === 0) ? pauseTime : this._timeline.totalTime(); 6557 this._startTime = t - ((t - this._startTime) * this._timeScale / value); 6558 } 6559 this._timeScale = value; 6560 t = this.timeline; 6561 while (t && t.timeline) { //must update the duration/totalDuration of all ancestor timelines immediately in case 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. 6562 t._dirty = true; 6563 t.totalDuration(); 6564 t = t.timeline; 6565 } 6566 return this; 6567 }; 6568 6569 p.reversed = function(value) { 6570 if (!arguments.length) { 6571 return this._reversed; 6572 } 6573 if (value != this._reversed) { 6574 this._reversed = value; 6575 this.totalTime(((this._timeline && !this._timeline.smoothChildTiming) ? this.totalDuration() - this._totalTime : this._totalTime), true); 6576 } 6577 return this; 6578 }; 6579 6580 p.paused = function(value) { 6581 if (!arguments.length) { 6582 return this._paused; 6583 } 6584 var tl = this._timeline, 6585 raw, elapsed; 6586 if (value != this._paused) if (tl) { 6587 if (!_tickerActive && !value) { 6588 _ticker.wake(); 6589 } 6590 raw = tl.rawTime(); 6591 elapsed = raw - this._pauseTime; 6592 if (!value && tl.smoothChildTiming) { 6593 this._startTime += elapsed; 6594 this._uncache(false); 6595 } 6596 this._pauseTime = value ? raw : null; 6597 this._paused = value; 6598 this._active = this.isActive(); 6599 if (!value && elapsed !== 0 && this._initted && this.duration()) { 6600 raw = tl.smoothChildTiming ? this._totalTime : (raw - this._startTime) / this._timeScale; 6601 this.render(raw, (raw === this._totalTime), true); //in case the target's properties changed via some other tween or manual update by the user, we should force a render. 6602 } 6603 } 6604 if (this._gc && !value) { 6605 this._enabled(true, false); 6606 } 6607 return this; 6608 }; 6609 6610 6611/* 6612 * ---------------------------------------------------------------- 6613 * SimpleTimeline 6614 * ---------------------------------------------------------------- 6615 */ 6616 var SimpleTimeline = _class("core.SimpleTimeline", function(vars) { 6617 Animation.call(this, 0, vars); 6618 this.autoRemoveChildren = this.smoothChildTiming = true; 6619 }); 6620 6621 p = SimpleTimeline.prototype = new Animation(); 6622 p.constructor = SimpleTimeline; 6623 p.kill()._gc = false; 6624 p._first = p._last = p._recent = null; 6625 p._sortChildren = false; 6626 6627 p.add = p.insert = function(child, position, align, stagger) { 6628 var prevTween, st; 6629 child._startTime = Number(position || 0) + child._delay; 6630 if (child._paused) if (this !== child._timeline) { //we only adjust the _pauseTime if it wasn't in this timeline already. Remember, sometimes a tween will be inserted again into the same timeline when its startTime is changed so that the tweens in the TimelineLite/Max are re-ordered properly in the linked list (so everything renders in the proper order). 6631 child._pauseTime = this.rawTime() - (child._timeline.rawTime() - child._pauseTime); 6632 } 6633 if (child.timeline) { 6634 child.timeline._remove(child, true); //removes from existing timeline so that it can be properly added to this one. 6635 } 6636 child.timeline = child._timeline = this; 6637 if (child._gc) { 6638 child._enabled(true, true); 6639 } 6640 prevTween = this._last; 6641 if (this._sortChildren) { 6642 st = child._startTime; 6643 while (prevTween && prevTween._startTime > st) { 6644 prevTween = prevTween._prev; 6645 } 6646 } 6647 if (prevTween) { 6648 child._next = prevTween._next; 6649 prevTween._next = child; 6650 } else { 6651 child._next = this._first; 6652 this._first = child; 6653 } 6654 if (child._next) { 6655 child._next._prev = child; 6656 } else { 6657 this._last = child; 6658 } 6659 child._prev = prevTween; 6660 this._recent = child; 6661 if (this._timeline) { 6662 this._uncache(true); 6663 } 6664 return this; 6665 }; 6666 6667 p._remove = function(tween, skipDisable) { 6668 if (tween.timeline === this) { 6669 if (!skipDisable) { 6670 tween._enabled(false, true); 6671 } 6672 6673 if (tween._prev) { 6674 tween._prev._next = tween._next; 6675 } else if (this._first === tween) { 6676 this._first = tween._next; 6677 } 6678 if (tween._next) { 6679 tween._next._prev = tween._prev; 6680 } else if (this._last === tween) { 6681 this._last = tween._prev; 6682 } 6683 tween._next = tween._prev = tween.timeline = null; 6684 if (tween === this._recent) { 6685 this._recent = this._last; 6686 } 6687 6688 if (this._timeline) { 6689 this._uncache(true); 6690 } 6691 } 6692 return this; 6693 }; 6694 6695 p.render = function(time, suppressEvents, force) { 6696 var tween = this._first, 6697 next; 6698 this._totalTime = this._time = this._rawPrevTime = time; 6699 while (tween) { 6700 next = tween._next; //record it here because the value could change after rendering... 6701 if (tween._active || (time >= tween._startTime && !tween._paused && !tween._gc)) { 6702 if (!tween._reversed) { 6703 tween.render((time - tween._startTime) * tween._timeScale, suppressEvents, force); 6704 } else { 6705 tween.render(((!tween._dirty) ? tween._totalDuration : tween.totalDuration()) - ((time - tween._startTime) * tween._timeScale), suppressEvents, force); 6706 } 6707 } 6708 tween = next; 6709 } 6710 }; 6711 6712 p.rawTime = function() { 6713 if (!_tickerActive) { 6714 _ticker.wake(); 6715 } 6716 return this._totalTime; 6717 }; 6718 6719/* 6720 * ---------------------------------------------------------------- 6721 * TweenLite 6722 * ---------------------------------------------------------------- 6723 */ 6724 var TweenLite = _class("TweenLite", function(target, duration, vars) { 6725 Animation.call(this, duration, vars); 6726 this.render = TweenLite.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method) 6727 6728 if (target == null) { 6729 throw "Cannot tween a null target."; 6730 } 6731 6732 this.target = target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target; 6733 6734 var isSelector = (target.jquery || (target.length && target !== window && target[0] && (target[0] === window || (target[0].nodeType && target[0].style && !target.nodeType)))), 6735 overwrite = this.vars.overwrite, 6736 i, targ, targets; 6737 6738 this._overwrite = overwrite = (overwrite == null) ? _overwriteLookup[TweenLite.defaultOverwrite] : (typeof(overwrite) === "number") ? overwrite >> 0 : _overwriteLookup[overwrite]; 6739 6740 if ((isSelector || target instanceof Array || (target.push && _isArray(target))) && typeof(target[0]) !== "number") { 6741 this._targets = targets = _slice(target); //don't use Array.prototype.slice.call(target, 0) because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 6742 this._propLookup = []; 6743 this._siblings = []; 6744 for (i = 0; i < targets.length; i++) { 6745 targ = targets[i]; 6746 if (!targ) { 6747 targets.splice(i--, 1); 6748 continue; 6749 } else if (typeof(targ) === "string") { 6750 targ = targets[i--] = TweenLite.selector(targ); //in case it's an array of strings 6751 if (typeof(targ) === "string") { 6752 targets.splice(i+1, 1); //to avoid an endless loop (can't imagine why the selector would return a string, but just in case) 6753 } 6754 continue; 6755 } else if (targ.length && targ !== window && targ[0] && (targ[0] === window || (targ[0].nodeType && targ[0].style && !targ.nodeType))) { //in case the user is passing in an array of selector objects (like jQuery objects), we need to check one more level and pull things out if necessary. Also note that <select> elements pass all the criteria regarding length and the first child having style, so we must also check to ensure the target isn't an HTML node itself. 6756 targets.splice(i--, 1); 6757 this._targets = targets = targets.concat(_slice(targ)); 6758 continue; 6759 } 6760 this._siblings[i] = _register(targ, this, false); 6761 if (overwrite === 1) if (this._siblings[i].length > 1) { 6762 _applyOverwrite(targ, this, null, 1, this._siblings[i]); 6763 } 6764 } 6765 6766 } else { 6767 this._propLookup = {}; 6768 this._siblings = _register(target, this, false); 6769 if (overwrite === 1) if (this._siblings.length > 1) { 6770 _applyOverwrite(target, this, null, 1, this._siblings); 6771 } 6772 } 6773 if (this.vars.immediateRender || (duration === 0 && this._delay === 0 && this.vars.immediateRender !== false)) { 6774 this._time = -_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) 6775 this.render(Math.min(0, -this._delay)); //in case delay is negative 6776 } 6777 }, true), 6778 _isSelector = function(v) { 6779 return (v && v.length && v !== window && v[0] && (v[0] === window || (v[0].nodeType && v[0].style && !v.nodeType))); //we cannot check "nodeType" if the target is window from within an iframe, otherwise it will trigger a security error in some browsers like Firefox. 6780 }, 6781 _autoCSS = function(vars, target) { 6782 var css = {}, 6783 p; 6784 for (p in vars) { 6785 if (!_reservedProps[p] && (!(p in target) || p === "transform" || p === "x" || p === "y" || p === "width" || p === "height" || p === "className" || p === "border") && (!_plugins[p] || (_plugins[p] && _plugins[p]._autoCSS))) { //note: <img> elements contain read-only "x" and "y" properties. We should also prioritize editing css width/height rather than the element's properties. 6786 css[p] = vars[p]; 6787 delete vars[p]; 6788 } 6789 } 6790 vars.css = css; 6791 }; 6792 6793 p = TweenLite.prototype = new Animation(); 6794 p.constructor = TweenLite; 6795 p.kill()._gc = false; 6796 6797//----TweenLite defaults, overwrite management, and root updates ---------------------------------------------------- 6798 6799 p.ratio = 0; 6800 p._firstPT = p._targets = p._overwrittenProps = p._startAt = null; 6801 p._notifyPluginsOfEnabled = p._lazy = false; 6802 6803 TweenLite.version = "2.1.3"; 6804 TweenLite.defaultEase = p._ease = new Ease(null, null, 1, 1); 6805 TweenLite.defaultOverwrite = "auto"; 6806 TweenLite.ticker = _ticker; 6807 TweenLite.autoSleep = 120; 6808 TweenLite.lagSmoothing = function(threshold, adjustedLag) { 6809 _ticker.lagSmoothing(threshold, adjustedLag); 6810 }; 6811 6812 TweenLite.selector = window.$ || window.jQuery || function(e) { 6813 var selector = window.$ || window.jQuery; 6814 if (selector) { 6815 TweenLite.selector = selector; 6816 return selector(e); 6817 } 6818 if (!_doc) { //in some dev environments (like Angular 6), GSAP gets loaded before the document is defined! So re-query it here if/when necessary. 6819 _doc = window.document; 6820 } 6821 return (!_doc) ? e : (_doc.querySelectorAll ? _doc.querySelectorAll(e) : _doc.getElementById((e.charAt(0) === "#") ? e.substr(1) : e)); 6822 }; 6823 6824 var _lazyTweens = [], 6825 _lazyLookup = {}, 6826 _numbersExp = /(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig, 6827 _relExp = /[\+-]=-?[\.\d]/, 6828 //_nonNumbersExp = /(?:([\-+](?!(\d|=)))|[^\d\-+=e]|(e(?![\-+][\d])))+/ig, 6829 _setRatio = function(v) { 6830 var pt = this._firstPT, 6831 min = 0.000001, 6832 val; 6833 while (pt) { 6834 val = !pt.blob ? pt.c * v + pt.s : (v === 1 && this.end != null) ? this.end : v ? this.join("") : this.start; 6835 if (pt.m) { 6836 val = pt.m.call(this._tween, val, this._target || pt.t, this._tween); 6837 } else if (val < min) if (val > -min && !pt.blob) { //prevents issues with converting very small numbers to strings in the browser 6838 val = 0; 6839 } 6840 if (!pt.f) { 6841 pt.t[pt.p] = val; 6842 } else if (pt.fp) { 6843 pt.t[pt.p](pt.fp, val); 6844 } else { 6845 pt.t[pt.p](val); 6846 } 6847 pt = pt._next; 6848 } 6849 }, 6850 _blobRound = function(v) { 6851 return (((v * 1000) | 0) / 1000) + ""; 6852 }, 6853 //compares two strings (start/end), finds the numbers that are different and spits back an array representing the whole value but with the changing values isolated as elements. For example, "rgb(0,0,0)" and "rgb(100,50,0)" would become ["rgb(", 0, ",", 50, ",0)"]. Notice it merges the parts that are identical (performance optimization). The array also has a linked list of PropTweens attached starting with _firstPT that contain the tweening data (t, p, s, c, f, etc.). It also stores the starting value as a "start" property so that we can revert to it if/when necessary, like when a tween rewinds fully. If the quantity of numbers differs between the start and end, it will always prioritize the end value(s). The pt parameter is optional - it's for a PropTween that will be appended to the end of the linked list and is typically for actually setting the value after all of the elements have been updated (with array.join("")). 6854 _blobDif = function(start, end, filter, pt) { 6855 var a = [], 6856 charIndex = 0, 6857 s = "", 6858 color = 0, 6859 startNums, endNums, num, i, l, nonNumbers, currentNum; 6860 a.start = start; 6861 a.end = end; 6862 start = a[0] = start + ""; //ensure values are strings 6863 end = a[1] = end + ""; 6864 if (filter) { 6865 filter(a); //pass an array with the starting and ending values and let the filter do whatever it needs to the values. 6866 start = a[0]; 6867 end = a[1]; 6868 } 6869 a.length = 0; 6870 startNums = start.match(_numbersExp) || []; 6871 endNums = end.match(_numbersExp) || []; 6872 if (pt) { 6873 pt._next = null; 6874 pt.blob = 1; 6875 a._firstPT = a._applyPT = pt; //apply last in the linked list (which means inserting it first) 6876 } 6877 l = endNums.length; 6878 for (i = 0; i < l; i++) { 6879 currentNum = endNums[i]; 6880 nonNumbers = end.substr(charIndex, end.indexOf(currentNum, charIndex)-charIndex); 6881 s += (nonNumbers || !i) ? nonNumbers : ","; //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. 6882 charIndex += nonNumbers.length; 6883 if (color) { //sense rgba() values and round them. 6884 color = (color + 1) % 5; 6885 } else if (nonNumbers.substr(-5) === "rgba(") { 6886 color = 1; 6887 } 6888 if (currentNum === startNums[i] || startNums.length <= i) { 6889 s += currentNum; 6890 } else { 6891 if (s) { 6892 a.push(s); 6893 s = ""; 6894 } 6895 num = parseFloat(startNums[i]); 6896 a.push(num); 6897 a._firstPT = {_next: a._firstPT, t:a, p: a.length-1, s:num, c:((currentNum.charAt(1) === "=") ? parseInt(currentNum.charAt(0) + "1", 10) * parseFloat(currentNum.substr(2)) : (parseFloat(currentNum) - num)) || 0, f:0, m:(color && color < 4) ? Math.round : _blobRound}; //limiting to 3 decimal places and casting as a string can really help performance when array.join() is called! 6898 //note: we don't set _prev because we'll never need to remove individual PropTweens from this list. 6899 } 6900 charIndex += currentNum.length; 6901 } 6902 s += end.substr(charIndex); 6903 if (s) { 6904 a.push(s); 6905 } 6906 a.setRatio = _setRatio; 6907 if (_relExp.test(end)) { //if the end string contains relative values, delete it so that on the final render (in _setRatio()), we don't actually set it to the string with += or -= characters (forces it to use the calculated value). 6908 a.end = null; 6909 } 6910 return a; 6911 }, 6912 //note: "funcParam" is only necessary for function-based getters/setters that require an extra parameter like getAttribute("width") and setAttribute("width", value). In this example, funcParam would be "width". Used by AttrPlugin for example. 6913 _addPropTween = function(target, prop, start, end, overwriteProp, mod, funcParam, stringFilter, index) { 6914 if (typeof(end) === "function") { 6915 end = end(index || 0, target); 6916 } 6917 var type = typeof(target[prop]), 6918 getterName = (type !== "function") ? "" : ((prop.indexOf("set") || typeof(target["get" + prop.substr(3)]) !== "function") ? prop : "get" + prop.substr(3)), 6919 s = (start !== "get") ? start : !getterName ? target[prop] : funcParam ? target[getterName](funcParam) : target[getterName](), 6920 isRelative = (typeof(end) === "string" && end.charAt(1) === "="), 6921 pt = {t:target, p:prop, s:s, f:(type === "function"), pg:0, n:overwriteProp || prop, m:(!mod ? 0 : (typeof(mod) === "function") ? mod : Math.round), pr:0, c:isRelative ? parseInt(end.charAt(0) + "1", 10) * parseFloat(end.substr(2)) : (parseFloat(end) - s) || 0}, 6922 blob; 6923 6924 if (typeof(s) !== "number" || (typeof(end) !== "number" && !isRelative)) { 6925 if (funcParam || isNaN(s) || (!isRelative && isNaN(end)) || typeof(s) === "boolean" || typeof(end) === "boolean") { 6926 //a blob (string that has multiple numbers in it) 6927 pt.fp = funcParam; 6928 blob = _blobDif(s, (isRelative ? (parseFloat(pt.s) + pt.c) + (pt.s + "").replace(/[0-9\-\.]/g, "") : end), stringFilter || TweenLite.defaultStringFilter, pt); 6929 pt = {t: blob, p: "setRatio", s: 0, c: 1, f: 2, pg: 0, n: overwriteProp || prop, pr: 0, m: 0}; //"2" indicates it's a Blob property tween. Needed for RoundPropsPlugin for example. 6930 } else { 6931 pt.s = parseFloat(s); 6932 if (!isRelative) { 6933 pt.c = (parseFloat(end) - pt.s) || 0; 6934 } 6935 } 6936 } 6937 if (pt.c) { //only add it to the linked list if there's a change. 6938 if ((pt._next = this._firstPT)) { 6939 pt._next._prev = pt; 6940 } 6941 this._firstPT = pt; 6942 return pt; 6943 } 6944 }, 6945 _internals = TweenLite._internals = {isArray:_isArray, isSelector:_isSelector, lazyTweens:_lazyTweens, blobDif:_blobDif}, //gives us a way to expose certain private values to other GreenSock classes without contaminating tha main TweenLite object. 6946 _plugins = TweenLite._plugins = {}, 6947 _tweenLookup = _internals.tweenLookup = {}, 6948 _tweenLookupNum = 0, 6949 _reservedProps = _internals.reservedProps = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, onCompleteScope:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onUpdateScope:1, onStart:1, onStartParams:1, onStartScope:1, onReverseComplete:1, onReverseCompleteParams:1, onReverseCompleteScope:1, onRepeat:1, onRepeatParams:1, onRepeatScope:1, easeParams:1, yoyo:1, immediateRender:1, repeat:1, repeatDelay:1, data:1, paused:1, reversed:1, autoCSS:1, lazy:1, onOverwrite:1, callbackScope:1, stringFilter:1, id:1, yoyoEase:1, stagger:1}, 6950 _overwriteLookup = {none:0, all:1, auto:2, concurrent:3, allOnStart:4, preexisting:5, "true":1, "false":0}, 6951 _rootFramesTimeline = Animation._rootFramesTimeline = new SimpleTimeline(), 6952 _rootTimeline = Animation._rootTimeline = new SimpleTimeline(), 6953 _nextGCFrame = 30, 6954 _lazyRender = _internals.lazyRender = function() { 6955 var l = _lazyTweens.length, 6956 i, tween; 6957 _lazyLookup = {}; 6958 for (i = 0; i < l; i++) { 6959 tween = _lazyTweens[i]; 6960 if (tween && tween._lazy !== false) { 6961 tween.render(tween._lazy[0], tween._lazy[1], true); 6962 tween._lazy = false; 6963 } 6964 } 6965 _lazyTweens.length = 0; 6966 }; 6967 6968 _rootTimeline._startTime = _ticker.time; 6969 _rootFramesTimeline._startTime = _ticker.frame; 6970 _rootTimeline._active = _rootFramesTimeline._active = true; 6971 setTimeout(_lazyRender, 1); //on some mobile devices, there isn't a "tick" before code runs which means any lazy renders wouldn't run before the next official "tick". 6972 6973 Animation._updateRoot = TweenLite.render = function() { 6974 var i, a, p; 6975 if (_lazyTweens.length) { //if code is run outside of the requestAnimationFrame loop, there may be tweens queued AFTER the engine refreshed, so we need to ensure any pending renders occur before we refresh again. 6976 _lazyRender(); 6977 } 6978 _rootTimeline.render((_ticker.time - _rootTimeline._startTime) * _rootTimeline._timeScale, false, false); 6979 _rootFramesTimeline.render((_ticker.frame - _rootFramesTimeline._startTime) * _rootFramesTimeline._timeScale, false, false); 6980 if (_lazyTweens.length) { 6981 _lazyRender(); 6982 } 6983 if (_ticker.frame >= _nextGCFrame) { //dump garbage every 120 frames or whatever the user sets TweenLite.autoSleep to 6984 _nextGCFrame = _ticker.frame + (parseInt(TweenLite.autoSleep, 10) || 120); 6985 for (p in _tweenLookup) { 6986 a = _tweenLookup[p].tweens; 6987 i = a.length; 6988 while (--i > -1) { 6989 if (a[i]._gc) { 6990 a.splice(i, 1); 6991 } 6992 } 6993 if (a.length === 0) { 6994 delete _tweenLookup[p]; 6995 } 6996 } 6997 //if there are no more tweens in the root timelines, or if they're all paused, make the _timer sleep to reduce load on the CPU slightly 6998 p = _rootTimeline._first; 6999 if (!p || p._paused) if (TweenLite.autoSleep && !_rootFramesTimeline._first && _ticker._listeners.tick.length === 1) { 7000 while (p && p._paused) { 7001 p = p._next; 7002 } 7003 if (!p) { 7004 _ticker.sleep(); 7005 } 7006 } 7007 } 7008 }; 7009 7010 _ticker.addEventListener("tick", Animation._updateRoot); 7011 7012 var _register = function(target, tween, scrub) { 7013 var id = target._gsTweenID, a, i; 7014 if (!_tweenLookup[id || (target._gsTweenID = id = "t" + (_tweenLookupNum++))]) { 7015 _tweenLookup[id] = {target:target, tweens:[]}; 7016 } 7017 if (tween) { 7018 a = _tweenLookup[id].tweens; 7019 a[(i = a.length)] = tween; 7020 if (scrub) { 7021 while (--i > -1) { 7022 if (a[i] === tween) { 7023 a.splice(i, 1); 7024 } 7025 } 7026 } 7027 } 7028 return _tweenLookup[id].tweens; 7029 }, 7030 _onOverwrite = function(overwrittenTween, overwritingTween, target, killedProps) { 7031 var func = overwrittenTween.vars.onOverwrite, r1, r2; 7032 if (func) { 7033 r1 = func(overwrittenTween, overwritingTween, target, killedProps); 7034 } 7035 func = TweenLite.onOverwrite; 7036 if (func) { 7037 r2 = func(overwrittenTween, overwritingTween, target, killedProps); 7038 } 7039 return (r1 !== false && r2 !== false); 7040 }, 7041 _applyOverwrite = function(target, tween, props, mode, siblings) { 7042 var i, changed, curTween, l; 7043 if (mode === 1 || mode >= 4) { 7044 l = siblings.length; 7045 for (i = 0; i < l; i++) { 7046 if ((curTween = siblings[i]) !== tween) { 7047 if (!curTween._gc) { 7048 if (curTween._kill(null, target, tween)) { 7049 changed = true; 7050 } 7051 } 7052 } else if (mode === 5) { 7053 break; 7054 } 7055 } 7056 return changed; 7057 } 7058 //NOTE: Add tiny amount to overcome floating point errors that can cause the startTime to be VERY slightly off (when a tween's time() is set for example) 7059 var startTime = tween._startTime + _tinyNum, 7060 overlaps = [], 7061 oCount = 0, 7062 zeroDur = (tween._duration === 0), 7063 globalStart; 7064 i = siblings.length; 7065 while (--i > -1) { 7066 if ((curTween = siblings[i]) === tween || curTween._gc || curTween._paused) { 7067 //ignore 7068 } else if (curTween._timeline !== tween._timeline) { 7069 globalStart = globalStart || _checkOverlap(tween, 0, zeroDur); 7070 if (_checkOverlap(curTween, globalStart, zeroDur) === 0) { 7071 overlaps[oCount++] = curTween; 7072 } 7073 } else if (curTween._startTime <= startTime) if (curTween._startTime + curTween.totalDuration() / curTween._timeScale > startTime) if (!((zeroDur || !curTween._initted) && startTime - curTween._startTime <= _tinyNum * 2)) { 7074 overlaps[oCount++] = curTween; 7075 } 7076 } 7077 7078 i = oCount; 7079 while (--i > -1) { 7080 curTween = overlaps[i]; 7081 l = curTween._firstPT; //we need to discern if there were property tweens originally; if they all get removed in the next line's _kill() call, the tween should be killed. See https://github.com/greensock/GreenSock-JS/issues/278 7082 if (mode === 2) if (curTween._kill(props, target, tween)) { 7083 changed = true; 7084 } 7085 if (mode !== 2 || (!curTween._firstPT && curTween._initted && l)) { 7086 if (mode !== 2 && !_onOverwrite(curTween, tween)) { 7087 continue; 7088 } 7089 if (curTween._enabled(false, false)) { //if all property tweens have been overwritten, kill the tween. 7090 changed = true; 7091 } 7092 } 7093 } 7094 return changed; 7095 }, 7096 _checkOverlap = function(tween, reference, zeroDur) { 7097 var tl = tween._timeline, 7098 ts = tl._timeScale, 7099 t = tween._startTime; 7100 while (tl._timeline) { 7101 t += tl._startTime; 7102 ts *= tl._timeScale; 7103 if (tl._paused) { 7104 return -100; 7105 } 7106 tl = tl._timeline; 7107 } 7108 t /= ts; 7109 return (t > reference) ? t - reference : ((zeroDur && t === reference) || (!tween._initted && t - reference < 2 * _tinyNum)) ? _tinyNum : ((t += tween.totalDuration() / tween._timeScale / ts) > reference + _tinyNum) ? 0 : t - reference - _tinyNum; 7110 }; 7111 7112 7113//---- TweenLite instance methods ----------------------------------------------------------------------------- 7114 7115 p._init = function() { 7116 var v = this.vars, 7117 op = this._overwrittenProps, 7118 dur = this._duration, 7119 immediate = !!v.immediateRender, 7120 ease = v.ease, 7121 startAt = this._startAt, 7122 i, initPlugins, pt, p, startVars, l; 7123 if (v.startAt) { 7124 if (startAt) { 7125 startAt.render(-1, true); //if we've run a startAt previously (when the tween instantiated), we should revert it so that the values re-instantiate correctly particularly for relative tweens. Without this, a TweenLite.fromTo(obj, 1, {x:"+=100"}, {x:"-=100"}), for example, would actually jump to +=200 because the startAt would run twice, doubling the relative change. 7126 startAt.kill(); 7127 } 7128 startVars = {}; 7129 for (p in v.startAt) { //copy the properties/values into a new object to avoid collisions, like var to = {x:0}, from = {x:500}; timeline.fromTo(e, 1, from, to).fromTo(e, 1, to, from); 7130 startVars[p] = v.startAt[p]; 7131 } 7132 startVars.data = "isStart"; 7133 startVars.overwrite = false; 7134 startVars.immediateRender = true; 7135 startVars.lazy = (immediate && v.lazy !== false); 7136 startVars.startAt = startVars.delay = null; //no nesting of startAt objects allowed (otherwise it could cause an infinite loop). 7137 startVars.onUpdate = v.onUpdate; 7138 startVars.onUpdateParams = v.onUpdateParams; 7139 startVars.onUpdateScope = v.onUpdateScope || v.callbackScope || this; 7140 this._startAt = TweenLite.to(this.target || {}, 0, startVars); 7141 if (immediate) { 7142 if (this._time > 0) { 7143 this._startAt = null; //tweens that render immediately (like most from() and fromTo() tweens) shouldn't revert when their parent timeline's playhead goes backward past the startTime because the initial render could have happened anytime and it shouldn't be directly correlated to this tween's startTime. Imagine setting up a complex animation where the beginning states of various objects are rendered immediately but the tween doesn't happen for quite some time - if we revert to the starting values as soon as the playhead goes backward past the tween's startTime, it will throw things off visually. Reversion should only happen in TimelineLite/Max instances where immediateRender was false (which is the default in the convenience methods like from()). 7144 } else if (dur !== 0) { 7145 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 TimelineLite or TimelineMax, 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. 7146 } 7147 } 7148 } else if (v.runBackwards && dur !== 0) { 7149 //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) 7150 if (startAt) { 7151 startAt.render(-1, true); 7152 startAt.kill(); 7153 this._startAt = null; 7154 } else { 7155 if (this._time !== 0) { //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 7156 immediate = false; 7157 } 7158 pt = {}; 7159 for (p in v) { //copy props into a new object and skip any reserved props, otherwise onComplete or onUpdate or onStart could fire. We should, however, permit autoCSS to go through. 7160 if (!_reservedProps[p] || p === "autoCSS") { 7161 pt[p] = v[p]; 7162 } 7163 } 7164 pt.overwrite = 0; 7165 pt.data = "isFromStart"; //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. 7166 pt.lazy = (immediate && v.lazy !== false); 7167 pt.immediateRender = immediate; //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) 7168 this._startAt = TweenLite.to(this.target, 0, pt); 7169 if (!immediate) { 7170 this._startAt._init(); //ensures that the initial values are recorded 7171 this._startAt._enabled(false); //no need to have the tween render on the next cycle. Disable it because we'll always manually control the renders of the _startAt tween. 7172 if (this.vars.immediateRender) { 7173 this._startAt = null; 7174 } 7175 } else if (this._time === 0) { 7176 return; 7177 } 7178 } 7179 } 7180 this._ease = ease = (!ease) ? TweenLite.defaultEase : (ease instanceof Ease) ? ease : (typeof(ease) === "function") ? new Ease(ease, v.easeParams) : _easeMap[ease] || TweenLite.defaultEase; 7181 if (v.easeParams instanceof Array && ease.config) { 7182 this._ease = ease.config.apply(ease, v.easeParams); 7183 } 7184 this._easeType = this._ease._type; 7185 this._easePower = this._ease._power; 7186 this._firstPT = null; 7187 7188 if (this._targets) { 7189 l = this._targets.length; 7190 for (i = 0; i < l; i++) { 7191 if ( this._initProps( this._targets[i], (this._propLookup[i] = {}), this._siblings[i], (op ? op[i] : null), i) ) { 7192 initPlugins = true; 7193 } 7194 } 7195 } else { 7196 initPlugins = this._initProps(this.target, this._propLookup, this._siblings, op, 0); 7197 } 7198 7199 if (initPlugins) { 7200 TweenLite._onPluginEvent("_onInitAllProps", this); //reorders the array in order of priority. Uses a static TweenPlugin method in order to minimize file size in TweenLite 7201 } 7202 if (op) if (!this._firstPT) if (typeof(this.target) !== "function") { //if all tweening properties have been overwritten, kill the tween. If the target is a function, it's probably a delayedCall so let it live. 7203 this._enabled(false, false); 7204 } 7205 if (v.runBackwards) { 7206 pt = this._firstPT; 7207 while (pt) { 7208 pt.s += pt.c; 7209 pt.c = -pt.c; 7210 pt = pt._next; 7211 } 7212 } 7213 this._onUpdate = v.onUpdate; 7214 this._initted = true; 7215 }; 7216 7217 p._initProps = function(target, propLookup, siblings, overwrittenProps, index) { 7218 var p, i, initPlugins, plugin, pt, v; 7219 if (target == null) { 7220 return false; 7221 } 7222 if (_lazyLookup[target._gsTweenID]) { 7223 _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) 7224 } 7225 7226 if (!this.vars.css) if (target.style) if (target !== window && target.nodeType) if (_plugins.css) if (this.vars.autoCSS !== false) { //it's so common to use TweenLite/Max to animate the css of DOM elements, we assume that if the target is a DOM element, that's what is intended (a convenience so that users don't have to wrap things in css:{}, although we still recommend it for a slight performance boost and better specificity). Note: we cannot check "nodeType" on the window inside an iframe. 7227 _autoCSS(this.vars, target); 7228 } 7229 for (p in this.vars) { 7230 v = this.vars[p]; 7231 if (_reservedProps[p]) { 7232 if (v) if ((v instanceof Array) || (v.push && _isArray(v))) if (v.join("").indexOf("{self}") !== -1) { 7233 this.vars[p] = v = this._swapSelfInParams(v, this); 7234 } 7235 7236 } else if (_plugins[p] && (plugin = new _plugins[p]())._onInitTween(target, this.vars[p], this, index)) { 7237 7238 //t - target [object] 7239 //p - property [string] 7240 //s - start [number] 7241 //c - change [number] 7242 //f - isFunction [boolean] 7243 //n - name [string] 7244 //pg - isPlugin [boolean] 7245 //pr - priority [number] 7246 //m - mod [function | 0] 7247 this._firstPT = pt = {_next:this._firstPT, t:plugin, p:"setRatio", s:0, c:1, f:1, n:p, pg:1, pr:plugin._priority, m:0}; 7248 i = plugin._overwriteProps.length; 7249 while (--i > -1) { 7250 propLookup[plugin._overwriteProps[i]] = this._firstPT; 7251 } 7252 if (plugin._priority || plugin._onInitAllProps) { 7253 initPlugins = true; 7254 } 7255 if (plugin._onDisable || plugin._onEnable) { 7256 this._notifyPluginsOfEnabled = true; 7257 } 7258 if (pt._next) { 7259 pt._next._prev = pt; 7260 } 7261 7262 } else { 7263 propLookup[p] = _addPropTween.call(this, target, p, "get", v, p, 0, null, this.vars.stringFilter, index); 7264 } 7265 } 7266 7267 if (overwrittenProps) if (this._kill(overwrittenProps, target)) { //another tween may have tried to overwrite properties of this tween before init() was called (like if two tweens start at the same time, the one created second will run first) 7268 return this._initProps(target, propLookup, siblings, overwrittenProps, index); 7269 } 7270 if (this._overwrite > 1) if (this._firstPT) if (siblings.length > 1) if (_applyOverwrite(target, this, propLookup, this._overwrite, siblings)) { 7271 this._kill(propLookup, target); 7272 return this._initProps(target, propLookup, siblings, overwrittenProps, index); 7273 } 7274 if (this._firstPT) if ((this.vars.lazy !== false && this._duration) || (this.vars.lazy && !this._duration)) { //zero duration tweens don't lazy render by default; everything else does. 7275 _lazyLookup[target._gsTweenID] = true; 7276 } 7277 return initPlugins; 7278 }; 7279 7280 p.render = function(time, suppressEvents, force) { 7281 var self = this, 7282 prevTime = self._time, 7283 duration = self._duration, 7284 prevRawPrevTime = self._rawPrevTime, 7285 isComplete, callback, pt, rawPrevTime; 7286 if (time >= duration - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 7287 self._totalTime = self._time = duration; 7288 self.ratio = self._ease._calcEnd ? self._ease.getRatio(1) : 1; 7289 if (!self._reversed ) { 7290 isComplete = true; 7291 callback = "onComplete"; 7292 force = (force || self._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 7293 } 7294 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 7295 if (self._startTime === self._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate. 7296 time = 0; 7297 } 7298 if (prevRawPrevTime < 0 || (time <= 0 && time >= -_tinyNum) || (prevRawPrevTime === _tinyNum && self.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause. 7299 force = true; 7300 if (prevRawPrevTime > _tinyNum) { 7301 callback = "onReverseComplete"; 7302 } 7303 } 7304 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //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. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 7305 } 7306 7307 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 7308 self._totalTime = self._time = 0; 7309 self.ratio = self._ease._calcEnd ? self._ease.getRatio(0) : 0; 7310 if (prevTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) { 7311 callback = "onReverseComplete"; 7312 isComplete = self._reversed; 7313 } 7314 if (time > -_tinyNum) { 7315 time = 0; 7316 } else if (time < 0) { 7317 self._active = false; 7318 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 7319 if (prevRawPrevTime >= 0 && !(prevRawPrevTime === _tinyNum && self.data === "isPause")) { 7320 force = true; 7321 } 7322 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //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. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 7323 } 7324 } 7325 if (!self._initted || (self._startAt && self._startAt.progress())) { //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. Also, we check progress() because if startAt has already rendered at its end, we should force a render at its beginning. Otherwise, if you put the playhead directly on top of where a fromTo({immediateRender:false}) starts, and then move it backwards, the from() won't revert its values. 7326 force = true; 7327 } 7328 } else { 7329 self._totalTime = self._time = time; 7330 7331 if (self._easeType) { 7332 var r = time / duration, type = self._easeType, pow = self._easePower; 7333 if (type === 1 || (type === 3 && r >= 0.5)) { 7334 r = 1 - r; 7335 } 7336 if (type === 3) { 7337 r *= 2; 7338 } 7339 if (pow === 1) { 7340 r *= r; 7341 } else if (pow === 2) { 7342 r *= r * r; 7343 } else if (pow === 3) { 7344 r *= r * r * r; 7345 } else if (pow === 4) { 7346 r *= r * r * r * r; 7347 } 7348 self.ratio = (type === 1) ? 1 - r : (type === 2) ? r : (time / duration < 0.5) ? r / 2 : 1 - (r / 2); 7349 } else { 7350 self.ratio = self._ease.getRatio(time / duration); 7351 } 7352 } 7353 7354 if (self._time === prevTime && !force) { 7355 return; 7356 } else if (!self._initted) { 7357 self._init(); 7358 if (!self._initted || self._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example. 7359 return; 7360 } else if (!force && self._firstPT && ((self.vars.lazy !== false && self._duration) || (self.vars.lazy && !self._duration))) { 7361 self._time = self._totalTime = prevTime; 7362 self._rawPrevTime = prevRawPrevTime; 7363 _lazyTweens.push(self); 7364 self._lazy = [time, suppressEvents]; 7365 return; 7366 } 7367 //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently. 7368 if (self._time && !isComplete) { 7369 self.ratio = self._ease.getRatio(self._time / duration); 7370 } else if (isComplete && self._ease._calcEnd) { 7371 self.ratio = self._ease.getRatio((self._time === 0) ? 0 : 1); 7372 } 7373 } 7374 if (self._lazy !== false) { //in case a lazy render is pending, we should flush it because the new render is occurring now (imagine a lazy tween instantiating and then immediately the user calls tween.seek(tween.duration()), skipping to the end - the end render would be forced, and then if we didn't flush the lazy render, it'd fire AFTER the seek(), rendering it at the wrong time. 7375 self._lazy = false; 7376 } 7377 if (!self._active) if (!self._paused && self._time !== prevTime && time >= 0) { 7378 self._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done. 7379 } 7380 if (prevTime === 0) { 7381 if (self._startAt) { 7382 if (time >= 0) { 7383 self._startAt.render(time, true, force); 7384 } else if (!callback) { 7385 callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area. 7386 } 7387 } 7388 if (self.vars.onStart) if (self._time !== 0 || duration === 0) if (!suppressEvents) { 7389 self._callback("onStart"); 7390 } 7391 } 7392 pt = self._firstPT; 7393 while (pt) { 7394 if (pt.f) { 7395 pt.t[pt.p](pt.c * self.ratio + pt.s); 7396 } else { 7397 pt.t[pt.p] = pt.c * self.ratio + pt.s; 7398 } 7399 pt = pt._next; 7400 } 7401 7402 if (self._onUpdate) { 7403 if (time < 0) if (self._startAt && time !== -0.0001) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values. 7404 self._startAt.render(time, true, 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. 7405 } 7406 if (!suppressEvents) if (self._time !== prevTime || isComplete || force) { 7407 self._callback("onUpdate"); 7408 } 7409 } 7410 if (callback) if (!self._gc || force) { //check _gc because there's a chance that kill() could be called in an onUpdate 7411 if (time < 0 && self._startAt && !self._onUpdate && time !== -0.0001) { //-0.0001 is a special value that we use when looping back to the beginning of a repeated TimelineMax, in which case we shouldn't render the _startAt values. 7412 self._startAt.render(time, true, force); 7413 } 7414 if (isComplete) { 7415 if (self._timeline.autoRemoveChildren) { 7416 self._enabled(false, false); 7417 } 7418 self._active = false; 7419 } 7420 if (!suppressEvents && self.vars[callback]) { 7421 self._callback(callback); 7422 } 7423 if (duration === 0 && self._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless. 7424 self._rawPrevTime = 0; 7425 } 7426 } 7427 }; 7428 7429 p._kill = function(vars, target, overwritingTween) { 7430 if (vars === "all") { 7431 vars = null; 7432 } 7433 if (vars == null) if (target == null || target === this.target) { 7434 this._lazy = false; 7435 return this._enabled(false, false); 7436 } 7437 target = (typeof(target) !== "string") ? (target || this._targets || this.target) : TweenLite.selector(target) || target; 7438 var simultaneousOverwrite = (overwritingTween && this._time && overwritingTween._startTime === this._startTime && this._timeline === overwritingTween._timeline), 7439 firstPT = this._firstPT, 7440 i, overwrittenProps, p, pt, propLookup, changed, killProps, record, killed; 7441 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") { 7442 i = target.length; 7443 while (--i > -1) { 7444 if (this._kill(vars, target[i], overwritingTween)) { 7445 changed = true; 7446 } 7447 } 7448 } else { 7449 if (this._targets) { 7450 i = this._targets.length; 7451 while (--i > -1) { 7452 if (target === this._targets[i]) { 7453 propLookup = this._propLookup[i] || {}; 7454 this._overwrittenProps = this._overwrittenProps || []; 7455 overwrittenProps = this._overwrittenProps[i] = vars ? this._overwrittenProps[i] || {} : "all"; 7456 break; 7457 } 7458 } 7459 } else if (target !== this.target) { 7460 return false; 7461 } else { 7462 propLookup = this._propLookup; 7463 overwrittenProps = this._overwrittenProps = vars ? this._overwrittenProps || {} : "all"; 7464 } 7465 7466 if (propLookup) { 7467 killProps = vars || propLookup; 7468 record = (vars !== overwrittenProps && overwrittenProps !== "all" && vars !== propLookup && (typeof(vars) !== "object" || !vars._tempKill)); //_tempKill is a super-secret way to delete a particular tweening property but NOT have it remembered as an official overwritten property (like in BezierPlugin) 7469 if (overwritingTween && (TweenLite.onOverwrite || this.vars.onOverwrite)) { 7470 for (p in killProps) { 7471 if (propLookup[p]) { 7472 if (!killed) { 7473 killed = []; 7474 } 7475 killed.push(p); 7476 } 7477 } 7478 if ((killed || !vars) && !_onOverwrite(this, overwritingTween, target, killed)) { //if the onOverwrite returned false, that means the user wants to override the overwriting (cancel it). 7479 return false; 7480 } 7481 } 7482 7483 for (p in killProps) { 7484 if ((pt = propLookup[p])) { 7485 if (simultaneousOverwrite) { //if another tween overwrites this one and they both start at exactly the same time, yet this tween has already rendered once (for example, at 0.001) because it's first in the queue, we should revert the values to where they were at 0 so that the starting values aren't contaminated on the overwriting tween. 7486 if (pt.f) { 7487 pt.t[pt.p](pt.s); 7488 } else { 7489 pt.t[pt.p] = pt.s; 7490 } 7491 changed = true; 7492 } 7493 if (pt.pg && pt.t._kill(killProps)) { 7494 changed = true; //some plugins need to be notified so they can perform cleanup tasks first 7495 } 7496 if (!pt.pg || pt.t._overwriteProps.length === 0) { 7497 if (pt._prev) { 7498 pt._prev._next = pt._next; 7499 } else if (pt === this._firstPT) { 7500 this._firstPT = pt._next; 7501 } 7502 if (pt._next) { 7503 pt._next._prev = pt._prev; 7504 } 7505 pt._next = pt._prev = null; 7506 } 7507 delete propLookup[p]; 7508 } 7509 if (record) { 7510 overwrittenProps[p] = 1; 7511 } 7512 } 7513 if (!this._firstPT && this._initted && firstPT) { //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. 7514 this._enabled(false, false); 7515 } 7516 } 7517 } 7518 return changed; 7519 }; 7520 7521 p.invalidate = function() { 7522 if (this._notifyPluginsOfEnabled) { 7523 TweenLite._onPluginEvent("_onDisable", this); 7524 } 7525 var t = this._time; 7526 this._firstPT = this._overwrittenProps = this._startAt = this._onUpdate = null; 7527 this._notifyPluginsOfEnabled = this._active = this._lazy = false; 7528 this._propLookup = (this._targets) ? {} : []; 7529 Animation.prototype.invalidate.call(this); 7530 if (this.vars.immediateRender) { 7531 this._time = -_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) 7532 this.render(t, false, this.vars.lazy !== false); 7533 } 7534 return this; 7535 }; 7536 7537 p._enabled = function(enabled, ignoreTimeline) { 7538 if (!_tickerActive) { 7539 _ticker.wake(); 7540 } 7541 if (enabled && this._gc) { 7542 var targets = this._targets, 7543 i; 7544 if (targets) { 7545 i = targets.length; 7546 while (--i > -1) { 7547 this._siblings[i] = _register(targets[i], this, true); 7548 } 7549 } else { 7550 this._siblings = _register(this.target, this, true); 7551 } 7552 } 7553 Animation.prototype._enabled.call(this, enabled, ignoreTimeline); 7554 if (this._notifyPluginsOfEnabled) if (this._firstPT) { 7555 return TweenLite._onPluginEvent((enabled ? "_onEnable" : "_onDisable"), this); 7556 } 7557 return false; 7558 }; 7559 7560 7561//----TweenLite static methods ----------------------------------------------------- 7562 7563 TweenLite.to = function(target, duration, vars) { 7564 return new TweenLite(target, duration, vars); 7565 }; 7566 7567 TweenLite.from = function(target, duration, vars) { 7568 vars.runBackwards = true; 7569 vars.immediateRender = (vars.immediateRender != false); 7570 return new TweenLite(target, duration, vars); 7571 }; 7572 7573 TweenLite.fromTo = function(target, duration, fromVars, toVars) { 7574 toVars.startAt = fromVars; 7575 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false); 7576 return new TweenLite(target, duration, toVars); 7577 }; 7578 7579 TweenLite.delayedCall = function(delay, callback, params, scope, useFrames) { 7580 return new TweenLite(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, lazy:false, useFrames:useFrames, overwrite:0}); 7581 }; 7582 7583 TweenLite.set = function(target, vars) { 7584 return new TweenLite(target, 0, vars); 7585 }; 7586 7587 TweenLite.getTweensOf = function(target, onlyActive) { 7588 if (target == null) { return []; } 7589 target = (typeof(target) !== "string") ? target : TweenLite.selector(target) || target; 7590 var i, a, j, t; 7591 if ((_isArray(target) || _isSelector(target)) && typeof(target[0]) !== "number") { 7592 i = target.length; 7593 a = []; 7594 while (--i > -1) { 7595 a = a.concat(TweenLite.getTweensOf(target[i], onlyActive)); 7596 } 7597 i = a.length; 7598 //now get rid of any duplicates (tweens of arrays of objects could cause duplicates) 7599 while (--i > -1) { 7600 t = a[i]; 7601 j = i; 7602 while (--j > -1) { 7603 if (t === a[j]) { 7604 a.splice(i, 1); 7605 } 7606 } 7607 } 7608 } else if (target._gsTweenID) { 7609 a = _register(target).concat(); 7610 i = a.length; 7611 while (--i > -1) { 7612 if (a[i]._gc || (onlyActive && !a[i].isActive())) { 7613 a.splice(i, 1); 7614 } 7615 } 7616 } 7617 return a || []; 7618 }; 7619 7620 TweenLite.killTweensOf = TweenLite.killDelayedCallsTo = function(target, onlyActive, vars) { 7621 if (typeof(onlyActive) === "object") { 7622 vars = onlyActive; //for backwards compatibility (before "onlyActive" parameter was inserted) 7623 onlyActive = false; 7624 } 7625 var a = TweenLite.getTweensOf(target, onlyActive), 7626 i = a.length; 7627 while (--i > -1) { 7628 a[i]._kill(vars, target); 7629 } 7630 }; 7631 7632 7633 7634/* 7635 * ---------------------------------------------------------------- 7636 * TweenPlugin (could easily be split out as a separate file/class, but included for ease of use (so that people don't need to include another script call before loading plugins which is easy to forget) 7637 * ---------------------------------------------------------------- 7638 */ 7639 var TweenPlugin = _class("plugins.TweenPlugin", function(props, priority) { 7640 this._overwriteProps = (props || "").split(","); 7641 this._propName = this._overwriteProps[0]; 7642 this._priority = priority || 0; 7643 this._super = TweenPlugin.prototype; 7644 }, true); 7645 7646 p = TweenPlugin.prototype; 7647 TweenPlugin.version = "1.19.0"; 7648 TweenPlugin.API = 2; 7649 p._firstPT = null; 7650 p._addTween = _addPropTween; 7651 p.setRatio = _setRatio; 7652 7653 p._kill = function(lookup) { 7654 var a = this._overwriteProps, 7655 pt = this._firstPT, 7656 i; 7657 if (lookup[this._propName] != null) { 7658 this._overwriteProps = []; 7659 } else { 7660 i = a.length; 7661 while (--i > -1) { 7662 if (lookup[a[i]] != null) { 7663 a.splice(i, 1); 7664 } 7665 } 7666 } 7667 while (pt) { 7668 if (lookup[pt.n] != null) { 7669 if (pt._next) { 7670 pt._next._prev = pt._prev; 7671 } 7672 if (pt._prev) { 7673 pt._prev._next = pt._next; 7674 pt._prev = null; 7675 } else if (this._firstPT === pt) { 7676 this._firstPT = pt._next; 7677 } 7678 } 7679 pt = pt._next; 7680 } 7681 return false; 7682 }; 7683 7684 p._mod = p._roundProps = function(lookup) { 7685 var pt = this._firstPT, 7686 val; 7687 while (pt) { 7688 val = lookup[this._propName] || (pt.n != null && lookup[ pt.n.split(this._propName + "_").join("") ]); 7689 if (val && typeof(val) === "function") { //some properties that are very plugin-specific add a prefix named after the _propName plus an underscore, so we need to ignore that extra stuff here. 7690 if (pt.f === 2) { 7691 pt.t._applyPT.m = val; 7692 } else { 7693 pt.m = val; 7694 } 7695 } 7696 pt = pt._next; 7697 } 7698 }; 7699 7700 TweenLite._onPluginEvent = function(type, tween) { 7701 var pt = tween._firstPT, 7702 changed, pt2, first, last, next; 7703 if (type === "_onInitAllProps") { 7704 //sorts the PropTween linked list in order of priority because some plugins need to render earlier/later than others, like MotionBlurPlugin applies its effects after all x/y/alpha tweens have rendered on each frame. 7705 while (pt) { 7706 next = pt._next; 7707 pt2 = first; 7708 while (pt2 && pt2.pr > pt.pr) { 7709 pt2 = pt2._next; 7710 } 7711 if ((pt._prev = pt2 ? pt2._prev : last)) { 7712 pt._prev._next = pt; 7713 } else { 7714 first = pt; 7715 } 7716 if ((pt._next = pt2)) { 7717 pt2._prev = pt; 7718 } else { 7719 last = pt; 7720 } 7721 pt = next; 7722 } 7723 pt = tween._firstPT = first; 7724 } 7725 while (pt) { 7726 if (pt.pg) if (typeof(pt.t[type]) === "function") if (pt.t[type]()) { 7727 changed = true; 7728 } 7729 pt = pt._next; 7730 } 7731 return changed; 7732 }; 7733 7734 TweenPlugin.activate = function(plugins) { 7735 var i = plugins.length; 7736 while (--i > -1) { 7737 if (plugins[i].API === TweenPlugin.API) { 7738 _plugins[(new plugins[i]())._propName] = plugins[i]; 7739 } 7740 } 7741 return true; 7742 }; 7743 7744 //provides a more concise way to define plugins that have no dependencies besides TweenPlugin and TweenLite, wrapping common boilerplate stuff into one function (added in 1.9.0). You don't NEED to use this to define a plugin - the old way still works and can be useful in certain (rare) situations. 7745 _gsDefine.plugin = function(config) { 7746 if (!config || !config.propName || !config.init || !config.API) { throw "illegal plugin definition."; } 7747 var propName = config.propName, 7748 priority = config.priority || 0, 7749 overwriteProps = config.overwriteProps, 7750 map = {init:"_onInitTween", set:"setRatio", kill:"_kill", round:"_mod", mod:"_mod", initAll:"_onInitAllProps"}, 7751 Plugin = _class("plugins." + propName.charAt(0).toUpperCase() + propName.substr(1) + "Plugin", 7752 function() { 7753 TweenPlugin.call(this, propName, priority); 7754 this._overwriteProps = overwriteProps || []; 7755 }, (config.global === true)), 7756 p = Plugin.prototype = new TweenPlugin(propName), 7757 prop; 7758 p.constructor = Plugin; 7759 Plugin.API = config.API; 7760 for (prop in map) { 7761 if (typeof(config[prop]) === "function") { 7762 p[map[prop]] = config[prop]; 7763 } 7764 } 7765 Plugin.version = config.version; 7766 TweenPlugin.activate([Plugin]); 7767 return Plugin; 7768 }; 7769 7770 7771 //now run through all the dependencies discovered and if any are missing, log that to the console as a warning. This is why it's best to have TweenLite load last - it can check all the dependencies for you. 7772 a = window._gsQueue; 7773 if (a) { 7774 for (i = 0; i < a.length; i++) { 7775 a[i](); 7776 } 7777 for (p in _defLookup) { 7778 if (!_defLookup[p].func) { 7779 window.console.log("GSAP encountered missing dependency: " + p); 7780 } 7781 } 7782 } 7783 7784 _tickerActive = false; //ensures that the first official animation forces a ticker.tick() to update the time when it is instantiated 7785 7786 return TweenLite; 7787 7788})(_gsScope, "TweenLite"); 7789 7790var globals = _gsScope.GreenSockGlobals; 7791var nonGlobals = globals.com.greensock; 7792 7793var SimpleTimeline = nonGlobals.core.SimpleTimeline; 7794var Animation = nonGlobals.core.Animation; 7795var Ease = globals.Ease; 7796var Linear = globals.Linear; 7797var Power0 = Linear; 7798var Power1 = globals.Power1; 7799var Power2 = globals.Power2; 7800var Power3 = globals.Power3; 7801var Power4 = globals.Power4; 7802var TweenPlugin = globals.TweenPlugin; 7803var EventDispatcher = nonGlobals.events.EventDispatcher; 7804 7805/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/harmony-module.js */ "../../../../../node_modules/webpack/buildin/harmony-module.js")(module), __webpack_require__(/*! ./../webpack/buildin/global.js */ "../../../../../node_modules/webpack/buildin/global.js"))) 7806 7807/***/ }), 7808
vendor: 8,739 bytes, lines 7809-7915
7809/***/ "../../../../../node_modules/gsap/TweenMax.js": 7810/*!************************************************************************!*\ 7811 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/TweenMax.js ***! 7812 \************************************************************************/ 7813/*! exports provided: TweenMax, default, TweenLite, TimelineLite, TimelineMax, CSSPlugin, AttrPlugin, BezierPlugin, DirectionalRotationPlugin, RoundPropsPlugin, TweenPlugin, Ease, Power0, Power1, Power2, Power3, Power4, Linear, Back, Elastic, Bounce, RoughEase, SlowMo, SteppedEase, Circ, Expo, Sine, ExpoScaleEase */ 7814/***/ (function(module, __webpack_exports__, __webpack_require__) { 7815 7816"use strict"; 7817__webpack_require__.r(__webpack_exports__); 7818/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return TweenMax; }); 7819/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TweenMax; }); 7820/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 7821/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); 7822 7823/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenPlugin", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["TweenPlugin"]; }); 7824 7825/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ease", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"]; }); 7826 7827/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power0"]; }); 7828 7829/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power1"]; }); 7830 7831/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power2"]; }); 7832 7833/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power3"]; }); 7834 7835/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power4"]; }); 7836 7837/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Linear"]; }); 7838 7839/* harmony import */ var _TweenMaxBase_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TweenMaxBase.js */ "../../../../../node_modules/gsap/TweenMaxBase.js"); 7840/* harmony import */ var _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./CSSPlugin.js */ "../../../../../node_modules/gsap/CSSPlugin.js"); 7841/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); 7842 7843/* harmony import */ var _AttrPlugin_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AttrPlugin.js */ "../../../../../node_modules/gsap/AttrPlugin.js"); 7844/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AttrPlugin", function() { return _AttrPlugin_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); 7845 7846/* harmony import */ var _RoundPropsPlugin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./RoundPropsPlugin.js */ "../../../../../node_modules/gsap/RoundPropsPlugin.js"); 7847/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RoundPropsPlugin", function() { return _RoundPropsPlugin_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); 7848 7849/* harmony import */ var _DirectionalRotationPlugin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DirectionalRotationPlugin.js */ "../../../../../node_modules/gsap/DirectionalRotationPlugin.js"); 7850/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DirectionalRotationPlugin", function() { return _DirectionalRotationPlugin_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); 7851 7852/* harmony import */ var _TimelineLite_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./TimelineLite.js */ "../../../../../node_modules/gsap/TimelineLite.js"); 7853/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return _TimelineLite_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); 7854 7855/* harmony import */ var _TimelineMax_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./TimelineMax.js */ "../../../../../node_modules/gsap/TimelineMax.js"); 7856/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return _TimelineMax_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); 7857 7858/* harmony import */ var _BezierPlugin_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BezierPlugin.js */ "../../../../../node_modules/gsap/BezierPlugin.js"); 7859/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BezierPlugin", function() { return _BezierPlugin_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); 7860 7861/* harmony import */ var _EasePack_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./EasePack.js */ "../../../../../node_modules/gsap/EasePack.js"); 7862/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Back"]; }); 7863 7864/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Elastic"]; }); 7865 7866/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Bounce"]; }); 7867 7868/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RoughEase", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["RoughEase"]; }); 7869 7870/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SlowMo", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["SlowMo"]; }); 7871 7872/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["SteppedEase"]; }); 7873 7874/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Circ"]; }); 7875 7876/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Expo"]; }); 7877 7878/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Sine"]; }); 7879 7880/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpoScaleEase", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["ExpoScaleEase"]; }); 7881 7882/*! 7883 * VERSION: 2.1.3 7884 * DATE: 2019-05-17 7885 * UPDATES AND DOCS AT: http://greensock.com 7886 * 7887 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 7888 * This work is subject to the terms at http://greensock.com/standard-license or for 7889 * Club GreenSock members, the software agreement that was issued with your membership. 7890 * 7891 * @author: Jack Doyle, [email protected] 7892 **/ 7893/* eslint-disable */ 7894 7895 7896 7897 7898 7899 7900 7901 7902 7903 7904 7905 7906//the following two lines are designed to prevent tree shaking of the classes that were historically included with TweenMax (otherwise, folks would have to reference CSSPlugin, for example, to ensure their CSS-related animations worked) 7907var TweenMax = _TweenMaxBase_js__WEBPACK_IMPORTED_MODULE_1__["default"]; 7908TweenMax._autoActivated = [_TimelineLite_js__WEBPACK_IMPORTED_MODULE_6__["default"], _TimelineMax_js__WEBPACK_IMPORTED_MODULE_7__["default"], _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_2__["default"], _AttrPlugin_js__WEBPACK_IMPORTED_MODULE_3__["default"], _BezierPlugin_js__WEBPACK_IMPORTED_MODULE_8__["default"], _RoundPropsPlugin_js__WEBPACK_IMPORTED_MODULE_4__["default"], _DirectionalRotationPlugin_js__WEBPACK_IMPORTED_MODULE_5__["default"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Back"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Elastic"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Bounce"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["RoughEase"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["SlowMo"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["SteppedEase"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Circ"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Expo"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Sine"], _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["ExpoScaleEase"]]; 7909 7910 7911 7912 7913 7914/***/ }), 7915
vendor: 36,025 bytes, lines 7916-8620
7916/***/ "../../../../../node_modules/gsap/TweenMaxBase.js": 7917/*!****************************************************************************!*\ 7918 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/TweenMaxBase.js ***! 7919 \****************************************************************************/ 7920/*! exports provided: TweenMax, TweenMaxBase, default, TweenLite, Ease, Power0, Power1, Power2, Power3, Power4, Linear */ 7921/***/ (function(module, __webpack_exports__, __webpack_require__) { 7922 7923"use strict"; 7924__webpack_require__.r(__webpack_exports__); 7925/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return TweenMax; }); 7926/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "TweenMaxBase", function() { return TweenMaxBase; }); 7927/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return TweenMax; }); 7928/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 7929/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); 7930 7931/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ease", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"]; }); 7932 7933/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power0"]; }); 7934 7935/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power1"]; }); 7936 7937/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power2"]; }); 7938 7939/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power3"]; }); 7940 7941/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power4"]; }); 7942 7943/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Linear"]; }); 7944 7945/*! 7946 * VERSION: 2.1.3 7947 * DATE: 2019-05-17 7948 * UPDATES AND DOCS AT: http://greensock.com 7949 * 7950 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 7951 * This work is subject to the terms at http://greensock.com/standard-license or for 7952 * Club GreenSock members, the software agreement that was issued with your membership. 7953 * 7954 * @author: Jack Doyle, [email protected] 7955 **/ 7956/* eslint-disable */ 7957 7958 7959 7960 7961_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]._gsDefine("TweenMax", ["core.Animation","core.SimpleTimeline","TweenLite"], function() { 7962 7963 var _slice = function(a) { //don't use [].slice because that doesn't work in IE8 with a NodeList that's returned by querySelectorAll() 7964 var b = [], 7965 l = a.length, 7966 i; 7967 for (i = 0; i !== l; b.push(a[i++])); 7968 return b; 7969 }, 7970 _applyCycle = function(vars, targets, i) { 7971 var alt = vars.cycle, 7972 p, val; 7973 for (p in alt) { 7974 val = alt[p]; 7975 vars[p] = (typeof(val) === "function") ? val(i, targets[i], targets) : val[i % val.length]; 7976 } 7977 delete vars.cycle; 7978 }, 7979 //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 7980 _distribute = function(v) { 7981 if (typeof(v) === "function") { 7982 return v; 7983 } 7984 var vars = (typeof(v) === "object") ? v : {each:v}, //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. 7985 ease = vars.ease, 7986 from = vars.from || 0, 7987 base = vars.base || 0, 7988 cache = {}, 7989 isFromKeyword = isNaN(from), 7990 axis = vars.axis, 7991 ratio = {center:0.5, end:1}[from] || 0; 7992 return function(i, target, a) { 7993 var l = (a || vars).length, 7994 distances = cache[l], 7995 originX, originY, x, y, d, j, max, min, wrap; 7996 if (!distances) { 7997 wrap = (vars.grid === "auto") ? 0 : (vars.grid || [Infinity])[0]; 7998 if (!wrap) { 7999 max = -Infinity; 8000 while (max < (max = a[wrap++].getBoundingClientRect().left) && wrap < l) { } 8001 wrap--; 8002 } 8003 distances = cache[l] = []; 8004 originX = isFromKeyword ? (Math.min(wrap, l) * ratio) - 0.5 : from % wrap; 8005 originY = isFromKeyword ? l * ratio / wrap - 0.5 : (from / wrap) | 0; 8006 max = 0; 8007 min = Infinity; 8008 for (j = 0; j < l; j++) { 8009 x = (j % wrap) - originX; 8010 y = originY - ((j / wrap) | 0); 8011 distances[j] = d = !axis ? Math.sqrt(x * x + y * y) : Math.abs((axis === "y") ? y : x); 8012 if (d > max) { 8013 max = d; 8014 } 8015 if (d < min) { 8016 min = d; 8017 } 8018 } 8019 distances.max = max - min; 8020 distances.min = min; 8021 distances.v = l = vars.amount || (vars.each * (wrap > l ? l - 1 : !axis ? Math.max(wrap, l / wrap) : axis === "y" ? l / wrap : wrap)) || 0; 8022 distances.b = (l < 0) ? base - l : base; 8023 } 8024 l = (distances[i] - distances.min) / distances.max; 8025 return distances.b + (ease ? ease.getRatio(l) : l) * distances.v; 8026 }; 8027 }, 8028 TweenMax = function(target, duration, vars) { 8029 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].call(this, target, duration, vars); 8030 this._cycle = 0; 8031 this._yoyo = (this.vars.yoyo === true || !!this.vars.yoyoEase); 8032 this._repeat = this.vars.repeat || 0; 8033 this._repeatDelay = this.vars.repeatDelay || 0; 8034 if (this._repeat) { 8035 this._uncache(true); //ensures that if there is any repeat, the totalDuration will get recalculated to accurately report it. 8036 } 8037 this.render = TweenMax.prototype.render; //speed optimization (avoid prototype lookup on this "hot" method) 8038 }, 8039 _tinyNum = 0.00000001, 8040 TweenLiteInternals = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]._internals, 8041 _isSelector = TweenLiteInternals.isSelector, 8042 _isArray = TweenLiteInternals.isArray, 8043 p = TweenMax.prototype = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].to({}, 0.1, {}), 8044 _blankArray = []; 8045 8046 TweenMax.version = "2.1.3"; 8047 p.constructor = TweenMax; 8048 p.kill()._gc = false; 8049 TweenMax.killTweensOf = TweenMax.killDelayedCallsTo = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].killTweensOf; 8050 TweenMax.getTweensOf = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].getTweensOf; 8051 TweenMax.lagSmoothing = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].lagSmoothing; 8052 TweenMax.ticker = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].ticker; 8053 TweenMax.render = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].render; 8054 TweenMax.distribute = _distribute; 8055 8056 p.invalidate = function() { 8057 this._yoyo = (this.vars.yoyo === true || !!this.vars.yoyoEase); 8058 this._repeat = this.vars.repeat || 0; 8059 this._repeatDelay = this.vars.repeatDelay || 0; 8060 this._yoyoEase = null; 8061 this._uncache(true); 8062 return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].prototype.invalidate.call(this); 8063 }; 8064 8065 p.updateTo = function(vars, resetDuration) { 8066 var self = this, 8067 curRatio = self.ratio, 8068 immediate = self.vars.immediateRender || vars.immediateRender, 8069 p; 8070 if (resetDuration && self._startTime < self._timeline._time) { 8071 self._startTime = self._timeline._time; 8072 self._uncache(false); 8073 if (self._gc) { 8074 self._enabled(true, false); 8075 } else { 8076 self._timeline.insert(self, self._startTime - self._delay); //ensures that any necessary re-sequencing of Animations in the timeline occurs to make sure the rendering order is correct. 8077 } 8078 } 8079 for (p in vars) { 8080 self.vars[p] = vars[p]; 8081 } 8082 if (self._initted || immediate) { 8083 if (resetDuration) { 8084 self._initted = false; 8085 if (immediate) { 8086 self.render(0, true, true); 8087 } 8088 } else { 8089 if (self._gc) { 8090 self._enabled(true, false); 8091 } 8092 if (self._notifyPluginsOfEnabled && self._firstPT) { 8093 _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]._onPluginEvent("_onDisable", self); //in case a plugin like MotionBlur must perform some cleanup tasks 8094 } 8095 if (self._time / self._duration > 0.998) { //if the tween has finished (or come extremely close to finishing), we just need to rewind it to 0 and then render it again at the end which forces it to re-initialize (parsing the new vars). We allow tweens that are close to finishing (but haven't quite finished) to work this way too because otherwise, the values are so small when determining where to project the starting values that binary math issues creep in and can make the tween appear to render incorrectly when run backwards. 8096 var prevTime = self._totalTime; 8097 self.render(0, true, false); 8098 self._initted = false; 8099 self.render(prevTime, true, false); 8100 } else { 8101 self._initted = false; 8102 self._init(); 8103 if (self._time > 0 || immediate) { 8104 var inv = 1 / (1 - curRatio), 8105 pt = self._firstPT, endValue; 8106 while (pt) { 8107 endValue = pt.s + pt.c; 8108 pt.c *= inv; 8109 pt.s = endValue - pt.c; 8110 pt = pt._next; 8111 } 8112 } 8113 } 8114 } 8115 } 8116 return self; 8117 }; 8118 8119 p.render = function(time, suppressEvents, force) { 8120 if (!this._initted) if (this._duration === 0 && this.vars.repeat) { //zero duration tweens that render immediately have render() called from TweenLite's constructor, before TweenMax's constructor has finished setting _repeat, _repeatDelay, and _yoyo which are critical in determining totalDuration() so we need to call invalidate() which is a low-kb way to get those set properly. 8121 this.invalidate(); 8122 } 8123 var self = this, 8124 totalDur = (!self._dirty) ? self._totalDuration : self.totalDuration(), 8125 prevTime = self._time, 8126 prevTotalTime = self._totalTime, 8127 prevCycle = self._cycle, 8128 duration = self._duration, 8129 prevRawPrevTime = self._rawPrevTime, 8130 isComplete, callback, pt, cycleDuration, r, type, pow, rawPrevTime, yoyoEase; 8131 if (time >= totalDur - _tinyNum && time >= 0) { //to work around occasional floating point math artifacts. 8132 self._totalTime = totalDur; 8133 self._cycle = self._repeat; 8134 if (self._yoyo && (self._cycle & 1) !== 0) { 8135 self._time = 0; 8136 self.ratio = self._ease._calcEnd ? self._ease.getRatio(0) : 0; 8137 } else { 8138 self._time = duration; 8139 self.ratio = self._ease._calcEnd ? self._ease.getRatio(1) : 1; 8140 } 8141 if (!self._reversed) { 8142 isComplete = true; 8143 callback = "onComplete"; 8144 force = (force || self._timeline.autoRemoveChildren); //otherwise, if the animation is unpaused/activated after it's already finished, it doesn't get removed from the parent timeline. 8145 } 8146 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 8147 if (self._startTime === self._timeline._duration) { //if a zero-duration tween is at the VERY end of a timeline and that timeline renders at its end, it will typically add a tiny bit of cushion to the render time to prevent rounding errors from getting in the way of tweens rendering their VERY end. If we then reverse() that timeline, the zero-duration tween will trigger its onReverseComplete even though technically the playhead didn't pass over it again. It's a very specific edge case we must accommodate. 8148 time = 0; 8149 } 8150 if (prevRawPrevTime < 0 || (time <= 0 && time >= -_tinyNum) || (prevRawPrevTime === _tinyNum && self.data !== "isPause")) if (prevRawPrevTime !== time) { //note: when this.data is "isPause", it's a callback added by addPause() on a timeline that we should not be triggered when LEAVING its exact start time. In other words, tl.addPause(1).play(1) shouldn't pause. 8151 force = true; 8152 if (prevRawPrevTime > _tinyNum) { 8153 callback = "onReverseComplete"; 8154 } 8155 } 8156 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //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. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 8157 } 8158 8159 } else if (time < _tinyNum) { //to work around occasional floating point math artifacts, round super small values to 0. 8160 self._totalTime = self._time = self._cycle = 0; 8161 self.ratio = self._ease._calcEnd ? self._ease.getRatio(0) : 0; 8162 if (prevTotalTime !== 0 || (duration === 0 && prevRawPrevTime > 0)) { 8163 callback = "onReverseComplete"; 8164 isComplete = self._reversed; 8165 } 8166 if (time > -_tinyNum) { 8167 time = 0; 8168 } else if (time < 0) { 8169 self._active = false; 8170 if (duration === 0) if (self._initted || !self.vars.lazy || force) { //zero-duration tweens are tricky because we must discern the momentum/direction of time in order to determine whether the starting values should be rendered or the ending values. If the "playhead" of its timeline goes past the zero-duration tween in the forward direction or lands directly on it, the end values should be rendered, but if the timeline's "playhead" moves past it in the backward direction (from a postitive time to a negative time), the starting values must be rendered. 8171 if (prevRawPrevTime >= 0) { 8172 force = true; 8173 } 8174 self._rawPrevTime = rawPrevTime = (!suppressEvents || time || prevRawPrevTime === time) ? time : _tinyNum; //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. We set the _rawPrevTime to be a precise tiny number to indicate this scenario rather than using another property/variable which would increase memory usage. This technique is less readable, but more efficient. 8175 } 8176 } 8177 if (!self._initted) { //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. 8178 force = true; 8179 } 8180 } else { 8181 self._totalTime = self._time = time; 8182 if (self._repeat !== 0) { 8183 cycleDuration = duration + self._repeatDelay; 8184 self._cycle = (self._totalTime / cycleDuration) >> 0; //originally _totalTime % cycleDuration but floating point errors caused problems, so I normalized it. (4 % 0.8 should be 0 but some browsers report it as 0.79999999!) 8185 if (self._cycle !== 0) if (self._cycle === self._totalTime / cycleDuration && prevTotalTime <= time) { 8186 self._cycle--; //otherwise when rendered exactly at the end time, it will act as though it is repeating (at the beginning) 8187 } 8188 self._time = self._totalTime - (self._cycle * cycleDuration); 8189 if (self._yoyo) if ((self._cycle & 1) !== 0) { 8190 self._time = duration - self._time; 8191 yoyoEase = self._yoyoEase || self.vars.yoyoEase; //note: we don't set this._yoyoEase in _init() like we do other properties because it's TweenMax-specific and doing it here allows us to optimize performance (most tweens don't have a yoyoEase). Note that we also must skip the this.ratio calculation further down right after we _init() in this function, because we're doing it here. 8192 if (yoyoEase) { 8193 if (!self._yoyoEase) { 8194 if (yoyoEase === true && !self._initted) { //if it's not initted and yoyoEase is true, this._ease won't have been populated yet so we must discern it here. 8195 yoyoEase = self.vars.ease; 8196 self._yoyoEase = yoyoEase = !yoyoEase ? _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].defaultEase : (yoyoEase instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"]) ? yoyoEase : (typeof(yoyoEase) === "function") ? new _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"](yoyoEase, self.vars.easeParams) : _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"].map[yoyoEase] || _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].defaultEase; 8197 } else { 8198 self._yoyoEase = yoyoEase = (yoyoEase === true) ? self._ease : (yoyoEase instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"]) ? yoyoEase : _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"].map[yoyoEase]; 8199 } 8200 } 8201 self.ratio = yoyoEase ? 1 - yoyoEase.getRatio((duration - self._time) / duration) : 0; 8202 } 8203 } 8204 if (self._time > duration) { 8205 self._time = duration; 8206 } else if (self._time < 0) { 8207 self._time = 0; 8208 } 8209 } 8210 if (self._easeType && !yoyoEase) { 8211 r = self._time / duration; 8212 type = self._easeType; 8213 pow = self._easePower; 8214 if (type === 1 || (type === 3 && r >= 0.5)) { 8215 r = 1 - r; 8216 } 8217 if (type === 3) { 8218 r *= 2; 8219 } 8220 if (pow === 1) { 8221 r *= r; 8222 } else if (pow === 2) { 8223 r *= r * r; 8224 } else if (pow === 3) { 8225 r *= r * r * r; 8226 } else if (pow === 4) { 8227 r *= r * r * r * r; 8228 } 8229 self.ratio = (type === 1) ? 1 - r : (type === 2) ? r : (self._time / duration < 0.5) ? r / 2 : 1 - (r / 2); 8230 8231 } else if (!yoyoEase) { 8232 self.ratio = self._ease.getRatio(self._time / duration); 8233 } 8234 8235 } 8236 8237 if (prevTime === self._time && !force && prevCycle === self._cycle) { 8238 if (prevTotalTime !== self._totalTime) if (self._onUpdate) if (!suppressEvents) { //so that onUpdate fires even during the repeatDelay - as long as the totalTime changed, we should trigger onUpdate. 8239 self._callback("onUpdate"); 8240 } 8241 return; 8242 } else if (!self._initted) { 8243 self._init(); 8244 if (!self._initted || self._gc) { //immediateRender tweens typically won't initialize until the playhead advances (_time is greater than 0) in order to ensure that overwriting occurs properly. Also, if all of the tweening properties have been overwritten (which would cause _gc to be true, as set in _init()), we shouldn't continue otherwise an onStart callback could be called for example. 8245 return; 8246 } else if (!force && self._firstPT && ((self.vars.lazy !== false && self._duration) || (self.vars.lazy && !self._duration))) { //we stick it in the queue for rendering at the very end of the tick - this is a performance optimization because browsers invalidate styles and force a recalculation if you read, write, and then read style data (so it's better to read/read/read/write/write/write than read/write/read/write/read/write). The down side, of course, is that usually you WANT things to render immediately because you may have code running right after that which depends on the change. Like imagine running TweenLite.set(...) and then immediately after that, creating a nother tween that animates the same property to another value; the starting values of that 2nd tween wouldn't be accurate if lazy is true. 8247 self._time = prevTime; 8248 self._totalTime = prevTotalTime; 8249 self._rawPrevTime = prevRawPrevTime; 8250 self._cycle = prevCycle; 8251 TweenLiteInternals.lazyTweens.push(self); 8252 self._lazy = [time, suppressEvents]; 8253 return; 8254 } 8255 //_ease is initially set to defaultEase, so now that init() has run, _ease is set properly and we need to recalculate the ratio. Overall this is faster than using conditional logic earlier in the method to avoid having to set ratio twice because we only init() once but renderTime() gets called VERY frequently. 8256 if (self._time && !isComplete && !yoyoEase) { 8257 self.ratio = self._ease.getRatio(self._time / duration); 8258 } else if (isComplete && this._ease._calcEnd && !yoyoEase) { 8259 self.ratio = self._ease.getRatio((self._time === 0) ? 0 : 1); 8260 } 8261 } 8262 if (self._lazy !== false) { 8263 self._lazy = false; 8264 } 8265 8266 if (!self._active) if (!self._paused && self._time !== prevTime && time >= 0) { 8267 self._active = true; //so that if the user renders a tween (as opposed to the timeline rendering it), the timeline is forced to re-render and align it with the proper time/frame on the next rendering cycle. Maybe the tween already finished but the user manually re-renders it as halfway done. 8268 } 8269 if (prevTotalTime === 0) { 8270 if (self._initted === 2 && time > 0) { 8271 self._init(); //will just apply overwriting since _initted of (2) means it was a from() tween that had immediateRender:true 8272 } 8273 if (self._startAt) { 8274 if (time >= 0) { 8275 self._startAt.render(time, true, force); 8276 } else if (!callback) { 8277 callback = "_dummyGS"; //if no callback is defined, use a dummy value just so that the condition at the end evaluates as true because _startAt should render AFTER the normal render loop when the time is negative. We could handle this in a more intuitive way, of course, but the render loop is the MOST important thing to optimize, so this technique allows us to avoid adding extra conditional logic in a high-frequency area. 8278 } 8279 } 8280 if (self.vars.onStart) if (self._totalTime !== 0 || duration === 0) if (!suppressEvents) { 8281 self._callback("onStart"); 8282 } 8283 } 8284 8285 pt = self._firstPT; 8286 while (pt) { 8287 if (pt.f) { 8288 pt.t[pt.p](pt.c * self.ratio + pt.s); 8289 } else { 8290 pt.t[pt.p] = pt.c * self.ratio + pt.s; 8291 } 8292 pt = pt._next; 8293 } 8294 8295 if (self._onUpdate) { 8296 if (time < 0) if (self._startAt && self._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values. 8297 self._startAt.render(time, true, 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. 8298 } 8299 if (!suppressEvents) if (self._totalTime !== prevTotalTime || callback) { 8300 self._callback("onUpdate"); 8301 } 8302 } 8303 if (self._cycle !== prevCycle) if (!suppressEvents) if (!self._gc) if (self.vars.onRepeat) { 8304 self._callback("onRepeat"); 8305 } 8306 if (callback) if (!self._gc || force) { //check gc because there's a chance that kill() could be called in an onUpdate 8307 if (time < 0 && self._startAt && !self._onUpdate && self._startTime) { //if the tween is positioned at the VERY beginning (_startTime 0) of its parent timeline, it's illegal for the playhead to go back further, so we should not render the recorded startAt values. 8308 self._startAt.render(time, true, force); 8309 } 8310 if (isComplete) { 8311 if (self._timeline.autoRemoveChildren) { 8312 self._enabled(false, false); 8313 } 8314 self._active = false; 8315 } 8316 if (!suppressEvents && self.vars[callback]) { 8317 self._callback(callback); 8318 } 8319 if (duration === 0 && self._rawPrevTime === _tinyNum && rawPrevTime !== _tinyNum) { //the onComplete or onReverseComplete could trigger movement of the playhead and for zero-duration tweens (which must discern direction) that land directly back on their start time, we don't want to fire again on the next render. Think of several addPause()'s in a timeline that forces the playhead to a certain spot, but what if it's already paused and another tween is tweening the "time" of the timeline? Each time it moves [forward] past that spot, it would move back, and since suppressEvents is true, it'd reset _rawPrevTime to _tinyNum so that when it begins again, the callback would fire (so ultimately it could bounce back and forth during that tween). Again, this is a very uncommon scenario, but possible nonetheless. 8320 self._rawPrevTime = 0; 8321 } 8322 } 8323 }; 8324 8325//---- STATIC FUNCTIONS ----------------------------------------------------------------------------------------------------------- 8326 8327 TweenMax.to = function(target, duration, vars) { 8328 return new TweenMax(target, duration, vars); 8329 }; 8330 8331 TweenMax.from = function(target, duration, vars) { 8332 vars.runBackwards = true; 8333 vars.immediateRender = (vars.immediateRender != false); 8334 return new TweenMax(target, duration, vars); 8335 }; 8336 8337 TweenMax.fromTo = function(target, duration, fromVars, toVars) { 8338 toVars.startAt = fromVars; 8339 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false); 8340 return new TweenMax(target, duration, toVars); 8341 }; 8342 8343 TweenMax.staggerTo = TweenMax.allTo = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 8344 var a = [], 8345 staggerFunc = _distribute(vars.stagger || stagger), 8346 cycle = vars.cycle, 8347 fromCycle = (vars.startAt || _blankArray).cycle, 8348 l, copy, i, p; 8349 if (!_isArray(targets)) { 8350 if (typeof(targets) === "string") { 8351 targets = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].selector(targets) || targets; 8352 } 8353 if (_isSelector(targets)) { 8354 targets = _slice(targets); 8355 } 8356 } 8357 targets = targets || []; 8358 l = targets.length - 1; 8359 for (i = 0; i <= l; i++) { 8360 copy = {}; 8361 for (p in vars) { 8362 copy[p] = vars[p]; 8363 } 8364 if (cycle) { 8365 _applyCycle(copy, targets, i); 8366 if (copy.duration != null) { 8367 duration = copy.duration; 8368 delete copy.duration; 8369 } 8370 } 8371 if (fromCycle) { 8372 fromCycle = copy.startAt = {}; 8373 for (p in vars.startAt) { 8374 fromCycle[p] = vars.startAt[p]; 8375 } 8376 _applyCycle(copy.startAt, targets, i); 8377 } 8378 copy.delay = staggerFunc(i, targets[i], targets) + (copy.delay || 0); 8379 if (i === l && onCompleteAll) { 8380 copy.onComplete = function() { 8381 if (vars.onComplete) { 8382 vars.onComplete.apply(vars.onCompleteScope || this, arguments); 8383 } 8384 onCompleteAll.apply(onCompleteAllScope || vars.callbackScope || this, onCompleteAllParams || _blankArray); 8385 }; 8386 } 8387 a[i] = new TweenMax(targets[i], duration, copy); 8388 } 8389 return a; 8390 }; 8391 8392 TweenMax.staggerFrom = TweenMax.allFrom = function(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 8393 vars.runBackwards = true; 8394 vars.immediateRender = (vars.immediateRender != false); 8395 return TweenMax.staggerTo(targets, duration, vars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 8396 }; 8397 8398 TweenMax.staggerFromTo = TweenMax.allFromTo = function(targets, duration, fromVars, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope) { 8399 toVars.startAt = fromVars; 8400 toVars.immediateRender = (toVars.immediateRender != false && fromVars.immediateRender != false); 8401 return TweenMax.staggerTo(targets, duration, toVars, stagger, onCompleteAll, onCompleteAllParams, onCompleteAllScope); 8402 }; 8403 8404 TweenMax.delayedCall = function(delay, callback, params, scope, useFrames) { 8405 return new TweenMax(callback, 0, {delay:delay, onComplete:callback, onCompleteParams:params, callbackScope:scope, onReverseComplete:callback, onReverseCompleteParams:params, immediateRender:false, useFrames:useFrames, overwrite:0}); 8406 }; 8407 8408 TweenMax.set = function(target, vars) { 8409 return new TweenMax(target, 0, vars); 8410 }; 8411 8412 TweenMax.isTweening = function(target) { 8413 return (_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].getTweensOf(target, true).length > 0); 8414 }; 8415 8416 var _getChildrenOf = function(timeline, includeTimelines) { 8417 var a = [], 8418 cnt = 0, 8419 tween = timeline._first; 8420 while (tween) { 8421 if (tween instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { 8422 a[cnt++] = tween; 8423 } else { 8424 if (includeTimelines) { 8425 a[cnt++] = tween; 8426 } 8427 a = a.concat(_getChildrenOf(tween, includeTimelines)); 8428 cnt = a.length; 8429 } 8430 tween = tween._next; 8431 } 8432 return a; 8433 }, 8434 getAllTweens = TweenMax.getAllTweens = function(includeTimelines) { 8435 return _getChildrenOf(_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"]._rootTimeline, includeTimelines).concat( _getChildrenOf(_TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"]._rootFramesTimeline, includeTimelines) ); 8436 }; 8437 8438 TweenMax.killAll = function(complete, tweens, delayedCalls, timelines) { 8439 if (tweens == null) { 8440 tweens = true; 8441 } 8442 if (delayedCalls == null) { 8443 delayedCalls = true; 8444 } 8445 var a = getAllTweens((timelines != false)), 8446 l = a.length, 8447 allTrue = (tweens && delayedCalls && timelines), 8448 isDC, tween, i; 8449 for (i = 0; i < l; i++) { 8450 tween = a[i]; 8451 if (allTrue || (tween instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["SimpleTimeline"]) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) { 8452 if (complete) { 8453 tween.totalTime(tween._reversed ? 0 : tween.totalDuration()); 8454 } else { 8455 tween._enabled(false, false); 8456 } 8457 } 8458 } 8459 }; 8460 8461 TweenMax.killChildTweensOf = function(parent, complete) { 8462 if (parent == null) { 8463 return; 8464 } 8465 var tl = TweenLiteInternals.tweenLookup, 8466 a, curParent, p, i, l; 8467 if (typeof(parent) === "string") { 8468 parent = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].selector(parent) || parent; 8469 } 8470 if (_isSelector(parent)) { 8471 parent = _slice(parent); 8472 } 8473 if (_isArray(parent)) { 8474 i = parent.length; 8475 while (--i > -1) { 8476 TweenMax.killChildTweensOf(parent[i], complete); 8477 } 8478 return; 8479 } 8480 a = []; 8481 for (p in tl) { 8482 curParent = tl[p].target.parentNode; 8483 while (curParent) { 8484 if (curParent === parent) { 8485 a = a.concat(tl[p].tweens); 8486 } 8487 curParent = curParent.parentNode; 8488 } 8489 } 8490 l = a.length; 8491 for (i = 0; i < l; i++) { 8492 if (complete) { 8493 a[i].totalTime(a[i].totalDuration()); 8494 } 8495 a[i]._enabled(false, false); 8496 } 8497 }; 8498 8499 var _changePause = function(pause, tweens, delayedCalls, timelines) { 8500 tweens = (tweens !== false); 8501 delayedCalls = (delayedCalls !== false); 8502 timelines = (timelines !== false); 8503 var a = getAllTweens(timelines), 8504 allTrue = (tweens && delayedCalls && timelines), 8505 i = a.length, 8506 isDC, tween; 8507 while (--i > -1) { 8508 tween = a[i]; 8509 if (allTrue || (tween instanceof _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["SimpleTimeline"]) || ((isDC = (tween.target === tween.vars.onComplete)) && delayedCalls) || (tweens && !isDC)) { 8510 tween.paused(pause); 8511 } 8512 } 8513 }; 8514 8515 TweenMax.pauseAll = function(tweens, delayedCalls, timelines) { 8516 _changePause(true, tweens, delayedCalls, timelines); 8517 }; 8518 8519 TweenMax.resumeAll = function(tweens, delayedCalls, timelines) { 8520 _changePause(false, tweens, delayedCalls, timelines); 8521 }; 8522 8523 TweenMax.globalTimeScale = function(value) { 8524 var tl = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"]._rootTimeline, 8525 t = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].ticker.time; 8526 if (!arguments.length) { 8527 return tl._timeScale; 8528 } 8529 value = value || _tinyNum; //can't allow zero because it'll throw the math off 8530 tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value); 8531 tl = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"]._rootFramesTimeline; 8532 t = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"].ticker.frame; 8533 tl._startTime = t - ((t - tl._startTime) * tl._timeScale / value); 8534 tl._timeScale = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"]._rootTimeline._timeScale = value; 8535 return value; 8536 }; 8537 8538 8539//---- GETTERS / SETTERS ---------------------------------------------------------------------------------------------------------- 8540 8541 p.progress = function(value, suppressEvents) { 8542 return (!arguments.length) ? (this.duration() ? this._time / this._duration : this.ratio) : this.totalTime( this.duration() * ((this._yoyo && (this._cycle & 1) !== 0) ? 1 - value : value) + (this._cycle * (this._duration + this._repeatDelay)), suppressEvents); 8543 }; 8544 8545 p.totalProgress = function(value, suppressEvents) { 8546 return (!arguments.length) ? this._totalTime / this.totalDuration() : this.totalTime( this.totalDuration() * value, suppressEvents); 8547 }; 8548 8549 p.time = function(value, suppressEvents) { 8550 if (!arguments.length) { 8551 return this._time; 8552 } 8553 if (this._dirty) { 8554 this.totalDuration(); 8555 } 8556 var duration = this._duration, 8557 cycle = this._cycle, 8558 cycleDur = cycle * (duration + this._repeatDelay); 8559 if (value > duration) { 8560 value = duration; 8561 } 8562 return this.totalTime((this._yoyo && (cycle & 1)) ? duration - value + cycleDur : this._repeat ? value + cycleDur : value, suppressEvents); 8563 }; 8564 8565 p.duration = function(value) { 8566 if (!arguments.length) { 8567 return this._duration; //don't set _dirty = false because there could be repeats that haven't been factored into the _totalDuration yet. Otherwise, if you create a repeated TweenMax and then immediately check its duration(), it would cache the value and the totalDuration would not be correct, thus repeats wouldn't take effect. 8568 } 8569 return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Animation"].prototype.duration.call(this, value); 8570 }; 8571 8572 p.totalDuration = function(value) { 8573 if (!arguments.length) { 8574 if (this._dirty) { 8575 //instead of Infinity, we use 999999999999 so that we can accommodate reverses 8576 this._totalDuration = (this._repeat === -1) ? 999999999999 : this._duration * (this._repeat + 1) + (this._repeatDelay * this._repeat); 8577 this._dirty = false; 8578 } 8579 return this._totalDuration; 8580 } 8581 return (this._repeat === -1) ? this : this.duration( (value - (this._repeat * this._repeatDelay)) / (this._repeat + 1) ); 8582 }; 8583 8584 p.repeat = function(value) { 8585 if (!arguments.length) { 8586 return this._repeat; 8587 } 8588 this._repeat = value; 8589 return this._uncache(true); 8590 }; 8591 8592 p.repeatDelay = function(value) { 8593 if (!arguments.length) { 8594 return this._repeatDelay; 8595 } 8596 this._repeatDelay = value; 8597 return this._uncache(true); 8598 }; 8599 8600 p.yoyo = function(value) { 8601 if (!arguments.length) { 8602 return this._yoyo; 8603 } 8604 this._yoyo = value; 8605 return this; 8606 }; 8607 8608 8609 return TweenMax; 8610 8611 }, true); 8612 8613var TweenMax = _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["globals"].TweenMax; 8614var TweenMaxBase = TweenMax; 8615 8616 8617 8618 8619/***/ }), 8620
vendor: 7,663 bytes, lines 8621-8726
8621/***/ "../../../../../node_modules/gsap/index.js": 8622/*!*********************************************************************!*\ 8623 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/index.js ***! 8624 \*********************************************************************/ 8625/*! exports provided: default, TweenLite, TweenMax, TimelineLite, TimelineMax, CSSPlugin, AttrPlugin, BezierPlugin, RoundPropsPlugin, DirectionalRotationPlugin, TweenPlugin, Ease, Power0, Power1, Power2, Power3, Power4, Linear, Back, Elastic, Bounce, RoughEase, SlowMo, SteppedEase, Circ, Expo, Sine, ExpoScaleEase, _gsScope */ 8626/***/ (function(module, __webpack_exports__, __webpack_require__) { 8627 8628"use strict"; 8629__webpack_require__.r(__webpack_exports__); 8630/* harmony import */ var _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./TweenLite.js */ "../../../../../node_modules/gsap/TweenLite.js"); 8631/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenLite", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); 8632 8633/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenPlugin", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["TweenPlugin"]; }); 8634 8635/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Ease", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Ease"]; }); 8636 8637/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power0", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power0"]; }); 8638 8639/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power1", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power1"]; }); 8640 8641/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power2", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power2"]; }); 8642 8643/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power3", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power3"]; }); 8644 8645/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Power4", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Power4"]; }); 8646 8647/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Linear", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["Linear"]; }); 8648 8649/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "_gsScope", function() { return _TweenLite_js__WEBPACK_IMPORTED_MODULE_0__["_gsScope"]; }); 8650 8651/* harmony import */ var _TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./TimelineLite.js */ "../../../../../node_modules/gsap/TimelineLite.js"); 8652/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineLite", function() { return _TimelineLite_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); 8653 8654/* harmony import */ var _TimelineMax_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./TimelineMax.js */ "../../../../../node_modules/gsap/TimelineMax.js"); 8655/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TimelineMax", function() { return _TimelineMax_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); 8656 8657/* harmony import */ var _TweenMax_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./TweenMax.js */ "../../../../../node_modules/gsap/TweenMax.js"); 8658/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _TweenMax_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); 8659 8660/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TweenMax", function() { return _TweenMax_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); 8661 8662/* harmony import */ var _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./CSSPlugin.js */ "../../../../../node_modules/gsap/CSSPlugin.js"); 8663/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "CSSPlugin", function() { return _CSSPlugin_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); 8664 8665/* harmony import */ var _AttrPlugin_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./AttrPlugin.js */ "../../../../../node_modules/gsap/AttrPlugin.js"); 8666/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "AttrPlugin", function() { return _AttrPlugin_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); 8667 8668/* harmony import */ var _RoundPropsPlugin_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./RoundPropsPlugin.js */ "../../../../../node_modules/gsap/RoundPropsPlugin.js"); 8669/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RoundPropsPlugin", function() { return _RoundPropsPlugin_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); 8670 8671/* harmony import */ var _DirectionalRotationPlugin_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./DirectionalRotationPlugin.js */ "../../../../../node_modules/gsap/DirectionalRotationPlugin.js"); 8672/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "DirectionalRotationPlugin", function() { return _DirectionalRotationPlugin_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); 8673 8674/* harmony import */ var _BezierPlugin_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./BezierPlugin.js */ "../../../../../node_modules/gsap/BezierPlugin.js"); 8675/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BezierPlugin", function() { return _BezierPlugin_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); 8676 8677/* harmony import */ var _EasePack_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./EasePack.js */ "../../../../../node_modules/gsap/EasePack.js"); 8678/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Back", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Back"]; }); 8679 8680/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Elastic", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Elastic"]; }); 8681 8682/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Bounce", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Bounce"]; }); 8683 8684/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "RoughEase", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["RoughEase"]; }); 8685 8686/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SlowMo", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["SlowMo"]; }); 8687 8688/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SteppedEase", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["SteppedEase"]; }); 8689 8690/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Circ", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Circ"]; }); 8691 8692/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Expo", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Expo"]; }); 8693 8694/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Sine", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["Sine"]; }); 8695 8696/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ExpoScaleEase", function() { return _EasePack_js__WEBPACK_IMPORTED_MODULE_9__["ExpoScaleEase"]; }); 8697 8698/*! 8699 * VERSION: 2.1.3 8700 * DATE: 2019-05-17 8701 * UPDATES AND DOCS AT: http://greensock.com 8702 * 8703 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 8704 * This work is subject to the terms at http://greensock.com/standard-license or for 8705 * Club GreenSock members, the software agreement that was issued with your membership. 8706 * 8707 * @author: Jack Doyle, [email protected] 8708 **/ 8709 8710 8711 8712 8713 8714 8715 8716 8717 8718 8719 8720 8721 8722 8723 8724 8725/***/ }), 8726
vendor: 22,161 bytes, lines 8727-8752
8727/***/ "../../../../../node_modules/gsap/src/minified/TimelineMax.min.js": 8728/*!********************************************************************************************!*\ 8729 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/src/minified/TimelineMax.min.js ***! 8730 \********************************************************************************************/ 8731/*! no static exports found */ 8732/***/ (function(module, exports, __webpack_require__) { 8733 8734/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 8735 * VERSION: 2.1.3 8736 * DATE: 2019-05-17 8737 * UPDATES AND DOCS AT: http://greensock.com 8738 * 8739 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 8740 * This work is subject to the terms at http://greensock.com/standard-license or for 8741 * Club GreenSock members, the software agreement that was issued with your membership. 8742 * 8743 * @author: Jack Doyle, [email protected] 8744 */ 8745var _gsScope= true&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(a,b,c){var d=function(b){a.call(this,b),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!!this.vars.yoyo,this._dirty=!0},e=1e-8,f=b._internals,g=f.lazyTweens,h=f.lazyRender,i=_gsScope._gsDefine.globals,j=new c(null,null,1,0),k=d.prototype=new a;return k.constructor=d,k.kill()._gc=!1,d.version="2.1.3",k.invalidate=function(){return this._yoyo=!!this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},k.addCallback=function(a,c,d,e){return this.add(b.delayedCall(0,a,d,e),c)},k.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var c=this.getTweensOf(a,!1),d=c.length,e=this._parseTimeOrLabel(b);--d>-1;)c[d]._startTime===e&&c[d]._enabled(!1,!1);return this},k.removePause=function(b){return this.removeCallback(a._internals.pauseCallback,b)},k.tweenTo=function(a,c){c=c||{};var d,e,f,g={ease:j,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},h=c.repeat&&i.TweenMax||b;for(e in c)g[e]=c[e];return g.time=this._parseTimeOrLabel(a),d=Math.abs(Number(g.time)-this._time)/this._timeScale||.001,f=new h(this,d,g),g.onStart=function(){f.target.paused(!0),f.vars.time===f.target.time()||d!==f.duration()||f.isFromTo||f.duration(Math.abs(f.vars.time-f.target.time())/f.target._timeScale).render(f.time(),!0,!0),c.onStart&&c.onStart.apply(c.onStartScope||c.callbackScope||f,c.onStartParams||[])},f},k.tweenFromTo=function(a,b,c){c=c||{},a=this._parseTimeOrLabel(a),c.startAt={onComplete:this.seek,onCompleteParams:[a],callbackScope:this},c.immediateRender=c.immediateRender!==!1;var d=this.tweenTo(b,c);return d.isFromTo=1,d.duration(Math.abs(d.vars.time-a)/this._timeScale||.001)},k.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,i,j,k,l,m,n,o,p=this,q=p._time,r=p._dirty?p.totalDuration():p._totalDuration,s=p._duration,t=p._totalTime,u=p._startTime,v=p._timeScale,w=p._rawPrevTime,x=p._paused,y=p._cycle;if(q!==p._time&&(a+=p._time-q),a>=r-e&&a>=0)p._locked||(p._totalTime=r,p._cycle=p._repeat),p._reversed||p._hasPausedChild()||(f=!0,j="onComplete",k=!!p._timeline.autoRemoveChildren,0===p._duration&&(0>=a&&a>=-e||0>w||w===e)&&w!==a&&p._first&&(k=!0,w>e&&(j="onReverseComplete"))),p._rawPrevTime=p._duration||!b||a||p._rawPrevTime===a?a:e,p._yoyo&&1&p._cycle?p._time=a=0:(p._time=s,a=s+1e-4);else if(e>a)if(p._locked||(p._totalTime=p._cycle=0),p._time=0,a>-e&&(a=0),(0!==q||0===s&&w!==e&&(w>0||0>a&&w>=0)&&!p._locked)&&(j="onReverseComplete",f=p._reversed),0>a)p._active=!1,p._timeline.autoRemoveChildren&&p._reversed?(k=f=!0,j="onReverseComplete"):w>=0&&p._first&&(k=!0),p._rawPrevTime=a;else{if(p._rawPrevTime=s||!b||a||p._rawPrevTime===a?a:e,0===a&&f)for(d=p._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,p._initted||(k=!0)}else 0===s&&0>w&&(k=!0),p._time=p._rawPrevTime=a,p._locked||(p._totalTime=a,0!==p._repeat&&(l=s+p._repeatDelay,p._cycle=p._totalTime/l>>0,p._cycle&&p._cycle===p._totalTime/l&&a>=t&&p._cycle--,p._time=p._totalTime-p._cycle*l,p._yoyo&&1&p._cycle&&(p._time=s-p._time),p._time>s?(p._time=s,a=s+1e-4):p._time<0?p._time=a=0:a=p._time));if(p._hasPause&&!p._forcingPlayhead&&!b){if(a=p._time,a>q||p._repeat&&y!==p._cycle)for(d=p._first;d&&d._startTime<=a&&!m;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===p._rawPrevTime||(m=d),d=d._next;else for(d=p._last;d&&d._startTime>=a&&!m;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(m=d),d=d._prev;m&&(o=p._startTime+(p._reversed?p._duration-m._startTime:m._startTime)/p._timeScale,m._startTime<s&&(p._time=p._rawPrevTime=a=m._startTime,p._totalTime=a+p._cycle*(p._totalDuration+p._repeatDelay)))}if(p._cycle!==y&&!p._locked){var z=p._yoyo&&0!==(1&y),A=z===(p._yoyo&&0!==(1&p._cycle)),B=p._totalTime,C=p._cycle,D=p._rawPrevTime,E=p._time;if(p._totalTime=y*s,p._cycle<y?z=!z:p._totalTime+=s,p._time=q,p._rawPrevTime=0===s?w-1e-4:w,p._cycle=y,p._locked=!0,q=z?0:s,p.render(q,b,0===s),b||p._gc||p.vars.onRepeat&&(p._cycle=C,p._locked=!1,p._callback("onRepeat")),q!==p._time)return;if(A&&(p._cycle=y,p._locked=!0,q=z?s+1e-4:-1e-4,p.render(q,!0,!1)),p._locked=!1,p._paused&&!x)return;p._time=E,p._totalTime=B,p._cycle=C,p._rawPrevTime=D}if(!(p._time!==q&&p._first||c||k||m))return void(t!==p._totalTime&&p._onUpdate&&(b||p._callback("onUpdate")));if(p._initted||(p._initted=!0),p._active||!p._paused&&p._totalTime!==t&&a>0&&(p._active=!0),0===t&&p.vars.onStart&&(0===p._totalTime&&p._totalDuration||b||p._callback("onStart")),n=p._time,n>=q)for(d=p._first;d&&(i=d._next,n===p._time&&(!p._paused||x));)(d._active||d._startTime<=p._time&&!d._paused&&!d._gc)&&(m===d&&(p.pause(),p._pauseTime=o),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=i;else for(d=p._last;d&&(i=d._prev,n===p._time&&(!p._paused||x));){if(d._active||d._startTime<=q&&!d._paused&&!d._gc){if(m===d){for(m=d._prev;m&&m.endTime()>p._time;)m.render(m._reversed?m.totalDuration()-(a-m._startTime)*m._timeScale:(a-m._startTime)*m._timeScale,b,c),m=m._prev;m=null,p.pause(),p._pauseTime=o}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=i}p._onUpdate&&(b||(g.length&&h(),p._callback("onUpdate"))),j&&(p._locked||p._gc||(u===p._startTime||v!==p._timeScale)&&(0===p._time||r>=p.totalDuration())&&(f&&(g.length&&h(),p._timeline.autoRemoveChildren&&p._enabled(!1,!1),p._active=!1),!b&&p.vars[j]&&p._callback(j)))},k.getActive=function(a,b,c){var d,e,f=[],g=this.getChildren(a||null==a,b||null==a,!!c),h=0,i=g.length;for(d=0;i>d;d++)e=g[d],e.isActive()&&(f[h++]=e);return f},k.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,c=this.getLabelsArray(),d=c.length;for(b=0;d>b;b++)if(c[b].time>a)return c[b].name;return null},k.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),c=b.length;--c>-1;)if(b[c].time<a)return b[c].name;return null},k.getLabelsArray=function(){var a,b=[],c=0;for(a in this._labels)b[c++]={time:this._labels[a],name:a};return b.sort(function(a,b){return a.time-b.time}),b},k.invalidate=function(){return this._locked=!1,a.prototype.invalidate.call(this)},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()||0},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()||0},k.totalDuration=function(b){return arguments.length?-1!==this._repeat&&b?this.timeScale(this.totalDuration()/b):this:(this._dirty&&(a.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},k.time=function(a,b){if(!arguments.length)return this._time;this._dirty&&this.totalDuration();var c=this._duration,d=this._cycle,e=d*(c+this._repeatDelay);return a>c&&(a=c),this.totalTime(this._yoyo&&1&d?c-a+e:this._repeat?a+e:a,b)},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},k.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+e)},d},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a);var c,d,e=this,f=e.vars;e._labels={},e.autoRemoveChildren=!!f.autoRemoveChildren,e.smoothChildTiming=!!f.smoothChildTiming,e._sortChildren=!0,e._onUpdate=f.onUpdate;for(d in f)c=f[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(f[d]=e._swapSelfInParams(c));i(f.tweens)&&e.add(f.tweens,0,f.align,f.stagger)},e=1e-8,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c],b):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=function(a,b,c,d){var e="immediateRender";return e in b||(b[e]=!(c&&c[e]===!1||d)),b},r=function(a){if("function"==typeof a)return a;var b="object"==typeof a?a:{each:a},c=b.ease,d=b.from||0,e=b.base||0,f={},g=isNaN(d),h=b.axis,i={center:.5,end:1}[d]||0;return function(a,j,k){var l,m,n,o,p,q,r,s,t,u=(k||b).length,v=f[u];if(!v){if(t="auto"===b.grid?0:(b.grid||[1/0])[0],!t){for(r=-(1/0);r<(r=k[t++].getBoundingClientRect().left)&&u>t;);t--}for(v=f[u]=[],l=g?Math.min(t,u)*i-.5:d%t,m=g?u*i/t-.5:d/t|0,r=0,s=1/0,q=0;u>q;q++)n=q%t-l,o=m-(q/t|0),v[q]=p=h?Math.abs("y"===h?o:n):Math.sqrt(n*n+o*o),p>r&&(r=p),s>p&&(s=p);v.max=r-s,v.min=s,v.v=u=b.amount||b.each*(t>u?u-1:h?"y"===h?u/t:t:Math.max(t,u/t))||0,v.b=0>u?e-u:e}return u=(v[a]-v.min)/v.max,v.b+(c?c.getRatio(u):u)*v.v}},s=d.prototype=new b;return d.version="2.1.3",d.distribute=r,s.constructor=d,s.kill()._gc=s._forcingPlayhead=s._hasPause=!1,s.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},s.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,q(this,d)),e)},s.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return e=q(this,e,d),b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},s.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),s=r(e.stagger||f),t=e.startAt,u=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),o=0;o<a.length;o++)l=m(e),t&&(l.startAt=m(t),t.cycle&&n(l.startAt,a,o)),u&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,s(o,a[o],a));return this.add(q,g)},s.staggerFrom=function(a,b,c,d,e,f,g,h){return c.runBackwards=!0,this.staggerTo(a,b,q(this,c),d,e,f,g,h)},s.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,this.staggerTo(a,b,q(this,d,c),e,f,g,h,i)},s.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},s.set=function(a,b,d){return this.add(new c(a,0,q(this,b,null,!0)),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g,h,i=new d(a),j=i._timeline;for(null==b&&(b=!0),j._remove(i,!0),i._startTime=0,i._rawPrevTime=i._time=i._totalTime=j._time,g=j._first;g;)h=g._next,b&&g instanceof c&&g.target===g.vars.onComplete||(f=g._startTime-g._delay,0>f&&(e=1),i.add(g,f)),g=h;return j.add(i,0),e&&i.totalDuration(),i},s.add=function(e,f,g,h){var j,k,l,m,n,o,p=this;if("number"!=typeof f&&(f=p._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),p.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return p._uncache(!0)}if("string"==typeof e)return p.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(p,e,f),(e._time||!e._duration&&e._initted)&&(j=(p.rawTime()-e._startTime)*e._timeScale,(!e._duration||Math.abs(Math.max(0,Math.min(e.totalDuration(),j)))-e._totalTime>1e-5)&&e.render(j,!1,!1)),(p._gc||p._time===p._duration)&&!p._paused&&p._duration<p.duration())for(n=p,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return p},s.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},s._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},s.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},s.insert=s.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},s.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},s.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},s.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},s.removeLabel=function(a){return delete this._labels[a],this},s.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},s._parseTimeOrLabel=function(b,c,d,e){var f,g;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(g=e.length;--g>-1;)e[g]instanceof a&&e[g].timeline===this&&this.remove(e[g]);if(f="number"!=typeof b||c?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-f:0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=f);else{if(g=b.indexOf("="),-1===g)return null==this._labels[b]?d?this._labels[b]=f+c:c:this._labels[b]+c;c=parseInt(b.charAt(g-1)+"1",10)*Number(b.substr(g+1)),b=g>1?this._parseTimeOrLabel(b.substr(0,g-1),0,d):f}return Number(b)+c},s.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},s.stop=function(){return this.paused(!0)},s.gotoAndPlay=function(a,b){return this.play(a,b)},s.gotoAndStop=function(a,b){return this.pause(a,b)},s.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n,o=this,p=o._time,q=o._dirty?o.totalDuration():o._totalDuration,r=o._startTime,s=o._timeScale,t=o._paused;if(p!==o._time&&(a+=o._time-p),o._hasPause&&!o._forcingPlayhead&&!b){if(a>p)for(d=o._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===o._rawPrevTime||(l=d),d=d._next;else for(d=o._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(o._time=o._totalTime=a=l._startTime,n=o._startTime+(o._reversed?o._duration-a:a)/o._timeScale)}if(a>=q-e&&a>=0)o._totalTime=o._time=q,o._reversed||o._hasPausedChild()||(f=!0,h="onComplete",i=!!o._timeline.autoRemoveChildren,0===o._duration&&(0>=a&&a>=-e||o._rawPrevTime<0||o._rawPrevTime===e)&&o._rawPrevTime!==a&&o._first&&(i=!0,o._rawPrevTime>e&&(h="onReverseComplete"))),o._rawPrevTime=o._duration||!b||a||o._rawPrevTime===a?a:e,a=q+1e-4;else if(e>a)if(o._totalTime=o._time=0,a>-e&&(a=0),(0!==p||0===o._duration&&o._rawPrevTime!==e&&(o._rawPrevTime>0||0>a&&o._rawPrevTime>=0))&&(h="onReverseComplete",f=o._reversed),0>a)o._active=!1,o._timeline.autoRemoveChildren&&o._reversed?(i=f=!0,h="onReverseComplete"):o._rawPrevTime>=0&&o._first&&(i=!0),o._rawPrevTime=a;else{if(o._rawPrevTime=o._duration||!b||a||o._rawPrevTime===a?a:e,0===a&&f)for(d=o._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,o._initted||(i=!0)}else o._totalTime=o._time=o._rawPrevTime=a;if(o._time!==p&&o._first||c||i||l){if(o._initted||(o._initted=!0),o._active||!o._paused&&o._time!==p&&a>0&&(o._active=!0),0===p&&o.vars.onStart&&(0===o._time&&o._duration||b||o._callback("onStart")),m=o._time,m>=p)for(d=o._first;d&&(g=d._next,m===o._time&&(!o._paused||t));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&(o.pause(),o._pauseTime=n),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=o._last;d&&(g=d._prev,m===o._time&&(!o._paused||t));){if(d._active||d._startTime<=p&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>o._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,o.pause(),o._pauseTime=n}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}o._onUpdate&&(b||(j.length&&k(),o._callback("onUpdate"))),h&&(o._gc||(r===o._startTime||s!==o._timeScale)&&(0===o._time||q>=o.totalDuration())&&(f&&(j.length&&k(),o._timeline.autoRemoveChildren&&o._enabled(!1,!1),o._active=!1),!b&&o.vars[h]&&o._callback(h)))}},s._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},s.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},s.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},s.recent=function(){return this._recent},s._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},s.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},s._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},s.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},s.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},s._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},s.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},s.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},s.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this,f=e._last,g=999999999999;f;)b=f._prev,f._dirty&&f.totalDuration(),f._startTime>g&&e._sortChildren&&!f._paused&&!e._calculatingDuration?(e._calculatingDuration=1,e.add(f,f._startTime-f._delay),e._calculatingDuration=0):g=f._startTime,f._startTime<0&&!f._paused&&(d-=f._startTime,e._timeline.smoothChildTiming&&(e._startTime+=f._startTime/e._timeScale,e._time-=f._startTime,e._totalTime-=f._startTime,e._rawPrevTime-=f._startTime),e.shiftChildren(-f._startTime,!1,-9999999999),g=0),c=f._startTime+f._totalDuration/f._timeScale,c>d&&(d=c),f=b;e._duration=e._totalDuration=d,e._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},s.paused=function(b){if(b===!1&&this._paused)for(var c=this._first;c;)c._startTime===this._time&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},s.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},s.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a){"use strict";var b=function(){return(_gsScope.GreenSockGlobals||_gsScope)[a]}; true&&module.exports?(__webpack_require__(/*! ./TweenLite.min.js */ "../../../../../node_modules/gsap/src/minified/TweenLite.min.js"),module.exports=b()): true&&!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! TweenLite */ "../../../../../node_modules/gsap/src/minified/TweenLite.min.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (b), 8746 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 8747 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 8748 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__))}("TimelineMax"); 8749/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "../../../../../node_modules/webpack/buildin/global.js"))) 8750 8751/***/ }), 8752
vendor: 28,799 bytes, lines 8753-8776
8753/***/ "../../../../../node_modules/gsap/src/minified/TweenLite.min.js": 8754/*!******************************************************************************************!*\ 8755 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/src/minified/TweenLite.min.js ***! 8756 \******************************************************************************************/ 8757/*! no static exports found */ 8758/***/ (function(module, exports, __webpack_require__) { 8759 8760/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 8761 * VERSION: 2.1.3 8762 * DATE: 2019-05-17 8763 * UPDATES AND DOCS AT: http://greensock.com 8764 * 8765 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 8766 * This work is subject to the terms at http://greensock.com/standard-license or for 8767 * Club GreenSock members, the software agreement that was issued with your membership. 8768 * 8769 * @author: Jack Doyle, [email protected] 8770 */ 8771!function(a,b){"use strict";var c={},d=a.document,e=a.GreenSockGlobals=a.GreenSockGlobals||a,f=e[b];if(f)return true&&module.exports&&(module.exports=f),f;var g,h,i,j,k,l=function(a){var b,c=a.split("."),d=e;for(b=0;b<c.length;b++)d[c[b]]=d=d[c[b]]||{};return d},m=l("com.greensock"),n=1e-8,o=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},p=function(){},q=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),r={},s=function(d,f,g,h){this.sc=r[d]?r[d].sc:[],r[d]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(j){for(var k,m,n,o,p=f.length,q=p;--p>-1;)(k=r[f[p]]||new s(f[p],[])).gsClass?(i[p]=k.gsClass,q--):j&&k.sc.push(this);if(0===q&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=l(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o, true&&module.exports)if(d===b){module.exports=c[b]=o;for(p in c)o[p]=c[p]}else c[b]&&(c[b][n]=o);else true&&!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){return o}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 8772 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));for(p=0;p<this.sc.length;p++)this.sc[p].check()}},this.check(!0)},t=a._gsDefine=function(a,b,c,d){return new s(a,b,c,d)},u=m._class=function(a,b,c){return b=b||function(){},t(a,[],function(){return b},c),b};t.globals=e;var v=[0,0,1,1],w=u("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?v.concat(b):v},!0),x=w.map={},y=w.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,k=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?u("easing."+f,null,!0):m.easing[f]||{},g=k.length;--g>-1;)h=k[g],x[f+"."+h]=x[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(i=w.prototype,i._calcEnd=!1,i.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},g=["Linear","Quad","Cubic","Quart","Quint,Strong"],h=g.length;--h>-1;)i=g[h]+",Power"+h,y(new w(null,null,1,h),i,"easeOut",!0),y(new w(null,null,2,h),i,"easeIn"+(0===h?",easeNone":"")),y(new w(null,null,3,h),i,"easeInOut");x.linear=m.easing.Linear.easeIn,x.swing=m.easing.Quad.easeInOut;var z=u("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});i=z.prototype,i.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],i=0;for(this!==j||k||j.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===i&&f.pr<e&&(i=g+1);h.splice(i,0,{c:b,s:c,up:d,pr:e})},i.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},i.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var A=a.requestAnimationFrame,B=a.cancelAnimationFrame,C=Date.now||function(){return(new Date).getTime()},D=C();for(g=["ms","moz","webkit","o"],h=g.length;--h>-1&&!A;)A=a[g[h]+"RequestAnimationFrame"],B=a[g[h]+"CancelAnimationFrame"]||a[g[h]+"CancelRequestAnimationFrame"];u("Ticker",function(a,b){var c,e,f,g,h,i=this,l=C(),m=b!==!1&&A?"auto":!1,o=500,q=33,r="tick",s=function(a){var b,d,j=C()-D;j>o&&(l+=j-q),D+=j,i.time=(D-l)/1e3,b=i.time-h,(!c||b>0||a===!0)&&(i.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&i.dispatchEvent(r)};z.call(i),i.time=i.frame=0,i.tick=function(){s(!0)},i.lagSmoothing=function(a,b){return arguments.length?(o=a||1/n,void(q=Math.min(b,o,0))):1/n>o},i.sleep=function(){null!=f&&(m&&B?B(f):clearTimeout(f),e=p,f=null,i===j&&(k=!1))},i.wake=function(a){null!==f?i.sleep():a?l+=-D+(D=C()):i.frame>10&&(D=C()-o+5),e=0===c?p:m&&A?A:function(a){return setTimeout(a,1e3*(h-i.time)+1|0)},i===j&&(k=!0),s(2)},i.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void i.wake()):c},i.useRAF=function(a){return arguments.length?(i.sleep(),m=a,void i.fps(c)):m},i.fps(a),setTimeout(function(){"auto"===m&&i.frame<5&&"hidden"!==(d||{}).visibilityState&&i.useRAF(!1)},1500)}),i=m.Ticker.prototype=new m.events.EventDispatcher,i.constructor=m.Ticker;var E=u("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=!!b.immediateRender,this.data=b.data,this._reversed=!!b.reversed,Z){k||j.wake();var c=this.vars.useFrames?Y:Z;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});j=E.ticker=new m.Ticker,i=E.prototype,i._dirty=i._gc=i._initted=i._paused=!1,i._totalTime=i._time=0,i._rawPrevTime=-1,i._next=i._last=i._onUpdate=i._timeline=i.timeline=null,i._paused=!1;var F=function(){k&&C()-D>2e3&&("hidden"!==(d||{}).visibilityState||!j.lagSmoothing())&&j.wake();var a=setTimeout(F,2e3);a.unref&&a.unref()};F(),i.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},i.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},i.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},i.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},i.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},i.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},i.render=function(a,b,c){},i.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},i.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a<c+this.totalDuration()/this._timeScale-n},i._enabled=function(a,b){return k||j.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},i._kill=function(a,b){return this._enabled(!1,!1)},i.kill=function(a,b){return this._kill(a,b),this},i._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},i._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},i._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},i.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=q(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},i.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},i.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},i.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},i.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},i.totalTime=function(a,b,c){if(k||j.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0),e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(K.length&&_(),this.render(a,b,!1),K.length&&_())}return this},i.progress=i.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},i.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},i.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},i.timeScale=function(a){if(!arguments.length)return this._timeScale;var b,c;for(a=a||n,this._timeline&&this._timeline.smoothChildTiming&&(b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime(),this._startTime=c-(c-this._startTime)*this._timeScale/a),this._timeScale=a,c=this.timeline;c&&c.timeline;)c._dirty=!0,c.totalDuration(),c=c.timeline;return this},i.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},i.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(k||a||j.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var G=u("core.SimpleTimeline",function(a){E.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});i=G.prototype=new E,i.constructor=G,i.kill()._gc=!1,i._first=i._last=i._recent=null,i._sortChildren=!1,i.add=i.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=this.rawTime()-(a._timeline.rawTime()-a._pauseTime)),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},i._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},i.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused&&!e._gc)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},i.rawTime=function(){return k||j.wake(),this._totalTime};var H=u("TweenLite",function(b,c,d){if(E.call(this,c,d),this.render=H.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:H.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?X[H.defaultOverwrite]:"number"==typeof i?i>>0:X[i],(h||b instanceof Array||b.push&&q(b))&&"number"!=typeof b[0])for(this._targets=g=o(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(o(f))):(this._siblings[e]=aa(f,this,!1),1===i&&this._siblings[e].length>1&&ca(f,this,null,1,this._siblings[e])):(f=g[e--]=H.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=aa(b,this,!1),1===i&&this._siblings.length>1&&ca(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-n,this.render(Math.min(0,-this._delay)))},!0),I=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},J=function(a,b){var c,d={};for(c in a)W[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!T[c]||T[c]&&T[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};i=H.prototype=new E,i.constructor=H,i.kill()._gc=!1,i.ratio=0,i._firstPT=i._targets=i._overwrittenProps=i._startAt=null,i._notifyPluginsOfEnabled=i._lazy=!1,H.version="2.1.3",H.defaultEase=i._ease=new w(null,null,1,1),H.defaultOverwrite="auto",H.ticker=j,H.autoSleep=120,H.lagSmoothing=function(a,b){j.lagSmoothing(a,b)},H.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(H.selector=c,c(b)):(d||(d=a.document),d?d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b):b)};var K=[],L={},M=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,N=/[\+-]=-?[\.\d]/,O=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a&&null!=this.end?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m.call(this._tween,b,this._target||c.t,this._tween):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},P=function(a){return(1e3*a|0)/1e3+""},Q=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(M)||[],f=b.match(M)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:P}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=O,N.test(b)&&(l.end=null),l},R=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=Q(m,n?parseFloat(o.s)+o.c+(o.s+"").replace(/[0-9\-\.]/g,""):d,h||H.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},S=H._internals={isArray:q,isSelector:I,lazyTweens:K,blobDif:Q},T=H._plugins={},U=S.tweenLookup={},V=0,W=S.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1,stagger:1},X={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},Y=E._rootFramesTimeline=new G,Z=E._rootTimeline=new G,$=30,_=S.lazyRender=function(){var a,b,c=K.length;for(L={},a=0;c>a;a++)b=K[a],b&&b._lazy!==!1&&(b.render(b._lazy[0],b._lazy[1],!0),b._lazy=!1);K.length=0};Z._startTime=j.time,Y._startTime=j.frame,Z._active=Y._active=!0,setTimeout(_,1),E._updateRoot=H.render=function(){var a,b,c;if(K.length&&_(),Z.render((j.time-Z._startTime)*Z._timeScale,!1,!1),Y.render((j.frame-Y._startTime)*Y._timeScale,!1,!1),K.length&&_(),j.frame>=$){$=j.frame+(parseInt(H.autoSleep,10)||120);for(c in U){for(b=U[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete U[c]}if(c=Z._first,(!c||c._paused)&&H.autoSleep&&!Y._first&&1===j._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||j.sleep()}}},j.addEventListener("tick",E._updateRoot);var aa=function(a,b,c){var d,e,f=a._gsTweenID;if(U[f||(a._gsTweenID=f="t"+V++)]||(U[f]={target:a,tweens:[]}),b&&(d=U[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return U[f].tweens},ba=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=H.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},ca=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+n,l=[],m=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||da(b,0,o),0===da(h,j,o)&&(l[m++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2*n||(l[m++]=h)));for(f=m;--f>-1;)if(h=l[f],i=h._firstPT,2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted&&i){if(2!==d&&!ba(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},da=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*n>f-b?n:(f+=a.totalDuration()/a._timeScale/e)>b+n?0:f-b-n};i._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease,l=this._startAt;if(g.startAt){l&&(l.render(-1,!0),l.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.data="isStart",e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,e.onUpdate=g.onUpdate,e.onUpdateParams=g.onUpdateParams,e.onUpdateScope=g.onUpdateScope||g.callbackScope||this,this._startAt=H.to(this.target||{},0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(l)l.render(-1,!0),l.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)W[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=H.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof w?k:"function"==typeof k?new w(k,g.easeParams):x[k]||H.defaultEase:H.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&H._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},i._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;L[b._gsTweenID]&&_(),this.vars.css||b.style&&b!==a&&b.nodeType&&T.css&&this.vars.autoCSS!==!1&&J(this.vars,b);for(g in this.vars)if(l=this.vars[g],W[g])l&&(l instanceof Array||l.push&&q(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(T[g]&&(j=new T[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=R.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&ca(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(L[b._gsTweenID]=!0),i)},i.render=function(a,b,c){var d,e,f,g,h=this,i=h._time,j=h._duration,k=h._rawPrevTime;if(a>=j-n&&a>=0)h._totalTime=h._time=j,h.ratio=h._ease._calcEnd?h._ease.getRatio(1):1,h._reversed||(d=!0,e="onComplete",c=c||h._timeline.autoRemoveChildren),0===j&&(h._initted||!h.vars.lazy||c)&&(h._startTime===h._timeline._duration&&(a=0),(0>k||0>=a&&a>=-n||k===n&&"isPause"!==h.data)&&k!==a&&(c=!0,k>n&&(e="onReverseComplete")),h._rawPrevTime=g=!b||a||k===a?a:n);else if(n>a)h._totalTime=h._time=0,h.ratio=h._ease._calcEnd?h._ease.getRatio(0):0,(0!==i||0===j&&k>0)&&(e="onReverseComplete",d=h._reversed),a>-n?a=0:0>a&&(h._active=!1,0===j&&(h._initted||!h.vars.lazy||c)&&(k>=0&&(k!==n||"isPause"!==h.data)&&(c=!0),h._rawPrevTime=g=!b||a||k===a?a:n)),(!h._initted||h._startAt&&h._startAt.progress())&&(c=!0);else if(h._totalTime=h._time=a,h._easeType){var l=a/j,m=h._easeType,o=h._easePower;(1===m||3===m&&l>=.5)&&(l=1-l),3===m&&(l*=2),1===o?l*=l:2===o?l*=l*l:3===o?l*=l*l*l:4===o&&(l*=l*l*l*l),h.ratio=1===m?1-l:2===m?l:.5>a/j?l/2:1-l/2}else h.ratio=h._ease.getRatio(a/j);if(h._time!==i||c){if(!h._initted){if(h._init(),!h._initted||h._gc)return;if(!c&&h._firstPT&&(h.vars.lazy!==!1&&h._duration||h.vars.lazy&&!h._duration))return h._time=h._totalTime=i,h._rawPrevTime=k,K.push(h),void(h._lazy=[a,b]);h._time&&!d?h.ratio=h._ease.getRatio(h._time/j):d&&h._ease._calcEnd&&(h.ratio=h._ease.getRatio(0===h._time?0:1))}for(h._lazy!==!1&&(h._lazy=!1),h._active||!h._paused&&h._time!==i&&a>=0&&(h._active=!0),0===i&&(h._startAt&&(a>=0?h._startAt.render(a,!0,c):e||(e="_dummyGS")),h.vars.onStart&&(0!==h._time||0===j)&&(b||h._callback("onStart"))),f=h._firstPT;f;)f.f?f.t[f.p](f.c*h.ratio+f.s):f.t[f.p]=f.c*h.ratio+f.s,f=f._next;h._onUpdate&&(0>a&&h._startAt&&a!==-1e-4&&h._startAt.render(a,!0,c),b||(h._time!==i||d||c)&&h._callback("onUpdate")),e&&(!h._gc||c)&&(0>a&&h._startAt&&!h._onUpdate&&a!==-1e-4&&h._startAt.render(a,!0,c),d&&(h._timeline.autoRemoveChildren&&h._enabled(!1,!1),h._active=!1),!b&&h.vars[e]&&h._callback(e),0===j&&h._rawPrevTime===n&&g!==n&&(h._rawPrevTime=0))}},i._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:H.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline,n=this._firstPT;if((q(b)||I(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(H.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!ba(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&n&&this._enabled(!1,!1)}}return i},i.invalidate=function(){this._notifyPluginsOfEnabled&&H._onPluginEvent("_onDisable",this);var a=this._time;return this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],E.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-n,this.render(a,!1,this.vars.lazy!==!1)),this},i._enabled=function(a,b){if(k||j.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=aa(d[c],this,!0);else this._siblings=aa(this.target,this,!0)}return E.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?H._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},H.to=function(a,b,c){return new H(a,b,c)},H.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new H(a,b,c)},H.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new H(a,b,d)},H.delayedCall=function(a,b,c,d,e){return new H(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},H.set=function(a,b){return new H(a,0,b)},H.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:H.selector(a)||a;var c,d,e,f;if((q(a)||I(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(H.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else if(a._gsTweenID)for(d=aa(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d||[]},H.killTweensOf=H.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=H.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ea=u("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ea.prototype},!0);if(i=ea.prototype,ea.version="1.19.0",ea.API=2,i._firstPT=null,i._addTween=R,i.setRatio=O,i._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},i._mod=i._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},H._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ea.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ea.API&&(T[(new a[b])._propName]=a[b]);return!0},t.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=u("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ea.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ea(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ea.activate([g]),g},g=a._gsQueue){for(h=0;h<g.length;h++)g[h]();for(i in r)r[i].func||a.console.log("GSAP encountered missing dependency: "+i)}k=!1}( true&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenLite"); 8773/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "../../../../../node_modules/webpack/buildin/global.js"))) 8774 8775/***/ }), 8776
vendor: 116,982 bytes, lines 8777-8805
8777/***/ "../../../../../node_modules/gsap/src/minified/TweenMax.min.js": 8778/*!*****************************************************************************************!*\ 8779 !*** /Users/mauro/Sites/eternalsunspire/node_modules/gsap/src/minified/TweenMax.min.js ***! 8780 \*****************************************************************************************/ 8781/*! no static exports found */ 8782/***/ (function(module, exports, __webpack_require__) { 8783 8784/* WEBPACK VAR INJECTION */(function(global) {var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 8785 * VERSION: 2.1.3 8786 * DATE: 2019-05-17 8787 * UPDATES AND DOCS AT: http://greensock.com 8788 * 8789 * Includes all of the following: TweenLite, TweenMax, TimelineLite, TimelineMax, EasePack, CSSPlugin, RoundPropsPlugin, BezierPlugin, AttrPlugin, DirectionalRotationPlugin 8790 * 8791 * @license Copyright (c) 2008-2019, GreenSock. All rights reserved. 8792 * This work is subject to the terms at http://greensock.com/standard-license or for 8793 * Club GreenSock members, the software agreement that was issued with your membership. 8794 * 8795 * @author: Jack Doyle, [email protected] 8796 **/ 8797var _gsScope= true&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";_gsScope._gsDefine("TweenMax",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},e=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c],b):e[c%e.length];delete a.cycle},f=function(a){if("function"==typeof a)return a;var b="object"==typeof a?a:{each:a},c=b.ease,d=b.from||0,e=b.base||0,f={},g=isNaN(d),h=b.axis,i={center:.5,end:1}[d]||0;return function(a,j,k){var l,m,n,o,p,q,r,s,t,u=(k||b).length,v=f[u];if(!v){if(t="auto"===b.grid?0:(b.grid||[1/0])[0],!t){for(r=-(1/0);r<(r=k[t++].getBoundingClientRect().left)&&u>t;);t--}for(v=f[u]=[],l=g?Math.min(t,u)*i-.5:d%t,m=g?u*i/t-.5:d/t|0,r=0,s=1/0,q=0;u>q;q++)n=q%t-l,o=m-(q/t|0),v[q]=p=h?Math.abs("y"===h?o:n):Math.sqrt(n*n+o*o),p>r&&(r=p),s>p&&(s=p);v.max=r-s,v.min=s,v.v=u=b.amount||b.each*(t>u?u-1:h?"y"===h?u/t:t:Math.max(t,u/t))||0,v.b=0>u?e-u:e}return u=(v[a]-v.min)/v.max,v.b+(c?c.getRatio(u):u)*v.v}},g=function(a,b,d){c.call(this,a,b,d),this._cycle=0,this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._repeat&&this._uncache(!0),this.render=g.prototype.render},h=1e-8,i=c._internals,j=i.isSelector,k=i.isArray,l=g.prototype=c.to({},.1,{}),m=[];g.version="2.1.3",l.constructor=g,l.kill()._gc=!1,g.killTweensOf=g.killDelayedCallsTo=c.killTweensOf,g.getTweensOf=c.getTweensOf,g.lagSmoothing=c.lagSmoothing,g.ticker=c.ticker,g.render=c.render,g.distribute=f,l.invalidate=function(){return this._yoyo=this.vars.yoyo===!0||!!this.vars.yoyoEase,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._yoyoEase=null,this._uncache(!0),c.prototype.invalidate.call(this)},l.updateTo=function(a,b){var d,e=this,f=e.ratio,g=e.vars.immediateRender||a.immediateRender;b&&e._startTime<e._timeline._time&&(e._startTime=e._timeline._time,e._uncache(!1),e._gc?e._enabled(!0,!1):e._timeline.insert(e,e._startTime-e._delay));for(d in a)e.vars[d]=a[d];if(e._initted||g)if(b)e._initted=!1,g&&e.render(0,!0,!0);else if(e._gc&&e._enabled(!0,!1),e._notifyPluginsOfEnabled&&e._firstPT&&c._onPluginEvent("_onDisable",e),e._time/e._duration>.998){var h=e._totalTime;e.render(0,!0,!1),e._initted=!1,e.render(h,!0,!1)}else if(e._initted=!1,e._init(),e._time>0||g)for(var i,j=1/(1-f),k=e._firstPT;k;)i=k.s+k.c,k.c*=j,k.s=i-k.c,k=k._next;return e},l.render=function(a,b,d){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var e,f,g,j,k,l,m,n,o,p=this,q=p._dirty?p.totalDuration():p._totalDuration,r=p._time,s=p._totalTime,t=p._cycle,u=p._duration,v=p._rawPrevTime;if(a>=q-h&&a>=0?(p._totalTime=q,p._cycle=p._repeat,p._yoyo&&0!==(1&p._cycle)?(p._time=0,p.ratio=p._ease._calcEnd?p._ease.getRatio(0):0):(p._time=u,p.ratio=p._ease._calcEnd?p._ease.getRatio(1):1),p._reversed||(e=!0,f="onComplete",d=d||p._timeline.autoRemoveChildren),0===u&&(p._initted||!p.vars.lazy||d)&&(p._startTime===p._timeline._duration&&(a=0),(0>v||0>=a&&a>=-h||v===h&&"isPause"!==p.data)&&v!==a&&(d=!0,v>h&&(f="onReverseComplete")),p._rawPrevTime=n=!b||a||v===a?a:h)):h>a?(p._totalTime=p._time=p._cycle=0,p.ratio=p._ease._calcEnd?p._ease.getRatio(0):0,(0!==s||0===u&&v>0)&&(f="onReverseComplete",e=p._reversed),a>-h?a=0:0>a&&(p._active=!1,0===u&&(p._initted||!p.vars.lazy||d)&&(v>=0&&(d=!0),p._rawPrevTime=n=!b||a||v===a?a:h)),p._initted||(d=!0)):(p._totalTime=p._time=a,0!==p._repeat&&(j=u+p._repeatDelay,p._cycle=p._totalTime/j>>0,0!==p._cycle&&p._cycle===p._totalTime/j&&a>=s&&p._cycle--,p._time=p._totalTime-p._cycle*j,p._yoyo&&0!==(1&p._cycle)&&(p._time=u-p._time,o=p._yoyoEase||p.vars.yoyoEase,o&&(p._yoyoEase||(o!==!0||p._initted?p._yoyoEase=o=o===!0?p._ease:o instanceof Ease?o:Ease.map[o]:(o=p.vars.ease,p._yoyoEase=o=o?o instanceof Ease?o:"function"==typeof o?new Ease(o,p.vars.easeParams):Ease.map[o]||c.defaultEase:c.defaultEase)),p.ratio=o?1-o.getRatio((u-p._time)/u):0)),p._time>u?p._time=u:p._time<0&&(p._time=0)),p._easeType&&!o?(k=p._time/u,l=p._easeType,m=p._easePower,(1===l||3===l&&k>=.5)&&(k=1-k),3===l&&(k*=2),1===m?k*=k:2===m?k*=k*k:3===m?k*=k*k*k:4===m&&(k*=k*k*k*k),p.ratio=1===l?1-k:2===l?k:p._time/u<.5?k/2:1-k/2):o||(p.ratio=p._ease.getRatio(p._time/u))),r===p._time&&!d&&t===p._cycle)return void(s!==p._totalTime&&p._onUpdate&&(b||p._callback("onUpdate")));if(!p._initted){if(p._init(),!p._initted||p._gc)return;if(!d&&p._firstPT&&(p.vars.lazy!==!1&&p._duration||p.vars.lazy&&!p._duration))return p._time=r,p._totalTime=s,p._rawPrevTime=v,p._cycle=t,i.lazyTweens.push(p),void(p._lazy=[a,b]);!p._time||e||o?e&&this._ease._calcEnd&&!o&&(p.ratio=p._ease.getRatio(0===p._time?0:1)):p.ratio=p._ease.getRatio(p._time/u)}for(p._lazy!==!1&&(p._lazy=!1),p._active||!p._paused&&p._time!==r&&a>=0&&(p._active=!0),0===s&&(2===p._initted&&a>0&&p._init(),p._startAt&&(a>=0?p._startAt.render(a,!0,d):f||(f="_dummyGS")),p.vars.onStart&&(0!==p._totalTime||0===u)&&(b||p._callback("onStart"))),g=p._firstPT;g;)g.f?g.t[g.p](g.c*p.ratio+g.s):g.t[g.p]=g.c*p.ratio+g.s,g=g._next;p._onUpdate&&(0>a&&p._startAt&&p._startTime&&p._startAt.render(a,!0,d),b||(p._totalTime!==s||f)&&p._callback("onUpdate")),p._cycle!==t&&(b||p._gc||p.vars.onRepeat&&p._callback("onRepeat")),f&&(!p._gc||d)&&(0>a&&p._startAt&&!p._onUpdate&&p._startTime&&p._startAt.render(a,!0,d),e&&(p._timeline.autoRemoveChildren&&p._enabled(!1,!1),p._active=!1),!b&&p.vars[f]&&p._callback(f),0===u&&p._rawPrevTime===h&&n!==h&&(p._rawPrevTime=0))},g.to=function(a,b,c){return new g(a,b,c)},g.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new g(a,b,c)},g.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new g(a,b,d)},g.staggerTo=g.allTo=function(a,b,h,i,l,n,o){var p,q,r,s,t=[],u=f(h.stagger||i),v=h.cycle,w=(h.startAt||m).cycle;for(k(a)||("string"==typeof a&&(a=c.selector(a)||a),j(a)&&(a=d(a))),a=a||[],p=a.length-1,r=0;p>=r;r++){q={};for(s in h)q[s]=h[s];if(v&&(e(q,a,r),null!=q.duration&&(b=q.duration,delete q.duration)),w){w=q.startAt={};for(s in h.startAt)w[s]=h.startAt[s];e(q.startAt,a,r)}q.delay=u(r,a[r],a)+(q.delay||0),r===p&&l&&(q.onComplete=function(){h.onComplete&&h.onComplete.apply(h.onCompleteScope||this,arguments),l.apply(o||h.callbackScope||this,n||m)}),t[r]=new g(a[r],b,q)}return t},g.staggerFrom=g.allFrom=function(a,b,c,d,e,f,h){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,g.staggerTo(a,b,c,d,e,f,h)},g.staggerFromTo=g.allFromTo=function(a,b,c,d,e,f,h,i){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,g.staggerTo(a,b,d,e,f,h,i)},g.delayedCall=function(a,b,c,d,e){return new g(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,useFrames:e,overwrite:0})},g.set=function(a,b){return new g(a,0,b)},g.isTweening=function(a){return c.getTweensOf(a,!0).length>0};var n=function(a,b){for(var d=[],e=0,f=a._first;f;)f instanceof c?d[e++]=f:(b&&(d[e++]=f),d=d.concat(n(f,b)),e=d.length),f=f._next;return d},o=g.getAllTweens=function(b){return n(a._rootTimeline,b).concat(n(a._rootFramesTimeline,b))};g.killAll=function(a,c,d,e){null==c&&(c=!0),null==d&&(d=!0);var f,g,h,i=o(0!=e),j=i.length,k=c&&d&&e;for(h=0;j>h;h++)g=i[h],(k||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&(a?g.totalTime(g._reversed?0:g.totalDuration()):g._enabled(!1,!1))},g.killChildTweensOf=function(a,b){if(null!=a){var e,f,h,l,m,n=i.tweenLookup;if("string"==typeof a&&(a=c.selector(a)||a),j(a)&&(a=d(a)),k(a))for(l=a.length;--l>-1;)g.killChildTweensOf(a[l],b);else{e=[];for(h in n)for(f=n[h].target.parentNode;f;)f===a&&(e=e.concat(n[h].tweens)),f=f.parentNode;for(m=e.length,l=0;m>l;l++)b&&e[l].totalTime(e[l].totalDuration()),e[l]._enabled(!1,!1)}}};var p=function(a,c,d,e){c=c!==!1,d=d!==!1,e=e!==!1;for(var f,g,h=o(e),i=c&&d&&e,j=h.length;--j>-1;)g=h[j],(i||g instanceof b||(f=g.target===g.vars.onComplete)&&d||c&&!f)&&g.paused(a)};return g.pauseAll=function(a,b,c){p(!0,a,b,c)},g.resumeAll=function(a,b,c){p(!1,a,b,c)},g.globalTimeScale=function(b){var d=a._rootTimeline,e=c.ticker.time;return arguments.length?(b=b||h,d._startTime=e-(e-d._startTime)*d._timeScale/b,d=a._rootFramesTimeline,e=c.ticker.frame,d._startTime=e-(e-d._startTime)*d._timeScale/b,d._timeScale=a._rootTimeline._timeScale=b,b):d._timeScale},l.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this.duration()?this._time/this._duration:this.ratio},l.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()},l.time=function(a,b){if(!arguments.length)return this._time;this._dirty&&this.totalDuration();var c=this._duration,d=this._cycle,e=d*(c+this._repeatDelay);return a>c&&(a=c),this.totalTime(this._yoyo&&1&d?c-a+e:this._repeat?a+e:a,b)},l.duration=function(b){return arguments.length?a.prototype.duration.call(this,b):this._duration},l.totalDuration=function(a){return arguments.length?-1===this._repeat?this:this.duration((a-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},l.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},l.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},l.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},g},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(a,b,c){var d=function(a){b.call(this,a);var c,d,e=this,f=e.vars;e._labels={},e.autoRemoveChildren=!!f.autoRemoveChildren,e.smoothChildTiming=!!f.smoothChildTiming,e._sortChildren=!0,e._onUpdate=f.onUpdate;for(d in f)c=f[d],i(c)&&-1!==c.join("").indexOf("{self}")&&(f[d]=e._swapSelfInParams(c));i(f.tweens)&&e.add(f.tweens,0,f.align,f.stagger)},e=1e-8,f=c._internals,g=d._internals={},h=f.isSelector,i=f.isArray,j=f.lazyTweens,k=f.lazyRender,l=_gsScope._gsDefine.globals,m=function(a){var b,c={};for(b in a)c[b]=a[b];return c},n=function(a,b,c){var d,e,f=a.cycle;for(d in f)e=f[d],a[d]="function"==typeof e?e(c,b[c],b):e[c%e.length];delete a.cycle},o=g.pauseCallback=function(){},p=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},q=function(a,b,c,d){var e="immediateRender";return e in b||(b[e]=!(c&&c[e]===!1||d)),b},r=function(a){if("function"==typeof a)return a;var b="object"==typeof a?a:{each:a},c=b.ease,d=b.from||0,e=b.base||0,f={},g=isNaN(d),h=b.axis,i={center:.5,end:1}[d]||0;return function(a,j,k){var l,m,n,o,p,q,r,s,t,u=(k||b).length,v=f[u];if(!v){if(t="auto"===b.grid?0:(b.grid||[1/0])[0],!t){for(r=-(1/0);r<(r=k[t++].getBoundingClientRect().left)&&u>t;);t--}for(v=f[u]=[],l=g?Math.min(t,u)*i-.5:d%t,m=g?u*i/t-.5:d/t|0,r=0,s=1/0,q=0;u>q;q++)n=q%t-l,o=m-(q/t|0),v[q]=p=h?Math.abs("y"===h?o:n):Math.sqrt(n*n+o*o),p>r&&(r=p),s>p&&(s=p);v.max=r-s,v.min=s,v.v=u=b.amount||b.each*(t>u?u-1:h?"y"===h?u/t:t:Math.max(t,u/t))||0,v.b=0>u?e-u:e}return u=(v[a]-v.min)/v.max,v.b+(c?c.getRatio(u):u)*v.v}},s=d.prototype=new b;return d.version="2.1.3",d.distribute=r,s.constructor=d,s.kill()._gc=s._forcingPlayhead=s._hasPause=!1,s.to=function(a,b,d,e){var f=d.repeat&&l.TweenMax||c;return b?this.add(new f(a,b,d),e):this.set(a,d,e)},s.from=function(a,b,d,e){return this.add((d.repeat&&l.TweenMax||c).from(a,b,q(this,d)),e)},s.fromTo=function(a,b,d,e,f){var g=e.repeat&&l.TweenMax||c;return e=q(this,e,d),b?this.add(g.fromTo(a,b,d,e),f):this.set(a,e,f)},s.staggerTo=function(a,b,e,f,g,i,j,k){var l,o,q=new d({onComplete:i,onCompleteParams:j,callbackScope:k,smoothChildTiming:this.smoothChildTiming}),s=r(e.stagger||f),t=e.startAt,u=e.cycle;for("string"==typeof a&&(a=c.selector(a)||a),a=a||[],h(a)&&(a=p(a)),o=0;o<a.length;o++)l=m(e),t&&(l.startAt=m(t),t.cycle&&n(l.startAt,a,o)),u&&(n(l,a,o),null!=l.duration&&(b=l.duration,delete l.duration)),q.to(a[o],b,l,s(o,a[o],a));return this.add(q,g)},s.staggerFrom=function(a,b,c,d,e,f,g,h){return c.runBackwards=!0,this.staggerTo(a,b,q(this,c),d,e,f,g,h)},s.staggerFromTo=function(a,b,c,d,e,f,g,h,i){return d.startAt=c,this.staggerTo(a,b,q(this,d,c),e,f,g,h,i)},s.call=function(a,b,d,e){return this.add(c.delayedCall(0,a,b,d),e)},s.set=function(a,b,d){return this.add(new c(a,0,q(this,b,null,!0)),d)},d.exportRoot=function(a,b){a=a||{},null==a.smoothChildTiming&&(a.smoothChildTiming=!0);var e,f,g,h,i=new d(a),j=i._timeline;for(null==b&&(b=!0),j._remove(i,!0),i._startTime=0,i._rawPrevTime=i._time=i._totalTime=j._time,g=j._first;g;)h=g._next,b&&g instanceof c&&g.target===g.vars.onComplete||(f=g._startTime-g._delay,0>f&&(e=1),i.add(g,f)),g=h;return j.add(i,0),e&&i.totalDuration(),i},s.add=function(e,f,g,h){var j,k,l,m,n,o,p=this;if("number"!=typeof f&&(f=p._parseTimeOrLabel(f,0,!0,e)),!(e instanceof a)){if(e instanceof Array||e&&e.push&&i(e)){for(g=g||"normal",h=h||0,j=f,k=e.length,l=0;k>l;l++)i(m=e[l])&&(m=new d({tweens:m})),p.add(m,j),"string"!=typeof m&&"function"!=typeof m&&("sequence"===g?j=m._startTime+m.totalDuration()/m._timeScale:"start"===g&&(m._startTime-=m.delay())),j+=h;return p._uncache(!0)}if("string"==typeof e)return p.addLabel(e,f);if("function"!=typeof e)throw"Cannot add "+e+" into the timeline; it is not a tween, timeline, function, or string.";e=c.delayedCall(0,e)}if(b.prototype.add.call(p,e,f),(e._time||!e._duration&&e._initted)&&(j=(p.rawTime()-e._startTime)*e._timeScale,(!e._duration||Math.abs(Math.max(0,Math.min(e.totalDuration(),j)))-e._totalTime>1e-5)&&e.render(j,!1,!1)),(p._gc||p._time===p._duration)&&!p._paused&&p._duration<p.duration())for(n=p,o=n.rawTime()>e._startTime;n._timeline;)o&&n._timeline.smoothChildTiming?n.totalTime(n._totalTime,!0):n._gc&&n._enabled(!0,!1),n=n._timeline;return p},s.remove=function(b){if(b instanceof a){this._remove(b,!1);var c=b._timeline=b.vars.useFrames?a._rootFramesTimeline:a._rootTimeline;return b._startTime=(b._paused?b._pauseTime:c._time)-(b._reversed?b.totalDuration()-b._totalTime:b._totalTime)/b._timeScale,this}if(b instanceof Array||b&&b.push&&i(b)){for(var d=b.length;--d>-1;)this.remove(b[d]);return this}return"string"==typeof b?this.removeLabel(b):this.kill(null,b)},s._remove=function(a,c){b.prototype._remove.call(this,a,c);var d=this._last;return d?this._time>this.duration()&&(this._time=this._duration,this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},s.append=function(a,b){return this.add(a,this._parseTimeOrLabel(null,b,!0,a))},s.insert=s.insertMultiple=function(a,b,c,d){return this.add(a,b||0,c,d)},s.appendMultiple=function(a,b,c,d){return this.add(a,this._parseTimeOrLabel(null,b,!0,a),c,d)},s.addLabel=function(a,b){return this._labels[a]=this._parseTimeOrLabel(b),this},s.addPause=function(a,b,d,e){var f=c.delayedCall(0,o,d,e||this);return f.vars.onComplete=f.vars.onReverseComplete=b,f.data="isPause",this._hasPause=!0,this.add(f,a)},s.removeLabel=function(a){return delete this._labels[a],this},s.getLabelTime=function(a){return null!=this._labels[a]?this._labels[a]:-1},s._parseTimeOrLabel=function(b,c,d,e){var f,g;if(e instanceof a&&e.timeline===this)this.remove(e);else if(e&&(e instanceof Array||e.push&&i(e)))for(g=e.length;--g>-1;)e[g]instanceof a&&e[g].timeline===this&&this.remove(e[g]);if(f="number"!=typeof b||c?this.duration()>99999999999?this.recent().endTime(!1):this._duration:0,"string"==typeof c)return this._parseTimeOrLabel(c,d&&"number"==typeof b&&null==this._labels[c]?b-f:0,d);if(c=c||0,"string"!=typeof b||!isNaN(b)&&null==this._labels[b])null==b&&(b=f);else{if(g=b.indexOf("="),-1===g)return null==this._labels[b]?d?this._labels[b]=f+c:c:this._labels[b]+c;c=parseInt(b.charAt(g-1)+"1",10)*Number(b.substr(g+1)),b=g>1?this._parseTimeOrLabel(b.substr(0,g-1),0,d):f}return Number(b)+c},s.seek=function(a,b){return this.totalTime("number"==typeof a?a:this._parseTimeOrLabel(a),b!==!1)},s.stop=function(){return this.paused(!0)},s.gotoAndPlay=function(a,b){return this.play(a,b)},s.gotoAndStop=function(a,b){return this.pause(a,b)},s.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,g,h,i,l,m,n,o=this,p=o._time,q=o._dirty?o.totalDuration():o._totalDuration,r=o._startTime,s=o._timeScale,t=o._paused;if(p!==o._time&&(a+=o._time-p),o._hasPause&&!o._forcingPlayhead&&!b){if(a>p)for(d=o._first;d&&d._startTime<=a&&!l;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===o._rawPrevTime||(l=d),d=d._next;else for(d=o._last;d&&d._startTime>=a&&!l;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(l=d),d=d._prev;l&&(o._time=o._totalTime=a=l._startTime,n=o._startTime+(o._reversed?o._duration-a:a)/o._timeScale)}if(a>=q-e&&a>=0)o._totalTime=o._time=q,o._reversed||o._hasPausedChild()||(f=!0,h="onComplete",i=!!o._timeline.autoRemoveChildren,0===o._duration&&(0>=a&&a>=-e||o._rawPrevTime<0||o._rawPrevTime===e)&&o._rawPrevTime!==a&&o._first&&(i=!0,o._rawPrevTime>e&&(h="onReverseComplete"))),o._rawPrevTime=o._duration||!b||a||o._rawPrevTime===a?a:e,a=q+1e-4;else if(e>a)if(o._totalTime=o._time=0,a>-e&&(a=0),(0!==p||0===o._duration&&o._rawPrevTime!==e&&(o._rawPrevTime>0||0>a&&o._rawPrevTime>=0))&&(h="onReverseComplete",f=o._reversed),0>a)o._active=!1,o._timeline.autoRemoveChildren&&o._reversed?(i=f=!0,h="onReverseComplete"):o._rawPrevTime>=0&&o._first&&(i=!0),o._rawPrevTime=a;else{if(o._rawPrevTime=o._duration||!b||a||o._rawPrevTime===a?a:e,0===a&&f)for(d=o._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,o._initted||(i=!0)}else o._totalTime=o._time=o._rawPrevTime=a;if(o._time!==p&&o._first||c||i||l){if(o._initted||(o._initted=!0),o._active||!o._paused&&o._time!==p&&a>0&&(o._active=!0),0===p&&o.vars.onStart&&(0===o._time&&o._duration||b||o._callback("onStart")),m=o._time,m>=p)for(d=o._first;d&&(g=d._next,m===o._time&&(!o._paused||t));)(d._active||d._startTime<=m&&!d._paused&&!d._gc)&&(l===d&&(o.pause(),o._pauseTime=n),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=g;else for(d=o._last;d&&(g=d._prev,m===o._time&&(!o._paused||t));){if(d._active||d._startTime<=p&&!d._paused&&!d._gc){if(l===d){for(l=d._prev;l&&l.endTime()>o._time;)l.render(l._reversed?l.totalDuration()-(a-l._startTime)*l._timeScale:(a-l._startTime)*l._timeScale,b,c),l=l._prev;l=null,o.pause(),o._pauseTime=n}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=g}o._onUpdate&&(b||(j.length&&k(),o._callback("onUpdate"))),h&&(o._gc||(r===o._startTime||s!==o._timeScale)&&(0===o._time||q>=o.totalDuration())&&(f&&(j.length&&k(),o._timeline.autoRemoveChildren&&o._enabled(!1,!1),o._active=!1),!b&&o.vars[h]&&o._callback(h)))}},s._hasPausedChild=function(){for(var a=this._first;a;){if(a._paused||a instanceof d&&a._hasPausedChild())return!0;a=a._next}return!1},s.getChildren=function(a,b,d,e){e=e||-9999999999;for(var f=[],g=this._first,h=0;g;)g._startTime<e||(g instanceof c?b!==!1&&(f[h++]=g):(d!==!1&&(f[h++]=g),a!==!1&&(f=f.concat(g.getChildren(!0,b,d)),h=f.length))),g=g._next;return f},s.getTweensOf=function(a,b){var d,e,f=this._gc,g=[],h=0;for(f&&this._enabled(!0,!0),d=c.getTweensOf(a),e=d.length;--e>-1;)(d[e].timeline===this||b&&this._contains(d[e]))&&(g[h++]=d[e]);return f&&this._enabled(!1,!0),g},s.recent=function(){return this._recent},s._contains=function(a){for(var b=a.timeline;b;){if(b===this)return!0;b=b.timeline}return!1},s.shiftChildren=function(a,b,c){c=c||0;for(var d,e=this._first,f=this._labels;e;)e._startTime>=c&&(e._startTime+=a),e=e._next;if(b)for(d in f)f[d]>=c&&(f[d]+=a);return this._uncache(!0)},s._kill=function(a,b){if(!a&&!b)return this._enabled(!1,!1);for(var c=b?this.getTweensOf(b):this.getChildren(!0,!0,!1),d=c.length,e=!1;--d>-1;)c[d]._kill(a,b)&&(e=!0);return e},s.clear=function(a){var b=this.getChildren(!1,!0,!0),c=b.length;for(this._time=this._totalTime=0;--c>-1;)b[c]._enabled(!1,!1);return a!==!1&&(this._labels={}),this._uncache(!0)},s.invalidate=function(){for(var b=this._first;b;)b.invalidate(),b=b._next;return a.prototype.invalidate.call(this)},s._enabled=function(a,c){if(a===this._gc)for(var d=this._first;d;)d._enabled(a,!0),d=d._next;return b.prototype._enabled.call(this,a,c)},s.totalTime=function(b,c,d){this._forcingPlayhead=!0;var e=a.prototype.totalTime.apply(this,arguments);return this._forcingPlayhead=!1,e},s.duration=function(a){return arguments.length?(0!==this.duration()&&0!==a&&this.timeScale(this._duration/a),this):(this._dirty&&this.totalDuration(),this._duration)},s.totalDuration=function(a){if(!arguments.length){if(this._dirty){for(var b,c,d=0,e=this,f=e._last,g=999999999999;f;)b=f._prev,f._dirty&&f.totalDuration(),f._startTime>g&&e._sortChildren&&!f._paused&&!e._calculatingDuration?(e._calculatingDuration=1,e.add(f,f._startTime-f._delay),e._calculatingDuration=0):g=f._startTime,f._startTime<0&&!f._paused&&(d-=f._startTime,e._timeline.smoothChildTiming&&(e._startTime+=f._startTime/e._timeScale,e._time-=f._startTime,e._totalTime-=f._startTime,e._rawPrevTime-=f._startTime),e.shiftChildren(-f._startTime,!1,-9999999999),g=0),c=f._startTime+f._totalDuration/f._timeScale,c>d&&(d=c),f=b;e._duration=e._totalDuration=d,e._dirty=!1}return this._totalDuration}return a&&this.totalDuration()?this.timeScale(this._totalDuration/a):this},s.paused=function(b){if(b===!1&&this._paused)for(var c=this._first;c;)c._startTime===this._time&&"isPause"===c.data&&(c._rawPrevTime=0),c=c._next;return a.prototype.paused.apply(this,arguments)},s.usesFrames=function(){for(var b=this._timeline;b._timeline;)b=b._timeline;return b===a._rootFramesTimeline},s.rawTime=function(a){return a&&(this._paused||this._repeat&&this.time()>0&&this.totalProgress()<1)?this._totalTime%(this._duration+this._repeatDelay):this._paused?this._totalTime:(this._timeline.rawTime(a)-this._startTime)*this._timeScale},d},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(a,b,c){var d=function(b){a.call(this,b),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=!!this.vars.yoyo,this._dirty=!0},e=1e-8,f=b._internals,g=f.lazyTweens,h=f.lazyRender,i=_gsScope._gsDefine.globals,j=new c(null,null,1,0),k=d.prototype=new a;return k.constructor=d,k.kill()._gc=!1,d.version="2.1.3",k.invalidate=function(){return this._yoyo=!!this.vars.yoyo,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),a.prototype.invalidate.call(this)},k.addCallback=function(a,c,d,e){return this.add(b.delayedCall(0,a,d,e),c)},k.removeCallback=function(a,b){if(a)if(null==b)this._kill(null,a);else for(var c=this.getTweensOf(a,!1),d=c.length,e=this._parseTimeOrLabel(b);--d>-1;)c[d]._startTime===e&&c[d]._enabled(!1,!1);return this},k.removePause=function(b){return this.removeCallback(a._internals.pauseCallback,b)},k.tweenTo=function(a,c){c=c||{};var d,e,f,g={ease:j,useFrames:this.usesFrames(),immediateRender:!1,lazy:!1},h=c.repeat&&i.TweenMax||b;for(e in c)g[e]=c[e];return g.time=this._parseTimeOrLabel(a),d=Math.abs(Number(g.time)-this._time)/this._timeScale||.001,f=new h(this,d,g),g.onStart=function(){f.target.paused(!0),f.vars.time===f.target.time()||d!==f.duration()||f.isFromTo||f.duration(Math.abs(f.vars.time-f.target.time())/f.target._timeScale).render(f.time(),!0,!0),c.onStart&&c.onStart.apply(c.onStartScope||c.callbackScope||f,c.onStartParams||[])},f},k.tweenFromTo=function(a,b,c){c=c||{},a=this._parseTimeOrLabel(a),c.startAt={onComplete:this.seek,onCompleteParams:[a],callbackScope:this},c.immediateRender=c.immediateRender!==!1;var d=this.tweenTo(b,c);return d.isFromTo=1,d.duration(Math.abs(d.vars.time-a)/this._timeScale||.001)},k.render=function(a,b,c){this._gc&&this._enabled(!0,!1);var d,f,i,j,k,l,m,n,o,p=this,q=p._time,r=p._dirty?p.totalDuration():p._totalDuration,s=p._duration,t=p._totalTime,u=p._startTime,v=p._timeScale,w=p._rawPrevTime,x=p._paused,y=p._cycle;if(q!==p._time&&(a+=p._time-q),a>=r-e&&a>=0)p._locked||(p._totalTime=r,p._cycle=p._repeat),p._reversed||p._hasPausedChild()||(f=!0,j="onComplete",k=!!p._timeline.autoRemoveChildren,0===p._duration&&(0>=a&&a>=-e||0>w||w===e)&&w!==a&&p._first&&(k=!0,w>e&&(j="onReverseComplete"))),p._rawPrevTime=p._duration||!b||a||p._rawPrevTime===a?a:e,p._yoyo&&1&p._cycle?p._time=a=0:(p._time=s,a=s+1e-4);else if(e>a)if(p._locked||(p._totalTime=p._cycle=0),p._time=0,a>-e&&(a=0),(0!==q||0===s&&w!==e&&(w>0||0>a&&w>=0)&&!p._locked)&&(j="onReverseComplete",f=p._reversed),0>a)p._active=!1,p._timeline.autoRemoveChildren&&p._reversed?(k=f=!0,j="onReverseComplete"):w>=0&&p._first&&(k=!0),p._rawPrevTime=a;else{if(p._rawPrevTime=s||!b||a||p._rawPrevTime===a?a:e,0===a&&f)for(d=p._first;d&&0===d._startTime;)d._duration||(f=!1),d=d._next;a=0,p._initted||(k=!0)}else 0===s&&0>w&&(k=!0),p._time=p._rawPrevTime=a,p._locked||(p._totalTime=a,0!==p._repeat&&(l=s+p._repeatDelay,p._cycle=p._totalTime/l>>0,p._cycle&&p._cycle===p._totalTime/l&&a>=t&&p._cycle--,p._time=p._totalTime-p._cycle*l,p._yoyo&&1&p._cycle&&(p._time=s-p._time),p._time>s?(p._time=s,a=s+1e-4):p._time<0?p._time=a=0:a=p._time));if(p._hasPause&&!p._forcingPlayhead&&!b){if(a=p._time,a>q||p._repeat&&y!==p._cycle)for(d=p._first;d&&d._startTime<=a&&!m;)d._duration||"isPause"!==d.data||d.ratio||0===d._startTime&&0===p._rawPrevTime||(m=d),d=d._next;else for(d=p._last;d&&d._startTime>=a&&!m;)d._duration||"isPause"===d.data&&d._rawPrevTime>0&&(m=d),d=d._prev;m&&(o=p._startTime+(p._reversed?p._duration-m._startTime:m._startTime)/p._timeScale,m._startTime<s&&(p._time=p._rawPrevTime=a=m._startTime,p._totalTime=a+p._cycle*(p._totalDuration+p._repeatDelay)))}if(p._cycle!==y&&!p._locked){var z=p._yoyo&&0!==(1&y),A=z===(p._yoyo&&0!==(1&p._cycle)),B=p._totalTime,C=p._cycle,D=p._rawPrevTime,E=p._time;if(p._totalTime=y*s,p._cycle<y?z=!z:p._totalTime+=s,p._time=q,p._rawPrevTime=0===s?w-1e-4:w,p._cycle=y,p._locked=!0,q=z?0:s,p.render(q,b,0===s),b||p._gc||p.vars.onRepeat&&(p._cycle=C,p._locked=!1,p._callback("onRepeat")),q!==p._time)return;if(A&&(p._cycle=y,p._locked=!0,q=z?s+1e-4:-1e-4,p.render(q,!0,!1)),p._locked=!1,p._paused&&!x)return;p._time=E,p._totalTime=B,p._cycle=C,p._rawPrevTime=D}if(!(p._time!==q&&p._first||c||k||m))return void(t!==p._totalTime&&p._onUpdate&&(b||p._callback("onUpdate")));if(p._initted||(p._initted=!0),p._active||!p._paused&&p._totalTime!==t&&a>0&&(p._active=!0),0===t&&p.vars.onStart&&(0===p._totalTime&&p._totalDuration||b||p._callback("onStart")),n=p._time,n>=q)for(d=p._first;d&&(i=d._next,n===p._time&&(!p._paused||x));)(d._active||d._startTime<=p._time&&!d._paused&&!d._gc)&&(m===d&&(p.pause(),p._pauseTime=o),d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)),d=i;else for(d=p._last;d&&(i=d._prev,n===p._time&&(!p._paused||x));){if(d._active||d._startTime<=q&&!d._paused&&!d._gc){if(m===d){for(m=d._prev;m&&m.endTime()>p._time;)m.render(m._reversed?m.totalDuration()-(a-m._startTime)*m._timeScale:(a-m._startTime)*m._timeScale,b,c),m=m._prev;m=null,p.pause(),p._pauseTime=o}d._reversed?d.render((d._dirty?d.totalDuration():d._totalDuration)-(a-d._startTime)*d._timeScale,b,c):d.render((a-d._startTime)*d._timeScale,b,c)}d=i}p._onUpdate&&(b||(g.length&&h(),p._callback("onUpdate"))),j&&(p._locked||p._gc||(u===p._startTime||v!==p._timeScale)&&(0===p._time||r>=p.totalDuration())&&(f&&(g.length&&h(),p._timeline.autoRemoveChildren&&p._enabled(!1,!1),p._active=!1),!b&&p.vars[j]&&p._callback(j)))},k.getActive=function(a,b,c){var d,e,f=[],g=this.getChildren(a||null==a,b||null==a,!!c),h=0,i=g.length;for(d=0;i>d;d++)e=g[d],e.isActive()&&(f[h++]=e);return f},k.getLabelAfter=function(a){a||0!==a&&(a=this._time);var b,c=this.getLabelsArray(),d=c.length;for(b=0;d>b;b++)if(c[b].time>a)return c[b].name;return null},k.getLabelBefore=function(a){null==a&&(a=this._time);for(var b=this.getLabelsArray(),c=b.length;--c>-1;)if(b[c].time<a)return b[c].name;return null},k.getLabelsArray=function(){var a,b=[],c=0;for(a in this._labels)b[c++]={time:this._labels[a],name:a};return b.sort(function(a,b){return a.time-b.time}),b},k.invalidate=function(){return this._locked=!1,a.prototype.invalidate.call(this)},k.progress=function(a,b){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-a:a)+this._cycle*(this._duration+this._repeatDelay),b):this._time/this.duration()||0},k.totalProgress=function(a,b){return arguments.length?this.totalTime(this.totalDuration()*a,b):this._totalTime/this.totalDuration()||0},k.totalDuration=function(b){return arguments.length?-1!==this._repeat&&b?this.timeScale(this.totalDuration()/b):this:(this._dirty&&(a.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},k.time=function(a,b){if(!arguments.length)return this._time;this._dirty&&this.totalDuration();var c=this._duration,d=this._cycle,e=d*(c+this._repeatDelay);return a>c&&(a=c),this.totalTime(this._yoyo&&1&d?c-a+e:this._repeat?a+e:a,b)},k.repeat=function(a){return arguments.length?(this._repeat=a,this._uncache(!0)):this._repeat},k.repeatDelay=function(a){return arguments.length?(this._repeatDelay=a,this._uncache(!0)):this._repeatDelay},k.yoyo=function(a){return arguments.length?(this._yoyo=a,this):this._yoyo},k.currentLabel=function(a){return arguments.length?this.seek(a,!0):this.getLabelBefore(this._time+e)},d},!0),function(){var a=180/Math.PI,b=[],c=[],d=[],e={},f=_gsScope._gsDefine.globals,g=function(a,b,c,d){c===d&&(c=d-(d-b)/1e6),a===b&&(b=a+(c-a)/1e6),this.a=a,this.b=b,this.c=c,this.d=d,this.da=d-a,this.ca=c-a,this.ba=b-a},h=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",i=function(a,b,c,d){var e={a:a},f={},g={},h={c:d},i=(a+b)/2,j=(b+c)/2,k=(c+d)/2,l=(i+j)/2,m=(j+k)/2,n=(m-l)/8;return e.b=i+(a-i)/4,f.b=l+n,e.c=f.a=(e.b+f.b)/2,f.c=g.a=(l+m)/2,g.b=m-n,h.b=k+(d-k)/4,g.c=h.a=(g.b+h.b)/2,[e,f,g,h]},j=function(a,e,f,g,h){var j,k,l,m,n,o,p,q,r,s,t,u,v,w=a.length-1,x=0,y=a[0].a;for(j=0;w>j;j++)n=a[x],k=n.a,l=n.d,m=a[x+1].d,h?(t=b[j],u=c[j],v=(u+t)*e*.25/(g?.5:d[j]||.5),o=l-(l-k)*(g?.5*e:0!==t?v/t:0),p=l+(m-l)*(g?.5*e:0!==u?v/u:0),q=l-(o+((p-o)*(3*t/(t+u)+.5)/4||0))):(o=l-(l-k)*e*.5,p=l+(m-l)*e*.5,q=l-(o+p)/2),o+=q,p+=q,n.c=r=o,0!==j?n.b=y:n.b=y=n.a+.6*(n.c-n.a),n.da=l-k,n.ca=r-k,n.ba=y-k,f?(s=i(k,y,r,l),a.splice(x,1,s[0],s[1],s[2],s[3]),x+=4):x++,y=p;n=a[x],n.b=y,n.c=y+.4*(n.d-y),n.da=n.d-n.a,n.ca=n.c-n.a,n.ba=y-n.a,f&&(s=i(n.a,y,n.c,n.d),a.splice(x,1,s[0],s[1],s[2],s[3]))},k=function(a,d,e,f){var h,i,j,k,l,m,n=[];if(f)for(a=[f].concat(a),i=a.length;--i>-1;)"string"==typeof(m=a[i][d])&&"="===m.charAt(1)&&(a[i][d]=f[d]+Number(m.charAt(0)+m.substr(2)));if(h=a.length-2,0>h)return n[0]=new g(a[0][d],0,0,a[0][d]),n;for(i=0;h>i;i++)j=a[i][d],k=a[i+1][d],n[i]=new g(j,0,0,k),e&&(l=a[i+2][d],b[i]=(b[i]||0)+(k-j)*(k-j),c[i]=(c[i]||0)+(l-k)*(l-k));return n[i]=new g(a[i][d],0,0,a[i+1][d]),n},l=function(a,f,g,i,l,m){var n,o,p,q,r,s,t,u,v={},w=[],x=m||a[0];l="string"==typeof l?","+l+",":h,null==f&&(f=1);for(o in a[0])w.push(o);if(a.length>1){for(u=a[a.length-1],t=!0,n=w.length;--n>-1;)if(o=w[n],Math.abs(x[o]-u[o])>.05){t=!1;break}t&&(a=a.concat(),m&&a.unshift(m),a.push(a[1]),m=a[a.length-3])}for(b.length=c.length=d.length=0,n=w.length;--n>-1;)o=w[n],e[o]=-1!==l.indexOf(","+o+","),v[o]=k(a,o,e[o],m);for(n=b.length;--n>-1;)b[n]=Math.sqrt(b[n]),c[n]=Math.sqrt(c[n]);if(!i){for(n=w.length;--n>-1;)if(e[o])for(p=v[w[n]], 8798s=p.length-1,q=0;s>q;q++)r=p[q+1].da/c[q]+p[q].da/b[q]||0,d[q]=(d[q]||0)+r*r;for(n=d.length;--n>-1;)d[n]=Math.sqrt(d[n])}for(n=w.length,q=g?4:1;--n>-1;)o=w[n],p=v[o],j(p,f,g,i,e[o]),t&&(p.splice(0,q),p.splice(p.length-q,q));return v},m=function(a,b,c){b=b||"soft";var d,e,f,h,i,j,k,l,m,n,o,p={},q="cubic"===b?3:2,r="soft"===b,s=[];if(r&&c&&(a=[c].concat(a)),null==a||a.length<q+1)throw"invalid Bezier data";for(m in a[0])s.push(m);for(j=s.length;--j>-1;){for(m=s[j],p[m]=i=[],n=0,l=a.length,k=0;l>k;k++)d=null==c?a[k][m]:"string"==typeof(o=a[k][m])&&"="===o.charAt(1)?c[m]+Number(o.charAt(0)+o.substr(2)):Number(o),r&&k>1&&l-1>k&&(i[n++]=(d+i[n-2])/2),i[n++]=d;for(l=n-q+1,n=0,k=0;l>k;k+=q)d=i[k],e=i[k+1],f=i[k+2],h=2===q?0:i[k+3],i[n++]=o=3===q?new g(d,e,f,h):new g(d,(2*e+d)/3,(2*e+f)/3,f);i.length=n}return p},n=function(a,b,c){for(var d,e,f,g,h,i,j,k,l,m,n,o=1/c,p=a.length;--p>-1;)for(m=a[p],f=m.a,g=m.d-f,h=m.c-f,i=m.b-f,d=e=0,k=1;c>=k;k++)j=o*k,l=1-j,d=e-(e=(j*j*g+3*l*(j*h+l*i))*j),n=p*c+k-1,b[n]=(b[n]||0)+d*d},o=function(a,b){b=b>>0||6;var c,d,e,f,g=[],h=[],i=0,j=0,k=b-1,l=[],m=[];for(c in a)n(a[c],g,b);for(e=g.length,d=0;e>d;d++)i+=Math.sqrt(g[d]),f=d%b,m[f]=i,f===k&&(j+=i,f=d/b>>0,l[f]=m,h[f]=j,i=0,m=[]);return{length:j,lengths:h,segments:l}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.9",API:2,global:!0,init:function(a,b,c){this._target=a,b instanceof Array&&(b={values:b}),this._func={},this._mod={},this._props=[],this._timeRes=null==b.timeResolution?6:parseInt(b.timeResolution,10);var d,e,f,g,h,i=b.values||[],j={},k=i[0],n=b.autoRotate||c.vars.orientToBezier;this._autoRotate=n?n instanceof Array?n:[["x","y","rotation",n===!0?0:Number(n)||0]]:null;for(d in k)this._props.push(d);for(f=this._props.length;--f>-1;)d=this._props[f],this._overwriteProps.push(d),e=this._func[d]="function"==typeof a[d],j[d]=e?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]():parseFloat(a[d]),h||j[d]!==i[0][d]&&(h=j);if(this._beziers="cubic"!==b.type&&"quadratic"!==b.type&&"soft"!==b.type?l(i,isNaN(b.curviness)?1:b.curviness,!1,"thruBasic"===b.type,b.correlate,h):m(i,b.type,j),this._segCount=this._beziers[d].length,this._timeRes){var p=o(this._beziers,this._timeRes);this._length=p.length,this._lengths=p.lengths,this._segments=p.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(n=this._autoRotate)for(this._initialRotations=[],n[0]instanceof Array||(this._autoRotate=n=[n]),f=n.length;--f>-1;){for(g=0;3>g;g++)d=n[f][g],this._func[d]="function"==typeof a[d]?a[d.indexOf("set")||"function"!=typeof a["get"+d.substr(3)]?d:"get"+d.substr(3)]:!1;d=n[f][2],this._initialRotations[f]=(this._func[d]?this._func[d].call(this._target):this._target[d])||0,this._overwriteProps.push(d)}return this._startRatio=c.vars.runBackwards?1:0,!0},set:function(b){var c,d,e,f,g,h,i,j,k,l,m,n=this._segCount,o=this._func,p=this._target,q=b!==this._startRatio;if(this._timeRes){if(k=this._lengths,l=this._curSeg,m=b*this._length,e=this._li,m>this._l2&&n-1>e){for(j=n-1;j>e&&(this._l2=k[++e])<=m;);this._l1=k[e-1],this._li=e,this._curSeg=l=this._segments[e],this._s2=l[this._s1=this._si=0]}else if(m<this._l1&&e>0){for(;e>0&&(this._l1=k[--e])>=m;);0===e&&m<this._l1?this._l1=0:e++,this._l2=k[e],this._li=e,this._curSeg=l=this._segments[e],this._s1=l[(this._si=l.length-1)-1]||0,this._s2=l[this._si]}if(c=e,m-=this._l1,e=this._si,m>this._s2&&e<l.length-1){for(j=l.length-1;j>e&&(this._s2=l[++e])<=m;);this._s1=l[e-1],this._si=e}else if(m<this._s1&&e>0){for(;e>0&&(this._s1=l[--e])>=m;);0===e&&m<this._s1?this._s1=0:e++,this._s2=l[e],this._si=e}h=1===b?1:(e+(m-this._s1)/(this._s2-this._s1))*this._prec||0}else c=0>b?0:b>=1?n-1:n*b>>0,h=(b-c*(1/n))*n;for(d=1-h,e=this._props.length;--e>-1;)f=this._props[e],g=this._beziers[f][c],i=(h*h*g.da+3*d*(h*g.ca+d*g.ba))*h+g.a,this._mod[f]&&(i=this._mod[f](i,p)),o[f]?p[f](i):p[f]=i;if(this._autoRotate){var r,s,t,u,v,w,x,y=this._autoRotate;for(e=y.length;--e>-1;)f=y[e][2],w=y[e][3]||0,x=y[e][4]===!0?1:a,g=this._beziers[y[e][0]],r=this._beziers[y[e][1]],g&&r&&(g=g[c],r=r[c],s=g.a+(g.b-g.a)*h,u=g.b+(g.c-g.b)*h,s+=(u-s)*h,u+=(g.c+(g.d-g.c)*h-u)*h,t=r.a+(r.b-r.a)*h,v=r.b+(r.c-r.b)*h,t+=(v-t)*h,v+=(r.c+(r.d-r.c)*h-v)*h,i=q?Math.atan2(v-t,u-s)*x+w:this._initialRotations[e],this._mod[f]&&(i=this._mod[f](i,p)),o[f]?p[f](i):p[f]=i)}}}),q=p.prototype;p.bezierThrough=l,p.cubicToQuadratic=i,p._autoCSS=!0,p.quadraticToCubic=function(a,b,c){return new g(a,(2*b+a)/3,(2*b+c)/3,c)},p._cssRegister=function(){var a=f.CSSPlugin;if(a){var b=a._internals,c=b._parseToProxy,d=b._setPluginRatio,e=b.CSSPropTween;b._registerComplexSpecialProp("bezier",{parser:function(a,b,f,g,h,i){b instanceof Array&&(b={values:b}),i=new p;var j,k,l,m=b.values,n=m.length-1,o=[],q={};if(0>n)return h;for(j=0;n>=j;j++)l=c(a,m[j],g,h,i,n!==j),o[j]=l.end;for(k in b)q[k]=b[k];return q.values=o,h=new e(a,"bezier",0,0,l.pt,2),h.data=l,h.plugin=i,h.setRatio=d,0===q.autoRotate&&(q.autoRotate=!0),!q.autoRotate||q.autoRotate instanceof Array||(j=q.autoRotate===!0?0:Number(q.autoRotate),q.autoRotate=null!=l.end.left?[["left","top","rotation",j,!1]]:null!=l.end.x?[["x","y","rotation",j,!1]]:!1),q.autoRotate&&(g._transform||g._enableTransforms(!1),l.autoRotate=g._target._gsTransform,l.proxy.rotation=l.autoRotate.rotation||0,g._overwriteProps.push("rotation")),i._onInitTween(l.proxy,q,g._tween),h}})}},q._mod=function(a){for(var b,c=this._overwriteProps,d=c.length;--d>-1;)b=a[c[d]],b&&"function"==typeof b&&(this._mod[c[d]]=b)},q._kill=function(a){var b,c,d=this._props;for(b in this._beziers)if(b in a)for(delete this._beziers[b],delete this._func[b],c=d.length;--c>-1;)d[c]===b&&d.splice(c,1);if(d=this._autoRotate)for(c=d.length;--c>-1;)a[d[c][2]]&&d.splice(c,1);return this._super._kill.call(this,a)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(a,b){var c,d,e,f,g=function(){a.call(this,"css"),this._overwriteProps.length=0,this.setRatio=g.prototype.setRatio},h=_gsScope._gsDefine.globals,i={},j=g.prototype=new a("css");j.constructor=g,g.version="2.1.3",g.API=2,g.defaultTransformPerspective=0,g.defaultSkewType="compensated",g.defaultSmoothOrigin=!0,j="px",g.suffixMap={top:j,right:j,bottom:j,left:j,width:j,height:j,fontSize:j,padding:j,margin:j,perspective:j,lineHeight:""};var k,l,m,n,o,p,q,r,s=/(?:\-|\.|\b)(\d|\.|e\-)+/g,t=/(?:\d|\-\d|\.\d|\-\.\d|\+=\d|\-=\d|\+=.\d|\-=\.\d)+/g,u=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b)/gi,v=/(?:\+=|\-=|\-|\b)[\d\-\.]+[a-zA-Z0-9]*(?:%|\b),?/gi,w=/(?![+-]?\d*\.?\d+|[+-]|e[+-]\d+)[^0-9]/g,x=/(?:\d|\-|\+|=|#|\.)*/g,y=/opacity *= *([^)]*)/i,z=/opacity:([^;]*)/i,A=/alpha\(opacity *=.+?\)/i,B=/^(rgb|hsl)/,C=/([A-Z])/g,D=/-([a-z])/gi,E=/(^(?:url\(\"|url\())|(?:(\"\))$|\)$)/gi,F=function(a,b){return b.toUpperCase()},G=/(?:Left|Right|Width)/i,H=/(M11|M12|M21|M22)=[\d\-\.e]+/gi,I=/progid\:DXImageTransform\.Microsoft\.Matrix\(.+?\)/i,J=/,(?=[^\)]*(?:\(|$))/gi,K=/[\s,\(]/i,L=Math.PI/180,M=180/Math.PI,N={},O={style:{}},P=_gsScope.document||{createElement:function(){return O}},Q=function(a,b){var c=P.createElementNS?P.createElementNS(b||"http://www.w3.org/1999/xhtml",a):P.createElement(a);return c.style?c:P.createElement(a)},R=Q("div"),S=Q("img"),T=g._internals={_specialProps:i},U=(_gsScope.navigator||{}).userAgent||"",V=function(){var a=U.indexOf("Android"),b=Q("a");return m=-1!==U.indexOf("Safari")&&-1===U.indexOf("Chrome")&&(-1===a||parseFloat(U.substr(a+8,2))>3),o=m&&parseFloat(U.substr(U.indexOf("Version/")+8,2))<6,n=-1!==U.indexOf("Firefox"),(/MSIE ([0-9]{1,}[\.0-9]{0,})/.exec(U)||/Trident\/.*rv:([0-9]{1,}[\.0-9]{0,})/.exec(U))&&(p=parseFloat(RegExp.$1)),b?(b.style.cssText="top:1px;opacity:.55;",/^0.55/.test(b.style.opacity)):!1}(),W=function(a){return y.test("string"==typeof a?a:(a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100:1},X=function(a){_gsScope.console&&console.log(a)},Y="",Z="",$=function(a,b){b=b||R;var c,d,e=b.style;if(void 0!==e[a])return a;for(a=a.charAt(0).toUpperCase()+a.substr(1),c=["O","Moz","ms","Ms","Webkit"],d=5;--d>-1&&void 0===e[c[d]+a];);return d>=0?(Z=3===d?"ms":c[d],Y="-"+Z.toLowerCase()+"-",Z+a):null},_="undefined"!=typeof window?window:P.defaultView||{getComputedStyle:function(){}},aa=function(a){return _.getComputedStyle(a)},ba=g.getStyle=function(a,b,c,d,e){var f;return V||"opacity"!==b?(!d&&a.style[b]?f=a.style[b]:(c=c||aa(a))?f=c[b]||c.getPropertyValue(b)||c.getPropertyValue(b.replace(C,"-$1").toLowerCase()):a.currentStyle&&(f=a.currentStyle[b]),null==e||f&&"none"!==f&&"auto"!==f&&"auto auto"!==f?f:e):W(a)},ca=T.convertToPixels=function(a,c,d,e,f){if("px"===e||!e&&"lineHeight"!==c)return d;if("auto"===e||!d)return 0;var h,i,j,k=G.test(c),l=a,m=R.style,n=0>d,o=1===d;if(n&&(d=-d),o&&(d*=100),"lineHeight"!==c||e)if("%"===e&&-1!==c.indexOf("border"))h=d/100*(k?a.clientWidth:a.clientHeight);else{if(m.cssText="border:0 solid red;position:"+ba(a,"position")+";line-height:0;","%"!==e&&l.appendChild&&"v"!==e.charAt(0)&&"rem"!==e)m[k?"borderLeftWidth":"borderTopWidth"]=d+e;else{if(l=a.parentNode||P.body,-1!==ba(l,"display").indexOf("flex")&&(m.position="absolute"),i=l._gsCache,j=b.ticker.frame,i&&k&&i.time===j)return i.width*d/100;m[k?"width":"height"]=d+e}l.appendChild(R),h=parseFloat(R[k?"offsetWidth":"offsetHeight"]),l.removeChild(R),k&&"%"===e&&g.cacheWidths!==!1&&(i=l._gsCache=l._gsCache||{},i.time=j,i.width=h/d*100),0!==h||f||(h=ca(a,c,d,e,!0))}else i=aa(a).lineHeight,a.style.lineHeight=d,h=parseFloat(aa(a).lineHeight),a.style.lineHeight=i;return o&&(h/=100),n?-h:h},da=T.calculateOffset=function(a,b,c){if("absolute"!==ba(a,"position",c))return 0;var d="left"===b?"Left":"Top",e=ba(a,"margin"+d,c);return a["offset"+d]-(ca(a,b,parseFloat(e),e.replace(x,""))||0)},ea=function(a,b){var c,d,e,f={};if(b=b||aa(a,null))if(c=b.length)for(;--c>-1;)e=b[c],(-1===e.indexOf("-transform")||Fa===e)&&(f[e.replace(D,F)]=b.getPropertyValue(e));else for(c in b)(-1===c.indexOf("Transform")||Ea===c)&&(f[c]=b[c]);else if(b=a.currentStyle||a.style)for(c in b)"string"==typeof c&&void 0===f[c]&&(f[c.replace(D,F)]=b[c]);return V||(f.opacity=W(a)),d=Ta(a,b,!1),f.rotation=d.rotation,f.skewX=d.skewX,f.scaleX=d.scaleX,f.scaleY=d.scaleY,f.x=d.x,f.y=d.y,Ha&&(f.z=d.z,f.rotationX=d.rotationX,f.rotationY=d.rotationY,f.scaleZ=d.scaleZ),f.filters&&delete f.filters,f},fa=function(a,b,c,d,e){var f,g,h,i={},j=a.style;for(g in c)"cssText"!==g&&"length"!==g&&isNaN(g)&&(b[g]!==(f=c[g])||e&&e[g])&&-1===g.indexOf("Origin")&&("number"==typeof f||"string"==typeof f)&&(i[g]="auto"!==f||"left"!==g&&"top"!==g?""!==f&&"auto"!==f&&"none"!==f||"string"!=typeof b[g]||""===b[g].replace(w,"")?f:0:da(a,g),void 0!==j[g]&&(h=new ua(j,g,j[g],h)));if(d)for(g in d)"className"!==g&&(i[g]=d[g]);return{difs:i,firstMPT:h}},ga={width:["Left","Right"],height:["Top","Bottom"]},ha=["marginLeft","marginRight","marginTop","marginBottom"],ia=function(a,b,c){if("svg"===(a.nodeName+"").toLowerCase())return(c||aa(a))[b]||0;if(a.getCTM&&Qa(a))return a.getBBox()[b]||0;var d=parseFloat("width"===b?a.offsetWidth:a.offsetHeight),e=ga[b],f=e.length;for(c=c||aa(a,null);--f>-1;)d-=parseFloat(ba(a,"padding"+e[f],c,!0))||0,d-=parseFloat(ba(a,"border"+e[f]+"Width",c,!0))||0;return d},ja=function(a,b){if("contain"===a||"auto"===a||"auto auto"===a)return a+" ";(null==a||""===a)&&(a="0 0");var c,d=a.split(" "),e=-1!==a.indexOf("left")?"0%":-1!==a.indexOf("right")?"100%":d[0],f=-1!==a.indexOf("top")?"0%":-1!==a.indexOf("bottom")?"100%":d[1];if(d.length>3&&!b){for(d=a.split(", ").join(",").split(","),a=[],c=0;c<d.length;c++)a.push(ja(d[c]));return a.join(",")}return null==f?f="center"===e?"50%":"0":"center"===f&&(f="50%"),("center"===e||isNaN(parseFloat(e))&&-1===(e+"").indexOf("="))&&(e="50%"),a=e+" "+f+(d.length>2?" "+d[2]:""),b&&(b.oxp=-1!==e.indexOf("%"),b.oyp=-1!==f.indexOf("%"),b.oxr="="===e.charAt(1),b.oyr="="===f.charAt(1),b.ox=parseFloat(e.replace(w,"")),b.oy=parseFloat(f.replace(w,"")),b.v=a),b||a},ka=function(a,b){return"function"==typeof a&&(a=a(r,q)),"string"==typeof a&&"="===a.charAt(1)?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2)):parseFloat(a)-parseFloat(b)||0},la=function(a,b){"function"==typeof a&&(a=a(r,q));var c="string"==typeof a&&"="===a.charAt(1);return"string"==typeof a&&"v"===a.charAt(a.length-2)&&(a=(c?a.substr(0,2):0)+window["inner"+("vh"===a.substr(-2)?"Height":"Width")]*(parseFloat(c?a.substr(2):a)/100)),null==a?b:c?parseInt(a.charAt(0)+"1",10)*parseFloat(a.substr(2))+b:parseFloat(a)||0},ma=function(a,b,c,d){var e,f,g,h,i,j=1e-6;return"function"==typeof a&&(a=a(r,q)),null==a?h=b:"number"==typeof a?h=a:(e=360,f=a.split("_"),i="="===a.charAt(1),g=(i?parseInt(a.charAt(0)+"1",10)*parseFloat(f[0].substr(2)):parseFloat(f[0]))*(-1===a.indexOf("rad")?1:M)-(i?0:b),f.length&&(d&&(d[c]=b+g),-1!==a.indexOf("short")&&(g%=e,g!==g%(e/2)&&(g=0>g?g+e:g-e)),-1!==a.indexOf("_cw")&&0>g?g=(g+9999999999*e)%e-(g/e|0)*e:-1!==a.indexOf("ccw")&&g>0&&(g=(g-9999999999*e)%e-(g/e|0)*e)),h=b+g),j>h&&h>-j&&(h=0),h},na={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},oa=function(a,b,c){return a=0>a?a+1:a>1?a-1:a,255*(1>6*a?b+(c-b)*a*6:.5>a?c:2>3*a?b+(c-b)*(2/3-a)*6:b)+.5|0},pa=g.parseColor=function(a,b){var c,d,e,f,g,h,i,j,k,l,m;if(a)if("number"==typeof a)c=[a>>16,a>>8&255,255&a];else{if(","===a.charAt(a.length-1)&&(a=a.substr(0,a.length-1)),na[a])c=na[a];else if("#"===a.charAt(0))4===a.length&&(d=a.charAt(1),e=a.charAt(2),f=a.charAt(3),a="#"+d+d+e+e+f+f),a=parseInt(a.substr(1),16),c=[a>>16,a>>8&255,255&a];else if("hsl"===a.substr(0,3))if(c=m=a.match(s),b){if(-1!==a.indexOf("="))return a.match(t)}else g=Number(c[0])%360/360,h=Number(c[1])/100,i=Number(c[2])/100,e=.5>=i?i*(h+1):i+h-i*h,d=2*i-e,c.length>3&&(c[3]=Number(c[3])),c[0]=oa(g+1/3,d,e),c[1]=oa(g,d,e),c[2]=oa(g-1/3,d,e);else c=a.match(s)||na.transparent;c[0]=Number(c[0]),c[1]=Number(c[1]),c[2]=Number(c[2]),c.length>3&&(c[3]=Number(c[3]))}else c=na.black;return b&&!m&&(d=c[0]/255,e=c[1]/255,f=c[2]/255,j=Math.max(d,e,f),k=Math.min(d,e,f),i=(j+k)/2,j===k?g=h=0:(l=j-k,h=i>.5?l/(2-j-k):l/(j+k),g=j===d?(e-f)/l+(f>e?6:0):j===e?(f-d)/l+2:(d-e)/l+4,g*=60),c[0]=g+.5|0,c[1]=100*h+.5|0,c[2]=100*i+.5|0),c},qa=function(a,b){var c,d,e,f=a.match(ra)||[],g=0,h="";if(!f.length)return a;for(c=0;c<f.length;c++)d=f[c],e=a.substr(g,a.indexOf(d,g)-g),g+=e.length+d.length,d=pa(d,b),3===d.length&&d.push(1),h+=e+(b?"hsla("+d[0]+","+d[1]+"%,"+d[2]+"%,"+d[3]:"rgba("+d.join(","))+")";return h+a.substr(g)},ra="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3}){1,2}\\b";for(j in na)ra+="|"+j+"\\b";ra=new RegExp(ra+")","gi"),g.colorStringFilter=function(a){var b,c=a[0]+" "+a[1];ra.test(c)&&(b=-1!==c.indexOf("hsl(")||-1!==c.indexOf("hsla("),a[0]=qa(a[0],b),a[1]=qa(a[1],b)),ra.lastIndex=0},b.defaultStringFilter||(b.defaultStringFilter=g.colorStringFilter);var sa=function(a,b,c,d){if(null==a)return function(a){return a};var e,f=b?(a.match(ra)||[""])[0]:"",g=a.split(f).join("").match(u)||[],h=a.substr(0,a.indexOf(g[0])),i=")"===a.charAt(a.length-1)?")":"",j=-1!==a.indexOf(" ")?" ":",",k=g.length,l=k>0?g[0].replace(s,""):"";return k?e=b?function(a){var b,m,n,o;if("number"==typeof a)a+=l;else if(d&&J.test(a)){for(o=a.replace(J,"|").split("|"),n=0;n<o.length;n++)o[n]=e(o[n]);return o.join(",")}if(b=(a.match(ra)||[f])[0],m=a.split(b).join("").match(u)||[],n=m.length,k>n--)for(;++n<k;)m[n]=c?m[(n-1)/2|0]:g[n];return h+m.join(j)+j+b+i+(-1!==a.indexOf("inset")?" inset":"")}:function(a){var b,f,m;if("number"==typeof a)a+=l;else if(d&&J.test(a)){for(f=a.replace(J,"|").split("|"),m=0;m<f.length;m++)f[m]=e(f[m]);return f.join(",")}if(b=a.match(","===j?u:v)||[],m=b.length,k>m--)for(;++m<k;)b[m]=c?b[(m-1)/2|0]:g[m];return(h&&"none"!==a?a.substr(0,a.indexOf(b[0]))||h:h)+b.join(j)+i}:function(a){return a}},ta=function(a){return a=a.split(","),function(b,c,d,e,f,g,h){var i,j=(c+"").split(" ");for(h={},i=0;4>i;i++)h[a[i]]=j[i]=j[i]||j[(i-1)/2>>0];return e.parse(b,h,f,g)}},ua=(T._setPluginRatio=function(a){this.plugin.setRatio(a);for(var b,c,d,e,f,g=this.data,h=g.proxy,i=g.firstMPT,j=1e-6;i;)b=h[i.v],i.r?b=i.r(b):j>b&&b>-j&&(b=0),i.t[i.p]=b,i=i._next;if(g.autoRotate&&(g.autoRotate.rotation=g.mod?g.mod.call(this._tween,h.rotation,this.t,this._tween):h.rotation),1===a||0===a)for(i=g.firstMPT,f=1===a?"e":"b";i;){if(c=i.t,c.type){if(1===c.type){for(e=c.xs0+c.s+c.xs1,d=1;d<c.l;d++)e+=c["xn"+d]+c["xs"+(d+1)];c[f]=e}}else c[f]=c.s+c.xs0;i=i._next}},function(a,b,c,d,e){this.t=a,this.p=b,this.v=c,this.r=e,d&&(d._prev=this,this._next=d)}),va=(T._parseToProxy=function(a,b,c,d,e,f){var g,h,i,j,k,l=d,m={},n={},o=c._transform,p=N;for(c._transform=null,N=b,d=k=c.parse(a,b,d,e),N=p,f&&(c._transform=o,l&&(l._prev=null,l._prev&&(l._prev._next=null)));d&&d!==l;){if(d.type<=1&&(h=d.p,n[h]=d.s+d.c,m[h]=d.s,f||(j=new ua(d,"s",h,j,d.r),d.c=0),1===d.type))for(g=d.l;--g>0;)i="xn"+g,h=d.p+"_"+i,n[h]=d.data[i],m[h]=d[i],f||(j=new ua(d,i,h,j,d.rxp[i]));d=d._next}return{proxy:m,end:n,firstMPT:j,pt:k}},T.CSSPropTween=function(a,b,d,e,g,h,i,j,k,l,m){this.t=a,this.p=b,this.s=d,this.c=e,this.n=i||b,a instanceof va||f.push(this.n),this.r=j?"function"==typeof j?j:Math.round:j,this.type=h||0,k&&(this.pr=k,c=!0),this.b=void 0===l?d:l,this.e=void 0===m?d+e:m,g&&(this._next=g,g._prev=this)}),wa=function(a,b,c,d,e,f){var g=new va(a,b,c,d-c,e,-1,f);return g.b=c,g.e=g.xs0=d,g},xa=g.parseComplex=function(a,b,c,d,e,f,h,i,j,l){c=c||f||"","function"==typeof d&&(d=d(r,q)),h=new va(a,b,0,0,h,l?2:1,null,!1,i,c,d),d+="",e&&ra.test(d+c)&&(d=[c,d],g.colorStringFilter(d),c=d[0],d=d[1]);var m,n,o,p,u,v,w,x,y,z,A,B,C,D=c.split(", ").join(",").split(" "),E=d.split(", ").join(",").split(" "),F=D.length,G=k!==!1;for((-1!==d.indexOf(",")||-1!==c.indexOf(","))&&(-1!==(d+c).indexOf("rgb")||-1!==(d+c).indexOf("hsl")?(D=D.join(" ").replace(J,", ").split(" "),E=E.join(" ").replace(J,", ").split(" ")):(D=D.join(" ").split(",").join(", ").split(" "),E=E.join(" ").split(",").join(", ").split(" ")),F=D.length),F!==E.length&&(D=(f||"").split(" "),F=D.length),h.plugin=j,h.setRatio=l,ra.lastIndex=0,m=0;F>m;m++)if(p=D[m],u=E[m]+"",x=parseFloat(p),x||0===x)h.appendXtra("",x,ka(u,x),u.replace(t,""),G&&-1!==u.indexOf("px")?Math.round:!1,!0);else if(e&&ra.test(p))B=u.indexOf(")")+1,B=")"+(B?u.substr(B):""),C=-1!==u.indexOf("hsl")&&V,z=u,p=pa(p,C),u=pa(u,C),y=p.length+u.length>6,y&&!V&&0===u[3]?(h["xs"+h.l]+=h.l?" transparent":"transparent",h.e=h.e.split(E[m]).join("transparent")):(V||(y=!1),C?h.appendXtra(z.substr(0,z.indexOf("hsl"))+(y?"hsla(":"hsl("),p[0],ka(u[0],p[0]),",",!1,!0).appendXtra("",p[1],ka(u[1],p[1]),"%,",!1).appendXtra("",p[2],ka(u[2],p[2]),y?"%,":"%"+B,!1):h.appendXtra(z.substr(0,z.indexOf("rgb"))+(y?"rgba(":"rgb("),p[0],u[0]-p[0],",",Math.round,!0).appendXtra("",p[1],u[1]-p[1],",",Math.round).appendXtra("",p[2],u[2]-p[2],y?",":B,Math.round),y&&(p=p.length<4?1:p[3],h.appendXtra("",p,(u.length<4?1:u[3])-p,B,!1))),ra.lastIndex=0;else if(v=p.match(s)){if(w=u.match(t),!w||w.length!==v.length)return h;for(o=0,n=0;n<v.length;n++)A=v[n],z=p.indexOf(A,o),h.appendXtra(p.substr(o,z-o),Number(A),ka(w[n],A),"",G&&"px"===p.substr(z+A.length,2)?Math.round:!1,0===n),o=z+A.length;h["xs"+h.l]+=p.substr(o)}else h["xs"+h.l]+=h.l||h["xs"+h.l]?" "+u:u;if(-1!==d.indexOf("=")&&h.data){for(B=h.xs0+h.data.s,m=1;m<h.l;m++)B+=h["xs"+m]+h.data["xn"+m];h.e=B+h["xs"+m]}return h.l||(h.type=-1,h.xs0=h.e),h.xfirst||h},ya=9;for(j=va.prototype,j.l=j.pr=0;--ya>0;)j["xn"+ya]=0,j["xs"+ya]="";j.xs0="",j._next=j._prev=j.xfirst=j.data=j.plugin=j.setRatio=j.rxp=null,j.appendXtra=function(a,b,c,d,e,f){var g=this,h=g.l;return g["xs"+h]+=f&&(h||g["xs"+h])?" "+a:a||"",c||0===h||g.plugin?(g.l++,g.type=g.setRatio?2:1,g["xs"+g.l]=d||"",h>0?(g.data["xn"+h]=b+c,g.rxp["xn"+h]=e,g["xn"+h]=b,g.plugin||(g.xfirst=new va(g,"xn"+h,b,c,g.xfirst||g,0,g.n,e,g.pr),g.xfirst.xs0=0),g):(g.data={s:b+c},g.rxp={},g.s=b,g.c=c,g.r=e,g)):(g["xs"+h]+=b+(d||""),g)};var za=function(a,b){b=b||{},this.p=b.prefix?$(a)||a:a,i[a]=i[this.p]=this,this.format=b.formatter||sa(b.defaultValue,b.color,b.collapsible,b.multi),b.parser&&(this.parse=b.parser),this.clrs=b.color,this.multi=b.multi,this.keyword=b.keyword,this.dflt=b.defaultValue,this.allowFunc=b.allowFunc,this.pr=b.priority||0},Aa=T._registerComplexSpecialProp=function(a,b,c){"object"!=typeof b&&(b={parser:c});var d,e,f=a.split(","),g=b.defaultValue;for(c=c||[g],d=0;d<f.length;d++)b.prefix=0===d&&b.prefix,b.defaultValue=c[d]||g,e=new za(f[d],b)},Ba=T._registerPluginProp=function(a){if(!i[a]){var b=a.charAt(0).toUpperCase()+a.substr(1)+"Plugin";Aa(a,{parser:function(a,c,d,e,f,g,j){var k=h.com.greensock.plugins[b];return k?(k._cssRegister(),i[d].parse(a,c,d,e,f,g,j)):(X("Error: "+b+" js file not loaded."),f)}})}};j=za.prototype,j.parseComplex=function(a,b,c,d,e,f){var g,h,i,j,k,l,m=this.keyword;if(this.multi&&(J.test(c)||J.test(b)?(h=b.replace(J,"|").split("|"),i=c.replace(J,"|").split("|")):m&&(h=[b],i=[c])),i){for(j=i.length>h.length?i.length:h.length,g=0;j>g;g++)b=h[g]=h[g]||this.dflt,c=i[g]=i[g]||this.dflt,m&&(k=b.indexOf(m),l=c.indexOf(m),k!==l&&(-1===l?h[g]=h[g].split(m).join(""):-1===k&&(h[g]+=" "+m)));b=h.join(", "),c=i.join(", ")}return xa(a,this.p,b,c,this.clrs,this.dflt,d,this.pr,e,f)},j.parse=function(a,b,c,d,f,g,h){return this.parseComplex(a.style,this.format(ba(a,this.p,e,!1,this.dflt)),this.format(b),f,g)},g.registerSpecialProp=function(a,b,c){Aa(a,{parser:function(a,d,e,f,g,h,i){var j=new va(a,e,0,0,g,2,e,!1,c);return j.plugin=h,j.setRatio=b(a,d,f._tween,e),j},priority:c})},g.useSVGTransformAttr=!0;var Ca,Da="scaleX,scaleY,scaleZ,x,y,z,skewX,skewY,rotation,rotationX,rotationY,perspective,xPercent,yPercent".split(","),Ea=$("transform"),Fa=Y+"transform",Ga=$("transformOrigin"),Ha=null!==$("perspective"),Ia=T.Transform=function(){this.perspective=parseFloat(g.defaultTransformPerspective)||0,this.force3D=g.defaultForce3D!==!1&&Ha?g.defaultForce3D||"auto":!1},Ja=_gsScope.SVGElement,Ka=function(a,b,c){var d,e=P.createElementNS("http://www.w3.org/2000/svg",a),f=/([a-z])([A-Z])/g;for(d in c)e.setAttributeNS(null,d.replace(f,"$1-$2").toLowerCase(),c[d]);return b.appendChild(e),e},La=P.documentElement||{},Ma=function(){var a,b,c,d=p||/Android/i.test(U)&&!_gsScope.chrome;return P.createElementNS&&La.appendChild&&!d&&(a=Ka("svg",La),b=Ka("rect",a,{width:100,height:50,x:100}),c=b.getBoundingClientRect().width,b.style[Ga]="50% 50%",b.style[Ea]="scaleX(0.5)",d=c===b.getBoundingClientRect().width&&!(n&&Ha),La.removeChild(a)),d}(),Na=function(a,b,c,d,e,f){var h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=a._gsTransform,w=Sa(a,!0);v&&(t=v.xOrigin,u=v.yOrigin),(!d||(h=d.split(" ")).length<2)&&(n=a.getBBox(),0===n.x&&0===n.y&&n.width+n.height===0&&(n={x:parseFloat(a.hasAttribute("x")?a.getAttribute("x"):a.hasAttribute("cx")?a.getAttribute("cx"):0)||0,y:parseFloat(a.hasAttribute("y")?a.getAttribute("y"):a.hasAttribute("cy")?a.getAttribute("cy"):0)||0,width:0,height:0}),b=ja(b).split(" "),h=[(-1!==b[0].indexOf("%")?parseFloat(b[0])/100*n.width:parseFloat(b[0]))+n.x,(-1!==b[1].indexOf("%")?parseFloat(b[1])/100*n.height:parseFloat(b[1]))+n.y]),c.xOrigin=k=parseFloat(h[0]),c.yOrigin=l=parseFloat(h[1]),d&&w!==Ra&&(m=w[0],n=w[1],o=w[2],p=w[3],q=w[4],r=w[5],s=m*p-n*o,s&&(i=k*(p/s)+l*(-o/s)+(o*r-p*q)/s,j=k*(-n/s)+l*(m/s)-(m*r-n*q)/s,k=c.xOrigin=h[0]=i,l=c.yOrigin=h[1]=j)),v&&(f&&(c.xOffset=v.xOffset,c.yOffset=v.yOffset,v=c),e||e!==!1&&g.defaultSmoothOrigin!==!1?(i=k-t,j=l-u,v.xOffset+=i*w[0]+j*w[2]-i,v.yOffset+=i*w[1]+j*w[3]-j):v.xOffset=v.yOffset=0),f||a.setAttribute("data-svg-origin",h.join(" "))},Oa=function(a){var b,c=Q("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),d=this.parentNode,e=this.nextSibling,f=this.style.cssText;if(La.appendChild(c),c.appendChild(this),this.style.display="block",a)try{b=this.getBBox(),this._originalGetBBox=this.getBBox,this.getBBox=Oa}catch(g){}else this._originalGetBBox&&(b=this._originalGetBBox());return e?d.insertBefore(this,e):d.appendChild(this),La.removeChild(c),this.style.cssText=f,b},Pa=function(a){try{return a.getBBox()}catch(b){return Oa.call(a,!0)}},Qa=function(a){return!(!Ja||!a.getCTM||a.parentNode&&!a.ownerSVGElement||!Pa(a))},Ra=[1,0,0,1,0,0],Sa=function(a,b){var c,d,e,f,g,h,i,j=a._gsTransform||new Ia,k=1e5,l=a.style;if(Ea?d=ba(a,Fa,null,!0):a.currentStyle&&(d=a.currentStyle.filter.match(H),d=d&&4===d.length?[d[0].substr(4),Number(d[2].substr(4)),Number(d[1].substr(4)),d[3].substr(4),j.x||0,j.y||0].join(","):""),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,Ea&&c&&!a.offsetParent&&a!==La&&(f=l.display,l.display="block",i=a.parentNode,i&&a.offsetParent||(g=1,h=a.nextSibling,La.appendChild(a)),d=ba(a,Fa,null,!0),c=!d||"none"===d||"matrix(1, 0, 0, 1, 0, 0)"===d,f?l.display=f:Xa(l,"display"),g&&(h?i.insertBefore(a,h):i?i.appendChild(a):La.removeChild(a))),(j.svg||a.getCTM&&Qa(a))&&(c&&-1!==(l[Ea]+"").indexOf("matrix")&&(d=l[Ea],c=0),e=a.getAttribute("transform"),c&&e&&(e=a.transform.baseVal.consolidate().matrix,d="matrix("+e.a+","+e.b+","+e.c+","+e.d+","+e.e+","+e.f+")",c=0)),c)return Ra;for(e=(d||"").match(s)||[],ya=e.length;--ya>-1;)f=Number(e[ya]),e[ya]=(g=f-(f|=0))?(g*k+(0>g?-.5:.5)|0)/k+f:f;return b&&e.length>6?[e[0],e[1],e[4],e[5],e[12],e[13]]:e},Ta=T.getTransform=function(a,c,d,e){if(a._gsTransform&&d&&!e)return a._gsTransform;var f,h,i,j,k,l,m=d?a._gsTransform||new Ia:new Ia,n=m.scaleX<0,o=2e-5,p=1e5,q=Ha?parseFloat(ba(a,Ga,c,!1,"0 0 0").split(" ")[2])||m.zOrigin||0:0,r=parseFloat(g.defaultTransformPerspective)||0;if(m.svg=!(!a.getCTM||!Qa(a)),m.svg&&(Na(a,ba(a,Ga,c,!1,"50% 50%")+"",m,a.getAttribute("data-svg-origin")),Ca=g.useSVGTransformAttr||Ma),f=Sa(a),f!==Ra){if(16===f.length){var s,t,u,v,w,x=f[0],y=f[1],z=f[2],A=f[3],B=f[4],C=f[5],D=f[6],E=f[7],F=f[8],G=f[9],H=f[10],I=f[12],J=f[13],K=f[14],L=f[11],N=Math.atan2(D,H);m.zOrigin&&(K=-m.zOrigin,I=F*K-f[12],J=G*K-f[13],K=H*K+m.zOrigin-f[14]),m.rotationX=N*M,N&&(v=Math.cos(-N),w=Math.sin(-N),s=B*v+F*w,t=C*v+G*w,u=D*v+H*w,F=B*-w+F*v,G=C*-w+G*v,H=D*-w+H*v,L=E*-w+L*v,B=s,C=t,D=u),N=Math.atan2(-z,H),m.rotationY=N*M,N&&(v=Math.cos(-N),w=Math.sin(-N),s=x*v-F*w,t=y*v-G*w,u=z*v-H*w,G=y*w+G*v,H=z*w+H*v,L=A*w+L*v,x=s,y=t,z=u),N=Math.atan2(y,x),m.rotation=N*M,N&&(v=Math.cos(N),w=Math.sin(N),s=x*v+y*w,t=B*v+C*w,u=F*v+G*w,y=y*v-x*w,C=C*v-B*w,G=G*v-F*w,x=s,B=t,F=u),m.rotationX&&Math.abs(m.rotationX)+Math.abs(m.rotation)>359.9&&(m.rotationX=m.rotation=0,m.rotationY=180-m.rotationY),N=Math.atan2(B,C),m.scaleX=(Math.sqrt(x*x+y*y+z*z)*p+.5|0)/p,m.scaleY=(Math.sqrt(C*C+D*D)*p+.5|0)/p,m.scaleZ=(Math.sqrt(F*F+G*G+H*H)*p+.5|0)/p,x/=m.scaleX,B/=m.scaleY,y/=m.scaleX,C/=m.scaleY,Math.abs(N)>o?(m.skewX=N*M,B=0,"simple"!==m.skewType&&(m.scaleY*=1/Math.cos(N))):m.skewX=0,m.perspective=L?1/(0>L?-L:L):0,m.x=I,m.y=J,m.z=K,m.svg&&(m.x-=m.xOrigin-(m.xOrigin*x-m.yOrigin*B),m.y-=m.yOrigin-(m.yOrigin*y-m.xOrigin*C))}else if(!Ha||e||!f.length||m.x!==f[4]||m.y!==f[5]||!m.rotationX&&!m.rotationY){var O=f.length>=6,P=O?f[0]:1,Q=f[1]||0,R=f[2]||0,S=O?f[3]:1;m.x=f[4]||0,m.y=f[5]||0,i=Math.sqrt(P*P+Q*Q),j=Math.sqrt(S*S+R*R),k=P||Q?Math.atan2(Q,P)*M:m.rotation||0,l=R||S?Math.atan2(R,S)*M+k:m.skewX||0,m.scaleX=i,m.scaleY=j,m.rotation=k,m.skewX=l,Ha&&(m.rotationX=m.rotationY=m.z=0,m.perspective=r,m.scaleZ=1),m.svg&&(m.x-=m.xOrigin-(m.xOrigin*P+m.yOrigin*R),m.y-=m.yOrigin-(m.xOrigin*Q+m.yOrigin*S))}Math.abs(m.skewX)>90&&Math.abs(m.skewX)<270&&(n?(m.scaleX*=-1,m.skewX+=m.rotation<=0?180:-180,m.rotation+=m.rotation<=0?180:-180):(m.scaleY*=-1,m.skewX+=m.skewX<=0?180:-180)),m.zOrigin=q;for(h in m)m[h]<o&&m[h]>-o&&(m[h]=0)}return d&&(a._gsTransform=m,m.svg&&(Ca&&a.style[Ea]?b.delayedCall(.001,function(){Xa(a.style,Ea)}):!Ca&&a.getAttribute("transform")&&b.delayedCall(.001,function(){a.removeAttribute("transform")}))),m},Ua=function(a){var b,c,d=this.data,e=-d.rotation*L,f=e+d.skewX*L,g=1e5,h=(Math.cos(e)*d.scaleX*g|0)/g,i=(Math.sin(e)*d.scaleX*g|0)/g,j=(Math.sin(f)*-d.scaleY*g|0)/g,k=(Math.cos(f)*d.scaleY*g|0)/g,l=this.t.style,m=this.t.currentStyle;if(m){c=i,i=-j,j=-c,b=m.filter,l.filter="";var n,o,q=this.t.offsetWidth,r=this.t.offsetHeight,s="absolute"!==m.position,t="progid:DXImageTransform.Microsoft.Matrix(M11="+h+", M12="+i+", M21="+j+", M22="+k,u=d.x+q*d.xPercent/100,v=d.y+r*d.yPercent/100;if(null!=d.ox&&(n=(d.oxp?q*d.ox*.01:d.ox)-q/2,o=(d.oyp?r*d.oy*.01:d.oy)-r/2,u+=n-(n*h+o*i),v+=o-(n*j+o*k)),s?(n=q/2,o=r/2,t+=", Dx="+(n-(n*h+o*i)+u)+", Dy="+(o-(n*j+o*k)+v)+")"):t+=", sizingMethod='auto expand')",-1!==b.indexOf("DXImageTransform.Microsoft.Matrix(")?l.filter=b.replace(I,t):l.filter=t+" "+b,(0===a||1===a)&&1===h&&0===i&&0===j&&1===k&&(s&&-1===t.indexOf("Dx=0, Dy=0")||y.test(b)&&100!==parseFloat(RegExp.$1)||-1===b.indexOf(b.indexOf("Alpha"))&&l.removeAttribute("filter")),!s){var w,z,A,B=8>p?1:-1;for(n=d.ieOffsetX||0,o=d.ieOffsetY||0,d.ieOffsetX=Math.round((q-((0>h?-h:h)*q+(0>i?-i:i)*r))/2+u),d.ieOffsetY=Math.round((r-((0>k?-k:k)*r+(0>j?-j:j)*q))/2+v),ya=0;4>ya;ya++)z=ha[ya],w=m[z],c=-1!==w.indexOf("px")?parseFloat(w):ca(this.t,z,parseFloat(w),w.replace(x,""))||0,A=c!==d[z]?2>ya?-d.ieOffsetX:-d.ieOffsetY:2>ya?n-d.ieOffsetX:o-d.ieOffsetY,l[z]=(d[z]=Math.round(c-A*(0===ya||2===ya?1:B)))+"px"}}},Va=T.set3DTransformRatio=T.setTransformRatio=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,o,p,q,r,s,t,u,v,w,x,y,z=this.data,A=this.t.style,B=z.rotation,C=z.rotationX,D=z.rotationY,E=z.scaleX,F=z.scaleY,G=z.scaleZ,H=z.x,I=z.y,J=z.z,K=z.svg,M=z.perspective,N=z.force3D,O=z.skewY,P=z.skewX;if(O&&(P+=O,B+=O),((1===a||0===a)&&"auto"===N&&(this.tween._totalTime===this.tween._totalDuration||!this.tween._totalTime)||!N)&&!J&&!M&&!D&&!C&&1===G||Ca&&K||!Ha)return void(B||P||K?(B*=L,x=P*L,y=1e5,c=Math.cos(B)*E,f=Math.sin(B)*E,d=Math.sin(B-x)*-F,g=Math.cos(B-x)*F,x&&"simple"===z.skewType&&(b=Math.tan(x-O*L),b=Math.sqrt(1+b*b),d*=b,g*=b,O&&(b=Math.tan(O*L),b=Math.sqrt(1+b*b),c*=b,f*=b)),K&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset,Ca&&(z.xPercent||z.yPercent)&&(q=this.t.getBBox(),H+=.01*z.xPercent*q.width,I+=.01*z.yPercent*q.height),q=1e-6,q>H&&H>-q&&(H=0),q>I&&I>-q&&(I=0)),u=(c*y|0)/y+","+(f*y|0)/y+","+(d*y|0)/y+","+(g*y|0)/y+","+H+","+I+")",K&&Ca?this.t.setAttribute("transform","matrix("+u):A[Ea]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+u):A[Ea]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix(":"matrix(")+E+",0,0,"+F+","+H+","+I+")");if(n&&(q=1e-4,q>E&&E>-q&&(E=G=2e-5),q>F&&F>-q&&(F=G=2e-5),!M||z.z||z.rotationX||z.rotationY||(M=0)),B||P)B*=L,r=c=Math.cos(B),s=f=Math.sin(B),P&&(B-=P*L,r=Math.cos(B),s=Math.sin(B),"simple"===z.skewType&&(b=Math.tan((P-O)*L),b=Math.sqrt(1+b*b),r*=b,s*=b,z.skewY&&(b=Math.tan(O*L),b=Math.sqrt(1+b*b),c*=b,f*=b))),d=-s,g=r;else{if(!(D||C||1!==G||M||K))return void(A[Ea]=(z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) translate3d(":"translate3d(")+H+"px,"+I+"px,"+J+"px)"+(1!==E||1!==F?" scale("+E+","+F+")":""));c=g=1,d=f=0}k=1,e=h=i=j=l=m=0,o=M?-1/M:0,p=z.zOrigin,q=1e-6,v=",",w="0",B=D*L,B&&(r=Math.cos(B),s=Math.sin(B),i=-s,l=o*-s,e=c*s,h=f*s,k=r,o*=r,c*=r,f*=r),B=C*L,B&&(r=Math.cos(B),s=Math.sin(B),b=d*r+e*s,t=g*r+h*s,j=k*s,m=o*s,e=d*-s+e*r,h=g*-s+h*r,k*=r,o*=r,d=b,g=t),1!==G&&(e*=G,h*=G,k*=G,o*=G),1!==F&&(d*=F,g*=F,j*=F,m*=F),1!==E&&(c*=E,f*=E,i*=E,l*=E),(p||K)&&(p&&(H+=e*-p,I+=h*-p,J+=k*-p+p),K&&(H+=z.xOrigin-(z.xOrigin*c+z.yOrigin*d)+z.xOffset,I+=z.yOrigin-(z.xOrigin*f+z.yOrigin*g)+z.yOffset),q>H&&H>-q&&(H=w),q>I&&I>-q&&(I=w),q>J&&J>-q&&(J=0)),u=z.xPercent||z.yPercent?"translate("+z.xPercent+"%,"+z.yPercent+"%) matrix3d(":"matrix3d(",u+=(q>c&&c>-q?w:c)+v+(q>f&&f>-q?w:f)+v+(q>i&&i>-q?w:i),u+=v+(q>l&&l>-q?w:l)+v+(q>d&&d>-q?w:d)+v+(q>g&&g>-q?w:g), 8799C||D||1!==G?(u+=v+(q>j&&j>-q?w:j)+v+(q>m&&m>-q?w:m)+v+(q>e&&e>-q?w:e),u+=v+(q>h&&h>-q?w:h)+v+(q>k&&k>-q?w:k)+v+(q>o&&o>-q?w:o)+v):u+=",0,0,0,0,1,0,",u+=H+v+I+v+J+v+(M?1+-J/M:1)+")",A[Ea]=u};j=Ia.prototype,j.x=j.y=j.z=j.skewX=j.skewY=j.rotation=j.rotationX=j.rotationY=j.zOrigin=j.xPercent=j.yPercent=j.xOffset=j.yOffset=0,j.scaleX=j.scaleY=j.scaleZ=1,Aa("transform,scale,scaleX,scaleY,scaleZ,x,y,z,rotation,rotationX,rotationY,rotationZ,skewX,skewY,shortRotation,shortRotationX,shortRotationY,shortRotationZ,transformOrigin,svgOrigin,transformPerspective,directionalRotation,parseTransform,force3D,skewType,xPercent,yPercent,smoothOrigin",{parser:function(a,b,c,d,f,h,i){if(d._lastParsedTransform===i)return f;d._lastParsedTransform=i;var j=i.scale&&"function"==typeof i.scale?i.scale:0;j&&(i.scale=j(r,a));var k,l,m,n,o,p,s,t,u,v=a._gsTransform,w=a.style,x=1e-6,y=Da.length,z=i,A={},B="transformOrigin",C=Ta(a,e,!0,z.parseTransform),D=z.transform&&("function"==typeof z.transform?z.transform(r,q):z.transform);if(C.skewType=z.skewType||C.skewType||g.defaultSkewType,d._transform=C,"rotationZ"in z&&(z.rotation=z.rotationZ),D&&"string"==typeof D&&Ea)l=R.style,l[Ea]=D,l.display="block",l.position="absolute",-1!==D.indexOf("%")&&(l.width=ba(a,"width"),l.height=ba(a,"height")),P.body.appendChild(R),k=Ta(R,null,!1),"simple"===C.skewType&&(k.scaleY*=Math.cos(k.skewX*L)),C.svg&&(p=C.xOrigin,s=C.yOrigin,k.x-=C.xOffset,k.y-=C.yOffset,(z.transformOrigin||z.svgOrigin)&&(D={},Na(a,ja(z.transformOrigin),D,z.svgOrigin,z.smoothOrigin,!0),p=D.xOrigin,s=D.yOrigin,k.x-=D.xOffset-C.xOffset,k.y-=D.yOffset-C.yOffset),(p||s)&&(t=Sa(R,!0),k.x-=p-(p*t[0]+s*t[2]),k.y-=s-(p*t[1]+s*t[3]))),P.body.removeChild(R),k.perspective||(k.perspective=C.perspective),null!=z.xPercent&&(k.xPercent=la(z.xPercent,C.xPercent)),null!=z.yPercent&&(k.yPercent=la(z.yPercent,C.yPercent));else if("object"==typeof z){if(k={scaleX:la(null!=z.scaleX?z.scaleX:z.scale,C.scaleX),scaleY:la(null!=z.scaleY?z.scaleY:z.scale,C.scaleY),scaleZ:la(z.scaleZ,C.scaleZ),x:la(z.x,C.x),y:la(z.y,C.y),z:la(z.z,C.z),xPercent:la(z.xPercent,C.xPercent),yPercent:la(z.yPercent,C.yPercent),perspective:la(z.transformPerspective,C.perspective)},o=z.directionalRotation,null!=o)if("object"==typeof o)for(l in o)z[l]=o[l];else z.rotation=o;"string"==typeof z.x&&-1!==z.x.indexOf("%")&&(k.x=0,k.xPercent=la(z.x,C.xPercent)),"string"==typeof z.y&&-1!==z.y.indexOf("%")&&(k.y=0,k.yPercent=la(z.y,C.yPercent)),k.rotation=ma("rotation"in z?z.rotation:"shortRotation"in z?z.shortRotation+"_short":C.rotation,C.rotation,"rotation",A),Ha&&(k.rotationX=ma("rotationX"in z?z.rotationX:"shortRotationX"in z?z.shortRotationX+"_short":C.rotationX||0,C.rotationX,"rotationX",A),k.rotationY=ma("rotationY"in z?z.rotationY:"shortRotationY"in z?z.shortRotationY+"_short":C.rotationY||0,C.rotationY,"rotationY",A)),k.skewX=ma(z.skewX,C.skewX),k.skewY=ma(z.skewY,C.skewY)}for(Ha&&null!=z.force3D&&(C.force3D=z.force3D,n=!0),m=C.force3D||C.z||C.rotationX||C.rotationY||k.z||k.rotationX||k.rotationY||k.perspective,m||null==z.scale||(k.scaleZ=1);--y>-1;)u=Da[y],D=k[u]-C[u],(D>x||-x>D||null!=z[u]||null!=N[u])&&(n=!0,f=new va(C,u,C[u],D,f),u in A&&(f.e=A[u]),f.xs0=0,f.plugin=h,d._overwriteProps.push(f.n));return D="function"==typeof z.transformOrigin?z.transformOrigin(r,q):z.transformOrigin,C.svg&&(D||z.svgOrigin)&&(p=C.xOffset,s=C.yOffset,Na(a,ja(D),k,z.svgOrigin,z.smoothOrigin),f=wa(C,"xOrigin",(v?C:k).xOrigin,k.xOrigin,f,B),f=wa(C,"yOrigin",(v?C:k).yOrigin,k.yOrigin,f,B),(p!==C.xOffset||s!==C.yOffset)&&(f=wa(C,"xOffset",v?p:C.xOffset,C.xOffset,f,B),f=wa(C,"yOffset",v?s:C.yOffset,C.yOffset,f,B)),D="0px 0px"),(D||Ha&&m&&C.zOrigin)&&(Ea?(n=!0,u=Ga,D||(D=(ba(a,u,e,!1,"50% 50%")+"").split(" "),D=D[0]+" "+D[1]+" "+C.zOrigin+"px"),D+="",f=new va(w,u,0,0,f,-1,B),f.b=w[u],f.plugin=h,Ha?(l=C.zOrigin,D=D.split(" "),C.zOrigin=(D.length>2?parseFloat(D[2]):l)||0,f.xs0=f.e=D[0]+" "+(D[1]||"50%")+" 0px",f=new va(C,"zOrigin",0,0,f,-1,f.n),f.b=l,f.xs0=f.e=C.zOrigin):f.xs0=f.e=D):ja(D+"",C)),n&&(d._transformType=C.svg&&Ca||!m&&3!==this._transformType?2:3),j&&(i.scale=j),f},allowFunc:!0,prefix:!0}),Aa("boxShadow",{defaultValue:"0px 0px 0px 0px #999",prefix:!0,color:!0,multi:!0,keyword:"inset"}),Aa("clipPath",{defaultValue:"inset(0%)",prefix:!0,multi:!0,formatter:sa("inset(0% 0% 0% 0%)",!1,!0)}),Aa("borderRadius",{defaultValue:"0px",parser:function(a,b,c,f,g,h){b=this.format(b);var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"],z=a.style;for(q=parseFloat(a.offsetWidth),r=parseFloat(a.offsetHeight),i=b.split(" "),j=0;j<y.length;j++)this.p.indexOf("border")&&(y[j]=$(y[j])),m=l=ba(a,y[j],e,!1,"0px"),-1!==m.indexOf(" ")&&(l=m.split(" "),m=l[0],l=l[1]),n=k=i[j],o=parseFloat(m),t=m.substr((o+"").length),u="="===n.charAt(1),u?(p=parseInt(n.charAt(0)+"1",10),n=n.substr(2),p*=parseFloat(n),s=n.substr((p+"").length-(0>p?1:0))||""):(p=parseFloat(n),s=n.substr((p+"").length)),""===s&&(s=d[c]||t),s!==t&&(v=ca(a,"borderLeft",o,t),w=ca(a,"borderTop",o,t),"%"===s?(m=v/q*100+"%",l=w/r*100+"%"):"em"===s?(x=ca(a,"borderLeft",1,"em"),m=v/x+"em",l=w/x+"em"):(m=v+"px",l=w+"px"),u&&(n=parseFloat(m)+p+s,k=parseFloat(l)+p+s)),g=xa(z,y[j],m+" "+l,n+" "+k,!1,"0px",g);return g},prefix:!0,formatter:sa("0px 0px 0px 0px",!1,!0)}),Aa("borderBottomLeftRadius,borderBottomRightRadius,borderTopLeftRadius,borderTopRightRadius",{defaultValue:"0px",parser:function(a,b,c,d,f,g){return xa(a.style,c,this.format(ba(a,c,e,!1,"0px 0px")),this.format(b),!1,"0px",f)},prefix:!0,formatter:sa("0px 0px",!1,!0)}),Aa("backgroundPosition",{defaultValue:"0 0",parser:function(a,b,c,d,f,g){var h,i,j,k,l,m,n="background-position",o=e||aa(a,null),q=this.format((o?p?o.getPropertyValue(n+"-x")+" "+o.getPropertyValue(n+"-y"):o.getPropertyValue(n):a.currentStyle.backgroundPositionX+" "+a.currentStyle.backgroundPositionY)||"0 0"),r=this.format(b);if(-1!==q.indexOf("%")!=(-1!==r.indexOf("%"))&&r.split(",").length<2&&(m=ba(a,"backgroundImage").replace(E,""),m&&"none"!==m)){for(h=q.split(" "),i=r.split(" "),S.setAttribute("src",m),j=2;--j>-1;)q=h[j],k=-1!==q.indexOf("%"),k!==(-1!==i[j].indexOf("%"))&&(l=0===j?a.offsetWidth-S.width:a.offsetHeight-S.height,h[j]=k?parseFloat(q)/100*l+"px":parseFloat(q)/l*100+"%");q=h.join(" ")}return this.parseComplex(a.style,q,r,f,g)},formatter:ja}),Aa("backgroundSize",{defaultValue:"0 0",formatter:function(a){return a+="","co"===a.substr(0,2)?a:ja(-1===a.indexOf(" ")?a+" "+a:a)}}),Aa("perspective",{defaultValue:"0px",prefix:!0}),Aa("perspectiveOrigin",{defaultValue:"50% 50%",prefix:!0}),Aa("transformStyle",{prefix:!0}),Aa("backfaceVisibility",{prefix:!0}),Aa("userSelect",{prefix:!0}),Aa("margin",{parser:ta("marginTop,marginRight,marginBottom,marginLeft")}),Aa("padding",{parser:ta("paddingTop,paddingRight,paddingBottom,paddingLeft")}),Aa("clip",{defaultValue:"rect(0px,0px,0px,0px)",parser:function(a,b,c,d,f,g){var h,i,j;return 9>p?(i=a.currentStyle,j=8>p?" ":",",h="rect("+i.clipTop+j+i.clipRight+j+i.clipBottom+j+i.clipLeft+")",b=this.format(b).split(",").join(j)):(h=this.format(ba(a,this.p,e,!1,this.dflt)),b=this.format(b)),this.parseComplex(a.style,h,b,f,g)}}),Aa("textShadow",{defaultValue:"0px 0px 0px #999",color:!0,multi:!0}),Aa("autoRound,strictUnits",{parser:function(a,b,c,d,e){return e}}),Aa("border",{defaultValue:"0px solid #000",parser:function(a,b,c,d,f,g){var h=ba(a,"borderTopWidth",e,!1,"0px"),i=this.format(b).split(" "),j=i[0].replace(x,"");return"px"!==j&&(h=parseFloat(h)/ca(a,"borderTopWidth",1,j)+j),this.parseComplex(a.style,this.format(h+" "+ba(a,"borderTopStyle",e,!1,"solid")+" "+ba(a,"borderTopColor",e,!1,"#000")),i.join(" "),f,g)},color:!0,formatter:function(a){var b=a.split(" ");return b[0]+" "+(b[1]||"solid")+" "+(a.match(ra)||["#000"])[0]}}),Aa("borderWidth",{parser:ta("borderTopWidth,borderRightWidth,borderBottomWidth,borderLeftWidth")}),Aa("float,cssFloat,styleFloat",{parser:function(a,b,c,d,e,f){var g=a.style,h="cssFloat"in g?"cssFloat":"styleFloat";return new va(g,h,0,0,e,-1,c,!1,0,g[h],b)}});var Wa=function(a){var b,c=this.t,d=c.filter||ba(this.data,"filter")||"",e=this.s+this.c*a|0;100===e&&(-1===d.indexOf("atrix(")&&-1===d.indexOf("radient(")&&-1===d.indexOf("oader(")?(c.removeAttribute("filter"),b=!ba(this.data,"filter")):(c.filter=d.replace(A,""),b=!0)),b||(this.xn1&&(c.filter=d=d||"alpha(opacity="+e+")"),-1===d.indexOf("pacity")?0===e&&this.xn1||(c.filter=d+" alpha(opacity="+e+")"):c.filter=d.replace(y,"opacity="+e))};Aa("opacity,alpha,autoAlpha",{defaultValue:"1",parser:function(a,b,c,d,f,g){var h=parseFloat(ba(a,"opacity",e,!1,"1")),i=a.style,j="autoAlpha"===c;return"string"==typeof b&&"="===b.charAt(1)&&(b=("-"===b.charAt(0)?-1:1)*parseFloat(b.substr(2))+h),j&&1===h&&"hidden"===ba(a,"visibility",e)&&0!==b&&(h=0),V?f=new va(i,"opacity",h,b-h,f):(f=new va(i,"opacity",100*h,100*(b-h),f),f.xn1=j?1:0,i.zoom=1,f.type=2,f.b="alpha(opacity="+f.s+")",f.e="alpha(opacity="+(f.s+f.c)+")",f.data=a,f.plugin=g,f.setRatio=Wa),j&&(f=new va(i,"visibility",0,0,f,-1,null,!1,0,0!==h?"inherit":"hidden",0===b?"hidden":"inherit"),f.xs0="inherit",d._overwriteProps.push(f.n),d._overwriteProps.push(c)),f}});var Xa=function(a,b){b&&(a.removeProperty?(("ms"===b.substr(0,2)||"webkit"===b.substr(0,6))&&(b="-"+b),a.removeProperty(b.replace(C,"-$1").toLowerCase())):a.removeAttribute(b))},Ya=function(a){if(this.t._gsClassPT=this,1===a||0===a){this.t.setAttribute("class",0===a?this.b:this.e);for(var b=this.data,c=this.t.style;b;)b.v?c[b.p]=b.v:Xa(c,b.p),b=b._next;1===a&&this.t._gsClassPT===this&&(this.t._gsClassPT=null)}else this.t.getAttribute("class")!==this.e&&this.t.setAttribute("class",this.e)};Aa("className",{parser:function(a,b,d,f,g,h,i){var j,k,l,m,n,o=a.getAttribute("class")||"",p=a.style.cssText;if(g=f._classNamePT=new va(a,d,0,0,g,2),g.setRatio=Ya,g.pr=-11,c=!0,g.b=o,k=ea(a,e),l=a._gsClassPT){for(m={},n=l.data;n;)m[n.p]=1,n=n._next;l.setRatio(1)}return a._gsClassPT=g,g.e="="!==b.charAt(1)?b:o.replace(new RegExp("(?:\\s|^)"+b.substr(2)+"(?![\\w-])"),"")+("+"===b.charAt(0)?" "+b.substr(2):""),a.setAttribute("class",g.e),j=fa(a,k,ea(a),i,m),a.setAttribute("class",o),g.data=j.firstMPT,a.style.cssText!==p&&(a.style.cssText=p),g=g.xfirst=f.parse(a,j.difs,g,h)}});var Za=function(a){if((1===a||0===a)&&this.data._totalTime===this.data._totalDuration&&"isFromStart"!==this.data.data){var b,c,d,e,f,g=this.t.style,h=i.transform.parse;if("all"===this.e)g.cssText="",e=!0;else for(b=this.e.split(" ").join("").split(","),d=b.length;--d>-1;)c=b[d],i[c]&&(i[c].parse===h?e=!0:c="transformOrigin"===c?Ga:i[c].p),Xa(g,c);e&&(Xa(g,Ea),f=this.t._gsTransform,f&&(f.svg&&(this.t.removeAttribute("data-svg-origin"),this.t.removeAttribute("transform")),delete this.t._gsTransform))}};for(Aa("clearProps",{parser:function(a,b,d,e,f){return f=new va(a,d,0,0,f,2),f.setRatio=Za,f.e=b,f.pr=-10,f.data=e._tween,c=!0,f}}),j="bezier,throwProps,physicsProps,physics2D".split(","),ya=j.length;ya--;)Ba(j[ya]);j=g.prototype,j._firstPT=j._lastParsedTransform=j._transform=null,j._onInitTween=function(a,b,h,j){if(!a.nodeType)return!1;this._target=q=a,this._tween=h,this._vars=b,r=j,k=b.autoRound,c=!1,d=b.suffixMap||g.suffixMap,e=aa(a,""),f=this._overwriteProps;var n,p,s,t,u,v,w,x,y,A=a.style;if(l&&""===A.zIndex&&(n=ba(a,"zIndex",e),("auto"===n||""===n)&&this._addLazySet(A,"zIndex",0)),"string"==typeof b&&(t=A.cssText,n=ea(a,e),A.cssText=t+";"+b,n=fa(a,n,ea(a)).difs,!V&&z.test(b)&&(n.opacity=parseFloat(RegExp.$1)),b=n,A.cssText=t),b.className?this._firstPT=p=i.className.parse(a,b.className,"className",this,null,null,b):this._firstPT=p=this.parse(a,b,null),this._transformType){for(y=3===this._transformType,Ea?m&&(l=!0,""===A.zIndex&&(w=ba(a,"zIndex",e),("auto"===w||""===w)&&this._addLazySet(A,"zIndex",0)),o&&this._addLazySet(A,"WebkitBackfaceVisibility",this._vars.WebkitBackfaceVisibility||(y?"visible":"hidden"))):A.zoom=1,s=p;s&&s._next;)s=s._next;x=new va(a,"transform",0,0,null,2),this._linkCSSP(x,null,s),x.setRatio=Ea?Va:Ua,x.data=this._transform||Ta(a,e,!0),x.tween=h,x.pr=-1,f.pop()}if(c){for(;p;){for(v=p._next,s=t;s&&s.pr>p.pr;)s=s._next;(p._prev=s?s._prev:u)?p._prev._next=p:t=p,(p._next=s)?s._prev=p:u=p,p=v}this._firstPT=t}return!0},j.parse=function(a,b,c,f){var g,h,j,l,m,n,o,p,s,t,u=a.style;for(g in b){if(n=b[g],h=i[g],"function"!=typeof n||h&&h.allowFunc||(n=n(r,q)),h)c=h.parse(a,n,g,this,c,f,b);else{if("--"===g.substr(0,2)){this._tween._propLookup[g]=this._addTween.call(this._tween,a.style,"setProperty",aa(a).getPropertyValue(g)+"",n+"",g,!1,g);continue}m=ba(a,g,e)+"",s="string"==typeof n,"color"===g||"fill"===g||"stroke"===g||-1!==g.indexOf("Color")||s&&B.test(n)?(s||(n=pa(n),n=(n.length>3?"rgba(":"rgb(")+n.join(",")+")"),c=xa(u,g,m,n,!0,"transparent",c,0,f)):s&&K.test(n)?c=xa(u,g,m,n,!0,null,c,0,f):(j=parseFloat(m),o=j||0===j?m.substr((j+"").length):"",(""===m||"auto"===m)&&("width"===g||"height"===g?(j=ia(a,g,e),o="px"):"left"===g||"top"===g?(j=da(a,g,e),o="px"):(j="opacity"!==g?0:1,o="")),t=s&&"="===n.charAt(1),t?(l=parseInt(n.charAt(0)+"1",10),n=n.substr(2),l*=parseFloat(n),p=n.replace(x,"")):(l=parseFloat(n),p=s?n.replace(x,""):""),""===p&&(p=g in d?d[g]:o),n=l||0===l?(t?l+j:l)+p:b[g],o!==p&&(""!==p||"lineHeight"===g)&&(l||0===l)&&j&&(j=ca(a,g,j,o),"%"===p?(j/=ca(a,g,100,"%")/100,b.strictUnits!==!0&&(m=j+"%")):"em"===p||"rem"===p||"vw"===p||"vh"===p?j/=ca(a,g,1,p):"px"!==p&&(l=ca(a,g,l,p),p="px"),t&&(l||0===l)&&(n=l+j+p)),t&&(l+=j),!j&&0!==j||!l&&0!==l?void 0!==u[g]&&(n||n+""!="NaN"&&null!=n)?(c=new va(u,g,l||j||0,0,c,-1,g,!1,0,m,n),c.xs0="none"!==n||"display"!==g&&-1===g.indexOf("Style")?n:m):X("invalid "+g+" tween value: "+b[g]):(c=new va(u,g,j,l-j,c,0,g,k!==!1&&("px"===p||"zIndex"===g),0,m,n),c.xs0=p))}f&&c&&!c.plugin&&(c.plugin=f)}return c},j.setRatio=function(a){var b,c,d,e=this._firstPT,f=1e-6;if(1!==a||this._tween._time!==this._tween._duration&&0!==this._tween._time)if(a||this._tween._time!==this._tween._duration&&0!==this._tween._time||this._tween._rawPrevTime===-1e-6)for(;e;){if(b=e.c*a+e.s,e.r?b=e.r(b):f>b&&b>-f&&(b=0),e.type)if(1===e.type)if(d=e.l,2===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2;else if(3===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3;else if(4===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4;else if(5===d)e.t[e.p]=e.xs0+b+e.xs1+e.xn1+e.xs2+e.xn2+e.xs3+e.xn3+e.xs4+e.xn4+e.xs5;else{for(c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}else-1===e.type?e.t[e.p]=e.xs0:e.setRatio&&e.setRatio(a);else e.t[e.p]=b+e.xs0;e=e._next}else for(;e;)2!==e.type?e.t[e.p]=e.b:e.setRatio(a),e=e._next;else for(;e;){if(2!==e.type)if(e.r&&-1!==e.type)if(b=e.r(e.s+e.c),e.type){if(1===e.type){for(d=e.l,c=e.xs0+b+e.xs1,d=1;d<e.l;d++)c+=e["xn"+d]+e["xs"+(d+1)];e.t[e.p]=c}}else e.t[e.p]=b+e.xs0;else e.t[e.p]=e.e;else e.setRatio(a);e=e._next}},j._enableTransforms=function(a){this._transform=this._transform||Ta(this._target,e,!0),this._transformType=this._transform.svg&&Ca||!a&&3!==this._transformType?2:3};var $a=function(a){this.t[this.p]=this.e,this.data._linkCSSP(this,this._next,null,!0)};j._addLazySet=function(a,b,c){var d=this._firstPT=new va(a,b,0,0,this._firstPT,2);d.e=c,d.setRatio=$a,d.data=this},j._linkCSSP=function(a,b,c,d){return a&&(b&&(b._prev=a),a._next&&(a._next._prev=a._prev),a._prev?a._prev._next=a._next:this._firstPT===a&&(this._firstPT=a._next,d=!0),c?c._next=a:d||null!==this._firstPT||(this._firstPT=a),a._next=b,a._prev=c),a},j._mod=function(a){for(var b=this._firstPT;b;)"function"==typeof a[b.p]&&(b.r=a[b.p]),b=b._next},j._kill=function(b){var c,d,e,f=b;if(b.autoAlpha||b.alpha){f={};for(d in b)f[d]=b[d];f.opacity=1,f.autoAlpha&&(f.visibility=1)}for(b.className&&(c=this._classNamePT)&&(e=c.xfirst,e&&e._prev?this._linkCSSP(e._prev,c._next,e._prev._prev):e===this._firstPT&&(this._firstPT=c._next),c._next&&this._linkCSSP(c._next,c._next._next,e._prev),this._classNamePT=null),c=this._firstPT;c;)c.plugin&&c.plugin!==d&&c.plugin._kill&&(c.plugin._kill(b),d=c.plugin),c=c._next;return a.prototype._kill.call(this,f)};var _a=function(a,b,c){var d,e,f,g;if(a.slice)for(e=a.length;--e>-1;)_a(a[e],b,c);else for(d=a.childNodes,e=d.length;--e>-1;)f=d[e],g=f.type,f.style&&(b.push(ea(f)),c&&c.push(f)),1!==g&&9!==g&&11!==g||!f.childNodes.length||_a(f,b,c)};return g.cascadeTo=function(a,c,d){var e,f,g,h,i=b.to(a,c,d),j=[i],k=[],l=[],m=[],n=b._internals.reservedProps;for(a=i._targets||i.target,_a(a,k,m),i.render(c,!0,!0),_a(a,l),i.render(0,!0,!0),i._enabled(!0),e=m.length;--e>-1;)if(f=fa(m[e],k[e],l[e]),f.firstMPT){f=f.difs;for(g in d)n[g]&&(f[g]=d[g]);h={};for(g in f)h[g]=k[e][g];j.push(b.fromTo(m[e],c,h,f))}return j},a.activate([g]),g},!0),function(){var a=_gsScope._gsDefine.plugin({propName:"roundProps",version:"1.7.0",priority:-1,API:2,init:function(a,b,c){return this._tween=c,!0}}),b=function(a){var b=1>a?Math.pow(10,(a+"").length-2):1;return function(c){return(Math.round(c/a)*a*b|0)/b}},c=function(a,b){for(;a;)a.f||a.blob||(a.m=b||Math.round),a=a._next},d=a.prototype;d._onInitAllProps=function(){var a,d,e,f,g=this._tween,h=g.vars.roundProps,i={},j=g._propLookup.roundProps;if("object"!=typeof h||h.push)for("string"==typeof h&&(h=h.split(",")),e=h.length;--e>-1;)i[h[e]]=Math.round;else for(f in h)i[f]=b(h[f]);for(f in i)for(a=g._firstPT;a;)d=a._next,a.pg?a.t._mod(i):a.n===f&&(2===a.f&&a.t?c(a.t._firstPT,i[f]):(this._add(a.t,f,a.s,a.c,i[f]),d&&(d._prev=a._prev),a._prev?a._prev._next=d:g._firstPT===a&&(g._firstPT=d),a._next=a._prev=null,g._propLookup[f]=j)),a=d;return!1},d._add=function(a,b,c,d,e){this._addTween(a,b,c,c+d,b,e||Math.round),this._overwriteProps.push(b)}}(),function(){_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.6.1",init:function(a,b,c,d){var e,f;if("function"!=typeof a.setAttribute)return!1;for(e in b)f=b[e],"function"==typeof f&&(f=f(d,a)),this._addTween(a,"setAttribute",a.getAttribute(e)+"",f+"",e,!1,e),this._overwriteProps.push(e);return!0}})}(),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.3.1",API:2,init:function(a,b,c,d){"object"!=typeof b&&(b={rotation:b}),this.finals={};var e,f,g,h,i,j,k=b.useRadians===!0?2*Math.PI:360,l=1e-6;for(e in b)"useRadians"!==e&&(h=b[e],"function"==typeof h&&(h=h(d,a)),j=(h+"").split("_"),f=j[0],g=parseFloat("function"!=typeof a[e]?a[e]:a[e.indexOf("set")||"function"!=typeof a["get"+e.substr(3)]?e:"get"+e.substr(3)]()),h=this.finals[e]="string"==typeof f&&"="===f.charAt(1)?g+parseInt(f.charAt(0)+"1",10)*Number(f.substr(2)):Number(f)||0,i=h-g,j.length&&(f=j.join("_"),-1!==f.indexOf("short")&&(i%=k,i!==i%(k/2)&&(i=0>i?i+k:i-k)),-1!==f.indexOf("_cw")&&0>i?i=(i+9999999999*k)%k-(i/k|0)*k:-1!==f.indexOf("ccw")&&i>0&&(i=(i-9999999999*k)%k-(i/k|0)*k)),(i>l||-l>i)&&(this._addTween(a,e,g,g+i,e),this._overwriteProps.push(e)));return!0},set:function(a){var b;if(1!==a)this._super.setRatio.call(this,a);else for(b=this._firstPT;b;)b.f?b.t[b.p](this.finals[b.p]):b.t[b.p]=this.finals[b.p],b=b._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(a){var b,c,d,e,f=_gsScope.GreenSockGlobals||_gsScope,g=f.com.greensock,h=2*Math.PI,i=Math.PI/2,j=g._class,k=function(b,c){var d=j("easing."+b,function(){},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,d},l=a.register||function(){},m=function(a,b,c,d,e){var f=j("easing."+a,{easeOut:new b,easeIn:new c,easeInOut:new d},!0);return l(f,a),f},n=function(a,b,c){this.t=a,this.v=b,c&&(this.next=c,c.prev=this,this.c=c.v-b,this.gap=c.t-a)},o=function(b,c){var d=j("easing."+b,function(a){this._p1=a||0===a?a:1.70158,this._p2=1.525*this._p1},!0),e=d.prototype=new a;return e.constructor=d,e.getRatio=c,e.config=function(a){return new d(a)},d},p=m("Back",o("BackOut",function(a){return(a-=1)*a*((this._p1+1)*a+this._p1)+1}),o("BackIn",function(a){return a*a*((this._p1+1)*a-this._p1)}),o("BackInOut",function(a){return(a*=2)<1?.5*a*a*((this._p2+1)*a-this._p2):.5*((a-=2)*a*((this._p2+1)*a+this._p2)+2)})),q=j("easing.SlowMo",function(a,b,c){b=b||0===b?b:.7,null==a?a=.7:a>1&&(a=1),this._p=1!==a?b:0,this._p1=(1-a)/2,this._p2=a,this._p3=this._p1+this._p2,this._calcEnd=c===!0},!0),r=q.prototype=new a;return r.constructor=q,r.getRatio=function(a){var b=a+(.5-a)*this._p;return a<this._p1?this._calcEnd?1-(a=1-a/this._p1)*a:b-(a=1-a/this._p1)*a*a*a*b:a>this._p3?this._calcEnd?1===a?0:1-(a=(a-this._p3)/this._p1)*a:b+(a-b)*(a=(a-this._p3)/this._p1)*a*a*a:this._calcEnd?1:b},q.ease=new q(.7,.7),r.config=q.config=function(a,b,c){return new q(a,b,c)},b=j("easing.SteppedEase",function(a,b){a=a||1,this._p1=1/a,this._p2=a+(b?0:1),this._p3=b?1:0},!0),r=b.prototype=new a,r.constructor=b,r.getRatio=function(a){return 0>a?a=0:a>=1&&(a=.999999999),((this._p2*a|0)+this._p3)*this._p1},r.config=b.config=function(a,c){return new b(a,c)},c=j("easing.ExpoScaleEase",function(a,b,c){this._p1=Math.log(b/a),this._p2=b-a,this._p3=a,this._ease=c},!0),r=c.prototype=new a,r.constructor=c,r.getRatio=function(a){return this._ease&&(a=this._ease.getRatio(a)),(this._p3*Math.exp(this._p1*a)-this._p3)/this._p2},r.config=c.config=function(a,b,d){return new c(a,b,d)},d=j("easing.RoughEase",function(b){b=b||{};for(var c,d,e,f,g,h,i=b.taper||"none",j=[],k=0,l=0|(b.points||20),m=l,o=b.randomize!==!1,p=b.clamp===!0,q=b.template instanceof a?b.template:null,r="number"==typeof b.strength?.4*b.strength:.4;--m>-1;)c=o?Math.random():1/l*m,d=q?q.getRatio(c):c,"none"===i?e=r:"out"===i?(f=1-c,e=f*f*r):"in"===i?e=c*c*r:.5>c?(f=2*c,e=f*f*.5*r):(f=2*(1-c),e=f*f*.5*r),o?d+=Math.random()*e-.5*e:m%2?d+=.5*e:d-=.5*e,p&&(d>1?d=1:0>d&&(d=0)),j[k++]={x:c,y:d};for(j.sort(function(a,b){return a.x-b.x}),h=new n(1,1,null),m=l;--m>-1;)g=j[m],h=new n(g.x,g.y,h);this._prev=new n(0,0,0!==h.t?h:h.next)},!0),r=d.prototype=new a,r.constructor=d,r.getRatio=function(a){var b=this._prev;if(a>b.t){for(;b.next&&a>=b.t;)b=b.next;b=b.prev}else for(;b.prev&&a<=b.t;)b=b.prev;return this._prev=b,b.v+(a-b.t)/b.gap*b.c},r.config=function(a){return new d(a)},d.ease=new d,m("Bounce",k("BounceOut",function(a){return 1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}),k("BounceIn",function(a){return(a=1-a)<1/2.75?1-7.5625*a*a:2/2.75>a?1-(7.5625*(a-=1.5/2.75)*a+.75):2.5/2.75>a?1-(7.5625*(a-=2.25/2.75)*a+.9375):1-(7.5625*(a-=2.625/2.75)*a+.984375)}),k("BounceInOut",function(a){var b=.5>a;return a=b?1-2*a:2*a-1,a=1/2.75>a?7.5625*a*a:2/2.75>a?7.5625*(a-=1.5/2.75)*a+.75:2.5/2.75>a?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375,b?.5*(1-a):.5*a+.5})),m("Circ",k("CircOut",function(a){return Math.sqrt(1-(a-=1)*a)}),k("CircIn",function(a){return-(Math.sqrt(1-a*a)-1)}),k("CircInOut",function(a){return(a*=2)<1?-.5*(Math.sqrt(1-a*a)-1):.5*(Math.sqrt(1-(a-=2)*a)+1)})),e=function(b,c,d){var e=j("easing."+b,function(a,b){this._p1=a>=1?a:1,this._p2=(b||d)/(1>a?a:1),this._p3=this._p2/h*(Math.asin(1/this._p1)||0),this._p2=h/this._p2},!0),f=e.prototype=new a;return f.constructor=e,f.getRatio=c,f.config=function(a,b){return new e(a,b)},e},m("Elastic",e("ElasticOut",function(a){return this._p1*Math.pow(2,-10*a)*Math.sin((a-this._p3)*this._p2)+1},.3),e("ElasticIn",function(a){return-(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2))},.3),e("ElasticInOut",function(a){return(a*=2)<1?-.5*(this._p1*Math.pow(2,10*(a-=1))*Math.sin((a-this._p3)*this._p2)):this._p1*Math.pow(2,-10*(a-=1))*Math.sin((a-this._p3)*this._p2)*.5+1},.45)),m("Expo",k("ExpoOut",function(a){return 1-Math.pow(2,-10*a)}),k("ExpoIn",function(a){return Math.pow(2,10*(a-1))-.001}),k("ExpoInOut",function(a){return(a*=2)<1?.5*Math.pow(2,10*(a-1)):.5*(2-Math.pow(2,-10*(a-1)))})),m("Sine",k("SineOut",function(a){return Math.sin(a*i)}),k("SineIn",function(a){return-Math.cos(a*i)+1}),k("SineInOut",function(a){return-.5*(Math.cos(Math.PI*a)-1)})),j("easing.EaseLookup",{find:function(b){return a.map[b]}},!0),l(f.SlowMo,"SlowMo","ease,"),l(d,"RoughEase","ease,"),l(b,"SteppedEase","ease,"),p},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(a,b){"use strict";var c={},d=a.document,e=a.GreenSockGlobals=a.GreenSockGlobals||a,f=e[b];if(f)return true&&module.exports&&(module.exports=f),f;var g,h,i,j,k,l=function(a){var b,c=a.split("."),d=e;for(b=0;b<c.length;b++)d[c[b]]=d=d[c[b]]||{};return d},m=l("com.greensock"),n=1e-8,o=function(a){var b,c=[],d=a.length;for(b=0;b!==d;c.push(a[b++]));return c},p=function(){},q=function(){var a=Object.prototype.toString,b=a.call([]);return function(c){return null!=c&&(c instanceof Array||"object"==typeof c&&!!c.push&&a.call(c)===b)}}(),r={},s=function(d,f,g,h){this.sc=r[d]?r[d].sc:[],r[d]=this,this.gsClass=null,this.func=g;var i=[];this.check=function(j){for(var k,m,n,o,p=f.length,q=p;--p>-1;)(k=r[f[p]]||new s(f[p],[])).gsClass?(i[p]=k.gsClass,q--):j&&k.sc.push(this);if(0===q&&g){if(m=("com.greensock."+d).split("."),n=m.pop(),o=l(m.join("."))[n]=this.gsClass=g.apply(g,i),h)if(e[n]=c[n]=o, true&&module.exports)if(d===b){module.exports=c[b]=o;for(p in c)o[p]=c[p]}else c[b]&&(c[b][n]=o);else true&&!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function(){return o}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 8800 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));for(p=0;p<this.sc.length;p++)this.sc[p].check()}},this.check(!0)},t=a._gsDefine=function(a,b,c,d){return new s(a,b,c,d)},u=m._class=function(a,b,c){return b=b||function(){},t(a,[],function(){return b},c),b};t.globals=e;var v=[0,0,1,1],w=u("easing.Ease",function(a,b,c,d){this._func=a,this._type=c||0,this._power=d||0,this._params=b?v.concat(b):v},!0),x=w.map={},y=w.register=function(a,b,c,d){for(var e,f,g,h,i=b.split(","),j=i.length,k=(c||"easeIn,easeOut,easeInOut").split(",");--j>-1;)for(f=i[j],e=d?u("easing."+f,null,!0):m.easing[f]||{},g=k.length;--g>-1;)h=k[g],x[f+"."+h]=x[h+f]=e[h]=a.getRatio?a:a[h]||new a};for(i=w.prototype,i._calcEnd=!1,i.getRatio=function(a){if(this._func)return this._params[0]=a,this._func.apply(null,this._params);var b=this._type,c=this._power,d=1===b?1-a:2===b?a:.5>a?2*a:2*(1-a);return 1===c?d*=d:2===c?d*=d*d:3===c?d*=d*d*d:4===c&&(d*=d*d*d*d),1===b?1-d:2===b?d:.5>a?d/2:1-d/2},g=["Linear","Quad","Cubic","Quart","Quint,Strong"],h=g.length;--h>-1;)i=g[h]+",Power"+h,y(new w(null,null,1,h),i,"easeOut",!0),y(new w(null,null,2,h),i,"easeIn"+(0===h?",easeNone":"")),y(new w(null,null,3,h),i,"easeInOut");x.linear=m.easing.Linear.easeIn,x.swing=m.easing.Quad.easeInOut;var z=u("events.EventDispatcher",function(a){this._listeners={},this._eventTarget=a||this});i=z.prototype,i.addEventListener=function(a,b,c,d,e){e=e||0;var f,g,h=this._listeners[a],i=0;for(this!==j||k||j.wake(),null==h&&(this._listeners[a]=h=[]),g=h.length;--g>-1;)f=h[g],f.c===b&&f.s===c?h.splice(g,1):0===i&&f.pr<e&&(i=g+1);h.splice(i,0,{c:b,s:c,up:d,pr:e})},i.removeEventListener=function(a,b){var c,d=this._listeners[a];if(d)for(c=d.length;--c>-1;)if(d[c].c===b)return void d.splice(c,1)},i.dispatchEvent=function(a){var b,c,d,e=this._listeners[a];if(e)for(b=e.length,b>1&&(e=e.slice(0)),c=this._eventTarget;--b>-1;)d=e[b],d&&(d.up?d.c.call(d.s||c,{type:a,target:c}):d.c.call(d.s||c))};var A=a.requestAnimationFrame,B=a.cancelAnimationFrame,C=Date.now||function(){return(new Date).getTime()},D=C();for(g=["ms","moz","webkit","o"],h=g.length;--h>-1&&!A;)A=a[g[h]+"RequestAnimationFrame"],B=a[g[h]+"CancelAnimationFrame"]||a[g[h]+"CancelRequestAnimationFrame"];u("Ticker",function(a,b){var c,e,f,g,h,i=this,l=C(),m=b!==!1&&A?"auto":!1,o=500,q=33,r="tick",s=function(a){var b,d,j=C()-D;j>o&&(l+=j-q),D+=j,i.time=(D-l)/1e3,b=i.time-h,(!c||b>0||a===!0)&&(i.frame++,h+=b+(b>=g?.004:g-b),d=!0),a!==!0&&(f=e(s)),d&&i.dispatchEvent(r)};z.call(i),i.time=i.frame=0,i.tick=function(){s(!0)},i.lagSmoothing=function(a,b){return arguments.length?(o=a||1/n,void(q=Math.min(b,o,0))):1/n>o},i.sleep=function(){null!=f&&(m&&B?B(f):clearTimeout(f),e=p,f=null,i===j&&(k=!1))},i.wake=function(a){null!==f?i.sleep():a?l+=-D+(D=C()):i.frame>10&&(D=C()-o+5),e=0===c?p:m&&A?A:function(a){return setTimeout(a,1e3*(h-i.time)+1|0)},i===j&&(k=!0),s(2)},i.fps=function(a){return arguments.length?(c=a,g=1/(c||60),h=this.time+g,void i.wake()):c},i.useRAF=function(a){return arguments.length?(i.sleep(),m=a,void i.fps(c)):m},i.fps(a),setTimeout(function(){"auto"===m&&i.frame<5&&"hidden"!==(d||{}).visibilityState&&i.useRAF(!1)},1500)}),i=m.Ticker.prototype=new m.events.EventDispatcher,i.constructor=m.Ticker;var E=u("core.Animation",function(a,b){if(this.vars=b=b||{},this._duration=this._totalDuration=a||0,this._delay=Number(b.delay)||0,this._timeScale=1,this._active=!!b.immediateRender,this.data=b.data,this._reversed=!!b.reversed,Z){k||j.wake();var c=this.vars.useFrames?Y:Z;c.add(this,c._time),this.vars.paused&&this.paused(!0)}});j=E.ticker=new m.Ticker,i=E.prototype,i._dirty=i._gc=i._initted=i._paused=!1,i._totalTime=i._time=0,i._rawPrevTime=-1,i._next=i._last=i._onUpdate=i._timeline=i.timeline=null,i._paused=!1;var F=function(){k&&C()-D>2e3&&("hidden"!==(d||{}).visibilityState||!j.lagSmoothing())&&j.wake();var a=setTimeout(F,2e3);a.unref&&a.unref()};F(),i.play=function(a,b){return null!=a&&this.seek(a,b),this.reversed(!1).paused(!1)},i.pause=function(a,b){return null!=a&&this.seek(a,b),this.paused(!0)},i.resume=function(a,b){return null!=a&&this.seek(a,b),this.paused(!1)},i.seek=function(a,b){return this.totalTime(Number(a),b!==!1)},i.restart=function(a,b){return this.reversed(!1).paused(!1).totalTime(a?-this._delay:0,b!==!1,!0)},i.reverse=function(a,b){return null!=a&&this.seek(a||this.totalDuration(),b),this.reversed(!0).paused(!1)},i.render=function(a,b,c){},i.invalidate=function(){return this._time=this._totalTime=0,this._initted=this._gc=!1,this._rawPrevTime=-1,(this._gc||!this.timeline)&&this._enabled(!0),this},i.isActive=function(){var a,b=this._timeline,c=this._startTime;return!b||!this._gc&&!this._paused&&b.isActive()&&(a=b.rawTime(!0))>=c&&a<c+this.totalDuration()/this._timeScale-n},i._enabled=function(a,b){return k||j.wake(),this._gc=!a,this._active=this.isActive(),b!==!0&&(a&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!a&&this.timeline&&this._timeline._remove(this,!0)),!1},i._kill=function(a,b){return this._enabled(!1,!1)},i.kill=function(a,b){return this._kill(a,b),this},i._uncache=function(a){for(var b=a?this:this.timeline;b;)b._dirty=!0,b=b.timeline;return this},i._swapSelfInParams=function(a){for(var b=a.length,c=a.concat();--b>-1;)"{self}"===a[b]&&(c[b]=this);return c},i._callback=function(a){var b=this.vars,c=b[a],d=b[a+"Params"],e=b[a+"Scope"]||b.callbackScope||this,f=d?d.length:0;switch(f){case 0:c.call(e);break;case 1:c.call(e,d[0]);break;case 2:c.call(e,d[0],d[1]);break;default:c.apply(e,d)}},i.eventCallback=function(a,b,c,d){if("on"===(a||"").substr(0,2)){var e=this.vars;if(1===arguments.length)return e[a];null==b?delete e[a]:(e[a]=b,e[a+"Params"]=q(c)&&-1!==c.join("").indexOf("{self}")?this._swapSelfInParams(c):c,e[a+"Scope"]=d),"onUpdate"===a&&(this._onUpdate=b)}return this},i.delay=function(a){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+a-this._delay),this._delay=a,this):this._delay},i.duration=function(a){return arguments.length?(this._duration=this._totalDuration=a,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._time<this._duration&&0!==a&&this.totalTime(this._totalTime*(a/this._duration),!0),this):(this._dirty=!1,this._duration)},i.totalDuration=function(a){return this._dirty=!1,arguments.length?this.duration(a):this._totalDuration},i.time=function(a,b){return arguments.length?(this._dirty&&this.totalDuration(),this.totalTime(a>this._duration?this._duration:a,b)):this._time},i.totalTime=function(a,b,c){if(k||j.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>a&&!c&&(a+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var d=this._totalDuration,e=this._timeline;if(a>d&&!c&&(a=d),this._startTime=(this._paused?this._pauseTime:e._time)-(this._reversed?d-a:a)/this._timeScale,e._dirty||this._uncache(!1),e._timeline)for(;e._timeline;)e._timeline._time!==(e._startTime+e._totalTime)/e._timeScale&&e.totalTime(e._totalTime,!0), 8801e=e._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==a||0===this._duration)&&(K.length&&_(),this.render(a,b,!1),K.length&&_())}return this},i.progress=i.totalProgress=function(a,b){var c=this.duration();return arguments.length?this.totalTime(c*a,b):c?this._time/c:this.ratio},i.startTime=function(a){return arguments.length?(a!==this._startTime&&(this._startTime=a,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,a-this._delay)),this):this._startTime},i.endTime=function(a){return this._startTime+(0!=a?this.totalDuration():this.duration())/this._timeScale},i.timeScale=function(a){if(!arguments.length)return this._timeScale;var b,c;for(a=a||n,this._timeline&&this._timeline.smoothChildTiming&&(b=this._pauseTime,c=b||0===b?b:this._timeline.totalTime(),this._startTime=c-(c-this._startTime)*this._timeScale/a),this._timeScale=a,c=this.timeline;c&&c.timeline;)c._dirty=!0,c.totalDuration(),c=c.timeline;return this},i.reversed=function(a){return arguments.length?(a!=this._reversed&&(this._reversed=a,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},i.paused=function(a){if(!arguments.length)return this._paused;var b,c,d=this._timeline;return a!=this._paused&&d&&(k||a||j.wake(),b=d.rawTime(),c=b-this._pauseTime,!a&&d.smoothChildTiming&&(this._startTime+=c,this._uncache(!1)),this._pauseTime=a?b:null,this._paused=a,this._active=this.isActive(),!a&&0!==c&&this._initted&&this.duration()&&(b=d.smoothChildTiming?this._totalTime:(b-this._startTime)/this._timeScale,this.render(b,b===this._totalTime,!0))),this._gc&&!a&&this._enabled(!0,!1),this};var G=u("core.SimpleTimeline",function(a){E.call(this,0,a),this.autoRemoveChildren=this.smoothChildTiming=!0});i=G.prototype=new E,i.constructor=G,i.kill()._gc=!1,i._first=i._last=i._recent=null,i._sortChildren=!1,i.add=i.insert=function(a,b,c,d){var e,f;if(a._startTime=Number(b||0)+a._delay,a._paused&&this!==a._timeline&&(a._pauseTime=this.rawTime()-(a._timeline.rawTime()-a._pauseTime)),a.timeline&&a.timeline._remove(a,!0),a.timeline=a._timeline=this,a._gc&&a._enabled(!0,!0),e=this._last,this._sortChildren)for(f=a._startTime;e&&e._startTime>f;)e=e._prev;return e?(a._next=e._next,e._next=a):(a._next=this._first,this._first=a),a._next?a._next._prev=a:this._last=a,a._prev=e,this._recent=a,this._timeline&&this._uncache(!0),this},i._remove=function(a,b){return a.timeline===this&&(b||a._enabled(!1,!0),a._prev?a._prev._next=a._next:this._first===a&&(this._first=a._next),a._next?a._next._prev=a._prev:this._last===a&&(this._last=a._prev),a._next=a._prev=a.timeline=null,a===this._recent&&(this._recent=this._last),this._timeline&&this._uncache(!0)),this},i.render=function(a,b,c){var d,e=this._first;for(this._totalTime=this._time=this._rawPrevTime=a;e;)d=e._next,(e._active||a>=e._startTime&&!e._paused&&!e._gc)&&(e._reversed?e.render((e._dirty?e.totalDuration():e._totalDuration)-(a-e._startTime)*e._timeScale,b,c):e.render((a-e._startTime)*e._timeScale,b,c)),e=d},i.rawTime=function(){return k||j.wake(),this._totalTime};var H=u("TweenLite",function(b,c,d){if(E.call(this,c,d),this.render=H.prototype.render,null==b)throw"Cannot tween a null target.";this.target=b="string"!=typeof b?b:H.selector(b)||b;var e,f,g,h=b.jquery||b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType),i=this.vars.overwrite;if(this._overwrite=i=null==i?X[H.defaultOverwrite]:"number"==typeof i?i>>0:X[i],(h||b instanceof Array||b.push&&q(b))&&"number"!=typeof b[0])for(this._targets=g=o(b),this._propLookup=[],this._siblings=[],e=0;e<g.length;e++)f=g[e],f?"string"!=typeof f?f.length&&f!==a&&f[0]&&(f[0]===a||f[0].nodeType&&f[0].style&&!f.nodeType)?(g.splice(e--,1),this._targets=g=g.concat(o(f))):(this._siblings[e]=aa(f,this,!1),1===i&&this._siblings[e].length>1&&ca(f,this,null,1,this._siblings[e])):(f=g[e--]=H.selector(f),"string"==typeof f&&g.splice(e+1,1)):g.splice(e--,1);else this._propLookup={},this._siblings=aa(b,this,!1),1===i&&this._siblings.length>1&&ca(b,this,null,1,this._siblings);(this.vars.immediateRender||0===c&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-n,this.render(Math.min(0,-this._delay)))},!0),I=function(b){return b&&b.length&&b!==a&&b[0]&&(b[0]===a||b[0].nodeType&&b[0].style&&!b.nodeType)},J=function(a,b){var c,d={};for(c in a)W[c]||c in b&&"transform"!==c&&"x"!==c&&"y"!==c&&"width"!==c&&"height"!==c&&"className"!==c&&"border"!==c||!(!T[c]||T[c]&&T[c]._autoCSS)||(d[c]=a[c],delete a[c]);a.css=d};i=H.prototype=new E,i.constructor=H,i.kill()._gc=!1,i.ratio=0,i._firstPT=i._targets=i._overwrittenProps=i._startAt=null,i._notifyPluginsOfEnabled=i._lazy=!1,H.version="2.1.3",H.defaultEase=i._ease=new w(null,null,1,1),H.defaultOverwrite="auto",H.ticker=j,H.autoSleep=120,H.lagSmoothing=function(a,b){j.lagSmoothing(a,b)},H.selector=a.$||a.jQuery||function(b){var c=a.$||a.jQuery;return c?(H.selector=c,c(b)):(d||(d=a.document),d?d.querySelectorAll?d.querySelectorAll(b):d.getElementById("#"===b.charAt(0)?b.substr(1):b):b)};var K=[],L={},M=/(?:(-|-=|\+=)?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/gi,N=/[\+-]=-?[\.\d]/,O=function(a){for(var b,c=this._firstPT,d=1e-6;c;)b=c.blob?1===a&&null!=this.end?this.end:a?this.join(""):this.start:c.c*a+c.s,c.m?b=c.m.call(this._tween,b,this._target||c.t,this._tween):d>b&&b>-d&&!c.blob&&(b=0),c.f?c.fp?c.t[c.p](c.fp,b):c.t[c.p](b):c.t[c.p]=b,c=c._next},P=function(a){return(1e3*a|0)/1e3+""},Q=function(a,b,c,d){var e,f,g,h,i,j,k,l=[],m=0,n="",o=0;for(l.start=a,l.end=b,a=l[0]=a+"",b=l[1]=b+"",c&&(c(l),a=l[0],b=l[1]),l.length=0,e=a.match(M)||[],f=b.match(M)||[],d&&(d._next=null,d.blob=1,l._firstPT=l._applyPT=d),i=f.length,h=0;i>h;h++)k=f[h],j=b.substr(m,b.indexOf(k,m)-m),n+=j||!h?j:",",m+=j.length,o?o=(o+1)%5:"rgba("===j.substr(-5)&&(o=1),k===e[h]||e.length<=h?n+=k:(n&&(l.push(n),n=""),g=parseFloat(e[h]),l.push(g),l._firstPT={_next:l._firstPT,t:l,p:l.length-1,s:g,c:("="===k.charAt(1)?parseInt(k.charAt(0)+"1",10)*parseFloat(k.substr(2)):parseFloat(k)-g)||0,f:0,m:o&&4>o?Math.round:P}),m+=k.length;return n+=b.substr(m),n&&l.push(n),l.setRatio=O,N.test(b)&&(l.end=null),l},R=function(a,b,c,d,e,f,g,h,i){"function"==typeof d&&(d=d(i||0,a));var j,k=typeof a[b],l="function"!==k?"":b.indexOf("set")||"function"!=typeof a["get"+b.substr(3)]?b:"get"+b.substr(3),m="get"!==c?c:l?g?a[l](g):a[l]():a[b],n="string"==typeof d&&"="===d.charAt(1),o={t:a,p:b,s:m,f:"function"===k,pg:0,n:e||b,m:f?"function"==typeof f?f:Math.round:0,pr:0,c:n?parseInt(d.charAt(0)+"1",10)*parseFloat(d.substr(2)):parseFloat(d)-m||0};return("number"!=typeof m||"number"!=typeof d&&!n)&&(g||isNaN(m)||!n&&isNaN(d)||"boolean"==typeof m||"boolean"==typeof d?(o.fp=g,j=Q(m,n?parseFloat(o.s)+o.c+(o.s+"").replace(/[0-9\-\.]/g,""):d,h||H.defaultStringFilter,o),o={t:j,p:"setRatio",s:0,c:1,f:2,pg:0,n:e||b,pr:0,m:0}):(o.s=parseFloat(m),n||(o.c=parseFloat(d)-o.s||0))),o.c?((o._next=this._firstPT)&&(o._next._prev=o),this._firstPT=o,o):void 0},S=H._internals={isArray:q,isSelector:I,lazyTweens:K,blobDif:Q},T=H._plugins={},U=S.tweenLookup={},V=0,W=S.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1,onOverwrite:1,callbackScope:1,stringFilter:1,id:1,yoyoEase:1,stagger:1},X={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},Y=E._rootFramesTimeline=new G,Z=E._rootTimeline=new G,$=30,_=S.lazyRender=function(){var a,b,c=K.length;for(L={},a=0;c>a;a++)b=K[a],b&&b._lazy!==!1&&(b.render(b._lazy[0],b._lazy[1],!0),b._lazy=!1);K.length=0};Z._startTime=j.time,Y._startTime=j.frame,Z._active=Y._active=!0,setTimeout(_,1),E._updateRoot=H.render=function(){var a,b,c;if(K.length&&_(),Z.render((j.time-Z._startTime)*Z._timeScale,!1,!1),Y.render((j.frame-Y._startTime)*Y._timeScale,!1,!1),K.length&&_(),j.frame>=$){$=j.frame+(parseInt(H.autoSleep,10)||120);for(c in U){for(b=U[c].tweens,a=b.length;--a>-1;)b[a]._gc&&b.splice(a,1);0===b.length&&delete U[c]}if(c=Z._first,(!c||c._paused)&&H.autoSleep&&!Y._first&&1===j._listeners.tick.length){for(;c&&c._paused;)c=c._next;c||j.sleep()}}},j.addEventListener("tick",E._updateRoot);var aa=function(a,b,c){var d,e,f=a._gsTweenID;if(U[f||(a._gsTweenID=f="t"+V++)]||(U[f]={target:a,tweens:[]}),b&&(d=U[f].tweens,d[e=d.length]=b,c))for(;--e>-1;)d[e]===b&&d.splice(e,1);return U[f].tweens},ba=function(a,b,c,d){var e,f,g=a.vars.onOverwrite;return g&&(e=g(a,b,c,d)),g=H.onOverwrite,g&&(f=g(a,b,c,d)),e!==!1&&f!==!1},ca=function(a,b,c,d,e){var f,g,h,i;if(1===d||d>=4){for(i=e.length,f=0;i>f;f++)if((h=e[f])!==b)h._gc||h._kill(null,a,b)&&(g=!0);else if(5===d)break;return g}var j,k=b._startTime+n,l=[],m=0,o=0===b._duration;for(f=e.length;--f>-1;)(h=e[f])===b||h._gc||h._paused||(h._timeline!==b._timeline?(j=j||da(b,0,o),0===da(h,j,o)&&(l[m++]=h)):h._startTime<=k&&h._startTime+h.totalDuration()/h._timeScale>k&&((o||!h._initted)&&k-h._startTime<=2*n||(l[m++]=h)));for(f=m;--f>-1;)if(h=l[f],i=h._firstPT,2===d&&h._kill(c,a,b)&&(g=!0),2!==d||!h._firstPT&&h._initted&&i){if(2!==d&&!ba(h,b))continue;h._enabled(!1,!1)&&(g=!0)}return g},da=function(a,b,c){for(var d=a._timeline,e=d._timeScale,f=a._startTime;d._timeline;){if(f+=d._startTime,e*=d._timeScale,d._paused)return-100;d=d._timeline}return f/=e,f>b?f-b:c&&f===b||!a._initted&&2*n>f-b?n:(f+=a.totalDuration()/a._timeScale/e)>b+n?0:f-b-n};i._init=function(){var a,b,c,d,e,f,g=this.vars,h=this._overwrittenProps,i=this._duration,j=!!g.immediateRender,k=g.ease,l=this._startAt;if(g.startAt){l&&(l.render(-1,!0),l.kill()),e={};for(d in g.startAt)e[d]=g.startAt[d];if(e.data="isStart",e.overwrite=!1,e.immediateRender=!0,e.lazy=j&&g.lazy!==!1,e.startAt=e.delay=null,e.onUpdate=g.onUpdate,e.onUpdateParams=g.onUpdateParams,e.onUpdateScope=g.onUpdateScope||g.callbackScope||this,this._startAt=H.to(this.target||{},0,e),j)if(this._time>0)this._startAt=null;else if(0!==i)return}else if(g.runBackwards&&0!==i)if(l)l.render(-1,!0),l.kill(),this._startAt=null;else{0!==this._time&&(j=!1),c={};for(d in g)W[d]&&"autoCSS"!==d||(c[d]=g[d]);if(c.overwrite=0,c.data="isFromStart",c.lazy=j&&g.lazy!==!1,c.immediateRender=j,this._startAt=H.to(this.target,0,c),j){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1),this.vars.immediateRender&&(this._startAt=null)}if(this._ease=k=k?k instanceof w?k:"function"==typeof k?new w(k,g.easeParams):x[k]||H.defaultEase:H.defaultEase,g.easeParams instanceof Array&&k.config&&(this._ease=k.config.apply(k,g.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(f=this._targets.length,a=0;f>a;a++)this._initProps(this._targets[a],this._propLookup[a]={},this._siblings[a],h?h[a]:null,a)&&(b=!0);else b=this._initProps(this.target,this._propLookup,this._siblings,h,0);if(b&&H._onPluginEvent("_onInitAllProps",this),h&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),g.runBackwards)for(c=this._firstPT;c;)c.s+=c.c,c.c=-c.c,c=c._next;this._onUpdate=g.onUpdate,this._initted=!0},i._initProps=function(b,c,d,e,f){var g,h,i,j,k,l;if(null==b)return!1;L[b._gsTweenID]&&_(),this.vars.css||b.style&&b!==a&&b.nodeType&&T.css&&this.vars.autoCSS!==!1&&J(this.vars,b);for(g in this.vars)if(l=this.vars[g],W[g])l&&(l instanceof Array||l.push&&q(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[g]=l=this._swapSelfInParams(l,this));else if(T[g]&&(j=new T[g])._onInitTween(b,this.vars[g],this,f)){for(this._firstPT=k={_next:this._firstPT,t:j,p:"setRatio",s:0,c:1,f:1,n:g,pg:1,pr:j._priority,m:0},h=j._overwriteProps.length;--h>-1;)c[j._overwriteProps[h]]=this._firstPT;(j._priority||j._onInitAllProps)&&(i=!0),(j._onDisable||j._onEnable)&&(this._notifyPluginsOfEnabled=!0),k._next&&(k._next._prev=k)}else c[g]=R.call(this,b,g,"get",l,g,0,null,this.vars.stringFilter,f);return e&&this._kill(e,b)?this._initProps(b,c,d,e,f):this._overwrite>1&&this._firstPT&&d.length>1&&ca(b,this,c,this._overwrite,d)?(this._kill(c,b),this._initProps(b,c,d,e,f)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(L[b._gsTweenID]=!0),i)},i.render=function(a,b,c){var d,e,f,g,h=this,i=h._time,j=h._duration,k=h._rawPrevTime;if(a>=j-n&&a>=0)h._totalTime=h._time=j,h.ratio=h._ease._calcEnd?h._ease.getRatio(1):1,h._reversed||(d=!0,e="onComplete",c=c||h._timeline.autoRemoveChildren),0===j&&(h._initted||!h.vars.lazy||c)&&(h._startTime===h._timeline._duration&&(a=0),(0>k||0>=a&&a>=-n||k===n&&"isPause"!==h.data)&&k!==a&&(c=!0,k>n&&(e="onReverseComplete")),h._rawPrevTime=g=!b||a||k===a?a:n);else if(n>a)h._totalTime=h._time=0,h.ratio=h._ease._calcEnd?h._ease.getRatio(0):0,(0!==i||0===j&&k>0)&&(e="onReverseComplete",d=h._reversed),a>-n?a=0:0>a&&(h._active=!1,0===j&&(h._initted||!h.vars.lazy||c)&&(k>=0&&(k!==n||"isPause"!==h.data)&&(c=!0),h._rawPrevTime=g=!b||a||k===a?a:n)),(!h._initted||h._startAt&&h._startAt.progress())&&(c=!0);else if(h._totalTime=h._time=a,h._easeType){var l=a/j,m=h._easeType,o=h._easePower;(1===m||3===m&&l>=.5)&&(l=1-l),3===m&&(l*=2),1===o?l*=l:2===o?l*=l*l:3===o?l*=l*l*l:4===o&&(l*=l*l*l*l),h.ratio=1===m?1-l:2===m?l:.5>a/j?l/2:1-l/2}else h.ratio=h._ease.getRatio(a/j);if(h._time!==i||c){if(!h._initted){if(h._init(),!h._initted||h._gc)return;if(!c&&h._firstPT&&(h.vars.lazy!==!1&&h._duration||h.vars.lazy&&!h._duration))return h._time=h._totalTime=i,h._rawPrevTime=k,K.push(h),void(h._lazy=[a,b]);h._time&&!d?h.ratio=h._ease.getRatio(h._time/j):d&&h._ease._calcEnd&&(h.ratio=h._ease.getRatio(0===h._time?0:1))}for(h._lazy!==!1&&(h._lazy=!1),h._active||!h._paused&&h._time!==i&&a>=0&&(h._active=!0),0===i&&(h._startAt&&(a>=0?h._startAt.render(a,!0,c):e||(e="_dummyGS")),h.vars.onStart&&(0!==h._time||0===j)&&(b||h._callback("onStart"))),f=h._firstPT;f;)f.f?f.t[f.p](f.c*h.ratio+f.s):f.t[f.p]=f.c*h.ratio+f.s,f=f._next;h._onUpdate&&(0>a&&h._startAt&&a!==-1e-4&&h._startAt.render(a,!0,c),b||(h._time!==i||d||c)&&h._callback("onUpdate")),e&&(!h._gc||c)&&(0>a&&h._startAt&&!h._onUpdate&&a!==-1e-4&&h._startAt.render(a,!0,c),d&&(h._timeline.autoRemoveChildren&&h._enabled(!1,!1),h._active=!1),!b&&h.vars[e]&&h._callback(e),0===j&&h._rawPrevTime===n&&g!==n&&(h._rawPrevTime=0))}},i._kill=function(a,b,c){if("all"===a&&(a=null),null==a&&(null==b||b===this.target))return this._lazy=!1,this._enabled(!1,!1);b="string"!=typeof b?b||this._targets||this.target:H.selector(b)||b;var d,e,f,g,h,i,j,k,l,m=c&&this._time&&c._startTime===this._startTime&&this._timeline===c._timeline,n=this._firstPT;if((q(b)||I(b))&&"number"!=typeof b[0])for(d=b.length;--d>-1;)this._kill(a,b[d],c)&&(i=!0);else{if(this._targets){for(d=this._targets.length;--d>-1;)if(b===this._targets[d]){h=this._propLookup[d]||{},this._overwrittenProps=this._overwrittenProps||[],e=this._overwrittenProps[d]=a?this._overwrittenProps[d]||{}:"all";break}}else{if(b!==this.target)return!1;h=this._propLookup,e=this._overwrittenProps=a?this._overwrittenProps||{}:"all"}if(h){if(j=a||h,k=a!==e&&"all"!==e&&a!==h&&("object"!=typeof a||!a._tempKill),c&&(H.onOverwrite||this.vars.onOverwrite)){for(f in j)h[f]&&(l||(l=[]),l.push(f));if((l||!a)&&!ba(this,c,b,l))return!1}for(f in j)(g=h[f])&&(m&&(g.f?g.t[g.p](g.s):g.t[g.p]=g.s,i=!0),g.pg&&g.t._kill(j)&&(i=!0),g.pg&&0!==g.t._overwriteProps.length||(g._prev?g._prev._next=g._next:g===this._firstPT&&(this._firstPT=g._next),g._next&&(g._next._prev=g._prev),g._next=g._prev=null),delete h[f]),k&&(e[f]=1);!this._firstPT&&this._initted&&n&&this._enabled(!1,!1)}}return i},i.invalidate=function(){this._notifyPluginsOfEnabled&&H._onPluginEvent("_onDisable",this);var a=this._time;return this._firstPT=this._overwrittenProps=this._startAt=this._onUpdate=null,this._notifyPluginsOfEnabled=this._active=this._lazy=!1,this._propLookup=this._targets?{}:[],E.prototype.invalidate.call(this),this.vars.immediateRender&&(this._time=-n,this.render(a,!1,this.vars.lazy!==!1)),this},i._enabled=function(a,b){if(k||j.wake(),a&&this._gc){var c,d=this._targets;if(d)for(c=d.length;--c>-1;)this._siblings[c]=aa(d[c],this,!0);else this._siblings=aa(this.target,this,!0)}return E.prototype._enabled.call(this,a,b),this._notifyPluginsOfEnabled&&this._firstPT?H._onPluginEvent(a?"_onEnable":"_onDisable",this):!1},H.to=function(a,b,c){return new H(a,b,c)},H.from=function(a,b,c){return c.runBackwards=!0,c.immediateRender=0!=c.immediateRender,new H(a,b,c)},H.fromTo=function(a,b,c,d){return d.startAt=c,d.immediateRender=0!=d.immediateRender&&0!=c.immediateRender,new H(a,b,d)},H.delayedCall=function(a,b,c,d,e){return new H(b,0,{delay:a,onComplete:b,onCompleteParams:c,callbackScope:d,onReverseComplete:b,onReverseCompleteParams:c,immediateRender:!1,lazy:!1,useFrames:e,overwrite:0})},H.set=function(a,b){return new H(a,0,b)},H.getTweensOf=function(a,b){if(null==a)return[];a="string"!=typeof a?a:H.selector(a)||a;var c,d,e,f;if((q(a)||I(a))&&"number"!=typeof a[0]){for(c=a.length,d=[];--c>-1;)d=d.concat(H.getTweensOf(a[c],b));for(c=d.length;--c>-1;)for(f=d[c],e=c;--e>-1;)f===d[e]&&d.splice(c,1)}else if(a._gsTweenID)for(d=aa(a).concat(),c=d.length;--c>-1;)(d[c]._gc||b&&!d[c].isActive())&&d.splice(c,1);return d||[]},H.killTweensOf=H.killDelayedCallsTo=function(a,b,c){"object"==typeof b&&(c=b,b=!1);for(var d=H.getTweensOf(a,b),e=d.length;--e>-1;)d[e]._kill(c,a)};var ea=u("plugins.TweenPlugin",function(a,b){this._overwriteProps=(a||"").split(","),this._propName=this._overwriteProps[0],this._priority=b||0,this._super=ea.prototype},!0);if(i=ea.prototype,ea.version="1.19.0",ea.API=2,i._firstPT=null,i._addTween=R,i.setRatio=O,i._kill=function(a){var b,c=this._overwriteProps,d=this._firstPT;if(null!=a[this._propName])this._overwriteProps=[];else for(b=c.length;--b>-1;)null!=a[c[b]]&&c.splice(b,1);for(;d;)null!=a[d.n]&&(d._next&&(d._next._prev=d._prev),d._prev?(d._prev._next=d._next,d._prev=null):this._firstPT===d&&(this._firstPT=d._next)),d=d._next;return!1},i._mod=i._roundProps=function(a){for(var b,c=this._firstPT;c;)b=a[this._propName]||null!=c.n&&a[c.n.split(this._propName+"_").join("")],b&&"function"==typeof b&&(2===c.f?c.t._applyPT.m=b:c.m=b),c=c._next},H._onPluginEvent=function(a,b){var c,d,e,f,g,h=b._firstPT;if("_onInitAllProps"===a){for(;h;){for(g=h._next,d=e;d&&d.pr>h.pr;)d=d._next;(h._prev=d?d._prev:f)?h._prev._next=h:e=h,(h._next=d)?d._prev=h:f=h,h=g}h=b._firstPT=e}for(;h;)h.pg&&"function"==typeof h.t[a]&&h.t[a]()&&(c=!0),h=h._next;return c},ea.activate=function(a){for(var b=a.length;--b>-1;)a[b].API===ea.API&&(T[(new a[b])._propName]=a[b]);return!0},t.plugin=function(a){if(!(a&&a.propName&&a.init&&a.API))throw"illegal plugin definition.";var b,c=a.propName,d=a.priority||0,e=a.overwriteProps,f={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_mod",mod:"_mod",initAll:"_onInitAllProps"},g=u("plugins."+c.charAt(0).toUpperCase()+c.substr(1)+"Plugin",function(){ea.call(this,c,d),this._overwriteProps=e||[]},a.global===!0),h=g.prototype=new ea(c);h.constructor=g,g.API=a.API;for(b in f)"function"==typeof a[b]&&(h[f[b]]=a[b]);return g.version=a.version,ea.activate([g]),g},g=a._gsQueue){for(h=0;h<g.length;h++)g[h]();for(i in r)r[i].func||a.console.log("GSAP encountered missing dependency: "+i)}k=!1}( true&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenMax"); 8802/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "../../../../../node_modules/webpack/buildin/global.js"))) 8803 8804/***/ }), 8805
vendor: 10,742 bytes, lines 8806-9243
8806/***/ "../../../../../node_modules/headroom.js/dist/headroom.js": 8807/*!************************************************************************************!*\ 8808 !*** /Users/mauro/Sites/eternalsunspire/node_modules/headroom.js/dist/headroom.js ***! 8809 \************************************************************************************/ 8810/*! no static exports found */ 8811/***/ (function(module, exports, __webpack_require__) { 8812 8813/*! 8814 * headroom.js v0.10.4 - Give your page some headroom. Hide your header until you need it 8815 * Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js 8816 * License: MIT 8817 */ 8818 8819(function (global, factory) { 8820 true ? module.exports = factory() : 8821 undefined; 8822}(this, function () { 'use strict'; 8823 8824 function isBrowser() { 8825 return typeof window !== "undefined"; 8826 } 8827 8828 /** 8829 * Used to detect browser support for adding an event listener with options 8830 * Credit: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener 8831 */ 8832 function passiveEventsSupported() { 8833 var supported = false; 8834 8835 try { 8836 var options = { 8837 // eslint-disable-next-line getter-return 8838 get passive() { 8839 supported = true; 8840 } 8841 }; 8842 window.addEventListener("test", options, options); 8843 window.removeEventListener("test", options, options); 8844 } catch (err) { 8845 supported = false; 8846 } 8847 8848 return supported; 8849 } 8850 8851 function isSupported() { 8852 return !!( 8853 isBrowser() && 8854 function() {}.bind && 8855 "classList" in document.documentElement && 8856 Object.assign && 8857 Object.keys && 8858 requestAnimationFrame 8859 ); 8860 } 8861 8862 function isDocument(obj) { 8863 return obj.nodeType === 9; // Node.DOCUMENT_NODE === 9 8864 } 8865 8866 function isWindow(obj) { 8867 // `obj === window` or `obj instanceof Window` is not sufficient, 8868 // as the obj may be the window of an iframe. 8869 return obj && obj.document && isDocument(obj.document); 8870 } 8871 8872 function windowScroller(win) { 8873 var doc = win.document; 8874 var body = doc.body; 8875 var html = doc.documentElement; 8876 8877 return { 8878 /** 8879 * @see http://james.padolsey.com/javascript/get-document-height-cross-browser/ 8880 * @return {Number} the scroll height of the document in pixels 8881 */ 8882 scrollHeight: function() { 8883 return Math.max( 8884 body.scrollHeight, 8885 html.scrollHeight, 8886 body.offsetHeight, 8887 html.offsetHeight, 8888 body.clientHeight, 8889 html.clientHeight 8890 ); 8891 }, 8892 8893 /** 8894 * @see http://andylangton.co.uk/blog/development/get-viewport-size-width-and-height-javascript 8895 * @return {Number} the height of the viewport in pixels 8896 */ 8897 height: function() { 8898 return win.innerHeight || html.clientHeight || body.clientHeight; 8899 }, 8900 8901 /** 8902 * Gets the Y scroll position 8903 * @return {Number} pixels the page has scrolled along the Y-axis 8904 */ 8905 scrollY: function() { 8906 if (win.pageYOffset !== undefined) { 8907 return win.pageYOffset; 8908 } 8909 8910 return (html || body.parentNode || body).scrollTop; 8911 } 8912 }; 8913 } 8914 8915 function elementScroller(element) { 8916 return { 8917 /** 8918 * @return {Number} the scroll height of the element in pixels 8919 */ 8920 scrollHeight: function() { 8921 return Math.max( 8922 element.scrollHeight, 8923 element.offsetHeight, 8924 element.clientHeight 8925 ); 8926 }, 8927 8928 /** 8929 * @return {Number} the height of the element in pixels 8930 */ 8931 height: function() { 8932 return Math.max(element.offsetHeight, element.clientHeight); 8933 }, 8934 8935 /** 8936 * Gets the Y scroll position 8937 * @return {Number} pixels the element has scrolled along the Y-axis 8938 */ 8939 scrollY: function() { 8940 return element.scrollTop; 8941 } 8942 }; 8943 } 8944 8945 function createScroller(element) { 8946 return isWindow(element) ? windowScroller(element) : elementScroller(element); 8947 } 8948 8949 /** 8950 * @param element EventTarget 8951 */ 8952 function trackScroll(element, options, callback) { 8953 var isPassiveSupported = passiveEventsSupported(); 8954 var rafId; 8955 var scrolled = false; 8956 var scroller = createScroller(element); 8957 var lastScrollY = scroller.scrollY(); 8958 var details = {}; 8959 8960 function update() { 8961 var scrollY = Math.round(scroller.scrollY()); 8962 var height = scroller.height(); 8963 var scrollHeight = scroller.scrollHeight(); 8964 8965 // reuse object for less memory churn 8966 details.scrollY = scrollY; 8967 details.lastScrollY = lastScrollY; 8968 details.direction = scrollY > lastScrollY ? "down" : "up"; 8969 details.distance = Math.abs(scrollY - lastScrollY); 8970 details.isOutOfBounds = scrollY < 0 || scrollY + height > scrollHeight; 8971 details.top = scrollY <= options.offset; 8972 details.bottom = scrollY + height >= scrollHeight; 8973 details.toleranceExceeded = 8974 details.distance > options.tolerance[details.direction]; 8975 8976 callback(details); 8977 8978 lastScrollY = scrollY; 8979 scrolled = false; 8980 } 8981 8982 function handleScroll() { 8983 if (!scrolled) { 8984 scrolled = true; 8985 rafId = requestAnimationFrame(update); 8986 } 8987 } 8988 8989 var eventOptions = isPassiveSupported 8990 ? { passive: true, capture: false } 8991 : false; 8992 8993 element.addEventListener("scroll", handleScroll, eventOptions); 8994 update(); 8995 8996 return { 8997 destroy: function() { 8998 cancelAnimationFrame(rafId); 8999 element.removeEventListener("scroll", handleScroll, eventOptions); 9000 } 9001 }; 9002 } 9003 9004 function normalizeTolerance(t) { 9005 return t === Object(t) ? t : { down: t, up: t }; 9006 } 9007 9008 /** 9009 * UI enhancement for fixed headers. 9010 * Hides header when scrolling down 9011 * Shows header when scrolling up 9012 * @constructor 9013 * @param {DOMElement} elem the header element 9014 * @param {Object} options options for the widget 9015 */ 9016 function Headroom(elem, options) { 9017 options = options || {}; 9018 Object.assign(this, Headroom.options, options); 9019 this.classes = Object.assign({}, Headroom.options.classes, options.classes); 9020 9021 this.elem = elem; 9022 this.tolerance = normalizeTolerance(this.tolerance); 9023 this.initialised = false; 9024 this.frozen = false; 9025 } 9026 Headroom.prototype = { 9027 constructor: Headroom, 9028 9029 /** 9030 * Start listening to scrolling 9031 * @public 9032 */ 9033 init: function() { 9034 if (Headroom.cutsTheMustard && !this.initialised) { 9035 this.addClass("initial"); 9036 this.initialised = true; 9037 9038 // defer event registration to handle browser 9039 // potentially restoring previous scroll position 9040 setTimeout( 9041 function(self) { 9042 self.scrollTracker = trackScroll( 9043 self.scroller, 9044 { offset: self.offset, tolerance: self.tolerance }, 9045 self.update.bind(self) 9046 ); 9047 }, 9048 100, 9049 this 9050 ); 9051 } 9052 9053 return this; 9054 }, 9055 9056 /** 9057 * Destroy the widget, clearing up after itself 9058 * @public 9059 */ 9060 destroy: function() { 9061 this.initialised = false; 9062 Object.keys(this.classes).forEach(this.removeClass, this); 9063 this.scrollTracker.destroy(); 9064 }, 9065 9066 /** 9067 * Unpin the element 9068 * @public 9069 */ 9070 unpin: function() { 9071 if (this.hasClass("pinned") || !this.hasClass("unpinned")) { 9072 this.addClass("unpinned"); 9073 this.removeClass("pinned"); 9074 9075 if (this.onUnpin) { 9076 this.onUnpin.call(this); 9077 } 9078 } 9079 }, 9080 9081 /** 9082 * Pin the element 9083 * @public 9084 */ 9085 pin: function() { 9086 if (this.hasClass("unpinned")) { 9087 this.addClass("pinned"); 9088 this.removeClass("unpinned"); 9089 9090 if (this.onPin) { 9091 this.onPin.call(this); 9092 } 9093 } 9094 }, 9095 9096 /** 9097 * Freezes the current state of the widget 9098 * @public 9099 */ 9100 freeze: function() { 9101 this.frozen = true; 9102 this.addClass("frozen"); 9103 }, 9104 9105 /** 9106 * Re-enables the default behaviour of the widget 9107 * @public 9108 */ 9109 unfreeze: function() { 9110 this.frozen = false; 9111 this.removeClass("frozen"); 9112 }, 9113 9114 top: function() { 9115 if (!this.hasClass("top")) { 9116 this.addClass("top"); 9117 this.removeClass("notTop"); 9118 9119 if (this.onTop) { 9120 this.onTop.call(this); 9121 } 9122 } 9123 }, 9124 9125 notTop: function() { 9126 if (!this.hasClass("notTop")) { 9127 this.addClass("notTop"); 9128 this.removeClass("top"); 9129 9130 if (this.onNotTop) { 9131 this.onNotTop.call(this); 9132 } 9133 } 9134 }, 9135 9136 bottom: function() { 9137 if (!this.hasClass("bottom")) { 9138 this.addClass("bottom"); 9139 this.removeClass("notBottom"); 9140 9141 if (this.onBottom) { 9142 this.onBottom.call(this); 9143 } 9144 } 9145 }, 9146 9147 notBottom: function() { 9148 if (!this.hasClass("notBottom")) { 9149 this.addClass("notBottom"); 9150 this.removeClass("bottom"); 9151 9152 if (this.onNotBottom) { 9153 this.onNotBottom.call(this); 9154 } 9155 } 9156 }, 9157 9158 shouldUnpin: function(details) { 9159 var scrollingDown = details.direction === "down"; 9160 9161 return scrollingDown && !details.top && details.toleranceExceeded; 9162 }, 9163 9164 shouldPin: function(details) { 9165 var scrollingUp = details.direction === "up"; 9166 9167 return (scrollingUp && details.toleranceExceeded) || details.top; 9168 }, 9169 9170 addClass: function(className) { 9171 this.elem.classList.add(this.classes[className]); 9172 }, 9173 9174 removeClass: function(className) { 9175 this.elem.classList.remove(this.classes[className]); 9176 }, 9177 9178 hasClass: function(className) { 9179 return this.elem.classList.contains(this.classes[className]); 9180 }, 9181 9182 update: function(details) { 9183 if (details.isOutOfBounds) { 9184 // Ignore bouncy scrolling in OSX 9185 return; 9186 } 9187 9188 if (this.frozen === true) { 9189 return; 9190 } 9191 9192 if (details.top) { 9193 this.top(); 9194 } else { 9195 this.notTop(); 9196 } 9197 9198 if (details.bottom) { 9199 this.bottom(); 9200 } else { 9201 this.notBottom(); 9202 } 9203 9204 if (this.shouldUnpin(details)) { 9205 this.unpin(); 9206 } else if (this.shouldPin(details)) { 9207 this.pin(); 9208 } 9209 } 9210 }; 9211 9212 /** 9213 * Default options 9214 * @type {Object} 9215 */ 9216 Headroom.options = { 9217 tolerance: { 9218 up: 0, 9219 down: 0 9220 }, 9221 offset: 0, 9222 scroller: isBrowser() ? window : null, 9223 classes: { 9224 frozen: "headroom--frozen", 9225 pinned: "headroom--pinned", 9226 unpinned: "headroom--unpinned", 9227 top: "headroom--top", 9228 notTop: "headroom--not-top", 9229 bottom: "headroom--bottom", 9230 notBottom: "headroom--not-bottom", 9231 initial: "headroom" 9232 } 9233 }; 9234 9235 Headroom.cutsTheMustard = isSupported(); 9236 9237 return Headroom; 9238 9239})); 9240 9241 9242/***/ }), 9243
vendor: 289,187 bytes, lines 9244-20136
9244/***/ "../../../../../node_modules/jquery/dist/jquery.js": 9245/*!*****************************************************************************!*\ 9246 !*** /Users/mauro/Sites/eternalsunspire/node_modules/jquery/dist/jquery.js ***! 9247 \*****************************************************************************/ 9248/*! no static exports found */ 9249/***/ (function(module, exports, __webpack_require__) { 9250 9251var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 9252 * jQuery JavaScript Library v3.6.0 9253 * https://jquery.com/ 9254 * 9255 * Includes Sizzle.js 9256 * https://sizzlejs.com/ 9257 * 9258 * Copyright OpenJS Foundation and other contributors 9259 * Released under the MIT license 9260 * https://jquery.org/license 9261 * 9262 * Date: 2021-03-02T17:08Z 9263 */ 9264( function( global, factory ) { 9265 9266 "use strict"; 9267 9268 if ( true && typeof module.exports === "object" ) { 9269 9270 // For CommonJS and CommonJS-like environments where a proper `window` 9271 // is present, execute the factory and get jQuery. 9272 // For environments that do not have a `window` with a `document` 9273 // (such as Node.js), expose a factory as module.exports. 9274 // This accentuates the need for the creation of a real `window`. 9275 // e.g. var jQuery = require("jquery")(window); 9276 // See ticket #14549 for more info. 9277 module.exports = global.document ? 9278 factory( global, true ) : 9279 function( w ) { 9280 if ( !w.document ) { 9281 throw new Error( "jQuery requires a window with a document" ); 9282 } 9283 return factory( w ); 9284 }; 9285 } else { 9286 factory( global ); 9287 } 9288 9289// Pass this if window is not defined yet 9290} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { 9291 9292// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 9293// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode 9294// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common 9295// enough that all such attempts are guarded in a try block. 9296"use strict"; 9297 9298var arr = []; 9299 9300var getProto = Object.getPrototypeOf; 9301 9302var slice = arr.slice; 9303 9304var flat = arr.flat ? function( array ) { 9305 return arr.flat.call( array ); 9306} : function( array ) { 9307 return arr.concat.apply( [], array ); 9308}; 9309 9310 9311var push = arr.push; 9312 9313var indexOf = arr.indexOf; 9314 9315var class2type = {}; 9316 9317var toString = class2type.toString; 9318 9319var hasOwn = class2type.hasOwnProperty; 9320 9321var fnToString = hasOwn.toString; 9322 9323var ObjectFunctionString = fnToString.call( Object ); 9324 9325var support = {}; 9326 9327var isFunction = function isFunction( obj ) { 9328 9329 // Support: Chrome <=57, Firefox <=52 9330 // In some browsers, typeof returns "function" for HTML <object> elements 9331 // (i.e., `typeof document.createElement( "object" ) === "function"`). 9332 // We don't want to classify *any* DOM node as a function. 9333 // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 9334 // Plus for old WebKit, typeof returns "function" for HTML collections 9335 // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) 9336 return typeof obj === "function" && typeof obj.nodeType !== "number" && 9337 typeof obj.item !== "function"; 9338 }; 9339 9340 9341var isWindow = function isWindow( obj ) { 9342 return obj != null && obj === obj.window; 9343 }; 9344 9345 9346var document = window.document; 9347 9348 9349 9350 var preservedScriptAttributes = { 9351 type: true, 9352 src: true, 9353 nonce: true, 9354 noModule: true 9355 }; 9356 9357 function DOMEval( code, node, doc ) { 9358 doc = doc || document; 9359 9360 var i, val, 9361 script = doc.createElement( "script" ); 9362 9363 script.text = code; 9364 if ( node ) { 9365 for ( i in preservedScriptAttributes ) { 9366 9367 // Support: Firefox 64+, Edge 18+ 9368 // Some browsers don't support the "nonce" property on scripts. 9369 // On the other hand, just using `getAttribute` is not enough as 9370 // the `nonce` attribute is reset to an empty string whenever it 9371 // becomes browsing-context connected. 9372 // See https://github.com/whatwg/html/issues/2369 9373 // See https://html.spec.whatwg.org/#nonce-attributes 9374 // The `node.getAttribute` check was added for the sake of 9375 // `jQuery.globalEval` so that it can fake a nonce-containing node 9376 // via an object. 9377 val = node[ i ] || node.getAttribute && node.getAttribute( i ); 9378 if ( val ) { 9379 script.setAttribute( i, val ); 9380 } 9381 } 9382 } 9383 doc.head.appendChild( script ).parentNode.removeChild( script ); 9384 } 9385 9386 9387function toType( obj ) { 9388 if ( obj == null ) { 9389 return obj + ""; 9390 } 9391 9392 // Support: Android <=2.3 only (functionish RegExp) 9393 return typeof obj === "object" || typeof obj === "function" ? 9394 class2type[ toString.call( obj ) ] || "object" : 9395 typeof obj; 9396} 9397/* global Symbol */ 9398// Defining this global in .eslintrc.json would create a danger of using the global 9399// unguarded in another place, it seems safer to define global only for this module 9400 9401 9402 9403var 9404 version = "3.6.0", 9405 9406 // Define a local copy of jQuery 9407 jQuery = function( selector, context ) { 9408 9409 // The jQuery object is actually just the init constructor 'enhanced' 9410 // Need init if jQuery is called (just allow error to be thrown if not included) 9411 return new jQuery.fn.init( selector, context ); 9412 }; 9413 9414jQuery.fn = jQuery.prototype = { 9415 9416 // The current version of jQuery being used 9417 jquery: version, 9418 9419 constructor: jQuery, 9420 9421 // The default length of a jQuery object is 0 9422 length: 0, 9423 9424 toArray: function() { 9425 return slice.call( this ); 9426 }, 9427 9428 // Get the Nth element in the matched element set OR 9429 // Get the whole matched element set as a clean array 9430 get: function( num ) { 9431 9432 // Return all the elements in a clean array 9433 if ( num == null ) { 9434 return slice.call( this ); 9435 } 9436 9437 // Return just the one element from the set 9438 return num < 0 ? this[ num + this.length ] : this[ num ]; 9439 }, 9440 9441 // Take an array of elements and push it onto the stack 9442 // (returning the new matched element set) 9443 pushStack: function( elems ) { 9444 9445 // Build a new jQuery matched element set 9446 var ret = jQuery.merge( this.constructor(), elems ); 9447 9448 // Add the old object onto the stack (as a reference) 9449 ret.prevObject = this; 9450 9451 // Return the newly-formed element set 9452 return ret; 9453 }, 9454 9455 // Execute a callback for every element in the matched set. 9456 each: function( callback ) { 9457 return jQuery.each( this, callback ); 9458 }, 9459 9460 map: function( callback ) { 9461 return this.pushStack( jQuery.map( this, function( elem, i ) { 9462 return callback.call( elem, i, elem ); 9463 } ) ); 9464 }, 9465 9466 slice: function() { 9467 return this.pushStack( slice.apply( this, arguments ) ); 9468 }, 9469 9470 first: function() { 9471 return this.eq( 0 ); 9472 }, 9473 9474 last: function() { 9475 return this.eq( -1 ); 9476 }, 9477 9478 even: function() { 9479 return this.pushStack( jQuery.grep( this, function( _elem, i ) { 9480 return ( i + 1 ) % 2; 9481 } ) ); 9482 }, 9483 9484 odd: function() { 9485 return this.pushStack( jQuery.grep( this, function( _elem, i ) { 9486 return i % 2; 9487 } ) ); 9488 }, 9489 9490 eq: function( i ) { 9491 var len = this.length, 9492 j = +i + ( i < 0 ? len : 0 ); 9493 return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); 9494 }, 9495 9496 end: function() { 9497 return this.prevObject || this.constructor(); 9498 }, 9499 9500 // For internal use only. 9501 // Behaves like an Array's method, not like a jQuery method. 9502 push: push, 9503 sort: arr.sort, 9504 splice: arr.splice 9505}; 9506 9507jQuery.extend = jQuery.fn.extend = function() { 9508 var options, name, src, copy, copyIsArray, clone, 9509 target = arguments[ 0 ] || {}, 9510 i = 1, 9511 length = arguments.length, 9512 deep = false; 9513 9514 // Handle a deep copy situation 9515 if ( typeof target === "boolean" ) { 9516 deep = target; 9517 9518 // Skip the boolean and the target 9519 target = arguments[ i ] || {}; 9520 i++; 9521 } 9522 9523 // Handle case when target is a string or something (possible in deep copy) 9524 if ( typeof target !== "object" && !isFunction( target ) ) { 9525 target = {}; 9526 } 9527 9528 // Extend jQuery itself if only one argument is passed 9529 if ( i === length ) { 9530 target = this; 9531 i--; 9532 } 9533 9534 for ( ; i < length; i++ ) { 9535 9536 // Only deal with non-null/undefined values 9537 if ( ( options = arguments[ i ] ) != null ) { 9538 9539 // Extend the base object 9540 for ( name in options ) { 9541 copy = options[ name ]; 9542 9543 // Prevent Object.prototype pollution 9544 // Prevent never-ending loop 9545 if ( name === "__proto__" || target === copy ) { 9546 continue; 9547 } 9548 9549 // Recurse if we're merging plain objects or arrays 9550 if ( deep && copy && ( jQuery.isPlainObject( copy ) || 9551 ( copyIsArray = Array.isArray( copy ) ) ) ) { 9552 src = target[ name ]; 9553 9554 // Ensure proper type for the source value 9555 if ( copyIsArray && !Array.isArray( src ) ) { 9556 clone = []; 9557 } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { 9558 clone = {}; 9559 } else { 9560 clone = src; 9561 } 9562 copyIsArray = false; 9563 9564 // Never move original objects, clone them 9565 target[ name ] = jQuery.extend( deep, clone, copy ); 9566 9567 // Don't bring in undefined values 9568 } else if ( copy !== undefined ) { 9569 target[ name ] = copy; 9570 } 9571 } 9572 } 9573 } 9574 9575 // Return the modified object 9576 return target; 9577}; 9578 9579jQuery.extend( { 9580 9581 // Unique for each copy of jQuery on the page 9582 expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), 9583 9584 // Assume jQuery is ready without the ready module 9585 isReady: true, 9586 9587 error: function( msg ) { 9588 throw new Error( msg ); 9589 }, 9590 9591 noop: function() {}, 9592 9593 isPlainObject: function( obj ) { 9594 var proto, Ctor; 9595 9596 // Detect obvious negatives 9597 // Use toString instead of jQuery.type to catch host objects 9598 if ( !obj || toString.call( obj ) !== "[object Object]" ) { 9599 return false; 9600 } 9601 9602 proto = getProto( obj ); 9603 9604 // Objects with no prototype (e.g., `Object.create( null )`) are plain 9605 if ( !proto ) { 9606 return true; 9607 } 9608 9609 // Objects with prototype are plain iff they were constructed by a global Object function 9610 Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; 9611 return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; 9612 }, 9613 9614 isEmptyObject: function( obj ) { 9615 var name; 9616 9617 for ( name in obj ) { 9618 return false; 9619 } 9620 return true; 9621 }, 9622 9623 // Evaluates a script in a provided context; falls back to the global one 9624 // if not specified. 9625 globalEval: function( code, options, doc ) { 9626 DOMEval( code, { nonce: options && options.nonce }, doc ); 9627 }, 9628 9629 each: function( obj, callback ) { 9630 var length, i = 0; 9631 9632 if ( isArrayLike( obj ) ) { 9633 length = obj.length; 9634 for ( ; i < length; i++ ) { 9635 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 9636 break; 9637 } 9638 } 9639 } else { 9640 for ( i in obj ) { 9641 if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { 9642 break; 9643 } 9644 } 9645 } 9646 9647 return obj; 9648 }, 9649 9650 // results is for internal usage only 9651 makeArray: function( arr, results ) { 9652 var ret = results || []; 9653 9654 if ( arr != null ) { 9655 if ( isArrayLike( Object( arr ) ) ) { 9656 jQuery.merge( ret, 9657 typeof arr === "string" ? 9658 [ arr ] : arr 9659 ); 9660 } else { 9661 push.call( ret, arr ); 9662 } 9663 } 9664 9665 return ret; 9666 }, 9667 9668 inArray: function( elem, arr, i ) { 9669 return arr == null ? -1 : indexOf.call( arr, elem, i ); 9670 }, 9671 9672 // Support: Android <=4.0 only, PhantomJS 1 only 9673 // push.apply(_, arraylike) throws on ancient WebKit 9674 merge: function( first, second ) { 9675 var len = +second.length, 9676 j = 0, 9677 i = first.length; 9678 9679 for ( ; j < len; j++ ) { 9680 first[ i++ ] = second[ j ]; 9681 } 9682 9683 first.length = i; 9684 9685 return first; 9686 }, 9687 9688 grep: function( elems, callback, invert ) { 9689 var callbackInverse, 9690 matches = [], 9691 i = 0, 9692 length = elems.length, 9693 callbackExpect = !invert; 9694 9695 // Go through the array, only saving the items 9696 // that pass the validator function 9697 for ( ; i < length; i++ ) { 9698 callbackInverse = !callback( elems[ i ], i ); 9699 if ( callbackInverse !== callbackExpect ) { 9700 matches.push( elems[ i ] ); 9701 } 9702 } 9703 9704 return matches; 9705 }, 9706 9707 // arg is for internal usage only 9708 map: function( elems, callback, arg ) { 9709 var length, value, 9710 i = 0, 9711 ret = []; 9712 9713 // Go through the array, translating each of the items to their new values 9714 if ( isArrayLike( elems ) ) { 9715 length = elems.length; 9716 for ( ; i < length; i++ ) { 9717 value = callback( elems[ i ], i, arg ); 9718 9719 if ( value != null ) { 9720 ret.push( value ); 9721 } 9722 } 9723 9724 // Go through every key on the object, 9725 } else { 9726 for ( i in elems ) { 9727 value = callback( elems[ i ], i, arg ); 9728 9729 if ( value != null ) { 9730 ret.push( value ); 9731 } 9732 } 9733 } 9734 9735 // Flatten any nested arrays 9736 return flat( ret ); 9737 }, 9738 9739 // A global GUID counter for objects 9740 guid: 1, 9741 9742 // jQuery.support is not used in Core but other projects attach their 9743 // properties to it so it needs to exist. 9744 support: support 9745} ); 9746 9747if ( typeof Symbol === "function" ) { 9748 jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; 9749} 9750 9751// Populate the class2type map 9752jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), 9753 function( _i, name ) { 9754 class2type[ "[object " + name + "]" ] = name.toLowerCase(); 9755 } ); 9756 9757function isArrayLike( obj ) { 9758 9759 // Support: real iOS 8.2 only (not reproducible in simulator) 9760 // `in` check used to prevent JIT error (gh-2145) 9761 // hasOwn isn't used here due to false negatives 9762 // regarding Nodelist length in IE 9763 var length = !!obj && "length" in obj && obj.length, 9764 type = toType( obj ); 9765 9766 if ( isFunction( obj ) || isWindow( obj ) ) { 9767 return false; 9768 } 9769 9770 return type === "array" || length === 0 || 9771 typeof length === "number" && length > 0 && ( length - 1 ) in obj; 9772} 9773var Sizzle = 9774/*! 9775 * Sizzle CSS Selector Engine v2.3.6 9776 * https://sizzlejs.com/ 9777 * 9778 * Copyright JS Foundation and other contributors 9779 * Released under the MIT license 9780 * https://js.foundation/ 9781 * 9782 * Date: 2021-02-16 9783 */ 9784( function( window ) { 9785var i, 9786 support, 9787 Expr, 9788 getText, 9789 isXML, 9790 tokenize, 9791 compile, 9792 select, 9793 outermostContext, 9794 sortInput, 9795 hasDuplicate, 9796 9797 // Local document vars 9798 setDocument, 9799 document, 9800 docElem, 9801 documentIsHTML, 9802 rbuggyQSA, 9803 rbuggyMatches, 9804 matches, 9805 contains, 9806 9807 // Instance-specific data 9808 expando = "sizzle" + 1 * new Date(), 9809 preferredDoc = window.document, 9810 dirruns = 0, 9811 done = 0, 9812 classCache = createCache(), 9813 tokenCache = createCache(), 9814 compilerCache = createCache(), 9815 nonnativeSelectorCache = createCache(), 9816 sortOrder = function( a, b ) { 9817 if ( a === b ) { 9818 hasDuplicate = true; 9819 } 9820 return 0; 9821 }, 9822 9823 // Instance methods 9824 hasOwn = ( {} ).hasOwnProperty, 9825 arr = [], 9826 pop = arr.pop, 9827 pushNative = arr.push, 9828 push = arr.push, 9829 slice = arr.slice, 9830 9831 // Use a stripped-down indexOf as it's faster than native 9832 // https://jsperf.com/thor-indexof-vs-for/5 9833 indexOf = function( list, elem ) { 9834 var i = 0, 9835 len = list.length; 9836 for ( ; i < len; i++ ) { 9837 if ( list[ i ] === elem ) { 9838 return i; 9839 } 9840 } 9841 return -1; 9842 }, 9843 9844 booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|" + 9845 "ismap|loop|multiple|open|readonly|required|scoped", 9846 9847 // Regular expressions 9848 9849 // http://www.w3.org/TR/css3-selectors/#whitespace 9850 whitespace = "[\\x20\\t\\r\\n\\f]", 9851 9852 // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram 9853 identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + 9854 "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", 9855 9856 // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors 9857 attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + 9858 9859 // Operator (capture 2) 9860 "*([*^$|!~]?=)" + whitespace + 9861 9862 // "Attribute values must be CSS identifiers [capture 5] 9863 // or strings [capture 3 or capture 4]" 9864 "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + 9865 whitespace + "*\\]", 9866 9867 pseudos = ":(" + identifier + ")(?:\\((" + 9868 9869 // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: 9870 // 1. quoted (capture 3; capture 4 or capture 5) 9871 "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + 9872 9873 // 2. simple (capture 6) 9874 "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + 9875 9876 // 3. anything else (capture 2) 9877 ".*" + 9878 ")\\)|)", 9879 9880 // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter 9881 rwhitespace = new RegExp( whitespace + "+", "g" ), 9882 rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + 9883 whitespace + "+$", "g" ), 9884 9885 rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), 9886 rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + 9887 "*" ), 9888 rdescend = new RegExp( whitespace + "|>" ), 9889 9890 rpseudo = new RegExp( pseudos ), 9891 ridentifier = new RegExp( "^" + identifier + "$" ), 9892 9893 matchExpr = { 9894 "ID": new RegExp( "^#(" + identifier + ")" ), 9895 "CLASS": new RegExp( "^\\.(" + identifier + ")" ), 9896 "TAG": new RegExp( "^(" + identifier + "|[*])" ), 9897 "ATTR": new RegExp( "^" + attributes ), 9898 "PSEUDO": new RegExp( "^" + pseudos ), 9899 "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + 9900 whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + 9901 whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), 9902 "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), 9903 9904 // For use in libraries implementing .is() 9905 // We use this for POS matching in `select` 9906 "needsContext": new RegExp( "^" + whitespace + 9907 "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + 9908 "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) 9909 }, 9910 9911 rhtml = /HTML$/i, 9912 rinputs = /^(?:input|select|textarea|button)$/i, 9913 rheader = /^h\d$/i, 9914 9915 rnative = /^[^{]+\{\s*\[native \w/, 9916 9917 // Easily-parseable/retrievable ID or TAG or CLASS selectors 9918 rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, 9919 9920 rsibling = /[+~]/, 9921 9922 // CSS escapes 9923 // http://www.w3.org/TR/CSS21/syndata.html#escaped-characters 9924 runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g" ), 9925 funescape = function( escape, nonHex ) { 9926 var high = "0x" + escape.slice( 1 ) - 0x10000; 9927 9928 return nonHex ? 9929 9930 // Strip the backslash prefix from a non-hex escape sequence 9931 nonHex : 9932 9933 // Replace a hexadecimal escape sequence with the encoded Unicode code point 9934 // Support: IE <=11+ 9935 // For values outside the Basic Multilingual Plane (BMP), manually construct a 9936 // surrogate pair 9937 high < 0 ? 9938 String.fromCharCode( high + 0x10000 ) : 9939 String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); 9940 }, 9941 9942 // CSS string/identifier serialization 9943 // https://drafts.csswg.org/cssom/#common-serializing-idioms 9944 rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g, 9945 fcssescape = function( ch, asCodePoint ) { 9946 if ( asCodePoint ) { 9947 9948 // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER 9949 if ( ch === "\0" ) { 9950 return "\uFFFD"; 9951 } 9952 9953 // Control characters and (dependent upon position) numbers get escaped as code points 9954 return ch.slice( 0, -1 ) + "\\" + 9955 ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; 9956 } 9957 9958 // Other potentially-special ASCII characters get backslash-escaped 9959 return "\\" + ch; 9960 }, 9961 9962 // Used for iframes 9963 // See setDocument() 9964 // Removing the function wrapper causes a "Permission Denied" 9965 // error in IE 9966 unloadHandler = function() { 9967 setDocument(); 9968 }, 9969 9970 inDisabledFieldset = addCombinator( 9971 function( elem ) { 9972 return elem.disabled === true && elem.nodeName.toLowerCase() === "fieldset"; 9973 }, 9974 { dir: "parentNode", next: "legend" } 9975 ); 9976 9977// Optimize for push.apply( _, NodeList ) 9978try { 9979 push.apply( 9980 ( arr = slice.call( preferredDoc.childNodes ) ), 9981 preferredDoc.childNodes 9982 ); 9983 9984 // Support: Android<4.0 9985 // Detect silently failing push.apply 9986 // eslint-disable-next-line no-unused-expressions 9987 arr[ preferredDoc.childNodes.length ].nodeType; 9988} catch ( e ) { 9989 push = { apply: arr.length ? 9990 9991 // Leverage slice if possible 9992 function( target, els ) { 9993 pushNative.apply( target, slice.call( els ) ); 9994 } : 9995 9996 // Support: IE<9 9997 // Otherwise append directly 9998 function( target, els ) { 9999 var j = target.length, 10000 i = 0; 10001 10002 // Can't trust NodeList.length 10003 while ( ( target[ j++ ] = els[ i++ ] ) ) {} 10004 target.length = j - 1; 10005 } 10006 }; 10007} 10008 10009function Sizzle( selector, context, results, seed ) { 10010 var m, i, elem, nid, match, groups, newSelector, 10011 newContext = context && context.ownerDocument, 10012 10013 // nodeType defaults to 9, since context defaults to document 10014 nodeType = context ? context.nodeType : 9; 10015 10016 results = results || []; 10017 10018 // Return early from calls with invalid selector or context 10019 if ( typeof selector !== "string" || !selector || 10020 nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { 10021 10022 return results; 10023 } 10024 10025 // Try to shortcut find operations (as opposed to filters) in HTML documents 10026 if ( !seed ) { 10027 setDocument( context ); 10028 context = context || document; 10029 10030 if ( documentIsHTML ) { 10031 10032 // If the selector is sufficiently simple, try using a "get*By*" DOM method 10033 // (excepting DocumentFragment context, where the methods don't exist) 10034 if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { 10035 10036 // ID selector 10037 if ( ( m = match[ 1 ] ) ) { 10038 10039 // Document context 10040 if ( nodeType === 9 ) { 10041 if ( ( elem = context.getElementById( m ) ) ) { 10042 10043 // Support: IE, Opera, Webkit 10044 // TODO: identify versions 10045 // getElementById can match elements by name instead of ID 10046 if ( elem.id === m ) { 10047 results.push( elem ); 10048 return results; 10049 } 10050 } else { 10051 return results; 10052 } 10053 10054 // Element context 10055 } else { 10056 10057 // Support: IE, Opera, Webkit 10058 // TODO: identify versions 10059 // getElementById can match elements by name instead of ID 10060 if ( newContext && ( elem = newContext.getElementById( m ) ) && 10061 contains( context, elem ) && 10062 elem.id === m ) { 10063 10064 results.push( elem ); 10065 return results; 10066 } 10067 } 10068 10069 // Type selector 10070 } else if ( match[ 2 ] ) { 10071 push.apply( results, context.getElementsByTagName( selector ) ); 10072 return results; 10073 10074 // Class selector 10075 } else if ( ( m = match[ 3 ] ) && support.getElementsByClassName && 10076 context.getElementsByClassName ) { 10077 10078 push.apply( results, context.getElementsByClassName( m ) ); 10079 return results; 10080 } 10081 } 10082 10083 // Take advantage of querySelectorAll 10084 if ( support.qsa && 10085 !nonnativeSelectorCache[ selector + " " ] && 10086 ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) && 10087 10088 // Support: IE 8 only 10089 // Exclude object elements 10090 ( nodeType !== 1 || context.nodeName.toLowerCase() !== "object" ) ) { 10091 10092 newSelector = selector; 10093 newContext = context; 10094 10095 // qSA considers elements outside a scoping root when evaluating child or 10096 // descendant combinators, which is not what we want. 10097 // In such cases, we work around the behavior by prefixing every selector in the 10098 // list with an ID selector referencing the scope context. 10099 // The technique has to be used as well when a leading combinator is used 10100 // as such selectors are not recognized by querySelectorAll. 10101 // Thanks to Andrew Dupont for this technique. 10102 if ( nodeType === 1 && 10103 ( rdescend.test( selector ) || rcombinators.test( selector ) ) ) { 10104 10105 // Expand context for sibling selectors 10106 newContext = rsibling.test( selector ) && testContext( context.parentNode ) || 10107 context; 10108 10109 // We can use :scope instead of the ID hack if the browser 10110 // supports it & if we're not changing the context. 10111 if ( newContext !== context || !support.scope ) { 10112 10113 // Capture the context ID, setting it first if necessary 10114 if ( ( nid = context.getAttribute( "id" ) ) ) { 10115 nid = nid.replace( rcssescape, fcssescape ); 10116 } else { 10117 context.setAttribute( "id", ( nid = expando ) ); 10118 } 10119 } 10120 10121 // Prefix every selector in the list 10122 groups = tokenize( selector ); 10123 i = groups.length; 10124 while ( i-- ) { 10125 groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + 10126 toSelector( groups[ i ] ); 10127 } 10128 newSelector = groups.join( "," ); 10129 } 10130 10131 try { 10132 push.apply( results, 10133 newContext.querySelectorAll( newSelector ) 10134 ); 10135 return results; 10136 } catch ( qsaError ) { 10137 nonnativeSelectorCache( selector, true ); 10138 } finally { 10139 if ( nid === expando ) { 10140 context.removeAttribute( "id" ); 10141 } 10142 } 10143 } 10144 } 10145 } 10146 10147 // All others 10148 return select( selector.replace( rtrim, "$1" ), context, results, seed ); 10149} 10150 10151/** 10152 * Create key-value caches of limited size 10153 * @returns {function(string, object)} Returns the Object data after storing it on itself with 10154 * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) 10155 * deleting the oldest entry 10156 */ 10157function createCache() { 10158 var keys = []; 10159 10160 function cache( key, value ) { 10161 10162 // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) 10163 if ( keys.push( key + " " ) > Expr.cacheLength ) { 10164 10165 // Only keep the most recent entries 10166 delete cache[ keys.shift() ]; 10167 } 10168 return ( cache[ key + " " ] = value ); 10169 } 10170 return cache; 10171} 10172 10173/** 10174 * Mark a function for special use by Sizzle 10175 * @param {Function} fn The function to mark 10176 */ 10177function markFunction( fn ) { 10178 fn[ expando ] = true; 10179 return fn; 10180} 10181 10182/** 10183 * Support testing using an element 10184 * @param {Function} fn Passed the created element and returns a boolean result 10185 */ 10186function assert( fn ) { 10187 var el = document.createElement( "fieldset" ); 10188 10189 try { 10190 return !!fn( el ); 10191 } catch ( e ) { 10192 return false; 10193 } finally { 10194 10195 // Remove from its parent by default 10196 if ( el.parentNode ) { 10197 el.parentNode.removeChild( el ); 10198 } 10199 10200 // release memory in IE 10201 el = null; 10202 } 10203} 10204 10205/** 10206 * Adds the same handler for all of the specified attrs 10207 * @param {String} attrs Pipe-separated list of attributes 10208 * @param {Function} handler The method that will be applied 10209 */ 10210function addHandle( attrs, handler ) { 10211 var arr = attrs.split( "|" ), 10212 i = arr.length; 10213 10214 while ( i-- ) { 10215 Expr.attrHandle[ arr[ i ] ] = handler; 10216 } 10217} 10218 10219/** 10220 * Checks document order of two siblings 10221 * @param {Element} a 10222 * @param {Element} b 10223 * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b 10224 */ 10225function siblingCheck( a, b ) { 10226 var cur = b && a, 10227 diff = cur && a.nodeType === 1 && b.nodeType === 1 && 10228 a.sourceIndex - b.sourceIndex; 10229 10230 // Use IE sourceIndex if available on both nodes 10231 if ( diff ) { 10232 return diff; 10233 } 10234 10235 // Check if b follows a 10236 if ( cur ) { 10237 while ( ( cur = cur.nextSibling ) ) { 10238 if ( cur === b ) { 10239 return -1; 10240 } 10241 } 10242 } 10243 10244 return a ? 1 : -1; 10245} 10246 10247/** 10248 * Returns a function to use in pseudos for input types 10249 * @param {String} type 10250 */ 10251function createInputPseudo( type ) { 10252 return function( elem ) { 10253 var name = elem.nodeName.toLowerCase(); 10254 return name === "input" && elem.type === type; 10255 }; 10256} 10257 10258/** 10259 * Returns a function to use in pseudos for buttons 10260 * @param {String} type 10261 */ 10262function createButtonPseudo( type ) { 10263 return function( elem ) { 10264 var name = elem.nodeName.toLowerCase(); 10265 return ( name === "input" || name === "button" ) && elem.type === type; 10266 }; 10267} 10268 10269/** 10270 * Returns a function to use in pseudos for :enabled/:disabled 10271 * @param {Boolean} disabled true for :disabled; false for :enabled 10272 */ 10273function createDisabledPseudo( disabled ) { 10274 10275 // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable 10276 return function( elem ) { 10277 10278 // Only certain elements can match :enabled or :disabled 10279 // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled 10280 // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled 10281 if ( "form" in elem ) { 10282 10283 // Check for inherited disabledness on relevant non-disabled elements: 10284 // * listed form-associated elements in a disabled fieldset 10285 // https://html.spec.whatwg.org/multipage/forms.html#category-listed 10286 // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled 10287 // * option elements in a disabled optgroup 10288 // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled 10289 // All such elements have a "form" property. 10290 if ( elem.parentNode && elem.disabled === false ) { 10291 10292 // Option elements defer to a parent optgroup if present 10293 if ( "label" in elem ) { 10294 if ( "label" in elem.parentNode ) { 10295 return elem.parentNode.disabled === disabled; 10296 } else { 10297 return elem.disabled === disabled; 10298 } 10299 } 10300 10301 // Support: IE 6 - 11 10302 // Use the isDisabled shortcut property to check for disabled fieldset ancestors 10303 return elem.isDisabled === disabled || 10304 10305 // Where there is no isDisabled, check manually 10306 /* jshint -W018 */ 10307 elem.isDisabled !== !disabled && 10308 inDisabledFieldset( elem ) === disabled; 10309 } 10310 10311 return elem.disabled === disabled; 10312 10313 // Try to winnow out elements that can't be disabled before trusting the disabled property. 10314 // Some victims get caught in our net (label, legend, menu, track), but it shouldn't 10315 // even exist on them, let alone have a boolean value. 10316 } else if ( "label" in elem ) { 10317 return elem.disabled === disabled; 10318 } 10319 10320 // Remaining elements are neither :enabled nor :disabled 10321 return false; 10322 }; 10323} 10324 10325/** 10326 * Returns a function to use in pseudos for positionals 10327 * @param {Function} fn 10328 */ 10329function createPositionalPseudo( fn ) { 10330 return markFunction( function( argument ) { 10331 argument = +argument; 10332 return markFunction( function( seed, matches ) { 10333 var j, 10334 matchIndexes = fn( [], seed.length, argument ), 10335 i = matchIndexes.length; 10336 10337 // Match elements found at the specified indexes 10338 while ( i-- ) { 10339 if ( seed[ ( j = matchIndexes[ i ] ) ] ) { 10340 seed[ j ] = !( matches[ j ] = seed[ j ] ); 10341 } 10342 } 10343 } ); 10344 } ); 10345} 10346 10347/** 10348 * Checks a node for validity as a Sizzle context 10349 * @param {Element|Object=} context 10350 * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value 10351 */ 10352function testContext( context ) { 10353 return context && typeof context.getElementsByTagName !== "undefined" && context; 10354} 10355 10356// Expose support vars for convenience 10357support = Sizzle.support = {}; 10358 10359/** 10360 * Detects XML nodes 10361 * @param {Element|Object} elem An element or a document 10362 * @returns {Boolean} True iff elem is a non-HTML XML node 10363 */ 10364isXML = Sizzle.isXML = function( elem ) { 10365 var namespace = elem && elem.namespaceURI, 10366 docElem = elem && ( elem.ownerDocument || elem ).documentElement; 10367 10368 // Support: IE <=8 10369 // Assume HTML when documentElement doesn't yet exist, such as inside loading iframes 10370 // https://bugs.jquery.com/ticket/4833 10371 return !rhtml.test( namespace || docElem && docElem.nodeName || "HTML" ); 10372}; 10373 10374/** 10375 * Sets document-related variables once based on the current document 10376 * @param {Element|Object} [doc] An element or document object to use to set the document 10377 * @returns {Object} Returns the current document 10378 */ 10379setDocument = Sizzle.setDocument = function( node ) { 10380 var hasCompare, subWindow, 10381 doc = node ? node.ownerDocument || node : preferredDoc; 10382 10383 // Return early if doc is invalid or already selected 10384 // Support: IE 11+, Edge 17 - 18+ 10385 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 10386 // two documents; shallow comparisons work. 10387 // eslint-disable-next-line eqeqeq 10388 if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { 10389 return document; 10390 } 10391 10392 // Update global variables 10393 document = doc; 10394 docElem = document.documentElement; 10395 documentIsHTML = !isXML( document ); 10396 10397 // Support: IE 9 - 11+, Edge 12 - 18+ 10398 // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936) 10399 // Support: IE 11+, Edge 17 - 18+ 10400 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 10401 // two documents; shallow comparisons work. 10402 // eslint-disable-next-line eqeqeq 10403 if ( preferredDoc != document && 10404 ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { 10405 10406 // Support: IE 11, Edge 10407 if ( subWindow.addEventListener ) { 10408 subWindow.addEventListener( "unload", unloadHandler, false ); 10409 10410 // Support: IE 9 - 10 only 10411 } else if ( subWindow.attachEvent ) { 10412 subWindow.attachEvent( "onunload", unloadHandler ); 10413 } 10414 } 10415 10416 // Support: IE 8 - 11+, Edge 12 - 18+, Chrome <=16 - 25 only, Firefox <=3.6 - 31 only, 10417 // Safari 4 - 5 only, Opera <=11.6 - 12.x only 10418 // IE/Edge & older browsers don't support the :scope pseudo-class. 10419 // Support: Safari 6.0 only 10420 // Safari 6.0 supports :scope but it's an alias of :root there. 10421 support.scope = assert( function( el ) { 10422 docElem.appendChild( el ).appendChild( document.createElement( "div" ) ); 10423 return typeof el.querySelectorAll !== "undefined" && 10424 !el.querySelectorAll( ":scope fieldset div" ).length; 10425 } ); 10426 10427 /* Attributes 10428 ---------------------------------------------------------------------- */ 10429 10430 // Support: IE<8 10431 // Verify that getAttribute really returns attributes and not properties 10432 // (excepting IE8 booleans) 10433 support.attributes = assert( function( el ) { 10434 el.className = "i"; 10435 return !el.getAttribute( "className" ); 10436 } ); 10437 10438 /* getElement(s)By* 10439 ---------------------------------------------------------------------- */ 10440 10441 // Check if getElementsByTagName("*") returns only elements 10442 support.getElementsByTagName = assert( function( el ) { 10443 el.appendChild( document.createComment( "" ) ); 10444 return !el.getElementsByTagName( "*" ).length; 10445 } ); 10446 10447 // Support: IE<9 10448 support.getElementsByClassName = rnative.test( document.getElementsByClassName ); 10449 10450 // Support: IE<10 10451 // Check if getElementById returns elements by name 10452 // The broken getElementById methods don't pick up programmatically-set names, 10453 // so use a roundabout getElementsByName test 10454 support.getById = assert( function( el ) { 10455 docElem.appendChild( el ).id = expando; 10456 return !document.getElementsByName || !document.getElementsByName( expando ).length; 10457 } ); 10458 10459 // ID filter and find 10460 if ( support.getById ) { 10461 Expr.filter[ "ID" ] = function( id ) { 10462 var attrId = id.replace( runescape, funescape ); 10463 return function( elem ) { 10464 return elem.getAttribute( "id" ) === attrId; 10465 }; 10466 }; 10467 Expr.find[ "ID" ] = function( id, context ) { 10468 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 10469 var elem = context.getElementById( id ); 10470 return elem ? [ elem ] : []; 10471 } 10472 }; 10473 } else { 10474 Expr.filter[ "ID" ] = function( id ) { 10475 var attrId = id.replace( runescape, funescape ); 10476 return function( elem ) { 10477 var node = typeof elem.getAttributeNode !== "undefined" && 10478 elem.getAttributeNode( "id" ); 10479 return node && node.value === attrId; 10480 }; 10481 }; 10482 10483 // Support: IE 6 - 7 only 10484 // getElementById is not reliable as a find shortcut 10485 Expr.find[ "ID" ] = function( id, context ) { 10486 if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { 10487 var node, i, elems, 10488 elem = context.getElementById( id ); 10489 10490 if ( elem ) { 10491 10492 // Verify the id attribute 10493 node = elem.getAttributeNode( "id" ); 10494 if ( node && node.value === id ) { 10495 return [ elem ]; 10496 } 10497 10498 // Fall back on getElementsByName 10499 elems = context.getElementsByName( id ); 10500 i = 0; 10501 while ( ( elem = elems[ i++ ] ) ) { 10502 node = elem.getAttributeNode( "id" ); 10503 if ( node && node.value === id ) { 10504 return [ elem ]; 10505 } 10506 } 10507 } 10508 10509 return []; 10510 } 10511 }; 10512 } 10513 10514 // Tag 10515 Expr.find[ "TAG" ] = support.getElementsByTagName ? 10516 function( tag, context ) { 10517 if ( typeof context.getElementsByTagName !== "undefined" ) { 10518 return context.getElementsByTagName( tag ); 10519 10520 // DocumentFragment nodes don't have gEBTN 10521 } else if ( support.qsa ) { 10522 return context.querySelectorAll( tag ); 10523 } 10524 } : 10525 10526 function( tag, context ) { 10527 var elem, 10528 tmp = [], 10529 i = 0, 10530 10531 // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too 10532 results = context.getElementsByTagName( tag ); 10533 10534 // Filter out possible comments 10535 if ( tag === "*" ) { 10536 while ( ( elem = results[ i++ ] ) ) { 10537 if ( elem.nodeType === 1 ) { 10538 tmp.push( elem ); 10539 } 10540 } 10541 10542 return tmp; 10543 } 10544 return results; 10545 }; 10546 10547 // Class 10548 Expr.find[ "CLASS" ] = support.getElementsByClassName && function( className, context ) { 10549 if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { 10550 return context.getElementsByClassName( className ); 10551 } 10552 }; 10553 10554 /* QSA/matchesSelector 10555 ---------------------------------------------------------------------- */ 10556 10557 // QSA and matchesSelector support 10558 10559 // matchesSelector(:active) reports false when true (IE9/Opera 11.5) 10560 rbuggyMatches = []; 10561 10562 // qSa(:focus) reports false when true (Chrome 21) 10563 // We allow this because of a bug in IE8/9 that throws an error 10564 // whenever `document.activeElement` is accessed on an iframe 10565 // So, we allow :focus to pass through QSA all the time to avoid the IE error 10566 // See https://bugs.jquery.com/ticket/13378 10567 rbuggyQSA = []; 10568 10569 if ( ( support.qsa = rnative.test( document.querySelectorAll ) ) ) { 10570 10571 // Build QSA regex 10572 // Regex strategy adopted from Diego Perini 10573 assert( function( el ) { 10574 10575 var input; 10576 10577 // Select is set to empty string on purpose 10578 // This is to test IE's treatment of not explicitly 10579 // setting a boolean content attribute, 10580 // since its presence should be enough 10581 // https://bugs.jquery.com/ticket/12359 10582 docElem.appendChild( el ).innerHTML = "<a id='" + expando + "'></a>" + 10583 "<select id='" + expando + "-\r\\' msallowcapture=''>" + 10584 "<option selected=''></option></select>"; 10585 10586 // Support: IE8, Opera 11-12.16 10587 // Nothing should be selected when empty strings follow ^= or $= or *= 10588 // The test attribute must be unknown in Opera but "safe" for WinRT 10589 // https://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section 10590 if ( el.querySelectorAll( "[msallowcapture^='']" ).length ) { 10591 rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); 10592 } 10593 10594 // Support: IE8 10595 // Boolean attributes and "value" are not treated correctly 10596 if ( !el.querySelectorAll( "[selected]" ).length ) { 10597 rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); 10598 } 10599 10600 // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+ 10601 if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { 10602 rbuggyQSA.push( "~=" ); 10603 } 10604 10605 // Support: IE 11+, Edge 15 - 18+ 10606 // IE 11/Edge don't find elements on a `[name='']` query in some cases. 10607 // Adding a temporary attribute to the document before the selection works 10608 // around the issue. 10609 // Interestingly, IE 10 & older don't seem to have the issue. 10610 input = document.createElement( "input" ); 10611 input.setAttribute( "name", "" ); 10612 el.appendChild( input ); 10613 if ( !el.querySelectorAll( "[name='']" ).length ) { 10614 rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + 10615 whitespace + "*(?:''|\"\")" ); 10616 } 10617 10618 // Webkit/Opera - :checked should return selected option elements 10619 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 10620 // IE8 throws error here and will not see later tests 10621 if ( !el.querySelectorAll( ":checked" ).length ) { 10622 rbuggyQSA.push( ":checked" ); 10623 } 10624 10625 // Support: Safari 8+, iOS 8+ 10626 // https://bugs.webkit.org/show_bug.cgi?id=136851 10627 // In-page `selector#id sibling-combinator selector` fails 10628 if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { 10629 rbuggyQSA.push( ".#.+[+~]" ); 10630 } 10631 10632 // Support: Firefox <=3.6 - 5 only 10633 // Old Firefox doesn't throw on a badly-escaped identifier. 10634 el.querySelectorAll( "\\\f" ); 10635 rbuggyQSA.push( "[\\r\\n\\f]" ); 10636 } ); 10637 10638 assert( function( el ) { 10639 el.innerHTML = "<a href='' disabled='disabled'></a>" + 10640 "<select disabled='disabled'><option/></select>"; 10641 10642 // Support: Windows 8 Native Apps 10643 // The type and name attributes are restricted during .innerHTML assignment 10644 var input = document.createElement( "input" ); 10645 input.setAttribute( "type", "hidden" ); 10646 el.appendChild( input ).setAttribute( "name", "D" ); 10647 10648 // Support: IE8 10649 // Enforce case-sensitivity of name attribute 10650 if ( el.querySelectorAll( "[name=d]" ).length ) { 10651 rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); 10652 } 10653 10654 // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) 10655 // IE8 throws error here and will not see later tests 10656 if ( el.querySelectorAll( ":enabled" ).length !== 2 ) { 10657 rbuggyQSA.push( ":enabled", ":disabled" ); 10658 } 10659 10660 // Support: IE9-11+ 10661 // IE's :disabled selector does not pick up the children of disabled fieldsets 10662 docElem.appendChild( el ).disabled = true; 10663 if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { 10664 rbuggyQSA.push( ":enabled", ":disabled" ); 10665 } 10666 10667 // Support: Opera 10 - 11 only 10668 // Opera 10-11 does not throw on post-comma invalid pseudos 10669 el.querySelectorAll( "*,:x" ); 10670 rbuggyQSA.push( ",.*:" ); 10671 } ); 10672 } 10673 10674 if ( ( support.matchesSelector = rnative.test( ( matches = docElem.matches || 10675 docElem.webkitMatchesSelector || 10676 docElem.mozMatchesSelector || 10677 docElem.oMatchesSelector || 10678 docElem.msMatchesSelector ) ) ) ) { 10679 10680 assert( function( el ) { 10681 10682 // Check to see if it's possible to do matchesSelector 10683 // on a disconnected node (IE 9) 10684 support.disconnectedMatch = matches.call( el, "*" ); 10685 10686 // This should fail with an exception 10687 // Gecko does not error, returns false instead 10688 matches.call( el, "[s!='']:x" ); 10689 rbuggyMatches.push( "!=", pseudos ); 10690 } ); 10691 } 10692 10693 rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); 10694 rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join( "|" ) ); 10695 10696 /* Contains 10697 ---------------------------------------------------------------------- */ 10698 hasCompare = rnative.test( docElem.compareDocumentPosition ); 10699 10700 // Element contains another 10701 // Purposefully self-exclusive 10702 // As in, an element does not contain itself 10703 contains = hasCompare || rnative.test( docElem.contains ) ? 10704 function( a, b ) { 10705 var adown = a.nodeType === 9 ? a.documentElement : a, 10706 bup = b && b.parentNode; 10707 return a === bup || !!( bup && bup.nodeType === 1 && ( 10708 adown.contains ? 10709 adown.contains( bup ) : 10710 a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 10711 ) ); 10712 } : 10713 function( a, b ) { 10714 if ( b ) { 10715 while ( ( b = b.parentNode ) ) { 10716 if ( b === a ) { 10717 return true; 10718 } 10719 } 10720 } 10721 return false; 10722 }; 10723 10724 /* Sorting 10725 ---------------------------------------------------------------------- */ 10726 10727 // Document order sorting 10728 sortOrder = hasCompare ? 10729 function( a, b ) { 10730 10731 // Flag for duplicate removal 10732 if ( a === b ) { 10733 hasDuplicate = true; 10734 return 0; 10735 } 10736 10737 // Sort on method existence if only one input has compareDocumentPosition 10738 var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; 10739 if ( compare ) { 10740 return compare; 10741 } 10742 10743 // Calculate position if both inputs belong to the same document 10744 // Support: IE 11+, Edge 17 - 18+ 10745 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 10746 // two documents; shallow comparisons work. 10747 // eslint-disable-next-line eqeqeq 10748 compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? 10749 a.compareDocumentPosition( b ) : 10750 10751 // Otherwise we know they are disconnected 10752 1; 10753 10754 // Disconnected nodes 10755 if ( compare & 1 || 10756 ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { 10757 10758 // Choose the first element that is related to our preferred document 10759 // Support: IE 11+, Edge 17 - 18+ 10760 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 10761 // two documents; shallow comparisons work. 10762 // eslint-disable-next-line eqeqeq 10763 if ( a == document || a.ownerDocument == preferredDoc && 10764 contains( preferredDoc, a ) ) { 10765 return -1; 10766 } 10767 10768 // Support: IE 11+, Edge 17 - 18+ 10769 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 10770 // two documents; shallow comparisons work. 10771 // eslint-disable-next-line eqeqeq 10772 if ( b == document || b.ownerDocument == preferredDoc && 10773 contains( preferredDoc, b ) ) { 10774 return 1; 10775 } 10776 10777 // Maintain original order 10778 return sortInput ? 10779 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 10780 0; 10781 } 10782 10783 return compare & 4 ? -1 : 1; 10784 } : 10785 function( a, b ) { 10786 10787 // Exit early if the nodes are identical 10788 if ( a === b ) { 10789 hasDuplicate = true; 10790 return 0; 10791 } 10792 10793 var cur, 10794 i = 0, 10795 aup = a.parentNode, 10796 bup = b.parentNode, 10797 ap = [ a ], 10798 bp = [ b ]; 10799 10800 // Parentless nodes are either documents or disconnected 10801 if ( !aup || !bup ) { 10802 10803 // Support: IE 11+, Edge 17 - 18+ 10804 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 10805 // two documents; shallow comparisons work. 10806 /* eslint-disable eqeqeq */ 10807 return a == document ? -1 : 10808 b == document ? 1 : 10809 /* eslint-enable eqeqeq */ 10810 aup ? -1 : 10811 bup ? 1 : 10812 sortInput ? 10813 ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : 10814 0; 10815 10816 // If the nodes are siblings, we can do a quick check 10817 } else if ( aup === bup ) { 10818 return siblingCheck( a, b ); 10819 } 10820 10821 // Otherwise we need full lists of their ancestors for comparison 10822 cur = a; 10823 while ( ( cur = cur.parentNode ) ) { 10824 ap.unshift( cur ); 10825 } 10826 cur = b; 10827 while ( ( cur = cur.parentNode ) ) { 10828 bp.unshift( cur ); 10829 } 10830 10831 // Walk down the tree looking for a discrepancy 10832 while ( ap[ i ] === bp[ i ] ) { 10833 i++; 10834 } 10835 10836 return i ? 10837 10838 // Do a sibling check if the nodes have a common ancestor 10839 siblingCheck( ap[ i ], bp[ i ] ) : 10840 10841 // Otherwise nodes in our document sort first 10842 // Support: IE 11+, Edge 17 - 18+ 10843 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 10844 // two documents; shallow comparisons work. 10845 /* eslint-disable eqeqeq */ 10846 ap[ i ] == preferredDoc ? -1 : 10847 bp[ i ] == preferredDoc ? 1 : 10848 /* eslint-enable eqeqeq */ 10849 0; 10850 }; 10851 10852 return document; 10853}; 10854 10855Sizzle.matches = function( expr, elements ) { 10856 return Sizzle( expr, null, null, elements ); 10857}; 10858 10859Sizzle.matchesSelector = function( elem, expr ) { 10860 setDocument( elem ); 10861 10862 if ( support.matchesSelector && documentIsHTML && 10863 !nonnativeSelectorCache[ expr + " " ] && 10864 ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && 10865 ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { 10866 10867 try { 10868 var ret = matches.call( elem, expr ); 10869 10870 // IE 9's matchesSelector returns false on disconnected nodes 10871 if ( ret || support.disconnectedMatch || 10872 10873 // As well, disconnected nodes are said to be in a document 10874 // fragment in IE 9 10875 elem.document && elem.document.nodeType !== 11 ) { 10876 return ret; 10877 } 10878 } catch ( e ) { 10879 nonnativeSelectorCache( expr, true ); 10880 } 10881 } 10882 10883 return Sizzle( expr, document, null, [ elem ] ).length > 0; 10884}; 10885 10886Sizzle.contains = function( context, elem ) { 10887 10888 // Set document vars if needed 10889 // Support: IE 11+, Edge 17 - 18+ 10890 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 10891 // two documents; shallow comparisons work. 10892 // eslint-disable-next-line eqeqeq 10893 if ( ( context.ownerDocument || context ) != document ) { 10894 setDocument( context ); 10895 } 10896 return contains( context, elem ); 10897}; 10898 10899Sizzle.attr = function( elem, name ) { 10900 10901 // Set document vars if needed 10902 // Support: IE 11+, Edge 17 - 18+ 10903 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 10904 // two documents; shallow comparisons work. 10905 // eslint-disable-next-line eqeqeq 10906 if ( ( elem.ownerDocument || elem ) != document ) { 10907 setDocument( elem ); 10908 } 10909 10910 var fn = Expr.attrHandle[ name.toLowerCase() ], 10911 10912 // Don't get fooled by Object.prototype properties (jQuery #13807) 10913 val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? 10914 fn( elem, name, !documentIsHTML ) : 10915 undefined; 10916 10917 return val !== undefined ? 10918 val : 10919 support.attributes || !documentIsHTML ? 10920 elem.getAttribute( name ) : 10921 ( val = elem.getAttributeNode( name ) ) && val.specified ? 10922 val.value : 10923 null; 10924}; 10925 10926Sizzle.escape = function( sel ) { 10927 return ( sel + "" ).replace( rcssescape, fcssescape ); 10928}; 10929 10930Sizzle.error = function( msg ) { 10931 throw new Error( "Syntax error, unrecognized expression: " + msg ); 10932}; 10933 10934/** 10935 * Document sorting and removing duplicates 10936 * @param {ArrayLike} results 10937 */ 10938Sizzle.uniqueSort = function( results ) { 10939 var elem, 10940 duplicates = [], 10941 j = 0, 10942 i = 0; 10943 10944 // Unless we *know* we can detect duplicates, assume their presence 10945 hasDuplicate = !support.detectDuplicates; 10946 sortInput = !support.sortStable && results.slice( 0 ); 10947 results.sort( sortOrder ); 10948 10949 if ( hasDuplicate ) { 10950 while ( ( elem = results[ i++ ] ) ) { 10951 if ( elem === results[ i ] ) { 10952 j = duplicates.push( i ); 10953 } 10954 } 10955 while ( j-- ) { 10956 results.splice( duplicates[ j ], 1 ); 10957 } 10958 } 10959 10960 // Clear input after sorting to release objects 10961 // See https://github.com/jquery/sizzle/pull/225 10962 sortInput = null; 10963 10964 return results; 10965}; 10966 10967/** 10968 * Utility function for retrieving the text value of an array of DOM nodes 10969 * @param {Array|Element} elem 10970 */ 10971getText = Sizzle.getText = function( elem ) { 10972 var node, 10973 ret = "", 10974 i = 0, 10975 nodeType = elem.nodeType; 10976 10977 if ( !nodeType ) { 10978 10979 // If no nodeType, this is expected to be an array 10980 while ( ( node = elem[ i++ ] ) ) { 10981 10982 // Do not traverse comment nodes 10983 ret += getText( node ); 10984 } 10985 } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { 10986 10987 // Use textContent for elements 10988 // innerText usage removed for consistency of new lines (jQuery #11153) 10989 if ( typeof elem.textContent === "string" ) { 10990 return elem.textContent; 10991 } else { 10992 10993 // Traverse its children 10994 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 10995 ret += getText( elem ); 10996 } 10997 } 10998 } else if ( nodeType === 3 || nodeType === 4 ) { 10999 return elem.nodeValue; 11000 } 11001 11002 // Do not include comment or processing instruction nodes 11003 11004 return ret; 11005}; 11006 11007Expr = Sizzle.selectors = { 11008 11009 // Can be adjusted by the user 11010 cacheLength: 50, 11011 11012 createPseudo: markFunction, 11013 11014 match: matchExpr, 11015 11016 attrHandle: {}, 11017 11018 find: {}, 11019 11020 relative: { 11021 ">": { dir: "parentNode", first: true }, 11022 " ": { dir: "parentNode" }, 11023 "+": { dir: "previousSibling", first: true }, 11024 "~": { dir: "previousSibling" } 11025 }, 11026 11027 preFilter: { 11028 "ATTR": function( match ) { 11029 match[ 1 ] = match[ 1 ].replace( runescape, funescape ); 11030 11031 // Move the given value to match[3] whether quoted or unquoted 11032 match[ 3 ] = ( match[ 3 ] || match[ 4 ] || 11033 match[ 5 ] || "" ).replace( runescape, funescape ); 11034 11035 if ( match[ 2 ] === "~=" ) { 11036 match[ 3 ] = " " + match[ 3 ] + " "; 11037 } 11038 11039 return match.slice( 0, 4 ); 11040 }, 11041 11042 "CHILD": function( match ) { 11043 11044 /* matches from matchExpr["CHILD"] 11045 1 type (only|nth|...) 11046 2 what (child|of-type) 11047 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) 11048 4 xn-component of xn+y argument ([+-]?\d*n|) 11049 5 sign of xn-component 11050 6 x of xn-component 11051 7 sign of y-component 11052 8 y of y-component 11053 */ 11054 match[ 1 ] = match[ 1 ].toLowerCase(); 11055 11056 if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { 11057 11058 // nth-* requires argument 11059 if ( !match[ 3 ] ) { 11060 Sizzle.error( match[ 0 ] ); 11061 } 11062 11063 // numeric x and y parameters for Expr.filter.CHILD 11064 // remember that false/true cast respectively to 0/1 11065 match[ 4 ] = +( match[ 4 ] ? 11066 match[ 5 ] + ( match[ 6 ] || 1 ) : 11067 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) ); 11068 match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); 11069 11070 // other types prohibit arguments 11071 } else if ( match[ 3 ] ) { 11072 Sizzle.error( match[ 0 ] ); 11073 } 11074 11075 return match; 11076 }, 11077 11078 "PSEUDO": function( match ) { 11079 var excess, 11080 unquoted = !match[ 6 ] && match[ 2 ]; 11081 11082 if ( matchExpr[ "CHILD" ].test( match[ 0 ] ) ) { 11083 return null; 11084 } 11085 11086 // Accept quoted arguments as-is 11087 if ( match[ 3 ] ) { 11088 match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; 11089 11090 // Strip excess characters from unquoted arguments 11091 } else if ( unquoted && rpseudo.test( unquoted ) && 11092 11093 // Get excess from tokenize (recursively) 11094 ( excess = tokenize( unquoted, true ) ) && 11095 11096 // advance to the next closing parenthesis 11097 ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { 11098 11099 // excess is a negative index 11100 match[ 0 ] = match[ 0 ].slice( 0, excess ); 11101 match[ 2 ] = unquoted.slice( 0, excess ); 11102 } 11103 11104 // Return only captures needed by the pseudo filter method (type and argument) 11105 return match.slice( 0, 3 ); 11106 } 11107 }, 11108 11109 filter: { 11110 11111 "TAG": function( nodeNameSelector ) { 11112 var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); 11113 return nodeNameSelector === "*" ? 11114 function() { 11115 return true; 11116 } : 11117 function( elem ) { 11118 return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; 11119 }; 11120 }, 11121 11122 "CLASS": function( className ) { 11123 var pattern = classCache[ className + " " ]; 11124 11125 return pattern || 11126 ( pattern = new RegExp( "(^|" + whitespace + 11127 ")" + className + "(" + whitespace + "|$)" ) ) && classCache( 11128 className, function( elem ) { 11129 return pattern.test( 11130 typeof elem.className === "string" && elem.className || 11131 typeof elem.getAttribute !== "undefined" && 11132 elem.getAttribute( "class" ) || 11133 "" 11134 ); 11135 } ); 11136 }, 11137 11138 "ATTR": function( name, operator, check ) { 11139 return function( elem ) { 11140 var result = Sizzle.attr( elem, name ); 11141 11142 if ( result == null ) { 11143 return operator === "!="; 11144 } 11145 if ( !operator ) { 11146 return true; 11147 } 11148 11149 result += ""; 11150 11151 /* eslint-disable max-len */ 11152 11153 return operator === "=" ? result === check : 11154 operator === "!=" ? result !== check : 11155 operator === "^=" ? check && result.indexOf( check ) === 0 : 11156 operator === "*=" ? check && result.indexOf( check ) > -1 : 11157 operator === "$=" ? check && result.slice( -check.length ) === check : 11158 operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : 11159 operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : 11160 false; 11161 /* eslint-enable max-len */ 11162 11163 }; 11164 }, 11165 11166 "CHILD": function( type, what, _argument, first, last ) { 11167 var simple = type.slice( 0, 3 ) !== "nth", 11168 forward = type.slice( -4 ) !== "last", 11169 ofType = what === "of-type"; 11170 11171 return first === 1 && last === 0 ? 11172 11173 // Shortcut for :nth-*(n) 11174 function( elem ) { 11175 return !!elem.parentNode; 11176 } : 11177 11178 function( elem, _context, xml ) { 11179 var cache, uniqueCache, outerCache, node, nodeIndex, start, 11180 dir = simple !== forward ? "nextSibling" : "previousSibling", 11181 parent = elem.parentNode, 11182 name = ofType && elem.nodeName.toLowerCase(), 11183 useCache = !xml && !ofType, 11184 diff = false; 11185 11186 if ( parent ) { 11187 11188 // :(first|last|only)-(child|of-type) 11189 if ( simple ) { 11190 while ( dir ) { 11191 node = elem; 11192 while ( ( node = node[ dir ] ) ) { 11193 if ( ofType ? 11194 node.nodeName.toLowerCase() === name : 11195 node.nodeType === 1 ) { 11196 11197 return false; 11198 } 11199 } 11200 11201 // Reverse direction for :only-* (if we haven't yet done so) 11202 start = dir = type === "only" && !start && "nextSibling"; 11203 } 11204 return true; 11205 } 11206 11207 start = [ forward ? parent.firstChild : parent.lastChild ]; 11208 11209 // non-xml :nth-child(...) stores cache data on `parent` 11210 if ( forward && useCache ) { 11211 11212 // Seek `elem` from a previously-cached index 11213 11214 // ...in a gzip-friendly way 11215 node = parent; 11216 outerCache = node[ expando ] || ( node[ expando ] = {} ); 11217 11218 // Support: IE <9 only 11219 // Defend against cloned attroperties (jQuery gh-1709) 11220 uniqueCache = outerCache[ node.uniqueID ] || 11221 ( outerCache[ node.uniqueID ] = {} ); 11222 11223 cache = uniqueCache[ type ] || []; 11224 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 11225 diff = nodeIndex && cache[ 2 ]; 11226 node = nodeIndex && parent.childNodes[ nodeIndex ]; 11227 11228 while ( ( node = ++nodeIndex && node && node[ dir ] || 11229 11230 // Fallback to seeking `elem` from the start 11231 ( diff = nodeIndex = 0 ) || start.pop() ) ) { 11232 11233 // When found, cache indexes on `parent` and break 11234 if ( node.nodeType === 1 && ++diff && node === elem ) { 11235 uniqueCache[ type ] = [ dirruns, nodeIndex, diff ]; 11236 break; 11237 } 11238 } 11239 11240 } else { 11241 11242 // Use previously-cached element index if available 11243 if ( useCache ) { 11244 11245 // ...in a gzip-friendly way 11246 node = elem; 11247 outerCache = node[ expando ] || ( node[ expando ] = {} ); 11248 11249 // Support: IE <9 only 11250 // Defend against cloned attroperties (jQuery gh-1709) 11251 uniqueCache = outerCache[ node.uniqueID ] || 11252 ( outerCache[ node.uniqueID ] = {} ); 11253 11254 cache = uniqueCache[ type ] || []; 11255 nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; 11256 diff = nodeIndex; 11257 } 11258 11259 // xml :nth-child(...) 11260 // or :nth-last-child(...) or :nth(-last)?-of-type(...) 11261 if ( diff === false ) { 11262 11263 // Use the same loop as above to seek `elem` from the start 11264 while ( ( node = ++nodeIndex && node && node[ dir ] || 11265 ( diff = nodeIndex = 0 ) || start.pop() ) ) { 11266 11267 if ( ( ofType ? 11268 node.nodeName.toLowerCase() === name : 11269 node.nodeType === 1 ) && 11270 ++diff ) { 11271 11272 // Cache the index of each encountered element 11273 if ( useCache ) { 11274 outerCache = node[ expando ] || 11275 ( node[ expando ] = {} ); 11276 11277 // Support: IE <9 only 11278 // Defend against cloned attroperties (jQuery gh-1709) 11279 uniqueCache = outerCache[ node.uniqueID ] || 11280 ( outerCache[ node.uniqueID ] = {} ); 11281 11282 uniqueCache[ type ] = [ dirruns, diff ]; 11283 } 11284 11285 if ( node === elem ) { 11286 break; 11287 } 11288 } 11289 } 11290 } 11291 } 11292 11293 // Incorporate the offset, then check against cycle size 11294 diff -= last; 11295 return diff === first || ( diff % first === 0 && diff / first >= 0 ); 11296 } 11297 }; 11298 }, 11299 11300 "PSEUDO": function( pseudo, argument ) { 11301 11302 // pseudo-class names are case-insensitive 11303 // http://www.w3.org/TR/selectors/#pseudo-classes 11304 // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters 11305 // Remember that setFilters inherits from pseudos 11306 var args, 11307 fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || 11308 Sizzle.error( "unsupported pseudo: " + pseudo ); 11309 11310 // The user may use createPseudo to indicate that 11311 // arguments are needed to create the filter function 11312 // just as Sizzle does 11313 if ( fn[ expando ] ) { 11314 return fn( argument ); 11315 } 11316 11317 // But maintain support for old signatures 11318 if ( fn.length > 1 ) { 11319 args = [ pseudo, pseudo, "", argument ]; 11320 return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? 11321 markFunction( function( seed, matches ) { 11322 var idx, 11323 matched = fn( seed, argument ), 11324 i = matched.length; 11325 while ( i-- ) { 11326 idx = indexOf( seed, matched[ i ] ); 11327 seed[ idx ] = !( matches[ idx ] = matched[ i ] ); 11328 } 11329 } ) : 11330 function( elem ) { 11331 return fn( elem, 0, args ); 11332 }; 11333 } 11334 11335 return fn; 11336 } 11337 }, 11338 11339 pseudos: { 11340 11341 // Potentially complex pseudos 11342 "not": markFunction( function( selector ) { 11343 11344 // Trim the selector passed to compile 11345 // to avoid treating leading and trailing 11346 // spaces as combinators 11347 var input = [], 11348 results = [], 11349 matcher = compile( selector.replace( rtrim, "$1" ) ); 11350 11351 return matcher[ expando ] ? 11352 markFunction( function( seed, matches, _context, xml ) { 11353 var elem, 11354 unmatched = matcher( seed, null, xml, [] ), 11355 i = seed.length; 11356 11357 // Match elements unmatched by `matcher` 11358 while ( i-- ) { 11359 if ( ( elem = unmatched[ i ] ) ) { 11360 seed[ i ] = !( matches[ i ] = elem ); 11361 } 11362 } 11363 } ) : 11364 function( elem, _context, xml ) { 11365 input[ 0 ] = elem; 11366 matcher( input, null, xml, results ); 11367 11368 // Don't keep the element (issue #299) 11369 input[ 0 ] = null; 11370 return !results.pop(); 11371 }; 11372 } ), 11373 11374 "has": markFunction( function( selector ) { 11375 return function( elem ) { 11376 return Sizzle( selector, elem ).length > 0; 11377 }; 11378 } ), 11379 11380 "contains": markFunction( function( text ) { 11381 text = text.replace( runescape, funescape ); 11382 return function( elem ) { 11383 return ( elem.textContent || getText( elem ) ).indexOf( text ) > -1; 11384 }; 11385 } ), 11386 11387 // "Whether an element is represented by a :lang() selector 11388 // is based solely on the element's language value 11389 // being equal to the identifier C, 11390 // or beginning with the identifier C immediately followed by "-". 11391 // The matching of C against the element's language value is performed case-insensitively. 11392 // The identifier C does not have to be a valid language name." 11393 // http://www.w3.org/TR/selectors/#lang-pseudo 11394 "lang": markFunction( function( lang ) { 11395 11396 // lang value must be a valid identifier 11397 if ( !ridentifier.test( lang || "" ) ) { 11398 Sizzle.error( "unsupported lang: " + lang ); 11399 } 11400 lang = lang.replace( runescape, funescape ).toLowerCase(); 11401 return function( elem ) { 11402 var elemLang; 11403 do { 11404 if ( ( elemLang = documentIsHTML ? 11405 elem.lang : 11406 elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { 11407 11408 elemLang = elemLang.toLowerCase(); 11409 return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; 11410 } 11411 } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); 11412 return false; 11413 }; 11414 } ), 11415 11416 // Miscellaneous 11417 "target": function( elem ) { 11418 var hash = window.location && window.location.hash; 11419 return hash && hash.slice( 1 ) === elem.id; 11420 }, 11421 11422 "root": function( elem ) { 11423 return elem === docElem; 11424 }, 11425 11426 "focus": function( elem ) { 11427 return elem === document.activeElement && 11428 ( !document.hasFocus || document.hasFocus() ) && 11429 !!( elem.type || elem.href || ~elem.tabIndex ); 11430 }, 11431 11432 // Boolean properties 11433 "enabled": createDisabledPseudo( false ), 11434 "disabled": createDisabledPseudo( true ), 11435 11436 "checked": function( elem ) { 11437 11438 // In CSS3, :checked should return both checked and selected elements 11439 // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked 11440 var nodeName = elem.nodeName.toLowerCase(); 11441 return ( nodeName === "input" && !!elem.checked ) || 11442 ( nodeName === "option" && !!elem.selected ); 11443 }, 11444 11445 "selected": function( elem ) { 11446 11447 // Accessing this property makes selected-by-default 11448 // options in Safari work properly 11449 if ( elem.parentNode ) { 11450 // eslint-disable-next-line no-unused-expressions 11451 elem.parentNode.selectedIndex; 11452 } 11453 11454 return elem.selected === true; 11455 }, 11456 11457 // Contents 11458 "empty": function( elem ) { 11459 11460 // http://www.w3.org/TR/selectors/#empty-pseudo 11461 // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), 11462 // but not by others (comment: 8; processing instruction: 7; etc.) 11463 // nodeType < 6 works because attributes (2) do not appear as children 11464 for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { 11465 if ( elem.nodeType < 6 ) { 11466 return false; 11467 } 11468 } 11469 return true; 11470 }, 11471 11472 "parent": function( elem ) { 11473 return !Expr.pseudos[ "empty" ]( elem ); 11474 }, 11475 11476 // Element/input types 11477 "header": function( elem ) { 11478 return rheader.test( elem.nodeName ); 11479 }, 11480 11481 "input": function( elem ) { 11482 return rinputs.test( elem.nodeName ); 11483 }, 11484 11485 "button": function( elem ) { 11486 var name = elem.nodeName.toLowerCase(); 11487 return name === "input" && elem.type === "button" || name === "button"; 11488 }, 11489 11490 "text": function( elem ) { 11491 var attr; 11492 return elem.nodeName.toLowerCase() === "input" && 11493 elem.type === "text" && 11494 11495 // Support: IE<8 11496 // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" 11497 ( ( attr = elem.getAttribute( "type" ) ) == null || 11498 attr.toLowerCase() === "text" ); 11499 }, 11500 11501 // Position-in-collection 11502 "first": createPositionalPseudo( function() { 11503 return [ 0 ]; 11504 } ), 11505 11506 "last": createPositionalPseudo( function( _matchIndexes, length ) { 11507 return [ length - 1 ]; 11508 } ), 11509 11510 "eq": createPositionalPseudo( function( _matchIndexes, length, argument ) { 11511 return [ argument < 0 ? argument + length : argument ]; 11512 } ), 11513 11514 "even": createPositionalPseudo( function( matchIndexes, length ) { 11515 var i = 0; 11516 for ( ; i < length; i += 2 ) { 11517 matchIndexes.push( i ); 11518 } 11519 return matchIndexes; 11520 } ), 11521 11522 "odd": createPositionalPseudo( function( matchIndexes, length ) { 11523 var i = 1; 11524 for ( ; i < length; i += 2 ) { 11525 matchIndexes.push( i ); 11526 } 11527 return matchIndexes; 11528 } ), 11529 11530 "lt": createPositionalPseudo( function( matchIndexes, length, argument ) { 11531 var i = argument < 0 ? 11532 argument + length : 11533 argument > length ? 11534 length : 11535 argument; 11536 for ( ; --i >= 0; ) { 11537 matchIndexes.push( i ); 11538 } 11539 return matchIndexes; 11540 } ), 11541 11542 "gt": createPositionalPseudo( function( matchIndexes, length, argument ) { 11543 var i = argument < 0 ? argument + length : argument; 11544 for ( ; ++i < length; ) { 11545 matchIndexes.push( i ); 11546 } 11547 return matchIndexes; 11548 } ) 11549 } 11550}; 11551 11552Expr.pseudos[ "nth" ] = Expr.pseudos[ "eq" ]; 11553 11554// Add button/input type pseudos 11555for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { 11556 Expr.pseudos[ i ] = createInputPseudo( i ); 11557} 11558for ( i in { submit: true, reset: true } ) { 11559 Expr.pseudos[ i ] = createButtonPseudo( i ); 11560} 11561 11562// Easy API for creating new setFilters 11563function setFilters() {} 11564setFilters.prototype = Expr.filters = Expr.pseudos; 11565Expr.setFilters = new setFilters(); 11566 11567tokenize = Sizzle.tokenize = function( selector, parseOnly ) { 11568 var matched, match, tokens, type, 11569 soFar, groups, preFilters, 11570 cached = tokenCache[ selector + " " ]; 11571 11572 if ( cached ) { 11573 return parseOnly ? 0 : cached.slice( 0 ); 11574 } 11575 11576 soFar = selector; 11577 groups = []; 11578 preFilters = Expr.preFilter; 11579 11580 while ( soFar ) { 11581 11582 // Comma and first run 11583 if ( !matched || ( match = rcomma.exec( soFar ) ) ) { 11584 if ( match ) { 11585 11586 // Don't consume trailing commas as valid 11587 soFar = soFar.slice( match[ 0 ].length ) || soFar; 11588 } 11589 groups.push( ( tokens = [] ) ); 11590 } 11591 11592 matched = false; 11593 11594 // Combinators 11595 if ( ( match = rcombinators.exec( soFar ) ) ) { 11596 matched = match.shift(); 11597 tokens.push( { 11598 value: matched, 11599 11600 // Cast descendant combinators to space 11601 type: match[ 0 ].replace( rtrim, " " ) 11602 } ); 11603 soFar = soFar.slice( matched.length ); 11604 } 11605 11606 // Filters 11607 for ( type in Expr.filter ) { 11608 if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || 11609 ( match = preFilters[ type ]( match ) ) ) ) { 11610 matched = match.shift(); 11611 tokens.push( { 11612 value: matched, 11613 type: type, 11614 matches: match 11615 } ); 11616 soFar = soFar.slice( matched.length ); 11617 } 11618 } 11619 11620 if ( !matched ) { 11621 break; 11622 } 11623 } 11624 11625 // Return the length of the invalid excess 11626 // if we're just parsing 11627 // Otherwise, throw an error or return tokens 11628 return parseOnly ? 11629 soFar.length : 11630 soFar ? 11631 Sizzle.error( selector ) : 11632 11633 // Cache the tokens 11634 tokenCache( selector, groups ).slice( 0 ); 11635}; 11636 11637function toSelector( tokens ) { 11638 var i = 0, 11639 len = tokens.length, 11640 selector = ""; 11641 for ( ; i < len; i++ ) { 11642 selector += tokens[ i ].value; 11643 } 11644 return selector; 11645} 11646 11647function addCombinator( matcher, combinator, base ) { 11648 var dir = combinator.dir, 11649 skip = combinator.next, 11650 key = skip || dir, 11651 checkNonElements = base && key === "parentNode", 11652 doneName = done++; 11653 11654 return combinator.first ? 11655 11656 // Check against closest ancestor/preceding element 11657 function( elem, context, xml ) { 11658 while ( ( elem = elem[ dir ] ) ) { 11659 if ( elem.nodeType === 1 || checkNonElements ) { 11660 return matcher( elem, context, xml ); 11661 } 11662 } 11663 return false; 11664 } : 11665 11666 // Check against all ancestor/preceding elements 11667 function( elem, context, xml ) { 11668 var oldCache, uniqueCache, outerCache, 11669 newCache = [ dirruns, doneName ]; 11670 11671 // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching 11672 if ( xml ) { 11673 while ( ( elem = elem[ dir ] ) ) { 11674 if ( elem.nodeType === 1 || checkNonElements ) { 11675 if ( matcher( elem, context, xml ) ) { 11676 return true; 11677 } 11678 } 11679 } 11680 } else { 11681 while ( ( elem = elem[ dir ] ) ) { 11682 if ( elem.nodeType === 1 || checkNonElements ) { 11683 outerCache = elem[ expando ] || ( elem[ expando ] = {} ); 11684 11685 // Support: IE <9 only 11686 // Defend against cloned attroperties (jQuery gh-1709) 11687 uniqueCache = outerCache[ elem.uniqueID ] || 11688 ( outerCache[ elem.uniqueID ] = {} ); 11689 11690 if ( skip && skip === elem.nodeName.toLowerCase() ) { 11691 elem = elem[ dir ] || elem; 11692 } else if ( ( oldCache = uniqueCache[ key ] ) && 11693 oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { 11694 11695 // Assign to newCache so results back-propagate to previous elements 11696 return ( newCache[ 2 ] = oldCache[ 2 ] ); 11697 } else { 11698 11699 // Reuse newcache so results back-propagate to previous elements 11700 uniqueCache[ key ] = newCache; 11701 11702 // A match means we're done; a fail means we have to keep checking 11703 if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { 11704 return true; 11705 } 11706 } 11707 } 11708 } 11709 } 11710 return false; 11711 }; 11712} 11713 11714function elementMatcher( matchers ) { 11715 return matchers.length > 1 ? 11716 function( elem, context, xml ) { 11717 var i = matchers.length; 11718 while ( i-- ) { 11719 if ( !matchers[ i ]( elem, context, xml ) ) { 11720 return false; 11721 } 11722 } 11723 return true; 11724 } : 11725 matchers[ 0 ]; 11726} 11727 11728function multipleContexts( selector, contexts, results ) { 11729 var i = 0, 11730 len = contexts.length; 11731 for ( ; i < len; i++ ) { 11732 Sizzle( selector, contexts[ i ], results ); 11733 } 11734 return results; 11735} 11736 11737function condense( unmatched, map, filter, context, xml ) { 11738 var elem, 11739 newUnmatched = [], 11740 i = 0, 11741 len = unmatched.length, 11742 mapped = map != null; 11743 11744 for ( ; i < len; i++ ) { 11745 if ( ( elem = unmatched[ i ] ) ) { 11746 if ( !filter || filter( elem, context, xml ) ) { 11747 newUnmatched.push( elem ); 11748 if ( mapped ) { 11749 map.push( i ); 11750 } 11751 } 11752 } 11753 } 11754 11755 return newUnmatched; 11756} 11757 11758function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { 11759 if ( postFilter && !postFilter[ expando ] ) { 11760 postFilter = setMatcher( postFilter ); 11761 } 11762 if ( postFinder && !postFinder[ expando ] ) { 11763 postFinder = setMatcher( postFinder, postSelector ); 11764 } 11765 return markFunction( function( seed, results, context, xml ) { 11766 var temp, i, elem, 11767 preMap = [], 11768 postMap = [], 11769 preexisting = results.length, 11770 11771 // Get initial elements from seed or context 11772 elems = seed || multipleContexts( 11773 selector || "*", 11774 context.nodeType ? [ context ] : context, 11775 [] 11776 ), 11777 11778 // Prefilter to get matcher input, preserving a map for seed-results synchronization 11779 matcherIn = preFilter && ( seed || !selector ) ? 11780 condense( elems, preMap, preFilter, context, xml ) : 11781 elems, 11782 11783 matcherOut = matcher ? 11784 11785 // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, 11786 postFinder || ( seed ? preFilter : preexisting || postFilter ) ? 11787 11788 // ...intermediate processing is necessary 11789 [] : 11790 11791 // ...otherwise use results directly 11792 results : 11793 matcherIn; 11794 11795 // Find primary matches 11796 if ( matcher ) { 11797 matcher( matcherIn, matcherOut, context, xml ); 11798 } 11799 11800 // Apply postFilter 11801 if ( postFilter ) { 11802 temp = condense( matcherOut, postMap ); 11803 postFilter( temp, [], context, xml ); 11804 11805 // Un-match failing elements by moving them back to matcherIn 11806 i = temp.length; 11807 while ( i-- ) { 11808 if ( ( elem = temp[ i ] ) ) { 11809 matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); 11810 } 11811 } 11812 } 11813 11814 if ( seed ) { 11815 if ( postFinder || preFilter ) { 11816 if ( postFinder ) { 11817 11818 // Get the final matcherOut by condensing this intermediate into postFinder contexts 11819 temp = []; 11820 i = matcherOut.length; 11821 while ( i-- ) { 11822 if ( ( elem = matcherOut[ i ] ) ) { 11823 11824 // Restore matcherIn since elem is not yet a final match 11825 temp.push( ( matcherIn[ i ] = elem ) ); 11826 } 11827 } 11828 postFinder( null, ( matcherOut = [] ), temp, xml ); 11829 } 11830 11831 // Move matched elements from seed to results to keep them synchronized 11832 i = matcherOut.length; 11833 while ( i-- ) { 11834 if ( ( elem = matcherOut[ i ] ) && 11835 ( temp = postFinder ? indexOf( seed, elem ) : preMap[ i ] ) > -1 ) { 11836 11837 seed[ temp ] = !( results[ temp ] = elem ); 11838 } 11839 } 11840 } 11841 11842 // Add elements to results, through postFinder if defined 11843 } else { 11844 matcherOut = condense( 11845 matcherOut === results ? 11846 matcherOut.splice( preexisting, matcherOut.length ) : 11847 matcherOut 11848 ); 11849 if ( postFinder ) { 11850 postFinder( null, results, matcherOut, xml ); 11851 } else { 11852 push.apply( results, matcherOut ); 11853 } 11854 } 11855 } ); 11856} 11857 11858function matcherFromTokens( tokens ) { 11859 var checkContext, matcher, j, 11860 len = tokens.length, 11861 leadingRelative = Expr.relative[ tokens[ 0 ].type ], 11862 implicitRelative = leadingRelative || Expr.relative[ " " ], 11863 i = leadingRelative ? 1 : 0, 11864 11865 // The foundational matcher ensures that elements are reachable from top-level context(s) 11866 matchContext = addCombinator( function( elem ) { 11867 return elem === checkContext; 11868 }, implicitRelative, true ), 11869 matchAnyContext = addCombinator( function( elem ) { 11870 return indexOf( checkContext, elem ) > -1; 11871 }, implicitRelative, true ), 11872 matchers = [ function( elem, context, xml ) { 11873 var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( 11874 ( checkContext = context ).nodeType ? 11875 matchContext( elem, context, xml ) : 11876 matchAnyContext( elem, context, xml ) ); 11877 11878 // Avoid hanging onto element (issue #299) 11879 checkContext = null; 11880 return ret; 11881 } ]; 11882 11883 for ( ; i < len; i++ ) { 11884 if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { 11885 matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; 11886 } else { 11887 matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); 11888 11889 // Return special upon seeing a positional matcher 11890 if ( matcher[ expando ] ) { 11891 11892 // Find the next relative operator (if any) for proper handling 11893 j = ++i; 11894 for ( ; j < len; j++ ) { 11895 if ( Expr.relative[ tokens[ j ].type ] ) { 11896 break; 11897 } 11898 } 11899 return setMatcher( 11900 i > 1 && elementMatcher( matchers ), 11901 i > 1 && toSelector( 11902 11903 // If the preceding token was a descendant combinator, insert an implicit any-element `*` 11904 tokens 11905 .slice( 0, i - 1 ) 11906 .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) 11907 ).replace( rtrim, "$1" ), 11908 matcher, 11909 i < j && matcherFromTokens( tokens.slice( i, j ) ), 11910 j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), 11911 j < len && toSelector( tokens ) 11912 ); 11913 } 11914 matchers.push( matcher ); 11915 } 11916 } 11917 11918 return elementMatcher( matchers ); 11919} 11920 11921function matcherFromGroupMatchers( elementMatchers, setMatchers ) { 11922 var bySet = setMatchers.length > 0, 11923 byElement = elementMatchers.length > 0, 11924 superMatcher = function( seed, context, xml, results, outermost ) { 11925 var elem, j, matcher, 11926 matchedCount = 0, 11927 i = "0", 11928 unmatched = seed && [], 11929 setMatched = [], 11930 contextBackup = outermostContext, 11931 11932 // We must always have either seed elements or outermost context 11933 elems = seed || byElement && Expr.find[ "TAG" ]( "*", outermost ), 11934 11935 // Use integer dirruns iff this is the outermost matcher 11936 dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), 11937 len = elems.length; 11938 11939 if ( outermost ) { 11940 11941 // Support: IE 11+, Edge 17 - 18+ 11942 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 11943 // two documents; shallow comparisons work. 11944 // eslint-disable-next-line eqeqeq 11945 outermostContext = context == document || context || outermost; 11946 } 11947 11948 // Add elements passing elementMatchers directly to results 11949 // Support: IE<9, Safari 11950 // Tolerate NodeList properties (IE: "length"; Safari: <number>) matching elements by id 11951 for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { 11952 if ( byElement && elem ) { 11953 j = 0; 11954 11955 // Support: IE 11+, Edge 17 - 18+ 11956 // IE/Edge sometimes throw a "Permission denied" error when strict-comparing 11957 // two documents; shallow comparisons work. 11958 // eslint-disable-next-line eqeqeq 11959 if ( !context && elem.ownerDocument != document ) { 11960 setDocument( elem ); 11961 xml = !documentIsHTML; 11962 } 11963 while ( ( matcher = elementMatchers[ j++ ] ) ) { 11964 if ( matcher( elem, context || document, xml ) ) { 11965 results.push( elem ); 11966 break; 11967 } 11968 } 11969 if ( outermost ) { 11970 dirruns = dirrunsUnique; 11971 } 11972 } 11973 11974 // Track unmatched elements for set filters 11975 if ( bySet ) { 11976 11977 // They will have gone through all possible matchers 11978 if ( ( elem = !matcher && elem ) ) { 11979 matchedCount--; 11980 } 11981 11982 // Lengthen the array for every element, matched or not 11983 if ( seed ) { 11984 unmatched.push( elem ); 11985 } 11986 } 11987 } 11988 11989 // `i` is now the count of elements visited above, and adding it to `matchedCount` 11990 // makes the latter nonnegative. 11991 matchedCount += i; 11992 11993 // Apply set filters to unmatched elements 11994 // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` 11995 // equals `i`), unless we didn't visit _any_ elements in the above loop because we have 11996 // no element matchers and no seed. 11997 // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that 11998 // case, which will result in a "00" `matchedCount` that differs from `i` but is also 11999 // numerically zero. 12000 if ( bySet && i !== matchedCount ) { 12001 j = 0; 12002 while ( ( matcher = setMatchers[ j++ ] ) ) { 12003 matcher( unmatched, setMatched, context, xml ); 12004 } 12005 12006 if ( seed ) { 12007 12008 // Reintegrate element matches to eliminate the need for sorting 12009 if ( matchedCount > 0 ) { 12010 while ( i-- ) { 12011 if ( !( unmatched[ i ] || setMatched[ i ] ) ) { 12012 setMatched[ i ] = pop.call( results ); 12013 } 12014 } 12015 } 12016 12017 // Discard index placeholder values to get only actual matches 12018 setMatched = condense( setMatched ); 12019 } 12020 12021 // Add matches to results 12022 push.apply( results, setMatched ); 12023 12024 // Seedless set matches succeeding multiple successful matchers stipulate sorting 12025 if ( outermost && !seed && setMatched.length > 0 && 12026 ( matchedCount + setMatchers.length ) > 1 ) { 12027 12028 Sizzle.uniqueSort( results ); 12029 } 12030 } 12031 12032 // Override manipulation of globals by nested matchers 12033 if ( outermost ) { 12034 dirruns = dirrunsUnique; 12035 outermostContext = contextBackup; 12036 } 12037 12038 return unmatched; 12039 }; 12040 12041 return bySet ? 12042 markFunction( superMatcher ) : 12043 superMatcher; 12044} 12045 12046compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { 12047 var i, 12048 setMatchers = [], 12049 elementMatchers = [], 12050 cached = compilerCache[ selector + " " ]; 12051 12052 if ( !cached ) { 12053 12054 // Generate a function of recursive functions that can be used to check each element 12055 if ( !match ) { 12056 match = tokenize( selector ); 12057 } 12058 i = match.length; 12059 while ( i-- ) { 12060 cached = matcherFromTokens( match[ i ] ); 12061 if ( cached[ expando ] ) { 12062 setMatchers.push( cached ); 12063 } else { 12064 elementMatchers.push( cached ); 12065 } 12066 } 12067 12068 // Cache the compiled function 12069 cached = compilerCache( 12070 selector, 12071 matcherFromGroupMatchers( elementMatchers, setMatchers ) 12072 ); 12073 12074 // Save selector and tokenization 12075 cached.selector = selector; 12076 } 12077 return cached; 12078}; 12079 12080/** 12081 * A low-level selection function that works with Sizzle's compiled 12082 * selector functions 12083 * @param {String|Function} selector A selector or a pre-compiled 12084 * selector function built with Sizzle.compile 12085 * @param {Element} context 12086 * @param {Array} [results] 12087 * @param {Array} [seed] A set of elements to match against 12088 */ 12089select = Sizzle.select = function( selector, context, results, seed ) { 12090 var i, tokens, token, type, find, 12091 compiled = typeof selector === "function" && selector, 12092 match = !seed && tokenize( ( selector = compiled.selector || selector ) ); 12093 12094 results = results || []; 12095 12096 // Try to minimize operations if there is only one selector in the list and no seed 12097 // (the latter of which guarantees us context) 12098 if ( match.length === 1 ) { 12099 12100 // Reduce context if the leading compound selector is an ID 12101 tokens = match[ 0 ] = match[ 0 ].slice( 0 ); 12102 if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && 12103 context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { 12104 12105 context = ( Expr.find[ "ID" ]( token.matches[ 0 ] 12106 .replace( runescape, funescape ), context ) || [] )[ 0 ]; 12107 if ( !context ) { 12108 return results; 12109 12110 // Precompiled matchers will still verify ancestry, so step up a level 12111 } else if ( compiled ) { 12112 context = context.parentNode; 12113 } 12114 12115 selector = selector.slice( tokens.shift().value.length ); 12116 } 12117 12118 // Fetch a seed set for right-to-left matching 12119 i = matchExpr[ "needsContext" ].test( selector ) ? 0 : tokens.length; 12120 while ( i-- ) { 12121 token = tokens[ i ]; 12122 12123 // Abort if we hit a combinator 12124 if ( Expr.relative[ ( type = token.type ) ] ) { 12125 break; 12126 } 12127 if ( ( find = Expr.find[ type ] ) ) { 12128 12129 // Search, expanding context for leading sibling combinators 12130 if ( ( seed = find( 12131 token.matches[ 0 ].replace( runescape, funescape ), 12132 rsibling.test( tokens[ 0 ].type ) && testContext( context.parentNode ) || 12133 context 12134 ) ) ) { 12135 12136 // If seed is empty or no tokens remain, we can return early 12137 tokens.splice( i, 1 ); 12138 selector = seed.length && toSelector( tokens ); 12139 if ( !selector ) { 12140 push.apply( results, seed ); 12141 return results; 12142 } 12143 12144 break; 12145 } 12146 } 12147 } 12148 } 12149 12150 // Compile and execute a filtering function if one is not provided 12151 // Provide `match` to avoid retokenization if we modified the selector above 12152 ( compiled || compile( selector, match ) )( 12153 seed, 12154 context, 12155 !documentIsHTML, 12156 results, 12157 !context || rsibling.test( selector ) && testContext( context.parentNode ) || context 12158 ); 12159 return results; 12160}; 12161 12162// One-time assignments 12163 12164// Sort stability 12165support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; 12166 12167// Support: Chrome 14-35+ 12168// Always assume duplicates if they aren't passed to the comparison function 12169support.detectDuplicates = !!hasDuplicate; 12170 12171// Initialize against the default document 12172setDocument(); 12173 12174// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) 12175// Detached nodes confoundingly follow *each other* 12176support.sortDetached = assert( function( el ) { 12177 12178 // Should return 1, but returns 4 (following) 12179 return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; 12180} ); 12181 12182// Support: IE<8 12183// Prevent attribute/property "interpolation" 12184// https://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx 12185if ( !assert( function( el ) { 12186 el.innerHTML = "<a href='#'></a>"; 12187 return el.firstChild.getAttribute( "href" ) === "#"; 12188} ) ) { 12189 addHandle( "type|href|height|width", function( elem, name, isXML ) { 12190 if ( !isXML ) { 12191 return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); 12192 } 12193 } ); 12194} 12195 12196// Support: IE<9 12197// Use defaultValue in place of getAttribute("value") 12198if ( !support.attributes || !assert( function( el ) { 12199 el.innerHTML = "<input/>"; 12200 el.firstChild.setAttribute( "value", "" ); 12201 return el.firstChild.getAttribute( "value" ) === ""; 12202} ) ) { 12203 addHandle( "value", function( elem, _name, isXML ) { 12204 if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { 12205 return elem.defaultValue; 12206 } 12207 } ); 12208} 12209 12210// Support: IE<9 12211// Use getAttributeNode to fetch booleans when getAttribute lies 12212if ( !assert( function( el ) { 12213 return el.getAttribute( "disabled" ) == null; 12214} ) ) { 12215 addHandle( booleans, function( elem, name, isXML ) { 12216 var val; 12217 if ( !isXML ) { 12218 return elem[ name ] === true ? name.toLowerCase() : 12219 ( val = elem.getAttributeNode( name ) ) && val.specified ? 12220 val.value : 12221 null; 12222 } 12223 } ); 12224} 12225 12226return Sizzle; 12227 12228} )( window ); 12229 12230 12231 12232jQuery.find = Sizzle; 12233jQuery.expr = Sizzle.selectors; 12234 12235// Deprecated 12236jQuery.expr[ ":" ] = jQuery.expr.pseudos; 12237jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 12238jQuery.text = Sizzle.getText; 12239jQuery.isXMLDoc = Sizzle.isXML; 12240jQuery.contains = Sizzle.contains; 12241jQuery.escapeSelector = Sizzle.escape; 12242 12243 12244 12245 12246var dir = function( elem, dir, until ) { 12247 var matched = [], 12248 truncate = until !== undefined; 12249 12250 while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { 12251 if ( elem.nodeType === 1 ) { 12252 if ( truncate && jQuery( elem ).is( until ) ) { 12253 break; 12254 } 12255 matched.push( elem ); 12256 } 12257 } 12258 return matched; 12259}; 12260 12261 12262var siblings = function( n, elem ) { 12263 var matched = []; 12264 12265 for ( ; n; n = n.nextSibling ) { 12266 if ( n.nodeType === 1 && n !== elem ) { 12267 matched.push( n ); 12268 } 12269 } 12270 12271 return matched; 12272}; 12273 12274 12275var rneedsContext = jQuery.expr.match.needsContext; 12276 12277 12278 12279function nodeName( elem, name ) { 12280 12281 return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 12282 12283} 12284var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); 12285 12286 12287 12288// Implement the identical functionality for filter and not 12289function winnow( elements, qualifier, not ) { 12290 if ( isFunction( qualifier ) ) { 12291 return jQuery.grep( elements, function( elem, i ) { 12292 return !!qualifier.call( elem, i, elem ) !== not; 12293 } ); 12294 } 12295 12296 // Single element 12297 if ( qualifier.nodeType ) { 12298 return jQuery.grep( elements, function( elem ) { 12299 return ( elem === qualifier ) !== not; 12300 } ); 12301 } 12302 12303 // Arraylike of elements (jQuery, arguments, Array) 12304 if ( typeof qualifier !== "string" ) { 12305 return jQuery.grep( elements, function( elem ) { 12306 return ( indexOf.call( qualifier, elem ) > -1 ) !== not; 12307 } ); 12308 } 12309 12310 // Filtered directly for both simple and complex selectors 12311 return jQuery.filter( qualifier, elements, not ); 12312} 12313 12314jQuery.filter = function( expr, elems, not ) { 12315 var elem = elems[ 0 ]; 12316 12317 if ( not ) { 12318 expr = ":not(" + expr + ")"; 12319 } 12320 12321 if ( elems.length === 1 && elem.nodeType === 1 ) { 12322 return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; 12323 } 12324 12325 return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { 12326 return elem.nodeType === 1; 12327 } ) ); 12328}; 12329 12330jQuery.fn.extend( { 12331 find: function( selector ) { 12332 var i, ret, 12333 len = this.length, 12334 self = this; 12335 12336 if ( typeof selector !== "string" ) { 12337 return this.pushStack( jQuery( selector ).filter( function() { 12338 for ( i = 0; i < len; i++ ) { 12339 if ( jQuery.contains( self[ i ], this ) ) { 12340 return true; 12341 } 12342 } 12343 } ) ); 12344 } 12345 12346 ret = this.pushStack( [] ); 12347 12348 for ( i = 0; i < len; i++ ) { 12349 jQuery.find( selector, self[ i ], ret ); 12350 } 12351 12352 return len > 1 ? jQuery.uniqueSort( ret ) : ret; 12353 }, 12354 filter: function( selector ) { 12355 return this.pushStack( winnow( this, selector || [], false ) ); 12356 }, 12357 not: function( selector ) { 12358 return this.pushStack( winnow( this, selector || [], true ) ); 12359 }, 12360 is: function( selector ) { 12361 return !!winnow( 12362 this, 12363 12364 // If this is a positional/relative selector, check membership in the returned set 12365 // so $("p:first").is("p:last") won't return true for a doc with two "p". 12366 typeof selector === "string" && rneedsContext.test( selector ) ? 12367 jQuery( selector ) : 12368 selector || [], 12369 false 12370 ).length; 12371 } 12372} ); 12373 12374 12375// Initialize a jQuery object 12376 12377 12378// A central reference to the root jQuery(document) 12379var rootjQuery, 12380 12381 // A simple way to check for HTML strings 12382 // Prioritize #id over <tag> to avoid XSS via location.hash (#9521) 12383 // Strict HTML recognition (#11290: must start with <) 12384 // Shortcut simple #id case for speed 12385 rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, 12386 12387 init = jQuery.fn.init = function( selector, context, root ) { 12388 var match, elem; 12389 12390 // HANDLE: $(""), $(null), $(undefined), $(false) 12391 if ( !selector ) { 12392 return this; 12393 } 12394 12395 // Method init() accepts an alternate rootjQuery 12396 // so migrate can support jQuery.sub (gh-2101) 12397 root = root || rootjQuery; 12398 12399 // Handle HTML strings 12400 if ( typeof selector === "string" ) { 12401 if ( selector[ 0 ] === "<" && 12402 selector[ selector.length - 1 ] === ">" && 12403 selector.length >= 3 ) { 12404 12405 // Assume that strings that start and end with <> are HTML and skip the regex check 12406 match = [ null, selector, null ]; 12407 12408 } else { 12409 match = rquickExpr.exec( selector ); 12410 } 12411 12412 // Match html or make sure no context is specified for #id 12413 if ( match && ( match[ 1 ] || !context ) ) { 12414 12415 // HANDLE: $(html) -> $(array) 12416 if ( match[ 1 ] ) { 12417 context = context instanceof jQuery ? context[ 0 ] : context; 12418 12419 // Option to run scripts is true for back-compat 12420 // Intentionally let the error be thrown if parseHTML is not present 12421 jQuery.merge( this, jQuery.parseHTML( 12422 match[ 1 ], 12423 context && context.nodeType ? context.ownerDocument || context : document, 12424 true 12425 ) ); 12426 12427 // HANDLE: $(html, props) 12428 if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { 12429 for ( match in context ) { 12430 12431 // Properties of context are called as methods if possible 12432 if ( isFunction( this[ match ] ) ) { 12433 this[ match ]( context[ match ] ); 12434 12435 // ...and otherwise set as attributes 12436 } else { 12437 this.attr( match, context[ match ] ); 12438 } 12439 } 12440 } 12441 12442 return this; 12443 12444 // HANDLE: $(#id) 12445 } else { 12446 elem = document.getElementById( match[ 2 ] ); 12447 12448 if ( elem ) { 12449 12450 // Inject the element directly into the jQuery object 12451 this[ 0 ] = elem; 12452 this.length = 1; 12453 } 12454 return this; 12455 } 12456 12457 // HANDLE: $(expr, $(...)) 12458 } else if ( !context || context.jquery ) { 12459 return ( context || root ).find( selector ); 12460 12461 // HANDLE: $(expr, context) 12462 // (which is just equivalent to: $(context).find(expr) 12463 } else { 12464 return this.constructor( context ).find( selector ); 12465 } 12466 12467 // HANDLE: $(DOMElement) 12468 } else if ( selector.nodeType ) { 12469 this[ 0 ] = selector; 12470 this.length = 1; 12471 return this; 12472 12473 // HANDLE: $(function) 12474 // Shortcut for document ready 12475 } else if ( isFunction( selector ) ) { 12476 return root.ready !== undefined ? 12477 root.ready( selector ) : 12478 12479 // Execute immediately if ready is not present 12480 selector( jQuery ); 12481 } 12482 12483 return jQuery.makeArray( selector, this ); 12484 }; 12485 12486// Give the init function the jQuery prototype for later instantiation 12487init.prototype = jQuery.fn; 12488 12489// Initialize central reference 12490rootjQuery = jQuery( document ); 12491 12492 12493var rparentsprev = /^(?:parents|prev(?:Until|All))/, 12494 12495 // Methods guaranteed to produce a unique set when starting from a unique set 12496 guaranteedUnique = { 12497 children: true, 12498 contents: true, 12499 next: true, 12500 prev: true 12501 }; 12502 12503jQuery.fn.extend( { 12504 has: function( target ) { 12505 var targets = jQuery( target, this ), 12506 l = targets.length; 12507 12508 return this.filter( function() { 12509 var i = 0; 12510 for ( ; i < l; i++ ) { 12511 if ( jQuery.contains( this, targets[ i ] ) ) { 12512 return true; 12513 } 12514 } 12515 } ); 12516 }, 12517 12518 closest: function( selectors, context ) { 12519 var cur, 12520 i = 0, 12521 l = this.length, 12522 matched = [], 12523 targets = typeof selectors !== "string" && jQuery( selectors ); 12524 12525 // Positional selectors never match, since there's no _selection_ context 12526 if ( !rneedsContext.test( selectors ) ) { 12527 for ( ; i < l; i++ ) { 12528 for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { 12529 12530 // Always skip document fragments 12531 if ( cur.nodeType < 11 && ( targets ? 12532 targets.index( cur ) > -1 : 12533 12534 // Don't pass non-elements to Sizzle 12535 cur.nodeType === 1 && 12536 jQuery.find.matchesSelector( cur, selectors ) ) ) { 12537 12538 matched.push( cur ); 12539 break; 12540 } 12541 } 12542 } 12543 } 12544 12545 return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); 12546 }, 12547 12548 // Determine the position of an element within the set 12549 index: function( elem ) { 12550 12551 // No argument, return index in parent 12552 if ( !elem ) { 12553 return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; 12554 } 12555 12556 // Index in selector 12557 if ( typeof elem === "string" ) { 12558 return indexOf.call( jQuery( elem ), this[ 0 ] ); 12559 } 12560 12561 // Locate the position of the desired element 12562 return indexOf.call( this, 12563 12564 // If it receives a jQuery object, the first element is used 12565 elem.jquery ? elem[ 0 ] : elem 12566 ); 12567 }, 12568 12569 add: function( selector, context ) { 12570 return this.pushStack( 12571 jQuery.uniqueSort( 12572 jQuery.merge( this.get(), jQuery( selector, context ) ) 12573 ) 12574 ); 12575 }, 12576 12577 addBack: function( selector ) { 12578 return this.add( selector == null ? 12579 this.prevObject : this.prevObject.filter( selector ) 12580 ); 12581 } 12582} ); 12583 12584function sibling( cur, dir ) { 12585 while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} 12586 return cur; 12587} 12588 12589jQuery.each( { 12590 parent: function( elem ) { 12591 var parent = elem.parentNode; 12592 return parent && parent.nodeType !== 11 ? parent : null; 12593 }, 12594 parents: function( elem ) { 12595 return dir( elem, "parentNode" ); 12596 }, 12597 parentsUntil: function( elem, _i, until ) { 12598 return dir( elem, "parentNode", until ); 12599 }, 12600 next: function( elem ) { 12601 return sibling( elem, "nextSibling" ); 12602 }, 12603 prev: function( elem ) { 12604 return sibling( elem, "previousSibling" ); 12605 }, 12606 nextAll: function( elem ) { 12607 return dir( elem, "nextSibling" ); 12608 }, 12609 prevAll: function( elem ) { 12610 return dir( elem, "previousSibling" ); 12611 }, 12612 nextUntil: function( elem, _i, until ) { 12613 return dir( elem, "nextSibling", until ); 12614 }, 12615 prevUntil: function( elem, _i, until ) { 12616 return dir( elem, "previousSibling", until ); 12617 }, 12618 siblings: function( elem ) { 12619 return siblings( ( elem.parentNode || {} ).firstChild, elem ); 12620 }, 12621 children: function( elem ) { 12622 return siblings( elem.firstChild ); 12623 }, 12624 contents: function( elem ) { 12625 if ( elem.contentDocument != null && 12626 12627 // Support: IE 11+ 12628 // <object> elements with no `data` attribute has an object 12629 // `contentDocument` with a `null` prototype. 12630 getProto( elem.contentDocument ) ) { 12631 12632 return elem.contentDocument; 12633 } 12634 12635 // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only 12636 // Treat the template element as a regular one in browsers that 12637 // don't support it. 12638 if ( nodeName( elem, "template" ) ) { 12639 elem = elem.content || elem; 12640 } 12641 12642 return jQuery.merge( [], elem.childNodes ); 12643 } 12644}, function( name, fn ) { 12645 jQuery.fn[ name ] = function( until, selector ) { 12646 var matched = jQuery.map( this, fn, until ); 12647 12648 if ( name.slice( -5 ) !== "Until" ) { 12649 selector = until; 12650 } 12651 12652 if ( selector && typeof selector === "string" ) { 12653 matched = jQuery.filter( selector, matched ); 12654 } 12655 12656 if ( this.length > 1 ) { 12657 12658 // Remove duplicates 12659 if ( !guaranteedUnique[ name ] ) { 12660 jQuery.uniqueSort( matched ); 12661 } 12662 12663 // Reverse order for parents* and prev-derivatives 12664 if ( rparentsprev.test( name ) ) { 12665 matched.reverse(); 12666 } 12667 } 12668 12669 return this.pushStack( matched ); 12670 }; 12671} ); 12672var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); 12673 12674 12675 12676// Convert String-formatted options into Object-formatted ones 12677function createOptions( options ) { 12678 var object = {}; 12679 jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { 12680 object[ flag ] = true; 12681 } ); 12682 return object; 12683} 12684 12685/* 12686 * Create a callback list using the following parameters: 12687 * 12688 * options: an optional list of space-separated options that will change how 12689 * the callback list behaves or a more traditional option object 12690 * 12691 * By default a callback list will act like an event callback list and can be 12692 * "fired" multiple times. 12693 * 12694 * Possible options: 12695 * 12696 * once: will ensure the callback list can only be fired once (like a Deferred) 12697 * 12698 * memory: will keep track of previous values and will call any callback added 12699 * after the list has been fired right away with the latest "memorized" 12700 * values (like a Deferred) 12701 * 12702 * unique: will ensure a callback can only be added once (no duplicate in the list) 12703 * 12704 * stopOnFalse: interrupt callings when a callback returns false 12705 * 12706 */ 12707jQuery.Callbacks = function( options ) { 12708 12709 // Convert options from String-formatted to Object-formatted if needed 12710 // (we check in cache first) 12711 options = typeof options === "string" ? 12712 createOptions( options ) : 12713 jQuery.extend( {}, options ); 12714 12715 var // Flag to know if list is currently firing 12716 firing, 12717 12718 // Last fire value for non-forgettable lists 12719 memory, 12720 12721 // Flag to know if list was already fired 12722 fired, 12723 12724 // Flag to prevent firing 12725 locked, 12726 12727 // Actual callback list 12728 list = [], 12729 12730 // Queue of execution data for repeatable lists 12731 queue = [], 12732 12733 // Index of currently firing callback (modified by add/remove as needed) 12734 firingIndex = -1, 12735 12736 // Fire callbacks 12737 fire = function() { 12738 12739 // Enforce single-firing 12740 locked = locked || options.once; 12741 12742 // Execute callbacks for all pending executions, 12743 // respecting firingIndex overrides and runtime changes 12744 fired = firing = true; 12745 for ( ; queue.length; firingIndex = -1 ) { 12746 memory = queue.shift(); 12747 while ( ++firingIndex < list.length ) { 12748 12749 // Run callback and check for early termination 12750 if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && 12751 options.stopOnFalse ) { 12752 12753 // Jump to end and forget the data so .add doesn't re-fire 12754 firingIndex = list.length; 12755 memory = false; 12756 } 12757 } 12758 } 12759 12760 // Forget the data if we're done with it 12761 if ( !options.memory ) { 12762 memory = false; 12763 } 12764 12765 firing = false; 12766 12767 // Clean up if we're done firing for good 12768 if ( locked ) { 12769 12770 // Keep an empty list if we have data for future add calls 12771 if ( memory ) { 12772 list = []; 12773 12774 // Otherwise, this object is spent 12775 } else { 12776 list = ""; 12777 } 12778 } 12779 }, 12780 12781 // Actual Callbacks object 12782 self = { 12783 12784 // Add a callback or a collection of callbacks to the list 12785 add: function() { 12786 if ( list ) { 12787 12788 // If we have memory from a past run, we should fire after adding 12789 if ( memory && !firing ) { 12790 firingIndex = list.length - 1; 12791 queue.push( memory ); 12792 } 12793 12794 ( function add( args ) { 12795 jQuery.each( args, function( _, arg ) { 12796 if ( isFunction( arg ) ) { 12797 if ( !options.unique || !self.has( arg ) ) { 12798 list.push( arg ); 12799 } 12800 } else if ( arg && arg.length && toType( arg ) !== "string" ) { 12801 12802 // Inspect recursively 12803 add( arg ); 12804 } 12805 } ); 12806 } )( arguments ); 12807 12808 if ( memory && !firing ) { 12809 fire(); 12810 } 12811 } 12812 return this; 12813 }, 12814 12815 // Remove a callback from the list 12816 remove: function() { 12817 jQuery.each( arguments, function( _, arg ) { 12818 var index; 12819 while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { 12820 list.splice( index, 1 ); 12821 12822 // Handle firing indexes 12823 if ( index <= firingIndex ) { 12824 firingIndex--; 12825 } 12826 } 12827 } ); 12828 return this; 12829 }, 12830 12831 // Check if a given callback is in the list. 12832 // If no argument is given, return whether or not list has callbacks attached. 12833 has: function( fn ) { 12834 return fn ? 12835 jQuery.inArray( fn, list ) > -1 : 12836 list.length > 0; 12837 }, 12838 12839 // Remove all callbacks from the list 12840 empty: function() { 12841 if ( list ) { 12842 list = []; 12843 } 12844 return this; 12845 }, 12846 12847 // Disable .fire and .add 12848 // Abort any current/pending executions 12849 // Clear all callbacks and values 12850 disable: function() { 12851 locked = queue = []; 12852 list = memory = ""; 12853 return this; 12854 }, 12855 disabled: function() { 12856 return !list; 12857 }, 12858 12859 // Disable .fire 12860 // Also disable .add unless we have memory (since it would have no effect) 12861 // Abort any pending executions 12862 lock: function() { 12863 locked = queue = []; 12864 if ( !memory && !firing ) { 12865 list = memory = ""; 12866 } 12867 return this; 12868 }, 12869 locked: function() { 12870 return !!locked; 12871 }, 12872 12873 // Call all callbacks with the given context and arguments 12874 fireWith: function( context, args ) { 12875 if ( !locked ) { 12876 args = args || []; 12877 args = [ context, args.slice ? args.slice() : args ]; 12878 queue.push( args ); 12879 if ( !firing ) { 12880 fire(); 12881 } 12882 } 12883 return this; 12884 }, 12885 12886 // Call all the callbacks with the given arguments 12887 fire: function() { 12888 self.fireWith( this, arguments ); 12889 return this; 12890 }, 12891 12892 // To know if the callbacks have already been called at least once 12893 fired: function() { 12894 return !!fired; 12895 } 12896 }; 12897 12898 return self; 12899}; 12900 12901 12902function Identity( v ) { 12903 return v; 12904} 12905function Thrower( ex ) { 12906 throw ex; 12907} 12908 12909function adoptValue( value, resolve, reject, noValue ) { 12910 var method; 12911 12912 try { 12913 12914 // Check for promise aspect first to privilege synchronous behavior 12915 if ( value && isFunction( ( method = value.promise ) ) ) { 12916 method.call( value ).done( resolve ).fail( reject ); 12917 12918 // Other thenables 12919 } else if ( value && isFunction( ( method = value.then ) ) ) { 12920 method.call( value, resolve, reject ); 12921 12922 // Other non-thenables 12923 } else { 12924 12925 // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: 12926 // * false: [ value ].slice( 0 ) => resolve( value ) 12927 // * true: [ value ].slice( 1 ) => resolve() 12928 resolve.apply( undefined, [ value ].slice( noValue ) ); 12929 } 12930 12931 // For Promises/A+, convert exceptions into rejections 12932 // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in 12933 // Deferred#then to conditionally suppress rejection. 12934 } catch ( value ) { 12935 12936 // Support: Android 4.0 only 12937 // Strict mode functions invoked without .call/.apply get global-object context 12938 reject.apply( undefined, [ value ] ); 12939 } 12940} 12941 12942jQuery.extend( { 12943 12944 Deferred: function( func ) { 12945 var tuples = [ 12946 12947 // action, add listener, callbacks, 12948 // ... .then handlers, argument index, [final state] 12949 [ "notify", "progress", jQuery.Callbacks( "memory" ), 12950 jQuery.Callbacks( "memory" ), 2 ], 12951 [ "resolve", "done", jQuery.Callbacks( "once memory" ), 12952 jQuery.Callbacks( "once memory" ), 0, "resolved" ], 12953 [ "reject", "fail", jQuery.Callbacks( "once memory" ), 12954 jQuery.Callbacks( "once memory" ), 1, "rejected" ] 12955 ], 12956 state = "pending", 12957 promise = { 12958 state: function() { 12959 return state; 12960 }, 12961 always: function() { 12962 deferred.done( arguments ).fail( arguments ); 12963 return this; 12964 }, 12965 "catch": function( fn ) { 12966 return promise.then( null, fn ); 12967 }, 12968 12969 // Keep pipe for back-compat 12970 pipe: function( /* fnDone, fnFail, fnProgress */ ) { 12971 var fns = arguments; 12972 12973 return jQuery.Deferred( function( newDefer ) { 12974 jQuery.each( tuples, function( _i, tuple ) { 12975 12976 // Map tuples (progress, done, fail) to arguments (done, fail, progress) 12977 var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; 12978 12979 // deferred.progress(function() { bind to newDefer or newDefer.notify }) 12980 // deferred.done(function() { bind to newDefer or newDefer.resolve }) 12981 // deferred.fail(function() { bind to newDefer or newDefer.reject }) 12982 deferred[ tuple[ 1 ] ]( function() { 12983 var returned = fn && fn.apply( this, arguments ); 12984 if ( returned && isFunction( returned.promise ) ) { 12985 returned.promise() 12986 .progress( newDefer.notify ) 12987 .done( newDefer.resolve ) 12988 .fail( newDefer.reject ); 12989 } else { 12990 newDefer[ tuple[ 0 ] + "With" ]( 12991 this, 12992 fn ? [ returned ] : arguments 12993 ); 12994 } 12995 } ); 12996 } ); 12997 fns = null; 12998 } ).promise(); 12999 }, 13000 then: function( onFulfilled, onRejected, onProgress ) { 13001 var maxDepth = 0; 13002 function resolve( depth, deferred, handler, special ) { 13003 return function() { 13004 var that = this, 13005 args = arguments, 13006 mightThrow = function() { 13007 var returned, then; 13008 13009 // Support: Promises/A+ section 2.3.3.3.3 13010 // https://promisesaplus.com/#point-59 13011 // Ignore double-resolution attempts 13012 if ( depth < maxDepth ) { 13013 return; 13014 } 13015 13016 returned = handler.apply( that, args ); 13017 13018 // Support: Promises/A+ section 2.3.1 13019 // https://promisesaplus.com/#point-48 13020 if ( returned === deferred.promise() ) { 13021 throw new TypeError( "Thenable self-resolution" ); 13022 } 13023 13024 // Support: Promises/A+ sections 2.3.3.1, 3.5 13025 // https://promisesaplus.com/#point-54 13026 // https://promisesaplus.com/#point-75 13027 // Retrieve `then` only once 13028 then = returned && 13029 13030 // Support: Promises/A+ section 2.3.4 13031 // https://promisesaplus.com/#point-64 13032 // Only check objects and functions for thenability 13033 ( typeof returned === "object" || 13034 typeof returned === "function" ) && 13035 returned.then; 13036 13037 // Handle a returned thenable 13038 if ( isFunction( then ) ) { 13039 13040 // Special processors (notify) just wait for resolution 13041 if ( special ) { 13042 then.call( 13043 returned, 13044 resolve( maxDepth, deferred, Identity, special ), 13045 resolve( maxDepth, deferred, Thrower, special ) 13046 ); 13047 13048 // Normal processors (resolve) also hook into progress 13049 } else { 13050 13051 // ...and disregard older resolution values 13052 maxDepth++; 13053 13054 then.call( 13055 returned, 13056 resolve( maxDepth, deferred, Identity, special ), 13057 resolve( maxDepth, deferred, Thrower, special ), 13058 resolve( maxDepth, deferred, Identity, 13059 deferred.notifyWith ) 13060 ); 13061 } 13062 13063 // Handle all other returned values 13064 } else { 13065 13066 // Only substitute handlers pass on context 13067 // and multiple values (non-spec behavior) 13068 if ( handler !== Identity ) { 13069 that = undefined; 13070 args = [ returned ]; 13071 } 13072 13073 // Process the value(s) 13074 // Default process is resolve 13075 ( special || deferred.resolveWith )( that, args ); 13076 } 13077 }, 13078 13079 // Only normal processors (resolve) catch and reject exceptions 13080 process = special ? 13081 mightThrow : 13082 function() { 13083 try { 13084 mightThrow(); 13085 } catch ( e ) { 13086 13087 if ( jQuery.Deferred.exceptionHook ) { 13088 jQuery.Deferred.exceptionHook( e, 13089 process.stackTrace ); 13090 } 13091 13092 // Support: Promises/A+ section 2.3.3.3.4.1 13093 // https://promisesaplus.com/#point-61 13094 // Ignore post-resolution exceptions 13095 if ( depth + 1 >= maxDepth ) { 13096 13097 // Only substitute handlers pass on context 13098 // and multiple values (non-spec behavior) 13099 if ( handler !== Thrower ) { 13100 that = undefined; 13101 args = [ e ]; 13102 } 13103 13104 deferred.rejectWith( that, args ); 13105 } 13106 } 13107 }; 13108 13109 // Support: Promises/A+ section 2.3.3.3.1 13110 // https://promisesaplus.com/#point-57 13111 // Re-resolve promises immediately to dodge false rejection from 13112 // subsequent errors 13113 if ( depth ) { 13114 process(); 13115 } else { 13116 13117 // Call an optional hook to record the stack, in case of exception 13118 // since it's otherwise lost when execution goes async 13119 if ( jQuery.Deferred.getStackHook ) { 13120 process.stackTrace = jQuery.Deferred.getStackHook(); 13121 } 13122 window.setTimeout( process ); 13123 } 13124 }; 13125 } 13126 13127 return jQuery.Deferred( function( newDefer ) { 13128 13129 // progress_handlers.add( ... ) 13130 tuples[ 0 ][ 3 ].add( 13131 resolve( 13132 0, 13133 newDefer, 13134 isFunction( onProgress ) ? 13135 onProgress : 13136 Identity, 13137 newDefer.notifyWith 13138 ) 13139 ); 13140 13141 // fulfilled_handlers.add( ... ) 13142 tuples[ 1 ][ 3 ].add( 13143 resolve( 13144 0, 13145 newDefer, 13146 isFunction( onFulfilled ) ? 13147 onFulfilled : 13148 Identity 13149 ) 13150 ); 13151 13152 // rejected_handlers.add( ... ) 13153 tuples[ 2 ][ 3 ].add( 13154 resolve( 13155 0, 13156 newDefer, 13157 isFunction( onRejected ) ? 13158 onRejected : 13159 Thrower 13160 ) 13161 ); 13162 } ).promise(); 13163 }, 13164 13165 // Get a promise for this deferred 13166 // If obj is provided, the promise aspect is added to the object 13167 promise: function( obj ) { 13168 return obj != null ? jQuery.extend( obj, promise ) : promise; 13169 } 13170 }, 13171 deferred = {}; 13172 13173 // Add list-specific methods 13174 jQuery.each( tuples, function( i, tuple ) { 13175 var list = tuple[ 2 ], 13176 stateString = tuple[ 5 ]; 13177 13178 // promise.progress = list.add 13179 // promise.done = list.add 13180 // promise.fail = list.add 13181 promise[ tuple[ 1 ] ] = list.add; 13182 13183 // Handle state 13184 if ( stateString ) { 13185 list.add( 13186 function() { 13187 13188 // state = "resolved" (i.e., fulfilled) 13189 // state = "rejected" 13190 state = stateString; 13191 }, 13192 13193 // rejected_callbacks.disable 13194 // fulfilled_callbacks.disable 13195 tuples[ 3 - i ][ 2 ].disable, 13196 13197 // rejected_handlers.disable 13198 // fulfilled_handlers.disable 13199 tuples[ 3 - i ][ 3 ].disable, 13200 13201 // progress_callbacks.lock 13202 tuples[ 0 ][ 2 ].lock, 13203 13204 // progress_handlers.lock 13205 tuples[ 0 ][ 3 ].lock 13206 ); 13207 } 13208 13209 // progress_handlers.fire 13210 // fulfilled_handlers.fire 13211 // rejected_handlers.fire 13212 list.add( tuple[ 3 ].fire ); 13213 13214 // deferred.notify = function() { deferred.notifyWith(...) } 13215 // deferred.resolve = function() { deferred.resolveWith(...) } 13216 // deferred.reject = function() { deferred.rejectWith(...) } 13217 deferred[ tuple[ 0 ] ] = function() { 13218 deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); 13219 return this; 13220 }; 13221 13222 // deferred.notifyWith = list.fireWith 13223 // deferred.resolveWith = list.fireWith 13224 // deferred.rejectWith = list.fireWith 13225 deferred[ tuple[ 0 ] + "With" ] = list.fireWith; 13226 } ); 13227 13228 // Make the deferred a promise 13229 promise.promise( deferred ); 13230 13231 // Call given func if any 13232 if ( func ) { 13233 func.call( deferred, deferred ); 13234 } 13235 13236 // All done! 13237 return deferred; 13238 }, 13239 13240 // Deferred helper 13241 when: function( singleValue ) { 13242 var 13243 13244 // count of uncompleted subordinates 13245 remaining = arguments.length, 13246 13247 // count of unprocessed arguments 13248 i = remaining, 13249 13250 // subordinate fulfillment data 13251 resolveContexts = Array( i ), 13252 resolveValues = slice.call( arguments ), 13253 13254 // the primary Deferred 13255 primary = jQuery.Deferred(), 13256 13257 // subordinate callback factory 13258 updateFunc = function( i ) { 13259 return function( value ) { 13260 resolveContexts[ i ] = this; 13261 resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; 13262 if ( !( --remaining ) ) { 13263 primary.resolveWith( resolveContexts, resolveValues ); 13264 } 13265 }; 13266 }; 13267 13268 // Single- and empty arguments are adopted like Promise.resolve 13269 if ( remaining <= 1 ) { 13270 adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, 13271 !remaining ); 13272 13273 // Use .then() to unwrap secondary thenables (cf. gh-3000) 13274 if ( primary.state() === "pending" || 13275 isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { 13276 13277 return primary.then(); 13278 } 13279 } 13280 13281 // Multiple arguments are aggregated like Promise.all array elements 13282 while ( i-- ) { 13283 adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); 13284 } 13285 13286 return primary.promise(); 13287 } 13288} ); 13289 13290 13291// These usually indicate a programmer mistake during development, 13292// warn about them ASAP rather than swallowing them by default. 13293var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 13294 13295jQuery.Deferred.exceptionHook = function( error, stack ) { 13296 13297 // Support: IE 8 - 9 only 13298 // Console exists when dev tools are open, which can happen at any time 13299 if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { 13300 window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); 13301 } 13302}; 13303 13304 13305 13306 13307jQuery.readyException = function( error ) { 13308 window.setTimeout( function() { 13309 throw error; 13310 } ); 13311}; 13312 13313 13314 13315 13316// The deferred used on DOM ready 13317var readyList = jQuery.Deferred(); 13318 13319jQuery.fn.ready = function( fn ) { 13320 13321 readyList 13322 .then( fn ) 13323 13324 // Wrap jQuery.readyException in a function so that the lookup 13325 // happens at the time of error handling instead of callback 13326 // registration. 13327 .catch( function( error ) { 13328 jQuery.readyException( error ); 13329 } ); 13330 13331 return this; 13332}; 13333 13334jQuery.extend( { 13335 13336 // Is the DOM ready to be used? Set to true once it occurs. 13337 isReady: false, 13338 13339 // A counter to track how many items to wait for before 13340 // the ready event fires. See #6781 13341 readyWait: 1, 13342 13343 // Handle when the DOM is ready 13344 ready: function( wait ) { 13345 13346 // Abort if there are pending holds or we're already ready 13347 if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { 13348 return; 13349 } 13350 13351 // Remember that the DOM is ready 13352 jQuery.isReady = true; 13353 13354 // If a normal DOM Ready event fired, decrement, and wait if need be 13355 if ( wait !== true && --jQuery.readyWait > 0 ) { 13356 return; 13357 } 13358 13359 // If there are functions bound, to execute 13360 readyList.resolveWith( document, [ jQuery ] ); 13361 } 13362} ); 13363 13364jQuery.ready.then = readyList.then; 13365 13366// The ready event handler and self cleanup method 13367function completed() { 13368 document.removeEventListener( "DOMContentLoaded", completed ); 13369 window.removeEventListener( "load", completed ); 13370 jQuery.ready(); 13371} 13372 13373// Catch cases where $(document).ready() is called 13374// after the browser event has already occurred. 13375// Support: IE <=9 - 10 only 13376// Older IE sometimes signals "interactive" too soon 13377if ( document.readyState === "complete" || 13378 ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { 13379 13380 // Handle it asynchronously to allow scripts the opportunity to delay ready 13381 window.setTimeout( jQuery.ready ); 13382 13383} else { 13384 13385 // Use the handy event callback 13386 document.addEventListener( "DOMContentLoaded", completed ); 13387 13388 // A fallback to window.onload, that will always work 13389 window.addEventListener( "load", completed ); 13390} 13391 13392 13393 13394 13395// Multifunctional method to get and set values of a collection 13396// The value/s can optionally be executed if it's a function 13397var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { 13398 var i = 0, 13399 len = elems.length, 13400 bulk = key == null; 13401 13402 // Sets many values 13403 if ( toType( key ) === "object" ) { 13404 chainable = true; 13405 for ( i in key ) { 13406 access( elems, fn, i, key[ i ], true, emptyGet, raw ); 13407 } 13408 13409 // Sets one value 13410 } else if ( value !== undefined ) { 13411 chainable = true; 13412 13413 if ( !isFunction( value ) ) { 13414 raw = true; 13415 } 13416 13417 if ( bulk ) { 13418 13419 // Bulk operations run against the entire set 13420 if ( raw ) { 13421 fn.call( elems, value ); 13422 fn = null; 13423 13424 // ...except when executing function values 13425 } else { 13426 bulk = fn; 13427 fn = function( elem, _key, value ) { 13428 return bulk.call( jQuery( elem ), value ); 13429 }; 13430 } 13431 } 13432 13433 if ( fn ) { 13434 for ( ; i < len; i++ ) { 13435 fn( 13436 elems[ i ], key, raw ? 13437 value : 13438 value.call( elems[ i ], i, fn( elems[ i ], key ) ) 13439 ); 13440 } 13441 } 13442 } 13443 13444 if ( chainable ) { 13445 return elems; 13446 } 13447 13448 // Gets 13449 if ( bulk ) { 13450 return fn.call( elems ); 13451 } 13452 13453 return len ? fn( elems[ 0 ], key ) : emptyGet; 13454}; 13455 13456 13457// Matches dashed string for camelizing 13458var rmsPrefix = /^-ms-/, 13459 rdashAlpha = /-([a-z])/g; 13460 13461// Used by camelCase as callback to replace() 13462function fcamelCase( _all, letter ) { 13463 return letter.toUpperCase(); 13464} 13465 13466// Convert dashed to camelCase; used by the css and data modules 13467// Support: IE <=9 - 11, Edge 12 - 15 13468// Microsoft forgot to hump their vendor prefix (#9572) 13469function camelCase( string ) { 13470 return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); 13471} 13472var acceptData = function( owner ) { 13473 13474 // Accepts only: 13475 // - Node 13476 // - Node.ELEMENT_NODE 13477 // - Node.DOCUMENT_NODE 13478 // - Object 13479 // - Any 13480 return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 13481}; 13482 13483 13484 13485 13486function Data() { 13487 this.expando = jQuery.expando + Data.uid++; 13488} 13489 13490Data.uid = 1; 13491 13492Data.prototype = { 13493 13494 cache: function( owner ) { 13495 13496 // Check if the owner object already has a cache 13497 var value = owner[ this.expando ]; 13498 13499 // If not, create one 13500 if ( !value ) { 13501 value = {}; 13502 13503 // We can accept data for non-element nodes in modern browsers, 13504 // but we should not, see #8335. 13505 // Always return an empty object. 13506 if ( acceptData( owner ) ) { 13507 13508 // If it is a node unlikely to be stringify-ed or looped over 13509 // use plain assignment 13510 if ( owner.nodeType ) { 13511 owner[ this.expando ] = value; 13512 13513 // Otherwise secure it in a non-enumerable property 13514 // configurable must be true to allow the property to be 13515 // deleted when data is removed 13516 } else { 13517 Object.defineProperty( owner, this.expando, { 13518 value: value, 13519 configurable: true 13520 } ); 13521 } 13522 } 13523 } 13524 13525 return value; 13526 }, 13527 set: function( owner, data, value ) { 13528 var prop, 13529 cache = this.cache( owner ); 13530 13531 // Handle: [ owner, key, value ] args 13532 // Always use camelCase key (gh-2257) 13533 if ( typeof data === "string" ) { 13534 cache[ camelCase( data ) ] = value; 13535 13536 // Handle: [ owner, { properties } ] args 13537 } else { 13538 13539 // Copy the properties one-by-one to the cache object 13540 for ( prop in data ) { 13541 cache[ camelCase( prop ) ] = data[ prop ]; 13542 } 13543 } 13544 return cache; 13545 }, 13546 get: function( owner, key ) { 13547 return key === undefined ? 13548 this.cache( owner ) : 13549 13550 // Always use camelCase key (gh-2257) 13551 owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; 13552 }, 13553 access: function( owner, key, value ) { 13554 13555 // In cases where either: 13556 // 13557 // 1. No key was specified 13558 // 2. A string key was specified, but no value provided 13559 // 13560 // Take the "read" path and allow the get method to determine 13561 // which value to return, respectively either: 13562 // 13563 // 1. The entire cache object 13564 // 2. The data stored at the key 13565 // 13566 if ( key === undefined || 13567 ( ( key && typeof key === "string" ) && value === undefined ) ) { 13568 13569 return this.get( owner, key ); 13570 } 13571 13572 // When the key is not a string, or both a key and value 13573 // are specified, set or extend (existing objects) with either: 13574 // 13575 // 1. An object of properties 13576 // 2. A key and value 13577 // 13578 this.set( owner, key, value ); 13579 13580 // Since the "set" path can have two possible entry points 13581 // return the expected data based on which path was taken[*] 13582 return value !== undefined ? value : key; 13583 }, 13584 remove: function( owner, key ) { 13585 var i, 13586 cache = owner[ this.expando ]; 13587 13588 if ( cache === undefined ) { 13589 return; 13590 } 13591 13592 if ( key !== undefined ) { 13593 13594 // Support array or space separated string of keys 13595 if ( Array.isArray( key ) ) { 13596 13597 // If key is an array of keys... 13598 // We always set camelCase keys, so remove that. 13599 key = key.map( camelCase ); 13600 } else { 13601 key = camelCase( key ); 13602 13603 // If a key with the spaces exists, use it. 13604 // Otherwise, create an array by matching non-whitespace 13605 key = key in cache ? 13606 [ key ] : 13607 ( key.match( rnothtmlwhite ) || [] ); 13608 } 13609 13610 i = key.length; 13611 13612 while ( i-- ) { 13613 delete cache[ key[ i ] ]; 13614 } 13615 } 13616 13617 // Remove the expando if there's no more data 13618 if ( key === undefined || jQuery.isEmptyObject( cache ) ) { 13619 13620 // Support: Chrome <=35 - 45 13621 // Webkit & Blink performance suffers when deleting properties 13622 // from DOM nodes, so set to undefined instead 13623 // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) 13624 if ( owner.nodeType ) { 13625 owner[ this.expando ] = undefined; 13626 } else { 13627 delete owner[ this.expando ]; 13628 } 13629 } 13630 }, 13631 hasData: function( owner ) { 13632 var cache = owner[ this.expando ]; 13633 return cache !== undefined && !jQuery.isEmptyObject( cache ); 13634 } 13635}; 13636var dataPriv = new Data(); 13637 13638var dataUser = new Data(); 13639 13640 13641 13642// Implementation Summary 13643// 13644// 1. Enforce API surface and semantic compatibility with 1.9.x branch 13645// 2. Improve the module's maintainability by reducing the storage 13646// paths to a single mechanism. 13647// 3. Use the same single mechanism to support "private" and "user" data. 13648// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) 13649// 5. Avoid exposing implementation details on user objects (eg. expando properties) 13650// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 13651 13652var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, 13653 rmultiDash = /[A-Z]/g; 13654 13655function getData( data ) { 13656 if ( data === "true" ) { 13657 return true; 13658 } 13659 13660 if ( data === "false" ) { 13661 return false; 13662 } 13663 13664 if ( data === "null" ) { 13665 return null; 13666 } 13667 13668 // Only convert to a number if it doesn't change the string 13669 if ( data === +data + "" ) { 13670 return +data; 13671 } 13672 13673 if ( rbrace.test( data ) ) { 13674 return JSON.parse( data ); 13675 } 13676 13677 return data; 13678} 13679 13680function dataAttr( elem, key, data ) { 13681 var name; 13682 13683 // If nothing was found internally, try to fetch any 13684 // data from the HTML5 data-* attribute 13685 if ( data === undefined && elem.nodeType === 1 ) { 13686 name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); 13687 data = elem.getAttribute( name ); 13688 13689 if ( typeof data === "string" ) { 13690 try { 13691 data = getData( data ); 13692 } catch ( e ) {} 13693 13694 // Make sure we set the data so it isn't changed later 13695 dataUser.set( elem, key, data ); 13696 } else { 13697 data = undefined; 13698 } 13699 } 13700 return data; 13701} 13702 13703jQuery.extend( { 13704 hasData: function( elem ) { 13705 return dataUser.hasData( elem ) || dataPriv.hasData( elem ); 13706 }, 13707 13708 data: function( elem, name, data ) { 13709 return dataUser.access( elem, name, data ); 13710 }, 13711 13712 removeData: function( elem, name ) { 13713 dataUser.remove( elem, name ); 13714 }, 13715 13716 // TODO: Now that all calls to _data and _removeData have been replaced 13717 // with direct calls to dataPriv methods, these can be deprecated. 13718 _data: function( elem, name, data ) { 13719 return dataPriv.access( elem, name, data ); 13720 }, 13721 13722 _removeData: function( elem, name ) { 13723 dataPriv.remove( elem, name ); 13724 } 13725} ); 13726 13727jQuery.fn.extend( { 13728 data: function( key, value ) { 13729 var i, name, data, 13730 elem = this[ 0 ], 13731 attrs = elem && elem.attributes; 13732 13733 // Gets all values 13734 if ( key === undefined ) { 13735 if ( this.length ) { 13736 data = dataUser.get( elem ); 13737 13738 if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { 13739 i = attrs.length; 13740 while ( i-- ) { 13741 13742 // Support: IE 11 only 13743 // The attrs elements can be null (#14894) 13744 if ( attrs[ i ] ) { 13745 name = attrs[ i ].name; 13746 if ( name.indexOf( "data-" ) === 0 ) { 13747 name = camelCase( name.slice( 5 ) ); 13748 dataAttr( elem, name, data[ name ] ); 13749 } 13750 } 13751 } 13752 dataPriv.set( elem, "hasDataAttrs", true ); 13753 } 13754 } 13755 13756 return data; 13757 } 13758 13759 // Sets multiple values 13760 if ( typeof key === "object" ) { 13761 return this.each( function() { 13762 dataUser.set( this, key ); 13763 } ); 13764 } 13765 13766 return access( this, function( value ) { 13767 var data; 13768 13769 // The calling jQuery object (element matches) is not empty 13770 // (and therefore has an element appears at this[ 0 ]) and the 13771 // `value` parameter was not undefined. An empty jQuery object 13772 // will result in `undefined` for elem = this[ 0 ] which will 13773 // throw an exception if an attempt to read a data cache is made. 13774 if ( elem && value === undefined ) { 13775 13776 // Attempt to get data from the cache 13777 // The key will always be camelCased in Data 13778 data = dataUser.get( elem, key ); 13779 if ( data !== undefined ) { 13780 return data; 13781 } 13782 13783 // Attempt to "discover" the data in 13784 // HTML5 custom data-* attrs 13785 data = dataAttr( elem, key ); 13786 if ( data !== undefined ) { 13787 return data; 13788 } 13789 13790 // We tried really hard, but the data doesn't exist. 13791 return; 13792 } 13793 13794 // Set the data... 13795 this.each( function() { 13796 13797 // We always store the camelCased key 13798 dataUser.set( this, key, value ); 13799 } ); 13800 }, null, value, arguments.length > 1, null, true ); 13801 }, 13802 13803 removeData: function( key ) { 13804 return this.each( function() { 13805 dataUser.remove( this, key ); 13806 } ); 13807 } 13808} ); 13809 13810 13811jQuery.extend( { 13812 queue: function( elem, type, data ) { 13813 var queue; 13814 13815 if ( elem ) { 13816 type = ( type || "fx" ) + "queue"; 13817 queue = dataPriv.get( elem, type ); 13818 13819 // Speed up dequeue by getting out quickly if this is just a lookup 13820 if ( data ) { 13821 if ( !queue || Array.isArray( data ) ) { 13822 queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); 13823 } else { 13824 queue.push( data ); 13825 } 13826 } 13827 return queue || []; 13828 } 13829 }, 13830 13831 dequeue: function( elem, type ) { 13832 type = type || "fx"; 13833 13834 var queue = jQuery.queue( elem, type ), 13835 startLength = queue.length, 13836 fn = queue.shift(), 13837 hooks = jQuery._queueHooks( elem, type ), 13838 next = function() { 13839 jQuery.dequeue( elem, type ); 13840 }; 13841 13842 // If the fx queue is dequeued, always remove the progress sentinel 13843 if ( fn === "inprogress" ) { 13844 fn = queue.shift(); 13845 startLength--; 13846 } 13847 13848 if ( fn ) { 13849 13850 // Add a progress sentinel to prevent the fx queue from being 13851 // automatically dequeued 13852 if ( type === "fx" ) { 13853 queue.unshift( "inprogress" ); 13854 } 13855 13856 // Clear up the last queue stop function 13857 delete hooks.stop; 13858 fn.call( elem, next, hooks ); 13859 } 13860 13861 if ( !startLength && hooks ) { 13862 hooks.empty.fire(); 13863 } 13864 }, 13865 13866 // Not public - generate a queueHooks object, or return the current one 13867 _queueHooks: function( elem, type ) { 13868 var key = type + "queueHooks"; 13869 return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { 13870 empty: jQuery.Callbacks( "once memory" ).add( function() { 13871 dataPriv.remove( elem, [ type + "queue", key ] ); 13872 } ) 13873 } ); 13874 } 13875} ); 13876 13877jQuery.fn.extend( { 13878 queue: function( type, data ) { 13879 var setter = 2; 13880 13881 if ( typeof type !== "string" ) { 13882 data = type; 13883 type = "fx"; 13884 setter--; 13885 } 13886 13887 if ( arguments.length < setter ) { 13888 return jQuery.queue( this[ 0 ], type ); 13889 } 13890 13891 return data === undefined ? 13892 this : 13893 this.each( function() { 13894 var queue = jQuery.queue( this, type, data ); 13895 13896 // Ensure a hooks for this queue 13897 jQuery._queueHooks( this, type ); 13898 13899 if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { 13900 jQuery.dequeue( this, type ); 13901 } 13902 } ); 13903 }, 13904 dequeue: function( type ) { 13905 return this.each( function() { 13906 jQuery.dequeue( this, type ); 13907 } ); 13908 }, 13909 clearQueue: function( type ) { 13910 return this.queue( type || "fx", [] ); 13911 }, 13912 13913 // Get a promise resolved when queues of a certain type 13914 // are emptied (fx is the type by default) 13915 promise: function( type, obj ) { 13916 var tmp, 13917 count = 1, 13918 defer = jQuery.Deferred(), 13919 elements = this, 13920 i = this.length, 13921 resolve = function() { 13922 if ( !( --count ) ) { 13923 defer.resolveWith( elements, [ elements ] ); 13924 } 13925 }; 13926 13927 if ( typeof type !== "string" ) { 13928 obj = type; 13929 type = undefined; 13930 } 13931 type = type || "fx"; 13932 13933 while ( i-- ) { 13934 tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); 13935 if ( tmp && tmp.empty ) { 13936 count++; 13937 tmp.empty.add( resolve ); 13938 } 13939 } 13940 resolve(); 13941 return defer.promise( obj ); 13942 } 13943} ); 13944var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 13945 13946var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); 13947 13948 13949var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; 13950 13951var documentElement = document.documentElement; 13952 13953 13954 13955 var isAttached = function( elem ) { 13956 return jQuery.contains( elem.ownerDocument, elem ); 13957 }, 13958 composed = { composed: true }; 13959 13960 // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only 13961 // Check attachment across shadow DOM boundaries when possible (gh-3504) 13962 // Support: iOS 10.0-10.2 only 13963 // Early iOS 10 versions support `attachShadow` but not `getRootNode`, 13964 // leading to errors. We need to check for `getRootNode`. 13965 if ( documentElement.getRootNode ) { 13966 isAttached = function( elem ) { 13967 return jQuery.contains( elem.ownerDocument, elem ) || 13968 elem.getRootNode( composed ) === elem.ownerDocument; 13969 }; 13970 } 13971var isHiddenWithinTree = function( elem, el ) { 13972 13973 // isHiddenWithinTree might be called from jQuery#filter function; 13974 // in that case, element will be second argument 13975 elem = el || elem; 13976 13977 // Inline style trumps all 13978 return elem.style.display === "none" || 13979 elem.style.display === "" && 13980 13981 // Otherwise, check computed style 13982 // Support: Firefox <=43 - 45 13983 // Disconnected elements can have computed display: none, so first confirm that elem is 13984 // in the document. 13985 isAttached( elem ) && 13986 13987 jQuery.css( elem, "display" ) === "none"; 13988 }; 13989 13990 13991 13992function adjustCSS( elem, prop, valueParts, tween ) { 13993 var adjusted, scale, 13994 maxIterations = 20, 13995 currentValue = tween ? 13996 function() { 13997 return tween.cur(); 13998 } : 13999 function() { 14000 return jQuery.css( elem, prop, "" ); 14001 }, 14002 initial = currentValue(), 14003 unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), 14004 14005 // Starting value computation is required for potential unit mismatches 14006 initialInUnit = elem.nodeType && 14007 ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && 14008 rcssNum.exec( jQuery.css( elem, prop ) ); 14009 14010 if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { 14011 14012 // Support: Firefox <=54 14013 // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) 14014 initial = initial / 2; 14015 14016 // Trust units reported by jQuery.css 14017 unit = unit || initialInUnit[ 3 ]; 14018 14019 // Iteratively approximate from a nonzero starting point 14020 initialInUnit = +initial || 1; 14021 14022 while ( maxIterations-- ) { 14023 14024 // Evaluate and update our best guess (doubling guesses that zero out). 14025 // Finish if the scale equals or crosses 1 (making the old*new product non-positive). 14026 jQuery.style( elem, prop, initialInUnit + unit ); 14027 if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { 14028 maxIterations = 0; 14029 } 14030 initialInUnit = initialInUnit / scale; 14031 14032 } 14033 14034 initialInUnit = initialInUnit * 2; 14035 jQuery.style( elem, prop, initialInUnit + unit ); 14036 14037 // Make sure we update the tween properties later on 14038 valueParts = valueParts || []; 14039 } 14040 14041 if ( valueParts ) { 14042 initialInUnit = +initialInUnit || +initial || 0; 14043 14044 // Apply relative offset (+=/-=) if specified 14045 adjusted = valueParts[ 1 ] ? 14046 initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : 14047 +valueParts[ 2 ]; 14048 if ( tween ) { 14049 tween.unit = unit; 14050 tween.start = initialInUnit; 14051 tween.end = adjusted; 14052 } 14053 } 14054 return adjusted; 14055} 14056 14057 14058var defaultDisplayMap = {}; 14059 14060function getDefaultDisplay( elem ) { 14061 var temp, 14062 doc = elem.ownerDocument, 14063 nodeName = elem.nodeName, 14064 display = defaultDisplayMap[ nodeName ]; 14065 14066 if ( display ) { 14067 return display; 14068 } 14069 14070 temp = doc.body.appendChild( doc.createElement( nodeName ) ); 14071 display = jQuery.css( temp, "display" ); 14072 14073 temp.parentNode.removeChild( temp ); 14074 14075 if ( display === "none" ) { 14076 display = "block"; 14077 } 14078 defaultDisplayMap[ nodeName ] = display; 14079 14080 return display; 14081} 14082 14083function showHide( elements, show ) { 14084 var display, elem, 14085 values = [], 14086 index = 0, 14087 length = elements.length; 14088 14089 // Determine new display value for elements that need to change 14090 for ( ; index < length; index++ ) { 14091 elem = elements[ index ]; 14092 if ( !elem.style ) { 14093 continue; 14094 } 14095 14096 display = elem.style.display; 14097 if ( show ) { 14098 14099 // Since we force visibility upon cascade-hidden elements, an immediate (and slow) 14100 // check is required in this first loop unless we have a nonempty display value (either 14101 // inline or about-to-be-restored) 14102 if ( display === "none" ) { 14103 values[ index ] = dataPriv.get( elem, "display" ) || null; 14104 if ( !values[ index ] ) { 14105 elem.style.display = ""; 14106 } 14107 } 14108 if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { 14109 values[ index ] = getDefaultDisplay( elem ); 14110 } 14111 } else { 14112 if ( display !== "none" ) { 14113 values[ index ] = "none"; 14114 14115 // Remember what we're overwriting 14116 dataPriv.set( elem, "display", display ); 14117 } 14118 } 14119 } 14120 14121 // Set the display of the elements in a second loop to avoid constant reflow 14122 for ( index = 0; index < length; index++ ) { 14123 if ( values[ index ] != null ) { 14124 elements[ index ].style.display = values[ index ]; 14125 } 14126 } 14127 14128 return elements; 14129} 14130 14131jQuery.fn.extend( { 14132 show: function() { 14133 return showHide( this, true ); 14134 }, 14135 hide: function() { 14136 return showHide( this ); 14137 }, 14138 toggle: function( state ) { 14139 if ( typeof state === "boolean" ) { 14140 return state ? this.show() : this.hide(); 14141 } 14142 14143 return this.each( function() { 14144 if ( isHiddenWithinTree( this ) ) { 14145 jQuery( this ).show(); 14146 } else { 14147 jQuery( this ).hide(); 14148 } 14149 } ); 14150 } 14151} ); 14152var rcheckableType = ( /^(?:checkbox|radio)$/i ); 14153 14154var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); 14155 14156var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); 14157 14158 14159 14160( function() { 14161 var fragment = document.createDocumentFragment(), 14162 div = fragment.appendChild( document.createElement( "div" ) ), 14163 input = document.createElement( "input" ); 14164 14165 // Support: Android 4.0 - 4.3 only 14166 // Check state lost if the name is set (#11217) 14167 // Support: Windows Web Apps (WWA) 14168 // `name` and `type` must use .setAttribute for WWA (#14901) 14169 input.setAttribute( "type", "radio" ); 14170 input.setAttribute( "checked", "checked" ); 14171 input.setAttribute( "name", "t" ); 14172 14173 div.appendChild( input ); 14174 14175 // Support: Android <=4.1 only 14176 // Older WebKit doesn't clone checked state correctly in fragments 14177 support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 14178 14179 // Support: IE <=11 only 14180 // Make sure textarea (and checkbox) defaultValue is properly cloned 14181 div.innerHTML = "<textarea>x</textarea>"; 14182 support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 14183 14184 // Support: IE <=9 only 14185 // IE <=9 replaces <option> tags with their contents when inserted outside of 14186 // the select element. 14187 div.innerHTML = "<option></option>"; 14188 support.option = !!div.lastChild; 14189} )(); 14190 14191 14192// We have to close these tags to support XHTML (#13200) 14193var wrapMap = { 14194 14195 // XHTML parsers do not magically insert elements in the 14196 // same way that tag soup parsers do. So we cannot shorten 14197 // this by omitting <tbody> or other required elements. 14198 thead: [ 1, "<table>", "</table>" ], 14199 col: [ 2, "<table><colgroup>", "</colgroup></table>" ], 14200 tr: [ 2, "<table><tbody>", "</tbody></table>" ], 14201 td: [ 3, "<table><tbody><tr>", "</tr></tbody></table>" ], 14202 14203 _default: [ 0, "", "" ] 14204}; 14205 14206wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 14207wrapMap.th = wrapMap.td; 14208 14209// Support: IE <=9 only 14210if ( !support.option ) { 14211 wrapMap.optgroup = wrapMap.option = [ 1, "<select multiple='multiple'>", "</select>" ]; 14212} 14213 14214 14215function getAll( context, tag ) { 14216 14217 // Support: IE <=9 - 11 only 14218 // Use typeof to avoid zero-argument method invocation on host objects (#15151) 14219 var ret; 14220 14221 if ( typeof context.getElementsByTagName !== "undefined" ) { 14222 ret = context.getElementsByTagName( tag || "*" ); 14223 14224 } else if ( typeof context.querySelectorAll !== "undefined" ) { 14225 ret = context.querySelectorAll( tag || "*" ); 14226 14227 } else { 14228 ret = []; 14229 } 14230 14231 if ( tag === undefined || tag && nodeName( context, tag ) ) { 14232 return jQuery.merge( [ context ], ret ); 14233 } 14234 14235 return ret; 14236} 14237 14238 14239// Mark scripts as having already been evaluated 14240function setGlobalEval( elems, refElements ) { 14241 var i = 0, 14242 l = elems.length; 14243 14244 for ( ; i < l; i++ ) { 14245 dataPriv.set( 14246 elems[ i ], 14247 "globalEval", 14248 !refElements || dataPriv.get( refElements[ i ], "globalEval" ) 14249 ); 14250 } 14251} 14252 14253 14254var rhtml = /<|&#?\w+;/; 14255 14256function buildFragment( elems, context, scripts, selection, ignored ) { 14257 var elem, tmp, tag, wrap, attached, j, 14258 fragment = context.createDocumentFragment(), 14259 nodes = [], 14260 i = 0, 14261 l = elems.length; 14262 14263 for ( ; i < l; i++ ) { 14264 elem = elems[ i ]; 14265 14266 if ( elem || elem === 0 ) { 14267 14268 // Add nodes directly 14269 if ( toType( elem ) === "object" ) { 14270 14271 // Support: Android <=4.0 only, PhantomJS 1 only 14272 // push.apply(_, arraylike) throws on ancient WebKit 14273 jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); 14274 14275 // Convert non-html into a text node 14276 } else if ( !rhtml.test( elem ) ) { 14277 nodes.push( context.createTextNode( elem ) ); 14278 14279 // Convert html into DOM nodes 14280 } else { 14281 tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); 14282 14283 // Deserialize a standard representation 14284 tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); 14285 wrap = wrapMap[ tag ] || wrapMap._default; 14286 tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; 14287 14288 // Descend through wrappers to the right content 14289 j = wrap[ 0 ]; 14290 while ( j-- ) { 14291 tmp = tmp.lastChild; 14292 } 14293 14294 // Support: Android <=4.0 only, PhantomJS 1 only 14295 // push.apply(_, arraylike) throws on ancient WebKit 14296 jQuery.merge( nodes, tmp.childNodes ); 14297 14298 // Remember the top-level container 14299 tmp = fragment.firstChild; 14300 14301 // Ensure the created nodes are orphaned (#12392) 14302 tmp.textContent = ""; 14303 } 14304 } 14305 } 14306 14307 // Remove wrapper from fragment 14308 fragment.textContent = ""; 14309 14310 i = 0; 14311 while ( ( elem = nodes[ i++ ] ) ) { 14312 14313 // Skip elements already in the context collection (trac-4087) 14314 if ( selection && jQuery.inArray( elem, selection ) > -1 ) { 14315 if ( ignored ) { 14316 ignored.push( elem ); 14317 } 14318 continue; 14319 } 14320 14321 attached = isAttached( elem ); 14322 14323 // Append to fragment 14324 tmp = getAll( fragment.appendChild( elem ), "script" ); 14325 14326 // Preserve script evaluation history 14327 if ( attached ) { 14328 setGlobalEval( tmp ); 14329 } 14330 14331 // Capture executables 14332 if ( scripts ) { 14333 j = 0; 14334 while ( ( elem = tmp[ j++ ] ) ) { 14335 if ( rscriptType.test( elem.type || "" ) ) { 14336 scripts.push( elem ); 14337 } 14338 } 14339 } 14340 } 14341 14342 return fragment; 14343} 14344 14345 14346var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; 14347 14348function returnTrue() { 14349 return true; 14350} 14351 14352function returnFalse() { 14353 return false; 14354} 14355 14356// Support: IE <=9 - 11+ 14357// focus() and blur() are asynchronous, except when they are no-op. 14358// So expect focus to be synchronous when the element is already active, 14359// and blur to be synchronous when the element is not already active. 14360// (focus and blur are always synchronous in other supported browsers, 14361// this just defines when we can count on it). 14362function expectSync( elem, type ) { 14363 return ( elem === safeActiveElement() ) === ( type === "focus" ); 14364} 14365 14366// Support: IE <=9 only 14367// Accessing document.activeElement can throw unexpectedly 14368// https://bugs.jquery.com/ticket/13393 14369function safeActiveElement() { 14370 try { 14371 return document.activeElement; 14372 } catch ( err ) { } 14373} 14374 14375function on( elem, types, selector, data, fn, one ) { 14376 var origFn, type; 14377 14378 // Types can be a map of types/handlers 14379 if ( typeof types === "object" ) { 14380 14381 // ( types-Object, selector, data ) 14382 if ( typeof selector !== "string" ) { 14383 14384 // ( types-Object, data ) 14385 data = data || selector; 14386 selector = undefined; 14387 } 14388 for ( type in types ) { 14389 on( elem, type, selector, data, types[ type ], one ); 14390 } 14391 return elem; 14392 } 14393 14394 if ( data == null && fn == null ) { 14395 14396 // ( types, fn ) 14397 fn = selector; 14398 data = selector = undefined; 14399 } else if ( fn == null ) { 14400 if ( typeof selector === "string" ) { 14401 14402 // ( types, selector, fn ) 14403 fn = data; 14404 data = undefined; 14405 } else { 14406 14407 // ( types, data, fn ) 14408 fn = data; 14409 data = selector; 14410 selector = undefined; 14411 } 14412 } 14413 if ( fn === false ) { 14414 fn = returnFalse; 14415 } else if ( !fn ) { 14416 return elem; 14417 } 14418 14419 if ( one === 1 ) { 14420 origFn = fn; 14421 fn = function( event ) { 14422 14423 // Can use an empty set, since event contains the info 14424 jQuery().off( event ); 14425 return origFn.apply( this, arguments ); 14426 }; 14427 14428 // Use same guid so caller can remove using origFn 14429 fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); 14430 } 14431 return elem.each( function() { 14432 jQuery.event.add( this, types, fn, data, selector ); 14433 } ); 14434} 14435 14436/* 14437 * Helper functions for managing events -- not part of the public interface. 14438 * Props to Dean Edwards' addEvent library for many of the ideas. 14439 */ 14440jQuery.event = { 14441 14442 global: {}, 14443 14444 add: function( elem, types, handler, data, selector ) { 14445 14446 var handleObjIn, eventHandle, tmp, 14447 events, t, handleObj, 14448 special, handlers, type, namespaces, origType, 14449 elemData = dataPriv.get( elem ); 14450 14451 // Only attach events to objects that accept data 14452 if ( !acceptData( elem ) ) { 14453 return; 14454 } 14455 14456 // Caller can pass in an object of custom data in lieu of the handler 14457 if ( handler.handler ) { 14458 handleObjIn = handler; 14459 handler = handleObjIn.handler; 14460 selector = handleObjIn.selector; 14461 } 14462 14463 // Ensure that invalid selectors throw exceptions at attach time 14464 // Evaluate against documentElement in case elem is a non-element node (e.g., document) 14465 if ( selector ) { 14466 jQuery.find.matchesSelector( documentElement, selector ); 14467 } 14468 14469 // Make sure that the handler has a unique ID, used to find/remove it later 14470 if ( !handler.guid ) { 14471 handler.guid = jQuery.guid++; 14472 } 14473 14474 // Init the element's event structure and main handler, if this is the first 14475 if ( !( events = elemData.events ) ) { 14476 events = elemData.events = Object.create( null ); 14477 } 14478 if ( !( eventHandle = elemData.handle ) ) { 14479 eventHandle = elemData.handle = function( e ) { 14480 14481 // Discard the second event of a jQuery.event.trigger() and 14482 // when an event is called after a page has unloaded 14483 return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? 14484 jQuery.event.dispatch.apply( elem, arguments ) : undefined; 14485 }; 14486 } 14487 14488 // Handle multiple events separated by a space 14489 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; 14490 t = types.length; 14491 while ( t-- ) { 14492 tmp = rtypenamespace.exec( types[ t ] ) || []; 14493 type = origType = tmp[ 1 ]; 14494 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 14495 14496 // There *must* be a type, no attaching namespace-only handlers 14497 if ( !type ) { 14498 continue; 14499 } 14500 14501 // If event changes its type, use the special event handlers for the changed type 14502 special = jQuery.event.special[ type ] || {}; 14503 14504 // If selector defined, determine special event api type, otherwise given type 14505 type = ( selector ? special.delegateType : special.bindType ) || type; 14506 14507 // Update special based on newly reset type 14508 special = jQuery.event.special[ type ] || {}; 14509 14510 // handleObj is passed to all event handlers 14511 handleObj = jQuery.extend( { 14512 type: type, 14513 origType: origType, 14514 data: data, 14515 handler: handler, 14516 guid: handler.guid, 14517 selector: selector, 14518 needsContext: selector && jQuery.expr.match.needsContext.test( selector ), 14519 namespace: namespaces.join( "." ) 14520 }, handleObjIn ); 14521 14522 // Init the event handler queue if we're the first 14523 if ( !( handlers = events[ type ] ) ) { 14524 handlers = events[ type ] = []; 14525 handlers.delegateCount = 0; 14526 14527 // Only use addEventListener if the special events handler returns false 14528 if ( !special.setup || 14529 special.setup.call( elem, data, namespaces, eventHandle ) === false ) { 14530 14531 if ( elem.addEventListener ) { 14532 elem.addEventListener( type, eventHandle ); 14533 } 14534 } 14535 } 14536 14537 if ( special.add ) { 14538 special.add.call( elem, handleObj ); 14539 14540 if ( !handleObj.handler.guid ) { 14541 handleObj.handler.guid = handler.guid; 14542 } 14543 } 14544 14545 // Add to the element's handler list, delegates in front 14546 if ( selector ) { 14547 handlers.splice( handlers.delegateCount++, 0, handleObj ); 14548 } else { 14549 handlers.push( handleObj ); 14550 } 14551 14552 // Keep track of which events have ever been used, for event optimization 14553 jQuery.event.global[ type ] = true; 14554 } 14555 14556 }, 14557 14558 // Detach an event or set of events from an element 14559 remove: function( elem, types, handler, selector, mappedTypes ) { 14560 14561 var j, origCount, tmp, 14562 events, t, handleObj, 14563 special, handlers, type, namespaces, origType, 14564 elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); 14565 14566 if ( !elemData || !( events = elemData.events ) ) { 14567 return; 14568 } 14569 14570 // Once for each type.namespace in types; type may be omitted 14571 types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; 14572 t = types.length; 14573 while ( t-- ) { 14574 tmp = rtypenamespace.exec( types[ t ] ) || []; 14575 type = origType = tmp[ 1 ]; 14576 namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); 14577 14578 // Unbind all events (on this namespace, if provided) for the element 14579 if ( !type ) { 14580 for ( type in events ) { 14581 jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); 14582 } 14583 continue; 14584 } 14585 14586 special = jQuery.event.special[ type ] || {}; 14587 type = ( selector ? special.delegateType : special.bindType ) || type; 14588 handlers = events[ type ] || []; 14589 tmp = tmp[ 2 ] && 14590 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); 14591 14592 // Remove matching events 14593 origCount = j = handlers.length; 14594 while ( j-- ) { 14595 handleObj = handlers[ j ]; 14596 14597 if ( ( mappedTypes || origType === handleObj.origType ) && 14598 ( !handler || handler.guid === handleObj.guid ) && 14599 ( !tmp || tmp.test( handleObj.namespace ) ) && 14600 ( !selector || selector === handleObj.selector || 14601 selector === "**" && handleObj.selector ) ) { 14602 handlers.splice( j, 1 ); 14603 14604 if ( handleObj.selector ) { 14605 handlers.delegateCount--; 14606 } 14607 if ( special.remove ) { 14608 special.remove.call( elem, handleObj ); 14609 } 14610 } 14611 } 14612 14613 // Remove generic event handler if we removed something and no more handlers exist 14614 // (avoids potential for endless recursion during removal of special event handlers) 14615 if ( origCount && !handlers.length ) { 14616 if ( !special.teardown || 14617 special.teardown.call( elem, namespaces, elemData.handle ) === false ) { 14618 14619 jQuery.removeEvent( elem, type, elemData.handle ); 14620 } 14621 14622 delete events[ type ]; 14623 } 14624 } 14625 14626 // Remove data and the expando if it's no longer used 14627 if ( jQuery.isEmptyObject( events ) ) { 14628 dataPriv.remove( elem, "handle events" ); 14629 } 14630 }, 14631 14632 dispatch: function( nativeEvent ) { 14633 14634 var i, j, ret, matched, handleObj, handlerQueue, 14635 args = new Array( arguments.length ), 14636 14637 // Make a writable jQuery.Event from the native event object 14638 event = jQuery.event.fix( nativeEvent ), 14639 14640 handlers = ( 14641 dataPriv.get( this, "events" ) || Object.create( null ) 14642 )[ event.type ] || [], 14643 special = jQuery.event.special[ event.type ] || {}; 14644 14645 // Use the fix-ed jQuery.Event rather than the (read-only) native event 14646 args[ 0 ] = event; 14647 14648 for ( i = 1; i < arguments.length; i++ ) { 14649 args[ i ] = arguments[ i ]; 14650 } 14651 14652 event.delegateTarget = this; 14653 14654 // Call the preDispatch hook for the mapped type, and let it bail if desired 14655 if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { 14656 return; 14657 } 14658 14659 // Determine handlers 14660 handlerQueue = jQuery.event.handlers.call( this, event, handlers ); 14661 14662 // Run delegates first; they may want to stop propagation beneath us 14663 i = 0; 14664 while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { 14665 event.currentTarget = matched.elem; 14666 14667 j = 0; 14668 while ( ( handleObj = matched.handlers[ j++ ] ) && 14669 !event.isImmediatePropagationStopped() ) { 14670 14671 // If the event is namespaced, then each handler is only invoked if it is 14672 // specially universal or its namespaces are a superset of the event's. 14673 if ( !event.rnamespace || handleObj.namespace === false || 14674 event.rnamespace.test( handleObj.namespace ) ) { 14675 14676 event.handleObj = handleObj; 14677 event.data = handleObj.data; 14678 14679 ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || 14680 handleObj.handler ).apply( matched.elem, args ); 14681 14682 if ( ret !== undefined ) { 14683 if ( ( event.result = ret ) === false ) { 14684 event.preventDefault(); 14685 event.stopPropagation(); 14686 } 14687 } 14688 } 14689 } 14690 } 14691 14692 // Call the postDispatch hook for the mapped type 14693 if ( special.postDispatch ) { 14694 special.postDispatch.call( this, event ); 14695 } 14696 14697 return event.result; 14698 }, 14699 14700 handlers: function( event, handlers ) { 14701 var i, handleObj, sel, matchedHandlers, matchedSelectors, 14702 handlerQueue = [], 14703 delegateCount = handlers.delegateCount, 14704 cur = event.target; 14705 14706 // Find delegate handlers 14707 if ( delegateCount && 14708 14709 // Support: IE <=9 14710 // Black-hole SVG <use> instance trees (trac-13180) 14711 cur.nodeType && 14712 14713 // Support: Firefox <=42 14714 // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) 14715 // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click 14716 // Support: IE 11 only 14717 // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) 14718 !( event.type === "click" && event.button >= 1 ) ) { 14719 14720 for ( ; cur !== this; cur = cur.parentNode || this ) { 14721 14722 // Don't check non-elements (#13208) 14723 // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) 14724 if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { 14725 matchedHandlers = []; 14726 matchedSelectors = {}; 14727 for ( i = 0; i < delegateCount; i++ ) { 14728 handleObj = handlers[ i ]; 14729 14730 // Don't conflict with Object.prototype properties (#13203) 14731 sel = handleObj.selector + " "; 14732 14733 if ( matchedSelectors[ sel ] === undefined ) { 14734 matchedSelectors[ sel ] = handleObj.needsContext ? 14735 jQuery( sel, this ).index( cur ) > -1 : 14736 jQuery.find( sel, this, null, [ cur ] ).length; 14737 } 14738 if ( matchedSelectors[ sel ] ) { 14739 matchedHandlers.push( handleObj ); 14740 } 14741 } 14742 if ( matchedHandlers.length ) { 14743 handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); 14744 } 14745 } 14746 } 14747 } 14748 14749 // Add the remaining (directly-bound) handlers 14750 cur = this; 14751 if ( delegateCount < handlers.length ) { 14752 handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); 14753 } 14754 14755 return handlerQueue; 14756 }, 14757 14758 addProp: function( name, hook ) { 14759 Object.defineProperty( jQuery.Event.prototype, name, { 14760 enumerable: true, 14761 configurable: true, 14762 14763 get: isFunction( hook ) ? 14764 function() { 14765 if ( this.originalEvent ) { 14766 return hook( this.originalEvent ); 14767 } 14768 } : 14769 function() { 14770 if ( this.originalEvent ) { 14771 return this.originalEvent[ name ]; 14772 } 14773 }, 14774 14775 set: function( value ) { 14776 Object.defineProperty( this, name, { 14777 enumerable: true, 14778 configurable: true, 14779 writable: true, 14780 value: value 14781 } ); 14782 } 14783 } ); 14784 }, 14785 14786 fix: function( originalEvent ) { 14787 return originalEvent[ jQuery.expando ] ? 14788 originalEvent : 14789 new jQuery.Event( originalEvent ); 14790 }, 14791 14792 special: { 14793 load: { 14794 14795 // Prevent triggered image.load events from bubbling to window.load 14796 noBubble: true 14797 }, 14798 click: { 14799 14800 // Utilize native event to ensure correct state for checkable inputs 14801 setup: function( data ) { 14802 14803 // For mutual compressibility with _default, replace `this` access with a local var. 14804 // `|| data` is dead code meant only to preserve the variable through minification. 14805 var el = this || data; 14806 14807 // Claim the first handler 14808 if ( rcheckableType.test( el.type ) && 14809 el.click && nodeName( el, "input" ) ) { 14810 14811 // dataPriv.set( el, "click", ... ) 14812 leverageNative( el, "click", returnTrue ); 14813 } 14814 14815 // Return false to allow normal processing in the caller 14816 return false; 14817 }, 14818 trigger: function( data ) { 14819 14820 // For mutual compressibility with _default, replace `this` access with a local var. 14821 // `|| data` is dead code meant only to preserve the variable through minification. 14822 var el = this || data; 14823 14824 // Force setup before triggering a click 14825 if ( rcheckableType.test( el.type ) && 14826 el.click && nodeName( el, "input" ) ) { 14827 14828 leverageNative( el, "click" ); 14829 } 14830 14831 // Return non-false to allow normal event-path propagation 14832 return true; 14833 }, 14834 14835 // For cross-browser consistency, suppress native .click() on links 14836 // Also prevent it if we're currently inside a leveraged native-event stack 14837 _default: function( event ) { 14838 var target = event.target; 14839 return rcheckableType.test( target.type ) && 14840 target.click && nodeName( target, "input" ) && 14841 dataPriv.get( target, "click" ) || 14842 nodeName( target, "a" ); 14843 } 14844 }, 14845 14846 beforeunload: { 14847 postDispatch: function( event ) { 14848 14849 // Support: Firefox 20+ 14850 // Firefox doesn't alert if the returnValue field is not set. 14851 if ( event.result !== undefined && event.originalEvent ) { 14852 event.originalEvent.returnValue = event.result; 14853 } 14854 } 14855 } 14856 } 14857}; 14858 14859// Ensure the presence of an event listener that handles manually-triggered 14860// synthetic events by interrupting progress until reinvoked in response to 14861// *native* events that it fires directly, ensuring that state changes have 14862// already occurred before other listeners are invoked. 14863function leverageNative( el, type, expectSync ) { 14864 14865 // Missing expectSync indicates a trigger call, which must force setup through jQuery.event.add 14866 if ( !expectSync ) { 14867 if ( dataPriv.get( el, type ) === undefined ) { 14868 jQuery.event.add( el, type, returnTrue ); 14869 } 14870 return; 14871 } 14872 14873 // Register the controller as a special universal handler for all event namespaces 14874 dataPriv.set( el, type, false ); 14875 jQuery.event.add( el, type, { 14876 namespace: false, 14877 handler: function( event ) { 14878 var notAsync, result, 14879 saved = dataPriv.get( this, type ); 14880 14881 if ( ( event.isTrigger & 1 ) && this[ type ] ) { 14882 14883 // Interrupt processing of the outer synthetic .trigger()ed event 14884 // Saved data should be false in such cases, but might be a leftover capture object 14885 // from an async native handler (gh-4350) 14886 if ( !saved.length ) { 14887 14888 // Store arguments for use when handling the inner native event 14889 // There will always be at least one argument (an event object), so this array 14890 // will not be confused with a leftover capture object. 14891 saved = slice.call( arguments ); 14892 dataPriv.set( this, type, saved ); 14893 14894 // Trigger the native event and capture its result 14895 // Support: IE <=9 - 11+ 14896 // focus() and blur() are asynchronous 14897 notAsync = expectSync( this, type ); 14898 this[ type ](); 14899 result = dataPriv.get( this, type ); 14900 if ( saved !== result || notAsync ) { 14901 dataPriv.set( this, type, false ); 14902 } else { 14903 result = {}; 14904 } 14905 if ( saved !== result ) { 14906 14907 // Cancel the outer synthetic event 14908 event.stopImmediatePropagation(); 14909 event.preventDefault(); 14910 14911 // Support: Chrome 86+ 14912 // In Chrome, if an element having a focusout handler is blurred by 14913 // clicking outside of it, it invokes the handler synchronously. If 14914 // that handler calls `.remove()` on the element, the data is cleared, 14915 // leaving `result` undefined. We need to guard against this. 14916 return result && result.value; 14917 } 14918 14919 // If this is an inner synthetic event for an event with a bubbling surrogate 14920 // (focus or blur), assume that the surrogate already propagated from triggering the 14921 // native event and prevent that from happening again here. 14922 // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the 14923 // bubbling surrogate propagates *after* the non-bubbling base), but that seems 14924 // less bad than duplication. 14925 } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { 14926 event.stopPropagation(); 14927 } 14928 14929 // If this is a native event triggered above, everything is now in order 14930 // Fire an inner synthetic event with the original arguments 14931 } else if ( saved.length ) { 14932 14933 // ...and capture the result 14934 dataPriv.set( this, type, { 14935 value: jQuery.event.trigger( 14936 14937 // Support: IE <=9 - 11+ 14938 // Extend with the prototype to reset the above stopImmediatePropagation() 14939 jQuery.extend( saved[ 0 ], jQuery.Event.prototype ), 14940 saved.slice( 1 ), 14941 this 14942 ) 14943 } ); 14944 14945 // Abort handling of the native event 14946 event.stopImmediatePropagation(); 14947 } 14948 } 14949 } ); 14950} 14951 14952jQuery.removeEvent = function( elem, type, handle ) { 14953 14954 // This "if" is needed for plain objects 14955 if ( elem.removeEventListener ) { 14956 elem.removeEventListener( type, handle ); 14957 } 14958}; 14959 14960jQuery.Event = function( src, props ) { 14961 14962 // Allow instantiation without the 'new' keyword 14963 if ( !( this instanceof jQuery.Event ) ) { 14964 return new jQuery.Event( src, props ); 14965 } 14966 14967 // Event object 14968 if ( src && src.type ) { 14969 this.originalEvent = src; 14970 this.type = src.type; 14971 14972 // Events bubbling up the document may have been marked as prevented 14973 // by a handler lower down the tree; reflect the correct value. 14974 this.isDefaultPrevented = src.defaultPrevented || 14975 src.defaultPrevented === undefined && 14976 14977 // Support: Android <=2.3 only 14978 src.returnValue === false ? 14979 returnTrue : 14980 returnFalse; 14981 14982 // Create target properties 14983 // Support: Safari <=6 - 7 only 14984 // Target should not be a text node (#504, #13143) 14985 this.target = ( src.target && src.target.nodeType === 3 ) ? 14986 src.target.parentNode : 14987 src.target; 14988 14989 this.currentTarget = src.currentTarget; 14990 this.relatedTarget = src.relatedTarget; 14991 14992 // Event type 14993 } else { 14994 this.type = src; 14995 } 14996 14997 // Put explicitly provided properties onto the event object 14998 if ( props ) { 14999 jQuery.extend( this, props ); 15000 } 15001 15002 // Create a timestamp if incoming event doesn't have one 15003 this.timeStamp = src && src.timeStamp || Date.now(); 15004 15005 // Mark it as fixed 15006 this[ jQuery.expando ] = true; 15007}; 15008 15009// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding 15010// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html 15011jQuery.Event.prototype = { 15012 constructor: jQuery.Event, 15013 isDefaultPrevented: returnFalse, 15014 isPropagationStopped: returnFalse, 15015 isImmediatePropagationStopped: returnFalse, 15016 isSimulated: false, 15017 15018 preventDefault: function() { 15019 var e = this.originalEvent; 15020 15021 this.isDefaultPrevented = returnTrue; 15022 15023 if ( e && !this.isSimulated ) { 15024 e.preventDefault(); 15025 } 15026 }, 15027 stopPropagation: function() { 15028 var e = this.originalEvent; 15029 15030 this.isPropagationStopped = returnTrue; 15031 15032 if ( e && !this.isSimulated ) { 15033 e.stopPropagation(); 15034 } 15035 }, 15036 stopImmediatePropagation: function() { 15037 var e = this.originalEvent; 15038 15039 this.isImmediatePropagationStopped = returnTrue; 15040 15041 if ( e && !this.isSimulated ) { 15042 e.stopImmediatePropagation(); 15043 } 15044 15045 this.stopPropagation(); 15046 } 15047}; 15048 15049// Includes all common event props including KeyEvent and MouseEvent specific props 15050jQuery.each( { 15051 altKey: true, 15052 bubbles: true, 15053 cancelable: true, 15054 changedTouches: true, 15055 ctrlKey: true, 15056 detail: true, 15057 eventPhase: true, 15058 metaKey: true, 15059 pageX: true, 15060 pageY: true, 15061 shiftKey: true, 15062 view: true, 15063 "char": true, 15064 code: true, 15065 charCode: true, 15066 key: true, 15067 keyCode: true, 15068 button: true, 15069 buttons: true, 15070 clientX: true, 15071 clientY: true, 15072 offsetX: true, 15073 offsetY: true, 15074 pointerId: true, 15075 pointerType: true, 15076 screenX: true, 15077 screenY: true, 15078 targetTouches: true, 15079 toElement: true, 15080 touches: true, 15081 which: true 15082}, jQuery.event.addProp ); 15083 15084jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { 15085 jQuery.event.special[ type ] = { 15086 15087 // Utilize native event if possible so blur/focus sequence is correct 15088 setup: function() { 15089 15090 // Claim the first handler 15091 // dataPriv.set( this, "focus", ... ) 15092 // dataPriv.set( this, "blur", ... ) 15093 leverageNative( this, type, expectSync ); 15094 15095 // Return false to allow normal processing in the caller 15096 return false; 15097 }, 15098 trigger: function() { 15099 15100 // Force setup before trigger 15101 leverageNative( this, type ); 15102 15103 // Return non-false to allow normal event-path propagation 15104 return true; 15105 }, 15106 15107 // Suppress native focus or blur as it's already being fired 15108 // in leverageNative. 15109 _default: function() { 15110 return true; 15111 }, 15112 15113 delegateType: delegateType 15114 }; 15115} ); 15116 15117// Create mouseenter/leave events using mouseover/out and event-time checks 15118// so that event delegation works in jQuery. 15119// Do the same for pointerenter/pointerleave and pointerover/pointerout 15120// 15121// Support: Safari 7 only 15122// Safari sends mouseenter too often; see: 15123// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 15124// for the description of the bug (it existed in older Chrome versions as well). 15125jQuery.each( { 15126 mouseenter: "mouseover", 15127 mouseleave: "mouseout", 15128 pointerenter: "pointerover", 15129 pointerleave: "pointerout" 15130}, function( orig, fix ) { 15131 jQuery.event.special[ orig ] = { 15132 delegateType: fix, 15133 bindType: fix, 15134 15135 handle: function( event ) { 15136 var ret, 15137 target = this, 15138 related = event.relatedTarget, 15139 handleObj = event.handleObj; 15140 15141 // For mouseenter/leave call the handler if related is outside the target. 15142 // NB: No relatedTarget if the mouse left/entered the browser window 15143 if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { 15144 event.type = handleObj.origType; 15145 ret = handleObj.handler.apply( this, arguments ); 15146 event.type = fix; 15147 } 15148 return ret; 15149 } 15150 }; 15151} ); 15152 15153jQuery.fn.extend( { 15154 15155 on: function( types, selector, data, fn ) { 15156 return on( this, types, selector, data, fn ); 15157 }, 15158 one: function( types, selector, data, fn ) { 15159 return on( this, types, selector, data, fn, 1 ); 15160 }, 15161 off: function( types, selector, fn ) { 15162 var handleObj, type; 15163 if ( types && types.preventDefault && types.handleObj ) { 15164 15165 // ( event ) dispatched jQuery.Event 15166 handleObj = types.handleObj; 15167 jQuery( types.delegateTarget ).off( 15168 handleObj.namespace ? 15169 handleObj.origType + "." + handleObj.namespace : 15170 handleObj.origType, 15171 handleObj.selector, 15172 handleObj.handler 15173 ); 15174 return this; 15175 } 15176 if ( typeof types === "object" ) { 15177 15178 // ( types-object [, selector] ) 15179 for ( type in types ) { 15180 this.off( type, selector, types[ type ] ); 15181 } 15182 return this; 15183 } 15184 if ( selector === false || typeof selector === "function" ) { 15185 15186 // ( types [, fn] ) 15187 fn = selector; 15188 selector = undefined; 15189 } 15190 if ( fn === false ) { 15191 fn = returnFalse; 15192 } 15193 return this.each( function() { 15194 jQuery.event.remove( this, types, fn, selector ); 15195 } ); 15196 } 15197} ); 15198 15199 15200var 15201 15202 // Support: IE <=10 - 11, Edge 12 - 13 only 15203 // In IE/Edge using regex groups here causes severe slowdowns. 15204 // See https://connect.microsoft.com/IE/feedback/details/1736512/ 15205 rnoInnerhtml = /<script|<style|<link/i, 15206 15207 // checked="checked" or checked 15208 rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, 15209 rcleanScript = /^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g; 15210 15211// Prefer a tbody over its parent table for containing new rows 15212function manipulationTarget( elem, content ) { 15213 if ( nodeName( elem, "table" ) && 15214 nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { 15215 15216 return jQuery( elem ).children( "tbody" )[ 0 ] || elem; 15217 } 15218 15219 return elem; 15220} 15221 15222// Replace/restore the type attribute of script elements for safe DOM manipulation 15223function disableScript( elem ) { 15224 elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; 15225 return elem; 15226} 15227function restoreScript( elem ) { 15228 if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { 15229 elem.type = elem.type.slice( 5 ); 15230 } else { 15231 elem.removeAttribute( "type" ); 15232 } 15233 15234 return elem; 15235} 15236 15237function cloneCopyEvent( src, dest ) { 15238 var i, l, type, pdataOld, udataOld, udataCur, events; 15239 15240 if ( dest.nodeType !== 1 ) { 15241 return; 15242 } 15243 15244 // 1. Copy private data: events, handlers, etc. 15245 if ( dataPriv.hasData( src ) ) { 15246 pdataOld = dataPriv.get( src ); 15247 events = pdataOld.events; 15248 15249 if ( events ) { 15250 dataPriv.remove( dest, "handle events" ); 15251 15252 for ( type in events ) { 15253 for ( i = 0, l = events[ type ].length; i < l; i++ ) { 15254 jQuery.event.add( dest, type, events[ type ][ i ] ); 15255 } 15256 } 15257 } 15258 } 15259 15260 // 2. Copy user data 15261 if ( dataUser.hasData( src ) ) { 15262 udataOld = dataUser.access( src ); 15263 udataCur = jQuery.extend( {}, udataOld ); 15264 15265 dataUser.set( dest, udataCur ); 15266 } 15267} 15268 15269// Fix IE bugs, see support tests 15270function fixInput( src, dest ) { 15271 var nodeName = dest.nodeName.toLowerCase(); 15272 15273 // Fails to persist the checked state of a cloned checkbox or radio button. 15274 if ( nodeName === "input" && rcheckableType.test( src.type ) ) { 15275 dest.checked = src.checked; 15276 15277 // Fails to return the selected option to the default selected state when cloning options 15278 } else if ( nodeName === "input" || nodeName === "textarea" ) { 15279 dest.defaultValue = src.defaultValue; 15280 } 15281} 15282 15283function domManip( collection, args, callback, ignored ) { 15284 15285 // Flatten any nested arrays 15286 args = flat( args ); 15287 15288 var fragment, first, scripts, hasScripts, node, doc, 15289 i = 0, 15290 l = collection.length, 15291 iNoClone = l - 1, 15292 value = args[ 0 ], 15293 valueIsFunction = isFunction( value ); 15294 15295 // We can't cloneNode fragments that contain checked, in WebKit 15296 if ( valueIsFunction || 15297 ( l > 1 && typeof value === "string" && 15298 !support.checkClone && rchecked.test( value ) ) ) { 15299 return collection.each( function( index ) { 15300 var self = collection.eq( index ); 15301 if ( valueIsFunction ) { 15302 args[ 0 ] = value.call( this, index, self.html() ); 15303 } 15304 domManip( self, args, callback, ignored ); 15305 } ); 15306 } 15307 15308 if ( l ) { 15309 fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); 15310 first = fragment.firstChild; 15311 15312 if ( fragment.childNodes.length === 1 ) { 15313 fragment = first; 15314 } 15315 15316 // Require either new content or an interest in ignored elements to invoke the callback 15317 if ( first || ignored ) { 15318 scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); 15319 hasScripts = scripts.length; 15320 15321 // Use the original fragment for the last item 15322 // instead of the first because it can end up 15323 // being emptied incorrectly in certain situations (#8070). 15324 for ( ; i < l; i++ ) { 15325 node = fragment; 15326 15327 if ( i !== iNoClone ) { 15328 node = jQuery.clone( node, true, true ); 15329 15330 // Keep references to cloned scripts for later restoration 15331 if ( hasScripts ) { 15332 15333 // Support: Android <=4.0 only, PhantomJS 1 only 15334 // push.apply(_, arraylike) throws on ancient WebKit 15335 jQuery.merge( scripts, getAll( node, "script" ) ); 15336 } 15337 } 15338 15339 callback.call( collection[ i ], node, i ); 15340 } 15341 15342 if ( hasScripts ) { 15343 doc = scripts[ scripts.length - 1 ].ownerDocument; 15344 15345 // Reenable scripts 15346 jQuery.map( scripts, restoreScript ); 15347 15348 // Evaluate executable scripts on first document insertion 15349 for ( i = 0; i < hasScripts; i++ ) { 15350 node = scripts[ i ]; 15351 if ( rscriptType.test( node.type || "" ) && 15352 !dataPriv.access( node, "globalEval" ) && 15353 jQuery.contains( doc, node ) ) { 15354 15355 if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { 15356 15357 // Optional AJAX dependency, but won't run scripts if not present 15358 if ( jQuery._evalUrl && !node.noModule ) { 15359 jQuery._evalUrl( node.src, { 15360 nonce: node.nonce || node.getAttribute( "nonce" ) 15361 }, doc ); 15362 } 15363 } else { 15364 DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); 15365 } 15366 } 15367 } 15368 } 15369 } 15370 } 15371 15372 return collection; 15373} 15374 15375function remove( elem, selector, keepData ) { 15376 var node, 15377 nodes = selector ? jQuery.filter( selector, elem ) : elem, 15378 i = 0; 15379 15380 for ( ; ( node = nodes[ i ] ) != null; i++ ) { 15381 if ( !keepData && node.nodeType === 1 ) { 15382 jQuery.cleanData( getAll( node ) ); 15383 } 15384 15385 if ( node.parentNode ) { 15386 if ( keepData && isAttached( node ) ) { 15387 setGlobalEval( getAll( node, "script" ) ); 15388 } 15389 node.parentNode.removeChild( node ); 15390 } 15391 } 15392 15393 return elem; 15394} 15395 15396jQuery.extend( { 15397 htmlPrefilter: function( html ) { 15398 return html; 15399 }, 15400 15401 clone: function( elem, dataAndEvents, deepDataAndEvents ) { 15402 var i, l, srcElements, destElements, 15403 clone = elem.cloneNode( true ), 15404 inPage = isAttached( elem ); 15405 15406 // Fix IE cloning issues 15407 if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && 15408 !jQuery.isXMLDoc( elem ) ) { 15409 15410 // We eschew Sizzle here for performance reasons: https://jsperf.com/getall-vs-sizzle/2 15411 destElements = getAll( clone ); 15412 srcElements = getAll( elem ); 15413 15414 for ( i = 0, l = srcElements.length; i < l; i++ ) { 15415 fixInput( srcElements[ i ], destElements[ i ] ); 15416 } 15417 } 15418 15419 // Copy the events from the original to the clone 15420 if ( dataAndEvents ) { 15421 if ( deepDataAndEvents ) { 15422 srcElements = srcElements || getAll( elem ); 15423 destElements = destElements || getAll( clone ); 15424 15425 for ( i = 0, l = srcElements.length; i < l; i++ ) { 15426 cloneCopyEvent( srcElements[ i ], destElements[ i ] ); 15427 } 15428 } else { 15429 cloneCopyEvent( elem, clone ); 15430 } 15431 } 15432 15433 // Preserve script evaluation history 15434 destElements = getAll( clone, "script" ); 15435 if ( destElements.length > 0 ) { 15436 setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); 15437 } 15438 15439 // Return the cloned set 15440 return clone; 15441 }, 15442 15443 cleanData: function( elems ) { 15444 var data, elem, type, 15445 special = jQuery.event.special, 15446 i = 0; 15447 15448 for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { 15449 if ( acceptData( elem ) ) { 15450 if ( ( data = elem[ dataPriv.expando ] ) ) { 15451 if ( data.events ) { 15452 for ( type in data.events ) { 15453 if ( special[ type ] ) { 15454 jQuery.event.remove( elem, type ); 15455 15456 // This is a shortcut to avoid jQuery.event.remove's overhead 15457 } else { 15458 jQuery.removeEvent( elem, type, data.handle ); 15459 } 15460 } 15461 } 15462 15463 // Support: Chrome <=35 - 45+ 15464 // Assign undefined instead of using delete, see Data#remove 15465 elem[ dataPriv.expando ] = undefined; 15466 } 15467 if ( elem[ dataUser.expando ] ) { 15468 15469 // Support: Chrome <=35 - 45+ 15470 // Assign undefined instead of using delete, see Data#remove 15471 elem[ dataUser.expando ] = undefined; 15472 } 15473 } 15474 } 15475 } 15476} ); 15477 15478jQuery.fn.extend( { 15479 detach: function( selector ) { 15480 return remove( this, selector, true ); 15481 }, 15482 15483 remove: function( selector ) { 15484 return remove( this, selector ); 15485 }, 15486 15487 text: function( value ) { 15488 return access( this, function( value ) { 15489 return value === undefined ? 15490 jQuery.text( this ) : 15491 this.empty().each( function() { 15492 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 15493 this.textContent = value; 15494 } 15495 } ); 15496 }, null, value, arguments.length ); 15497 }, 15498 15499 append: function() { 15500 return domManip( this, arguments, function( elem ) { 15501 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 15502 var target = manipulationTarget( this, elem ); 15503 target.appendChild( elem ); 15504 } 15505 } ); 15506 }, 15507 15508 prepend: function() { 15509 return domManip( this, arguments, function( elem ) { 15510 if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { 15511 var target = manipulationTarget( this, elem ); 15512 target.insertBefore( elem, target.firstChild ); 15513 } 15514 } ); 15515 }, 15516 15517 before: function() { 15518 return domManip( this, arguments, function( elem ) { 15519 if ( this.parentNode ) { 15520 this.parentNode.insertBefore( elem, this ); 15521 } 15522 } ); 15523 }, 15524 15525 after: function() { 15526 return domManip( this, arguments, function( elem ) { 15527 if ( this.parentNode ) { 15528 this.parentNode.insertBefore( elem, this.nextSibling ); 15529 } 15530 } ); 15531 }, 15532 15533 empty: function() { 15534 var elem, 15535 i = 0; 15536 15537 for ( ; ( elem = this[ i ] ) != null; i++ ) { 15538 if ( elem.nodeType === 1 ) { 15539 15540 // Prevent memory leaks 15541 jQuery.cleanData( getAll( elem, false ) ); 15542 15543 // Remove any remaining nodes 15544 elem.textContent = ""; 15545 } 15546 } 15547 15548 return this; 15549 }, 15550 15551 clone: function( dataAndEvents, deepDataAndEvents ) { 15552 dataAndEvents = dataAndEvents == null ? false : dataAndEvents; 15553 deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; 15554 15555 return this.map( function() { 15556 return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); 15557 } ); 15558 }, 15559 15560 html: function( value ) { 15561 return access( this, function( value ) { 15562 var elem = this[ 0 ] || {}, 15563 i = 0, 15564 l = this.length; 15565 15566 if ( value === undefined && elem.nodeType === 1 ) { 15567 return elem.innerHTML; 15568 } 15569 15570 // See if we can take a shortcut and just use innerHTML 15571 if ( typeof value === "string" && !rnoInnerhtml.test( value ) && 15572 !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { 15573 15574 value = jQuery.htmlPrefilter( value ); 15575 15576 try { 15577 for ( ; i < l; i++ ) { 15578 elem = this[ i ] || {}; 15579 15580 // Remove element nodes and prevent memory leaks 15581 if ( elem.nodeType === 1 ) { 15582 jQuery.cleanData( getAll( elem, false ) ); 15583 elem.innerHTML = value; 15584 } 15585 } 15586 15587 elem = 0; 15588 15589 // If using innerHTML throws an exception, use the fallback method 15590 } catch ( e ) {} 15591 } 15592 15593 if ( elem ) { 15594 this.empty().append( value ); 15595 } 15596 }, null, value, arguments.length ); 15597 }, 15598 15599 replaceWith: function() { 15600 var ignored = []; 15601 15602 // Make the changes, replacing each non-ignored context element with the new content 15603 return domManip( this, arguments, function( elem ) { 15604 var parent = this.parentNode; 15605 15606 if ( jQuery.inArray( this, ignored ) < 0 ) { 15607 jQuery.cleanData( getAll( this ) ); 15608 if ( parent ) { 15609 parent.replaceChild( elem, this ); 15610 } 15611 } 15612 15613 // Force callback invocation 15614 }, ignored ); 15615 } 15616} ); 15617 15618jQuery.each( { 15619 appendTo: "append", 15620 prependTo: "prepend", 15621 insertBefore: "before", 15622 insertAfter: "after", 15623 replaceAll: "replaceWith" 15624}, function( name, original ) { 15625 jQuery.fn[ name ] = function( selector ) { 15626 var elems, 15627 ret = [], 15628 insert = jQuery( selector ), 15629 last = insert.length - 1, 15630 i = 0; 15631 15632 for ( ; i <= last; i++ ) { 15633 elems = i === last ? this : this.clone( true ); 15634 jQuery( insert[ i ] )[ original ]( elems ); 15635 15636 // Support: Android <=4.0 only, PhantomJS 1 only 15637 // .get() because push.apply(_, arraylike) throws on ancient WebKit 15638 push.apply( ret, elems.get() ); 15639 } 15640 15641 return this.pushStack( ret ); 15642 }; 15643} ); 15644var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 15645 15646var getStyles = function( elem ) { 15647 15648 // Support: IE <=11 only, Firefox <=30 (#15098, #14150) 15649 // IE throws on elements created in popups 15650 // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 15651 var view = elem.ownerDocument.defaultView; 15652 15653 if ( !view || !view.opener ) { 15654 view = window; 15655 } 15656 15657 return view.getComputedStyle( elem ); 15658 }; 15659 15660var swap = function( elem, options, callback ) { 15661 var ret, name, 15662 old = {}; 15663 15664 // Remember the old values, and insert the new ones 15665 for ( name in options ) { 15666 old[ name ] = elem.style[ name ]; 15667 elem.style[ name ] = options[ name ]; 15668 } 15669 15670 ret = callback.call( elem ); 15671 15672 // Revert the old values 15673 for ( name in options ) { 15674 elem.style[ name ] = old[ name ]; 15675 } 15676 15677 return ret; 15678}; 15679 15680 15681var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); 15682 15683 15684 15685( function() { 15686 15687 // Executing both pixelPosition & boxSizingReliable tests require only one layout 15688 // so they're executed at the same time to save the second computation. 15689 function computeStyleTests() { 15690 15691 // This is a singleton, we need to execute it only once 15692 if ( !div ) { 15693 return; 15694 } 15695 15696 container.style.cssText = "position:absolute;left:-11111px;width:60px;" + 15697 "margin-top:1px;padding:0;border:0"; 15698 div.style.cssText = 15699 "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + 15700 "margin:auto;border:1px;padding:1px;" + 15701 "width:60%;top:1%"; 15702 documentElement.appendChild( container ).appendChild( div ); 15703 15704 var divStyle = window.getComputedStyle( div ); 15705 pixelPositionVal = divStyle.top !== "1%"; 15706 15707 // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 15708 reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; 15709 15710 // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 15711 // Some styles come back with percentage values, even though they shouldn't 15712 div.style.right = "60%"; 15713 pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; 15714 15715 // Support: IE 9 - 11 only 15716 // Detect misreporting of content dimensions for box-sizing:border-box elements 15717 boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; 15718 15719 // Support: IE 9 only 15720 // Detect overflow:scroll screwiness (gh-3699) 15721 // Support: Chrome <=64 15722 // Don't get tricked when zoom affects offsetWidth (gh-4029) 15723 div.style.position = "absolute"; 15724 scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; 15725 15726 documentElement.removeChild( container ); 15727 15728 // Nullify the div so it wouldn't be stored in the memory and 15729 // it will also be a sign that checks already performed 15730 div = null; 15731 } 15732 15733 function roundPixelMeasures( measure ) { 15734 return Math.round( parseFloat( measure ) ); 15735 } 15736 15737 var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, 15738 reliableTrDimensionsVal, reliableMarginLeftVal, 15739 container = document.createElement( "div" ), 15740 div = document.createElement( "div" ); 15741 15742 // Finish early in limited (non-browser) environments 15743 if ( !div.style ) { 15744 return; 15745 } 15746 15747 // Support: IE <=9 - 11 only 15748 // Style of cloned element affects source element cloned (#8908) 15749 div.style.backgroundClip = "content-box"; 15750 div.cloneNode( true ).style.backgroundClip = ""; 15751 support.clearCloneStyle = div.style.backgroundClip === "content-box"; 15752 15753 jQuery.extend( support, { 15754 boxSizingReliable: function() { 15755 computeStyleTests(); 15756 return boxSizingReliableVal; 15757 }, 15758 pixelBoxStyles: function() { 15759 computeStyleTests(); 15760 return pixelBoxStylesVal; 15761 }, 15762 pixelPosition: function() { 15763 computeStyleTests(); 15764 return pixelPositionVal; 15765 }, 15766 reliableMarginLeft: function() { 15767 computeStyleTests(); 15768 return reliableMarginLeftVal; 15769 }, 15770 scrollboxSize: function() { 15771 computeStyleTests(); 15772 return scrollboxSizeVal; 15773 }, 15774 15775 // Support: IE 9 - 11+, Edge 15 - 18+ 15776 // IE/Edge misreport `getComputedStyle` of table rows with width/height 15777 // set in CSS while `offset*` properties report correct values. 15778 // Behavior in IE 9 is more subtle than in newer versions & it passes 15779 // some versions of this test; make sure not to make it pass there! 15780 // 15781 // Support: Firefox 70+ 15782 // Only Firefox includes border widths 15783 // in computed dimensions. (gh-4529) 15784 reliableTrDimensions: function() { 15785 var table, tr, trChild, trStyle; 15786 if ( reliableTrDimensionsVal == null ) { 15787 table = document.createElement( "table" ); 15788 tr = document.createElement( "tr" ); 15789 trChild = document.createElement( "div" ); 15790 15791 table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; 15792 tr.style.cssText = "border:1px solid"; 15793 15794 // Support: Chrome 86+ 15795 // Height set through cssText does not get applied. 15796 // Computed height then comes back as 0. 15797 tr.style.height = "1px"; 15798 trChild.style.height = "9px"; 15799 15800 // Support: Android 8 Chrome 86+ 15801 // In our bodyBackground.html iframe, 15802 // display for all div elements is set to "inline", 15803 // which causes a problem only in Android 8 Chrome 86. 15804 // Ensuring the div is display: block 15805 // gets around this issue. 15806 trChild.style.display = "block"; 15807 15808 documentElement 15809 .appendChild( table ) 15810 .appendChild( tr ) 15811 .appendChild( trChild ); 15812 15813 trStyle = window.getComputedStyle( tr ); 15814 reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + 15815 parseInt( trStyle.borderTopWidth, 10 ) + 15816 parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; 15817 15818 documentElement.removeChild( table ); 15819 } 15820 return reliableTrDimensionsVal; 15821 } 15822 } ); 15823} )(); 15824 15825 15826function curCSS( elem, name, computed ) { 15827 var width, minWidth, maxWidth, ret, 15828 15829 // Support: Firefox 51+ 15830 // Retrieving style before computed somehow 15831 // fixes an issue with getting wrong values 15832 // on detached elements 15833 style = elem.style; 15834 15835 computed = computed || getStyles( elem ); 15836 15837 // getPropertyValue is needed for: 15838 // .css('filter') (IE 9 only, #12537) 15839 // .css('--customProperty) (#3144) 15840 if ( computed ) { 15841 ret = computed.getPropertyValue( name ) || computed[ name ]; 15842 15843 if ( ret === "" && !isAttached( elem ) ) { 15844 ret = jQuery.style( elem, name ); 15845 } 15846 15847 // A tribute to the "awesome hack by Dean Edwards" 15848 // Android Browser returns percentage for some values, 15849 // but width seems to be reliably pixels. 15850 // This is against the CSSOM draft spec: 15851 // https://drafts.csswg.org/cssom/#resolved-values 15852 if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { 15853 15854 // Remember the original values 15855 width = style.width; 15856 minWidth = style.minWidth; 15857 maxWidth = style.maxWidth; 15858 15859 // Put in the new values to get a computed value out 15860 style.minWidth = style.maxWidth = style.width = ret; 15861 ret = computed.width; 15862 15863 // Revert the changed values 15864 style.width = width; 15865 style.minWidth = minWidth; 15866 style.maxWidth = maxWidth; 15867 } 15868 } 15869 15870 return ret !== undefined ? 15871 15872 // Support: IE <=9 - 11 only 15873 // IE returns zIndex value as an integer. 15874 ret + "" : 15875 ret; 15876} 15877 15878 15879function addGetHookIf( conditionFn, hookFn ) { 15880 15881 // Define the hook, we'll check on the first run if it's really needed. 15882 return { 15883 get: function() { 15884 if ( conditionFn() ) { 15885 15886 // Hook not needed (or it's not possible to use it due 15887 // to missing dependency), remove it. 15888 delete this.get; 15889 return; 15890 } 15891 15892 // Hook needed; redefine it so that the support test is not executed again. 15893 return ( this.get = hookFn ).apply( this, arguments ); 15894 } 15895 }; 15896} 15897 15898 15899var cssPrefixes = [ "Webkit", "Moz", "ms" ], 15900 emptyStyle = document.createElement( "div" ).style, 15901 vendorProps = {}; 15902 15903// Return a vendor-prefixed property or undefined 15904function vendorPropName( name ) { 15905 15906 // Check for vendor prefixed names 15907 var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), 15908 i = cssPrefixes.length; 15909 15910 while ( i-- ) { 15911 name = cssPrefixes[ i ] + capName; 15912 if ( name in emptyStyle ) { 15913 return name; 15914 } 15915 } 15916} 15917 15918// Return a potentially-mapped jQuery.cssProps or vendor prefixed property 15919function finalPropName( name ) { 15920 var final = jQuery.cssProps[ name ] || vendorProps[ name ]; 15921 15922 if ( final ) { 15923 return final; 15924 } 15925 if ( name in emptyStyle ) { 15926 return name; 15927 } 15928 return vendorProps[ name ] = vendorPropName( name ) || name; 15929} 15930 15931 15932var 15933 15934 // Swappable if display is none or starts with table 15935 // except "table", "table-cell", or "table-caption" 15936 // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display 15937 rdisplayswap = /^(none|table(?!-c[ea]).+)/, 15938 rcustomProp = /^--/, 15939 cssShow = { position: "absolute", visibility: "hidden", display: "block" }, 15940 cssNormalTransform = { 15941 letterSpacing: "0", 15942 fontWeight: "400" 15943 }; 15944 15945function setPositiveNumber( _elem, value, subtract ) { 15946 15947 // Any relative (+/-) values have already been 15948 // normalized at this point 15949 var matches = rcssNum.exec( value ); 15950 return matches ? 15951 15952 // Guard against undefined "subtract", e.g., when used as in cssHooks 15953 Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : 15954 value; 15955} 15956 15957function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { 15958 var i = dimension === "width" ? 1 : 0, 15959 extra = 0, 15960 delta = 0; 15961 15962 // Adjustment may not be necessary 15963 if ( box === ( isBorderBox ? "border" : "content" ) ) { 15964 return 0; 15965 } 15966 15967 for ( ; i < 4; i += 2 ) { 15968 15969 // Both box models exclude margin 15970 if ( box === "margin" ) { 15971 delta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); 15972 } 15973 15974 // If we get here with a content-box, we're seeking "padding" or "border" or "margin" 15975 if ( !isBorderBox ) { 15976 15977 // Add padding 15978 delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 15979 15980 // For "border" or "margin", add border 15981 if ( box !== "padding" ) { 15982 delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 15983 15984 // But still keep track of it otherwise 15985 } else { 15986 extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 15987 } 15988 15989 // If we get here with a border-box (content + padding + border), we're seeking "content" or 15990 // "padding" or "margin" 15991 } else { 15992 15993 // For "content", subtract padding 15994 if ( box === "content" ) { 15995 delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); 15996 } 15997 15998 // For "content" or "padding", subtract border 15999 if ( box !== "margin" ) { 16000 delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); 16001 } 16002 } 16003 } 16004 16005 // Account for positive content-box scroll gutter when requested by providing computedVal 16006 if ( !isBorderBox && computedVal >= 0 ) { 16007 16008 // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border 16009 // Assuming integer scroll gutter, subtract the rest and round down 16010 delta += Math.max( 0, Math.ceil( 16011 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - 16012 computedVal - 16013 delta - 16014 extra - 16015 0.5 16016 16017 // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter 16018 // Use an explicit zero to avoid NaN (gh-3964) 16019 ) ) || 0; 16020 } 16021 16022 return delta; 16023} 16024 16025function getWidthOrHeight( elem, dimension, extra ) { 16026 16027 // Start with computed style 16028 var styles = getStyles( elem ), 16029 16030 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). 16031 // Fake content-box until we know it's needed to know the true value. 16032 boxSizingNeeded = !support.boxSizingReliable() || extra, 16033 isBorderBox = boxSizingNeeded && 16034 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 16035 valueIsBorderBox = isBorderBox, 16036 16037 val = curCSS( elem, dimension, styles ), 16038 offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); 16039 16040 // Support: Firefox <=54 16041 // Return a confounding non-pixel value or feign ignorance, as appropriate. 16042 if ( rnumnonpx.test( val ) ) { 16043 if ( !extra ) { 16044 return val; 16045 } 16046 val = "auto"; 16047 } 16048 16049 16050 // Support: IE 9 - 11 only 16051 // Use offsetWidth/offsetHeight for when box sizing is unreliable. 16052 // In those cases, the computed value can be trusted to be border-box. 16053 if ( ( !support.boxSizingReliable() && isBorderBox || 16054 16055 // Support: IE 10 - 11+, Edge 15 - 18+ 16056 // IE/Edge misreport `getComputedStyle` of table rows with width/height 16057 // set in CSS while `offset*` properties report correct values. 16058 // Interestingly, in some cases IE 9 doesn't suffer from this issue. 16059 !support.reliableTrDimensions() && nodeName( elem, "tr" ) || 16060 16061 // Fall back to offsetWidth/offsetHeight when value is "auto" 16062 // This happens for inline elements with no explicit setting (gh-3571) 16063 val === "auto" || 16064 16065 // Support: Android <=4.1 - 4.3 only 16066 // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) 16067 !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && 16068 16069 // Make sure the element is visible & connected 16070 elem.getClientRects().length ) { 16071 16072 isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; 16073 16074 // Where available, offsetWidth/offsetHeight approximate border box dimensions. 16075 // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the 16076 // retrieved value as a content box dimension. 16077 valueIsBorderBox = offsetProp in elem; 16078 if ( valueIsBorderBox ) { 16079 val = elem[ offsetProp ]; 16080 } 16081 } 16082 16083 // Normalize "" and auto 16084 val = parseFloat( val ) || 0; 16085 16086 // Adjust for the element's box model 16087 return ( val + 16088 boxModelAdjustment( 16089 elem, 16090 dimension, 16091 extra || ( isBorderBox ? "border" : "content" ), 16092 valueIsBorderBox, 16093 styles, 16094 16095 // Provide the current computed size to request scroll gutter calculation (gh-3589) 16096 val 16097 ) 16098 ) + "px"; 16099} 16100 16101jQuery.extend( { 16102 16103 // Add in style property hooks for overriding the default 16104 // behavior of getting and setting a style property 16105 cssHooks: { 16106 opacity: { 16107 get: function( elem, computed ) { 16108 if ( computed ) { 16109 16110 // We should always get a number back from opacity 16111 var ret = curCSS( elem, "opacity" ); 16112 return ret === "" ? "1" : ret; 16113 } 16114 } 16115 } 16116 }, 16117 16118 // Don't automatically add "px" to these possibly-unitless properties 16119 cssNumber: { 16120 "animationIterationCount": true, 16121 "columnCount": true, 16122 "fillOpacity": true, 16123 "flexGrow": true, 16124 "flexShrink": true, 16125 "fontWeight": true, 16126 "gridArea": true, 16127 "gridColumn": true, 16128 "gridColumnEnd": true, 16129 "gridColumnStart": true, 16130 "gridRow": true, 16131 "gridRowEnd": true, 16132 "gridRowStart": true, 16133 "lineHeight": true, 16134 "opacity": true, 16135 "order": true, 16136 "orphans": true, 16137 "widows": true, 16138 "zIndex": true, 16139 "zoom": true 16140 }, 16141 16142 // Add in properties whose names you wish to fix before 16143 // setting or getting the value 16144 cssProps: {}, 16145 16146 // Get and set the style property on a DOM Node 16147 style: function( elem, name, value, extra ) { 16148 16149 // Don't set styles on text and comment nodes 16150 if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { 16151 return; 16152 } 16153 16154 // Make sure that we're working with the right name 16155 var ret, type, hooks, 16156 origName = camelCase( name ), 16157 isCustomProp = rcustomProp.test( name ), 16158 style = elem.style; 16159 16160 // Make sure that we're working with the right name. We don't 16161 // want to query the value if it is a CSS custom property 16162 // since they are user-defined. 16163 if ( !isCustomProp ) { 16164 name = finalPropName( origName ); 16165 } 16166 16167 // Gets hook for the prefixed version, then unprefixed version 16168 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 16169 16170 // Check if we're setting a value 16171 if ( value !== undefined ) { 16172 type = typeof value; 16173 16174 // Convert "+=" or "-=" to relative numbers (#7345) 16175 if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { 16176 value = adjustCSS( elem, name, ret ); 16177 16178 // Fixes bug #9237 16179 type = "number"; 16180 } 16181 16182 // Make sure that null and NaN values aren't set (#7116) 16183 if ( value == null || value !== value ) { 16184 return; 16185 } 16186 16187 // If a number was passed in, add the unit (except for certain CSS properties) 16188 // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append 16189 // "px" to a few hardcoded values. 16190 if ( type === "number" && !isCustomProp ) { 16191 value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); 16192 } 16193 16194 // background-* props affect original clone's values 16195 if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { 16196 style[ name ] = "inherit"; 16197 } 16198 16199 // If a hook was provided, use that value, otherwise just set the specified value 16200 if ( !hooks || !( "set" in hooks ) || 16201 ( value = hooks.set( elem, value, extra ) ) !== undefined ) { 16202 16203 if ( isCustomProp ) { 16204 style.setProperty( name, value ); 16205 } else { 16206 style[ name ] = value; 16207 } 16208 } 16209 16210 } else { 16211 16212 // If a hook was provided get the non-computed value from there 16213 if ( hooks && "get" in hooks && 16214 ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { 16215 16216 return ret; 16217 } 16218 16219 // Otherwise just get the value from the style object 16220 return style[ name ]; 16221 } 16222 }, 16223 16224 css: function( elem, name, extra, styles ) { 16225 var val, num, hooks, 16226 origName = camelCase( name ), 16227 isCustomProp = rcustomProp.test( name ); 16228 16229 // Make sure that we're working with the right name. We don't 16230 // want to modify the value if it is a CSS custom property 16231 // since they are user-defined. 16232 if ( !isCustomProp ) { 16233 name = finalPropName( origName ); 16234 } 16235 16236 // Try prefixed name followed by the unprefixed name 16237 hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; 16238 16239 // If a hook was provided get the computed value from there 16240 if ( hooks && "get" in hooks ) { 16241 val = hooks.get( elem, true, extra ); 16242 } 16243 16244 // Otherwise, if a way to get the computed value exists, use that 16245 if ( val === undefined ) { 16246 val = curCSS( elem, name, styles ); 16247 } 16248 16249 // Convert "normal" to computed value 16250 if ( val === "normal" && name in cssNormalTransform ) { 16251 val = cssNormalTransform[ name ]; 16252 } 16253 16254 // Make numeric if forced or a qualifier was provided and val looks numeric 16255 if ( extra === "" || extra ) { 16256 num = parseFloat( val ); 16257 return extra === true || isFinite( num ) ? num || 0 : val; 16258 } 16259 16260 return val; 16261 } 16262} ); 16263 16264jQuery.each( [ "height", "width" ], function( _i, dimension ) { 16265 jQuery.cssHooks[ dimension ] = { 16266 get: function( elem, computed, extra ) { 16267 if ( computed ) { 16268 16269 // Certain elements can have dimension info if we invisibly show them 16270 // but it must have a current display style that would benefit 16271 return rdisplayswap.test( jQuery.css( elem, "display" ) ) && 16272 16273 // Support: Safari 8+ 16274 // Table columns in Safari have non-zero offsetWidth & zero 16275 // getBoundingClientRect().width unless display is changed. 16276 // Support: IE <=11 only 16277 // Running getBoundingClientRect on a disconnected node 16278 // in IE throws an error. 16279 ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? 16280 swap( elem, cssShow, function() { 16281 return getWidthOrHeight( elem, dimension, extra ); 16282 } ) : 16283 getWidthOrHeight( elem, dimension, extra ); 16284 } 16285 }, 16286 16287 set: function( elem, value, extra ) { 16288 var matches, 16289 styles = getStyles( elem ), 16290 16291 // Only read styles.position if the test has a chance to fail 16292 // to avoid forcing a reflow. 16293 scrollboxSizeBuggy = !support.scrollboxSize() && 16294 styles.position === "absolute", 16295 16296 // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) 16297 boxSizingNeeded = scrollboxSizeBuggy || extra, 16298 isBorderBox = boxSizingNeeded && 16299 jQuery.css( elem, "boxSizing", false, styles ) === "border-box", 16300 subtract = extra ? 16301 boxModelAdjustment( 16302 elem, 16303 dimension, 16304 extra, 16305 isBorderBox, 16306 styles 16307 ) : 16308 0; 16309 16310 // Account for unreliable border-box dimensions by comparing offset* to computed and 16311 // faking a content-box to get border and padding (gh-3699) 16312 if ( isBorderBox && scrollboxSizeBuggy ) { 16313 subtract -= Math.ceil( 16314 elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - 16315 parseFloat( styles[ dimension ] ) - 16316 boxModelAdjustment( elem, dimension, "border", false, styles ) - 16317 0.5 16318 ); 16319 } 16320 16321 // Convert to pixels if value adjustment is needed 16322 if ( subtract && ( matches = rcssNum.exec( value ) ) && 16323 ( matches[ 3 ] || "px" ) !== "px" ) { 16324 16325 elem.style[ dimension ] = value; 16326 value = jQuery.css( elem, dimension ); 16327 } 16328 16329 return setPositiveNumber( elem, value, subtract ); 16330 } 16331 }; 16332} ); 16333 16334jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, 16335 function( elem, computed ) { 16336 if ( computed ) { 16337 return ( parseFloat( curCSS( elem, "marginLeft" ) ) || 16338 elem.getBoundingClientRect().left - 16339 swap( elem, { marginLeft: 0 }, function() { 16340 return elem.getBoundingClientRect().left; 16341 } ) 16342 ) + "px"; 16343 } 16344 } 16345); 16346 16347// These hooks are used by animate to expand properties 16348jQuery.each( { 16349 margin: "", 16350 padding: "", 16351 border: "Width" 16352}, function( prefix, suffix ) { 16353 jQuery.cssHooks[ prefix + suffix ] = { 16354 expand: function( value ) { 16355 var i = 0, 16356 expanded = {}, 16357 16358 // Assumes a single number if not a string 16359 parts = typeof value === "string" ? value.split( " " ) : [ value ]; 16360 16361 for ( ; i < 4; i++ ) { 16362 expanded[ prefix + cssExpand[ i ] + suffix ] = 16363 parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; 16364 } 16365 16366 return expanded; 16367 } 16368 }; 16369 16370 if ( prefix !== "margin" ) { 16371 jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; 16372 } 16373} ); 16374 16375jQuery.fn.extend( { 16376 css: function( name, value ) { 16377 return access( this, function( elem, name, value ) { 16378 var styles, len, 16379 map = {}, 16380 i = 0; 16381 16382 if ( Array.isArray( name ) ) { 16383 styles = getStyles( elem ); 16384 len = name.length; 16385 16386 for ( ; i < len; i++ ) { 16387 map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); 16388 } 16389 16390 return map; 16391 } 16392 16393 return value !== undefined ? 16394 jQuery.style( elem, name, value ) : 16395 jQuery.css( elem, name ); 16396 }, name, value, arguments.length > 1 ); 16397 } 16398} ); 16399 16400 16401function Tween( elem, options, prop, end, easing ) { 16402 return new Tween.prototype.init( elem, options, prop, end, easing ); 16403} 16404jQuery.Tween = Tween; 16405 16406Tween.prototype = { 16407 constructor: Tween, 16408 init: function( elem, options, prop, end, easing, unit ) { 16409 this.elem = elem; 16410 this.prop = prop; 16411 this.easing = easing || jQuery.easing._default; 16412 this.options = options; 16413 this.start = this.now = this.cur(); 16414 this.end = end; 16415 this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); 16416 }, 16417 cur: function() { 16418 var hooks = Tween.propHooks[ this.prop ]; 16419 16420 return hooks && hooks.get ? 16421 hooks.get( this ) : 16422 Tween.propHooks._default.get( this ); 16423 }, 16424 run: function( percent ) { 16425 var eased, 16426 hooks = Tween.propHooks[ this.prop ]; 16427 16428 if ( this.options.duration ) { 16429 this.pos = eased = jQuery.easing[ this.easing ]( 16430 percent, this.options.duration * percent, 0, 1, this.options.duration 16431 ); 16432 } else { 16433 this.pos = eased = percent; 16434 } 16435 this.now = ( this.end - this.start ) * eased + this.start; 16436 16437 if ( this.options.step ) { 16438 this.options.step.call( this.elem, this.now, this ); 16439 } 16440 16441 if ( hooks && hooks.set ) { 16442 hooks.set( this ); 16443 } else { 16444 Tween.propHooks._default.set( this ); 16445 } 16446 return this; 16447 } 16448}; 16449 16450Tween.prototype.init.prototype = Tween.prototype; 16451 16452Tween.propHooks = { 16453 _default: { 16454 get: function( tween ) { 16455 var result; 16456 16457 // Use a property on the element directly when it is not a DOM element, 16458 // or when there is no matching style property that exists. 16459 if ( tween.elem.nodeType !== 1 || 16460 tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { 16461 return tween.elem[ tween.prop ]; 16462 } 16463 16464 // Passing an empty string as a 3rd parameter to .css will automatically 16465 // attempt a parseFloat and fallback to a string if the parse fails. 16466 // Simple values such as "10px" are parsed to Float; 16467 // complex values such as "rotate(1rad)" are returned as-is. 16468 result = jQuery.css( tween.elem, tween.prop, "" ); 16469 16470 // Empty strings, null, undefined and "auto" are converted to 0. 16471 return !result || result === "auto" ? 0 : result; 16472 }, 16473 set: function( tween ) { 16474 16475 // Use step hook for back compat. 16476 // Use cssHook if its there. 16477 // Use .style if available and use plain properties where available. 16478 if ( jQuery.fx.step[ tween.prop ] ) { 16479 jQuery.fx.step[ tween.prop ]( tween ); 16480 } else if ( tween.elem.nodeType === 1 && ( 16481 jQuery.cssHooks[ tween.prop ] || 16482 tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { 16483 jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); 16484 } else { 16485 tween.elem[ tween.prop ] = tween.now; 16486 } 16487 } 16488 } 16489}; 16490 16491// Support: IE <=9 only 16492// Panic based approach to setting things on disconnected nodes 16493Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { 16494 set: function( tween ) { 16495 if ( tween.elem.nodeType && tween.elem.parentNode ) { 16496 tween.elem[ tween.prop ] = tween.now; 16497 } 16498 } 16499}; 16500 16501jQuery.easing = { 16502 linear: function( p ) { 16503 return p; 16504 }, 16505 swing: function( p ) { 16506 return 0.5 - Math.cos( p * Math.PI ) / 2; 16507 }, 16508 _default: "swing" 16509}; 16510 16511jQuery.fx = Tween.prototype.init; 16512 16513// Back compat <1.8 extension point 16514jQuery.fx.step = {}; 16515 16516 16517 16518 16519var 16520 fxNow, inProgress, 16521 rfxtypes = /^(?:toggle|show|hide)$/, 16522 rrun = /queueHooks$/; 16523 16524function schedule() { 16525 if ( inProgress ) { 16526 if ( document.hidden === false && window.requestAnimationFrame ) { 16527 window.requestAnimationFrame( schedule ); 16528 } else { 16529 window.setTimeout( schedule, jQuery.fx.interval ); 16530 } 16531 16532 jQuery.fx.tick(); 16533 } 16534} 16535 16536// Animations created synchronously will run synchronously 16537function createFxNow() { 16538 window.setTimeout( function() { 16539 fxNow = undefined; 16540 } ); 16541 return ( fxNow = Date.now() ); 16542} 16543 16544// Generate parameters to create a standard animation 16545function genFx( type, includeWidth ) { 16546 var which, 16547 i = 0, 16548 attrs = { height: type }; 16549 16550 // If we include width, step value is 1 to do all cssExpand values, 16551 // otherwise step value is 2 to skip over Left and Right 16552 includeWidth = includeWidth ? 1 : 0; 16553 for ( ; i < 4; i += 2 - includeWidth ) { 16554 which = cssExpand[ i ]; 16555 attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; 16556 } 16557 16558 if ( includeWidth ) { 16559 attrs.opacity = attrs.width = type; 16560 } 16561 16562 return attrs; 16563} 16564 16565function createTween( value, prop, animation ) { 16566 var tween, 16567 collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), 16568 index = 0, 16569 length = collection.length; 16570 for ( ; index < length; index++ ) { 16571 if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { 16572 16573 // We're done with this property 16574 return tween; 16575 } 16576 } 16577} 16578 16579function defaultPrefilter( elem, props, opts ) { 16580 var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, 16581 isBox = "width" in props || "height" in props, 16582 anim = this, 16583 orig = {}, 16584 style = elem.style, 16585 hidden = elem.nodeType && isHiddenWithinTree( elem ), 16586 dataShow = dataPriv.get( elem, "fxshow" ); 16587 16588 // Queue-skipping animations hijack the fx hooks 16589 if ( !opts.queue ) { 16590 hooks = jQuery._queueHooks( elem, "fx" ); 16591 if ( hooks.unqueued == null ) { 16592 hooks.unqueued = 0; 16593 oldfire = hooks.empty.fire; 16594 hooks.empty.fire = function() { 16595 if ( !hooks.unqueued ) { 16596 oldfire(); 16597 } 16598 }; 16599 } 16600 hooks.unqueued++; 16601 16602 anim.always( function() { 16603 16604 // Ensure the complete handler is called before this completes 16605 anim.always( function() { 16606 hooks.unqueued--; 16607 if ( !jQuery.queue( elem, "fx" ).length ) { 16608 hooks.empty.fire(); 16609 } 16610 } ); 16611 } ); 16612 } 16613 16614 // Detect show/hide animations 16615 for ( prop in props ) { 16616 value = props[ prop ]; 16617 if ( rfxtypes.test( value ) ) { 16618 delete props[ prop ]; 16619 toggle = toggle || value === "toggle"; 16620 if ( value === ( hidden ? "hide" : "show" ) ) { 16621 16622 // Pretend to be hidden if this is a "show" and 16623 // there is still data from a stopped show/hide 16624 if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { 16625 hidden = true; 16626 16627 // Ignore all other no-op show/hide data 16628 } else { 16629 continue; 16630 } 16631 } 16632 orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); 16633 } 16634 } 16635 16636 // Bail out if this is a no-op like .hide().hide() 16637 propTween = !jQuery.isEmptyObject( props ); 16638 if ( !propTween && jQuery.isEmptyObject( orig ) ) { 16639 return; 16640 } 16641 16642 // Restrict "overflow" and "display" styles during box animations 16643 if ( isBox && elem.nodeType === 1 ) { 16644 16645 // Support: IE <=9 - 11, Edge 12 - 15 16646 // Record all 3 overflow attributes because IE does not infer the shorthand 16647 // from identically-valued overflowX and overflowY and Edge just mirrors 16648 // the overflowX value there. 16649 opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; 16650 16651 // Identify a display type, preferring old show/hide data over the CSS cascade 16652 restoreDisplay = dataShow && dataShow.display; 16653 if ( restoreDisplay == null ) { 16654 restoreDisplay = dataPriv.get( elem, "display" ); 16655 } 16656 display = jQuery.css( elem, "display" ); 16657 if ( display === "none" ) { 16658 if ( restoreDisplay ) { 16659 display = restoreDisplay; 16660 } else { 16661 16662 // Get nonempty value(s) by temporarily forcing visibility 16663 showHide( [ elem ], true ); 16664 restoreDisplay = elem.style.display || restoreDisplay; 16665 display = jQuery.css( elem, "display" ); 16666 showHide( [ elem ] ); 16667 } 16668 } 16669 16670 // Animate inline elements as inline-block 16671 if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { 16672 if ( jQuery.css( elem, "float" ) === "none" ) { 16673 16674 // Restore the original display value at the end of pure show/hide animations 16675 if ( !propTween ) { 16676 anim.done( function() { 16677 style.display = restoreDisplay; 16678 } ); 16679 if ( restoreDisplay == null ) { 16680 display = style.display; 16681 restoreDisplay = display === "none" ? "" : display; 16682 } 16683 } 16684 style.display = "inline-block"; 16685 } 16686 } 16687 } 16688 16689 if ( opts.overflow ) { 16690 style.overflow = "hidden"; 16691 anim.always( function() { 16692 style.overflow = opts.overflow[ 0 ]; 16693 style.overflowX = opts.overflow[ 1 ]; 16694 style.overflowY = opts.overflow[ 2 ]; 16695 } ); 16696 } 16697 16698 // Implement show/hide animations 16699 propTween = false; 16700 for ( prop in orig ) { 16701 16702 // General show/hide setup for this element animation 16703 if ( !propTween ) { 16704 if ( dataShow ) { 16705 if ( "hidden" in dataShow ) { 16706 hidden = dataShow.hidden; 16707 } 16708 } else { 16709 dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); 16710 } 16711 16712 // Store hidden/visible for toggle so `.stop().toggle()` "reverses" 16713 if ( toggle ) { 16714 dataShow.hidden = !hidden; 16715 } 16716 16717 // Show elements before animating them 16718 if ( hidden ) { 16719 showHide( [ elem ], true ); 16720 } 16721 16722 /* eslint-disable no-loop-func */ 16723 16724 anim.done( function() { 16725 16726 /* eslint-enable no-loop-func */ 16727 16728 // The final step of a "hide" animation is actually hiding the element 16729 if ( !hidden ) { 16730 showHide( [ elem ] ); 16731 } 16732 dataPriv.remove( elem, "fxshow" ); 16733 for ( prop in orig ) { 16734 jQuery.style( elem, prop, orig[ prop ] ); 16735 } 16736 } ); 16737 } 16738 16739 // Per-property setup 16740 propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); 16741 if ( !( prop in dataShow ) ) { 16742 dataShow[ prop ] = propTween.start; 16743 if ( hidden ) { 16744 propTween.end = propTween.start; 16745 propTween.start = 0; 16746 } 16747 } 16748 } 16749} 16750 16751function propFilter( props, specialEasing ) { 16752 var index, name, easing, value, hooks; 16753 16754 // camelCase, specialEasing and expand cssHook pass 16755 for ( index in props ) { 16756 name = camelCase( index ); 16757 easing = specialEasing[ name ]; 16758 value = props[ index ]; 16759 if ( Array.isArray( value ) ) { 16760 easing = value[ 1 ]; 16761 value = props[ index ] = value[ 0 ]; 16762 } 16763 16764 if ( index !== name ) { 16765 props[ name ] = value; 16766 delete props[ index ]; 16767 } 16768 16769 hooks = jQuery.cssHooks[ name ]; 16770 if ( hooks && "expand" in hooks ) { 16771 value = hooks.expand( value ); 16772 delete props[ name ]; 16773 16774 // Not quite $.extend, this won't overwrite existing keys. 16775 // Reusing 'index' because we have the correct "name" 16776 for ( index in value ) { 16777 if ( !( index in props ) ) { 16778 props[ index ] = value[ index ]; 16779 specialEasing[ index ] = easing; 16780 } 16781 } 16782 } else { 16783 specialEasing[ name ] = easing; 16784 } 16785 } 16786} 16787 16788function Animation( elem, properties, options ) { 16789 var result, 16790 stopped, 16791 index = 0, 16792 length = Animation.prefilters.length, 16793 deferred = jQuery.Deferred().always( function() { 16794 16795 // Don't match elem in the :animated selector 16796 delete tick.elem; 16797 } ), 16798 tick = function() { 16799 if ( stopped ) { 16800 return false; 16801 } 16802 var currentTime = fxNow || createFxNow(), 16803 remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), 16804 16805 // Support: Android 2.3 only 16806 // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (#12497) 16807 temp = remaining / animation.duration || 0, 16808 percent = 1 - temp, 16809 index = 0, 16810 length = animation.tweens.length; 16811 16812 for ( ; index < length; index++ ) { 16813 animation.tweens[ index ].run( percent ); 16814 } 16815 16816 deferred.notifyWith( elem, [ animation, percent, remaining ] ); 16817 16818 // If there's more to do, yield 16819 if ( percent < 1 && length ) { 16820 return remaining; 16821 } 16822 16823 // If this was an empty animation, synthesize a final progress notification 16824 if ( !length ) { 16825 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 16826 } 16827 16828 // Resolve the animation and report its conclusion 16829 deferred.resolveWith( elem, [ animation ] ); 16830 return false; 16831 }, 16832 animation = deferred.promise( { 16833 elem: elem, 16834 props: jQuery.extend( {}, properties ), 16835 opts: jQuery.extend( true, { 16836 specialEasing: {}, 16837 easing: jQuery.easing._default 16838 }, options ), 16839 originalProperties: properties, 16840 originalOptions: options, 16841 startTime: fxNow || createFxNow(), 16842 duration: options.duration, 16843 tweens: [], 16844 createTween: function( prop, end ) { 16845 var tween = jQuery.Tween( elem, animation.opts, prop, end, 16846 animation.opts.specialEasing[ prop ] || animation.opts.easing ); 16847 animation.tweens.push( tween ); 16848 return tween; 16849 }, 16850 stop: function( gotoEnd ) { 16851 var index = 0, 16852 16853 // If we are going to the end, we want to run all the tweens 16854 // otherwise we skip this part 16855 length = gotoEnd ? animation.tweens.length : 0; 16856 if ( stopped ) { 16857 return this; 16858 } 16859 stopped = true; 16860 for ( ; index < length; index++ ) { 16861 animation.tweens[ index ].run( 1 ); 16862 } 16863 16864 // Resolve when we played the last frame; otherwise, reject 16865 if ( gotoEnd ) { 16866 deferred.notifyWith( elem, [ animation, 1, 0 ] ); 16867 deferred.resolveWith( elem, [ animation, gotoEnd ] ); 16868 } else { 16869 deferred.rejectWith( elem, [ animation, gotoEnd ] ); 16870 } 16871 return this; 16872 } 16873 } ), 16874 props = animation.props; 16875 16876 propFilter( props, animation.opts.specialEasing ); 16877 16878 for ( ; index < length; index++ ) { 16879 result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); 16880 if ( result ) { 16881 if ( isFunction( result.stop ) ) { 16882 jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = 16883 result.stop.bind( result ); 16884 } 16885 return result; 16886 } 16887 } 16888 16889 jQuery.map( props, createTween, animation ); 16890 16891 if ( isFunction( animation.opts.start ) ) { 16892 animation.opts.start.call( elem, animation ); 16893 } 16894 16895 // Attach callbacks from options 16896 animation 16897 .progress( animation.opts.progress ) 16898 .done( animation.opts.done, animation.opts.complete ) 16899 .fail( animation.opts.fail ) 16900 .always( animation.opts.always ); 16901 16902 jQuery.fx.timer( 16903 jQuery.extend( tick, { 16904 elem: elem, 16905 anim: animation, 16906 queue: animation.opts.queue 16907 } ) 16908 ); 16909 16910 return animation; 16911} 16912 16913jQuery.Animation = jQuery.extend( Animation, { 16914 16915 tweeners: { 16916 "*": [ function( prop, value ) { 16917 var tween = this.createTween( prop, value ); 16918 adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); 16919 return tween; 16920 } ] 16921 }, 16922 16923 tweener: function( props, callback ) { 16924 if ( isFunction( props ) ) { 16925 callback = props; 16926 props = [ "*" ]; 16927 } else { 16928 props = props.match( rnothtmlwhite ); 16929 } 16930 16931 var prop, 16932 index = 0, 16933 length = props.length; 16934 16935 for ( ; index < length; index++ ) { 16936 prop = props[ index ]; 16937 Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; 16938 Animation.tweeners[ prop ].unshift( callback ); 16939 } 16940 }, 16941 16942 prefilters: [ defaultPrefilter ], 16943 16944 prefilter: function( callback, prepend ) { 16945 if ( prepend ) { 16946 Animation.prefilters.unshift( callback ); 16947 } else { 16948 Animation.prefilters.push( callback ); 16949 } 16950 } 16951} ); 16952 16953jQuery.speed = function( speed, easing, fn ) { 16954 var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { 16955 complete: fn || !fn && easing || 16956 isFunction( speed ) && speed, 16957 duration: speed, 16958 easing: fn && easing || easing && !isFunction( easing ) && easing 16959 }; 16960 16961 // Go to the end state if fx are off 16962 if ( jQuery.fx.off ) { 16963 opt.duration = 0; 16964 16965 } else { 16966 if ( typeof opt.duration !== "number" ) { 16967 if ( opt.duration in jQuery.fx.speeds ) { 16968 opt.duration = jQuery.fx.speeds[ opt.duration ]; 16969 16970 } else { 16971 opt.duration = jQuery.fx.speeds._default; 16972 } 16973 } 16974 } 16975 16976 // Normalize opt.queue - true/undefined/null -> "fx" 16977 if ( opt.queue == null || opt.queue === true ) { 16978 opt.queue = "fx"; 16979 } 16980 16981 // Queueing 16982 opt.old = opt.complete; 16983 16984 opt.complete = function() { 16985 if ( isFunction( opt.old ) ) { 16986 opt.old.call( this ); 16987 } 16988 16989 if ( opt.queue ) { 16990 jQuery.dequeue( this, opt.queue ); 16991 } 16992 }; 16993 16994 return opt; 16995}; 16996 16997jQuery.fn.extend( { 16998 fadeTo: function( speed, to, easing, callback ) { 16999 17000 // Show any hidden elements after setting opacity to 0 17001 return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() 17002 17003 // Animate to the value specified 17004 .end().animate( { opacity: to }, speed, easing, callback ); 17005 }, 17006 animate: function( prop, speed, easing, callback ) { 17007 var empty = jQuery.isEmptyObject( prop ), 17008 optall = jQuery.speed( speed, easing, callback ), 17009 doAnimation = function() { 17010 17011 // Operate on a copy of prop so per-property easing won't be lost 17012 var anim = Animation( this, jQuery.extend( {}, prop ), optall ); 17013 17014 // Empty animations, or finishing resolves immediately 17015 if ( empty || dataPriv.get( this, "finish" ) ) { 17016 anim.stop( true ); 17017 } 17018 }; 17019 17020 doAnimation.finish = doAnimation; 17021 17022 return empty || optall.queue === false ? 17023 this.each( doAnimation ) : 17024 this.queue( optall.queue, doAnimation ); 17025 }, 17026 stop: function( type, clearQueue, gotoEnd ) { 17027 var stopQueue = function( hooks ) { 17028 var stop = hooks.stop; 17029 delete hooks.stop; 17030 stop( gotoEnd ); 17031 }; 17032 17033 if ( typeof type !== "string" ) { 17034 gotoEnd = clearQueue; 17035 clearQueue = type; 17036 type = undefined; 17037 } 17038 if ( clearQueue ) { 17039 this.queue( type || "fx", [] ); 17040 } 17041 17042 return this.each( function() { 17043 var dequeue = true, 17044 index = type != null && type + "queueHooks", 17045 timers = jQuery.timers, 17046 data = dataPriv.get( this ); 17047 17048 if ( index ) { 17049 if ( data[ index ] && data[ index ].stop ) { 17050 stopQueue( data[ index ] ); 17051 } 17052 } else { 17053 for ( index in data ) { 17054 if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { 17055 stopQueue( data[ index ] ); 17056 } 17057 } 17058 } 17059 17060 for ( index = timers.length; index--; ) { 17061 if ( timers[ index ].elem === this && 17062 ( type == null || timers[ index ].queue === type ) ) { 17063 17064 timers[ index ].anim.stop( gotoEnd ); 17065 dequeue = false; 17066 timers.splice( index, 1 ); 17067 } 17068 } 17069 17070 // Start the next in the queue if the last step wasn't forced. 17071 // Timers currently will call their complete callbacks, which 17072 // will dequeue but only if they were gotoEnd. 17073 if ( dequeue || !gotoEnd ) { 17074 jQuery.dequeue( this, type ); 17075 } 17076 } ); 17077 }, 17078 finish: function( type ) { 17079 if ( type !== false ) { 17080 type = type || "fx"; 17081 } 17082 return this.each( function() { 17083 var index, 17084 data = dataPriv.get( this ), 17085 queue = data[ type + "queue" ], 17086 hooks = data[ type + "queueHooks" ], 17087 timers = jQuery.timers, 17088 length = queue ? queue.length : 0; 17089 17090 // Enable finishing flag on private data 17091 data.finish = true; 17092 17093 // Empty the queue first 17094 jQuery.queue( this, type, [] ); 17095 17096 if ( hooks && hooks.stop ) { 17097 hooks.stop.call( this, true ); 17098 } 17099 17100 // Look for any active animations, and finish them 17101 for ( index = timers.length; index--; ) { 17102 if ( timers[ index ].elem === this && timers[ index ].queue === type ) { 17103 timers[ index ].anim.stop( true ); 17104 timers.splice( index, 1 ); 17105 } 17106 } 17107 17108 // Look for any animations in the old queue and finish them 17109 for ( index = 0; index < length; index++ ) { 17110 if ( queue[ index ] && queue[ index ].finish ) { 17111 queue[ index ].finish.call( this ); 17112 } 17113 } 17114 17115 // Turn off finishing flag 17116 delete data.finish; 17117 } ); 17118 } 17119} ); 17120 17121jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { 17122 var cssFn = jQuery.fn[ name ]; 17123 jQuery.fn[ name ] = function( speed, easing, callback ) { 17124 return speed == null || typeof speed === "boolean" ? 17125 cssFn.apply( this, arguments ) : 17126 this.animate( genFx( name, true ), speed, easing, callback ); 17127 }; 17128} ); 17129 17130// Generate shortcuts for custom animations 17131jQuery.each( { 17132 slideDown: genFx( "show" ), 17133 slideUp: genFx( "hide" ), 17134 slideToggle: genFx( "toggle" ), 17135 fadeIn: { opacity: "show" }, 17136 fadeOut: { opacity: "hide" }, 17137 fadeToggle: { opacity: "toggle" } 17138}, function( name, props ) { 17139 jQuery.fn[ name ] = function( speed, easing, callback ) { 17140 return this.animate( props, speed, easing, callback ); 17141 }; 17142} ); 17143 17144jQuery.timers = []; 17145jQuery.fx.tick = function() { 17146 var timer, 17147 i = 0, 17148 timers = jQuery.timers; 17149 17150 fxNow = Date.now(); 17151 17152 for ( ; i < timers.length; i++ ) { 17153 timer = timers[ i ]; 17154 17155 // Run the timer and safely remove it when done (allowing for external removal) 17156 if ( !timer() && timers[ i ] === timer ) { 17157 timers.splice( i--, 1 ); 17158 } 17159 } 17160 17161 if ( !timers.length ) { 17162 jQuery.fx.stop(); 17163 } 17164 fxNow = undefined; 17165}; 17166 17167jQuery.fx.timer = function( timer ) { 17168 jQuery.timers.push( timer ); 17169 jQuery.fx.start(); 17170}; 17171 17172jQuery.fx.interval = 13; 17173jQuery.fx.start = function() { 17174 if ( inProgress ) { 17175 return; 17176 } 17177 17178 inProgress = true; 17179 schedule(); 17180}; 17181 17182jQuery.fx.stop = function() { 17183 inProgress = null; 17184}; 17185 17186jQuery.fx.speeds = { 17187 slow: 600, 17188 fast: 200, 17189 17190 // Default speed 17191 _default: 400 17192}; 17193 17194 17195// Based off of the plugin by Clint Helfers, with permission. 17196// https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ 17197jQuery.fn.delay = function( time, type ) { 17198 time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 17199 type = type || "fx"; 17200 17201 return this.queue( type, function( next, hooks ) { 17202 var timeout = window.setTimeout( next, time ); 17203 hooks.stop = function() { 17204 window.clearTimeout( timeout ); 17205 }; 17206 } ); 17207}; 17208 17209 17210( function() { 17211 var input = document.createElement( "input" ), 17212 select = document.createElement( "select" ), 17213 opt = select.appendChild( document.createElement( "option" ) ); 17214 17215 input.type = "checkbox"; 17216 17217 // Support: Android <=4.3 only 17218 // Default value for a checkbox should be "on" 17219 support.checkOn = input.value !== ""; 17220 17221 // Support: IE <=11 only 17222 // Must access selectedIndex to make default options select 17223 support.optSelected = opt.selected; 17224 17225 // Support: IE <=11 only 17226 // An input loses its value after becoming a radio 17227 input = document.createElement( "input" ); 17228 input.value = "t"; 17229 input.type = "radio"; 17230 support.radioValue = input.value === "t"; 17231} )(); 17232 17233 17234var boolHook, 17235 attrHandle = jQuery.expr.attrHandle; 17236 17237jQuery.fn.extend( { 17238 attr: function( name, value ) { 17239 return access( this, jQuery.attr, name, value, arguments.length > 1 ); 17240 }, 17241 17242 removeAttr: function( name ) { 17243 return this.each( function() { 17244 jQuery.removeAttr( this, name ); 17245 } ); 17246 } 17247} ); 17248 17249jQuery.extend( { 17250 attr: function( elem, name, value ) { 17251 var ret, hooks, 17252 nType = elem.nodeType; 17253 17254 // Don't get/set attributes on text, comment and attribute nodes 17255 if ( nType === 3 || nType === 8 || nType === 2 ) { 17256 return; 17257 } 17258 17259 // Fallback to prop when attributes are not supported 17260 if ( typeof elem.getAttribute === "undefined" ) { 17261 return jQuery.prop( elem, name, value ); 17262 } 17263 17264 // Attribute hooks are determined by the lowercase version 17265 // Grab necessary hook if one is defined 17266 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 17267 hooks = jQuery.attrHooks[ name.toLowerCase() ] || 17268 ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); 17269 } 17270 17271 if ( value !== undefined ) { 17272 if ( value === null ) { 17273 jQuery.removeAttr( elem, name ); 17274 return; 17275 } 17276 17277 if ( hooks && "set" in hooks && 17278 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 17279 return ret; 17280 } 17281 17282 elem.setAttribute( name, value + "" ); 17283 return value; 17284 } 17285 17286 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 17287 return ret; 17288 } 17289 17290 ret = jQuery.find.attr( elem, name ); 17291 17292 // Non-existent attributes return null, we normalize to undefined 17293 return ret == null ? undefined : ret; 17294 }, 17295 17296 attrHooks: { 17297 type: { 17298 set: function( elem, value ) { 17299 if ( !support.radioValue && value === "radio" && 17300 nodeName( elem, "input" ) ) { 17301 var val = elem.value; 17302 elem.setAttribute( "type", value ); 17303 if ( val ) { 17304 elem.value = val; 17305 } 17306 return value; 17307 } 17308 } 17309 } 17310 }, 17311 17312 removeAttr: function( elem, value ) { 17313 var name, 17314 i = 0, 17315 17316 // Attribute names can contain non-HTML whitespace characters 17317 // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 17318 attrNames = value && value.match( rnothtmlwhite ); 17319 17320 if ( attrNames && elem.nodeType === 1 ) { 17321 while ( ( name = attrNames[ i++ ] ) ) { 17322 elem.removeAttribute( name ); 17323 } 17324 } 17325 } 17326} ); 17327 17328// Hooks for boolean attributes 17329boolHook = { 17330 set: function( elem, value, name ) { 17331 if ( value === false ) { 17332 17333 // Remove boolean attributes when set to false 17334 jQuery.removeAttr( elem, name ); 17335 } else { 17336 elem.setAttribute( name, name ); 17337 } 17338 return name; 17339 } 17340}; 17341 17342jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { 17343 var getter = attrHandle[ name ] || jQuery.find.attr; 17344 17345 attrHandle[ name ] = function( elem, name, isXML ) { 17346 var ret, handle, 17347 lowercaseName = name.toLowerCase(); 17348 17349 if ( !isXML ) { 17350 17351 // Avoid an infinite loop by temporarily removing this function from the getter 17352 handle = attrHandle[ lowercaseName ]; 17353 attrHandle[ lowercaseName ] = ret; 17354 ret = getter( elem, name, isXML ) != null ? 17355 lowercaseName : 17356 null; 17357 attrHandle[ lowercaseName ] = handle; 17358 } 17359 return ret; 17360 }; 17361} ); 17362 17363 17364 17365 17366var rfocusable = /^(?:input|select|textarea|button)$/i, 17367 rclickable = /^(?:a|area)$/i; 17368 17369jQuery.fn.extend( { 17370 prop: function( name, value ) { 17371 return access( this, jQuery.prop, name, value, arguments.length > 1 ); 17372 }, 17373 17374 removeProp: function( name ) { 17375 return this.each( function() { 17376 delete this[ jQuery.propFix[ name ] || name ]; 17377 } ); 17378 } 17379} ); 17380 17381jQuery.extend( { 17382 prop: function( elem, name, value ) { 17383 var ret, hooks, 17384 nType = elem.nodeType; 17385 17386 // Don't get/set properties on text, comment and attribute nodes 17387 if ( nType === 3 || nType === 8 || nType === 2 ) { 17388 return; 17389 } 17390 17391 if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { 17392 17393 // Fix name and attach hooks 17394 name = jQuery.propFix[ name ] || name; 17395 hooks = jQuery.propHooks[ name ]; 17396 } 17397 17398 if ( value !== undefined ) { 17399 if ( hooks && "set" in hooks && 17400 ( ret = hooks.set( elem, value, name ) ) !== undefined ) { 17401 return ret; 17402 } 17403 17404 return ( elem[ name ] = value ); 17405 } 17406 17407 if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { 17408 return ret; 17409 } 17410 17411 return elem[ name ]; 17412 }, 17413 17414 propHooks: { 17415 tabIndex: { 17416 get: function( elem ) { 17417 17418 // Support: IE <=9 - 11 only 17419 // elem.tabIndex doesn't always return the 17420 // correct value when it hasn't been explicitly set 17421 // https://web.archive.org/web/20141116233347/http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ 17422 // Use proper attribute retrieval(#12072) 17423 var tabindex = jQuery.find.attr( elem, "tabindex" ); 17424 17425 if ( tabindex ) { 17426 return parseInt( tabindex, 10 ); 17427 } 17428 17429 if ( 17430 rfocusable.test( elem.nodeName ) || 17431 rclickable.test( elem.nodeName ) && 17432 elem.href 17433 ) { 17434 return 0; 17435 } 17436 17437 return -1; 17438 } 17439 } 17440 }, 17441 17442 propFix: { 17443 "for": "htmlFor", 17444 "class": "className" 17445 } 17446} ); 17447 17448// Support: IE <=11 only 17449// Accessing the selectedIndex property 17450// forces the browser to respect setting selected 17451// on the option 17452// The getter ensures a default option is selected 17453// when in an optgroup 17454// eslint rule "no-unused-expressions" is disabled for this code 17455// since it considers such accessions noop 17456if ( !support.optSelected ) { 17457 jQuery.propHooks.selected = { 17458 get: function( elem ) { 17459 17460 /* eslint no-unused-expressions: "off" */ 17461 17462 var parent = elem.parentNode; 17463 if ( parent && parent.parentNode ) { 17464 parent.parentNode.selectedIndex; 17465 } 17466 return null; 17467 }, 17468 set: function( elem ) { 17469 17470 /* eslint no-unused-expressions: "off" */ 17471 17472 var parent = elem.parentNode; 17473 if ( parent ) { 17474 parent.selectedIndex; 17475 17476 if ( parent.parentNode ) { 17477 parent.parentNode.selectedIndex; 17478 } 17479 } 17480 } 17481 }; 17482} 17483 17484jQuery.each( [ 17485 "tabIndex", 17486 "readOnly", 17487 "maxLength", 17488 "cellSpacing", 17489 "cellPadding", 17490 "rowSpan", 17491 "colSpan", 17492 "useMap", 17493 "frameBorder", 17494 "contentEditable" 17495], function() { 17496 jQuery.propFix[ this.toLowerCase() ] = this; 17497} ); 17498 17499 17500 17501 17502 // Strip and collapse whitespace according to HTML spec 17503 // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace 17504 function stripAndCollapse( value ) { 17505 var tokens = value.match( rnothtmlwhite ) || []; 17506 return tokens.join( " " ); 17507 } 17508 17509 17510function getClass( elem ) { 17511 return elem.getAttribute && elem.getAttribute( "class" ) || ""; 17512} 17513 17514function classesToArray( value ) { 17515 if ( Array.isArray( value ) ) { 17516 return value; 17517 } 17518 if ( typeof value === "string" ) { 17519 return value.match( rnothtmlwhite ) || []; 17520 } 17521 return []; 17522} 17523 17524jQuery.fn.extend( { 17525 addClass: function( value ) { 17526 var classes, elem, cur, curValue, clazz, j, finalValue, 17527 i = 0; 17528 17529 if ( isFunction( value ) ) { 17530 return this.each( function( j ) { 17531 jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); 17532 } ); 17533 } 17534 17535 classes = classesToArray( value ); 17536 17537 if ( classes.length ) { 17538 while ( ( elem = this[ i++ ] ) ) { 17539 curValue = getClass( elem ); 17540 cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 17541 17542 if ( cur ) { 17543 j = 0; 17544 while ( ( clazz = classes[ j++ ] ) ) { 17545 if ( cur.indexOf( " " + clazz + " " ) < 0 ) { 17546 cur += clazz + " "; 17547 } 17548 } 17549 17550 // Only assign if different to avoid unneeded rendering. 17551 finalValue = stripAndCollapse( cur ); 17552 if ( curValue !== finalValue ) { 17553 elem.setAttribute( "class", finalValue ); 17554 } 17555 } 17556 } 17557 } 17558 17559 return this; 17560 }, 17561 17562 removeClass: function( value ) { 17563 var classes, elem, cur, curValue, clazz, j, finalValue, 17564 i = 0; 17565 17566 if ( isFunction( value ) ) { 17567 return this.each( function( j ) { 17568 jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); 17569 } ); 17570 } 17571 17572 if ( !arguments.length ) { 17573 return this.attr( "class", "" ); 17574 } 17575 17576 classes = classesToArray( value ); 17577 17578 if ( classes.length ) { 17579 while ( ( elem = this[ i++ ] ) ) { 17580 curValue = getClass( elem ); 17581 17582 // This expression is here for better compressibility (see addClass) 17583 cur = elem.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); 17584 17585 if ( cur ) { 17586 j = 0; 17587 while ( ( clazz = classes[ j++ ] ) ) { 17588 17589 // Remove *all* instances 17590 while ( cur.indexOf( " " + clazz + " " ) > -1 ) { 17591 cur = cur.replace( " " + clazz + " ", " " ); 17592 } 17593 } 17594 17595 // Only assign if different to avoid unneeded rendering. 17596 finalValue = stripAndCollapse( cur ); 17597 if ( curValue !== finalValue ) { 17598 elem.setAttribute( "class", finalValue ); 17599 } 17600 } 17601 } 17602 } 17603 17604 return this; 17605 }, 17606 17607 toggleClass: function( value, stateVal ) { 17608 var type = typeof value, 17609 isValidValue = type === "string" || Array.isArray( value ); 17610 17611 if ( typeof stateVal === "boolean" && isValidValue ) { 17612 return stateVal ? this.addClass( value ) : this.removeClass( value ); 17613 } 17614 17615 if ( isFunction( value ) ) { 17616 return this.each( function( i ) { 17617 jQuery( this ).toggleClass( 17618 value.call( this, i, getClass( this ), stateVal ), 17619 stateVal 17620 ); 17621 } ); 17622 } 17623 17624 return this.each( function() { 17625 var className, i, self, classNames; 17626 17627 if ( isValidValue ) { 17628 17629 // Toggle individual class names 17630 i = 0; 17631 self = jQuery( this ); 17632 classNames = classesToArray( value ); 17633 17634 while ( ( className = classNames[ i++ ] ) ) { 17635 17636 // Check each className given, space separated list 17637 if ( self.hasClass( className ) ) { 17638 self.removeClass( className ); 17639 } else { 17640 self.addClass( className ); 17641 } 17642 } 17643 17644 // Toggle whole class name 17645 } else if ( value === undefined || type === "boolean" ) { 17646 className = getClass( this ); 17647 if ( className ) { 17648 17649 // Store className if set 17650 dataPriv.set( this, "__className__", className ); 17651 } 17652 17653 // If the element has a class name or if we're passed `false`, 17654 // then remove the whole classname (if there was one, the above saved it). 17655 // Otherwise bring back whatever was previously saved (if anything), 17656 // falling back to the empty string if nothing was stored. 17657 if ( this.setAttribute ) { 17658 this.setAttribute( "class", 17659 className || value === false ? 17660 "" : 17661 dataPriv.get( this, "__className__" ) || "" 17662 ); 17663 } 17664 } 17665 } ); 17666 }, 17667 17668 hasClass: function( selector ) { 17669 var className, elem, 17670 i = 0; 17671 17672 className = " " + selector + " "; 17673 while ( ( elem = this[ i++ ] ) ) { 17674 if ( elem.nodeType === 1 && 17675 ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { 17676 return true; 17677 } 17678 } 17679 17680 return false; 17681 } 17682} ); 17683 17684 17685 17686 17687var rreturn = /\r/g; 17688 17689jQuery.fn.extend( { 17690 val: function( value ) { 17691 var hooks, ret, valueIsFunction, 17692 elem = this[ 0 ]; 17693 17694 if ( !arguments.length ) { 17695 if ( elem ) { 17696 hooks = jQuery.valHooks[ elem.type ] || 17697 jQuery.valHooks[ elem.nodeName.toLowerCase() ]; 17698 17699 if ( hooks && 17700 "get" in hooks && 17701 ( ret = hooks.get( elem, "value" ) ) !== undefined 17702 ) { 17703 return ret; 17704 } 17705 17706 ret = elem.value; 17707 17708 // Handle most common string cases 17709 if ( typeof ret === "string" ) { 17710 return ret.replace( rreturn, "" ); 17711 } 17712 17713 // Handle cases where value is null/undef or number 17714 return ret == null ? "" : ret; 17715 } 17716 17717 return; 17718 } 17719 17720 valueIsFunction = isFunction( value ); 17721 17722 return this.each( function( i ) { 17723 var val; 17724 17725 if ( this.nodeType !== 1 ) { 17726 return; 17727 } 17728 17729 if ( valueIsFunction ) { 17730 val = value.call( this, i, jQuery( this ).val() ); 17731 } else { 17732 val = value; 17733 } 17734 17735 // Treat null/undefined as ""; convert numbers to string 17736 if ( val == null ) { 17737 val = ""; 17738 17739 } else if ( typeof val === "number" ) { 17740 val += ""; 17741 17742 } else if ( Array.isArray( val ) ) { 17743 val = jQuery.map( val, function( value ) { 17744 return value == null ? "" : value + ""; 17745 } ); 17746 } 17747 17748 hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; 17749 17750 // If set returns undefined, fall back to normal setting 17751 if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { 17752 this.value = val; 17753 } 17754 } ); 17755 } 17756} ); 17757 17758jQuery.extend( { 17759 valHooks: { 17760 option: { 17761 get: function( elem ) { 17762 17763 var val = jQuery.find.attr( elem, "value" ); 17764 return val != null ? 17765 val : 17766 17767 // Support: IE <=10 - 11 only 17768 // option.text throws exceptions (#14686, #14858) 17769 // Strip and collapse whitespace 17770 // https://html.spec.whatwg.org/#strip-and-collapse-whitespace 17771 stripAndCollapse( jQuery.text( elem ) ); 17772 } 17773 }, 17774 select: { 17775 get: function( elem ) { 17776 var value, option, i, 17777 options = elem.options, 17778 index = elem.selectedIndex, 17779 one = elem.type === "select-one", 17780 values = one ? null : [], 17781 max = one ? index + 1 : options.length; 17782 17783 if ( index < 0 ) { 17784 i = max; 17785 17786 } else { 17787 i = one ? index : 0; 17788 } 17789 17790 // Loop through all the selected options 17791 for ( ; i < max; i++ ) { 17792 option = options[ i ]; 17793 17794 // Support: IE <=9 only 17795 // IE8-9 doesn't update selected after form reset (#2551) 17796 if ( ( option.selected || i === index ) && 17797 17798 // Don't return options that are disabled or in a disabled optgroup 17799 !option.disabled && 17800 ( !option.parentNode.disabled || 17801 !nodeName( option.parentNode, "optgroup" ) ) ) { 17802 17803 // Get the specific value for the option 17804 value = jQuery( option ).val(); 17805 17806 // We don't need an array for one selects 17807 if ( one ) { 17808 return value; 17809 } 17810 17811 // Multi-Selects return an array 17812 values.push( value ); 17813 } 17814 } 17815 17816 return values; 17817 }, 17818 17819 set: function( elem, value ) { 17820 var optionSet, option, 17821 options = elem.options, 17822 values = jQuery.makeArray( value ), 17823 i = options.length; 17824 17825 while ( i-- ) { 17826 option = options[ i ]; 17827 17828 /* eslint-disable no-cond-assign */ 17829 17830 if ( option.selected = 17831 jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 17832 ) { 17833 optionSet = true; 17834 } 17835 17836 /* eslint-enable no-cond-assign */ 17837 } 17838 17839 // Force browsers to behave consistently when non-matching value is set 17840 if ( !optionSet ) { 17841 elem.selectedIndex = -1; 17842 } 17843 return values; 17844 } 17845 } 17846 } 17847} ); 17848 17849// Radios and checkboxes getter/setter 17850jQuery.each( [ "radio", "checkbox" ], function() { 17851 jQuery.valHooks[ this ] = { 17852 set: function( elem, value ) { 17853 if ( Array.isArray( value ) ) { 17854 return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); 17855 } 17856 } 17857 }; 17858 if ( !support.checkOn ) { 17859 jQuery.valHooks[ this ].get = function( elem ) { 17860 return elem.getAttribute( "value" ) === null ? "on" : elem.value; 17861 }; 17862 } 17863} ); 17864 17865 17866 17867 17868// Return jQuery for attributes-only inclusion 17869 17870 17871support.focusin = "onfocusin" in window; 17872 17873 17874var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, 17875 stopPropagationCallback = function( e ) { 17876 e.stopPropagation(); 17877 }; 17878 17879jQuery.extend( jQuery.event, { 17880 17881 trigger: function( event, data, elem, onlyHandlers ) { 17882 17883 var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, 17884 eventPath = [ elem || document ], 17885 type = hasOwn.call( event, "type" ) ? event.type : event, 17886 namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; 17887 17888 cur = lastElement = tmp = elem = elem || document; 17889 17890 // Don't do events on text and comment nodes 17891 if ( elem.nodeType === 3 || elem.nodeType === 8 ) { 17892 return; 17893 } 17894 17895 // focus/blur morphs to focusin/out; ensure we're not firing them right now 17896 if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { 17897 return; 17898 } 17899 17900 if ( type.indexOf( "." ) > -1 ) { 17901 17902 // Namespaced trigger; create a regexp to match event type in handle() 17903 namespaces = type.split( "." ); 17904 type = namespaces.shift(); 17905 namespaces.sort(); 17906 } 17907 ontype = type.indexOf( ":" ) < 0 && "on" + type; 17908 17909 // Caller can pass in a jQuery.Event object, Object, or just an event type string 17910 event = event[ jQuery.expando ] ? 17911 event : 17912 new jQuery.Event( type, typeof event === "object" && event ); 17913 17914 // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) 17915 event.isTrigger = onlyHandlers ? 2 : 3; 17916 event.namespace = namespaces.join( "." ); 17917 event.rnamespace = event.namespace ? 17918 new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : 17919 null; 17920 17921 // Clean up the event in case it is being reused 17922 event.result = undefined; 17923 if ( !event.target ) { 17924 event.target = elem; 17925 } 17926 17927 // Clone any incoming data and prepend the event, creating the handler arg list 17928 data = data == null ? 17929 [ event ] : 17930 jQuery.makeArray( data, [ event ] ); 17931 17932 // Allow special events to draw outside the lines 17933 special = jQuery.event.special[ type ] || {}; 17934 if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { 17935 return; 17936 } 17937 17938 // Determine event propagation path in advance, per W3C events spec (#9951) 17939 // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) 17940 if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { 17941 17942 bubbleType = special.delegateType || type; 17943 if ( !rfocusMorph.test( bubbleType + type ) ) { 17944 cur = cur.parentNode; 17945 } 17946 for ( ; cur; cur = cur.parentNode ) { 17947 eventPath.push( cur ); 17948 tmp = cur; 17949 } 17950 17951 // Only add window if we got to document (e.g., not plain obj or detached DOM) 17952 if ( tmp === ( elem.ownerDocument || document ) ) { 17953 eventPath.push( tmp.defaultView || tmp.parentWindow || window ); 17954 } 17955 } 17956 17957 // Fire handlers on the event path 17958 i = 0; 17959 while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { 17960 lastElement = cur; 17961 event.type = i > 1 ? 17962 bubbleType : 17963 special.bindType || type; 17964 17965 // jQuery handler 17966 handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && 17967 dataPriv.get( cur, "handle" ); 17968 if ( handle ) { 17969 handle.apply( cur, data ); 17970 } 17971 17972 // Native handler 17973 handle = ontype && cur[ ontype ]; 17974 if ( handle && handle.apply && acceptData( cur ) ) { 17975 event.result = handle.apply( cur, data ); 17976 if ( event.result === false ) { 17977 event.preventDefault(); 17978 } 17979 } 17980 } 17981 event.type = type; 17982 17983 // If nobody prevented the default action, do it now 17984 if ( !onlyHandlers && !event.isDefaultPrevented() ) { 17985 17986 if ( ( !special._default || 17987 special._default.apply( eventPath.pop(), data ) === false ) && 17988 acceptData( elem ) ) { 17989 17990 // Call a native DOM method on the target with the same name as the event. 17991 // Don't do default actions on window, that's where global variables be (#6170) 17992 if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { 17993 17994 // Don't re-trigger an onFOO event when we call its FOO() method 17995 tmp = elem[ ontype ]; 17996 17997 if ( tmp ) { 17998 elem[ ontype ] = null; 17999 } 18000 18001 // Prevent re-triggering of the same event, since we already bubbled it above 18002 jQuery.event.triggered = type; 18003 18004 if ( event.isPropagationStopped() ) { 18005 lastElement.addEventListener( type, stopPropagationCallback ); 18006 } 18007 18008 elem[ type ](); 18009 18010 if ( event.isPropagationStopped() ) { 18011 lastElement.removeEventListener( type, stopPropagationCallback ); 18012 } 18013 18014 jQuery.event.triggered = undefined; 18015 18016 if ( tmp ) { 18017 elem[ ontype ] = tmp; 18018 } 18019 } 18020 } 18021 } 18022 18023 return event.result; 18024 }, 18025 18026 // Piggyback on a donor event to simulate a different one 18027 // Used only for `focus(in | out)` events 18028 simulate: function( type, elem, event ) { 18029 var e = jQuery.extend( 18030 new jQuery.Event(), 18031 event, 18032 { 18033 type: type, 18034 isSimulated: true 18035 } 18036 ); 18037 18038 jQuery.event.trigger( e, null, elem ); 18039 } 18040 18041} ); 18042 18043jQuery.fn.extend( { 18044 18045 trigger: function( type, data ) { 18046 return this.each( function() { 18047 jQuery.event.trigger( type, data, this ); 18048 } ); 18049 }, 18050 triggerHandler: function( type, data ) { 18051 var elem = this[ 0 ]; 18052 if ( elem ) { 18053 return jQuery.event.trigger( type, data, elem, true ); 18054 } 18055 } 18056} ); 18057 18058 18059// Support: Firefox <=44 18060// Firefox doesn't have focus(in | out) events 18061// Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 18062// 18063// Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 18064// focus(in | out) events fire after focus & blur events, 18065// which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order 18066// Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 18067if ( !support.focusin ) { 18068 jQuery.each( { focus: "focusin", blur: "focusout" }, function( orig, fix ) { 18069 18070 // Attach a single capturing handler on the document while someone wants focusin/focusout 18071 var handler = function( event ) { 18072 jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ) ); 18073 }; 18074 18075 jQuery.event.special[ fix ] = { 18076 setup: function() { 18077 18078 // Handle: regular nodes (via `this.ownerDocument`), window 18079 // (via `this.document`) & document (via `this`). 18080 var doc = this.ownerDocument || this.document || this, 18081 attaches = dataPriv.access( doc, fix ); 18082 18083 if ( !attaches ) { 18084 doc.addEventListener( orig, handler, true ); 18085 } 18086 dataPriv.access( doc, fix, ( attaches || 0 ) + 1 ); 18087 }, 18088 teardown: function() { 18089 var doc = this.ownerDocument || this.document || this, 18090 attaches = dataPriv.access( doc, fix ) - 1; 18091 18092 if ( !attaches ) { 18093 doc.removeEventListener( orig, handler, true ); 18094 dataPriv.remove( doc, fix ); 18095 18096 } else { 18097 dataPriv.access( doc, fix, attaches ); 18098 } 18099 } 18100 }; 18101 } ); 18102} 18103var location = window.location; 18104 18105var nonce = { guid: Date.now() }; 18106 18107var rquery = ( /\?/ ); 18108 18109 18110 18111// Cross-browser xml parsing 18112jQuery.parseXML = function( data ) { 18113 var xml, parserErrorElem; 18114 if ( !data || typeof data !== "string" ) { 18115 return null; 18116 } 18117 18118 // Support: IE 9 - 11 only 18119 // IE throws on parseFromString with invalid input. 18120 try { 18121 xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 18122 } catch ( e ) {} 18123 18124 parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; 18125 if ( !xml || parserErrorElem ) { 18126 jQuery.error( "Invalid XML: " + ( 18127 parserErrorElem ? 18128 jQuery.map( parserErrorElem.childNodes, function( el ) { 18129 return el.textContent; 18130 } ).join( "\n" ) : 18131 data 18132 ) ); 18133 } 18134 return xml; 18135}; 18136 18137 18138var 18139 rbracket = /\[\]$/, 18140 rCRLF = /\r?\n/g, 18141 rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, 18142 rsubmittable = /^(?:input|select|textarea|keygen)/i; 18143 18144function buildParams( prefix, obj, traditional, add ) { 18145 var name; 18146 18147 if ( Array.isArray( obj ) ) { 18148 18149 // Serialize array item. 18150 jQuery.each( obj, function( i, v ) { 18151 if ( traditional || rbracket.test( prefix ) ) { 18152 18153 // Treat each array item as a scalar. 18154 add( prefix, v ); 18155 18156 } else { 18157 18158 // Item is non-scalar (array or object), encode its numeric index. 18159 buildParams( 18160 prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", 18161 v, 18162 traditional, 18163 add 18164 ); 18165 } 18166 } ); 18167 18168 } else if ( !traditional && toType( obj ) === "object" ) { 18169 18170 // Serialize object item. 18171 for ( name in obj ) { 18172 buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); 18173 } 18174 18175 } else { 18176 18177 // Serialize scalar item. 18178 add( prefix, obj ); 18179 } 18180} 18181 18182// Serialize an array of form elements or a set of 18183// key/values into a query string 18184jQuery.param = function( a, traditional ) { 18185 var prefix, 18186 s = [], 18187 add = function( key, valueOrFunction ) { 18188 18189 // If value is a function, invoke it and use its return value 18190 var value = isFunction( valueOrFunction ) ? 18191 valueOrFunction() : 18192 valueOrFunction; 18193 18194 s[ s.length ] = encodeURIComponent( key ) + "=" + 18195 encodeURIComponent( value == null ? "" : value ); 18196 }; 18197 18198 if ( a == null ) { 18199 return ""; 18200 } 18201 18202 // If an array was passed in, assume that it is an array of form elements. 18203 if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { 18204 18205 // Serialize the form elements 18206 jQuery.each( a, function() { 18207 add( this.name, this.value ); 18208 } ); 18209 18210 } else { 18211 18212 // If traditional, encode the "old" way (the way 1.3.2 or older 18213 // did it), otherwise encode params recursively. 18214 for ( prefix in a ) { 18215 buildParams( prefix, a[ prefix ], traditional, add ); 18216 } 18217 } 18218 18219 // Return the resulting serialization 18220 return s.join( "&" ); 18221}; 18222 18223jQuery.fn.extend( { 18224 serialize: function() { 18225 return jQuery.param( this.serializeArray() ); 18226 }, 18227 serializeArray: function() { 18228 return this.map( function() { 18229 18230 // Can add propHook for "elements" to filter or add form elements 18231 var elements = jQuery.prop( this, "elements" ); 18232 return elements ? jQuery.makeArray( elements ) : this; 18233 } ).filter( function() { 18234 var type = this.type; 18235 18236 // Use .is( ":disabled" ) so that fieldset[disabled] works 18237 return this.name && !jQuery( this ).is( ":disabled" ) && 18238 rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && 18239 ( this.checked || !rcheckableType.test( type ) ); 18240 } ).map( function( _i, elem ) { 18241 var val = jQuery( this ).val(); 18242 18243 if ( val == null ) { 18244 return null; 18245 } 18246 18247 if ( Array.isArray( val ) ) { 18248 return jQuery.map( val, function( val ) { 18249 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 18250 } ); 18251 } 18252 18253 return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; 18254 } ).get(); 18255 } 18256} ); 18257 18258 18259var 18260 r20 = /%20/g, 18261 rhash = /#.*$/, 18262 rantiCache = /([?&])_=[^&]*/, 18263 rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, 18264 18265 // #7653, #8125, #8152: local protocol detection 18266 rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, 18267 rnoContent = /^(?:GET|HEAD)$/, 18268 rprotocol = /^\/\//, 18269 18270 /* Prefilters 18271 * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) 18272 * 2) These are called: 18273 * - BEFORE asking for a transport 18274 * - AFTER param serialization (s.data is a string if s.processData is true) 18275 * 3) key is the dataType 18276 * 4) the catchall symbol "*" can be used 18277 * 5) execution will start with transport dataType and THEN continue down to "*" if needed 18278 */ 18279 prefilters = {}, 18280 18281 /* Transports bindings 18282 * 1) key is the dataType 18283 * 2) the catchall symbol "*" can be used 18284 * 3) selection will start with transport dataType and THEN go to "*" if needed 18285 */ 18286 transports = {}, 18287 18288 // Avoid comment-prolog char sequence (#10098); must appease lint and evade compression 18289 allTypes = "*/".concat( "*" ), 18290 18291 // Anchor tag for parsing the document origin 18292 originAnchor = document.createElement( "a" ); 18293 18294originAnchor.href = location.href; 18295 18296// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport 18297function addToPrefiltersOrTransports( structure ) { 18298 18299 // dataTypeExpression is optional and defaults to "*" 18300 return function( dataTypeExpression, func ) { 18301 18302 if ( typeof dataTypeExpression !== "string" ) { 18303 func = dataTypeExpression; 18304 dataTypeExpression = "*"; 18305 } 18306 18307 var dataType, 18308 i = 0, 18309 dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; 18310 18311 if ( isFunction( func ) ) { 18312 18313 // For each dataType in the dataTypeExpression 18314 while ( ( dataType = dataTypes[ i++ ] ) ) { 18315 18316 // Prepend if requested 18317 if ( dataType[ 0 ] === "+" ) { 18318 dataType = dataType.slice( 1 ) || "*"; 18319 ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); 18320 18321 // Otherwise append 18322 } else { 18323 ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); 18324 } 18325 } 18326 } 18327 }; 18328} 18329 18330// Base inspection function for prefilters and transports 18331function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { 18332 18333 var inspected = {}, 18334 seekingTransport = ( structure === transports ); 18335 18336 function inspect( dataType ) { 18337 var selected; 18338 inspected[ dataType ] = true; 18339 jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { 18340 var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); 18341 if ( typeof dataTypeOrTransport === "string" && 18342 !seekingTransport && !inspected[ dataTypeOrTransport ] ) { 18343 18344 options.dataTypes.unshift( dataTypeOrTransport ); 18345 inspect( dataTypeOrTransport ); 18346 return false; 18347 } else if ( seekingTransport ) { 18348 return !( selected = dataTypeOrTransport ); 18349 } 18350 } ); 18351 return selected; 18352 } 18353 18354 return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); 18355} 18356 18357// A special extend for ajax options 18358// that takes "flat" options (not to be deep extended) 18359// Fixes #9887 18360function ajaxExtend( target, src ) { 18361 var key, deep, 18362 flatOptions = jQuery.ajaxSettings.flatOptions || {}; 18363 18364 for ( key in src ) { 18365 if ( src[ key ] !== undefined ) { 18366 ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; 18367 } 18368 } 18369 if ( deep ) { 18370 jQuery.extend( true, target, deep ); 18371 } 18372 18373 return target; 18374} 18375 18376/* Handles responses to an ajax request: 18377 * - finds the right dataType (mediates between content-type and expected dataType) 18378 * - returns the corresponding response 18379 */ 18380function ajaxHandleResponses( s, jqXHR, responses ) { 18381 18382 var ct, type, finalDataType, firstDataType, 18383 contents = s.contents, 18384 dataTypes = s.dataTypes; 18385 18386 // Remove auto dataType and get content-type in the process 18387 while ( dataTypes[ 0 ] === "*" ) { 18388 dataTypes.shift(); 18389 if ( ct === undefined ) { 18390 ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); 18391 } 18392 } 18393 18394 // Check if we're dealing with a known content-type 18395 if ( ct ) { 18396 for ( type in contents ) { 18397 if ( contents[ type ] && contents[ type ].test( ct ) ) { 18398 dataTypes.unshift( type ); 18399 break; 18400 } 18401 } 18402 } 18403 18404 // Check to see if we have a response for the expected dataType 18405 if ( dataTypes[ 0 ] in responses ) { 18406 finalDataType = dataTypes[ 0 ]; 18407 } else { 18408 18409 // Try convertible dataTypes 18410 for ( type in responses ) { 18411 if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { 18412 finalDataType = type; 18413 break; 18414 } 18415 if ( !firstDataType ) { 18416 firstDataType = type; 18417 } 18418 } 18419 18420 // Or just use first one 18421 finalDataType = finalDataType || firstDataType; 18422 } 18423 18424 // If we found a dataType 18425 // We add the dataType to the list if needed 18426 // and return the corresponding response 18427 if ( finalDataType ) { 18428 if ( finalDataType !== dataTypes[ 0 ] ) { 18429 dataTypes.unshift( finalDataType ); 18430 } 18431 return responses[ finalDataType ]; 18432 } 18433} 18434 18435/* Chain conversions given the request and the original response 18436 * Also sets the responseXXX fields on the jqXHR instance 18437 */ 18438function ajaxConvert( s, response, jqXHR, isSuccess ) { 18439 var conv2, current, conv, tmp, prev, 18440 converters = {}, 18441 18442 // Work with a copy of dataTypes in case we need to modify it for conversion 18443 dataTypes = s.dataTypes.slice(); 18444 18445 // Create converters map with lowercased keys 18446 if ( dataTypes[ 1 ] ) { 18447 for ( conv in s.converters ) { 18448 converters[ conv.toLowerCase() ] = s.converters[ conv ]; 18449 } 18450 } 18451 18452 current = dataTypes.shift(); 18453 18454 // Convert to each sequential dataType 18455 while ( current ) { 18456 18457 if ( s.responseFields[ current ] ) { 18458 jqXHR[ s.responseFields[ current ] ] = response; 18459 } 18460 18461 // Apply the dataFilter if provided 18462 if ( !prev && isSuccess && s.dataFilter ) { 18463 response = s.dataFilter( response, s.dataType ); 18464 } 18465 18466 prev = current; 18467 current = dataTypes.shift(); 18468 18469 if ( current ) { 18470 18471 // There's only work to do if current dataType is non-auto 18472 if ( current === "*" ) { 18473 18474 current = prev; 18475 18476 // Convert response if prev dataType is non-auto and differs from current 18477 } else if ( prev !== "*" && prev !== current ) { 18478 18479 // Seek a direct converter 18480 conv = converters[ prev + " " + current ] || converters[ "* " + current ]; 18481 18482 // If none found, seek a pair 18483 if ( !conv ) { 18484 for ( conv2 in converters ) { 18485 18486 // If conv2 outputs current 18487 tmp = conv2.split( " " ); 18488 if ( tmp[ 1 ] === current ) { 18489 18490 // If prev can be converted to accepted input 18491 conv = converters[ prev + " " + tmp[ 0 ] ] || 18492 converters[ "* " + tmp[ 0 ] ]; 18493 if ( conv ) { 18494 18495 // Condense equivalence converters 18496 if ( conv === true ) { 18497 conv = converters[ conv2 ]; 18498 18499 // Otherwise, insert the intermediate dataType 18500 } else if ( converters[ conv2 ] !== true ) { 18501 current = tmp[ 0 ]; 18502 dataTypes.unshift( tmp[ 1 ] ); 18503 } 18504 break; 18505 } 18506 } 18507 } 18508 } 18509 18510 // Apply converter (if not an equivalence) 18511 if ( conv !== true ) { 18512 18513 // Unless errors are allowed to bubble, catch and return them 18514 if ( conv && s.throws ) { 18515 response = conv( response ); 18516 } else { 18517 try { 18518 response = conv( response ); 18519 } catch ( e ) { 18520 return { 18521 state: "parsererror", 18522 error: conv ? e : "No conversion from " + prev + " to " + current 18523 }; 18524 } 18525 } 18526 } 18527 } 18528 } 18529 } 18530 18531 return { state: "success", data: response }; 18532} 18533 18534jQuery.extend( { 18535 18536 // Counter for holding the number of active queries 18537 active: 0, 18538 18539 // Last-Modified header cache for next request 18540 lastModified: {}, 18541 etag: {}, 18542 18543 ajaxSettings: { 18544 url: location.href, 18545 type: "GET", 18546 isLocal: rlocalProtocol.test( location.protocol ), 18547 global: true, 18548 processData: true, 18549 async: true, 18550 contentType: "application/x-www-form-urlencoded; charset=UTF-8", 18551 18552 /* 18553 timeout: 0, 18554 data: null, 18555 dataType: null, 18556 username: null, 18557 password: null, 18558 cache: null, 18559 throws: false, 18560 traditional: false, 18561 headers: {}, 18562 */ 18563 18564 accepts: { 18565 "*": allTypes, 18566 text: "text/plain", 18567 html: "text/html", 18568 xml: "application/xml, text/xml", 18569 json: "application/json, text/javascript" 18570 }, 18571 18572 contents: { 18573 xml: /\bxml\b/, 18574 html: /\bhtml/, 18575 json: /\bjson\b/ 18576 }, 18577 18578 responseFields: { 18579 xml: "responseXML", 18580 text: "responseText", 18581 json: "responseJSON" 18582 }, 18583 18584 // Data converters 18585 // Keys separate source (or catchall "*") and destination types with a single space 18586 converters: { 18587 18588 // Convert anything to text 18589 "* text": String, 18590 18591 // Text to html (true = no transformation) 18592 "text html": true, 18593 18594 // Evaluate text as a json expression 18595 "text json": JSON.parse, 18596 18597 // Parse text as xml 18598 "text xml": jQuery.parseXML 18599 }, 18600 18601 // For options that shouldn't be deep extended: 18602 // you can add your own custom options here if 18603 // and when you create one that shouldn't be 18604 // deep extended (see ajaxExtend) 18605 flatOptions: { 18606 url: true, 18607 context: true 18608 } 18609 }, 18610 18611 // Creates a full fledged settings object into target 18612 // with both ajaxSettings and settings fields. 18613 // If target is omitted, writes into ajaxSettings. 18614 ajaxSetup: function( target, settings ) { 18615 return settings ? 18616 18617 // Building a settings object 18618 ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : 18619 18620 // Extending ajaxSettings 18621 ajaxExtend( jQuery.ajaxSettings, target ); 18622 }, 18623 18624 ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), 18625 ajaxTransport: addToPrefiltersOrTransports( transports ), 18626 18627 // Main method 18628 ajax: function( url, options ) { 18629 18630 // If url is an object, simulate pre-1.5 signature 18631 if ( typeof url === "object" ) { 18632 options = url; 18633 url = undefined; 18634 } 18635 18636 // Force options to be an object 18637 options = options || {}; 18638 18639 var transport, 18640 18641 // URL without anti-cache param 18642 cacheURL, 18643 18644 // Response headers 18645 responseHeadersString, 18646 responseHeaders, 18647 18648 // timeout handle 18649 timeoutTimer, 18650 18651 // Url cleanup var 18652 urlAnchor, 18653 18654 // Request state (becomes false upon send and true upon completion) 18655 completed, 18656 18657 // To know if global events are to be dispatched 18658 fireGlobals, 18659 18660 // Loop variable 18661 i, 18662 18663 // uncached part of the url 18664 uncached, 18665 18666 // Create the final options object 18667 s = jQuery.ajaxSetup( {}, options ), 18668 18669 // Callbacks context 18670 callbackContext = s.context || s, 18671 18672 // Context for global events is callbackContext if it is a DOM node or jQuery collection 18673 globalEventContext = s.context && 18674 ( callbackContext.nodeType || callbackContext.jquery ) ? 18675 jQuery( callbackContext ) : 18676 jQuery.event, 18677 18678 // Deferreds 18679 deferred = jQuery.Deferred(), 18680 completeDeferred = jQuery.Callbacks( "once memory" ), 18681 18682 // Status-dependent callbacks 18683 statusCode = s.statusCode || {}, 18684 18685 // Headers (they are sent all at once) 18686 requestHeaders = {}, 18687 requestHeadersNames = {}, 18688 18689 // Default abort message 18690 strAbort = "canceled", 18691 18692 // Fake xhr 18693 jqXHR = { 18694 readyState: 0, 18695 18696 // Builds headers hashtable if needed 18697 getResponseHeader: function( key ) { 18698 var match; 18699 if ( completed ) { 18700 if ( !responseHeaders ) { 18701 responseHeaders = {}; 18702 while ( ( match = rheaders.exec( responseHeadersString ) ) ) { 18703 responseHeaders[ match[ 1 ].toLowerCase() + " " ] = 18704 ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) 18705 .concat( match[ 2 ] ); 18706 } 18707 } 18708 match = responseHeaders[ key.toLowerCase() + " " ]; 18709 } 18710 return match == null ? null : match.join( ", " ); 18711 }, 18712 18713 // Raw string 18714 getAllResponseHeaders: function() { 18715 return completed ? responseHeadersString : null; 18716 }, 18717 18718 // Caches the header 18719 setRequestHeader: function( name, value ) { 18720 if ( completed == null ) { 18721 name = requestHeadersNames[ name.toLowerCase() ] = 18722 requestHeadersNames[ name.toLowerCase() ] || name; 18723 requestHeaders[ name ] = value; 18724 } 18725 return this; 18726 }, 18727 18728 // Overrides response content-type header 18729 overrideMimeType: function( type ) { 18730 if ( completed == null ) { 18731 s.mimeType = type; 18732 } 18733 return this; 18734 }, 18735 18736 // Status-dependent callbacks 18737 statusCode: function( map ) { 18738 var code; 18739 if ( map ) { 18740 if ( completed ) { 18741 18742 // Execute the appropriate callbacks 18743 jqXHR.always( map[ jqXHR.status ] ); 18744 } else { 18745 18746 // Lazy-add the new callbacks in a way that preserves old ones 18747 for ( code in map ) { 18748 statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; 18749 } 18750 } 18751 } 18752 return this; 18753 }, 18754 18755 // Cancel the request 18756 abort: function( statusText ) { 18757 var finalText = statusText || strAbort; 18758 if ( transport ) { 18759 transport.abort( finalText ); 18760 } 18761 done( 0, finalText ); 18762 return this; 18763 } 18764 }; 18765 18766 // Attach deferreds 18767 deferred.promise( jqXHR ); 18768 18769 // Add protocol if not provided (prefilters might expect it) 18770 // Handle falsy url in the settings object (#10093: consistency with old signature) 18771 // We also use the url parameter if available 18772 s.url = ( ( url || s.url || location.href ) + "" ) 18773 .replace( rprotocol, location.protocol + "//" ); 18774 18775 // Alias method option to type as per ticket #12004 18776 s.type = options.method || options.type || s.method || s.type; 18777 18778 // Extract dataTypes list 18779 s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; 18780 18781 // A cross-domain request is in order when the origin doesn't match the current origin. 18782 if ( s.crossDomain == null ) { 18783 urlAnchor = document.createElement( "a" ); 18784 18785 // Support: IE <=8 - 11, Edge 12 - 15 18786 // IE throws exception on accessing the href property if url is malformed, 18787 // e.g. http://example.com:80x/ 18788 try { 18789 urlAnchor.href = s.url; 18790 18791 // Support: IE <=8 - 11 only 18792 // Anchor's host property isn't correctly set when s.url is relative 18793 urlAnchor.href = urlAnchor.href; 18794 s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== 18795 urlAnchor.protocol + "//" + urlAnchor.host; 18796 } catch ( e ) { 18797 18798 // If there is an error parsing the URL, assume it is crossDomain, 18799 // it can be rejected by the transport if it is invalid 18800 s.crossDomain = true; 18801 } 18802 } 18803 18804 // Convert data if not already a string 18805 if ( s.data && s.processData && typeof s.data !== "string" ) { 18806 s.data = jQuery.param( s.data, s.traditional ); 18807 } 18808 18809 // Apply prefilters 18810 inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); 18811 18812 // If request was aborted inside a prefilter, stop there 18813 if ( completed ) { 18814 return jqXHR; 18815 } 18816 18817 // We can fire global events as of now if asked to 18818 // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (#15118) 18819 fireGlobals = jQuery.event && s.global; 18820 18821 // Watch for a new set of requests 18822 if ( fireGlobals && jQuery.active++ === 0 ) { 18823 jQuery.event.trigger( "ajaxStart" ); 18824 } 18825 18826 // Uppercase the type 18827 s.type = s.type.toUpperCase(); 18828 18829 // Determine if request has content 18830 s.hasContent = !rnoContent.test( s.type ); 18831 18832 // Save the URL in case we're toying with the If-Modified-Since 18833 // and/or If-None-Match header later on 18834 // Remove hash to simplify url manipulation 18835 cacheURL = s.url.replace( rhash, "" ); 18836 18837 // More options handling for requests with no content 18838 if ( !s.hasContent ) { 18839 18840 // Remember the hash so we can put it back 18841 uncached = s.url.slice( cacheURL.length ); 18842 18843 // If data is available and should be processed, append data to url 18844 if ( s.data && ( s.processData || typeof s.data === "string" ) ) { 18845 cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; 18846 18847 // #9682: remove data so that it's not used in an eventual retry 18848 delete s.data; 18849 } 18850 18851 // Add or update anti-cache param if needed 18852 if ( s.cache === false ) { 18853 cacheURL = cacheURL.replace( rantiCache, "$1" ); 18854 uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + 18855 uncached; 18856 } 18857 18858 // Put hash and anti-cache on the URL that will be requested (gh-1732) 18859 s.url = cacheURL + uncached; 18860 18861 // Change '%20' to '+' if this is encoded form body content (gh-2658) 18862 } else if ( s.data && s.processData && 18863 ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { 18864 s.data = s.data.replace( r20, "+" ); 18865 } 18866 18867 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 18868 if ( s.ifModified ) { 18869 if ( jQuery.lastModified[ cacheURL ] ) { 18870 jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); 18871 } 18872 if ( jQuery.etag[ cacheURL ] ) { 18873 jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); 18874 } 18875 } 18876 18877 // Set the correct header, if data is being sent 18878 if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { 18879 jqXHR.setRequestHeader( "Content-Type", s.contentType ); 18880 } 18881 18882 // Set the Accepts header for the server, depending on the dataType 18883 jqXHR.setRequestHeader( 18884 "Accept", 18885 s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? 18886 s.accepts[ s.dataTypes[ 0 ] ] + 18887 ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : 18888 s.accepts[ "*" ] 18889 ); 18890 18891 // Check for headers option 18892 for ( i in s.headers ) { 18893 jqXHR.setRequestHeader( i, s.headers[ i ] ); 18894 } 18895 18896 // Allow custom headers/mimetypes and early abort 18897 if ( s.beforeSend && 18898 ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { 18899 18900 // Abort if not done already and return 18901 return jqXHR.abort(); 18902 } 18903 18904 // Aborting is no longer a cancellation 18905 strAbort = "abort"; 18906 18907 // Install callbacks on deferreds 18908 completeDeferred.add( s.complete ); 18909 jqXHR.done( s.success ); 18910 jqXHR.fail( s.error ); 18911 18912 // Get transport 18913 transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); 18914 18915 // If no transport, we auto-abort 18916 if ( !transport ) { 18917 done( -1, "No Transport" ); 18918 } else { 18919 jqXHR.readyState = 1; 18920 18921 // Send global event 18922 if ( fireGlobals ) { 18923 globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); 18924 } 18925 18926 // If request was aborted inside ajaxSend, stop there 18927 if ( completed ) { 18928 return jqXHR; 18929 } 18930 18931 // Timeout 18932 if ( s.async && s.timeout > 0 ) { 18933 timeoutTimer = window.setTimeout( function() { 18934 jqXHR.abort( "timeout" ); 18935 }, s.timeout ); 18936 } 18937 18938 try { 18939 completed = false; 18940 transport.send( requestHeaders, done ); 18941 } catch ( e ) { 18942 18943 // Rethrow post-completion exceptions 18944 if ( completed ) { 18945 throw e; 18946 } 18947 18948 // Propagate others as results 18949 done( -1, e ); 18950 } 18951 } 18952 18953 // Callback for when everything is done 18954 function done( status, nativeStatusText, responses, headers ) { 18955 var isSuccess, success, error, response, modified, 18956 statusText = nativeStatusText; 18957 18958 // Ignore repeat invocations 18959 if ( completed ) { 18960 return; 18961 } 18962 18963 completed = true; 18964 18965 // Clear timeout if it exists 18966 if ( timeoutTimer ) { 18967 window.clearTimeout( timeoutTimer ); 18968 } 18969 18970 // Dereference transport for early garbage collection 18971 // (no matter how long the jqXHR object will be used) 18972 transport = undefined; 18973 18974 // Cache response headers 18975 responseHeadersString = headers || ""; 18976 18977 // Set readyState 18978 jqXHR.readyState = status > 0 ? 4 : 0; 18979 18980 // Determine if successful 18981 isSuccess = status >= 200 && status < 300 || status === 304; 18982 18983 // Get response data 18984 if ( responses ) { 18985 response = ajaxHandleResponses( s, jqXHR, responses ); 18986 } 18987 18988 // Use a noop converter for missing script but not if jsonp 18989 if ( !isSuccess && 18990 jQuery.inArray( "script", s.dataTypes ) > -1 && 18991 jQuery.inArray( "json", s.dataTypes ) < 0 ) { 18992 s.converters[ "text script" ] = function() {}; 18993 } 18994 18995 // Convert no matter what (that way responseXXX fields are always set) 18996 response = ajaxConvert( s, response, jqXHR, isSuccess ); 18997 18998 // If successful, handle type chaining 18999 if ( isSuccess ) { 19000 19001 // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. 19002 if ( s.ifModified ) { 19003 modified = jqXHR.getResponseHeader( "Last-Modified" ); 19004 if ( modified ) { 19005 jQuery.lastModified[ cacheURL ] = modified; 19006 } 19007 modified = jqXHR.getResponseHeader( "etag" ); 19008 if ( modified ) { 19009 jQuery.etag[ cacheURL ] = modified; 19010 } 19011 } 19012 19013 // if no content 19014 if ( status === 204 || s.type === "HEAD" ) { 19015 statusText = "nocontent"; 19016 19017 // if not modified 19018 } else if ( status === 304 ) { 19019 statusText = "notmodified"; 19020 19021 // If we have data, let's convert it 19022 } else { 19023 statusText = response.state; 19024 success = response.data; 19025 error = response.error; 19026 isSuccess = !error; 19027 } 19028 } else { 19029 19030 // Extract error from statusText and normalize for non-aborts 19031 error = statusText; 19032 if ( status || !statusText ) { 19033 statusText = "error"; 19034 if ( status < 0 ) { 19035 status = 0; 19036 } 19037 } 19038 } 19039 19040 // Set data for the fake xhr object 19041 jqXHR.status = status; 19042 jqXHR.statusText = ( nativeStatusText || statusText ) + ""; 19043 19044 // Success/Error 19045 if ( isSuccess ) { 19046 deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); 19047 } else { 19048 deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); 19049 } 19050 19051 // Status-dependent callbacks 19052 jqXHR.statusCode( statusCode ); 19053 statusCode = undefined; 19054 19055 if ( fireGlobals ) { 19056 globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", 19057 [ jqXHR, s, isSuccess ? success : error ] ); 19058 } 19059 19060 // Complete 19061 completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); 19062 19063 if ( fireGlobals ) { 19064 globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); 19065 19066 // Handle the global AJAX counter 19067 if ( !( --jQuery.active ) ) { 19068 jQuery.event.trigger( "ajaxStop" ); 19069 } 19070 } 19071 } 19072 19073 return jqXHR; 19074 }, 19075 19076 getJSON: function( url, data, callback ) { 19077 return jQuery.get( url, data, callback, "json" ); 19078 }, 19079 19080 getScript: function( url, callback ) { 19081 return jQuery.get( url, undefined, callback, "script" ); 19082 } 19083} ); 19084 19085jQuery.each( [ "get", "post" ], function( _i, method ) { 19086 jQuery[ method ] = function( url, data, callback, type ) { 19087 19088 // Shift arguments if data argument was omitted 19089 if ( isFunction( data ) ) { 19090 type = type || callback; 19091 callback = data; 19092 data = undefined; 19093 } 19094 19095 // The url can be an options object (which then must have .url) 19096 return jQuery.ajax( jQuery.extend( { 19097 url: url, 19098 type: method, 19099 dataType: type, 19100 data: data, 19101 success: callback 19102 }, jQuery.isPlainObject( url ) && url ) ); 19103 }; 19104} ); 19105 19106jQuery.ajaxPrefilter( function( s ) { 19107 var i; 19108 for ( i in s.headers ) { 19109 if ( i.toLowerCase() === "content-type" ) { 19110 s.contentType = s.headers[ i ] || ""; 19111 } 19112 } 19113} ); 19114 19115 19116jQuery._evalUrl = function( url, options, doc ) { 19117 return jQuery.ajax( { 19118 url: url, 19119 19120 // Make this explicit, since user can override this through ajaxSetup (#11264) 19121 type: "GET", 19122 dataType: "script", 19123 cache: true, 19124 async: false, 19125 global: false, 19126 19127 // Only evaluate the response if it is successful (gh-4126) 19128 // dataFilter is not invoked for failure responses, so using it instead 19129 // of the default converter is kludgy but it works. 19130 converters: { 19131 "text script": function() {} 19132 }, 19133 dataFilter: function( response ) { 19134 jQuery.globalEval( response, options, doc ); 19135 } 19136 } ); 19137}; 19138 19139 19140jQuery.fn.extend( { 19141 wrapAll: function( html ) { 19142 var wrap; 19143 19144 if ( this[ 0 ] ) { 19145 if ( isFunction( html ) ) { 19146 html = html.call( this[ 0 ] ); 19147 } 19148 19149 // The elements to wrap the target around 19150 wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); 19151 19152 if ( this[ 0 ].parentNode ) { 19153 wrap.insertBefore( this[ 0 ] ); 19154 } 19155 19156 wrap.map( function() { 19157 var elem = this; 19158 19159 while ( elem.firstElementChild ) { 19160 elem = elem.firstElementChild; 19161 } 19162 19163 return elem; 19164 } ).append( this ); 19165 } 19166 19167 return this; 19168 }, 19169 19170 wrapInner: function( html ) { 19171 if ( isFunction( html ) ) { 19172 return this.each( function( i ) { 19173 jQuery( this ).wrapInner( html.call( this, i ) ); 19174 } ); 19175 } 19176 19177 return this.each( function() { 19178 var self = jQuery( this ), 19179 contents = self.contents(); 19180 19181 if ( contents.length ) { 19182 contents.wrapAll( html ); 19183 19184 } else { 19185 self.append( html ); 19186 } 19187 } ); 19188 }, 19189 19190 wrap: function( html ) { 19191 var htmlIsFunction = isFunction( html ); 19192 19193 return this.each( function( i ) { 19194 jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); 19195 } ); 19196 }, 19197 19198 unwrap: function( selector ) { 19199 this.parent( selector ).not( "body" ).each( function() { 19200 jQuery( this ).replaceWith( this.childNodes ); 19201 } ); 19202 return this; 19203 } 19204} ); 19205 19206 19207jQuery.expr.pseudos.hidden = function( elem ) { 19208 return !jQuery.expr.pseudos.visible( elem ); 19209}; 19210jQuery.expr.pseudos.visible = function( elem ) { 19211 return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); 19212}; 19213 19214 19215 19216 19217jQuery.ajaxSettings.xhr = function() { 19218 try { 19219 return new window.XMLHttpRequest(); 19220 } catch ( e ) {} 19221}; 19222 19223var xhrSuccessStatus = { 19224 19225 // File protocol always yields status code 0, assume 200 19226 0: 200, 19227 19228 // Support: IE <=9 only 19229 // #1450: sometimes IE returns 1223 when it should be 204 19230 1223: 204 19231 }, 19232 xhrSupported = jQuery.ajaxSettings.xhr(); 19233 19234support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); 19235support.ajax = xhrSupported = !!xhrSupported; 19236 19237jQuery.ajaxTransport( function( options ) { 19238 var callback, errorCallback; 19239 19240 // Cross domain only allowed if supported through XMLHttpRequest 19241 if ( support.cors || xhrSupported && !options.crossDomain ) { 19242 return { 19243 send: function( headers, complete ) { 19244 var i, 19245 xhr = options.xhr(); 19246 19247 xhr.open( 19248 options.type, 19249 options.url, 19250 options.async, 19251 options.username, 19252 options.password 19253 ); 19254 19255 // Apply custom fields if provided 19256 if ( options.xhrFields ) { 19257 for ( i in options.xhrFields ) { 19258 xhr[ i ] = options.xhrFields[ i ]; 19259 } 19260 } 19261 19262 // Override mime type if needed 19263 if ( options.mimeType && xhr.overrideMimeType ) { 19264 xhr.overrideMimeType( options.mimeType ); 19265 } 19266 19267 // X-Requested-With header 19268 // For cross-domain requests, seeing as conditions for a preflight are 19269 // akin to a jigsaw puzzle, we simply never set it to be sure. 19270 // (it can always be set on a per-request basis or even using ajaxSetup) 19271 // For same-domain requests, won't change header if already provided. 19272 if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { 19273 headers[ "X-Requested-With" ] = "XMLHttpRequest"; 19274 } 19275 19276 // Set headers 19277 for ( i in headers ) { 19278 xhr.setRequestHeader( i, headers[ i ] ); 19279 } 19280 19281 // Callback 19282 callback = function( type ) { 19283 return function() { 19284 if ( callback ) { 19285 callback = errorCallback = xhr.onload = 19286 xhr.onerror = xhr.onabort = xhr.ontimeout = 19287 xhr.onreadystatechange = null; 19288 19289 if ( type === "abort" ) { 19290 xhr.abort(); 19291 } else if ( type === "error" ) { 19292 19293 // Support: IE <=9 only 19294 // On a manual native abort, IE9 throws 19295 // errors on any property access that is not readyState 19296 if ( typeof xhr.status !== "number" ) { 19297 complete( 0, "error" ); 19298 } else { 19299 complete( 19300 19301 // File: protocol always yields status 0; see #8605, #14207 19302 xhr.status, 19303 xhr.statusText 19304 ); 19305 } 19306 } else { 19307 complete( 19308 xhrSuccessStatus[ xhr.status ] || xhr.status, 19309 xhr.statusText, 19310 19311 // Support: IE <=9 only 19312 // IE9 has no XHR2 but throws on binary (trac-11426) 19313 // For XHR2 non-text, let the caller handle it (gh-2498) 19314 ( xhr.responseType || "text" ) !== "text" || 19315 typeof xhr.responseText !== "string" ? 19316 { binary: xhr.response } : 19317 { text: xhr.responseText }, 19318 xhr.getAllResponseHeaders() 19319 ); 19320 } 19321 } 19322 }; 19323 }; 19324 19325 // Listen to events 19326 xhr.onload = callback(); 19327 errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); 19328 19329 // Support: IE 9 only 19330 // Use onreadystatechange to replace onabort 19331 // to handle uncaught aborts 19332 if ( xhr.onabort !== undefined ) { 19333 xhr.onabort = errorCallback; 19334 } else { 19335 xhr.onreadystatechange = function() { 19336 19337 // Check readyState before timeout as it changes 19338 if ( xhr.readyState === 4 ) { 19339 19340 // Allow onerror to be called first, 19341 // but that will not handle a native abort 19342 // Also, save errorCallback to a variable 19343 // as xhr.onerror cannot be accessed 19344 window.setTimeout( function() { 19345 if ( callback ) { 19346 errorCallback(); 19347 } 19348 } ); 19349 } 19350 }; 19351 } 19352 19353 // Create the abort callback 19354 callback = callback( "abort" ); 19355 19356 try { 19357 19358 // Do send the request (this may raise an exception) 19359 xhr.send( options.hasContent && options.data || null ); 19360 } catch ( e ) { 19361 19362 // #14683: Only rethrow if this hasn't been notified as an error yet 19363 if ( callback ) { 19364 throw e; 19365 } 19366 } 19367 }, 19368 19369 abort: function() { 19370 if ( callback ) { 19371 callback(); 19372 } 19373 } 19374 }; 19375 } 19376} ); 19377 19378 19379 19380 19381// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) 19382jQuery.ajaxPrefilter( function( s ) { 19383 if ( s.crossDomain ) { 19384 s.contents.script = false; 19385 } 19386} ); 19387 19388// Install script dataType 19389jQuery.ajaxSetup( { 19390 accepts: { 19391 script: "text/javascript, application/javascript, " + 19392 "application/ecmascript, application/x-ecmascript" 19393 }, 19394 contents: { 19395 script: /\b(?:java|ecma)script\b/ 19396 }, 19397 converters: { 19398 "text script": function( text ) { 19399 jQuery.globalEval( text ); 19400 return text; 19401 } 19402 } 19403} ); 19404 19405// Handle cache's special case and crossDomain 19406jQuery.ajaxPrefilter( "script", function( s ) { 19407 if ( s.cache === undefined ) { 19408 s.cache = false; 19409 } 19410 if ( s.crossDomain ) { 19411 s.type = "GET"; 19412 } 19413} ); 19414 19415// Bind script tag hack transport 19416jQuery.ajaxTransport( "script", function( s ) { 19417 19418 // This transport only deals with cross domain or forced-by-attrs requests 19419 if ( s.crossDomain || s.scriptAttrs ) { 19420 var script, callback; 19421 return { 19422 send: function( _, complete ) { 19423 script = jQuery( "<script>" ) 19424 .attr( s.scriptAttrs || {} ) 19425 .prop( { charset: s.scriptCharset, src: s.url } ) 19426 .on( "load error", callback = function( evt ) { 19427 script.remove(); 19428 callback = null; 19429 if ( evt ) { 19430 complete( evt.type === "error" ? 404 : 200, evt.type ); 19431 } 19432 } ); 19433 19434 // Use native DOM manipulation to avoid our domManip AJAX trickery 19435 document.head.appendChild( script[ 0 ] ); 19436 }, 19437 abort: function() { 19438 if ( callback ) { 19439 callback(); 19440 } 19441 } 19442 }; 19443 } 19444} ); 19445 19446 19447 19448 19449var oldCallbacks = [], 19450 rjsonp = /(=)\?(?=&|$)|\?\?/; 19451 19452// Default jsonp settings 19453jQuery.ajaxSetup( { 19454 jsonp: "callback", 19455 jsonpCallback: function() { 19456 var callback = oldCallbacks.pop() || ( jQuery.expando + "_" + ( nonce.guid++ ) ); 19457 this[ callback ] = true; 19458 return callback; 19459 } 19460} ); 19461 19462// Detect, normalize options and install callbacks for jsonp requests 19463jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) { 19464 19465 var callbackName, overwritten, responseContainer, 19466 jsonProp = s.jsonp !== false && ( rjsonp.test( s.url ) ? 19467 "url" : 19468 typeof s.data === "string" && 19469 ( s.contentType || "" ) 19470 .indexOf( "application/x-www-form-urlencoded" ) === 0 && 19471 rjsonp.test( s.data ) && "data" 19472 ); 19473 19474 // Handle iff the expected data type is "jsonp" or we have a parameter to set 19475 if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) { 19476 19477 // Get callback name, remembering preexisting value associated with it 19478 callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ? 19479 s.jsonpCallback() : 19480 s.jsonpCallback; 19481 19482 // Insert callback into url or form data 19483 if ( jsonProp ) { 19484 s[ jsonProp ] = s[ jsonProp ].replace( rjsonp, "$1" + callbackName ); 19485 } else if ( s.jsonp !== false ) { 19486 s.url += ( rquery.test( s.url ) ? "&" : "?" ) + s.jsonp + "=" + callbackName; 19487 } 19488 19489 // Use data converter to retrieve json after script execution 19490 s.converters[ "script json" ] = function() { 19491 if ( !responseContainer ) { 19492 jQuery.error( callbackName + " was not called" ); 19493 } 19494 return responseContainer[ 0 ]; 19495 }; 19496 19497 // Force json dataType 19498 s.dataTypes[ 0 ] = "json"; 19499 19500 // Install callback 19501 overwritten = window[ callbackName ]; 19502 window[ callbackName ] = function() { 19503 responseContainer = arguments; 19504 }; 19505 19506 // Clean-up function (fires after converters) 19507 jqXHR.always( function() { 19508 19509 // If previous value didn't exist - remove it 19510 if ( overwritten === undefined ) { 19511 jQuery( window ).removeProp( callbackName ); 19512 19513 // Otherwise restore preexisting value 19514 } else { 19515 window[ callbackName ] = overwritten; 19516 } 19517 19518 // Save back as free 19519 if ( s[ callbackName ] ) { 19520 19521 // Make sure that re-using the options doesn't screw things around 19522 s.jsonpCallback = originalSettings.jsonpCallback; 19523 19524 // Save the callback name for future use 19525 oldCallbacks.push( callbackName ); 19526 } 19527 19528 // Call if it was a function and we have a response 19529 if ( responseContainer && isFunction( overwritten ) ) { 19530 overwritten( responseContainer[ 0 ] ); 19531 } 19532 19533 responseContainer = overwritten = undefined; 19534 } ); 19535 19536 // Delegate to script 19537 return "script"; 19538 } 19539} ); 19540 19541 19542 19543 19544// Support: Safari 8 only 19545// In Safari 8 documents created via document.implementation.createHTMLDocument 19546// collapse sibling forms: the second one becomes a child of the first one. 19547// Because of that, this security measure has to be disabled in Safari 8. 19548// https://bugs.webkit.org/show_bug.cgi?id=137337 19549support.createHTMLDocument = ( function() { 19550 var body = document.implementation.createHTMLDocument( "" ).body; 19551 body.innerHTML = "<form></form><form></form>"; 19552 return body.childNodes.length === 2; 19553} )(); 19554 19555 19556// Argument "data" should be string of html 19557// context (optional): If specified, the fragment will be created in this context, 19558// defaults to document 19559// keepScripts (optional): If true, will include scripts passed in the html string 19560jQuery.parseHTML = function( data, context, keepScripts ) { 19561 if ( typeof data !== "string" ) { 19562 return []; 19563 } 19564 if ( typeof context === "boolean" ) { 19565 keepScripts = context; 19566 context = false; 19567 } 19568 19569 var base, parsed, scripts; 19570 19571 if ( !context ) { 19572 19573 // Stop scripts or inline event handlers from being executed immediately 19574 // by using document.implementation 19575 if ( support.createHTMLDocument ) { 19576 context = document.implementation.createHTMLDocument( "" ); 19577 19578 // Set the base href for the created document 19579 // so any parsed elements with URLs 19580 // are based on the document's URL (gh-2965) 19581 base = context.createElement( "base" ); 19582 base.href = document.location.href; 19583 context.head.appendChild( base ); 19584 } else { 19585 context = document; 19586 } 19587 } 19588 19589 parsed = rsingleTag.exec( data ); 19590 scripts = !keepScripts && []; 19591 19592 // Single tag 19593 if ( parsed ) { 19594 return [ context.createElement( parsed[ 1 ] ) ]; 19595 } 19596 19597 parsed = buildFragment( [ data ], context, scripts ); 19598 19599 if ( scripts && scripts.length ) { 19600 jQuery( scripts ).remove(); 19601 } 19602 19603 return jQuery.merge( [], parsed.childNodes ); 19604}; 19605 19606 19607/** 19608 * Load a url into a page 19609 */ 19610jQuery.fn.load = function( url, params, callback ) { 19611 var selector, type, response, 19612 self = this, 19613 off = url.indexOf( " " ); 19614 19615 if ( off > -1 ) { 19616 selector = stripAndCollapse( url.slice( off ) ); 19617 url = url.slice( 0, off ); 19618 } 19619 19620 // If it's a function 19621 if ( isFunction( params ) ) { 19622 19623 // We assume that it's the callback 19624 callback = params; 19625 params = undefined; 19626 19627 // Otherwise, build a param string 19628 } else if ( params && typeof params === "object" ) { 19629 type = "POST"; 19630 } 19631 19632 // If we have elements to modify, make the request 19633 if ( self.length > 0 ) { 19634 jQuery.ajax( { 19635 url: url, 19636 19637 // If "type" variable is undefined, then "GET" method will be used. 19638 // Make value of this field explicit since 19639 // user can override it through ajaxSetup method 19640 type: type || "GET", 19641 dataType: "html", 19642 data: params 19643 } ).done( function( responseText ) { 19644 19645 // Save response for use in complete callback 19646 response = arguments; 19647 19648 self.html( selector ? 19649 19650 // If a selector was specified, locate the right elements in a dummy div 19651 // Exclude scripts to avoid IE 'Permission Denied' errors 19652 jQuery( "<div>" ).append( jQuery.parseHTML( responseText ) ).find( selector ) : 19653 19654 // Otherwise use the full result 19655 responseText ); 19656 19657 // If the request succeeds, this function gets "data", "status", "jqXHR" 19658 // but they are ignored because response was set above. 19659 // If it fails, this function gets "jqXHR", "status", "error" 19660 } ).always( callback && function( jqXHR, status ) { 19661 self.each( function() { 19662 callback.apply( this, response || [ jqXHR.responseText, status, jqXHR ] ); 19663 } ); 19664 } ); 19665 } 19666 19667 return this; 19668}; 19669 19670 19671 19672 19673jQuery.expr.pseudos.animated = function( elem ) { 19674 return jQuery.grep( jQuery.timers, function( fn ) { 19675 return elem === fn.elem; 19676 } ).length; 19677}; 19678 19679 19680 19681 19682jQuery.offset = { 19683 setOffset: function( elem, options, i ) { 19684 var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, 19685 position = jQuery.css( elem, "position" ), 19686 curElem = jQuery( elem ), 19687 props = {}; 19688 19689 // Set position first, in-case top/left are set even on static elem 19690 if ( position === "static" ) { 19691 elem.style.position = "relative"; 19692 } 19693 19694 curOffset = curElem.offset(); 19695 curCSSTop = jQuery.css( elem, "top" ); 19696 curCSSLeft = jQuery.css( elem, "left" ); 19697 calculatePosition = ( position === "absolute" || position === "fixed" ) && 19698 ( curCSSTop + curCSSLeft ).indexOf( "auto" ) > -1; 19699 19700 // Need to be able to calculate position if either 19701 // top or left is auto and position is either absolute or fixed 19702 if ( calculatePosition ) { 19703 curPosition = curElem.position(); 19704 curTop = curPosition.top; 19705 curLeft = curPosition.left; 19706 19707 } else { 19708 curTop = parseFloat( curCSSTop ) || 0; 19709 curLeft = parseFloat( curCSSLeft ) || 0; 19710 } 19711 19712 if ( isFunction( options ) ) { 19713 19714 // Use jQuery.extend here to allow modification of coordinates argument (gh-1848) 19715 options = options.call( elem, i, jQuery.extend( {}, curOffset ) ); 19716 } 19717 19718 if ( options.top != null ) { 19719 props.top = ( options.top - curOffset.top ) + curTop; 19720 } 19721 if ( options.left != null ) { 19722 props.left = ( options.left - curOffset.left ) + curLeft; 19723 } 19724 19725 if ( "using" in options ) { 19726 options.using.call( elem, props ); 19727 19728 } else { 19729 curElem.css( props ); 19730 } 19731 } 19732}; 19733 19734jQuery.fn.extend( { 19735 19736 // offset() relates an element's border box to the document origin 19737 offset: function( options ) { 19738 19739 // Preserve chaining for setter 19740 if ( arguments.length ) { 19741 return options === undefined ? 19742 this : 19743 this.each( function( i ) { 19744 jQuery.offset.setOffset( this, options, i ); 19745 } ); 19746 } 19747 19748 var rect, win, 19749 elem = this[ 0 ]; 19750 19751 if ( !elem ) { 19752 return; 19753 } 19754 19755 // Return zeros for disconnected and hidden (display: none) elements (gh-2310) 19756 // Support: IE <=11 only 19757 // Running getBoundingClientRect on a 19758 // disconnected node in IE throws an error 19759 if ( !elem.getClientRects().length ) { 19760 return { top: 0, left: 0 }; 19761 } 19762 19763 // Get document-relative position by adding viewport scroll to viewport-relative gBCR 19764 rect = elem.getBoundingClientRect(); 19765 win = elem.ownerDocument.defaultView; 19766 return { 19767 top: rect.top + win.pageYOffset, 19768 left: rect.left + win.pageXOffset 19769 }; 19770 }, 19771 19772 // position() relates an element's margin box to its offset parent's padding box 19773 // This corresponds to the behavior of CSS absolute positioning 19774 position: function() { 19775 if ( !this[ 0 ] ) { 19776 return; 19777 } 19778 19779 var offsetParent, offset, doc, 19780 elem = this[ 0 ], 19781 parentOffset = { top: 0, left: 0 }; 19782 19783 // position:fixed elements are offset from the viewport, which itself always has zero offset 19784 if ( jQuery.css( elem, "position" ) === "fixed" ) { 19785 19786 // Assume position:fixed implies availability of getBoundingClientRect 19787 offset = elem.getBoundingClientRect(); 19788 19789 } else { 19790 offset = this.offset(); 19791 19792 // Account for the *real* offset parent, which can be the document or its root element 19793 // when a statically positioned element is identified 19794 doc = elem.ownerDocument; 19795 offsetParent = elem.offsetParent || doc.documentElement; 19796 while ( offsetParent && 19797 ( offsetParent === doc.body || offsetParent === doc.documentElement ) && 19798 jQuery.css( offsetParent, "position" ) === "static" ) { 19799 19800 offsetParent = offsetParent.parentNode; 19801 } 19802 if ( offsetParent && offsetParent !== elem && offsetParent.nodeType === 1 ) { 19803 19804 // Incorporate borders into its offset, since they are outside its content origin 19805 parentOffset = jQuery( offsetParent ).offset(); 19806 parentOffset.top += jQuery.css( offsetParent, "borderTopWidth", true ); 19807 parentOffset.left += jQuery.css( offsetParent, "borderLeftWidth", true ); 19808 } 19809 } 19810 19811 // Subtract parent offsets and element margins 19812 return { 19813 top: offset.top - parentOffset.top - jQuery.css( elem, "marginTop", true ), 19814 left: offset.left - parentOffset.left - jQuery.css( elem, "marginLeft", true ) 19815 }; 19816 }, 19817 19818 // This method will return documentElement in the following cases: 19819 // 1) For the element inside the iframe without offsetParent, this method will return 19820 // documentElement of the parent window 19821 // 2) For the hidden or detached element 19822 // 3) For body or html element, i.e. in case of the html node - it will return itself 19823 // 19824 // but those exceptions were never presented as a real life use-cases 19825 // and might be considered as more preferable results. 19826 // 19827 // This logic, however, is not guaranteed and can change at any point in the future 19828 offsetParent: function() { 19829 return this.map( function() { 19830 var offsetParent = this.offsetParent; 19831 19832 while ( offsetParent && jQuery.css( offsetParent, "position" ) === "static" ) { 19833 offsetParent = offsetParent.offsetParent; 19834 } 19835 19836 return offsetParent || documentElement; 19837 } ); 19838 } 19839} ); 19840 19841// Create scrollLeft and scrollTop methods 19842jQuery.each( { scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function( method, prop ) { 19843 var top = "pageYOffset" === prop; 19844 19845 jQuery.fn[ method ] = function( val ) { 19846 return access( this, function( elem, method, val ) { 19847 19848 // Coalesce documents and windows 19849 var win; 19850 if ( isWindow( elem ) ) { 19851 win = elem; 19852 } else if ( elem.nodeType === 9 ) { 19853 win = elem.defaultView; 19854 } 19855 19856 if ( val === undefined ) { 19857 return win ? win[ prop ] : elem[ method ]; 19858 } 19859 19860 if ( win ) { 19861 win.scrollTo( 19862 !top ? val : win.pageXOffset, 19863 top ? val : win.pageYOffset 19864 ); 19865 19866 } else { 19867 elem[ method ] = val; 19868 } 19869 }, method, val, arguments.length ); 19870 }; 19871} ); 19872 19873// Support: Safari <=7 - 9.1, Chrome <=37 - 49 19874// Add the top/left cssHooks using jQuery.fn.position 19875// Webkit bug: https://bugs.webkit.org/show_bug.cgi?id=29084 19876// Blink bug: https://bugs.chromium.org/p/chromium/issues/detail?id=589347 19877// getComputedStyle returns percent when specified for top/left/bottom/right; 19878// rather than make the css module depend on the offset module, just check for it here 19879jQuery.each( [ "top", "left" ], function( _i, prop ) { 19880 jQuery.cssHooks[ prop ] = addGetHookIf( support.pixelPosition, 19881 function( elem, computed ) { 19882 if ( computed ) { 19883 computed = curCSS( elem, prop ); 19884 19885 // If curCSS returns percentage, fallback to offset 19886 return rnumnonpx.test( computed ) ? 19887 jQuery( elem ).position()[ prop ] + "px" : 19888 computed; 19889 } 19890 } 19891 ); 19892} ); 19893 19894 19895// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods 19896jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { 19897 jQuery.each( { 19898 padding: "inner" + name, 19899 content: type, 19900 "": "outer" + name 19901 }, function( defaultExtra, funcName ) { 19902 19903 // Margin is only for outerHeight, outerWidth 19904 jQuery.fn[ funcName ] = function( margin, value ) { 19905 var chainable = arguments.length && ( defaultExtra || typeof margin !== "boolean" ), 19906 extra = defaultExtra || ( margin === true || value === true ? "margin" : "border" ); 19907 19908 return access( this, function( elem, type, value ) { 19909 var doc; 19910 19911 if ( isWindow( elem ) ) { 19912 19913 // $( window ).outerWidth/Height return w/h including scrollbars (gh-1729) 19914 return funcName.indexOf( "outer" ) === 0 ? 19915 elem[ "inner" + name ] : 19916 elem.document.documentElement[ "client" + name ]; 19917 } 19918 19919 // Get document width or height 19920 if ( elem.nodeType === 9 ) { 19921 doc = elem.documentElement; 19922 19923 // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], 19924 // whichever is greatest 19925 return Math.max( 19926 elem.body[ "scroll" + name ], doc[ "scroll" + name ], 19927 elem.body[ "offset" + name ], doc[ "offset" + name ], 19928 doc[ "client" + name ] 19929 ); 19930 } 19931 19932 return value === undefined ? 19933 19934 // Get width or height on the element, requesting but not forcing parseFloat 19935 jQuery.css( elem, type, extra ) : 19936 19937 // Set width or height on the element 19938 jQuery.style( elem, type, value, extra ); 19939 }, type, chainable ? margin : undefined, chainable ); 19940 }; 19941 } ); 19942} ); 19943 19944 19945jQuery.each( [ 19946 "ajaxStart", 19947 "ajaxStop", 19948 "ajaxComplete", 19949 "ajaxError", 19950 "ajaxSuccess", 19951 "ajaxSend" 19952], function( _i, type ) { 19953 jQuery.fn[ type ] = function( fn ) { 19954 return this.on( type, fn ); 19955 }; 19956} ); 19957 19958 19959 19960 19961jQuery.fn.extend( { 19962 19963 bind: function( types, data, fn ) { 19964 return this.on( types, null, data, fn ); 19965 }, 19966 unbind: function( types, fn ) { 19967 return this.off( types, null, fn ); 19968 }, 19969 19970 delegate: function( selector, types, data, fn ) { 19971 return this.on( types, selector, data, fn ); 19972 }, 19973 undelegate: function( selector, types, fn ) { 19974 19975 // ( namespace ) or ( selector, types [, fn] ) 19976 return arguments.length === 1 ? 19977 this.off( selector, "**" ) : 19978 this.off( types, selector || "**", fn ); 19979 }, 19980 19981 hover: function( fnOver, fnOut ) { 19982 return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 19983 } 19984} ); 19985 19986jQuery.each( 19987 ( "blur focus focusin focusout resize scroll click dblclick " + 19988 "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 19989 "change select submit keydown keypress keyup contextmenu" ).split( " " ), 19990 function( _i, name ) { 19991 19992 // Handle event binding 19993 jQuery.fn[ name ] = function( data, fn ) { 19994 return arguments.length > 0 ? 19995 this.on( name, null, data, fn ) : 19996 this.trigger( name ); 19997 }; 19998 } 19999); 20000 20001 20002 20003 20004// Support: Android <=4.0 only 20005// Make sure we trim BOM and NBSP 20006var rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; 20007 20008// Bind a function to a context, optionally partially applying any 20009// arguments. 20010// jQuery.proxy is deprecated to promote standards (specifically Function#bind) 20011// However, it is not slated for removal any time soon 20012jQuery.proxy = function( fn, context ) { 20013 var tmp, args, proxy; 20014 20015 if ( typeof context === "string" ) { 20016 tmp = fn[ context ]; 20017 context = fn; 20018 fn = tmp; 20019 } 20020 20021 // Quick check to determine if target is callable, in the spec 20022 // this throws a TypeError, but we will just return undefined. 20023 if ( !isFunction( fn ) ) { 20024 return undefined; 20025 } 20026 20027 // Simulated bind 20028 args = slice.call( arguments, 2 ); 20029 proxy = function() { 20030 return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); 20031 }; 20032 20033 // Set the guid of unique handler to the same of original handler, so it can be removed 20034 proxy.guid = fn.guid = fn.guid || jQuery.guid++; 20035 20036 return proxy; 20037}; 20038 20039jQuery.holdReady = function( hold ) { 20040 if ( hold ) { 20041 jQuery.readyWait++; 20042 } else { 20043 jQuery.ready( true ); 20044 } 20045}; 20046jQuery.isArray = Array.isArray; 20047jQuery.parseJSON = JSON.parse; 20048jQuery.nodeName = nodeName; 20049jQuery.isFunction = isFunction; 20050jQuery.isWindow = isWindow; 20051jQuery.camelCase = camelCase; 20052jQuery.type = toType; 20053 20054jQuery.now = Date.now; 20055 20056jQuery.isNumeric = function( obj ) { 20057 20058 // As of jQuery 3.0, isNumeric is limited to 20059 // strings and numbers (primitives or objects) 20060 // that can be coerced to finite numbers (gh-2662) 20061 var type = jQuery.type( obj ); 20062 return ( type === "number" || type === "string" ) && 20063 20064 // parseFloat NaNs numeric-cast false positives ("") 20065 // ...but misinterprets leading-number strings, particularly hex literals ("0x...") 20066 // subtraction forces infinities to NaN 20067 !isNaN( obj - parseFloat( obj ) ); 20068}; 20069 20070jQuery.trim = function( text ) { 20071 return text == null ? 20072 "" : 20073 ( text + "" ).replace( rtrim, "" ); 20074}; 20075 20076 20077 20078// Register as a named AMD module, since jQuery can be concatenated with other 20079// files that may use define, but not via a proper concatenation script that 20080// understands anonymous AMD modules. A named AMD is safest and most robust 20081// way to register. Lowercase jquery is used because AMD module names are 20082// derived from file names, and jQuery is normally delivered in a lowercase 20083// file name. Do this after creating the global so that if an AMD module wants 20084// to call noConflict to hide this version of jQuery, it will work. 20085 20086// Note that for maximum portability, libraries that are not jQuery should 20087// declare themselves as anonymous modules, and avoid setting a global if an 20088// AMD loader is present. jQuery is a special case. For more information, see 20089// https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 20090 20091if ( true ) { 20092 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function() { 20093 return jQuery; 20094 }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), 20095 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 20096} 20097 20098 20099 20100 20101var 20102 20103 // Map over jQuery in case of overwrite 20104 _jQuery = window.jQuery, 20105 20106 // Map over the $ in case of overwrite 20107 _$ = window.$; 20108 20109jQuery.noConflict = function( deep ) { 20110 if ( window.$ === jQuery ) { 20111 window.$ = _$; 20112 } 20113 20114 if ( deep && window.jQuery === jQuery ) { 20115 window.jQuery = _jQuery; 20116 } 20117 20118 return jQuery; 20119}; 20120 20121// Expose jQuery and $ identifiers, even in AMD 20122// (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 20123// and CommonJS for browser emulators (#13566) 20124if ( typeof noGlobal === "undefined" ) { 20125 window.jQuery = window.$ = jQuery; 20126} 20127 20128 20129 20130 20131return jQuery; 20132} ); 20133 20134 20135/***/ }), 20136
vendor: 25,413 bytes, lines 20137-20919
20137/***/ "../../../../../node_modules/mustache/mustache.js": 20138/*!****************************************************************************!*\ 20139 !*** /Users/mauro/Sites/eternalsunspire/node_modules/mustache/mustache.js ***! 20140 \****************************************************************************/ 20141/*! no static exports found */ 20142/***/ (function(module, exports, __webpack_require__) { 20143 20144// This file has been generated from mustache.mjs 20145(function (global, factory) { 20146 true ? module.exports = factory() : 20147 undefined; 20148}(this, (function () { 'use strict'; 20149 20150 /*! 20151 * mustache.js - Logic-less {{mustache}} templates with JavaScript 20152 * http://github.com/janl/mustache.js 20153 */ 20154 20155 var objectToString = Object.prototype.toString; 20156 var isArray = Array.isArray || function isArrayPolyfill (object) { 20157 return objectToString.call(object) === '[object Array]'; 20158 }; 20159 20160 function isFunction (object) { 20161 return typeof object === 'function'; 20162 } 20163 20164 /** 20165 * More correct typeof string handling array 20166 * which normally returns typeof 'object' 20167 */ 20168 function typeStr (obj) { 20169 return isArray(obj) ? 'array' : typeof obj; 20170 } 20171 20172 function escapeRegExp (string) { 20173 return string.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&'); 20174 } 20175 20176 /** 20177 * Null safe way of checking whether or not an object, 20178 * including its prototype, has a given property 20179 */ 20180 function hasProperty (obj, propName) { 20181 return obj != null && typeof obj === 'object' && (propName in obj); 20182 } 20183 20184 /** 20185 * Safe way of detecting whether or not the given thing is a primitive and 20186 * whether it has the given property 20187 */ 20188 function primitiveHasOwnProperty (primitive, propName) { 20189 return ( 20190 primitive != null 20191 && typeof primitive !== 'object' 20192 && primitive.hasOwnProperty 20193 && primitive.hasOwnProperty(propName) 20194 ); 20195 } 20196 20197 // Workaround for https://issues.apache.org/jira/browse/COUCHDB-577 20198 // See https://github.com/janl/mustache.js/issues/189 20199 var regExpTest = RegExp.prototype.test; 20200 function testRegExp (re, string) { 20201 return regExpTest.call(re, string); 20202 } 20203 20204 var nonSpaceRe = /\S/; 20205 function isWhitespace (string) { 20206 return !testRegExp(nonSpaceRe, string); 20207 } 20208 20209 var entityMap = { 20210 '&': '&', 20211 '<': '<', 20212 '>': '>', 20213 '"': '"', 20214 "'": ''', 20215 '/': '/', 20216 '`': '`', 20217 '=': '=' 20218 }; 20219 20220 function escapeHtml (string) { 20221 return String(string).replace(/[&<>"'`=\/]/g, function fromEntityMap (s) { 20222 return entityMap[s]; 20223 }); 20224 } 20225 20226 var whiteRe = /\s*/; 20227 var spaceRe = /\s+/; 20228 var equalsRe = /\s*=/; 20229 var curlyRe = /\s*\}/; 20230 var tagRe = /#|\^|\/|>|\{|&|=|!/; 20231 20232 /** 20233 * Breaks up the given `template` string into a tree of tokens. If the `tags` 20234 * argument is given here it must be an array with two string values: the 20235 * opening and closing tags used in the template (e.g. [ "<%", "%>" ]). Of 20236 * course, the default is to use mustaches (i.e. mustache.tags). 20237 * 20238 * A token is an array with at least 4 elements. The first element is the 20239 * mustache symbol that was used inside the tag, e.g. "#" or "&". If the tag 20240 * did not contain a symbol (i.e. {{myValue}}) this element is "name". For 20241 * all text that appears outside a symbol this element is "text". 20242 * 20243 * The second element of a token is its "value". For mustache tags this is 20244 * whatever else was inside the tag besides the opening symbol. For text tokens 20245 * this is the text itself. 20246 * 20247 * The third and fourth elements of the token are the start and end indices, 20248 * respectively, of the token in the original template. 20249 * 20250 * Tokens that are the root node of a subtree contain two more elements: 1) an 20251 * array of tokens in the subtree and 2) the index in the original template at 20252 * which the closing tag for that section begins. 20253 * 20254 * Tokens for partials also contain two more elements: 1) a string value of 20255 * indendation prior to that tag and 2) the index of that tag on that line - 20256 * eg a value of 2 indicates the partial is the third tag on this line. 20257 */ 20258 function parseTemplate (template, tags) { 20259 if (!template) 20260 return []; 20261 var lineHasNonSpace = false; 20262 var sections = []; // Stack to hold section tokens 20263 var tokens = []; // Buffer to hold the tokens 20264 var spaces = []; // Indices of whitespace tokens on the current line 20265 var hasTag = false; // Is there a {{tag}} on the current line? 20266 var nonSpace = false; // Is there a non-space char on the current line? 20267 var indentation = ''; // Tracks indentation for tags that use it 20268 var tagIndex = 0; // Stores a count of number of tags encountered on a line 20269 20270 // Strips all whitespace tokens array for the current line 20271 // if there was a {{#tag}} on it and otherwise only space. 20272 function stripSpace () { 20273 if (hasTag && !nonSpace) { 20274 while (spaces.length) 20275 delete tokens[spaces.pop()]; 20276 } else { 20277 spaces = []; 20278 } 20279 20280 hasTag = false; 20281 nonSpace = false; 20282 } 20283 20284 var openingTagRe, closingTagRe, closingCurlyRe; 20285 function compileTags (tagsToCompile) { 20286 if (typeof tagsToCompile === 'string') 20287 tagsToCompile = tagsToCompile.split(spaceRe, 2); 20288 20289 if (!isArray(tagsToCompile) || tagsToCompile.length !== 2) 20290 throw new Error('Invalid tags: ' + tagsToCompile); 20291 20292 openingTagRe = new RegExp(escapeRegExp(tagsToCompile[0]) + '\\s*'); 20293 closingTagRe = new RegExp('\\s*' + escapeRegExp(tagsToCompile[1])); 20294 closingCurlyRe = new RegExp('\\s*' + escapeRegExp('}' + tagsToCompile[1])); 20295 } 20296 20297 compileTags(tags || mustache.tags); 20298 20299 var scanner = new Scanner(template); 20300 20301 var start, type, value, chr, token, openSection; 20302 while (!scanner.eos()) { 20303 start = scanner.pos; 20304 20305 // Match any text between tags. 20306 value = scanner.scanUntil(openingTagRe); 20307 20308 if (value) { 20309 for (var i = 0, valueLength = value.length; i < valueLength; ++i) { 20310 chr = value.charAt(i); 20311 20312 if (isWhitespace(chr)) { 20313 spaces.push(tokens.length); 20314 indentation += chr; 20315 } else { 20316 nonSpace = true; 20317 lineHasNonSpace = true; 20318 indentation += ' '; 20319 } 20320 20321 tokens.push([ 'text', chr, start, start + 1 ]); 20322 start += 1; 20323 20324 // Check for whitespace on the current line. 20325 if (chr === '\n') { 20326 stripSpace(); 20327 indentation = ''; 20328 tagIndex = 0; 20329 lineHasNonSpace = false; 20330 } 20331 } 20332 } 20333 20334 // Match the opening tag. 20335 if (!scanner.scan(openingTagRe)) 20336 break; 20337 20338 hasTag = true; 20339 20340 // Get the tag type. 20341 type = scanner.scan(tagRe) || 'name'; 20342 scanner.scan(whiteRe); 20343 20344 // Get the tag value. 20345 if (type === '=') { 20346 value = scanner.scanUntil(equalsRe); 20347 scanner.scan(equalsRe); 20348 scanner.scanUntil(closingTagRe); 20349 } else if (type === '{') { 20350 value = scanner.scanUntil(closingCurlyRe); 20351 scanner.scan(curlyRe); 20352 scanner.scanUntil(closingTagRe); 20353 type = '&'; 20354 } else { 20355 value = scanner.scanUntil(closingTagRe); 20356 } 20357 20358 // Match the closing tag. 20359 if (!scanner.scan(closingTagRe)) 20360 throw new Error('Unclosed tag at ' + scanner.pos); 20361 20362 if (type == '>') { 20363 token = [ type, value, start, scanner.pos, indentation, tagIndex, lineHasNonSpace ]; 20364 } else { 20365 token = [ type, value, start, scanner.pos ]; 20366 } 20367 tagIndex++; 20368 tokens.push(token); 20369 20370 if (type === '#' || type === '^') { 20371 sections.push(token); 20372 } else if (type === '/') { 20373 // Check section nesting. 20374 openSection = sections.pop(); 20375 20376 if (!openSection) 20377 throw new Error('Unopened section "' + value + '" at ' + start); 20378 20379 if (openSection[1] !== value) 20380 throw new Error('Unclosed section "' + openSection[1] + '" at ' + start); 20381 } else if (type === 'name' || type === '{' || type === '&') { 20382 nonSpace = true; 20383 } else if (type === '=') { 20384 // Set the tags for the next time around. 20385 compileTags(value); 20386 } 20387 } 20388 20389 stripSpace(); 20390 20391 // Make sure there are no open sections when we're done. 20392 openSection = sections.pop(); 20393 20394 if (openSection) 20395 throw new Error('Unclosed section "' + openSection[1] + '" at ' + scanner.pos); 20396 20397 return nestTokens(squashTokens(tokens)); 20398 } 20399 20400 /** 20401 * Combines the values of consecutive text tokens in the given `tokens` array 20402 * to a single token. 20403 */ 20404 function squashTokens (tokens) { 20405 var squashedTokens = []; 20406 20407 var token, lastToken; 20408 for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { 20409 token = tokens[i]; 20410 20411 if (token) { 20412 if (token[0] === 'text' && lastToken && lastToken[0] === 'text') { 20413 lastToken[1] += token[1]; 20414 lastToken[3] = token[3]; 20415 } else { 20416 squashedTokens.push(token); 20417 lastToken = token; 20418 } 20419 } 20420 } 20421 20422 return squashedTokens; 20423 } 20424 20425 /** 20426 * Forms the given array of `tokens` into a nested tree structure where 20427 * tokens that represent a section have two additional items: 1) an array of 20428 * all tokens that appear in that section and 2) the index in the original 20429 * template that represents the end of that section. 20430 */ 20431 function nestTokens (tokens) { 20432 var nestedTokens = []; 20433 var collector = nestedTokens; 20434 var sections = []; 20435 20436 var token, section; 20437 for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { 20438 token = tokens[i]; 20439 20440 switch (token[0]) { 20441 case '#': 20442 case '^': 20443 collector.push(token); 20444 sections.push(token); 20445 collector = token[4] = []; 20446 break; 20447 case '/': 20448 section = sections.pop(); 20449 section[5] = token[2]; 20450 collector = sections.length > 0 ? sections[sections.length - 1][4] : nestedTokens; 20451 break; 20452 default: 20453 collector.push(token); 20454 } 20455 } 20456 20457 return nestedTokens; 20458 } 20459 20460 /** 20461 * A simple string scanner that is used by the template parser to find 20462 * tokens in template strings. 20463 */ 20464 function Scanner (string) { 20465 this.string = string; 20466 this.tail = string; 20467 this.pos = 0; 20468 } 20469 20470 /** 20471 * Returns `true` if the tail is empty (end of string). 20472 */ 20473 Scanner.prototype.eos = function eos () { 20474 return this.tail === ''; 20475 }; 20476 20477 /** 20478 * Tries to match the given regular expression at the current position. 20479 * Returns the matched text if it can match, the empty string otherwise. 20480 */ 20481 Scanner.prototype.scan = function scan (re) { 20482 var match = this.tail.match(re); 20483 20484 if (!match || match.index !== 0) 20485 return ''; 20486 20487 var string = match[0]; 20488 20489 this.tail = this.tail.substring(string.length); 20490 this.pos += string.length; 20491 20492 return string; 20493 }; 20494 20495 /** 20496 * Skips all text until the given regular expression can be matched. Returns 20497 * the skipped string, which is the entire tail if no match can be made. 20498 */ 20499 Scanner.prototype.scanUntil = function scanUntil (re) { 20500 var index = this.tail.search(re), match; 20501 20502 switch (index) { 20503 case -1: 20504 match = this.tail; 20505 this.tail = ''; 20506 break; 20507 case 0: 20508 match = ''; 20509 break; 20510 default: 20511 match = this.tail.substring(0, index); 20512 this.tail = this.tail.substring(index); 20513 } 20514 20515 this.pos += match.length; 20516 20517 return match; 20518 }; 20519 20520 /** 20521 * Represents a rendering context by wrapping a view object and 20522 * maintaining a reference to the parent context. 20523 */ 20524 function Context (view, parentContext) { 20525 this.view = view; 20526 this.cache = { '.': this.view }; 20527 this.parent = parentContext; 20528 } 20529 20530 /** 20531 * Creates a new context using the given view with this context 20532 * as the parent. 20533 */ 20534 Context.prototype.push = function push (view) { 20535 return new Context(view, this); 20536 }; 20537 20538 /** 20539 * Returns the value of the given name in this context, traversing 20540 * up the context hierarchy if the value is absent in this context's view. 20541 */ 20542 Context.prototype.lookup = function lookup (name) { 20543 var cache = this.cache; 20544 20545 var value; 20546 if (cache.hasOwnProperty(name)) { 20547 value = cache[name]; 20548 } else { 20549 var context = this, intermediateValue, names, index, lookupHit = false; 20550 20551 while (context) { 20552 if (name.indexOf('.') > 0) { 20553 intermediateValue = context.view; 20554 names = name.split('.'); 20555 index = 0; 20556 20557 /** 20558 * Using the dot notion path in `name`, we descend through the 20559 * nested objects. 20560 * 20561 * To be certain that the lookup has been successful, we have to 20562 * check if the last object in the path actually has the property 20563 * we are looking for. We store the result in `lookupHit`. 20564 * 20565 * This is specially necessary for when the value has been set to 20566 * `undefined` and we want to avoid looking up parent contexts. 20567 * 20568 * In the case where dot notation is used, we consider the lookup 20569 * to be successful even if the last "object" in the path is 20570 * not actually an object but a primitive (e.g., a string, or an 20571 * integer), because it is sometimes useful to access a property 20572 * of an autoboxed primitive, such as the length of a string. 20573 **/ 20574 while (intermediateValue != null && index < names.length) { 20575 if (index === names.length - 1) 20576 lookupHit = ( 20577 hasProperty(intermediateValue, names[index]) 20578 || primitiveHasOwnProperty(intermediateValue, names[index]) 20579 ); 20580 20581 intermediateValue = intermediateValue[names[index++]]; 20582 } 20583 } else { 20584 intermediateValue = context.view[name]; 20585 20586 /** 20587 * Only checking against `hasProperty`, which always returns `false` if 20588 * `context.view` is not an object. Deliberately omitting the check 20589 * against `primitiveHasOwnProperty` if dot notation is not used. 20590 * 20591 * Consider this example: 20592 * ``` 20593 * Mustache.render("The length of a football field is {{#length}}{{length}}{{/length}}.", {length: "100 yards"}) 20594 * ``` 20595 * 20596 * If we were to check also against `primitiveHasOwnProperty`, as we do 20597 * in the dot notation case, then render call would return: 20598 * 20599 * "The length of a football field is 9." 20600 * 20601 * rather than the expected: 20602 * 20603 * "The length of a football field is 100 yards." 20604 **/ 20605 lookupHit = hasProperty(context.view, name); 20606 } 20607 20608 if (lookupHit) { 20609 value = intermediateValue; 20610 break; 20611 } 20612 20613 context = context.parent; 20614 } 20615 20616 cache[name] = value; 20617 } 20618 20619 if (isFunction(value)) 20620 value = value.call(this.view); 20621 20622 return value; 20623 }; 20624 20625 /** 20626 * A Writer knows how to take a stream of tokens and render them to a 20627 * string, given a context. It also maintains a cache of templates to 20628 * avoid the need to parse the same template twice. 20629 */ 20630 function Writer () { 20631 this.templateCache = { 20632 _cache: {}, 20633 set: function set (key, value) { 20634 this._cache[key] = value; 20635 }, 20636 get: function get (key) { 20637 return this._cache[key]; 20638 }, 20639 clear: function clear () { 20640 this._cache = {}; 20641 } 20642 }; 20643 } 20644 20645 /** 20646 * Clears all cached templates in this writer. 20647 */ 20648 Writer.prototype.clearCache = function clearCache () { 20649 if (typeof this.templateCache !== 'undefined') { 20650 this.templateCache.clear(); 20651 } 20652 }; 20653 20654 /** 20655 * Parses and caches the given `template` according to the given `tags` or 20656 * `mustache.tags` if `tags` is omitted, and returns the array of tokens 20657 * that is generated from the parse. 20658 */ 20659 Writer.prototype.parse = function parse (template, tags) { 20660 var cache = this.templateCache; 20661 var cacheKey = template + ':' + (tags || mustache.tags).join(':'); 20662 var isCacheEnabled = typeof cache !== 'undefined'; 20663 var tokens = isCacheEnabled ? cache.get(cacheKey) : undefined; 20664 20665 if (tokens == undefined) { 20666 tokens = parseTemplate(template, tags); 20667 isCacheEnabled && cache.set(cacheKey, tokens); 20668 } 20669 return tokens; 20670 }; 20671 20672 /** 20673 * High-level method that is used to render the given `template` with 20674 * the given `view`. 20675 * 20676 * The optional `partials` argument may be an object that contains the 20677 * names and templates of partials that are used in the template. It may 20678 * also be a function that is used to load partial templates on the fly 20679 * that takes a single argument: the name of the partial. 20680 * 20681 * If the optional `config` argument is given here, then it should be an 20682 * object with a `tags` attribute or an `escape` attribute or both. 20683 * If an array is passed, then it will be interpreted the same way as 20684 * a `tags` attribute on a `config` object. 20685 * 20686 * The `tags` attribute of a `config` object must be an array with two 20687 * string values: the opening and closing tags used in the template (e.g. 20688 * [ "<%", "%>" ]). The default is to mustache.tags. 20689 * 20690 * The `escape` attribute of a `config` object must be a function which 20691 * accepts a string as input and outputs a safely escaped string. 20692 * If an `escape` function is not provided, then an HTML-safe string 20693 * escaping function is used as the default. 20694 */ 20695 Writer.prototype.render = function render (template, view, partials, config) { 20696 var tags = this.getConfigTags(config); 20697 var tokens = this.parse(template, tags); 20698 var context = (view instanceof Context) ? view : new Context(view, undefined); 20699 return this.renderTokens(tokens, context, partials, template, config); 20700 }; 20701 20702 /** 20703 * Low-level method that renders the given array of `tokens` using 20704 * the given `context` and `partials`. 20705 * 20706 * Note: The `originalTemplate` is only ever used to extract the portion 20707 * of the original template that was contained in a higher-order section. 20708 * If the template doesn't use higher-order sections, this argument may 20709 * be omitted. 20710 */ 20711 Writer.prototype.renderTokens = function renderTokens (tokens, context, partials, originalTemplate, config) { 20712 var buffer = ''; 20713 20714 var token, symbol, value; 20715 for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) { 20716 value = undefined; 20717 token = tokens[i]; 20718 symbol = token[0]; 20719 20720 if (symbol === '#') value = this.renderSection(token, context, partials, originalTemplate, config); 20721 else if (symbol === '^') value = this.renderInverted(token, context, partials, originalTemplate, config); 20722 else if (symbol === '>') value = this.renderPartial(token, context, partials, config); 20723 else if (symbol === '&') value = this.unescapedValue(token, context); 20724 else if (symbol === 'name') value = this.escapedValue(token, context, config); 20725 else if (symbol === 'text') value = this.rawValue(token); 20726 20727 if (value !== undefined) 20728 buffer += value; 20729 } 20730 20731 return buffer; 20732 }; 20733 20734 Writer.prototype.renderSection = function renderSection (token, context, partials, originalTemplate, config) { 20735 var self = this; 20736 var buffer = ''; 20737 var value = context.lookup(token[1]); 20738 20739 // This function is used to render an arbitrary template 20740 // in the current context by higher-order sections. 20741 function subRender (template) { 20742 return self.render(template, context, partials, config); 20743 } 20744 20745 if (!value) return; 20746 20747 if (isArray(value)) { 20748 for (var j = 0, valueLength = value.length; j < valueLength; ++j) { 20749 buffer += this.renderTokens(token[4], context.push(value[j]), partials, originalTemplate, config); 20750 } 20751 } else if (typeof value === 'object' || typeof value === 'string' || typeof value === 'number') { 20752 buffer += this.renderTokens(token[4], context.push(value), partials, originalTemplate, config); 20753 } else if (isFunction(value)) { 20754 if (typeof originalTemplate !== 'string') 20755 throw new Error('Cannot use higher-order sections without the original template'); 20756 20757 // Extract the portion of the original template that the section contains. 20758 value = value.call(context.view, originalTemplate.slice(token[3], token[5]), subRender); 20759 20760 if (value != null) 20761 buffer += value; 20762 } else { 20763 buffer += this.renderTokens(token[4], context, partials, originalTemplate, config); 20764 } 20765 return buffer; 20766 }; 20767 20768 Writer.prototype.renderInverted = function renderInverted (token, context, partials, originalTemplate, config) { 20769 var value = context.lookup(token[1]); 20770 20771 // Use JavaScript's definition of falsy. Include empty arrays. 20772 // See https://github.com/janl/mustache.js/issues/186 20773 if (!value || (isArray(value) && value.length === 0)) 20774 return this.renderTokens(token[4], context, partials, originalTemplate, config); 20775 }; 20776 20777 Writer.prototype.indentPartial = function indentPartial (partial, indentation, lineHasNonSpace) { 20778 var filteredIndentation = indentation.replace(/[^ \t]/g, ''); 20779 var partialByNl = partial.split('\n'); 20780 for (var i = 0; i < partialByNl.length; i++) { 20781 if (partialByNl[i].length && (i > 0 || !lineHasNonSpace)) { 20782 partialByNl[i] = filteredIndentation + partialByNl[i]; 20783 } 20784 } 20785 return partialByNl.join('\n'); 20786 }; 20787 20788 Writer.prototype.renderPartial = function renderPartial (token, context, partials, config) { 20789 if (!partials) return; 20790 var tags = this.getConfigTags(config); 20791 20792 var value = isFunction(partials) ? partials(token[1]) : partials[token[1]]; 20793 if (value != null) { 20794 var lineHasNonSpace = token[6]; 20795 var tagIndex = token[5]; 20796 var indentation = token[4]; 20797 var indentedValue = value; 20798 if (tagIndex == 0 && indentation) { 20799 indentedValue = this.indentPartial(value, indentation, lineHasNonSpace); 20800 } 20801 var tokens = this.parse(indentedValue, tags); 20802 return this.renderTokens(tokens, context, partials, indentedValue, config); 20803 } 20804 }; 20805 20806 Writer.prototype.unescapedValue = function unescapedValue (token, context) { 20807 var value = context.lookup(token[1]); 20808 if (value != null) 20809 return value; 20810 }; 20811 20812 Writer.prototype.escapedValue = function escapedValue (token, context, config) { 20813 var escape = this.getConfigEscape(config) || mustache.escape; 20814 var value = context.lookup(token[1]); 20815 if (value != null) 20816 return (typeof value === 'number' && escape === mustache.escape) ? String(value) : escape(value); 20817 }; 20818 20819 Writer.prototype.rawValue = function rawValue (token) { 20820 return token[1]; 20821 }; 20822 20823 Writer.prototype.getConfigTags = function getConfigTags (config) { 20824 if (isArray(config)) { 20825 return config; 20826 } 20827 else if (config && typeof config === 'object') { 20828 return config.tags; 20829 } 20830 else { 20831 return undefined; 20832 } 20833 }; 20834 20835 Writer.prototype.getConfigEscape = function getConfigEscape (config) { 20836 if (config && typeof config === 'object' && !isArray(config)) { 20837 return config.escape; 20838 } 20839 else { 20840 return undefined; 20841 } 20842 }; 20843 20844 var mustache = { 20845 name: 'mustache.js', 20846 version: '4.1.0', 20847 tags: [ '{{', '}}' ], 20848 clearCache: undefined, 20849 escape: undefined, 20850 parse: undefined, 20851 render: undefined, 20852 Scanner: undefined, 20853 Context: undefined, 20854 Writer: undefined, 20855 /** 20856 * Allows a user to override the default caching strategy, by providing an 20857 * object with set, get and clear methods. This can also be used to disable 20858 * the cache by setting it to the literal `undefined`. 20859 */ 20860 set templateCache (cache) { 20861 defaultWriter.templateCache = cache; 20862 }, 20863 /** 20864 * Gets the default or overridden caching object from the default writer. 20865 */ 20866 get templateCache () { 20867 return defaultWriter.templateCache; 20868 } 20869 }; 20870 20871 // All high-level mustache.* functions use this writer. 20872 var defaultWriter = new Writer(); 20873 20874 /** 20875 * Clears all cached templates in the default writer. 20876 */ 20877 mustache.clearCache = function clearCache () { 20878 return defaultWriter.clearCache(); 20879 }; 20880 20881 /** 20882 * Parses and caches the given template in the default writer and returns the 20883 * array of tokens it contains. Doing this ahead of time avoids the need to 20884 * parse templates on the fly as they are rendered. 20885 */ 20886 mustache.parse = function parse (template, tags) { 20887 return defaultWriter.parse(template, tags); 20888 }; 20889 20890 /** 20891 * Renders the `template` with the given `view`, `partials`, and `config` 20892 * using the default writer. 20893 */ 20894 mustache.render = function render (template, view, partials, config) { 20895 if (typeof template !== 'string') { 20896 throw new TypeError('Invalid template! Template should be a "string" ' + 20897 'but "' + typeStr(template) + '" was given as the first ' + 20898 'argument for mustache#render(template, view, partials)'); 20899 } 20900 20901 return defaultWriter.render(template, view, partials, config); 20902 }; 20903 20904 // Export the escaping function so that the user may override it. 20905 // See https://github.com/janl/mustache.js/issues/244 20906 mustache.escape = escapeHtml; 20907 20908 // Export these mainly for testing, but also for advanced usage. 20909 mustache.Scanner = Scanner; 20910 mustache.Context = Context; 20911 mustache.Writer = Writer; 20912 20913 return mustache; 20914 20915}))); 20916 20917 20918/***/ }), 20919
vendor: 7,249 bytes, lines 20920-21162
20920/***/ "../../../../../node_modules/object-fit-images/dist/ofi.common-js.js": 20921/*!***********************************************************************************************!*\ 20922 !*** /Users/mauro/Sites/eternalsunspire/node_modules/object-fit-images/dist/ofi.common-js.js ***! 20923 \***********************************************************************************************/ 20924/*! no static exports found */ 20925/***/ (function(module, exports, __webpack_require__) { 20926 20927"use strict"; 20928/*! npm.im/object-fit-images 3.2.4 */ 20929 20930 20931var OFI = 'bfred-it:object-fit-images'; 20932var propRegex = /(object-fit|object-position)\s*:\s*([-.\w\s%]+)/g; 20933var testImg = typeof Image === 'undefined' ? {style: {'object-position': 1}} : new Image(); 20934var supportsObjectFit = 'object-fit' in testImg.style; 20935var supportsObjectPosition = 'object-position' in testImg.style; 20936var supportsOFI = 'background-size' in testImg.style; 20937var supportsCurrentSrc = typeof testImg.currentSrc === 'string'; 20938var nativeGetAttribute = testImg.getAttribute; 20939var nativeSetAttribute = testImg.setAttribute; 20940var autoModeEnabled = false; 20941 20942function createPlaceholder(w, h) { 20943 return ("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='" + w + "' height='" + h + "'%3E%3C/svg%3E"); 20944} 20945 20946function polyfillCurrentSrc(el) { 20947 if (el.srcset && !supportsCurrentSrc && window.picturefill) { 20948 var pf = window.picturefill._; 20949 // parse srcset with picturefill where currentSrc isn't available 20950 if (!el[pf.ns] || !el[pf.ns].evaled) { 20951 // force synchronous srcset parsing 20952 pf.fillImg(el, {reselect: true}); 20953 } 20954 20955 if (!el[pf.ns].curSrc) { 20956 // force picturefill to parse srcset 20957 el[pf.ns].supported = false; 20958 pf.fillImg(el, {reselect: true}); 20959 } 20960 20961 // retrieve parsed currentSrc, if any 20962 el.currentSrc = el[pf.ns].curSrc || el.src; 20963 } 20964} 20965 20966function getStyle(el) { 20967 var style = getComputedStyle(el).fontFamily; 20968 var parsed; 20969 var props = {}; 20970 while ((parsed = propRegex.exec(style)) !== null) { 20971 props[parsed[1]] = parsed[2]; 20972 } 20973 return props; 20974} 20975 20976function setPlaceholder(img, width, height) { 20977 // Default: fill width, no height 20978 var placeholder = createPlaceholder(width || 1, height || 0); 20979 20980 // Only set placeholder if it's different 20981 if (nativeGetAttribute.call(img, 'src') !== placeholder) { 20982 nativeSetAttribute.call(img, 'src', placeholder); 20983 } 20984} 20985 20986function onImageReady(img, callback) { 20987 // naturalWidth is only available when the image headers are loaded, 20988 // this loop will poll it every 100ms. 20989 if (img.naturalWidth) { 20990 callback(img); 20991 } else { 20992 setTimeout(onImageReady, 100, img, callback); 20993 } 20994} 20995 20996function fixOne(el) { 20997 var style = getStyle(el); 20998 var ofi = el[OFI]; 20999 style['object-fit'] = style['object-fit'] || 'fill'; // default value 21000 21001 // Avoid running where unnecessary, unless OFI had already done its deed 21002 if (!ofi.img) { 21003 // fill is the default behavior so no action is necessary 21004 if (style['object-fit'] === 'fill') { 21005 return; 21006 } 21007 21008 // Where object-fit is supported and object-position isn't (Safari < 10) 21009 if ( 21010 !ofi.skipTest && // unless user wants to apply regardless of browser support 21011 supportsObjectFit && // if browser already supports object-fit 21012 !style['object-position'] // unless object-position is used 21013 ) { 21014 return; 21015 } 21016 } 21017 21018 // keep a clone in memory while resetting the original to a blank 21019 if (!ofi.img) { 21020 ofi.img = new Image(el.width, el.height); 21021 ofi.img.srcset = nativeGetAttribute.call(el, "data-ofi-srcset") || el.srcset; 21022 ofi.img.src = nativeGetAttribute.call(el, "data-ofi-src") || el.src; 21023 21024 // preserve for any future cloneNode calls 21025 // https://github.com/bfred-it/object-fit-images/issues/53 21026 nativeSetAttribute.call(el, "data-ofi-src", el.src); 21027 if (el.srcset) { 21028 nativeSetAttribute.call(el, "data-ofi-srcset", el.srcset); 21029 } 21030 21031 setPlaceholder(el, el.naturalWidth || el.width, el.naturalHeight || el.height); 21032 21033 // remove srcset because it overrides src 21034 if (el.srcset) { 21035 el.srcset = ''; 21036 } 21037 try { 21038 keepSrcUsable(el); 21039 } catch (err) { 21040 if (window.console) { 21041 console.warn('https://bit.ly/ofi-old-browser'); 21042 } 21043 } 21044 } 21045 21046 polyfillCurrentSrc(ofi.img); 21047 21048 el.style.backgroundImage = "url(\"" + ((ofi.img.currentSrc || ofi.img.src).replace(/"/g, '\\"')) + "\")"; 21049 el.style.backgroundPosition = style['object-position'] || 'center'; 21050 el.style.backgroundRepeat = 'no-repeat'; 21051 el.style.backgroundOrigin = 'content-box'; 21052 21053 if (/scale-down/.test(style['object-fit'])) { 21054 onImageReady(ofi.img, function () { 21055 if (ofi.img.naturalWidth > el.width || ofi.img.naturalHeight > el.height) { 21056 el.style.backgroundSize = 'contain'; 21057 } else { 21058 el.style.backgroundSize = 'auto'; 21059 } 21060 }); 21061 } else { 21062 el.style.backgroundSize = style['object-fit'].replace('none', 'auto').replace('fill', '100% 100%'); 21063 } 21064 21065 onImageReady(ofi.img, function (img) { 21066 setPlaceholder(el, img.naturalWidth, img.naturalHeight); 21067 }); 21068} 21069 21070function keepSrcUsable(el) { 21071 var descriptors = { 21072 get: function get(prop) { 21073 return el[OFI].img[prop ? prop : 'src']; 21074 }, 21075 set: function set(value, prop) { 21076 el[OFI].img[prop ? prop : 'src'] = value; 21077 nativeSetAttribute.call(el, ("data-ofi-" + prop), value); // preserve for any future cloneNode 21078 fixOne(el); 21079 return value; 21080 } 21081 }; 21082 Object.defineProperty(el, 'src', descriptors); 21083 Object.defineProperty(el, 'currentSrc', { 21084 get: function () { return descriptors.get('currentSrc'); } 21085 }); 21086 Object.defineProperty(el, 'srcset', { 21087 get: function () { return descriptors.get('srcset'); }, 21088 set: function (ss) { return descriptors.set(ss, 'srcset'); } 21089 }); 21090} 21091 21092function hijackAttributes() { 21093 function getOfiImageMaybe(el, name) { 21094 return el[OFI] && el[OFI].img && (name === 'src' || name === 'srcset') ? el[OFI].img : el; 21095 } 21096 if (!supportsObjectPosition) { 21097 HTMLImageElement.prototype.getAttribute = function (name) { 21098 return nativeGetAttribute.call(getOfiImageMaybe(this, name), name); 21099 }; 21100 21101 HTMLImageElement.prototype.setAttribute = function (name, value) { 21102 return nativeSetAttribute.call(getOfiImageMaybe(this, name), name, String(value)); 21103 }; 21104 } 21105} 21106 21107function fix(imgs, opts) { 21108 var startAutoMode = !autoModeEnabled && !imgs; 21109 opts = opts || {}; 21110 imgs = imgs || 'img'; 21111 21112 if ((supportsObjectPosition && !opts.skipTest) || !supportsOFI) { 21113 return false; 21114 } 21115 21116 // use imgs as a selector or just select all images 21117 if (imgs === 'img') { 21118 imgs = document.getElementsByTagName('img'); 21119 } else if (typeof imgs === 'string') { 21120 imgs = document.querySelectorAll(imgs); 21121 } else if (!('length' in imgs)) { 21122 imgs = [imgs]; 21123 } 21124 21125 // apply fix to all 21126 for (var i = 0; i < imgs.length; i++) { 21127 imgs[i][OFI] = imgs[i][OFI] || { 21128 skipTest: opts.skipTest 21129 }; 21130 fixOne(imgs[i]); 21131 } 21132 21133 if (startAutoMode) { 21134 document.body.addEventListener('load', function (e) { 21135 if (e.target.tagName === 'IMG') { 21136 fix(e.target, { 21137 skipTest: opts.skipTest 21138 }); 21139 } 21140 }, true); 21141 autoModeEnabled = true; 21142 imgs = 'img'; // reset to a generic selector for watchMQ 21143 } 21144 21145 // if requested, watch media queries for object-fit change 21146 if (opts.watchMQ) { 21147 window.addEventListener('resize', fix.bind(null, imgs, { 21148 skipTest: opts.skipTest 21149 })); 21150 } 21151} 21152 21153fix.supportsObjectFit = supportsObjectFit; 21154fix.supportsObjectPosition = supportsObjectPosition; 21155 21156hijackAttributes(); 21157 21158module.exports = fix; 21159 21160 21161/***/ }), 21162
vendor: 9,340 bytes, lines 21163-21439
21163/***/ "../../../../../node_modules/object-fit-videos/object-fit-videos.js": 21164/*!**********************************************************************************************!*\ 21165 !*** /Users/mauro/Sites/eternalsunspire/node_modules/object-fit-videos/object-fit-videos.js ***! 21166 \**********************************************************************************************/ 21167/*! no static exports found */ 21168/***/ (function(module, exports, __webpack_require__) { 21169 21170/** 21171 * Object Fit Videos 21172 * Polyfill for object-fit and object-position CSS properties on video elements 21173 * Covers IE9, IE10, IE11, Edge, Safari <10 21174 * 21175 * Usage 21176 * In your CSS, add a special font-family tag for IE/Edge 21177 * video { 21178 * object-fit: cover; 21179 * font-family: 'object-fit: cover;'; 21180 * } 21181 * 21182 * Before the closing body tag, or whenever the DOM is ready, 21183 * make the JavaScript call 21184 * objectFitVideos(); 21185 * 21186 * All video elements with the special CSS property will be targeted 21187 * 21188 * @license MIT (https://opensource.org/licenses/MIT) 21189 * @author Todd Miller <[email protected]> 21190 * @version 1.0.2 21191 * @changelog 21192 * 2016-08-19 - Adds object-position support. 21193 * 2016-08-19 - Add throttle function for more performant resize events 21194 * 2016-08-19 - Initial release with object-fit support, and 21195 * object-position default 'center' 21196 * 2016-10-14 - No longer relies on window load event, instead requires a specific 21197 * function call to initialize the videos for object fit and position. 21198 * 2016-11-28 - Support CommonJS environment, courtesy of @msorensson 21199 * 2016-12-05 - Refactors the throttling function to support IE 21200 * 2017-09-26 - Fix an issue with autplay not working on polyfilled videos 21201 * - Adds the capability to specify elements to polyfill, 21202 * instead of just checking every video element for the 21203 * CSS property. Slight performance gain in most usecases, 21204 * and a bigger gain in a few usecases. 21205 * 2017-10-24 - Add user agent check to enable polyfill for all Edge browsers. 21206 * object-fit is supported on Edge >= 16, but currently just for images. 21207 */ 21208var objectFitVideos = function (videos) { 21209 'use strict'; 21210 21211 var isEdge = navigator.userAgent.indexOf('Edge/') >= 0; 21212 21213 var testImg = new Image(), 21214 supportsObjectFit = 'object-fit' in testImg.style && !isEdge, 21215 supportsObjectPosition = 'object-position' in testImg.style && !isEdge, 21216 propRegex = /(object-fit|object-position)\s*:\s*([-\w\s%]+)/g; 21217 21218 if (!supportsObjectFit || !supportsObjectPosition) { 21219 initialize(videos); 21220 throttle('resize', 'optimizedResize'); 21221 } 21222 21223 /** 21224 * Parse the style and look for the special font-family tag 21225 * @param {object} $el The element to parse 21226 * @return {object} The font-family properties we're interested in 21227 */ 21228 function getStyle ($el) { 21229 var style = getComputedStyle($el).fontFamily, 21230 parsed = null, 21231 props = {}; 21232 21233 while ((parsed = propRegex.exec(style)) !== null) { 21234 props[parsed[1]] = parsed[2]; 21235 } 21236 21237 if (props['object-position']) 21238 return parsePosition(props); 21239 21240 return props; 21241 } 21242 21243 /** 21244 * Initialize all the relevant video elements and get them fitted 21245 */ 21246 function initialize (videos) { 21247 var index = -1; 21248 21249 if (!videos) { 21250 // if no videos given, query all video elements 21251 videos = document.querySelectorAll('video'); 21252 } else if (!('length' in videos)) { 21253 // convert to an array for proper looping if an array or NodeList 21254 // was not given 21255 videos = [videos]; 21256 } 21257 21258 while (videos[++index]) { 21259 var style = getStyle(videos[index]); 21260 21261 // only do work if the property is on the element 21262 if (style['object-fit'] || style['object-position']) { 21263 // set the default values 21264 style['object-fit'] = style['object-fit'] || 'fill'; 21265 fitIt(videos[index], style); 21266 } 21267 } 21268 } 21269 21270 /** 21271 * Object Fit 21272 * @param {object} $el Element to fit 21273 * @return {object} The element's relevant properties 21274 */ 21275 function fitIt ($el, style) { 21276 // fill is the default behavior, no action is necessary 21277 if (style['object-fit'] === 'fill') 21278 return; 21279 21280 // convenience style properties on the source element 21281 var setCss = $el.style, 21282 getCss = window.getComputedStyle($el); 21283 21284 // create and insert a wrapper element 21285 var $wrap = document.createElement('object-fit'); 21286 $wrap.appendChild($el.parentNode.replaceChild($wrap, $el)); 21287 21288 // style the wrapper element to mostly match the source element 21289 var wrapCss = { 21290 height: '100%', 21291 width: '100%', 21292 boxSizing: 'content-box', 21293 display: 'inline-block', 21294 overflow: 'hidden' 21295 }; 21296 21297 'backgroundColor backgroundImage borderColor borderStyle borderWidth bottom fontSize lineHeight left opacity margin position right top visibility'.replace(/\w+/g, function (key) { 21298 wrapCss[key] = getCss[key]; 21299 }); 21300 21301 for (var key in wrapCss) 21302 $wrap.style[key] = wrapCss[key]; 21303 21304 // give the source element some saner styles 21305 setCss.border = setCss.margin = setCss.padding = 0; 21306 setCss.display = 'block'; 21307 setCss.opacity = 1; 21308 21309 // set up the event handlers 21310 $el.addEventListener('loadedmetadata', doWork); 21311 window.addEventListener('optimizedResize', doWork); 21312 21313 // we may have missed the loadedmetadata event, so if the video has loaded 21314 // enough data, just drop the event listener and execute 21315 if ($el.readyState >= 1) { 21316 $el.removeEventListener('loadedmetadata', doWork); 21317 doWork(); 21318 } 21319 21320 /** 21321 * Do the actual sizing. Math. 21322 * @methodOf fitIt 21323 */ 21324 function doWork () { 21325 // the actual size and ratio of the video 21326 // we do this here, even though it doesn't change, because 21327 // at this point we can be sure the metadata has loaded 21328 var videoWidth = $el.videoWidth, 21329 videoHeight = $el.videoHeight, 21330 videoRatio = videoWidth / videoHeight; 21331 21332 var wrapWidth = $wrap.clientWidth, 21333 wrapHeight = $wrap.clientHeight, 21334 wrapRatio = wrapWidth / wrapHeight; 21335 21336 var newHeight = 0, 21337 newWidth = 0; 21338 setCss.marginLeft = setCss.marginTop = 0; 21339 21340 // basically we do the opposite action for contain and cover, 21341 // depending on whether the video aspect ratio is less than or 21342 // greater than the wrapper's aspect ratio 21343 if (videoRatio < wrapRatio ? 21344 style['object-fit'] === 'contain' : style['object-fit'] === 'cover') { 21345 newHeight = wrapHeight * videoRatio; 21346 newWidth = wrapWidth / videoRatio; 21347 21348 setCss.width = Math.round(newHeight) + 'px'; 21349 setCss.height = wrapHeight + 'px'; 21350 21351 if (style['object-position-x'] === 'left') 21352 setCss.marginLeft = 0; 21353 else if (style['object-position-x'] === 'right') 21354 setCss.marginLeft = Math.round(wrapWidth - newHeight) + 'px'; 21355 else 21356 setCss.marginLeft = Math.round((wrapWidth - newHeight) / 2) + 'px'; 21357 } else { 21358 newWidth = wrapWidth / videoRatio; 21359 21360 setCss.width = wrapWidth + 'px'; 21361 setCss.height = Math.round(newWidth) + 'px'; 21362 21363 if (style['object-position-y'] === 'top') 21364 setCss.marginTop = 0; 21365 else if (style['object-position-y'] === 'bottom') 21366 setCss.marginTop = Math.round(wrapHeight - newWidth) + 'px'; 21367 else 21368 setCss.marginTop = Math.round((wrapHeight - newWidth) / 2) + 'px'; 21369 } 21370 21371 // play the video if autoplay is set 21372 if ($el.autoplay) 21373 $el.play(); 21374 } 21375 } 21376 21377 /** 21378 * Split the object-position property into x and y position properties 21379 * @param {object} style Relevant element styles 21380 * @return {object} The style object with the added x and y props 21381 */ 21382 function parsePosition (style) { 21383 if (~style['object-position'].indexOf('left')) 21384 style['object-position-x'] = 'left'; 21385 else if (~style['object-position'].indexOf('right')) 21386 style['object-position-x'] = 'right'; 21387 else 21388 style['object-position-x'] = 'center'; 21389 21390 if (~style['object-position'].indexOf('top')) 21391 style['object-position-y'] = 'top'; 21392 else if (~style['object-position'].indexOf('bottom')) 21393 style['object-position-y'] = 'bottom'; 21394 else 21395 style['object-position-y'] = 'center'; 21396 21397 return style; 21398 } 21399 21400 /** 21401 * Throttle an event with RequestAnimationFrame API for better performance 21402 * @param {string} type The event to throttle 21403 * @param {string} name Custom event name to listen for 21404 * @param {object} obj Optional object to attach the event to 21405 */ 21406 function throttle (type, name, obj) { 21407 obj = obj || window; 21408 var running = false, 21409 evt = null; 21410 21411 // IE does not support the CustomEvent constructor 21412 // so if that fails do it the old way 21413 try { 21414 evt = new CustomEvent(name); 21415 } catch (e) { 21416 evt = document.createEvent('Event'); 21417 evt.initEvent(name, true, true); 21418 } 21419 21420 var func = function () { 21421 if (running) return; 21422 21423 running = true; 21424 requestAnimationFrame(function () { 21425 obj.dispatchEvent(evt); 21426 running = false; 21427 }); 21428 }; 21429 21430 obj.addEventListener(type, func); 21431 } 21432}; 21433 21434if ( true && typeof module.exports !== 'undefined') 21435 module.exports = objectFitVideos; 21436 21437 21438/***/ }), 21439
vendor: 18,249 bytes, lines 21440-21455
21440/***/ "../../../../../node_modules/scrollmagic/scrollmagic/minified/ScrollMagic.min.js": 21441/*!***********************************************************************************************************!*\ 21442 !*** /Users/mauro/Sites/eternalsunspire/node_modules/scrollmagic/scrollmagic/minified/ScrollMagic.min.js ***! 21443 \***********************************************************************************************************/ 21444/*! no static exports found */ 21445/***/ (function(module, exports, __webpack_require__) { 21446 21447var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! ScrollMagic v2.0.8 | (c) 2020 Jan Paepke (@janpaepke) | license & info: http://scrollmagic.io */ 21448!function(e,t){ true?!(__WEBPACK_AMD_DEFINE_FACTORY__ = (t), 21449 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 21450 (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : 21451 __WEBPACK_AMD_DEFINE_FACTORY__), 21452 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined}(this,function(){"use strict";function _(){}_.version="2.0.8","undefined"!=typeof window&&window.addEventListener("mousewheel",void 0);var P="data-scrollmagic-pin-spacer";_.Controller=function(e){function t(){var e,t,n;v&&u&&(e=R.type.Array(u)?u:f.slice(0),u=!1,t=d,0!=(n=(d=l.scrollPos())-t)&&(h=0<n?"FORWARD":i),h===i&&e.reverse(),e.forEach(function(e,t){e.update(!0)}))}function r(){n=R.rAF(t)}var n,o,i="REVERSE",s="PAUSED",a=z.defaults,l=this,c=R.extend({},a,e),f=[],u=!1,d=0,h=s,p=!0,g=0,v=!0,m=function(){0<c.refreshInterval&&(o=window.setTimeout(E,c.refreshInterval))},w=function(){return c.vertical?R.get.scrollTop(c.container):R.get.scrollLeft(c.container)},y=function(){return c.vertical?R.get.height(c.container):R.get.width(c.container)},S=this._setScrollPos=function(e){c.vertical?p?window.scrollTo(R.get.scrollLeft(),e):c.container.scrollTop=e:p?window.scrollTo(e,R.get.scrollTop()):c.container.scrollLeft=e},b=function(e){"resize"==e.type&&(g=y(),h=s),!0!==u&&(u=!0,r())},E=function(){if(!p&&g!=y()){var t;try{t=new Event("resize",{bubbles:!1,cancelable:!1})}catch(e){(t=document.createEvent("Event")).initEvent("resize",!1,!1)}c.container.dispatchEvent(t)}f.forEach(function(e,t){e.refresh()}),m()};this._options=c;function x(e){if(e.length<=1)return e;var t=e.slice(0);return t.sort(function(e,t){return e.scrollOffset()>t.scrollOffset()?1:-1}),t}return this.addScene=function(e){if(R.type.Array(e))e.forEach(function(e,t){l.addScene(e)});else if(e instanceof _.Scene)if(e.controller()!==l)e.addTo(l);else if(!~f.indexOf(e))for(var t in f.push(e),f=x(f),e.on("shift.controller_sort",function(){f=x(f)}),c.globalSceneOptions)e[t]&&e[t].call(e,c.globalSceneOptions[t]);return l},this.removeScene=function(e){var t;return R.type.Array(e)?e.forEach(function(e,t){l.removeScene(e)}):-1<(t=f.indexOf(e))&&(e.off("shift.controller_sort"),f.splice(t,1),e.remove()),l},this.updateScene=function(e,n){return R.type.Array(e)?e.forEach(function(e,t){l.updateScene(e,n)}):n?e.update(!0):!0!==u&&e instanceof _.Scene&&(~(u=u||[]).indexOf(e)||u.push(e),u=x(u),r()),l},this.update=function(e){return b({type:"resize"}),e&&t(),l},this.scrollTo=function(e,t){if(R.type.Number(e))S.call(c.container,e,t);else if(e instanceof _.Scene)e.controller()===l&&l.scrollTo(e.scrollOffset(),t);else if(R.type.Function(e))S=e;else{var n=R.get.elements(e)[0];if(n){for(;n.parentNode.hasAttribute(P);)n=n.parentNode;var r=c.vertical?"top":"left",o=R.get.offset(c.container),i=R.get.offset(n);p||(o[r]-=l.scrollPos()),l.scrollTo(i[r]-o[r],t)}}return l},this.scrollPos=function(e){return arguments.length?(R.type.Function(e)&&(w=e),l):w.call(l)},this.info=function(e){var t={size:g,vertical:c.vertical,scrollPos:d,scrollDirection:h,container:c.container,isDocument:p};return arguments.length?void 0!==t[e]?t[e]:void 0:t},this.loglevel=function(e){return l},this.enabled=function(e){return arguments.length?(v!=e&&(v=!!e,l.updateScene(f,!0)),l):v},this.destroy=function(e){window.clearTimeout(o);for(var t=f.length;t--;)f[t].destroy(e);return c.container.removeEventListener("resize",b),c.container.removeEventListener("scroll",b),R.cAF(n),null},function(){for(var e in c)a.hasOwnProperty(e)||delete c[e];if(c.container=R.get.elements(c.container)[0],!c.container)throw"ScrollMagic.Controller init failed.";(p=c.container===window||c.container===document.body||!document.body.contains(c.container))&&(c.container=window),g=y(),c.container.addEventListener("resize",b),c.container.addEventListener("scroll",b);var t=parseInt(c.refreshInterval,10);c.refreshInterval=R.type.Number(t)?t:a.refreshInterval,m()}(),l};var z={defaults:{container:window,vertical:!0,globalSceneOptions:{},loglevel:2,refreshInterval:100}};_.Controller.addOption=function(e,t){z.defaults[e]=t},_.Controller.extend=function(e){var t=this;_.Controller=function(){return t.apply(this,arguments),this.$super=R.extend({},this),e.apply(this,arguments)||this},R.extend(_.Controller,t),_.Controller.prototype=t.prototype,_.Controller.prototype.constructor=_.Controller},_.Scene=function(e){var n,l,c="BEFORE",f="DURING",u="AFTER",r=D.defaults,d=this,h=R.extend({},r,e),p=c,g=0,a={start:0,end:0},v=0,o=!0,s={};this.on=function(e,o){return R.type.Function(o)&&(e=e.trim().split(" ")).forEach(function(e){var t=e.split("."),n=t[0],r=t[1];"*"!=n&&(s[n]||(s[n]=[]),s[n].push({namespace:r||"",callback:o}))}),d},this.off=function(e,i){return e&&(e=e.trim().split(" ")).forEach(function(e,t){var n=e.split("."),r=n[0],o=n[1]||"";("*"===r?Object.keys(s):[r]).forEach(function(e){for(var t=s[e]||[],n=t.length;n--;){var r=t[n];!r||o!==r.namespace&&"*"!==o||i&&i!=r.callback||t.splice(n,1)}t.length||delete s[e]})}),d},this.trigger=function(e,n){var t,r,o,i;return e&&(t=e.trim().split("."),r=t[0],o=t[1],(i=s[r])&&i.forEach(function(e,t){o&&o!==e.namespace||e.callback.call(d,new _.Event(r,e.namespace,d,n))})),d},d.on("change.internal",function(e){"loglevel"!==e.what&&"tweenChanges"!==e.what&&("triggerElement"===e.what?y():"reverse"===e.what&&d.update())}).on("shift.internal",function(e){t(),d.update()}),this.addTo=function(e){return e instanceof _.Controller&&l!=e&&(l&&l.removeScene(d),l=e,E(),i(!0),y(!0),t(),l.info("container").addEventListener("resize",S),e.addScene(d),d.trigger("add",{controller:l}),d.update()),d},this.enabled=function(e){return arguments.length?(o!=e&&(o=!!e,d.update(!0)),d):o},this.remove=function(){var e;return l&&(l.info("container").removeEventListener("resize",S),e=l,l=void 0,e.removeScene(d),d.trigger("remove")),d},this.destroy=function(e){return d.trigger("destroy",{reset:e}),d.remove(),d.off("*.*"),null},this.update=function(e){var t,n;return l&&(e?l.enabled()&&o?(t=l.info("scrollPos"),n=0<h.duration?(t-a.start)/(a.end-a.start):t>=a.start?1:0,d.trigger("update",{startPos:a.start,endPos:a.end,scrollPos:t}),d.progress(n)):m&&p===f&&T(!0):l.updateScene(d,!1)),d},this.refresh=function(){return i(),y(),d},this.progress=function(e){if(arguments.length){var t,n,r,o=!1,i=p,s=l?l.info("scrollDirection"):"PAUSED",a=h.reverse||g<=e;return 0===h.duration?(o=g!=e,p=0===(g=e<1&&a?0:1)?c:f):e<0&&p!==c&&a?(p=c,o=!(g=0)):0<=e&&e<1&&a?(g=e,p=f,o=!0):1<=e&&p!==u?(g=1,p=u,o=!0):p!==f||a||T(),o&&(t={progress:g,state:p,scrollDirection:s},r=function(e){d.trigger(e,t)},(n=p!=i)&&i!==f&&(r("enter"),r(i===c?"start":"end")),r("progress"),n&&p!==f&&(r(p===c?"start":"end"),r("leave"))),d}return g};var m,w,t=function(){a={start:v+h.offset},l&&h.triggerElement&&(a.start-=l.info("size")*h.triggerHook),a.end=a.start+h.duration},i=function(e){var t;!n||x(t="duration",n.call(d))&&!e&&(d.trigger("change",{what:t,newval:h[t]}),d.trigger("shift",{reason:t}))},y=function(e){var t=0,n=h.triggerElement;if(l&&(n||0<v)){if(n)if(n.parentNode){for(var r=l.info(),o=R.get.offset(r.container),i=r.vertical?"top":"left";n.parentNode.hasAttribute(P);)n=n.parentNode;var s=R.get.offset(n);r.isDocument||(o[i]-=l.scrollPos()),t=s[i]-o[i]}else d.triggerElement(void 0);var a=t!=v;v=t,a&&!e&&d.trigger("shift",{reason:"triggerElementPosition"})}},S=function(e){0<h.triggerHook&&d.trigger("shift",{reason:"containerResize"})},b=R.extend(D.validate,{duration:function(t){var e;if(R.type.String(t)&&t.match(/^(\.|\d)*\d+%$/)&&(e=parseFloat(t)/100,t=function(){return l?l.info("size")*e:0}),R.type.Function(t)){n=t;try{t=parseFloat(n.call(d))}catch(e){t=-1}}if(t=parseFloat(t),!R.type.Number(t)||t<0)throw n=n&&void 0,0;return t}}),E=function(e){(e=arguments.length?[e]:Object.keys(b)).forEach(function(t,e){var n;if(b[t])try{n=b[t](h[t])}catch(e){n=r[t]}finally{h[t]=n}})},x=function(e,t){var n=!1,r=h[e];return h[e]!=t&&(h[e]=t,E(e),n=r!=h[e]),n},z=function(t){d[t]||(d[t]=function(e){return arguments.length?("duration"===t&&(n=void 0),x(t,e)&&(d.trigger("change",{what:t,newval:h[t]}),~D.shifts.indexOf(t)&&d.trigger("shift",{reason:t})),d):h[t]})};this.controller=function(){return l},this.state=function(){return p},this.scrollOffset=function(){return a.start},this.triggerPosition=function(){var e=h.offset;return l&&(h.triggerElement?e+=v:e+=l.info("size")*d.triggerHook()),e},d.on("shift.internal",function(e){var t="duration"===e.reason;(p===u&&t||p===f&&0===h.duration)&&T(),t&&A()}).on("progress.internal",function(e){T()}).on("add.internal",function(e){A()}).on("destroy.internal",function(e){d.removePin(e.reset)});function C(){l&&m&&p===f&&!l.info("isDocument")&&T()}function F(){l&&m&&p===f&&((w.relSize.width||w.relSize.autoFullWidth)&&R.get.width(window)!=R.get.width(w.spacer.parentNode)||w.relSize.height&&R.get.height(window)!=R.get.height(w.spacer.parentNode))&&A()}function L(e){l&&m&&p===f&&!l.info("isDocument")&&(e.preventDefault(),l._setScrollPos(l.info("scrollPos")-((e.wheelDelta||e[l.info("vertical")?"wheelDeltaY":"wheelDeltaX"])/3||30*-e.detail)))}var T=function(e){var t,n,r,o,i,s;m&&l&&(t=l.info(),n=w.spacer.firstChild,e||p!==f?(r={position:w.inFlow?"relative":"absolute",top:0,left:0},o=R.css(n,"position")!=r.position,w.pushFollowers?0<h.duration&&(p===u&&0===parseFloat(R.css(w.spacer,"padding-top"))||p===c&&0===parseFloat(R.css(w.spacer,"padding-bottom")))&&(o=!0):r[t.vertical?"top":"left"]=h.duration*g,R.css(n,r),o&&A()):("fixed"!=R.css(n,"position")&&(R.css(n,{position:"fixed"}),A()),i=R.get.offset(w.spacer,!0),s=h.reverse||0===h.duration?t.scrollPos-a.start:Math.round(g*h.duration*10)/10,i[t.vertical?"top":"left"]+=s,R.css(w.spacer.firstChild,{top:i.top,left:i.left})))},A=function(){var e,t,n,r,o;m&&l&&w.inFlow&&(e=p===f,t=l.info("vertical"),n=w.spacer.firstChild,r=R.isMarginCollapseType(R.css(w.spacer,"display")),o={},w.relSize.width||w.relSize.autoFullWidth?e?R.css(m,{width:R.get.width(w.spacer)}):R.css(m,{width:"100%"}):(o["min-width"]=R.get.width(t?m:n,!0,!0),o.width=e?o["min-width"]:"auto"),w.relSize.height?e?R.css(m,{height:R.get.height(w.spacer)-(w.pushFollowers?h.duration:0)}):R.css(m,{height:"100%"}):(o["min-height"]=R.get.height(t?n:m,!0,!r),o.height=e?o["min-height"]:"auto"),w.pushFollowers&&(o["padding"+(t?"Top":"Left")]=h.duration*g,o["padding"+(t?"Bottom":"Right")]=h.duration*(1-g)),R.css(w.spacer,o))};this.setPin=function(e,t){if(t=R.extend({},{pushFollowers:!0,spacerClass:"scrollmagic-pin-spacer"},t),!(e=R.get.elements(e)[0]))return d;if("fixed"===R.css(e,"position"))return d;if(m){if(m===e)return d;d.removePin()}var n=(m=e).parentNode.style.display,r=["top","left","bottom","right","margin","marginLeft","marginRight","marginTop","marginBottom"];m.parentNode.style.display="none";var o="absolute"!=R.css(m,"position"),i=R.css(m,r.concat(["display"])),s=R.css(m,["width","height"]);m.parentNode.style.display=n,!o&&t.pushFollowers&&(t.pushFollowers=!1);var a,l=m.parentNode.insertBefore(document.createElement("div"),m),c=R.extend(i,{position:o?"relative":"absolute",boxSizing:"content-box",mozBoxSizing:"content-box",webkitBoxSizing:"content-box"});return o||R.extend(c,R.css(m,["width","height"])),R.css(l,c),l.setAttribute(P,""),R.addClass(l,t.spacerClass),w={spacer:l,relSize:{width:"%"===s.width.slice(-1),height:"%"===s.height.slice(-1),autoFullWidth:"auto"===s.width&&o&&R.isMarginCollapseType(i.display)},pushFollowers:t.pushFollowers,inFlow:o},m.___origStyle||(m.___origStyle={},a=m.style,r.concat(["width","height","position","boxSizing","mozBoxSizing","webkitBoxSizing"]).forEach(function(e){m.___origStyle[e]=a[e]||""})),w.relSize.width&&R.css(l,{width:s.width}),w.relSize.height&&R.css(l,{height:s.height}),l.appendChild(m),R.css(m,{position:o?"relative":"absolute",margin:"auto",top:"auto",left:"auto",bottom:"auto",right:"auto"}),(w.relSize.width||w.relSize.autoFullWidth)&&R.css(m,{boxSizing:"border-box",mozBoxSizing:"border-box",webkitBoxSizing:"border-box"}),window.addEventListener("scroll",C),window.addEventListener("resize",C),window.addEventListener("resize",F),m.addEventListener("mousewheel",L),m.addEventListener("DOMMouseScroll",L),T(),d},this.removePin=function(e){var t,n,r;return m&&(p===f&&T(!0),!e&&l||((t=w.spacer.firstChild).hasAttribute(P)&&(n=w.spacer.style,r={},["margin","marginLeft","marginRight","marginTop","marginBottom"].forEach(function(e){r[e]=n[e]||""}),R.css(t,r)),w.spacer.parentNode.insertBefore(t,w.spacer),w.spacer.parentNode.removeChild(w.spacer),m.parentNode.hasAttribute(P)||(R.css(m,m.___origStyle),delete m.___origStyle)),window.removeEventListener("scroll",C),window.removeEventListener("resize",C),window.removeEventListener("resize",F),m.removeEventListener("mousewheel",L),m.removeEventListener("DOMMouseScroll",L),m=void 0),d};var N,O=[];return d.on("destroy.internal",function(e){d.removeClassToggle(e.reset)}),this.setClassToggle=function(e,t){var n=R.get.elements(e);return 0!==n.length&&R.type.String(t)&&(0<O.length&&d.removeClassToggle(),N=t,O=n,d.on("enter.internal_class leave.internal_class",function(e){var n="enter"===e.type?R.addClass:R.removeClass;O.forEach(function(e,t){n(e,N)})})),d},this.removeClassToggle=function(e){return e&&O.forEach(function(e,t){R.removeClass(e,N)}),d.off("start.internal_class end.internal_class"),N=void 0,O=[],d},function(){for(var e in h)r.hasOwnProperty(e)||delete h[e];for(var t in r)z(t);E()}(),d};var D={defaults:{duration:0,offset:0,triggerElement:void 0,triggerHook:.5,reverse:!0,loglevel:2},validate:{offset:function(e){if(e=parseFloat(e),!R.type.Number(e))throw 0;return e},triggerElement:function(e){if(e=e||void 0){var t=R.get.elements(e)[0];if(!t||!t.parentNode)throw 0;e=t}return e},triggerHook:function(e){var t={onCenter:.5,onEnter:1,onLeave:0};if(R.type.Number(e))e=Math.max(0,Math.min(parseFloat(e),1));else{if(!(e in t))throw 0;e=t[e]}return e},reverse:function(e){return!!e}},shifts:["duration","offset","triggerHook"]};_.Scene.addOption=function(e,t,n,r){e in D.defaults||(D.defaults[e]=t,D.validate[e]=n,r&&D.shifts.push(e))},_.Scene.extend=function(e){var t=this;_.Scene=function(){return t.apply(this,arguments),this.$super=R.extend({},this),e.apply(this,arguments)||this},R.extend(_.Scene,t),_.Scene.prototype=t.prototype,_.Scene.prototype.constructor=_.Scene},_.Event=function(e,t,n,r){for(var o in r=r||{})this[o]=r[o];return this.type=e,this.target=this.currentTarget=n,this.namespace=t||"",this.timeStamp=this.timestamp=Date.now(),this};var R=_._util=function(s){function a(e){return parseFloat(e)||0}function l(e){return e.currentStyle?e.currentStyle:s.getComputedStyle(e)}function r(e,t,n,r){if((t=t===document?s:t)===s)r=!1;else if(!u.DomElement(t))return 0;e=e[0].toUpperCase()+e.substr(1).toLowerCase();var o,i=(n?t["offset"+e]||t["outer"+e]:t["client"+e]||t["inner"+e])||0;return n&&r&&(o=l(t),i+="Height"===e?a(o.marginTop)+a(o.marginBottom):a(o.marginLeft)+a(o.marginRight)),i}function c(e){return e.replace(/^[^a-z]+([a-z])/g,"$1").replace(/-([a-z])/g,function(e){return e[1].toUpperCase()})}var e={};e.extend=function(e){for(e=e||{},f=1;f<arguments.length;f++)if(arguments[f])for(var t in arguments[f])arguments[f].hasOwnProperty(t)&&(e[t]=arguments[f][t]);return e},e.isMarginCollapseType=function(e){return!!~["block","flex","list-item","table","-webkit-box"].indexOf(e)};for(var o=0,t=["ms","moz","webkit","o"],n=s.requestAnimationFrame,i=s.cancelAnimationFrame,f=0;!n&&f<4;++f)n=s[t[f]+"RequestAnimationFrame"],i=s[t[f]+"CancelAnimationFrame"]||s[t[f]+"CancelRequestAnimationFrame"];n=n||function(e){var t=(new Date).getTime(),n=Math.max(0,16-(t-o)),r=s.setTimeout(function(){e(t+n)},n);return o=t+n,r},i=i||function(e){s.clearTimeout(e)},e.rAF=n.bind(s),e.cAF=i.bind(s);var u=e.type=function(e){return Object.prototype.toString.call(e).replace(/^\[object (.+)\]$/,"$1").toLowerCase()};u.String=function(e){return"string"===u(e)},u.Function=function(e){return"function"===u(e)},u.Array=function(e){return Array.isArray(e)},u.Number=function(e){return!u.Array(e)&&0<=e-parseFloat(e)+1},u.DomElement=function(e){return"object"==typeof HTMLElement||"function"==typeof HTMLElement?e instanceof HTMLElement||e instanceof SVGElement:e&&"object"==typeof e&&null!==e&&1===e.nodeType&&"string"==typeof e.nodeName};var d=e.get={};return d.elements=function(e){var t=[];if(u.String(e))try{e=document.querySelectorAll(e)}catch(e){return t}if("nodelist"===u(e)||u.Array(e)||e instanceof NodeList)for(var n=0,r=t.length=e.length;n<r;n++){var o=e[n];t[n]=u.DomElement(o)?o:d.elements(o)}else!u.DomElement(e)&&e!==document&&e!==s||(t=[e]);return t},d.scrollTop=function(e){return e&&"number"==typeof e.scrollTop?e.scrollTop:s.pageYOffset||0},d.scrollLeft=function(e){return e&&"number"==typeof e.scrollLeft?e.scrollLeft:s.pageXOffset||0},d.width=function(e,t,n){return r("width",e,t,n)},d.height=function(e,t,n){return r("height",e,t,n)},d.offset=function(e,t){var n,r={top:0,left:0};return e&&e.getBoundingClientRect&&(n=e.getBoundingClientRect(),r.top=n.top,r.left=n.left,t||(r.top+=d.scrollTop(),r.left+=d.scrollLeft())),r},e.addClass=function(e,t){t&&(e.classList?e.classList.add(t):e.className+=" "+t)},e.removeClass=function(e,t){t&&(e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp("(^|\\b)"+t.split(" ").join("|")+"(\\b|$)","gi")," "))},e.css=function(e,t){if(u.String(t))return l(e)[c(t)];if(u.Array(t)){var n={},r=l(e);return t.forEach(function(e,t){n[e]=r[c(e)]}),n}for(var o in t){var i=t[o];i==parseFloat(i)&&(i+="px"),e.style[c(o)]=i}},e}(window||{});return _}); 21453 21454/***/ }), 21455
vendor: 2,637 bytes, lines 21456-21470
21456/***/ "../../../../../node_modules/scrollmagic/scrollmagic/minified/plugins/animation.gsap.min.js": 21457/*!**********************************************************************************************************************!*\ 21458 !*** /Users/mauro/Sites/eternalsunspire/node_modules/scrollmagic/scrollmagic/minified/plugins/animation.gsap.min.js ***! 21459 \**********************************************************************************************************************/ 21460/*! no static exports found */ 21461/***/ (function(module, exports, __webpack_require__) { 21462 21463var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! ScrollMagic v2.0.8 | (c) 2020 Jan Paepke (@janpaepke) | license & info: http://scrollmagic.io */ 21464!function(e,n){var r; true?!(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ScrollMagic */ "../../../../../node_modules/scrollmagic/scrollmagic/minified/ScrollMagic.min.js"),__webpack_require__(/*! gsap */ "../../../../../node_modules/gsap/index.js"),__webpack_require__(/*! TweenMax */ "../../../../../node_modules/gsap/src/minified/TweenMax.min.js"),__webpack_require__(/*! TimelineMax */ "../../../../../node_modules/gsap/src/minified/TimelineMax.min.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (n), 21465 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 21466 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 21467 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)):undefined}(this,function(e,n,p,u){"use strict";var g=n&&3<=parseFloat(n.version);e.Scene.addOption("tweenChanges",!1,function(e){return!!e}),e.Scene.extend(function(){var o,i=this;i.on("progress.plugin_gsap",function(){s()}),i.on("destroy.plugin_gsap",function(e){i.removeTween(e.reset)});var s=function(){var e,n;o&&(e=i.progress(),n=i.state(),o.repeat&&-1===o.repeat()?"DURING"===n&&o.paused()?o.play():"DURING"===n||o.paused()||o.pause():e!=o.progress()&&(0===i.duration()?0<e?o.play():o.reverse():i.tweenChanges()&&o.tweenTo?o.tweenTo(e*o.duration()):o.progress(e).pause()))};i.setTween=function(e,n,r){var t,a;1<arguments.length&&(a="number"==typeof arguments[1],g?(a||(r=n),r.hasOwnProperty("duration")||(r.duration=a?n:1)):arguments.length<3&&(r=n,n=1),e=g?p.to(e,r):p.to(e,n,r));try{(t=u&&!g?new u({smoothChildTiming:!0}).add(e):e).pause()}catch(e){return i}return o&&i.removeTween(),o=t,e.repeat&&-1===e.repeat()&&(o.repeat(-1),o.yoyo(e.yoyo())),s(),i},i.removeTween=function(e){return o&&(e&&o.progress(0).pause(),o.kill(),o=void 0),i}})}); 21468 21469/***/ }), 21470
vendor: 109,737 bytes, lines 21471-24296
21471/***/ "../../../../../node_modules/scrollmagic/scrollmagic/uncompressed/ScrollMagic.js": 21472/*!***********************************************************************************************************!*\ 21473 !*** /Users/mauro/Sites/eternalsunspire/node_modules/scrollmagic/scrollmagic/uncompressed/ScrollMagic.js ***! 21474 \***********************************************************************************************************/ 21475/*! no static exports found */ 21476/***/ (function(module, exports, __webpack_require__) { 21477 21478var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 21479 * ScrollMagic v2.0.8 (2020-08-14) 21480 * The javascript library for magical scroll interactions. 21481 * (c) 2020 Jan Paepke (@janpaepke) 21482 * Project Website: http://scrollmagic.io 21483 * 21484 * @version 2.0.8 21485 * @license Dual licensed under MIT license and GPL. 21486 * @author Jan Paepke - [email protected] 21487 * 21488 * @file ScrollMagic main library. 21489 */ 21490/** 21491 * @namespace ScrollMagic 21492 */ 21493(function (root, factory) { 21494 if (true) { 21495 // AMD. Register as an anonymous module. 21496 !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 21497 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 21498 (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : 21499 __WEBPACK_AMD_DEFINE_FACTORY__), 21500 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 21501 } else {} 21502}(this, function () { 21503 "use strict"; 21504 21505 var ScrollMagic = function () { 21506 _util.log(2, '(COMPATIBILITY NOTICE) -> As of ScrollMagic 2.0.0 you need to use \'new ScrollMagic.Controller()\' to create a new controller instance. Use \'new ScrollMagic.Scene()\' to instance a scene.'); 21507 }; 21508 21509 ScrollMagic.version = "2.0.8"; 21510 21511 // TODO: temporary workaround for chrome's scroll jitter bug 21512 if (typeof (window) !== 'undefined') { 21513 window.addEventListener("mousewheel", void(0)); 21514 } 21515 21516 // global const 21517 var PIN_SPACER_ATTRIBUTE = "data-scrollmagic-pin-spacer"; 21518 21519 /** 21520 * The main class that is needed once per scroll container. 21521 * 21522 * @class 21523 * 21524 * @example 21525 * // basic initialization 21526 * var controller = new ScrollMagic.Controller(); 21527 * 21528 * // passing options 21529 * var controller = new ScrollMagic.Controller({container: "#myContainer", loglevel: 3}); 21530 * 21531 * @param {object} [options] - An object containing one or more options for the controller. 21532 * @param {(string|object)} [options.container=window] - A selector, DOM object that references the main container for scrolling. 21533 * @param {boolean} [options.vertical=true] - Sets the scroll mode to vertical (`true`) or horizontal (`false`) scrolling. 21534 * @param {object} [options.globalSceneOptions={}] - These options will be passed to every Scene that is added to the controller using the addScene method. For more information on Scene options see {@link ScrollMagic.Scene}. 21535 * @param {number} [options.loglevel=2] Loglevel for debugging. Note that logging is disabled in the minified version of ScrollMagic. 21536 ** `0` => silent 21537 ** `1` => errors 21538 ** `2` => errors, warnings 21539 ** `3` => errors, warnings, debuginfo 21540 * @param {boolean} [options.refreshInterval=100] - Some changes don't call events by default, like changing the container size or moving a scene trigger element. 21541 This interval polls these parameters to fire the necessary events. 21542 If you don't use custom containers, trigger elements or have static layouts, where the positions of the trigger elements don't change, you can set this to 0 disable interval checking and improve performance. 21543 * 21544 */ 21545 ScrollMagic.Controller = function (options) { 21546 /* 21547 * ---------------------------------------------------------------- 21548 * settings 21549 * ---------------------------------------------------------------- 21550 */ 21551 var 21552 NAMESPACE = 'ScrollMagic.Controller', 21553 SCROLL_DIRECTION_FORWARD = 'FORWARD', 21554 SCROLL_DIRECTION_REVERSE = 'REVERSE', 21555 SCROLL_DIRECTION_PAUSED = 'PAUSED', 21556 DEFAULT_OPTIONS = CONTROLLER_OPTIONS.defaults; 21557 21558 /* 21559 * ---------------------------------------------------------------- 21560 * private vars 21561 * ---------------------------------------------------------------- 21562 */ 21563 var 21564 Controller = this, 21565 _options = _util.extend({}, DEFAULT_OPTIONS, options), 21566 _sceneObjects = [], 21567 _updateScenesOnNextCycle = false, // can be boolean (true => all scenes) or an array of scenes to be updated 21568 _scrollPos = 0, 21569 _scrollDirection = SCROLL_DIRECTION_PAUSED, 21570 _isDocument = true, 21571 _viewPortSize = 0, 21572 _enabled = true, 21573 _updateTimeout, 21574 _refreshTimeout; 21575 21576 /* 21577 * ---------------------------------------------------------------- 21578 * private functions 21579 * ---------------------------------------------------------------- 21580 */ 21581 21582 /** 21583 * Internal constructor function of the ScrollMagic Controller 21584 * @private 21585 */ 21586 var construct = function () { 21587 for (var key in _options) { 21588 if (!DEFAULT_OPTIONS.hasOwnProperty(key)) { 21589 log(2, "WARNING: Unknown option \"" + key + "\""); 21590 delete _options[key]; 21591 } 21592 } 21593 _options.container = _util.get.elements(_options.container)[0]; 21594 // check ScrollContainer 21595 if (!_options.container) { 21596 log(1, "ERROR creating object " + NAMESPACE + ": No valid scroll container supplied"); 21597 throw NAMESPACE + " init failed."; // cancel 21598 } 21599 _isDocument = _options.container === window || _options.container === document.body || !document.body.contains(_options.container); 21600 // normalize to window 21601 if (_isDocument) { 21602 _options.container = window; 21603 } 21604 // update container size immediately 21605 _viewPortSize = getViewportSize(); 21606 // set event handlers 21607 _options.container.addEventListener("resize", onChange); 21608 _options.container.addEventListener("scroll", onChange); 21609 21610 var ri = parseInt(_options.refreshInterval, 10); 21611 _options.refreshInterval = _util.type.Number(ri) ? ri : DEFAULT_OPTIONS.refreshInterval; 21612 scheduleRefresh(); 21613 21614 log(3, "added new " + NAMESPACE + " controller (v" + ScrollMagic.version + ")"); 21615 }; 21616 21617 /** 21618 * Schedule the next execution of the refresh function 21619 * @private 21620 */ 21621 var scheduleRefresh = function () { 21622 if (_options.refreshInterval > 0) { 21623 _refreshTimeout = window.setTimeout(refresh, _options.refreshInterval); 21624 } 21625 }; 21626 21627 /** 21628 * Default function to get scroll pos - overwriteable using `Controller.scrollPos(newFunction)` 21629 * @private 21630 */ 21631 var getScrollPos = function () { 21632 return _options.vertical ? _util.get.scrollTop(_options.container) : _util.get.scrollLeft(_options.container); 21633 }; 21634 21635 /** 21636 * Returns the current viewport Size (width vor horizontal, height for vertical) 21637 * @private 21638 */ 21639 var getViewportSize = function () { 21640 return _options.vertical ? _util.get.height(_options.container) : _util.get.width(_options.container); 21641 }; 21642 21643 /** 21644 * Default function to set scroll pos - overwriteable using `Controller.scrollTo(newFunction)` 21645 * Make available publicly for pinned mousewheel workaround. 21646 * @private 21647 */ 21648 var setScrollPos = this._setScrollPos = function (pos) { 21649 if (_options.vertical) { 21650 if (_isDocument) { 21651 window.scrollTo(_util.get.scrollLeft(), pos); 21652 } else { 21653 _options.container.scrollTop = pos; 21654 } 21655 } else { 21656 if (_isDocument) { 21657 window.scrollTo(pos, _util.get.scrollTop()); 21658 } else { 21659 _options.container.scrollLeft = pos; 21660 } 21661 } 21662 }; 21663 21664 /** 21665 * Handle updates in cycles instead of on scroll (performance) 21666 * @private 21667 */ 21668 var updateScenes = function () { 21669 if (_enabled && _updateScenesOnNextCycle) { 21670 // determine scenes to update 21671 var scenesToUpdate = _util.type.Array(_updateScenesOnNextCycle) ? _updateScenesOnNextCycle : _sceneObjects.slice(0); 21672 // reset scenes 21673 _updateScenesOnNextCycle = false; 21674 var oldScrollPos = _scrollPos; 21675 // update scroll pos now instead of onChange, as it might have changed since scheduling (i.e. in-browser smooth scroll) 21676 _scrollPos = Controller.scrollPos(); 21677 var deltaScroll = _scrollPos - oldScrollPos; 21678 if (deltaScroll !== 0) { // scroll position changed? 21679 _scrollDirection = (deltaScroll > 0) ? SCROLL_DIRECTION_FORWARD : SCROLL_DIRECTION_REVERSE; 21680 } 21681 // reverse order of scenes if scrolling reverse 21682 if (_scrollDirection === SCROLL_DIRECTION_REVERSE) { 21683 scenesToUpdate.reverse(); 21684 } 21685 // update scenes 21686 scenesToUpdate.forEach(function (scene, index) { 21687 log(3, "updating Scene " + (index + 1) + "/" + scenesToUpdate.length + " (" + _sceneObjects.length + " total)"); 21688 scene.update(true); 21689 }); 21690 if (scenesToUpdate.length === 0 && _options.loglevel >= 3) { 21691 log(3, "updating 0 Scenes (nothing added to controller)"); 21692 } 21693 } 21694 }; 21695 21696 /** 21697 * Initializes rAF callback 21698 * @private 21699 */ 21700 var debounceUpdate = function () { 21701 _updateTimeout = _util.rAF(updateScenes); 21702 }; 21703 21704 /** 21705 * Handles Container changes 21706 * @private 21707 */ 21708 var onChange = function (e) { 21709 log(3, "event fired causing an update:", e.type); 21710 if (e.type == "resize") { 21711 // resize 21712 _viewPortSize = getViewportSize(); 21713 _scrollDirection = SCROLL_DIRECTION_PAUSED; 21714 } 21715 // schedule update 21716 if (_updateScenesOnNextCycle !== true) { 21717 _updateScenesOnNextCycle = true; 21718 debounceUpdate(); 21719 } 21720 }; 21721 21722 var refresh = function () { 21723 if (!_isDocument) { 21724 // simulate resize event. Only works for viewport relevant param (performance) 21725 if (_viewPortSize != getViewportSize()) { 21726 var resizeEvent; 21727 try { 21728 resizeEvent = new Event('resize', { 21729 bubbles: false, 21730 cancelable: false 21731 }); 21732 } catch (e) { // stupid IE 21733 resizeEvent = document.createEvent("Event"); 21734 resizeEvent.initEvent("resize", false, false); 21735 } 21736 _options.container.dispatchEvent(resizeEvent); 21737 } 21738 } 21739 _sceneObjects.forEach(function (scene, index) { // refresh all scenes 21740 scene.refresh(); 21741 }); 21742 scheduleRefresh(); 21743 }; 21744 21745 /** 21746 * Send a debug message to the console. 21747 * provided publicly with _log for plugins 21748 * @private 21749 * 21750 * @param {number} loglevel - The loglevel required to initiate output for the message. 21751 * @param {...mixed} output - One or more variables that should be passed to the console. 21752 */ 21753 var log = this._log = function (loglevel, output) { 21754 if (_options.loglevel >= loglevel) { 21755 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ") ->"); 21756 _util.log.apply(window, arguments); 21757 } 21758 }; 21759 // for scenes we have getters for each option, but for the controller we don't, so we need to make it available externally for plugins 21760 this._options = _options; 21761 21762 /** 21763 * Sort scenes in ascending order of their start offset. 21764 * @private 21765 * 21766 * @param {array} ScenesArray - an array of ScrollMagic Scenes that should be sorted 21767 * @return {array} The sorted array of Scenes. 21768 */ 21769 var sortScenes = function (ScenesArray) { 21770 if (ScenesArray.length <= 1) { 21771 return ScenesArray; 21772 } else { 21773 var scenes = ScenesArray.slice(0); 21774 scenes.sort(function (a, b) { 21775 return a.scrollOffset() > b.scrollOffset() ? 1 : -1; 21776 }); 21777 return scenes; 21778 } 21779 }; 21780 21781 /** 21782 * ---------------------------------------------------------------- 21783 * public functions 21784 * ---------------------------------------------------------------- 21785 */ 21786 21787 /** 21788 * Add one ore more scene(s) to the controller. 21789 * This is the equivalent to `Scene.addTo(controller)`. 21790 * @public 21791 * @example 21792 * // with a previously defined scene 21793 * controller.addScene(scene); 21794 * 21795 * // with a newly created scene. 21796 * controller.addScene(new ScrollMagic.Scene({duration : 0})); 21797 * 21798 * // adding multiple scenes 21799 * controller.addScene([scene, scene2, new ScrollMagic.Scene({duration : 0})]); 21800 * 21801 * @param {(ScrollMagic.Scene|array)} newScene - ScrollMagic Scene or Array of Scenes to be added to the controller. 21802 * @return {Controller} Parent object for chaining. 21803 */ 21804 this.addScene = function (newScene) { 21805 if (_util.type.Array(newScene)) { 21806 newScene.forEach(function (scene, index) { 21807 Controller.addScene(scene); 21808 }); 21809 } else if (newScene instanceof ScrollMagic.Scene) { 21810 if (newScene.controller() !== Controller) { 21811 newScene.addTo(Controller); 21812 } else if (_sceneObjects.indexOf(newScene) < 0) { 21813 // new scene 21814 _sceneObjects.push(newScene); // add to array 21815 _sceneObjects = sortScenes(_sceneObjects); // sort 21816 newScene.on("shift.controller_sort", function () { // resort whenever scene moves 21817 _sceneObjects = sortScenes(_sceneObjects); 21818 }); 21819 // insert Global defaults. 21820 for (var key in _options.globalSceneOptions) { 21821 if (newScene[key]) { 21822 newScene[key].call(newScene, _options.globalSceneOptions[key]); 21823 } 21824 } 21825 log(3, "adding Scene (now " + _sceneObjects.length + " total)"); 21826 } 21827 } else { 21828 log(1, "ERROR: invalid argument supplied for '.addScene()'"); 21829 } 21830 return Controller; 21831 }; 21832 21833 /** 21834 * Remove one ore more scene(s) from the controller. 21835 * This is the equivalent to `Scene.remove()`. 21836 * @public 21837 * @example 21838 * // remove a scene from the controller 21839 * controller.removeScene(scene); 21840 * 21841 * // remove multiple scenes from the controller 21842 * controller.removeScene([scene, scene2, scene3]); 21843 * 21844 * @param {(ScrollMagic.Scene|array)} Scene - ScrollMagic Scene or Array of Scenes to be removed from the controller. 21845 * @returns {Controller} Parent object for chaining. 21846 */ 21847 this.removeScene = function (Scene) { 21848 if (_util.type.Array(Scene)) { 21849 Scene.forEach(function (scene, index) { 21850 Controller.removeScene(scene); 21851 }); 21852 } else { 21853 var index = _sceneObjects.indexOf(Scene); 21854 if (index > -1) { 21855 Scene.off("shift.controller_sort"); 21856 _sceneObjects.splice(index, 1); 21857 log(3, "removing Scene (now " + _sceneObjects.length + " left)"); 21858 Scene.remove(); 21859 } 21860 } 21861 return Controller; 21862 }; 21863 21864 /** 21865 * Update one ore more scene(s) according to the scroll position of the container. 21866 * This is the equivalent to `Scene.update()`. 21867 * The update method calculates the scene's start and end position (based on the trigger element, trigger hook, duration and offset) and checks it against the current scroll position of the container. 21868 * It then updates the current scene state accordingly (or does nothing, if the state is already correct) – Pins will be set to their correct position and tweens will be updated to their correct progress. 21869 * _**Note:** This method gets called constantly whenever Controller detects a change. The only application for you is if you change something outside of the realm of ScrollMagic, like moving the trigger or changing tween parameters._ 21870 * @public 21871 * @example 21872 * // update a specific scene on next cycle 21873 * controller.updateScene(scene); 21874 * 21875 * // update a specific scene immediately 21876 * controller.updateScene(scene, true); 21877 * 21878 * // update multiple scenes scene on next cycle 21879 * controller.updateScene([scene1, scene2, scene3]); 21880 * 21881 * @param {ScrollMagic.Scene} Scene - ScrollMagic Scene or Array of Scenes that is/are supposed to be updated. 21882 * @param {boolean} [immediately=false] - If `true` the update will be instant, if `false` it will wait until next update cycle. 21883 This is useful when changing multiple properties of the scene - this way it will only be updated once all new properties are set (updateScenes). 21884 * @return {Controller} Parent object for chaining. 21885 */ 21886 this.updateScene = function (Scene, immediately) { 21887 if (_util.type.Array(Scene)) { 21888 Scene.forEach(function (scene, index) { 21889 Controller.updateScene(scene, immediately); 21890 }); 21891 } else { 21892 if (immediately) { 21893 Scene.update(true); 21894 } else if (_updateScenesOnNextCycle !== true && Scene instanceof ScrollMagic.Scene) { // if _updateScenesOnNextCycle is true, all connected scenes are already scheduled for update 21895 // prep array for next update cycle 21896 _updateScenesOnNextCycle = _updateScenesOnNextCycle || []; 21897 if (_updateScenesOnNextCycle.indexOf(Scene) == -1) { 21898 _updateScenesOnNextCycle.push(Scene); 21899 } 21900 _updateScenesOnNextCycle = sortScenes(_updateScenesOnNextCycle); // sort 21901 debounceUpdate(); 21902 } 21903 } 21904 return Controller; 21905 }; 21906 21907 /** 21908 * Updates the controller params and calls updateScene on every scene, that is attached to the controller. 21909 * See `Controller.updateScene()` for more information about what this means. 21910 * In most cases you will not need this function, as it is called constantly, whenever ScrollMagic detects a state change event, like resize or scroll. 21911 * The only application for this method is when ScrollMagic fails to detect these events. 21912 * One application is with some external scroll libraries (like iScroll) that move an internal container to a negative offset instead of actually scrolling. In this case the update on the controller needs to be called whenever the child container's position changes. 21913 * For this case there will also be the need to provide a custom function to calculate the correct scroll position. See `Controller.scrollPos()` for details. 21914 * @public 21915 * @example 21916 * // update the controller on next cycle (saves performance due to elimination of redundant updates) 21917 * controller.update(); 21918 * 21919 * // update the controller immediately 21920 * controller.update(true); 21921 * 21922 * @param {boolean} [immediately=false] - If `true` the update will be instant, if `false` it will wait until next update cycle (better performance) 21923 * @return {Controller} Parent object for chaining. 21924 */ 21925 this.update = function (immediately) { 21926 onChange({ 21927 type: "resize" 21928 }); // will update size and set _updateScenesOnNextCycle to true 21929 if (immediately) { 21930 updateScenes(); 21931 } 21932 return Controller; 21933 }; 21934 21935 /** 21936 * Scroll to a numeric scroll offset, a DOM element, the start of a scene or provide an alternate method for scrolling. 21937 * For vertical controllers it will change the top scroll offset and for horizontal applications it will change the left offset. 21938 * @public 21939 * 21940 * @since 1.1.0 21941 * @example 21942 * // scroll to an offset of 100 21943 * controller.scrollTo(100); 21944 * 21945 * // scroll to a DOM element 21946 * controller.scrollTo("#anchor"); 21947 * 21948 * // scroll to the beginning of a scene 21949 * var scene = new ScrollMagic.Scene({offset: 200}); 21950 * controller.scrollTo(scene); 21951 * 21952 * // define a new scroll position modification function (jQuery animate instead of jump) 21953 * controller.scrollTo(function (newScrollPos) { 21954 * $("html, body").animate({scrollTop: newScrollPos}); 21955 * }); 21956 * controller.scrollTo(100); // call as usual, but the new function will be used instead 21957 * 21958 * // define a new scroll function with an additional parameter 21959 * controller.scrollTo(function (newScrollPos, message) { 21960 * console.log(message); 21961 * $(this).animate({scrollTop: newScrollPos}); 21962 * }); 21963 * // call as usual, but supply an extra parameter to the defined custom function 21964 * controller.scrollTo(100, "my message"); 21965 * 21966 * // define a new scroll function with an additional parameter containing multiple variables 21967 * controller.scrollTo(function (newScrollPos, options) { 21968 * someGlobalVar = options.a + options.b; 21969 * $(this).animate({scrollTop: newScrollPos}); 21970 * }); 21971 * // call as usual, but supply an extra parameter containing multiple options 21972 * controller.scrollTo(100, {a: 1, b: 2}); 21973 * 21974 * // define a new scroll function with a callback supplied as an additional parameter 21975 * controller.scrollTo(function (newScrollPos, callback) { 21976 * $(this).animate({scrollTop: newScrollPos}, 400, "swing", callback); 21977 * }); 21978 * // call as usual, but supply an extra parameter, which is used as a callback in the previously defined custom scroll function 21979 * controller.scrollTo(100, function() { 21980 * console.log("scroll has finished."); 21981 * }); 21982 * 21983 * @param {mixed} scrollTarget - The supplied argument can be one of these types: 21984 * 1. `number` -> The container will scroll to this new scroll offset. 21985 * 2. `string` or `object` -> Can be a selector or a DOM object. 21986 * The container will scroll to the position of this element. 21987 * 3. `ScrollMagic Scene` -> The container will scroll to the start of this scene. 21988 * 4. `function` -> This function will be used for future scroll position modifications. 21989 * This provides a way for you to change the behaviour of scrolling and adding new behaviour like animation. The function receives the new scroll position as a parameter and a reference to the container element using `this`. 21990 * It may also optionally receive an optional additional parameter (see below) 21991 * _**NOTE:** 21992 * All other options will still work as expected, using the new function to scroll._ 21993 * @param {mixed} [additionalParameter] - If a custom scroll function was defined (see above 4.), you may want to supply additional parameters to it, when calling it. You can do this using this parameter – see examples for details. Please note, that this parameter will have no effect, if you use the default scrolling function. 21994 * @returns {Controller} Parent object for chaining. 21995 */ 21996 this.scrollTo = function (scrollTarget, additionalParameter) { 21997 if (_util.type.Number(scrollTarget)) { // excecute 21998 setScrollPos.call(_options.container, scrollTarget, additionalParameter); 21999 } else if (scrollTarget instanceof ScrollMagic.Scene) { // scroll to scene 22000 if (scrollTarget.controller() === Controller) { // check if the controller is associated with this scene 22001 Controller.scrollTo(scrollTarget.scrollOffset(), additionalParameter); 22002 } else { 22003 log(2, "scrollTo(): The supplied scene does not belong to this controller. Scroll cancelled.", scrollTarget); 22004 } 22005 } else if (_util.type.Function(scrollTarget)) { // assign new scroll function 22006 setScrollPos = scrollTarget; 22007 } else { // scroll to element 22008 var elem = _util.get.elements(scrollTarget)[0]; 22009 if (elem) { 22010 // if parent is pin spacer, use spacer position instead so correct start position is returned for pinned elements. 22011 while (elem.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)) { 22012 elem = elem.parentNode; 22013 } 22014 22015 var 22016 param = _options.vertical ? "top" : "left", // which param is of interest ? 22017 containerOffset = _util.get.offset(_options.container), // container position is needed because element offset is returned in relation to document, not in relation to container. 22018 elementOffset = _util.get.offset(elem); 22019 22020 if (!_isDocument) { // container is not the document root, so substract scroll Position to get correct trigger element position relative to scrollcontent 22021 containerOffset[param] -= Controller.scrollPos(); 22022 } 22023 22024 Controller.scrollTo(elementOffset[param] - containerOffset[param], additionalParameter); 22025 } else { 22026 log(2, "scrollTo(): The supplied argument is invalid. Scroll cancelled.", scrollTarget); 22027 } 22028 } 22029 return Controller; 22030 }; 22031 22032 /** 22033 * **Get** the current scrollPosition or **Set** a new method to calculate it. 22034 * -> **GET**: 22035 * When used as a getter this function will return the current scroll position. 22036 * To get a cached value use Controller.info("scrollPos"), which will be updated in the update cycle. 22037 * For vertical controllers it will return the top scroll offset and for horizontal applications it will return the left offset. 22038 * 22039 * -> **SET**: 22040 * When used as a setter this method prodes a way to permanently overwrite the controller's scroll position calculation. 22041 * A typical usecase is when the scroll position is not reflected by the containers scrollTop or scrollLeft values, but for example by the inner offset of a child container. 22042 * Moving a child container inside a parent is a commonly used method for several scrolling frameworks, including iScroll. 22043 * By providing an alternate calculation function you can make sure ScrollMagic receives the correct scroll position. 22044 * Please also bear in mind that your function should return y values for vertical scrolls an x for horizontals. 22045 * 22046 * To change the current scroll position please use `Controller.scrollTo()`. 22047 * @public 22048 * 22049 * @example 22050 * // get the current scroll Position 22051 * var scrollPos = controller.scrollPos(); 22052 * 22053 * // set a new scroll position calculation method 22054 * controller.scrollPos(function () { 22055 * return this.info("vertical") ? -mychildcontainer.y : -mychildcontainer.x 22056 * }); 22057 * 22058 * @param {function} [scrollPosMethod] - The function to be used for the scroll position calculation of the container. 22059 * @returns {(number|Controller)} Current scroll position or parent object for chaining. 22060 */ 22061 this.scrollPos = function (scrollPosMethod) { 22062 if (!arguments.length) { // get 22063 return getScrollPos.call(Controller); 22064 } else { // set 22065 if (_util.type.Function(scrollPosMethod)) { 22066 getScrollPos = scrollPosMethod; 22067 } else { 22068 log(2, "Provided value for method 'scrollPos' is not a function. To change the current scroll position use 'scrollTo()'."); 22069 } 22070 } 22071 return Controller; 22072 }; 22073 22074 /** 22075 * **Get** all infos or one in particular about the controller. 22076 * @public 22077 * @example 22078 * // returns the current scroll position (number) 22079 * var scrollPos = controller.info("scrollPos"); 22080 * 22081 * // returns all infos as an object 22082 * var infos = controller.info(); 22083 * 22084 * @param {string} [about] - If passed only this info will be returned instead of an object containing all. 22085 Valid options are: 22086 ** `"size"` => the current viewport size of the container 22087 ** `"vertical"` => true if vertical scrolling, otherwise false 22088 ** `"scrollPos"` => the current scroll position 22089 ** `"scrollDirection"` => the last known direction of the scroll 22090 ** `"container"` => the container element 22091 ** `"isDocument"` => true if container element is the document. 22092 * @returns {(mixed|object)} The requested info(s). 22093 */ 22094 this.info = function (about) { 22095 var values = { 22096 size: _viewPortSize, // contains height or width (in regard to orientation); 22097 vertical: _options.vertical, 22098 scrollPos: _scrollPos, 22099 scrollDirection: _scrollDirection, 22100 container: _options.container, 22101 isDocument: _isDocument 22102 }; 22103 if (!arguments.length) { // get all as an object 22104 return values; 22105 } else if (values[about] !== undefined) { 22106 return values[about]; 22107 } else { 22108 log(1, "ERROR: option \"" + about + "\" is not available"); 22109 return; 22110 } 22111 }; 22112 22113 /** 22114 * **Get** or **Set** the current loglevel option value. 22115 * @public 22116 * 22117 * @example 22118 * // get the current value 22119 * var loglevel = controller.loglevel(); 22120 * 22121 * // set a new value 22122 * controller.loglevel(3); 22123 * 22124 * @param {number} [newLoglevel] - The new loglevel setting of the Controller. `[0-3]` 22125 * @returns {(number|Controller)} Current loglevel or parent object for chaining. 22126 */ 22127 this.loglevel = function (newLoglevel) { 22128 if (!arguments.length) { // get 22129 return _options.loglevel; 22130 } else if (_options.loglevel != newLoglevel) { // set 22131 _options.loglevel = newLoglevel; 22132 } 22133 return Controller; 22134 }; 22135 22136 /** 22137 * **Get** or **Set** the current enabled state of the controller. 22138 * This can be used to disable all Scenes connected to the controller without destroying or removing them. 22139 * @public 22140 * 22141 * @example 22142 * // get the current value 22143 * var enabled = controller.enabled(); 22144 * 22145 * // disable the controller 22146 * controller.enabled(false); 22147 * 22148 * @param {boolean} [newState] - The new enabled state of the controller `true` or `false`. 22149 * @returns {(boolean|Controller)} Current enabled state or parent object for chaining. 22150 */ 22151 this.enabled = function (newState) { 22152 if (!arguments.length) { // get 22153 return _enabled; 22154 } else if (_enabled != newState) { // set 22155 _enabled = !!newState; 22156 Controller.updateScene(_sceneObjects, true); 22157 } 22158 return Controller; 22159 }; 22160 22161 /** 22162 * Destroy the Controller, all Scenes and everything. 22163 * @public 22164 * 22165 * @example 22166 * // without resetting the scenes 22167 * controller = controller.destroy(); 22168 * 22169 * // with scene reset 22170 * controller = controller.destroy(true); 22171 * 22172 * @param {boolean} [resetScenes=false] - If `true` the pins and tweens (if existent) of all scenes will be reset. 22173 * @returns {null} Null to unset handler variables. 22174 */ 22175 this.destroy = function (resetScenes) { 22176 window.clearTimeout(_refreshTimeout); 22177 var i = _sceneObjects.length; 22178 while (i--) { 22179 _sceneObjects[i].destroy(resetScenes); 22180 } 22181 _options.container.removeEventListener("resize", onChange); 22182 _options.container.removeEventListener("scroll", onChange); 22183 _util.cAF(_updateTimeout); 22184 log(3, "destroyed " + NAMESPACE + " (reset: " + (resetScenes ? "true" : "false") + ")"); 22185 return null; 22186 }; 22187 22188 // INIT 22189 construct(); 22190 return Controller; 22191 }; 22192 22193 // store pagewide controller options 22194 var CONTROLLER_OPTIONS = { 22195 defaults: { 22196 container: window, 22197 vertical: true, 22198 globalSceneOptions: {}, 22199 loglevel: 2, 22200 refreshInterval: 100 22201 } 22202 }; 22203 /* 22204 * method used to add an option to ScrollMagic Scenes. 22205 */ 22206 ScrollMagic.Controller.addOption = function (name, defaultValue) { 22207 CONTROLLER_OPTIONS.defaults[name] = defaultValue; 22208 }; 22209 // instance extension function for plugins 22210 ScrollMagic.Controller.extend = function (extension) { 22211 var oldClass = this; 22212 ScrollMagic.Controller = function () { 22213 oldClass.apply(this, arguments); 22214 this.$super = _util.extend({}, this); // copy parent state 22215 return extension.apply(this, arguments) || this; 22216 }; 22217 _util.extend(ScrollMagic.Controller, oldClass); // copy properties 22218 ScrollMagic.Controller.prototype = oldClass.prototype; // copy prototype 22219 ScrollMagic.Controller.prototype.constructor = ScrollMagic.Controller; // restore constructor 22220 }; 22221 22222 22223 /** 22224 * A Scene defines where the controller should react and how. 22225 * 22226 * @class 22227 * 22228 * @example 22229 * // create a standard scene and add it to a controller 22230 * new ScrollMagic.Scene() 22231 * .addTo(controller); 22232 * 22233 * // create a scene with custom options and assign a handler to it. 22234 * var scene = new ScrollMagic.Scene({ 22235 * duration: 100, 22236 * offset: 200, 22237 * triggerHook: "onEnter", 22238 * reverse: false 22239 * }); 22240 * 22241 * @param {object} [options] - Options for the Scene. The options can be updated at any time. 22242 Instead of setting the options for each scene individually you can also set them globally in the controller as the controllers `globalSceneOptions` option. The object accepts the same properties as the ones below. 22243 When a scene is added to the controller the options defined using the Scene constructor will be overwritten by those set in `globalSceneOptions`. 22244 * @param {(number|string|function)} [options.duration=0] - The duration of the scene. 22245 Please see `Scene.duration()` for details. 22246 * @param {number} [options.offset=0] - Offset Value for the Trigger Position. If no triggerElement is defined this will be the scroll distance from the start of the page, after which the scene will start. 22247 * @param {(string|object)} [options.triggerElement=null] - Selector or DOM object that defines the start of the scene. If undefined the scene will start right at the start of the page (unless an offset is set). 22248 * @param {(number|string)} [options.triggerHook="onCenter"] - Can be a number between 0 and 1 defining the position of the trigger Hook in relation to the viewport. 22249 Can also be defined using a string: 22250 ** `"onEnter"` => `1` 22251 ** `"onCenter"` => `0.5` 22252 ** `"onLeave"` => `0` 22253 * @param {boolean} [options.reverse=true] - Should the scene reverse, when scrolling up? 22254 * @param {number} [options.loglevel=2] - Loglevel for debugging. Note that logging is disabled in the minified version of ScrollMagic. 22255 ** `0` => silent 22256 ** `1` => errors 22257 ** `2` => errors, warnings 22258 ** `3` => errors, warnings, debuginfo 22259 * 22260 */ 22261 ScrollMagic.Scene = function (options) { 22262 22263 /* 22264 * ---------------------------------------------------------------- 22265 * settings 22266 * ---------------------------------------------------------------- 22267 */ 22268 22269 var 22270 NAMESPACE = 'ScrollMagic.Scene', 22271 SCENE_STATE_BEFORE = 'BEFORE', 22272 SCENE_STATE_DURING = 'DURING', 22273 SCENE_STATE_AFTER = 'AFTER', 22274 DEFAULT_OPTIONS = SCENE_OPTIONS.defaults; 22275 22276 /* 22277 * ---------------------------------------------------------------- 22278 * private vars 22279 * ---------------------------------------------------------------- 22280 */ 22281 22282 var 22283 Scene = this, 22284 _options = _util.extend({}, DEFAULT_OPTIONS, options), 22285 _state = SCENE_STATE_BEFORE, 22286 _progress = 0, 22287 _scrollOffset = { 22288 start: 0, 22289 end: 0 22290 }, // reflects the controllers's scroll position for the start and end of the scene respectively 22291 _triggerPos = 0, 22292 _enabled = true, 22293 _durationUpdateMethod, 22294 _controller; 22295 22296 /** 22297 * Internal constructor function of the ScrollMagic Scene 22298 * @private 22299 */ 22300 var construct = function () { 22301 for (var key in _options) { // check supplied options 22302 if (!DEFAULT_OPTIONS.hasOwnProperty(key)) { 22303 log(2, "WARNING: Unknown option \"" + key + "\""); 22304 delete _options[key]; 22305 } 22306 } 22307 // add getters/setters for all possible options 22308 for (var optionName in DEFAULT_OPTIONS) { 22309 addSceneOption(optionName); 22310 } 22311 // validate all options 22312 validateOption(); 22313 }; 22314 22315 /* 22316 * ---------------------------------------------------------------- 22317 * Event Management 22318 * ---------------------------------------------------------------- 22319 */ 22320 22321 var _listeners = {}; 22322 /** 22323 * Scene start event. 22324 * Fires whenever the scroll position its the starting point of the scene. 22325 * It will also fire when scrolling back up going over the start position of the scene. If you want something to happen only when scrolling down/right, use the scrollDirection parameter passed to the callback. 22326 * 22327 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 22328 * 22329 * @event ScrollMagic.Scene#start 22330 * 22331 * @example 22332 * scene.on("start", function (event) { 22333 * console.log("Hit start point of scene."); 22334 * }); 22335 * 22336 * @property {object} event - The event Object passed to each callback 22337 * @property {string} event.type - The name of the event 22338 * @property {Scene} event.target - The Scene object that triggered this event 22339 * @property {number} event.progress - Reflects the current progress of the scene 22340 * @property {string} event.state - The current state of the scene `"BEFORE"` or `"DURING"` 22341 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 22342 */ 22343 /** 22344 * Scene end event. 22345 * Fires whenever the scroll position its the ending point of the scene. 22346 * It will also fire when scrolling back up from after the scene and going over its end position. If you want something to happen only when scrolling down/right, use the scrollDirection parameter passed to the callback. 22347 * 22348 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 22349 * 22350 * @event ScrollMagic.Scene#end 22351 * 22352 * @example 22353 * scene.on("end", function (event) { 22354 * console.log("Hit end point of scene."); 22355 * }); 22356 * 22357 * @property {object} event - The event Object passed to each callback 22358 * @property {string} event.type - The name of the event 22359 * @property {Scene} event.target - The Scene object that triggered this event 22360 * @property {number} event.progress - Reflects the current progress of the scene 22361 * @property {string} event.state - The current state of the scene `"DURING"` or `"AFTER"` 22362 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 22363 */ 22364 /** 22365 * Scene enter event. 22366 * Fires whenever the scene enters the "DURING" state. 22367 * Keep in mind that it doesn't matter if the scene plays forward or backward: This event always fires when the scene enters its active scroll timeframe, regardless of the scroll-direction. 22368 * 22369 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 22370 * 22371 * @event ScrollMagic.Scene#enter 22372 * 22373 * @example 22374 * scene.on("enter", function (event) { 22375 * console.log("Scene entered."); 22376 * }); 22377 * 22378 * @property {object} event - The event Object passed to each callback 22379 * @property {string} event.type - The name of the event 22380 * @property {Scene} event.target - The Scene object that triggered this event 22381 * @property {number} event.progress - Reflects the current progress of the scene 22382 * @property {string} event.state - The current state of the scene - always `"DURING"` 22383 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 22384 */ 22385 /** 22386 * Scene leave event. 22387 * Fires whenever the scene's state goes from "DURING" to either "BEFORE" or "AFTER". 22388 * Keep in mind that it doesn't matter if the scene plays forward or backward: This event always fires when the scene leaves its active scroll timeframe, regardless of the scroll-direction. 22389 * 22390 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 22391 * 22392 * @event ScrollMagic.Scene#leave 22393 * 22394 * @example 22395 * scene.on("leave", function (event) { 22396 * console.log("Scene left."); 22397 * }); 22398 * 22399 * @property {object} event - The event Object passed to each callback 22400 * @property {string} event.type - The name of the event 22401 * @property {Scene} event.target - The Scene object that triggered this event 22402 * @property {number} event.progress - Reflects the current progress of the scene 22403 * @property {string} event.state - The current state of the scene `"BEFORE"` or `"AFTER"` 22404 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 22405 */ 22406 /** 22407 * Scene update event. 22408 * Fires whenever the scene is updated (but not necessarily changes the progress). 22409 * 22410 * @event ScrollMagic.Scene#update 22411 * 22412 * @example 22413 * scene.on("update", function (event) { 22414 * console.log("Scene updated."); 22415 * }); 22416 * 22417 * @property {object} event - The event Object passed to each callback 22418 * @property {string} event.type - The name of the event 22419 * @property {Scene} event.target - The Scene object that triggered this event 22420 * @property {number} event.startPos - The starting position of the scene (in relation to the conainer) 22421 * @property {number} event.endPos - The ending position of the scene (in relation to the conainer) 22422 * @property {number} event.scrollPos - The current scroll position of the container 22423 */ 22424 /** 22425 * Scene progress event. 22426 * Fires whenever the progress of the scene changes. 22427 * 22428 * For details on this event and the order in which it is fired, please review the {@link Scene.progress} method. 22429 * 22430 * @event ScrollMagic.Scene#progress 22431 * 22432 * @example 22433 * scene.on("progress", function (event) { 22434 * console.log("Scene progress changed to " + event.progress); 22435 * }); 22436 * 22437 * @property {object} event - The event Object passed to each callback 22438 * @property {string} event.type - The name of the event 22439 * @property {Scene} event.target - The Scene object that triggered this event 22440 * @property {number} event.progress - Reflects the current progress of the scene 22441 * @property {string} event.state - The current state of the scene `"BEFORE"`, `"DURING"` or `"AFTER"` 22442 * @property {string} event.scrollDirection - Indicates which way we are scrolling `"PAUSED"`, `"FORWARD"` or `"REVERSE"` 22443 */ 22444 /** 22445 * Scene change event. 22446 * Fires whenvever a property of the scene is changed. 22447 * 22448 * @event ScrollMagic.Scene#change 22449 * 22450 * @example 22451 * scene.on("change", function (event) { 22452 * console.log("Scene Property \"" + event.what + "\" changed to " + event.newval); 22453 * }); 22454 * 22455 * @property {object} event - The event Object passed to each callback 22456 * @property {string} event.type - The name of the event 22457 * @property {Scene} event.target - The Scene object that triggered this event 22458 * @property {string} event.what - Indicates what value has been changed 22459 * @property {mixed} event.newval - The new value of the changed property 22460 */ 22461 /** 22462 * Scene shift event. 22463 * Fires whenvever the start or end **scroll offset** of the scene change. 22464 * This happens explicitely, when one of these values change: `offset`, `duration` or `triggerHook`. 22465 * It will fire implicitly when the `triggerElement` changes, if the new element has a different position (most cases). 22466 * It will also fire implicitly when the size of the container changes and the triggerHook is anything other than `onLeave`. 22467 * 22468 * @event ScrollMagic.Scene#shift 22469 * @since 1.1.0 22470 * 22471 * @example 22472 * scene.on("shift", function (event) { 22473 * console.log("Scene moved, because the " + event.reason + " has changed.)"); 22474 * }); 22475 * 22476 * @property {object} event - The event Object passed to each callback 22477 * @property {string} event.type - The name of the event 22478 * @property {Scene} event.target - The Scene object that triggered this event 22479 * @property {string} event.reason - Indicates why the scene has shifted 22480 */ 22481 /** 22482 * Scene destroy event. 22483 * Fires whenvever the scene is destroyed. 22484 * This can be used to tidy up custom behaviour used in events. 22485 * 22486 * @event ScrollMagic.Scene#destroy 22487 * @since 1.1.0 22488 * 22489 * @example 22490 * scene.on("enter", function (event) { 22491 * // add custom action 22492 * $("#my-elem").left("200"); 22493 * }) 22494 * .on("destroy", function (event) { 22495 * // reset my element to start position 22496 * if (event.reset) { 22497 * $("#my-elem").left("0"); 22498 * } 22499 * }); 22500 * 22501 * @property {object} event - The event Object passed to each callback 22502 * @property {string} event.type - The name of the event 22503 * @property {Scene} event.target - The Scene object that triggered this event 22504 * @property {boolean} event.reset - Indicates if the destroy method was called with reset `true` or `false`. 22505 */ 22506 /** 22507 * Scene add event. 22508 * Fires when the scene is added to a controller. 22509 * This is mostly used by plugins to know that change might be due. 22510 * 22511 * @event ScrollMagic.Scene#add 22512 * @since 2.0.0 22513 * 22514 * @example 22515 * scene.on("add", function (event) { 22516 * console.log('Scene was added to a new controller.'); 22517 * }); 22518 * 22519 * @property {object} event - The event Object passed to each callback 22520 * @property {string} event.type - The name of the event 22521 * @property {Scene} event.target - The Scene object that triggered this event 22522 * @property {boolean} event.controller - The controller object the scene was added to. 22523 */ 22524 /** 22525 * Scene remove event. 22526 * Fires when the scene is removed from a controller. 22527 * This is mostly used by plugins to know that change might be due. 22528 * 22529 * @event ScrollMagic.Scene#remove 22530 * @since 2.0.0 22531 * 22532 * @example 22533 * scene.on("remove", function (event) { 22534 * console.log('Scene was removed from its controller.'); 22535 * }); 22536 * 22537 * @property {object} event - The event Object passed to each callback 22538 * @property {string} event.type - The name of the event 22539 * @property {Scene} event.target - The Scene object that triggered this event 22540 */ 22541 22542 /** 22543 * Add one ore more event listener. 22544 * The callback function will be fired at the respective event, and an object containing relevant data will be passed to the callback. 22545 * @method ScrollMagic.Scene#on 22546 * 22547 * @example 22548 * function callback (event) { 22549 * console.log("Event fired! (" + event.type + ")"); 22550 * } 22551 * // add listeners 22552 * scene.on("change update progress start end enter leave", callback); 22553 * 22554 * @param {string} names - The name or names of the event the callback should be attached to. 22555 * @param {function} callback - A function that should be executed, when the event is dispatched. An event object will be passed to the callback. 22556 * @returns {Scene} Parent object for chaining. 22557 */ 22558 this.on = function (names, callback) { 22559 if (_util.type.Function(callback)) { 22560 names = names.trim().split(' '); 22561 names.forEach(function (fullname) { 22562 var 22563 nameparts = fullname.split('.'), 22564 eventname = nameparts[0], 22565 namespace = nameparts[1]; 22566 if (eventname != "*") { // disallow wildcards 22567 if (!_listeners[eventname]) { 22568 _listeners[eventname] = []; 22569 } 22570 _listeners[eventname].push({ 22571 namespace: namespace || '', 22572 callback: callback 22573 }); 22574 } 22575 }); 22576 } else { 22577 log(1, "ERROR when calling '.on()': Supplied callback for '" + names + "' is not a valid function!"); 22578 } 22579 return Scene; 22580 }; 22581 22582 /** 22583 * Remove one or more event listener. 22584 * @method ScrollMagic.Scene#off 22585 * 22586 * @example 22587 * function callback (event) { 22588 * console.log("Event fired! (" + event.type + ")"); 22589 * } 22590 * // add listeners 22591 * scene.on("change update", callback); 22592 * // remove listeners 22593 * scene.off("change update", callback); 22594 * 22595 * @param {string} names - The name or names of the event that should be removed. 22596 * @param {function} [callback] - A specific callback function that should be removed. If none is passed all callbacks to the event listener will be removed. 22597 * @returns {Scene} Parent object for chaining. 22598 */ 22599 this.off = function (names, callback) { 22600 if (!names) { 22601 log(1, "ERROR: Invalid event name supplied."); 22602 return Scene; 22603 } 22604 names = names.trim().split(' '); 22605 names.forEach(function (fullname, key) { 22606 var 22607 nameparts = fullname.split('.'), 22608 eventname = nameparts[0], 22609 namespace = nameparts[1] || '', 22610 removeList = eventname === '*' ? Object.keys(_listeners) : [eventname]; 22611 removeList.forEach(function (remove) { 22612 var 22613 list = _listeners[remove] || [], 22614 i = list.length; 22615 while (i--) { 22616 var listener = list[i]; 22617 if (listener && (namespace === listener.namespace || namespace === '*') && (!callback || callback == listener.callback)) { 22618 list.splice(i, 1); 22619 } 22620 } 22621 if (!list.length) { 22622 delete _listeners[remove]; 22623 } 22624 }); 22625 }); 22626 return Scene; 22627 }; 22628 22629 /** 22630 * Trigger an event. 22631 * @method ScrollMagic.Scene#trigger 22632 * 22633 * @example 22634 * this.trigger("change"); 22635 * 22636 * @param {string} name - The name of the event that should be triggered. 22637 * @param {object} [vars] - An object containing info that should be passed to the callback. 22638 * @returns {Scene} Parent object for chaining. 22639 */ 22640 this.trigger = function (name, vars) { 22641 if (name) { 22642 var 22643 nameparts = name.trim().split('.'), 22644 eventname = nameparts[0], 22645 namespace = nameparts[1], 22646 listeners = _listeners[eventname]; 22647 log(3, 'event fired:', eventname, vars ? "->" : '', vars || ''); 22648 if (listeners) { 22649 listeners.forEach(function (listener, key) { 22650 if (!namespace || namespace === listener.namespace) { 22651 listener.callback.call(Scene, new ScrollMagic.Event(eventname, listener.namespace, Scene, vars)); 22652 } 22653 }); 22654 } 22655 } else { 22656 log(1, "ERROR: Invalid event name supplied."); 22657 } 22658 return Scene; 22659 }; 22660 22661 // set event listeners 22662 Scene 22663 .on("change.internal", function (e) { 22664 if (e.what !== "loglevel" && e.what !== "tweenChanges") { // no need for a scene update scene with these options... 22665 if (e.what === "triggerElement") { 22666 updateTriggerElementPosition(); 22667 } else if (e.what === "reverse") { // the only property left that may have an impact on the current scene state. Everything else is handled by the shift event. 22668 Scene.update(); 22669 } 22670 } 22671 }) 22672 .on("shift.internal", function (e) { 22673 updateScrollOffset(); 22674 Scene.update(); // update scene to reflect new position 22675 }); 22676 22677 /** 22678 * Send a debug message to the console. 22679 * @private 22680 * but provided publicly with _log for plugins 22681 * 22682 * @param {number} loglevel - The loglevel required to initiate output for the message. 22683 * @param {...mixed} output - One or more variables that should be passed to the console. 22684 */ 22685 var log = this._log = function (loglevel, output) { 22686 if (_options.loglevel >= loglevel) { 22687 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ") ->"); 22688 _util.log.apply(window, arguments); 22689 } 22690 }; 22691 22692 /** 22693 * Add the scene to a controller. 22694 * This is the equivalent to `Controller.addScene(scene)`. 22695 * @method ScrollMagic.Scene#addTo 22696 * 22697 * @example 22698 * // add a scene to a ScrollMagic Controller 22699 * scene.addTo(controller); 22700 * 22701 * @param {ScrollMagic.Controller} controller - The controller to which the scene should be added. 22702 * @returns {Scene} Parent object for chaining. 22703 */ 22704 this.addTo = function (controller) { 22705 if (!(controller instanceof ScrollMagic.Controller)) { 22706 log(1, "ERROR: supplied argument of 'addTo()' is not a valid ScrollMagic Controller"); 22707 } else if (_controller != controller) { 22708 // new controller 22709 if (_controller) { // was associated to a different controller before, so remove it... 22710 _controller.removeScene(Scene); 22711 } 22712 _controller = controller; 22713 validateOption(); 22714 updateDuration(true); 22715 updateTriggerElementPosition(true); 22716 updateScrollOffset(); 22717 _controller.info("container").addEventListener('resize', onContainerResize); 22718 controller.addScene(Scene); 22719 Scene.trigger("add", { 22720 controller: _controller 22721 }); 22722 log(3, "added " + NAMESPACE + " to controller"); 22723 Scene.update(); 22724 } 22725 return Scene; 22726 }; 22727 22728 /** 22729 * **Get** or **Set** the current enabled state of the scene. 22730 * This can be used to disable this scene without removing or destroying it. 22731 * @method ScrollMagic.Scene#enabled 22732 * 22733 * @example 22734 * // get the current value 22735 * var enabled = scene.enabled(); 22736 * 22737 * // disable the scene 22738 * scene.enabled(false); 22739 * 22740 * @param {boolean} [newState] - The new enabled state of the scene `true` or `false`. 22741 * @returns {(boolean|Scene)} Current enabled state or parent object for chaining. 22742 */ 22743 this.enabled = function (newState) { 22744 if (!arguments.length) { // get 22745 return _enabled; 22746 } else if (_enabled != newState) { // set 22747 _enabled = !!newState; 22748 Scene.update(true); 22749 } 22750 return Scene; 22751 }; 22752 22753 /** 22754 * Remove the scene from the controller. 22755 * This is the equivalent to `Controller.removeScene(scene)`. 22756 * The scene will not be updated anymore until you readd it to a controller. 22757 * To remove the pin or the tween you need to call removeTween() or removePin() respectively. 22758 * @method ScrollMagic.Scene#remove 22759 * @example 22760 * // remove the scene from its controller 22761 * scene.remove(); 22762 * 22763 * @returns {Scene} Parent object for chaining. 22764 */ 22765 this.remove = function () { 22766 if (_controller) { 22767 _controller.info("container").removeEventListener('resize', onContainerResize); 22768 var tmpParent = _controller; 22769 _controller = undefined; 22770 tmpParent.removeScene(Scene); 22771 Scene.trigger("remove"); 22772 log(3, "removed " + NAMESPACE + " from controller"); 22773 } 22774 return Scene; 22775 }; 22776 22777 /** 22778 * Destroy the scene and everything. 22779 * @method ScrollMagic.Scene#destroy 22780 * @example 22781 * // destroy the scene without resetting the pin and tween to their initial positions 22782 * scene = scene.destroy(); 22783 * 22784 * // destroy the scene and reset the pin and tween 22785 * scene = scene.destroy(true); 22786 * 22787 * @param {boolean} [reset=false] - If `true` the pin and tween (if existent) will be reset. 22788 * @returns {null} Null to unset handler variables. 22789 */ 22790 this.destroy = function (reset) { 22791 Scene.trigger("destroy", { 22792 reset: reset 22793 }); 22794 Scene.remove(); 22795 Scene.off("*.*"); 22796 log(3, "destroyed " + NAMESPACE + " (reset: " + (reset ? "true" : "false") + ")"); 22797 return null; 22798 }; 22799 22800 22801 /** 22802 * Updates the Scene to reflect the current state. 22803 * This is the equivalent to `Controller.updateScene(scene, immediately)`. 22804 * The update method calculates the scene's start and end position (based on the trigger element, trigger hook, duration and offset) and checks it against the current scroll position of the container. 22805 * It then updates the current scene state accordingly (or does nothing, if the state is already correct) – Pins will be set to their correct position and tweens will be updated to their correct progress. 22806 * This means an update doesn't necessarily result in a progress change. The `progress` event will be fired if the progress has indeed changed between this update and the last. 22807 * _**NOTE:** This method gets called constantly whenever ScrollMagic detects a change. The only application for you is if you change something outside of the realm of ScrollMagic, like moving the trigger or changing tween parameters._ 22808 * @method ScrollMagic.Scene#update 22809 * @example 22810 * // update the scene on next tick 22811 * scene.update(); 22812 * 22813 * // update the scene immediately 22814 * scene.update(true); 22815 * 22816 * @fires Scene.update 22817 * 22818 * @param {boolean} [immediately=false] - If `true` the update will be instant, if `false` it will wait until next update cycle (better performance). 22819 * @returns {Scene} Parent object for chaining. 22820 */ 22821 this.update = function (immediately) { 22822 if (_controller) { 22823 if (immediately) { 22824 if (_controller.enabled() && _enabled) { 22825 var 22826 scrollPos = _controller.info("scrollPos"), 22827 newProgress; 22828 22829 if (_options.duration > 0) { 22830 newProgress = (scrollPos - _scrollOffset.start) / (_scrollOffset.end - _scrollOffset.start); 22831 } else { 22832 newProgress = scrollPos >= _scrollOffset.start ? 1 : 0; 22833 } 22834 22835 Scene.trigger("update", { 22836 startPos: _scrollOffset.start, 22837 endPos: _scrollOffset.end, 22838 scrollPos: scrollPos 22839 }); 22840 22841 Scene.progress(newProgress); 22842 } else if (_pin && _state === SCENE_STATE_DURING) { 22843 updatePinState(true); // unpin in position 22844 } 22845 } else { 22846 _controller.updateScene(Scene, false); 22847 } 22848 } 22849 return Scene; 22850 }; 22851 22852 /** 22853 * Updates dynamic scene variables like the trigger element position or the duration. 22854 * This method is automatically called in regular intervals from the controller. See {@link ScrollMagic.Controller} option `refreshInterval`. 22855 * 22856 * You can call it to minimize lag, for example when you intentionally change the position of the triggerElement. 22857 * If you don't it will simply be updated in the next refresh interval of the container, which is usually sufficient. 22858 * 22859 * @method ScrollMagic.Scene#refresh 22860 * @since 1.1.0 22861 * @example 22862 * scene = new ScrollMagic.Scene({triggerElement: "#trigger"}); 22863 * 22864 * // change the position of the trigger 22865 * $("#trigger").css("top", 500); 22866 * // immediately let the scene know of this change 22867 * scene.refresh(); 22868 * 22869 * @fires {@link Scene.shift}, if the trigger element position or the duration changed 22870 * @fires {@link Scene.change}, if the duration changed 22871 * 22872 * @returns {Scene} Parent object for chaining. 22873 */ 22874 this.refresh = function () { 22875 updateDuration(); 22876 updateTriggerElementPosition(); 22877 // update trigger element position 22878 return Scene; 22879 }; 22880 22881 /** 22882 * **Get** or **Set** the scene's progress. 22883 * Usually it shouldn't be necessary to use this as a setter, as it is set automatically by scene.update(). 22884 * The order in which the events are fired depends on the duration of the scene: 22885 * 1. Scenes with `duration == 0`: 22886 * Scenes that have no duration by definition have no ending. Thus the `end` event will never be fired. 22887 * When the trigger position of the scene is passed the events are always fired in this order: 22888 * `enter`, `start`, `progress` when scrolling forward 22889 * and 22890 * `progress`, `start`, `leave` when scrolling in reverse 22891 * 2. Scenes with `duration > 0`: 22892 * Scenes with a set duration have a defined start and end point. 22893 * When scrolling past the start position of the scene it will fire these events in this order: 22894 * `enter`, `start`, `progress` 22895 * When continuing to scroll and passing the end point it will fire these events: 22896 * `progress`, `end`, `leave` 22897 * When reversing through the end point these events are fired: 22898 * `enter`, `end`, `progress` 22899 * And when continuing to scroll past the start position in reverse it will fire: 22900 * `progress`, `start`, `leave` 22901 * In between start and end the `progress` event will be called constantly, whenever the progress changes. 22902 * 22903 * In short: 22904 * `enter` events will always trigger **before** the progress update and `leave` envents will trigger **after** the progress update. 22905 * `start` and `end` will always trigger at their respective position. 22906 * 22907 * Please review the event descriptions for details on the events and the event object that is passed to the callback. 22908 * 22909 * @method ScrollMagic.Scene#progress 22910 * @example 22911 * // get the current scene progress 22912 * var progress = scene.progress(); 22913 * 22914 * // set new scene progress 22915 * scene.progress(0.3); 22916 * 22917 * @fires {@link Scene.enter}, when used as setter 22918 * @fires {@link Scene.start}, when used as setter 22919 * @fires {@link Scene.progress}, when used as setter 22920 * @fires {@link Scene.end}, when used as setter 22921 * @fires {@link Scene.leave}, when used as setter 22922 * 22923 * @param {number} [progress] - The new progress value of the scene `[0-1]`. 22924 * @returns {number} `get` - Current scene progress. 22925 * @returns {Scene} `set` - Parent object for chaining. 22926 */ 22927 this.progress = function (progress) { 22928 if (!arguments.length) { // get 22929 return _progress; 22930 } else { // set 22931 var 22932 doUpdate = false, 22933 oldState = _state, 22934 scrollDirection = _controller ? _controller.info("scrollDirection") : 'PAUSED', 22935 reverseOrForward = _options.reverse || progress >= _progress; 22936 if (_options.duration === 0) { 22937 // zero duration scenes 22938 doUpdate = _progress != progress; 22939 _progress = progress < 1 && reverseOrForward ? 0 : 1; 22940 _state = _progress === 0 ? SCENE_STATE_BEFORE : SCENE_STATE_DURING; 22941 } else { 22942 // scenes with start and end 22943 if (progress < 0 && _state !== SCENE_STATE_BEFORE && reverseOrForward) { 22944 // go back to initial state 22945 _progress = 0; 22946 _state = SCENE_STATE_BEFORE; 22947 doUpdate = true; 22948 } else if (progress >= 0 && progress < 1 && reverseOrForward) { 22949 _progress = progress; 22950 _state = SCENE_STATE_DURING; 22951 doUpdate = true; 22952 } else if (progress >= 1 && _state !== SCENE_STATE_AFTER) { 22953 _progress = 1; 22954 _state = SCENE_STATE_AFTER; 22955 doUpdate = true; 22956 } else if (_state === SCENE_STATE_DURING && !reverseOrForward) { 22957 updatePinState(); // in case we scrolled backwards mid-scene and reverse is disabled => update the pin position, so it doesn't move back as well. 22958 } 22959 } 22960 if (doUpdate) { 22961 // fire events 22962 var 22963 eventVars = { 22964 progress: _progress, 22965 state: _state, 22966 scrollDirection: scrollDirection 22967 }, 22968 stateChanged = _state != oldState; 22969 22970 var trigger = function (eventName) { // tmp helper to simplify code 22971 Scene.trigger(eventName, eventVars); 22972 }; 22973 22974 if (stateChanged) { // enter events 22975 if (oldState !== SCENE_STATE_DURING) { 22976 trigger("enter"); 22977 trigger(oldState === SCENE_STATE_BEFORE ? "start" : "end"); 22978 } 22979 } 22980 trigger("progress"); 22981 if (stateChanged) { // leave events 22982 if (_state !== SCENE_STATE_DURING) { 22983 trigger(_state === SCENE_STATE_BEFORE ? "start" : "end"); 22984 trigger("leave"); 22985 } 22986 } 22987 } 22988 22989 return Scene; 22990 } 22991 }; 22992 22993 22994 /** 22995 * Update the start and end scrollOffset of the container. 22996 * The positions reflect what the controller's scroll position will be at the start and end respectively. 22997 * Is called, when: 22998 * - Scene event "change" is called with: offset, triggerHook, duration 22999 * - scroll container event "resize" is called 23000 * - the position of the triggerElement changes 23001 * - the controller changes -> addTo() 23002 * @private 23003 */ 23004 var updateScrollOffset = function () { 23005 _scrollOffset = { 23006 start: _triggerPos + _options.offset 23007 }; 23008 if (_controller && _options.triggerElement) { 23009 // take away triggerHook portion to get relative to top 23010 _scrollOffset.start -= _controller.info("size") * _options.triggerHook; 23011 } 23012 _scrollOffset.end = _scrollOffset.start + _options.duration; 23013 }; 23014 23015 /** 23016 * Updates the duration if set to a dynamic function. 23017 * This method is called when the scene is added to a controller and in regular intervals from the controller through scene.refresh(). 23018 * 23019 * @fires {@link Scene.change}, if the duration changed 23020 * @fires {@link Scene.shift}, if the duration changed 23021 * 23022 * @param {boolean} [suppressEvents=false] - If true the shift event will be suppressed. 23023 * @private 23024 */ 23025 var updateDuration = function (suppressEvents) { 23026 // update duration 23027 if (_durationUpdateMethod) { 23028 var varname = "duration"; 23029 if (changeOption(varname, _durationUpdateMethod.call(Scene)) && !suppressEvents) { // set 23030 Scene.trigger("change", { 23031 what: varname, 23032 newval: _options[varname] 23033 }); 23034 Scene.trigger("shift", { 23035 reason: varname 23036 }); 23037 } 23038 } 23039 }; 23040 23041 /** 23042 * Updates the position of the triggerElement, if present. 23043 * This method is called ... 23044 * - ... when the triggerElement is changed 23045 * - ... when the scene is added to a (new) controller 23046 * - ... in regular intervals from the controller through scene.refresh(). 23047 * 23048 * @fires {@link Scene.shift}, if the position changed 23049 * 23050 * @param {boolean} [suppressEvents=false] - If true the shift event will be suppressed. 23051 * @private 23052 */ 23053 var updateTriggerElementPosition = function (suppressEvents) { 23054 var 23055 elementPos = 0, 23056 telem = _options.triggerElement; 23057 if (_controller && (telem || _triggerPos > 0)) { // either an element exists or was removed and the triggerPos is still > 0 23058 if (telem) { // there currently a triggerElement set 23059 if (telem.parentNode) { // check if element is still attached to DOM 23060 var 23061 controllerInfo = _controller.info(), 23062 containerOffset = _util.get.offset(controllerInfo.container), // container position is needed because element offset is returned in relation to document, not in relation to container. 23063 param = controllerInfo.vertical ? "top" : "left"; // which param is of interest ? 23064 23065 // if parent is spacer, use spacer position instead so correct start position is returned for pinned elements. 23066 while (telem.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)) { 23067 telem = telem.parentNode; 23068 } 23069 23070 var elementOffset = _util.get.offset(telem); 23071 23072 if (!controllerInfo.isDocument) { // container is not the document root, so substract scroll Position to get correct trigger element position relative to scrollcontent 23073 containerOffset[param] -= _controller.scrollPos(); 23074 } 23075 23076 elementPos = elementOffset[param] - containerOffset[param]; 23077 23078 } else { // there was an element, but it was removed from DOM 23079 log(2, "WARNING: triggerElement was removed from DOM and will be reset to", undefined); 23080 Scene.triggerElement(undefined); // unset, so a change event is triggered 23081 } 23082 } 23083 23084 var changed = elementPos != _triggerPos; 23085 _triggerPos = elementPos; 23086 if (changed && !suppressEvents) { 23087 Scene.trigger("shift", { 23088 reason: "triggerElementPosition" 23089 }); 23090 } 23091 } 23092 }; 23093 23094 /** 23095 * Trigger a shift event, when the container is resized and the triggerHook is > 1. 23096 * @private 23097 */ 23098 var onContainerResize = function (e) { 23099 if (_options.triggerHook > 0) { 23100 Scene.trigger("shift", { 23101 reason: "containerResize" 23102 }); 23103 } 23104 }; 23105 23106 23107 var _validate = _util.extend(SCENE_OPTIONS.validate, { 23108 // validation for duration handled internally for reference to private var _durationMethod 23109 duration: function (val) { 23110 if (_util.type.String(val) && val.match(/^(\.|\d)*\d+%$/)) { 23111 // percentage value 23112 var perc = parseFloat(val) / 100; 23113 val = function () { 23114 return _controller ? _controller.info("size") * perc : 0; 23115 }; 23116 } 23117 if (_util.type.Function(val)) { 23118 // function 23119 _durationUpdateMethod = val; 23120 try { 23121 val = parseFloat(_durationUpdateMethod.call(Scene)); 23122 } catch (e) { 23123 val = -1; // will cause error below 23124 } 23125 } 23126 // val has to be float 23127 val = parseFloat(val); 23128 if (!_util.type.Number(val) || val < 0) { 23129 if (_durationUpdateMethod) { 23130 _durationUpdateMethod = undefined; 23131 throw ["Invalid return value of supplied function for option \"duration\":", val]; 23132 } else { 23133 throw ["Invalid value for option \"duration\":", val]; 23134 } 23135 } 23136 return val; 23137 } 23138 }); 23139 23140 /** 23141 * Checks the validity of a specific or all options and reset to default if neccessary. 23142 * @private 23143 */ 23144 var validateOption = function (check) { 23145 check = arguments.length ? [check] : Object.keys(_validate); 23146 check.forEach(function (optionName, key) { 23147 var value; 23148 if (_validate[optionName]) { // there is a validation method for this option 23149 try { // validate value 23150 value = _validate[optionName](_options[optionName]); 23151 } catch (e) { // validation failed -> reset to default 23152 value = DEFAULT_OPTIONS[optionName]; 23153 var logMSG = _util.type.String(e) ? [e] : e; 23154 if (_util.type.Array(logMSG)) { 23155 logMSG[0] = "ERROR: " + logMSG[0]; 23156 logMSG.unshift(1); // loglevel 1 for error msg 23157 log.apply(this, logMSG); 23158 } else { 23159 log(1, "ERROR: Problem executing validation callback for option '" + optionName + "':", e.message); 23160 } 23161 } finally { 23162 _options[optionName] = value; 23163 } 23164 } 23165 }); 23166 }; 23167 23168 /** 23169 * Helper used by the setter/getters for scene options 23170 * @private 23171 */ 23172 var changeOption = function (varname, newval) { 23173 var 23174 changed = false, 23175 oldval = _options[varname]; 23176 if (_options[varname] != newval) { 23177 _options[varname] = newval; 23178 validateOption(varname); // resets to default if necessary 23179 changed = oldval != _options[varname]; 23180 } 23181 return changed; 23182 }; 23183 23184 // generate getters/setters for all options 23185 var addSceneOption = function (optionName) { 23186 if (!Scene[optionName]) { 23187 Scene[optionName] = function (newVal) { 23188 if (!arguments.length) { // get 23189 return _options[optionName]; 23190 } else { 23191 if (optionName === "duration") { // new duration is set, so any previously set function must be unset 23192 _durationUpdateMethod = undefined; 23193 } 23194 if (changeOption(optionName, newVal)) { // set 23195 Scene.trigger("change", { 23196 what: optionName, 23197 newval: _options[optionName] 23198 }); 23199 if (SCENE_OPTIONS.shifts.indexOf(optionName) > -1) { 23200 Scene.trigger("shift", { 23201 reason: optionName 23202 }); 23203 } 23204 } 23205 } 23206 return Scene; 23207 }; 23208 } 23209 }; 23210 23211 /** 23212 * **Get** or **Set** the duration option value. 23213 * 23214 * As a **setter** it accepts three types of parameters: 23215 * 1. `number`: Sets the duration of the scene to exactly this amount of pixels. 23216 * This means the scene will last for exactly this amount of pixels scrolled. Sub-Pixels are also valid. 23217 * A value of `0` means that the scene is 'open end' and no end will be triggered. Pins will never unpin and animations will play independently of scroll progress. 23218 * 2. `string`: Always updates the duration relative to parent scroll container. 23219 * For example `"100%"` will keep the duration always exactly at the inner height of the scroll container. 23220 * When scrolling vertically the width is used for reference respectively. 23221 * 3. `function`: The supplied function will be called to return the scene duration. 23222 * This is useful in setups where the duration depends on other elements who might change size. By supplying a function you can return a value instead of updating potentially multiple scene durations. 23223 * The scene can be referenced inside the callback using `this`. 23224 * _**WARNING:** This is an easy way to kill performance, as the callback will be executed every time `Scene.refresh()` is called, which happens a lot. The interval is defined by the controller (see ScrollMagic.Controller option `refreshInterval`). 23225 * It's recomended to avoid calculations within the function and use cached variables as return values. 23226 * This counts double if you use the same function for multiple scenes._ 23227 * 23228 * @method ScrollMagic.Scene#duration 23229 * @example 23230 * // get the current duration value 23231 * var duration = scene.duration(); 23232 * 23233 * // set a new duration 23234 * scene.duration(300); 23235 * 23236 * // set duration responsively to container size 23237 * scene.duration("100%"); 23238 * 23239 * // use a function to randomize the duration for some reason. 23240 * var durationValueCache; 23241 * function durationCallback () { 23242 * return durationValueCache; 23243 * } 23244 * function updateDuration () { 23245 * durationValueCache = Math.random() * 100; 23246 * } 23247 * updateDuration(); // set to initial value 23248 * scene.duration(durationCallback); // set duration callback 23249 * 23250 * @fires {@link Scene.change}, when used as setter 23251 * @fires {@link Scene.shift}, when used as setter 23252 * @param {(number|string|function)} [newDuration] - The new duration setting for the scene. 23253 * @returns {number} `get` - Current scene duration. 23254 * @returns {Scene} `set` - Parent object for chaining. 23255 */ 23256 23257 /** 23258 * **Get** or **Set** the offset option value. 23259 * @method ScrollMagic.Scene#offset 23260 * @example 23261 * // get the current offset 23262 * var offset = scene.offset(); 23263 * 23264 * // set a new offset 23265 * scene.offset(100); 23266 * 23267 * @fires {@link Scene.change}, when used as setter 23268 * @fires {@link Scene.shift}, when used as setter 23269 * @param {number} [newOffset] - The new offset of the scene. 23270 * @returns {number} `get` - Current scene offset. 23271 * @returns {Scene} `set` - Parent object for chaining. 23272 */ 23273 23274 /** 23275 * **Get** or **Set** the triggerElement option value. 23276 * Does **not** fire `Scene.shift`, because changing the trigger Element doesn't necessarily mean the start position changes. This will be determined in `Scene.refresh()`, which is automatically triggered. 23277 * @method ScrollMagic.Scene#triggerElement 23278 * @example 23279 * // get the current triggerElement 23280 * var triggerElement = scene.triggerElement(); 23281 * 23282 * // set a new triggerElement using a selector 23283 * scene.triggerElement("#trigger"); 23284 * // set a new triggerElement using a DOM object 23285 * scene.triggerElement(document.getElementById("trigger")); 23286 * 23287 * @fires {@link Scene.change}, when used as setter 23288 * @param {(string|object)} [newTriggerElement] - The new trigger element for the scene. 23289 * @returns {(string|object)} `get` - Current triggerElement. 23290 * @returns {Scene} `set` - Parent object for chaining. 23291 */ 23292 23293 /** 23294 * **Get** or **Set** the triggerHook option value. 23295 * @method ScrollMagic.Scene#triggerHook 23296 * @example 23297 * // get the current triggerHook value 23298 * var triggerHook = scene.triggerHook(); 23299 * 23300 * // set a new triggerHook using a string 23301 * scene.triggerHook("onLeave"); 23302 * // set a new triggerHook using a number 23303 * scene.triggerHook(0.7); 23304 * 23305 * @fires {@link Scene.change}, when used as setter 23306 * @fires {@link Scene.shift}, when used as setter 23307 * @param {(number|string)} [newTriggerHook] - The new triggerHook of the scene. See {@link Scene} parameter description for value options. 23308 * @returns {number} `get` - Current triggerHook (ALWAYS numerical). 23309 * @returns {Scene} `set` - Parent object for chaining. 23310 */ 23311 23312 /** 23313 * **Get** or **Set** the reverse option value. 23314 * @method ScrollMagic.Scene#reverse 23315 * @example 23316 * // get the current reverse option 23317 * var reverse = scene.reverse(); 23318 * 23319 * // set new reverse option 23320 * scene.reverse(false); 23321 * 23322 * @fires {@link Scene.change}, when used as setter 23323 * @param {boolean} [newReverse] - The new reverse setting of the scene. 23324 * @returns {boolean} `get` - Current reverse option value. 23325 * @returns {Scene} `set` - Parent object for chaining. 23326 */ 23327 23328 /** 23329 * **Get** or **Set** the loglevel option value. 23330 * @method ScrollMagic.Scene#loglevel 23331 * @example 23332 * // get the current loglevel 23333 * var loglevel = scene.loglevel(); 23334 * 23335 * // set new loglevel 23336 * scene.loglevel(3); 23337 * 23338 * @fires {@link Scene.change}, when used as setter 23339 * @param {number} [newLoglevel] - The new loglevel setting of the scene. `[0-3]` 23340 * @returns {number} `get` - Current loglevel. 23341 * @returns {Scene} `set` - Parent object for chaining. 23342 */ 23343 23344 /** 23345 * **Get** the associated controller. 23346 * @method ScrollMagic.Scene#controller 23347 * @example 23348 * // get the controller of a scene 23349 * var controller = scene.controller(); 23350 * 23351 * @returns {ScrollMagic.Controller} Parent controller or `undefined` 23352 */ 23353 this.controller = function () { 23354 return _controller; 23355 }; 23356 23357 /** 23358 * **Get** the current state. 23359 * @method ScrollMagic.Scene#state 23360 * @example 23361 * // get the current state 23362 * var state = scene.state(); 23363 * 23364 * @returns {string} `"BEFORE"`, `"DURING"` or `"AFTER"` 23365 */ 23366 this.state = function () { 23367 return _state; 23368 }; 23369 23370 /** 23371 * **Get** the current scroll offset for the start of the scene. 23372 * Mind, that the scrollOffset is related to the size of the container, if `triggerHook` is bigger than `0` (or `"onLeave"`). 23373 * This means, that resizing the container or changing the `triggerHook` will influence the scene's start offset. 23374 * @method ScrollMagic.Scene#scrollOffset 23375 * @example 23376 * // get the current scroll offset for the start and end of the scene. 23377 * var start = scene.scrollOffset(); 23378 * var end = scene.scrollOffset() + scene.duration(); 23379 * console.log("the scene starts at", start, "and ends at", end); 23380 * 23381 * @returns {number} The scroll offset (of the container) at which the scene will trigger. Y value for vertical and X value for horizontal scrolls. 23382 */ 23383 this.scrollOffset = function () { 23384 return _scrollOffset.start; 23385 }; 23386 23387 /** 23388 * **Get** the trigger position of the scene (including the value of the `offset` option). 23389 * @method ScrollMagic.Scene#triggerPosition 23390 * @example 23391 * // get the scene's trigger position 23392 * var triggerPosition = scene.triggerPosition(); 23393 * 23394 * @returns {number} Start position of the scene. Top position value for vertical and left position value for horizontal scrolls. 23395 */ 23396 this.triggerPosition = function () { 23397 var pos = _options.offset; // the offset is the basis 23398 if (_controller) { 23399 // get the trigger position 23400 if (_options.triggerElement) { 23401 // Element as trigger 23402 pos += _triggerPos; 23403 } else { 23404 // return the height of the triggerHook to start at the beginning 23405 pos += _controller.info("size") * Scene.triggerHook(); 23406 } 23407 } 23408 return pos; 23409 }; 23410 23411 23412 var 23413 _pin, 23414 _pinOptions; 23415 23416 Scene 23417 .on("shift.internal", function (e) { 23418 var durationChanged = e.reason === "duration"; 23419 if ((_state === SCENE_STATE_AFTER && durationChanged) || (_state === SCENE_STATE_DURING && _options.duration === 0)) { 23420 // if [duration changed after a scene (inside scene progress updates pin position)] or [duration is 0, we are in pin phase and some other value changed]. 23421 updatePinState(); 23422 } 23423 if (durationChanged) { 23424 updatePinDimensions(); 23425 } 23426 }) 23427 .on("progress.internal", function (e) { 23428 updatePinState(); 23429 }) 23430 .on("add.internal", function (e) { 23431 updatePinDimensions(); 23432 }) 23433 .on("destroy.internal", function (e) { 23434 Scene.removePin(e.reset); 23435 }); 23436 /** 23437 * Update the pin state. 23438 * @private 23439 */ 23440 var updatePinState = function (forceUnpin) { 23441 if (_pin && _controller) { 23442 var 23443 containerInfo = _controller.info(), 23444 pinTarget = _pinOptions.spacer.firstChild; // may be pin element or another spacer, if cascading pins 23445 23446 if (!forceUnpin && _state === SCENE_STATE_DURING) { // during scene or if duration is 0 and we are past the trigger 23447 // pinned state 23448 if (_util.css(pinTarget, "position") != "fixed") { 23449 // change state before updating pin spacer (position changes due to fixed collapsing might occur.) 23450 _util.css(pinTarget, { 23451 "position": "fixed" 23452 }); 23453 // update pin spacer 23454 updatePinDimensions(); 23455 } 23456 23457 var 23458 fixedPos = _util.get.offset(_pinOptions.spacer, true), // get viewport position of spacer 23459 scrollDistance = _options.reverse || _options.duration === 0 ? 23460 containerInfo.scrollPos - _scrollOffset.start // quicker 23461 : 23462 Math.round(_progress * _options.duration * 10) / 10; // if no reverse and during pin the position needs to be recalculated using the progress 23463 23464 // add scrollDistance 23465 fixedPos[containerInfo.vertical ? "top" : "left"] += scrollDistance; 23466 23467 // set new values 23468 _util.css(_pinOptions.spacer.firstChild, { 23469 top: fixedPos.top, 23470 left: fixedPos.left 23471 }); 23472 } else { 23473 // unpinned state 23474 var 23475 newCSS = { 23476 position: _pinOptions.inFlow ? "relative" : "absolute", 23477 top: 0, 23478 left: 0 23479 }, 23480 change = _util.css(pinTarget, "position") != newCSS.position; 23481 23482 if (!_pinOptions.pushFollowers) { 23483 newCSS[containerInfo.vertical ? "top" : "left"] = _options.duration * _progress; 23484 } else if (_options.duration > 0) { // only concerns scenes with duration 23485 if (_state === SCENE_STATE_AFTER && parseFloat(_util.css(_pinOptions.spacer, "padding-top")) === 0) { 23486 change = true; // if in after state but havent updated spacer yet (jumped past pin) 23487 } else if (_state === SCENE_STATE_BEFORE && parseFloat(_util.css(_pinOptions.spacer, "padding-bottom")) === 0) { // before 23488 change = true; // jumped past fixed state upward direction 23489 } 23490 } 23491 // set new values 23492 _util.css(pinTarget, newCSS); 23493 if (change) { 23494 // update pin spacer if state changed 23495 updatePinDimensions(); 23496 } 23497 } 23498 } 23499 }; 23500 23501 /** 23502 * Update the pin spacer and/or element size. 23503 * The size of the spacer needs to be updated whenever the duration of the scene changes, if it is to push down following elements. 23504 * @private 23505 */ 23506 var updatePinDimensions = function () { 23507 if (_pin && _controller && _pinOptions.inFlow) { // no spacerresize, if original position is absolute 23508 var 23509 after = (_state === SCENE_STATE_AFTER), 23510 before = (_state === SCENE_STATE_BEFORE), 23511 during = (_state === SCENE_STATE_DURING), 23512 vertical = _controller.info("vertical"), 23513 pinTarget = _pinOptions.spacer.firstChild, // usually the pined element but can also be another spacer (cascaded pins) 23514 marginCollapse = _util.isMarginCollapseType(_util.css(_pinOptions.spacer, "display")), 23515 css = {}; 23516 23517 // set new size 23518 // if relsize: spacer -> pin | else: pin -> spacer 23519 if (_pinOptions.relSize.width || _pinOptions.relSize.autoFullWidth) { 23520 if (during) { 23521 _util.css(_pin, { 23522 "width": _util.get.width(_pinOptions.spacer) 23523 }); 23524 } else { 23525 _util.css(_pin, { 23526 "width": "100%" 23527 }); 23528 } 23529 } else { 23530 // minwidth is needed for cascaded pins. 23531 css["min-width"] = _util.get.width(vertical ? _pin : pinTarget, true, true); 23532 css.width = during ? css["min-width"] : "auto"; 23533 } 23534 if (_pinOptions.relSize.height) { 23535 if (during) { 23536 // the only padding the spacer should ever include is the duration (if pushFollowers = true), so we need to substract that. 23537 _util.css(_pin, { 23538 "height": _util.get.height(_pinOptions.spacer) - (_pinOptions.pushFollowers ? _options.duration : 0) 23539 }); 23540 } else { 23541 _util.css(_pin, { 23542 "height": "100%" 23543 }); 23544 } 23545 } else { 23546 // margin is only included if it's a cascaded pin to resolve an IE9 bug 23547 css["min-height"] = _util.get.height(vertical ? pinTarget : _pin, true, !marginCollapse); // needed for cascading pins 23548 css.height = during ? css["min-height"] : "auto"; 23549 } 23550 23551 // add space for duration if pushFollowers is true 23552 if (_pinOptions.pushFollowers) { 23553 css["padding" + (vertical ? "Top" : "Left")] = _options.duration * _progress; 23554 css["padding" + (vertical ? "Bottom" : "Right")] = _options.duration * (1 - _progress); 23555 } 23556 _util.css(_pinOptions.spacer, css); 23557 } 23558 }; 23559 23560 /** 23561 * Updates the Pin state (in certain scenarios) 23562 * If the controller container is not the document and we are mid-pin-phase scrolling or resizing the main document can result to wrong pin positions. 23563 * So this function is called on resize and scroll of the document. 23564 * @private 23565 */ 23566 var updatePinInContainer = function () { 23567 if (_controller && _pin && _state === SCENE_STATE_DURING && !_controller.info("isDocument")) { 23568 updatePinState(); 23569 } 23570 }; 23571 23572 /** 23573 * Updates the Pin spacer size state (in certain scenarios) 23574 * If container is resized during pin and relatively sized the size of the pin might need to be updated... 23575 * So this function is called on resize of the container. 23576 * @private 23577 */ 23578 var updateRelativePinSpacer = function () { 23579 if (_controller && _pin && // well, duh 23580 _state === SCENE_STATE_DURING && // element in pinned state? 23581 ( // is width or height relatively sized, but not in relation to body? then we need to recalc. 23582 ((_pinOptions.relSize.width || _pinOptions.relSize.autoFullWidth) && _util.get.width(window) != _util.get.width(_pinOptions.spacer.parentNode)) || 23583 (_pinOptions.relSize.height && _util.get.height(window) != _util.get.height(_pinOptions.spacer.parentNode)) 23584 ) 23585 ) { 23586 updatePinDimensions(); 23587 } 23588 }; 23589 23590 /** 23591 * Is called, when the mousewhel is used while over a pinned element inside a div container. 23592 * If the scene is in fixed state scroll events would be counted towards the body. This forwards the event to the scroll container. 23593 * @private 23594 */ 23595 var onMousewheelOverPin = function (e) { 23596 if (_controller && _pin && _state === SCENE_STATE_DURING && !_controller.info("isDocument")) { // in pin state 23597 e.preventDefault(); 23598 _controller._setScrollPos(_controller.info("scrollPos") - ((e.wheelDelta || e[_controller.info("vertical") ? "wheelDeltaY" : "wheelDeltaX"]) / 3 || -e.detail * 30)); 23599 } 23600 }; 23601 23602 /** 23603 * Pin an element for the duration of the scene. 23604 * If the scene duration is 0 the element will only be unpinned, if the user scrolls back past the start position. 23605 * Make sure only one pin is applied to an element at the same time. 23606 * An element can be pinned multiple times, but only successively. 23607 * _**NOTE:** The option `pushFollowers` has no effect, when the scene duration is 0._ 23608 * @method ScrollMagic.Scene#setPin 23609 * @example 23610 * // pin element and push all following elements down by the amount of the pin duration. 23611 * scene.setPin("#pin"); 23612 * 23613 * // pin element and keeping all following elements in their place. The pinned element will move past them. 23614 * scene.setPin("#pin", {pushFollowers: false}); 23615 * 23616 * @param {(string|object)} element - A Selector targeting an element or a DOM object that is supposed to be pinned. 23617 * @param {object} [settings] - settings for the pin 23618 * @param {boolean} [settings.pushFollowers=true] - If `true` following elements will be "pushed" down for the duration of the pin, if `false` the pinned element will just scroll past them. 23619 Ignored, when duration is `0`. 23620 * @param {string} [settings.spacerClass="scrollmagic-pin-spacer"] - Classname of the pin spacer element, which is used to replace the element. 23621 * 23622 * @returns {Scene} Parent object for chaining. 23623 */ 23624 this.setPin = function (element, settings) { 23625 var 23626 defaultSettings = { 23627 pushFollowers: true, 23628 spacerClass: "scrollmagic-pin-spacer" 23629 }; 23630 var pushFollowersActivelySet = settings && settings.hasOwnProperty('pushFollowers'); 23631 settings = _util.extend({}, defaultSettings, settings); 23632 23633 // validate Element 23634 element = _util.get.elements(element)[0]; 23635 if (!element) { 23636 log(1, "ERROR calling method 'setPin()': Invalid pin element supplied."); 23637 return Scene; // cancel 23638 } else if (_util.css(element, "position") === "fixed") { 23639 log(1, "ERROR calling method 'setPin()': Pin does not work with elements that are positioned 'fixed'."); 23640 return Scene; // cancel 23641 } 23642 23643 if (_pin) { // preexisting pin? 23644 if (_pin === element) { 23645 // same pin we already have -> do nothing 23646 return Scene; // cancel 23647 } else { 23648 // kill old pin 23649 Scene.removePin(); 23650 } 23651 23652 } 23653 _pin = element; 23654 23655 var 23656 parentDisplay = _pin.parentNode.style.display, 23657 boundsParams = ["top", "left", "bottom", "right", "margin", "marginLeft", "marginRight", "marginTop", "marginBottom"]; 23658 23659 _pin.parentNode.style.display = 'none'; // hack start to force css to return stylesheet values instead of calculated px values. 23660 var 23661 inFlow = _util.css(_pin, "position") != "absolute", 23662 pinCSS = _util.css(_pin, boundsParams.concat(["display"])), 23663 sizeCSS = _util.css(_pin, ["width", "height"]); 23664 _pin.parentNode.style.display = parentDisplay; // hack end. 23665 23666 if (!inFlow && settings.pushFollowers) { 23667 log(2, "WARNING: If the pinned element is positioned absolutely pushFollowers will be disabled."); 23668 settings.pushFollowers = false; 23669 } 23670 window.setTimeout(function () { // wait until all finished, because with responsive duration it will only be set after scene is added to controller 23671 if (_pin && _options.duration === 0 && pushFollowersActivelySet && settings.pushFollowers) { 23672 log(2, "WARNING: pushFollowers =", true, "has no effect, when scene duration is 0."); 23673 } 23674 }, 0); 23675 23676 // create spacer and insert 23677 var 23678 spacer = _pin.parentNode.insertBefore(document.createElement('div'), _pin), 23679 spacerCSS = _util.extend(pinCSS, { 23680 position: inFlow ? "relative" : "absolute", 23681 boxSizing: "content-box", 23682 mozBoxSizing: "content-box", 23683 webkitBoxSizing: "content-box" 23684 }); 23685 23686 if (!inFlow) { // copy size if positioned absolutely, to work for bottom/right positioned elements. 23687 _util.extend(spacerCSS, _util.css(_pin, ["width", "height"])); 23688 } 23689 23690 _util.css(spacer, spacerCSS); 23691 spacer.setAttribute(PIN_SPACER_ATTRIBUTE, ""); 23692 _util.addClass(spacer, settings.spacerClass); 23693 23694 // set the pin Options 23695 _pinOptions = { 23696 spacer: spacer, 23697 relSize: { // save if size is defined using % values. if so, handle spacer resize differently... 23698 width: sizeCSS.width.slice(-1) === "%", 23699 height: sizeCSS.height.slice(-1) === "%", 23700 autoFullWidth: sizeCSS.width === "auto" && inFlow && _util.isMarginCollapseType(pinCSS.display) 23701 }, 23702 pushFollowers: settings.pushFollowers, 23703 inFlow: inFlow, // stores if the element takes up space in the document flow 23704 }; 23705 23706 if (!_pin.___origStyle) { 23707 _pin.___origStyle = {}; 23708 var 23709 pinInlineCSS = _pin.style, 23710 copyStyles = boundsParams.concat(["width", "height", "position", "boxSizing", "mozBoxSizing", "webkitBoxSizing"]); 23711 copyStyles.forEach(function (val) { 23712 _pin.___origStyle[val] = pinInlineCSS[val] || ""; 23713 }); 23714 } 23715 23716 // if relative size, transfer it to spacer and make pin calculate it... 23717 if (_pinOptions.relSize.width) { 23718 _util.css(spacer, { 23719 width: sizeCSS.width 23720 }); 23721 } 23722 if (_pinOptions.relSize.height) { 23723 _util.css(spacer, { 23724 height: sizeCSS.height 23725 }); 23726 } 23727 23728 // now place the pin element inside the spacer 23729 spacer.appendChild(_pin); 23730 // and set new css 23731 _util.css(_pin, { 23732 position: inFlow ? "relative" : "absolute", 23733 margin: "auto", 23734 top: "auto", 23735 left: "auto", 23736 bottom: "auto", 23737 right: "auto" 23738 }); 23739 23740 if (_pinOptions.relSize.width || _pinOptions.relSize.autoFullWidth) { 23741 _util.css(_pin, { 23742 boxSizing: "border-box", 23743 mozBoxSizing: "border-box", 23744 webkitBoxSizing: "border-box" 23745 }); 23746 } 23747 23748 // add listener to document to update pin position in case controller is not the document. 23749 window.addEventListener('scroll', updatePinInContainer); 23750 window.addEventListener('resize', updatePinInContainer); 23751 window.addEventListener('resize', updateRelativePinSpacer); 23752 // add mousewheel listener to catch scrolls over fixed elements 23753 _pin.addEventListener("mousewheel", onMousewheelOverPin); 23754 _pin.addEventListener("DOMMouseScroll", onMousewheelOverPin); 23755 23756 log(3, "added pin"); 23757 23758 // finally update the pin to init 23759 updatePinState(); 23760 23761 return Scene; 23762 }; 23763 23764 /** 23765 * Remove the pin from the scene. 23766 * @method ScrollMagic.Scene#removePin 23767 * @example 23768 * // remove the pin from the scene without resetting it (the spacer is not removed) 23769 * scene.removePin(); 23770 * 23771 * // remove the pin from the scene and reset the pin element to its initial position (spacer is removed) 23772 * scene.removePin(true); 23773 * 23774 * @param {boolean} [reset=false] - If `false` the spacer will not be removed and the element's position will not be reset. 23775 * @returns {Scene} Parent object for chaining. 23776 */ 23777 this.removePin = function (reset) { 23778 if (_pin) { 23779 if (_state === SCENE_STATE_DURING) { 23780 updatePinState(true); // force unpin at position 23781 } 23782 if (reset || !_controller) { // if there's no controller no progress was made anyway... 23783 var pinTarget = _pinOptions.spacer.firstChild; // usually the pin element, but may be another spacer (cascaded pins)... 23784 if (pinTarget.hasAttribute(PIN_SPACER_ATTRIBUTE)) { // copy margins to child spacer 23785 var 23786 style = _pinOptions.spacer.style, 23787 values = ["margin", "marginLeft", "marginRight", "marginTop", "marginBottom"], 23788 margins = {}; 23789 values.forEach(function (val) { 23790 margins[val] = style[val] || ""; 23791 }); 23792 _util.css(pinTarget, margins); 23793 } 23794 _pinOptions.spacer.parentNode.insertBefore(pinTarget, _pinOptions.spacer); 23795 _pinOptions.spacer.parentNode.removeChild(_pinOptions.spacer); 23796 if (!_pin.parentNode.hasAttribute(PIN_SPACER_ATTRIBUTE)) { // if it's the last pin for this element -> restore inline styles 23797 // TODO: only correctly set for first pin (when cascading) - how to fix? 23798 _util.css(_pin, _pin.___origStyle); 23799 delete _pin.___origStyle; 23800 } 23801 } 23802 window.removeEventListener('scroll', updatePinInContainer); 23803 window.removeEventListener('resize', updatePinInContainer); 23804 window.removeEventListener('resize', updateRelativePinSpacer); 23805 _pin.removeEventListener("mousewheel", onMousewheelOverPin); 23806 _pin.removeEventListener("DOMMouseScroll", onMousewheelOverPin); 23807 _pin = undefined; 23808 log(3, "removed pin (reset: " + (reset ? "true" : "false") + ")"); 23809 } 23810 return Scene; 23811 }; 23812 23813 23814 var 23815 _cssClasses, 23816 _cssClassElems = []; 23817 23818 Scene 23819 .on("destroy.internal", function (e) { 23820 Scene.removeClassToggle(e.reset); 23821 }); 23822 /** 23823 * Define a css class modification while the scene is active. 23824 * When the scene triggers the classes will be added to the supplied element and removed, when the scene is over. 23825 * If the scene duration is 0 the classes will only be removed if the user scrolls back past the start position. 23826 * @method ScrollMagic.Scene#setClassToggle 23827 * @example 23828 * // add the class 'myclass' to the element with the id 'my-elem' for the duration of the scene 23829 * scene.setClassToggle("#my-elem", "myclass"); 23830 * 23831 * // add multiple classes to multiple elements defined by the selector '.classChange' 23832 * scene.setClassToggle(".classChange", "class1 class2 class3"); 23833 * 23834 * @param {(string|object)} element - A Selector targeting one or more elements or a DOM object that is supposed to be modified. 23835 * @param {string} classes - One or more Classnames (separated by space) that should be added to the element during the scene. 23836 * 23837 * @returns {Scene} Parent object for chaining. 23838 */ 23839 this.setClassToggle = function (element, classes) { 23840 var elems = _util.get.elements(element); 23841 if (elems.length === 0 || !_util.type.String(classes)) { 23842 log(1, "ERROR calling method 'setClassToggle()': Invalid " + (elems.length === 0 ? "element" : "classes") + " supplied."); 23843 return Scene; 23844 } 23845 if (_cssClassElems.length > 0) { 23846 // remove old ones 23847 Scene.removeClassToggle(); 23848 } 23849 _cssClasses = classes; 23850 _cssClassElems = elems; 23851 Scene.on("enter.internal_class leave.internal_class", function (e) { 23852 var toggle = e.type === "enter" ? _util.addClass : _util.removeClass; 23853 _cssClassElems.forEach(function (elem, key) { 23854 toggle(elem, _cssClasses); 23855 }); 23856 }); 23857 return Scene; 23858 }; 23859 23860 /** 23861 * Remove the class binding from the scene. 23862 * @method ScrollMagic.Scene#removeClassToggle 23863 * @example 23864 * // remove class binding from the scene without reset 23865 * scene.removeClassToggle(); 23866 * 23867 * // remove class binding and remove the changes it caused 23868 * scene.removeClassToggle(true); 23869 * 23870 * @param {boolean} [reset=false] - If `false` and the classes are currently active, they will remain on the element. If `true` they will be removed. 23871 * @returns {Scene} Parent object for chaining. 23872 */ 23873 this.removeClassToggle = function (reset) { 23874 if (reset) { 23875 _cssClassElems.forEach(function (elem, key) { 23876 _util.removeClass(elem, _cssClasses); 23877 }); 23878 } 23879 Scene.off("start.internal_class end.internal_class"); 23880 _cssClasses = undefined; 23881 _cssClassElems = []; 23882 return Scene; 23883 }; 23884 23885 // INIT 23886 construct(); 23887 return Scene; 23888 }; 23889 23890 // store pagewide scene options 23891 var SCENE_OPTIONS = { 23892 defaults: { 23893 duration: 0, 23894 offset: 0, 23895 triggerElement: undefined, 23896 triggerHook: 0.5, 23897 reverse: true, 23898 loglevel: 2 23899 }, 23900 validate: { 23901 offset: function (val) { 23902 val = parseFloat(val); 23903 if (!_util.type.Number(val)) { 23904 throw ["Invalid value for option \"offset\":", val]; 23905 } 23906 return val; 23907 }, 23908 triggerElement: function (val) { 23909 val = val || undefined; 23910 if (val) { 23911 var elem = _util.get.elements(val)[0]; 23912 if (elem && elem.parentNode) { 23913 val = elem; 23914 } else { 23915 throw ["Element defined in option \"triggerElement\" was not found:", val]; 23916 } 23917 } 23918 return val; 23919 }, 23920 triggerHook: function (val) { 23921 var translate = { 23922 "onCenter": 0.5, 23923 "onEnter": 1, 23924 "onLeave": 0 23925 }; 23926 if (_util.type.Number(val)) { 23927 val = Math.max(0, Math.min(parseFloat(val), 1)); // make sure its betweeen 0 and 1 23928 } else if (val in translate) { 23929 val = translate[val]; 23930 } else { 23931 throw ["Invalid value for option \"triggerHook\": ", val]; 23932 } 23933 return val; 23934 }, 23935 reverse: function (val) { 23936 return !!val; // force boolean 23937 }, 23938 loglevel: function (val) { 23939 val = parseInt(val); 23940 if (!_util.type.Number(val) || val < 0 || val > 3) { 23941 throw ["Invalid value for option \"loglevel\":", val]; 23942 } 23943 return val; 23944 } 23945 }, // holder for validation methods. duration validation is handled in 'getters-setters.js' 23946 shifts: ["duration", "offset", "triggerHook"], // list of options that trigger a `shift` event 23947 }; 23948 /* 23949 * method used to add an option to ScrollMagic Scenes. 23950 * TODO: DOC (private for dev) 23951 */ 23952 ScrollMagic.Scene.addOption = function (name, defaultValue, validationCallback, shifts) { 23953 if (!(name in SCENE_OPTIONS.defaults)) { 23954 SCENE_OPTIONS.defaults[name] = defaultValue; 23955 SCENE_OPTIONS.validate[name] = validationCallback; 23956 if (shifts) { 23957 SCENE_OPTIONS.shifts.push(name); 23958 } 23959 } else { 23960 ScrollMagic._util.log(1, "[static] ScrollMagic.Scene -> Cannot add Scene option '" + name + "', because it already exists."); 23961 } 23962 }; 23963 // instance extension function for plugins 23964 // TODO: DOC (private for dev) 23965 ScrollMagic.Scene.extend = function (extension) { 23966 var oldClass = this; 23967 ScrollMagic.Scene = function () { 23968 oldClass.apply(this, arguments); 23969 this.$super = _util.extend({}, this); // copy parent state 23970 return extension.apply(this, arguments) || this; 23971 }; 23972 _util.extend(ScrollMagic.Scene, oldClass); // copy properties 23973 ScrollMagic.Scene.prototype = oldClass.prototype; // copy prototype 23974 ScrollMagic.Scene.prototype.constructor = ScrollMagic.Scene; // restore constructor 23975 }; 23976 23977 23978 23979 /** 23980 * TODO: DOCS (private for dev) 23981 * @class 23982 * @private 23983 */ 23984 23985 ScrollMagic.Event = function (type, namespace, target, vars) { 23986 vars = vars || {}; 23987 for (var key in vars) { 23988 this[key] = vars[key]; 23989 } 23990 this.type = type; 23991 this.target = this.currentTarget = target; 23992 this.namespace = namespace || ''; 23993 this.timeStamp = this.timestamp = Date.now(); 23994 return this; 23995 }; 23996 23997 /* 23998 * TODO: DOCS (private for dev) 23999 */ 24000 24001 var _util = ScrollMagic._util = (function (window) { 24002 var U = {}, 24003 i; 24004 24005 /** 24006 * ------------------------------ 24007 * internal helpers 24008 * ------------------------------ 24009 */ 24010 24011 // parse float and fall back to 0. 24012 var floatval = function (number) { 24013 return parseFloat(number) || 0; 24014 }; 24015 // get current style IE safe (otherwise IE would return calculated values for 'auto') 24016 var _getComputedStyle = function (elem) { 24017 return elem.currentStyle ? elem.currentStyle : window.getComputedStyle(elem); 24018 }; 24019 24020 // get element dimension (width or height) 24021 var _dimension = function (which, elem, outer, includeMargin) { 24022 elem = (elem === document) ? window : elem; 24023 if (elem === window) { 24024 includeMargin = false; 24025 } else if (!_type.DomElement(elem)) { 24026 return 0; 24027 } 24028 which = which.charAt(0).toUpperCase() + which.substr(1).toLowerCase(); 24029 var dimension = (outer ? elem['offset' + which] || elem['outer' + which] : elem['client' + which] || elem['inner' + which]) || 0; 24030 if (outer && includeMargin) { 24031 var style = _getComputedStyle(elem); 24032 dimension += which === 'Height' ? floatval(style.marginTop) + floatval(style.marginBottom) : floatval(style.marginLeft) + floatval(style.marginRight); 24033 } 24034 return dimension; 24035 }; 24036 // converts 'margin-top' into 'marginTop' 24037 var _camelCase = function (str) { 24038 return str.replace(/^[^a-z]+([a-z])/g, '$1').replace(/-([a-z])/g, function (g) { 24039 return g[1].toUpperCase(); 24040 }); 24041 }; 24042 24043 /** 24044 * ------------------------------ 24045 * external helpers 24046 * ------------------------------ 24047 */ 24048 24049 // extend obj – same as jQuery.extend({}, objA, objB) 24050 U.extend = function (obj) { 24051 obj = obj || {}; 24052 for (i = 1; i < arguments.length; i++) { 24053 if (!arguments[i]) { 24054 continue; 24055 } 24056 for (var key in arguments[i]) { 24057 if (arguments[i].hasOwnProperty(key)) { 24058 obj[key] = arguments[i][key]; 24059 } 24060 } 24061 } 24062 return obj; 24063 }; 24064 24065 // check if a css display type results in margin-collapse or not 24066 U.isMarginCollapseType = function (str) { 24067 return ["block", "flex", "list-item", "table", "-webkit-box"].indexOf(str) > -1; 24068 }; 24069 24070 // implementation of requestAnimationFrame 24071 // based on https://gist.github.com/paulirish/1579671 24072 var 24073 lastTime = 0, 24074 vendors = ['ms', 'moz', 'webkit', 'o']; 24075 var _requestAnimationFrame = window.requestAnimationFrame; 24076 var _cancelAnimationFrame = window.cancelAnimationFrame; 24077 // try vendor prefixes if the above doesn't work 24078 for (i = 0; !_requestAnimationFrame && i < vendors.length; ++i) { 24079 _requestAnimationFrame = window[vendors[i] + 'RequestAnimationFrame']; 24080 _cancelAnimationFrame = window[vendors[i] + 'CancelAnimationFrame'] || window[vendors[i] + 'CancelRequestAnimationFrame']; 24081 } 24082 24083 // fallbacks 24084 if (!_requestAnimationFrame) { 24085 _requestAnimationFrame = function (callback) { 24086 var 24087 currTime = new Date().getTime(), 24088 timeToCall = Math.max(0, 16 - (currTime - lastTime)), 24089 id = window.setTimeout(function () { 24090 callback(currTime + timeToCall); 24091 }, timeToCall); 24092 lastTime = currTime + timeToCall; 24093 return id; 24094 }; 24095 } 24096 if (!_cancelAnimationFrame) { 24097 _cancelAnimationFrame = function (id) { 24098 window.clearTimeout(id); 24099 }; 24100 } 24101 U.rAF = _requestAnimationFrame.bind(window); 24102 U.cAF = _cancelAnimationFrame.bind(window); 24103 24104 var 24105 loglevels = ["error", "warn", "log"], 24106 console = window.console || {}; 24107 24108 console.log = console.log || function () {}; // no console log, well - do nothing then... 24109 // make sure methods for all levels exist. 24110 for (i = 0; i < loglevels.length; i++) { 24111 var method = loglevels[i]; 24112 if (!console[method]) { 24113 console[method] = console.log; // prefer .log over nothing 24114 } 24115 } 24116 U.log = function (loglevel) { 24117 if (loglevel > loglevels.length || loglevel <= 0) loglevel = loglevels.length; 24118 var now = new Date(), 24119 time = ("0" + now.getHours()).slice(-2) + ":" + ("0" + now.getMinutes()).slice(-2) + ":" + ("0" + now.getSeconds()).slice(-2) + ":" + ("00" + now.getMilliseconds()).slice(-3), 24120 method = loglevels[loglevel - 1], 24121 args = Array.prototype.splice.call(arguments, 1), 24122 func = Function.prototype.bind.call(console[method], console); 24123 args.unshift(time); 24124 func.apply(console, args); 24125 }; 24126 24127 /** 24128 * ------------------------------ 24129 * type testing 24130 * ------------------------------ 24131 */ 24132 24133 var _type = U.type = function (v) { 24134 return Object.prototype.toString.call(v).replace(/^\[object (.+)\]$/, "$1").toLowerCase(); 24135 }; 24136 _type.String = function (v) { 24137 return _type(v) === 'string'; 24138 }; 24139 _type.Function = function (v) { 24140 return _type(v) === 'function'; 24141 }; 24142 _type.Array = function (v) { 24143 return Array.isArray(v); 24144 }; 24145 _type.Number = function (v) { 24146 return !_type.Array(v) && (v - parseFloat(v) + 1) >= 0; 24147 }; 24148 _type.DomElement = function (o) { 24149 return ( 24150 typeof HTMLElement === "object" || typeof HTMLElement === "function" ? o instanceof HTMLElement || o instanceof SVGElement : //DOM2 24151 o && typeof o === "object" && o !== null && o.nodeType === 1 && typeof o.nodeName === "string" 24152 ); 24153 }; 24154 24155 /** 24156 * ------------------------------ 24157 * DOM Element info 24158 * ------------------------------ 24159 */ 24160 // always returns a list of matching DOM elements, from a selector, a DOM element or an list of elements or even an array of selectors 24161 var _get = U.get = {}; 24162 _get.elements = function (selector) { 24163 var arr = []; 24164 if (_type.String(selector)) { 24165 try { 24166 selector = document.querySelectorAll(selector); 24167 } catch (e) { // invalid selector 24168 return arr; 24169 } 24170 } 24171 if (_type(selector) === 'nodelist' || _type.Array(selector) || selector instanceof NodeList) { 24172 for (var i = 0, ref = arr.length = selector.length; i < ref; i++) { // list of elements 24173 var elem = selector[i]; 24174 arr[i] = _type.DomElement(elem) ? elem : _get.elements(elem); // if not an element, try to resolve recursively 24175 } 24176 } else if (_type.DomElement(selector) || selector === document || selector === window) { 24177 arr = [selector]; // only the element 24178 } 24179 return arr; 24180 }; 24181 // get scroll top value 24182 _get.scrollTop = function (elem) { 24183 return (elem && typeof elem.scrollTop === 'number') ? elem.scrollTop : window.pageYOffset || 0; 24184 }; 24185 // get scroll left value 24186 _get.scrollLeft = function (elem) { 24187 return (elem && typeof elem.scrollLeft === 'number') ? elem.scrollLeft : window.pageXOffset || 0; 24188 }; 24189 // get element height 24190 _get.width = function (elem, outer, includeMargin) { 24191 return _dimension('width', elem, outer, includeMargin); 24192 }; 24193 // get element width 24194 _get.height = function (elem, outer, includeMargin) { 24195 return _dimension('height', elem, outer, includeMargin); 24196 }; 24197 24198 // get element position (optionally relative to viewport) 24199 _get.offset = function (elem, relativeToViewport) { 24200 var offset = { 24201 top: 0, 24202 left: 0 24203 }; 24204 if (elem && elem.getBoundingClientRect) { // check if available 24205 var rect = elem.getBoundingClientRect(); 24206 offset.top = rect.top; 24207 offset.left = rect.left; 24208 if (!relativeToViewport) { // clientRect is by default relative to viewport... 24209 offset.top += _get.scrollTop(); 24210 offset.left += _get.scrollLeft(); 24211 } 24212 } 24213 return offset; 24214 }; 24215 24216 /** 24217 * ------------------------------ 24218 * DOM Element manipulation 24219 * ------------------------------ 24220 */ 24221 24222 U.addClass = function (elem, classname) { 24223 if (classname) { 24224 if (elem.classList) 24225 elem.classList.add(classname); 24226 else 24227 elem.className += ' ' + classname; 24228 } 24229 }; 24230 U.removeClass = function (elem, classname) { 24231 if (classname) { 24232 if (elem.classList) 24233 elem.classList.remove(classname); 24234 else 24235 elem.className = elem.className.replace(new RegExp('(^|\\b)' + classname.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); 24236 } 24237 }; 24238 // if options is string -> returns css value 24239 // if options is array -> returns object with css value pairs 24240 // if options is object -> set new css values 24241 U.css = function (elem, options) { 24242 if (_type.String(options)) { 24243 return _getComputedStyle(elem)[_camelCase(options)]; 24244 } else if (_type.Array(options)) { 24245 var 24246 obj = {}, 24247 style = _getComputedStyle(elem); 24248 options.forEach(function (option, key) { 24249 obj[option] = style[_camelCase(option)]; 24250 }); 24251 return obj; 24252 } else { 24253 for (var option in options) { 24254 var val = options[option]; 24255 if (val == parseFloat(val)) { // assume pixel for seemingly numerical values 24256 val += 'px'; 24257 } 24258 elem.style[_camelCase(option)] = val; 24259 } 24260 } 24261 }; 24262 24263 return U; 24264 }(window || {})); 24265 24266 24267 ScrollMagic.Scene.prototype.addIndicators = function () { 24268 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling addIndicators() due to missing Plugin \'debug.addIndicators\'. Please make sure to include plugins/debug.addIndicators.js'); 24269 return this; 24270 } 24271 ScrollMagic.Scene.prototype.removeIndicators = function () { 24272 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling removeIndicators() due to missing Plugin \'debug.addIndicators\'. Please make sure to include plugins/debug.addIndicators.js'); 24273 return this; 24274 } 24275 ScrollMagic.Scene.prototype.setTween = function () { 24276 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling setTween() due to missing Plugin \'animation.gsap\'. Please make sure to include plugins/animation.gsap.js'); 24277 return this; 24278 } 24279 ScrollMagic.Scene.prototype.removeTween = function () { 24280 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling removeTween() due to missing Plugin \'animation.gsap\'. Please make sure to include plugins/animation.gsap.js'); 24281 return this; 24282 } 24283 ScrollMagic.Scene.prototype.setVelocity = function () { 24284 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling setVelocity() due to missing Plugin \'animation.velocity\'. Please make sure to include plugins/animation.velocity.js'); 24285 return this; 24286 } 24287 ScrollMagic.Scene.prototype.removeVelocity = function () { 24288 ScrollMagic._util.log(1, '(ScrollMagic.Scene) -> ERROR calling removeVelocity() due to missing Plugin \'animation.velocity\'. Please make sure to include plugins/animation.velocity.js'); 24289 return this; 24290 } 24291 24292 return ScrollMagic; 24293})); 24294 24295/***/ }), 24296
vendor: 24,975 bytes, lines 24297-24983
24297/***/ "../../../../../node_modules/scrollmagic/scrollmagic/uncompressed/plugins/debug.addIndicators.js": 24298/*!***************************************************************************************************************************!*\ 24299 !*** /Users/mauro/Sites/eternalsunspire/node_modules/scrollmagic/scrollmagic/uncompressed/plugins/debug.addIndicators.js ***! 24300 \***************************************************************************************************************************/ 24301/*! no static exports found */ 24302/***/ (function(module, exports, __webpack_require__) { 24303 24304var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! 24305 * ScrollMagic v2.0.8 (2020-08-14) 24306 * The javascript library for magical scroll interactions. 24307 * (c) 2020 Jan Paepke (@janpaepke) 24308 * Project Website: http://scrollmagic.io 24309 * 24310 * @version 2.0.8 24311 * @license Dual licensed under MIT license and GPL. 24312 * @author Jan Paepke - [email protected] 24313 * 24314 * @file Debug Extension for ScrollMagic. 24315 */ 24316/** 24317 * This plugin was formerly known as the ScrollMagic debug extension. 24318 * 24319 * It enables you to add visual indicators to your page, to be able to see exactly when a scene is triggered. 24320 * 24321 * To have access to this extension, please include `plugins/debug.addIndicators.js`. 24322 * @mixin debug.addIndicators 24323 */ 24324(function (root, factory) { 24325 if (true) { 24326 // AMD. Register as an anonymous module. 24327 !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(/*! ScrollMagic */ "../../../../../node_modules/scrollmagic/scrollmagic/minified/ScrollMagic.min.js")], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), 24328 __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? 24329 (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), 24330 __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); 24331 } else {} 24332}(this, function (ScrollMagic) { 24333 "use strict"; 24334 var NAMESPACE = "debug.addIndicators"; 24335 24336 var 24337 console = window.console || {}, 24338 err = Function.prototype.bind.call(console.error || console.log || function () {}, console); 24339 if (!ScrollMagic) { 24340 err("(" + NAMESPACE + ") -> ERROR: The ScrollMagic main module could not be found. Please make sure it's loaded before this plugin or use an asynchronous loader like requirejs."); 24341 } 24342 24343 // plugin settings 24344 var 24345 FONT_SIZE = "0.85em", 24346 ZINDEX = "9999", 24347 EDGE_OFFSET = 15; // minimum edge distance, added to indentation 24348 24349 // overall vars 24350 var 24351 _util = ScrollMagic._util, 24352 _autoindex = 0; 24353 24354 24355 24356 ScrollMagic.Scene.extend(function () { 24357 var 24358 Scene = this, 24359 _indicator; 24360 24361 var log = function () { 24362 if (Scene._log) { // not available, when main source minified 24363 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->"); 24364 Scene._log.apply(this, arguments); 24365 } 24366 }; 24367 24368 /** 24369 * Add visual indicators for a ScrollMagic.Scene. 24370 * @memberof! debug.addIndicators# 24371 * 24372 * @example 24373 * // add basic indicators 24374 * scene.addIndicators() 24375 * 24376 * // passing options 24377 * scene.addIndicators({name: "pin scene", colorEnd: "#FFFFFF"}); 24378 * 24379 * @param {object} [options] - An object containing one or more options for the indicators. 24380 * @param {(string|object)} [options.parent] - A selector, DOM Object or a jQuery object that the indicators should be added to. 24381 If undefined, the controller's container will be used. 24382 * @param {number} [options.name=""] - This string will be displayed at the start and end indicators of the scene for identification purposes. If no name is supplied an automatic index will be used. 24383 * @param {number} [options.indent=0] - Additional position offset for the indicators (useful, when having multiple scenes starting at the same position). 24384 * @param {string} [options.colorStart=green] - CSS color definition for the start indicator. 24385 * @param {string} [options.colorEnd=red] - CSS color definition for the end indicator. 24386 * @param {string} [options.colorTrigger=blue] - CSS color definition for the trigger indicator. 24387 */ 24388 Scene.addIndicators = function (options) { 24389 if (!_indicator) { 24390 var 24391 DEFAULT_OPTIONS = { 24392 name: "", 24393 indent: 0, 24394 parent: undefined, 24395 colorStart: "green", 24396 colorEnd: "red", 24397 colorTrigger: "blue", 24398 }; 24399 24400 options = _util.extend({}, DEFAULT_OPTIONS, options); 24401 24402 _autoindex++; 24403 _indicator = new Indicator(Scene, options); 24404 24405 Scene.on("add.plugin_addIndicators", _indicator.add); 24406 Scene.on("remove.plugin_addIndicators", _indicator.remove); 24407 Scene.on("destroy.plugin_addIndicators", Scene.removeIndicators); 24408 24409 // it the scene already has a controller we can start right away. 24410 if (Scene.controller()) { 24411 _indicator.add(); 24412 } 24413 } 24414 return Scene; 24415 }; 24416 24417 /** 24418 * Removes visual indicators from a ScrollMagic.Scene. 24419 * @memberof! debug.addIndicators# 24420 * 24421 * @example 24422 * // remove previously added indicators 24423 * scene.removeIndicators() 24424 * 24425 */ 24426 Scene.removeIndicators = function () { 24427 if (_indicator) { 24428 _indicator.remove(); 24429 this.off("*.plugin_addIndicators"); 24430 _indicator = undefined; 24431 } 24432 return Scene; 24433 }; 24434 24435 }); 24436 24437 24438 /* 24439 * ---------------------------------------------------------------- 24440 * Extension for controller to store and update related indicators 24441 * ---------------------------------------------------------------- 24442 */ 24443 // add option to globally auto-add indicators to scenes 24444 /** 24445 * Every ScrollMagic.Controller instance now accepts an additional option. 24446 * See {@link ScrollMagic.Controller} for a complete list of the standard options. 24447 * @memberof! debug.addIndicators# 24448 * @method new ScrollMagic.Controller(options) 24449 * @example 24450 * // make a controller and add indicators to all scenes attached 24451 * var controller = new ScrollMagic.Controller({addIndicators: true}); 24452 * // this scene will automatically have indicators added to it 24453 * new ScrollMagic.Scene() 24454 * .addTo(controller); 24455 * 24456 * @param {object} [options] - Options for the Controller. 24457 * @param {boolean} [options.addIndicators=false] - If set to `true` every scene that is added to the controller will automatically get indicators added to it. 24458 */ 24459 ScrollMagic.Controller.addOption("addIndicators", false); 24460 // extend Controller 24461 ScrollMagic.Controller.extend(function () { 24462 var 24463 Controller = this, 24464 _info = Controller.info(), 24465 _container = _info.container, 24466 _isDocument = _info.isDocument, 24467 _vertical = _info.vertical, 24468 _indicators = { // container for all indicators and methods 24469 groups: [] 24470 }; 24471 24472 var log = function () { 24473 if (Controller._log) { // not available, when main source minified 24474 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->"); 24475 Controller._log.apply(this, arguments); 24476 } 24477 }; 24478 if (Controller._indicators) { 24479 log(2, "WARNING: Scene already has a property '_indicators', which will be overwritten by plugin."); 24480 } 24481 24482 // add indicators container 24483 this._indicators = _indicators; 24484 /* 24485 needed updates: 24486 +++++++++++++++ 24487 start/end position on scene shift (handled in Indicator class) 24488 trigger parameters on triggerHook value change (handled in Indicator class) 24489 bounds position on container scroll or resize (to keep alignment to bottom/right) 24490 trigger position on container resize, window resize (if container isn't document) and window scroll (if container isn't document) 24491 */ 24492 24493 // event handler for when associated bounds markers need to be repositioned 24494 var handleBoundsPositionChange = function () { 24495 _indicators.updateBoundsPositions(); 24496 }; 24497 24498 // event handler for when associated trigger groups need to be repositioned 24499 var handleTriggerPositionChange = function () { 24500 _indicators.updateTriggerGroupPositions(); 24501 }; 24502 24503 _container.addEventListener("resize", handleTriggerPositionChange); 24504 if (!_isDocument) { 24505 window.addEventListener("resize", handleTriggerPositionChange); 24506 window.addEventListener("scroll", handleTriggerPositionChange); 24507 } 24508 // update all related bounds containers 24509 _container.addEventListener("resize", handleBoundsPositionChange); 24510 _container.addEventListener("scroll", handleBoundsPositionChange); 24511 24512 24513 // updates the position of the bounds container to aligned to the right for vertical containers and to the bottom for horizontal 24514 this._indicators.updateBoundsPositions = function (specificIndicator) { 24515 var // constant for all bounds 24516 groups = specificIndicator ? [_util.extend({}, specificIndicator.triggerGroup, { 24517 members: [specificIndicator] 24518 })] : // create a group with only one element 24519 _indicators.groups, // use all 24520 g = groups.length, 24521 css = {}, 24522 paramPos = _vertical ? "left" : "top", 24523 paramDimension = _vertical ? "width" : "height", 24524 edge = _vertical ? 24525 _util.get.scrollLeft(_container) + _util.get.width(_container) - EDGE_OFFSET : 24526 _util.get.scrollTop(_container) + _util.get.height(_container) - EDGE_OFFSET, 24527 b, triggerSize, group; 24528 while (g--) { // group loop 24529 group = groups[g]; 24530 b = group.members.length; 24531 triggerSize = _util.get[paramDimension](group.element.firstChild); 24532 while (b--) { // indicators loop 24533 css[paramPos] = edge - triggerSize; 24534 _util.css(group.members[b].bounds, css); 24535 } 24536 } 24537 }; 24538 24539 // updates the positions of all trigger groups attached to a controller or a specific one, if provided 24540 this._indicators.updateTriggerGroupPositions = function (specificGroup) { 24541 var // constant vars 24542 groups = specificGroup ? [specificGroup] : _indicators.groups, 24543 i = groups.length, 24544 container = _isDocument ? document.body : _container, 24545 containerOffset = _isDocument ? { 24546 top: 0, 24547 left: 0 24548 } : _util.get.offset(container, true), 24549 edge = _vertical ? 24550 _util.get.width(_container) - EDGE_OFFSET : 24551 _util.get.height(_container) - EDGE_OFFSET, 24552 paramDimension = _vertical ? "width" : "height", 24553 paramTransform = _vertical ? "Y" : "X"; 24554 var // changing vars 24555 group, 24556 elem, 24557 pos, 24558 elemSize, 24559 transform; 24560 while (i--) { 24561 group = groups[i]; 24562 elem = group.element; 24563 pos = group.triggerHook * Controller.info("size"); 24564 elemSize = _util.get[paramDimension](elem.firstChild.firstChild); 24565 transform = pos > elemSize ? "translate" + paramTransform + "(-100%)" : ""; 24566 24567 _util.css(elem, { 24568 top: containerOffset.top + (_vertical ? pos : edge - group.members[0].options.indent), 24569 left: containerOffset.left + (_vertical ? edge - group.members[0].options.indent : pos) 24570 }); 24571 _util.css(elem.firstChild.firstChild, { 24572 "-ms-transform": transform, 24573 "-webkit-transform": transform, 24574 "transform": transform 24575 }); 24576 } 24577 }; 24578 24579 // updates the label for the group to contain the name, if it only has one member 24580 this._indicators.updateTriggerGroupLabel = function (group) { 24581 var 24582 text = "trigger" + (group.members.length > 1 ? "" : " " + group.members[0].options.name), 24583 elem = group.element.firstChild.firstChild, 24584 doUpdate = elem.textContent !== text; 24585 if (doUpdate) { 24586 elem.textContent = text; 24587 if (_vertical) { // bounds position is dependent on text length, so update 24588 _indicators.updateBoundsPositions(); 24589 } 24590 } 24591 }; 24592 24593 // add indicators if global option is set 24594 this.addScene = function (newScene) { 24595 24596 if (this._options.addIndicators && newScene instanceof ScrollMagic.Scene && newScene.controller() === Controller) { 24597 newScene.addIndicators(); 24598 } 24599 // call original destroy method 24600 this.$super.addScene.apply(this, arguments); 24601 }; 24602 24603 // remove all previously set listeners on destroy 24604 this.destroy = function () { 24605 _container.removeEventListener("resize", handleTriggerPositionChange); 24606 if (!_isDocument) { 24607 window.removeEventListener("resize", handleTriggerPositionChange); 24608 window.removeEventListener("scroll", handleTriggerPositionChange); 24609 } 24610 _container.removeEventListener("resize", handleBoundsPositionChange); 24611 _container.removeEventListener("scroll", handleBoundsPositionChange); 24612 // call original destroy method 24613 this.$super.destroy.apply(this, arguments); 24614 }; 24615 return Controller; 24616 24617 }); 24618 24619 /* 24620 * ---------------------------------------------------------------- 24621 * Internal class for the construction of Indicators 24622 * ---------------------------------------------------------------- 24623 */ 24624 var Indicator = function (Scene, options) { 24625 var 24626 Indicator = this, 24627 _elemBounds = TPL.bounds(), 24628 _elemStart = TPL.start(options.colorStart), 24629 _elemEnd = TPL.end(options.colorEnd), 24630 _boundsContainer = options.parent && _util.get.elements(options.parent)[0], 24631 _vertical, 24632 _ctrl; 24633 24634 var log = function () { 24635 if (Scene._log) { // not available, when main source minified 24636 Array.prototype.splice.call(arguments, 1, 0, "(" + NAMESPACE + ")", "->"); 24637 Scene._log.apply(this, arguments); 24638 } 24639 }; 24640 24641 options.name = options.name || _autoindex; 24642 24643 // prepare bounds elements 24644 _elemStart.firstChild.textContent += " " + options.name; 24645 _elemEnd.textContent += " " + options.name; 24646 _elemBounds.appendChild(_elemStart); 24647 _elemBounds.appendChild(_elemEnd); 24648 24649 // set public variables 24650 Indicator.options = options; 24651 Indicator.bounds = _elemBounds; 24652 // will be set later 24653 Indicator.triggerGroup = undefined; 24654 24655 // add indicators to DOM 24656 this.add = function () { 24657 _ctrl = Scene.controller(); 24658 _vertical = _ctrl.info("vertical"); 24659 24660 var isDocument = _ctrl.info("isDocument"); 24661 24662 if (!_boundsContainer) { 24663 // no parent supplied or doesnt exist 24664 _boundsContainer = isDocument ? document.body : _ctrl.info("container"); // check if window/document (then use body) 24665 } 24666 if (!isDocument && _util.css(_boundsContainer, "position") === 'static') { 24667 // position mode needed for correct positioning of indicators 24668 _util.css(_boundsContainer, { 24669 position: "relative" 24670 }); 24671 } 24672 24673 // add listeners for updates 24674 Scene.on("change.plugin_addIndicators", handleTriggerParamsChange); 24675 Scene.on("shift.plugin_addIndicators", handleBoundsParamsChange); 24676 24677 // updates trigger & bounds (will add elements if needed) 24678 updateTriggerGroup(); 24679 updateBounds(); 24680 24681 setTimeout(function () { // do after all execution is finished otherwise sometimes size calculations are off 24682 _ctrl._indicators.updateBoundsPositions(Indicator); 24683 }, 0); 24684 24685 log(3, "added indicators"); 24686 }; 24687 24688 // remove indicators from DOM 24689 this.remove = function () { 24690 if (Indicator.triggerGroup) { // if not set there's nothing to remove 24691 Scene.off("change.plugin_addIndicators", handleTriggerParamsChange); 24692 Scene.off("shift.plugin_addIndicators", handleBoundsParamsChange); 24693 24694 if (Indicator.triggerGroup.members.length > 1) { 24695 // just remove from memberlist of old group 24696 var group = Indicator.triggerGroup; 24697 group.members.splice(group.members.indexOf(Indicator), 1); 24698 _ctrl._indicators.updateTriggerGroupLabel(group); 24699 _ctrl._indicators.updateTriggerGroupPositions(group); 24700 Indicator.triggerGroup = undefined; 24701 } else { 24702 // remove complete group 24703 removeTriggerGroup(); 24704 } 24705 removeBounds(); 24706 24707 log(3, "removed indicators"); 24708 } 24709 }; 24710 24711 /* 24712 * ---------------------------------------------------------------- 24713 * internal Event Handlers 24714 * ---------------------------------------------------------------- 24715 */ 24716 24717 // event handler for when bounds params change 24718 var handleBoundsParamsChange = function () { 24719 updateBounds(); 24720 }; 24721 24722 // event handler for when trigger params change 24723 var handleTriggerParamsChange = function (e) { 24724 if (e.what === "triggerHook") { 24725 updateTriggerGroup(); 24726 } 24727 }; 24728 24729 /* 24730 * ---------------------------------------------------------------- 24731 * Bounds (start / stop) management 24732 * ---------------------------------------------------------------- 24733 */ 24734 24735 // adds an new bounds elements to the array and to the DOM 24736 var addBounds = function () { 24737 var v = _ctrl.info("vertical"); 24738 // apply stuff we didn't know before... 24739 _util.css(_elemStart.firstChild, { 24740 "border-bottom-width": v ? 1 : 0, 24741 "border-right-width": v ? 0 : 1, 24742 "bottom": v ? -1 : options.indent, 24743 "right": v ? options.indent : -1, 24744 "padding": v ? "0 8px" : "2px 4px", 24745 }); 24746 _util.css(_elemEnd, { 24747 "border-top-width": v ? 1 : 0, 24748 "border-left-width": v ? 0 : 1, 24749 "top": v ? "100%" : "", 24750 "right": v ? options.indent : "", 24751 "bottom": v ? "" : options.indent, 24752 "left": v ? "" : "100%", 24753 "padding": v ? "0 8px" : "2px 4px" 24754 }); 24755 // append 24756 _boundsContainer.appendChild(_elemBounds); 24757 }; 24758 24759 // remove bounds from list and DOM 24760 var removeBounds = function () { 24761 _elemBounds.parentNode.removeChild(_elemBounds); 24762 }; 24763 24764 // update the start and end positions of the scene 24765 var updateBounds = function () { 24766 if (_elemBounds.parentNode !== _boundsContainer) { 24767 addBounds(); // Add Bounds elements (start/end) 24768 } 24769 var css = {}; 24770 css[_vertical ? "top" : "left"] = Scene.triggerPosition(); 24771 css[_vertical ? "height" : "width"] = Scene.duration(); 24772 _util.css(_elemBounds, css); 24773 _util.css(_elemEnd, { 24774 display: Scene.duration() > 0 ? "" : "none" 24775 }); 24776 }; 24777 24778 /* 24779 * ---------------------------------------------------------------- 24780 * trigger and trigger group management 24781 * ---------------------------------------------------------------- 24782 */ 24783 24784 // adds an new trigger group to the array and to the DOM 24785 var addTriggerGroup = function () { 24786 var triggerElem = TPL.trigger(options.colorTrigger); // new trigger element 24787 var css = {}; 24788 css[_vertical ? "right" : "bottom"] = 0; 24789 css[_vertical ? "border-top-width" : "border-left-width"] = 1; 24790 _util.css(triggerElem.firstChild, css); 24791 _util.css(triggerElem.firstChild.firstChild, { 24792 padding: _vertical ? "0 8px 3px 8px" : "3px 4px" 24793 }); 24794 document.body.appendChild(triggerElem); // directly add to body 24795 var newGroup = { 24796 triggerHook: Scene.triggerHook(), 24797 element: triggerElem, 24798 members: [Indicator] 24799 }; 24800 _ctrl._indicators.groups.push(newGroup); 24801 Indicator.triggerGroup = newGroup; 24802 // update right away 24803 _ctrl._indicators.updateTriggerGroupLabel(newGroup); 24804 _ctrl._indicators.updateTriggerGroupPositions(newGroup); 24805 }; 24806 24807 var removeTriggerGroup = function () { 24808 _ctrl._indicators.groups.splice(_ctrl._indicators.groups.indexOf(Indicator.triggerGroup), 1); 24809 Indicator.triggerGroup.element.parentNode.removeChild(Indicator.triggerGroup.element); 24810 Indicator.triggerGroup = undefined; 24811 }; 24812 24813 // updates the trigger group -> either join existing or add new one 24814 /* 24815 * Logic: 24816 * 1 if a trigger group exist, check if it's in sync with Scene settings – if so, nothing else needs to happen 24817 * 2 try to find an existing one that matches Scene parameters 24818 * 2.1 If a match is found check if already assigned to an existing group 24819 * If so: 24820 * A: it was the last member of existing group -> kill whole group 24821 * B: the existing group has other members -> just remove from member list 24822 * 2.2 Assign to matching group 24823 * 3 if no new match could be found, check if assigned to existing group 24824 * A: yes, and it's the only member -> just update parameters and positions and keep using this group 24825 * B: yes but there are other members -> remove from member list and create a new one 24826 * C: no, so create a new one 24827 */ 24828 var updateTriggerGroup = function () { 24829 var 24830 triggerHook = Scene.triggerHook(), 24831 closeEnough = 0.0001; 24832 24833 // Have a group, check if it still matches 24834 if (Indicator.triggerGroup) { 24835 if (Math.abs(Indicator.triggerGroup.triggerHook - triggerHook) < closeEnough) { 24836 // _util.log(0, "trigger", options.name, "->", "no need to change, still in sync"); 24837 return; // all good 24838 } 24839 } 24840 // Don't have a group, check if a matching one exists 24841 // _util.log(0, "trigger", options.name, "->", "out of sync!"); 24842 var 24843 groups = _ctrl._indicators.groups, 24844 group, 24845 i = groups.length; 24846 while (i--) { 24847 group = groups[i]; 24848 if (Math.abs(group.triggerHook - triggerHook) < closeEnough) { 24849 // found a match! 24850 // _util.log(0, "trigger", options.name, "->", "found match"); 24851 if (Indicator.triggerGroup) { // do I have an old group that is out of sync? 24852 if (Indicator.triggerGroup.members.length === 1) { // is it the only remaining group? 24853 // _util.log(0, "trigger", options.name, "->", "kill"); 24854 // was the last member, remove the whole group 24855 removeTriggerGroup(); 24856 } else { 24857 Indicator.triggerGroup.members.splice(Indicator.triggerGroup.members.indexOf(Indicator), 1); // just remove from memberlist of old group 24858 _ctrl._indicators.updateTriggerGroupLabel(Indicator.triggerGroup); 24859 _ctrl._indicators.updateTriggerGroupPositions(Indicator.triggerGroup); 24860 // _util.log(0, "trigger", options.name, "->", "removing from previous member list"); 24861 } 24862 } 24863 // join new group 24864 group.members.push(Indicator); 24865 Indicator.triggerGroup = group; 24866 _ctrl._indicators.updateTriggerGroupLabel(group); 24867 return; 24868 } 24869 } 24870 24871 // at this point I am obviously out of sync and don't match any other group 24872 if (Indicator.triggerGroup) { 24873 if (Indicator.triggerGroup.members.length === 1) { 24874 // _util.log(0, "trigger", options.name, "->", "updating existing"); 24875 // out of sync but i'm the only member => just change and update 24876 Indicator.triggerGroup.triggerHook = triggerHook; 24877 _ctrl._indicators.updateTriggerGroupPositions(Indicator.triggerGroup); 24878 return; 24879 } else { 24880 // _util.log(0, "trigger", options.name, "->", "removing from previous member list"); 24881 Indicator.triggerGroup.members.splice(Indicator.triggerGroup.members.indexOf(Indicator), 1); // just remove from memberlist of old group 24882 _ctrl._indicators.updateTriggerGroupLabel(Indicator.triggerGroup); 24883 _ctrl._indicators.updateTriggerGroupPositions(Indicator.triggerGroup); 24884 Indicator.triggerGroup = undefined; // need a brand new group... 24885 } 24886 } 24887 // _util.log(0, "trigger", options.name, "->", "add a new one"); 24888 // did not find any match, make new trigger group 24889 addTriggerGroup(); 24890 }; 24891 }; 24892 24893 /* 24894 * ---------------------------------------------------------------- 24895 * Templates for the indicators 24896 * ---------------------------------------------------------------- 24897 */ 24898 var TPL = { 24899 start: function (color) { 24900 // inner element (for bottom offset -1, while keeping top position 0) 24901 var inner = document.createElement("div"); 24902 inner.textContent = "start"; 24903 _util.css(inner, { 24904 position: "absolute", 24905 overflow: "visible", 24906 "border-width": 0, 24907 "border-style": "solid", 24908 color: color, 24909 "border-color": color 24910 }); 24911 var e = document.createElement('div'); 24912 // wrapper 24913 _util.css(e, { 24914 position: "absolute", 24915 overflow: "visible", 24916 width: 0, 24917 height: 0 24918 }); 24919 e.appendChild(inner); 24920 return e; 24921 }, 24922 end: function (color) { 24923 var e = document.createElement('div'); 24924 e.textContent = "end"; 24925 _util.css(e, { 24926 position: "absolute", 24927 overflow: "visible", 24928 "border-width": 0, 24929 "border-style": "solid", 24930 color: color, 24931 "border-color": color 24932 }); 24933 return e; 24934 }, 24935 bounds: function () { 24936 var e = document.createElement('div'); 24937 _util.css(e, { 24938 position: "absolute", 24939 overflow: "visible", 24940 "white-space": "nowrap", 24941 "pointer-events": "none", 24942 "font-size": FONT_SIZE 24943 }); 24944 e.style.zIndex = ZINDEX; 24945 return e; 24946 }, 24947 trigger: function (color) { 24948 // inner to be above or below line but keep position 24949 var inner = document.createElement('div'); 24950 inner.textContent = "trigger"; 24951 _util.css(inner, { 24952 position: "relative", 24953 }); 24954 // inner wrapper for right: 0 and main element has no size 24955 var w = document.createElement('div'); 24956 _util.css(w, { 24957 position: "absolute", 24958 overflow: "visible", 24959 "border-width": 0, 24960 "border-style": "solid", 24961 color: color, 24962 "border-color": color 24963 }); 24964 w.appendChild(inner); 24965 // wrapper 24966 var e = document.createElement('div'); 24967 _util.css(e, { 24968 position: "fixed", 24969 overflow: "visible", 24970 "white-space": "nowrap", 24971 "pointer-events": "none", 24972 "font-size": FONT_SIZE 24973 }); 24974 e.style.zIndex = ZINDEX; 24975 e.appendChild(w); 24976 return e; 24977 }, 24978 }; 24979 24980})); 24981 24982/***/ }), 24983
vendor: 141,240 bytes, lines 24984-25007
24984/***/ "../../../../../node_modules/swiper/js/swiper.min.js": 24985/*!*******************************************************************************!*\ 24986 !*** /Users/mauro/Sites/eternalsunspire/node_modules/swiper/js/swiper.min.js ***! 24987 \*******************************************************************************/ 24988/*! no static exports found */ 24989/***/ (function(module, exports, __webpack_require__) { 24990 24991/** 24992 * Swiper 5.4.5 24993 * Most modern mobile touch slider and framework with hardware accelerated transitions 24994 * http://swiperjs.com 24995 * 24996 * Copyright 2014-2020 Vladimir Kharlampidi 24997 * 24998 * Released under the MIT License 24999 * 25000 * Released on: June 16, 2020 25001 */ 25002 25003!function(e,t){ true?module.exports=t():undefined}(this,(function(){"use strict";function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(i,s){void 0===i&&(i={}),void 0===s&&(s={}),Object.keys(s).forEach((function(a){void 0===i[a]?i[a]=s[a]:e(s[a])&&e(i[a])&&Object.keys(s[a]).length>0&&t(i[a],s[a])}))}var i="undefined"!=typeof document?document:{},s={body:{},addEventListener:function(){},removeEventListener:function(){},activeElement:{blur:function(){},nodeName:""},querySelector:function(){return null},querySelectorAll:function(){return[]},getElementById:function(){return null},createEvent:function(){return{initEvent:function(){}}},createElement:function(){return{children:[],childNodes:[],style:{},setAttribute:function(){},getElementsByTagName:function(){return[]}}},createElementNS:function(){return{}},importNode:function(){return null},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};t(i,s);var a="undefined"!=typeof window?window:{};t(a,{document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState:function(){},pushState:function(){},go:function(){},back:function(){}},CustomEvent:function(){return this},addEventListener:function(){},removeEventListener:function(){},getComputedStyle:function(){return{getPropertyValue:function(){return""}}},Image:function(){},Date:function(){},screen:{},setTimeout:function(){},clearTimeout:function(){},matchMedia:function(){return{}}});var r=function(e){for(var t=0;t<e.length;t+=1)this[t]=e[t];return this.length=e.length,this};function n(e,t){var s=[],n=0;if(e&&!t&&e instanceof r)return e;if(e)if("string"==typeof e){var o,l,d=e.trim();if(d.indexOf("<")>=0&&d.indexOf(">")>=0){var h="div";for(0===d.indexOf("<li")&&(h="ul"),0===d.indexOf("<tr")&&(h="tbody"),0!==d.indexOf("<td")&&0!==d.indexOf("<th")||(h="tr"),0===d.indexOf("<tbody")&&(h="table"),0===d.indexOf("<option")&&(h="select"),(l=i.createElement(h)).innerHTML=d,n=0;n<l.childNodes.length;n+=1)s.push(l.childNodes[n])}else for(o=t||"#"!==e[0]||e.match(/[ .<>:~]/)?(t||i).querySelectorAll(e.trim()):[i.getElementById(e.trim().split("#")[1])],n=0;n<o.length;n+=1)o[n]&&s.push(o[n])}else if(e.nodeType||e===a||e===i)s.push(e);else if(e.length>0&&e[0].nodeType)for(n=0;n<e.length;n+=1)s.push(e[n]);return new r(s)}function o(e){for(var t=[],i=0;i<e.length;i+=1)-1===t.indexOf(e[i])&&t.push(e[i]);return t}n.fn=r.prototype,n.Class=r,n.Dom7=r;var l={addClass:function(e){if(void 0===e)return this;for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void 0!==this[s]&&void 0!==this[s].classList&&this[s].classList.add(t[i]);return this},removeClass:function(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void 0!==this[s]&&void 0!==this[s].classList&&this[s].classList.remove(t[i]);return this},hasClass:function(e){return!!this[0]&&this[0].classList.contains(e)},toggleClass:function(e){for(var t=e.split(" "),i=0;i<t.length;i+=1)for(var s=0;s<this.length;s+=1)void 0!==this[s]&&void 0!==this[s].classList&&this[s].classList.toggle(t[i]);return this},attr:function(e,t){var i=arguments;if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(var s=0;s<this.length;s+=1)if(2===i.length)this[s].setAttribute(e,t);else for(var a in e)this[s][a]=e[a],this[s].setAttribute(a,e[a]);return this},removeAttr:function(e){for(var t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},data:function(e,t){var i;if(void 0!==t){for(var s=0;s<this.length;s+=1)(i=this[s]).dom7ElementDataStorage||(i.dom7ElementDataStorage={}),i.dom7ElementDataStorage[e]=t;return this}if(i=this[0]){if(i.dom7ElementDataStorage&&e in i.dom7ElementDataStorage)return i.dom7ElementDataStorage[e];var a=i.getAttribute("data-"+e);return a||void 0}},transform:function(e){for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransform=e,i.transform=e}return this},transition:function(e){"string"!=typeof e&&(e+="ms");for(var t=0;t<this.length;t+=1){var i=this[t].style;i.webkitTransitionDuration=e,i.transitionDuration=e}return this},on:function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];var s=t[0],a=t[1],r=t[2],o=t[3];function l(e){var t=e.target;if(t){var i=e.target.dom7EventData||[];if(i.indexOf(e)<0&&i.unshift(e),n(t).is(a))r.apply(t,i);else for(var s=n(t).parents(),o=0;o<s.length;o+=1)n(s[o]).is(a)&&r.apply(s[o],i)}}function d(e){var t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),r.apply(this,t)}"function"==typeof t[1]&&(s=(e=t)[0],r=e[1],o=e[2],a=void 0),o||(o=!1);for(var h,p=s.split(" "),c=0;c<this.length;c+=1){var u=this[c];if(a)for(h=0;h<p.length;h+=1){var v=p[h];u.dom7LiveListeners||(u.dom7LiveListeners={}),u.dom7LiveListeners[v]||(u.dom7LiveListeners[v]=[]),u.dom7LiveListeners[v].push({listener:r,proxyListener:l}),u.addEventListener(v,l,o)}else for(h=0;h<p.length;h+=1){var f=p[h];u.dom7Listeners||(u.dom7Listeners={}),u.dom7Listeners[f]||(u.dom7Listeners[f]=[]),u.dom7Listeners[f].push({listener:r,proxyListener:d}),u.addEventListener(f,d,o)}}return this},off:function(){for(var e,t=[],i=arguments.length;i--;)t[i]=arguments[i];var s=t[0],a=t[1],r=t[2],n=t[3];"function"==typeof t[1]&&(s=(e=t)[0],r=e[1],n=e[2],a=void 0),n||(n=!1);for(var o=s.split(" "),l=0;l<o.length;l+=1)for(var d=o[l],h=0;h<this.length;h+=1){var p=this[h],c=void 0;if(!a&&p.dom7Listeners?c=p.dom7Listeners[d]:a&&p.dom7LiveListeners&&(c=p.dom7LiveListeners[d]),c&&c.length)for(var u=c.length-1;u>=0;u-=1){var v=c[u];r&&v.listener===r||r&&v.listener&&v.listener.dom7proxy&&v.listener.dom7proxy===r?(p.removeEventListener(d,v.proxyListener,n),c.splice(u,1)):r||(p.removeEventListener(d,v.proxyListener,n),c.splice(u,1))}}return this},trigger:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var s=e[0].split(" "),r=e[1],n=0;n<s.length;n+=1)for(var o=s[n],l=0;l<this.length;l+=1){var d=this[l],h=void 0;try{h=new a.CustomEvent(o,{detail:r,bubbles:!0,cancelable:!0})}catch(e){(h=i.createEvent("Event")).initEvent(o,!0,!0),h.detail=r}d.dom7EventData=e.filter((function(e,t){return t>0})),d.dispatchEvent(h),d.dom7EventData=[],delete d.dom7EventData}return this},transitionEnd:function(e){var t,i=["webkitTransitionEnd","transitionend"],s=this;function a(r){if(r.target===this)for(e.call(this,r),t=0;t<i.length;t+=1)s.off(i[t],a)}if(e)for(t=0;t<i.length;t+=1)s.on(i[t],a);return this},outerWidth:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetWidth+parseFloat(t.getPropertyValue("margin-right"))+parseFloat(t.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){var t=this.styles();return this[0].offsetHeight+parseFloat(t.getPropertyValue("margin-top"))+parseFloat(t.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},offset:function(){if(this.length>0){var e=this[0],t=e.getBoundingClientRect(),s=i.body,r=e.clientTop||s.clientTop||0,n=e.clientLeft||s.clientLeft||0,o=e===a?a.scrollY:e.scrollTop,l=e===a?a.scrollX:e.scrollLeft;return{top:t.top+o-r,left:t.left+l-n}}return null},css:function(e,t){var i;if(1===arguments.length){if("string"!=typeof e){for(i=0;i<this.length;i+=1)for(var s in e)this[i].style[s]=e[s];return this}if(this[0])return a.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(i=0;i<this.length;i+=1)this[i].style[e]=t;return this}return this},each:function(e){if(!e)return this;for(var t=0;t<this.length;t+=1)if(!1===e.call(this[t],t,this[t]))return this;return this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:void 0;for(var t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(var t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){var t,s,o=this[0];if(!o||void 0===e)return!1;if("string"==typeof e){if(o.matches)return o.matches(e);if(o.webkitMatchesSelector)return o.webkitMatchesSelector(e);if(o.msMatchesSelector)return o.msMatchesSelector(e);for(t=n(e),s=0;s<t.length;s+=1)if(t[s]===o)return!0;return!1}if(e===i)return o===i;if(e===a)return o===a;if(e.nodeType||e instanceof r){for(t=e.nodeType?[e]:e,s=0;s<t.length;s+=1)if(t[s]===o)return!0;return!1}return!1},index:function(){var e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;var t,i=this.length;return new r(e>i-1?[]:e<0?(t=i+e)<0?[]:[this[t]]:[this[e]])},append:function(){for(var e,t=[],s=arguments.length;s--;)t[s]=arguments[s];for(var a=0;a<t.length;a+=1){e=t[a];for(var n=0;n<this.length;n+=1)if("string"==typeof e){var o=i.createElement("div");for(o.innerHTML=e;o.firstChild;)this[n].appendChild(o.firstChild)}else if(e instanceof r)for(var l=0;l<e.length;l+=1)this[n].appendChild(e[l]);else this[n].appendChild(e)}return this},prepend:function(e){var t,s;for(t=0;t<this.length;t+=1)if("string"==typeof e){var a=i.createElement("div");for(a.innerHTML=e,s=a.childNodes.length-1;s>=0;s-=1)this[t].insertBefore(a.childNodes[s],this[t].childNodes[0])}else if(e instanceof r)for(s=0;s<e.length;s+=1)this[t].insertBefore(e[s],this[t].childNodes[0]);else this[t].insertBefore(e,this[t].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&n(this[0].nextElementSibling).is(e)?new r([this[0].nextElementSibling]):new r([]):this[0].nextElementSibling?new r([this[0].nextElementSibling]):new r([]):new r([])},nextAll:function(e){var t=[],i=this[0];if(!i)return new r([]);for(;i.nextElementSibling;){var s=i.nextElementSibling;e?n(s).is(e)&&t.push(s):t.push(s),i=s}return new r(t)},prev:function(e){if(this.length>0){var t=this[0];return e?t.previousElementSibling&&n(t.previousElementSibling).is(e)?new r([t.previousElementSibling]):new r([]):t.previousElementSibling?new r([t.previousElementSibling]):new r([])}return new r([])},prevAll:function(e){var t=[],i=this[0];if(!i)return new r([]);for(;i.previousElementSibling;){var s=i.previousElementSibling;e?n(s).is(e)&&t.push(s):t.push(s),i=s}return new r(t)},parent:function(e){for(var t=[],i=0;i<this.length;i+=1)null!==this[i].parentNode&&(e?n(this[i].parentNode).is(e)&&t.push(this[i].parentNode):t.push(this[i].parentNode));return n(o(t))},parents:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].parentNode;s;)e?n(s).is(e)&&t.push(s):t.push(s),s=s.parentNode;return n(o(t))},closest:function(e){var t=this;return void 0===e?new r([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].querySelectorAll(e),a=0;a<s.length;a+=1)t.push(s[a]);return new r(t)},children:function(e){for(var t=[],i=0;i<this.length;i+=1)for(var s=this[i].childNodes,a=0;a<s.length;a+=1)e?1===s[a].nodeType&&n(s[a]).is(e)&&t.push(s[a]):1===s[a].nodeType&&t.push(s[a]);return new r(o(t))},filter:function(e){for(var t=[],i=0;i<this.length;i+=1)e.call(this[i],i,this[i])&&t.push(this[i]);return new r(t)},remove:function(){for(var e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},add:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var i,s,a=this;for(i=0;i<e.length;i+=1){var r=n(e[i]);for(s=0;s<r.length;s+=1)a[a.length]=r[s],a.length+=1}return a},styles:function(){return this[0]?a.getComputedStyle(this[0],null):{}}};Object.keys(l).forEach((function(e){n.fn[e]=n.fn[e]||l[e]}));var d={deleteProps:function(e){var t=e;Object.keys(t).forEach((function(e){try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))},nextTick:function(e,t){return void 0===t&&(t=0),setTimeout(e,t)},now:function(){return Date.now()},getTranslate:function(e,t){var i,s,r;void 0===t&&(t="x");var n=a.getComputedStyle(e,null);return a.WebKitCSSMatrix?((s=n.transform||n.webkitTransform).split(",").length>6&&(s=s.split(", ").map((function(e){return e.replace(",",".")})).join(", ")),r=new a.WebKitCSSMatrix("none"===s?"":s)):i=(r=n.MozTransform||n.OTransform||n.MsTransform||n.msTransform||n.transform||n.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,")).toString().split(","),"x"===t&&(s=a.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(s=a.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),s||0},parseUrlQuery:function(e){var t,i,s,r,n={},o=e||a.location.href;if("string"==typeof o&&o.length)for(r=(i=(o=o.indexOf("?")>-1?o.replace(/\S*\?/,""):"").split("&").filter((function(e){return""!==e}))).length,t=0;t<r;t+=1)s=i[t].replace(/#\S+/g,"").split("="),n[decodeURIComponent(s[0])]=void 0===s[1]?void 0:decodeURIComponent(s[1])||"";return n},isObject:function(e){return"object"==typeof e&&null!==e&&e.constructor&&e.constructor===Object},extend:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var i=Object(e[0]),s=1;s<e.length;s+=1){var a=e[s];if(null!=a)for(var r=Object.keys(Object(a)),n=0,o=r.length;n<o;n+=1){var l=r[n],h=Object.getOwnPropertyDescriptor(a,l);void 0!==h&&h.enumerable&&(d.isObject(i[l])&&d.isObject(a[l])?d.extend(i[l],a[l]):!d.isObject(i[l])&&d.isObject(a[l])?(i[l]={},d.extend(i[l],a[l])):i[l]=a[l])}}return i}},h={touch:!!("ontouchstart"in a||a.DocumentTouch&&i instanceof a.DocumentTouch),pointerEvents:!!a.PointerEvent&&"maxTouchPoints"in a.navigator&&a.navigator.maxTouchPoints>=0,observer:"MutationObserver"in a||"WebkitMutationObserver"in a,passiveListener:function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});a.addEventListener("testPassiveListener",null,t)}catch(e){}return e}(),gestures:"ongesturestart"in a},p=function(e){void 0===e&&(e={});var t=this;t.params=e,t.eventsListeners={},t.params&&t.params.on&&Object.keys(t.params.on).forEach((function(e){t.on(e,t.params.on[e])}))},c={components:{configurable:!0}};p.prototype.on=function(e,t,i){var s=this;if("function"!=typeof t)return s;var a=i?"unshift":"push";return e.split(" ").forEach((function(e){s.eventsListeners[e]||(s.eventsListeners[e]=[]),s.eventsListeners[e][a](t)})),s},p.prototype.once=function(e,t,i){var s=this;if("function"!=typeof t)return s;function a(){for(var i=[],r=arguments.length;r--;)i[r]=arguments[r];s.off(e,a),a.f7proxy&&delete a.f7proxy,t.apply(s,i)}return a.f7proxy=t,s.on(e,a,i)},p.prototype.off=function(e,t){var i=this;return i.eventsListeners?(e.split(" ").forEach((function(e){void 0===t?i.eventsListeners[e]=[]:i.eventsListeners[e]&&i.eventsListeners[e].length&&i.eventsListeners[e].forEach((function(s,a){(s===t||s.f7proxy&&s.f7proxy===t)&&i.eventsListeners[e].splice(a,1)}))})),i):i},p.prototype.emit=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var i,s,a,r=this;if(!r.eventsListeners)return r;"string"==typeof e[0]||Array.isArray(e[0])?(i=e[0],s=e.slice(1,e.length),a=r):(i=e[0].events,s=e[0].data,a=e[0].context||r);var n=Array.isArray(i)?i:i.split(" ");return n.forEach((function(e){if(r.eventsListeners&&r.eventsListeners[e]){var t=[];r.eventsListeners[e].forEach((function(e){t.push(e)})),t.forEach((function(e){e.apply(a,s)}))}})),r},p.prototype.useModulesParams=function(e){var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var s=t.modules[i];s.params&&d.extend(e,s.params)}))},p.prototype.useModules=function(e){void 0===e&&(e={});var t=this;t.modules&&Object.keys(t.modules).forEach((function(i){var s=t.modules[i],a=e[i]||{};s.instance&&Object.keys(s.instance).forEach((function(e){var i=s.instance[e];t[e]="function"==typeof i?i.bind(t):i})),s.on&&t.on&&Object.keys(s.on).forEach((function(e){t.on(e,s.on[e])})),s.create&&s.create.bind(t)(a)}))},c.components.set=function(e){this.use&&this.use(e)},p.installModule=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var s=this;s.prototype.modules||(s.prototype.modules={});var a=e.name||Object.keys(s.prototype.modules).length+"_"+d.now();return s.prototype.modules[a]=e,e.proto&&Object.keys(e.proto).forEach((function(t){s.prototype[t]=e.proto[t]})),e.static&&Object.keys(e.static).forEach((function(t){s[t]=e.static[t]})),e.install&&e.install.apply(s,t),s},p.use=function(e){for(var t=[],i=arguments.length-1;i-- >0;)t[i]=arguments[i+1];var s=this;return Array.isArray(e)?(e.forEach((function(e){return s.installModule(e)})),s):s.installModule.apply(s,[e].concat(t))},Object.defineProperties(p,c);var u={updateSize:function(){var e,t,i=this.$el;e=void 0!==this.params.width?this.params.width:i[0].clientWidth,t=void 0!==this.params.height?this.params.height:i[0].clientHeight,0===e&&this.isHorizontal()||0===t&&this.isVertical()||(e=e-parseInt(i.css("padding-left"),10)-parseInt(i.css("padding-right"),10),t=t-parseInt(i.css("padding-top"),10)-parseInt(i.css("padding-bottom"),10),d.extend(this,{width:e,height:t,size:this.isHorizontal()?e:t}))},updateSlides:function(){var e=this.params,t=this.$wrapperEl,i=this.size,s=this.rtlTranslate,r=this.wrongRTL,n=this.virtual&&e.virtual.enabled,o=n?this.virtual.slides.length:this.slides.length,l=t.children("."+this.params.slideClass),h=n?this.virtual.slides.length:l.length,p=[],c=[],u=[];function v(t){return!e.cssMode||t!==l.length-1}var f=e.slidesOffsetBefore;"function"==typeof f&&(f=e.slidesOffsetBefore.call(this));var m=e.slidesOffsetAfter;"function"==typeof m&&(m=e.slidesOffsetAfter.call(this));var g=this.snapGrid.length,b=this.snapGrid.length,w=e.spaceBetween,y=-f,x=0,E=0;if(void 0!==i){var T,S;"string"==typeof w&&w.indexOf("%")>=0&&(w=parseFloat(w.replace("%",""))/100*i),this.virtualSize=-w,s?l.css({marginLeft:"",marginTop:""}):l.css({marginRight:"",marginBottom:""}),e.slidesPerColumn>1&&(T=Math.floor(h/e.slidesPerColumn)===h/this.params.slidesPerColumn?h:Math.ceil(h/e.slidesPerColumn)*e.slidesPerColumn,"auto"!==e.slidesPerView&&"row"===e.slidesPerColumnFill&&(T=Math.max(T,e.slidesPerView*e.slidesPerColumn)));for(var C,M=e.slidesPerColumn,P=T/M,z=Math.floor(h/e.slidesPerColumn),k=0;k<h;k+=1){S=0;var $=l.eq(k);if(e.slidesPerColumn>1){var L=void 0,I=void 0,D=void 0;if("row"===e.slidesPerColumnFill&&e.slidesPerGroup>1){var O=Math.floor(k/(e.slidesPerGroup*e.slidesPerColumn)),A=k-e.slidesPerColumn*e.slidesPerGroup*O,G=0===O?e.slidesPerGroup:Math.min(Math.ceil((h-O*M*e.slidesPerGroup)/M),e.slidesPerGroup);L=(I=A-(D=Math.floor(A/G))*G+O*e.slidesPerGroup)+D*T/M,$.css({"-webkit-box-ordinal-group":L,"-moz-box-ordinal-group":L,"-ms-flex-order":L,"-webkit-order":L,order:L})}else"column"===e.slidesPerColumnFill?(D=k-(I=Math.floor(k/M))*M,(I>z||I===z&&D===M-1)&&(D+=1)>=M&&(D=0,I+=1)):I=k-(D=Math.floor(k/P))*P;$.css("margin-"+(this.isHorizontal()?"top":"left"),0!==D&&e.spaceBetween&&e.spaceBetween+"px")}if("none"!==$.css("display")){if("auto"===e.slidesPerView){var H=a.getComputedStyle($[0],null),B=$[0].style.transform,N=$[0].style.webkitTransform;if(B&&($[0].style.transform="none"),N&&($[0].style.webkitTransform="none"),e.roundLengths)S=this.isHorizontal()?$.outerWidth(!0):$.outerHeight(!0);else if(this.isHorizontal()){var X=parseFloat(H.getPropertyValue("width")),V=parseFloat(H.getPropertyValue("padding-left")),Y=parseFloat(H.getPropertyValue("padding-right")),F=parseFloat(H.getPropertyValue("margin-left")),W=parseFloat(H.getPropertyValue("margin-right")),R=H.getPropertyValue("box-sizing");S=R&&"border-box"===R?X+F+W:X+V+Y+F+W}else{var q=parseFloat(H.getPropertyValue("height")),j=parseFloat(H.getPropertyValue("padding-top")),K=parseFloat(H.getPropertyValue("padding-bottom")),U=parseFloat(H.getPropertyValue("margin-top")),_=parseFloat(H.getPropertyValue("margin-bottom")),Z=H.getPropertyValue("box-sizing");S=Z&&"border-box"===Z?q+U+_:q+j+K+U+_}B&&($[0].style.transform=B),N&&($[0].style.webkitTransform=N),e.roundLengths&&(S=Math.floor(S))}else S=(i-(e.slidesPerView-1)*w)/e.slidesPerView,e.roundLengths&&(S=Math.floor(S)),l[k]&&(this.isHorizontal()?l[k].style.width=S+"px":l[k].style.height=S+"px");l[k]&&(l[k].swiperSlideSize=S),u.push(S),e.centeredSlides?(y=y+S/2+x/2+w,0===x&&0!==k&&(y=y-i/2-w),0===k&&(y=y-i/2-w),Math.abs(y)<.001&&(y=0),e.roundLengths&&(y=Math.floor(y)),E%e.slidesPerGroup==0&&p.push(y),c.push(y)):(e.roundLengths&&(y=Math.floor(y)),(E-Math.min(this.params.slidesPerGroupSkip,E))%this.params.slidesPerGroup==0&&p.push(y),c.push(y),y=y+S+w),this.virtualSize+=S+w,x=S,E+=1}}if(this.virtualSize=Math.max(this.virtualSize,i)+m,s&&r&&("slide"===e.effect||"coverflow"===e.effect)&&t.css({width:this.virtualSize+e.spaceBetween+"px"}),e.setWrapperSize&&(this.isHorizontal()?t.css({width:this.virtualSize+e.spaceBetween+"px"}):t.css({height:this.virtualSize+e.spaceBetween+"px"})),e.slidesPerColumn>1&&(this.virtualSize=(S+e.spaceBetween)*T,this.virtualSize=Math.ceil(this.virtualSize/e.slidesPerColumn)-e.spaceBetween,this.isHorizontal()?t.css({width:this.virtualSize+e.spaceBetween+"px"}):t.css({height:this.virtualSize+e.spaceBetween+"px"}),e.centeredSlides)){C=[];for(var Q=0;Q<p.length;Q+=1){var J=p[Q];e.roundLengths&&(J=Math.floor(J)),p[Q]<this.virtualSize+p[0]&&C.push(J)}p=C}if(!e.centeredSlides){C=[];for(var ee=0;ee<p.length;ee+=1){var te=p[ee];e.roundLengths&&(te=Math.floor(te)),p[ee]<=this.virtualSize-i&&C.push(te)}p=C,Math.floor(this.virtualSize-i)-Math.floor(p[p.length-1])>1&&p.push(this.virtualSize-i)}if(0===p.length&&(p=[0]),0!==e.spaceBetween&&(this.isHorizontal()?s?l.filter(v).css({marginLeft:w+"px"}):l.filter(v).css({marginRight:w+"px"}):l.filter(v).css({marginBottom:w+"px"})),e.centeredSlides&&e.centeredSlidesBounds){var ie=0;u.forEach((function(t){ie+=t+(e.spaceBetween?e.spaceBetween:0)}));var se=(ie-=e.spaceBetween)-i;p=p.map((function(e){return e<0?-f:e>se?se+m:e}))}if(e.centerInsufficientSlides){var ae=0;if(u.forEach((function(t){ae+=t+(e.spaceBetween?e.spaceBetween:0)})),(ae-=e.spaceBetween)<i){var re=(i-ae)/2;p.forEach((function(e,t){p[t]=e-re})),c.forEach((function(e,t){c[t]=e+re}))}}d.extend(this,{slides:l,snapGrid:p,slidesGrid:c,slidesSizesGrid:u}),h!==o&&this.emit("slidesLengthChange"),p.length!==g&&(this.params.watchOverflow&&this.checkOverflow(),this.emit("snapGridLengthChange")),c.length!==b&&this.emit("slidesGridLengthChange"),(e.watchSlidesProgress||e.watchSlidesVisibility)&&this.updateSlidesOffset()}},updateAutoHeight:function(e){var t,i=[],s=0;if("number"==typeof e?this.setTransition(e):!0===e&&this.setTransition(this.params.speed),"auto"!==this.params.slidesPerView&&this.params.slidesPerView>1)if(this.params.centeredSlides)this.visibleSlides.each((function(e,t){i.push(t)}));else for(t=0;t<Math.ceil(this.params.slidesPerView);t+=1){var a=this.activeIndex+t;if(a>this.slides.length)break;i.push(this.slides.eq(a)[0])}else i.push(this.slides.eq(this.activeIndex)[0]);for(t=0;t<i.length;t+=1)if(void 0!==i[t]){var r=i[t].offsetHeight;s=r>s?r:s}s&&this.$wrapperEl.css("height",s+"px")},updateSlidesOffset:function(){for(var e=this.slides,t=0;t<e.length;t+=1)e[t].swiperSlideOffset=this.isHorizontal()?e[t].offsetLeft:e[t].offsetTop},updateSlidesProgress:function(e){void 0===e&&(e=this&&this.translate||0);var t=this.params,i=this.slides,s=this.rtlTranslate;if(0!==i.length){void 0===i[0].swiperSlideOffset&&this.updateSlidesOffset();var a=-e;s&&(a=e),i.removeClass(t.slideVisibleClass),this.visibleSlidesIndexes=[],this.visibleSlides=[];for(var r=0;r<i.length;r+=1){var o=i[r],l=(a+(t.centeredSlides?this.minTranslate():0)-o.swiperSlideOffset)/(o.swiperSlideSize+t.spaceBetween);if(t.watchSlidesVisibility||t.centeredSlides&&t.autoHeight){var d=-(a-o.swiperSlideOffset),h=d+this.slidesSizesGrid[r];(d>=0&&d<this.size-1||h>1&&h<=this.size||d<=0&&h>=this.size)&&(this.visibleSlides.push(o),this.visibleSlidesIndexes.push(r),i.eq(r).addClass(t.slideVisibleClass))}o.progress=s?-l:l}this.visibleSlides=n(this.visibleSlides)}},updateProgress:function(e){if(void 0===e){var t=this.rtlTranslate?-1:1;e=this&&this.translate&&this.translate*t||0}var i=this.params,s=this.maxTranslate()-this.minTranslate(),a=this.progress,r=this.isBeginning,n=this.isEnd,o=r,l=n;0===s?(a=0,r=!0,n=!0):(r=(a=(e-this.minTranslate())/s)<=0,n=a>=1),d.extend(this,{progress:a,isBeginning:r,isEnd:n}),(i.watchSlidesProgress||i.watchSlidesVisibility||i.centeredSlides&&i.autoHeight)&&this.updateSlidesProgress(e),r&&!o&&this.emit("reachBeginning toEdge"),n&&!l&&this.emit("reachEnd toEdge"),(o&&!r||l&&!n)&&this.emit("fromEdge"),this.emit("progress",a)},updateSlidesClasses:function(){var e,t=this.slides,i=this.params,s=this.$wrapperEl,a=this.activeIndex,r=this.realIndex,n=this.virtual&&i.virtual.enabled;t.removeClass(i.slideActiveClass+" "+i.slideNextClass+" "+i.slidePrevClass+" "+i.slideDuplicateActiveClass+" "+i.slideDuplicateNextClass+" "+i.slideDuplicatePrevClass),(e=n?this.$wrapperEl.find("."+i.slideClass+'[data-swiper-slide-index="'+a+'"]'):t.eq(a)).addClass(i.slideActiveClass),i.loop&&(e.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+r+'"]').addClass(i.slideDuplicateActiveClass));var o=e.nextAll("."+i.slideClass).eq(0).addClass(i.slideNextClass);i.loop&&0===o.length&&(o=t.eq(0)).addClass(i.slideNextClass);var l=e.prevAll("."+i.slideClass).eq(0).addClass(i.slidePrevClass);i.loop&&0===l.length&&(l=t.eq(-1)).addClass(i.slidePrevClass),i.loop&&(o.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+o.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicateNextClass),l.hasClass(i.slideDuplicateClass)?s.children("."+i.slideClass+":not(."+i.slideDuplicateClass+')[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass):s.children("."+i.slideClass+"."+i.slideDuplicateClass+'[data-swiper-slide-index="'+l.attr("data-swiper-slide-index")+'"]').addClass(i.slideDuplicatePrevClass))},updateActiveIndex:function(e){var t,i=this.rtlTranslate?this.translate:-this.translate,s=this.slidesGrid,a=this.snapGrid,r=this.params,n=this.activeIndex,o=this.realIndex,l=this.snapIndex,h=e;if(void 0===h){for(var p=0;p<s.length;p+=1)void 0!==s[p+1]?i>=s[p]&&i<s[p+1]-(s[p+1]-s[p])/2?h=p:i>=s[p]&&i<s[p+1]&&(h=p+1):i>=s[p]&&(h=p);r.normalizeSlideIndex&&(h<0||void 0===h)&&(h=0)}if(a.indexOf(i)>=0)t=a.indexOf(i);else{var c=Math.min(r.slidesPerGroupSkip,h);t=c+Math.floor((h-c)/r.slidesPerGroup)}if(t>=a.length&&(t=a.length-1),h!==n){var u=parseInt(this.slides.eq(h).attr("data-swiper-slide-index")||h,10);d.extend(this,{snapIndex:t,realIndex:u,previousIndex:n,activeIndex:h}),this.emit("activeIndexChange"),this.emit("snapIndexChange"),o!==u&&this.emit("realIndexChange"),(this.initialized||this.params.runCallbacksOnInit)&&this.emit("slideChange")}else t!==l&&(this.snapIndex=t,this.emit("snapIndexChange"))},updateClickedSlide:function(e){var t=this.params,i=n(e.target).closest("."+t.slideClass)[0],s=!1;if(i)for(var a=0;a<this.slides.length;a+=1)this.slides[a]===i&&(s=!0);if(!i||!s)return this.clickedSlide=void 0,void(this.clickedIndex=void 0);this.clickedSlide=i,this.virtual&&this.params.virtual.enabled?this.clickedIndex=parseInt(n(i).attr("data-swiper-slide-index"),10):this.clickedIndex=n(i).index(),t.slideToClickedSlide&&void 0!==this.clickedIndex&&this.clickedIndex!==this.activeIndex&&this.slideToClickedSlide()}};var v={getTranslate:function(e){void 0===e&&(e=this.isHorizontal()?"x":"y");var t=this.params,i=this.rtlTranslate,s=this.translate,a=this.$wrapperEl;if(t.virtualTranslate)return i?-s:s;if(t.cssMode)return s;var r=d.getTranslate(a[0],e);return i&&(r=-r),r||0},setTranslate:function(e,t){var i=this.rtlTranslate,s=this.params,a=this.$wrapperEl,r=this.wrapperEl,n=this.progress,o=0,l=0;this.isHorizontal()?o=i?-e:e:l=e,s.roundLengths&&(o=Math.floor(o),l=Math.floor(l)),s.cssMode?r[this.isHorizontal()?"scrollLeft":"scrollTop"]=this.isHorizontal()?-o:-l:s.virtualTranslate||a.transform("translate3d("+o+"px, "+l+"px, 0px)"),this.previousTranslate=this.translate,this.translate=this.isHorizontal()?o:l;var d=this.maxTranslate()-this.minTranslate();(0===d?0:(e-this.minTranslate())/d)!==n&&this.updateProgress(e),this.emit("setTranslate",this.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e,t,i,s,a){var r;void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0),void 0===s&&(s=!0);var n=this,o=n.params,l=n.wrapperEl;if(n.animating&&o.preventInteractionOnTransition)return!1;var d,h=n.minTranslate(),p=n.maxTranslate();if(d=s&&e>h?h:s&&e<p?p:e,n.updateProgress(d),o.cssMode){var c=n.isHorizontal();return 0===t?l[c?"scrollLeft":"scrollTop"]=-d:l.scrollTo?l.scrollTo(((r={})[c?"left":"top"]=-d,r.behavior="smooth",r)):l[c?"scrollLeft":"scrollTop"]=-d,!0}return 0===t?(n.setTransition(0),n.setTranslate(d),i&&(n.emit("beforeTransitionStart",t,a),n.emit("transitionEnd"))):(n.setTransition(t),n.setTranslate(d),i&&(n.emit("beforeTransitionStart",t,a),n.emit("transitionStart")),n.animating||(n.animating=!0,n.onTranslateToWrapperTransitionEnd||(n.onTranslateToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.$wrapperEl[0].removeEventListener("transitionend",n.onTranslateToWrapperTransitionEnd),n.$wrapperEl[0].removeEventListener("webkitTransitionEnd",n.onTranslateToWrapperTransitionEnd),n.onTranslateToWrapperTransitionEnd=null,delete n.onTranslateToWrapperTransitionEnd,i&&n.emit("transitionEnd"))}),n.$wrapperEl[0].addEventListener("transitionend",n.onTranslateToWrapperTransitionEnd),n.$wrapperEl[0].addEventListener("webkitTransitionEnd",n.onTranslateToWrapperTransitionEnd))),!0}};var f={setTransition:function(e,t){this.params.cssMode||this.$wrapperEl.transition(e),this.emit("setTransition",e,t)},transitionStart:function(e,t){void 0===e&&(e=!0);var i=this.activeIndex,s=this.params,a=this.previousIndex;if(!s.cssMode){s.autoHeight&&this.updateAutoHeight();var r=t;if(r||(r=i>a?"next":i<a?"prev":"reset"),this.emit("transitionStart"),e&&i!==a){if("reset"===r)return void this.emit("slideResetTransitionStart");this.emit("slideChangeTransitionStart"),"next"===r?this.emit("slideNextTransitionStart"):this.emit("slidePrevTransitionStart")}}},transitionEnd:function(e,t){void 0===e&&(e=!0);var i=this.activeIndex,s=this.previousIndex,a=this.params;if(this.animating=!1,!a.cssMode){this.setTransition(0);var r=t;if(r||(r=i>s?"next":i<s?"prev":"reset"),this.emit("transitionEnd"),e&&i!==s){if("reset"===r)return void this.emit("slideResetTransitionEnd");this.emit("slideChangeTransitionEnd"),"next"===r?this.emit("slideNextTransitionEnd"):this.emit("slidePrevTransitionEnd")}}}};var m={slideTo:function(e,t,i,s){var a;void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var r=this,n=e;n<0&&(n=0);var o=r.params,l=r.snapGrid,d=r.slidesGrid,h=r.previousIndex,p=r.activeIndex,c=r.rtlTranslate,u=r.wrapperEl;if(r.animating&&o.preventInteractionOnTransition)return!1;var v=Math.min(r.params.slidesPerGroupSkip,n),f=v+Math.floor((n-v)/r.params.slidesPerGroup);f>=l.length&&(f=l.length-1),(p||o.initialSlide||0)===(h||0)&&i&&r.emit("beforeSlideChangeStart");var m,g=-l[f];if(r.updateProgress(g),o.normalizeSlideIndex)for(var b=0;b<d.length;b+=1)-Math.floor(100*g)>=Math.floor(100*d[b])&&(n=b);if(r.initialized&&n!==p){if(!r.allowSlideNext&&g<r.translate&&g<r.minTranslate())return!1;if(!r.allowSlidePrev&&g>r.translate&&g>r.maxTranslate()&&(p||0)!==n)return!1}if(m=n>p?"next":n<p?"prev":"reset",c&&-g===r.translate||!c&&g===r.translate)return r.updateActiveIndex(n),o.autoHeight&&r.updateAutoHeight(),r.updateSlidesClasses(),"slide"!==o.effect&&r.setTranslate(g),"reset"!==m&&(r.transitionStart(i,m),r.transitionEnd(i,m)),!1;if(o.cssMode){var w=r.isHorizontal(),y=-g;return c&&(y=u.scrollWidth-u.offsetWidth-y),0===t?u[w?"scrollLeft":"scrollTop"]=y:u.scrollTo?u.scrollTo(((a={})[w?"left":"top"]=y,a.behavior="smooth",a)):u[w?"scrollLeft":"scrollTop"]=y,!0}return 0===t?(r.setTransition(0),r.setTranslate(g),r.updateActiveIndex(n),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,s),r.transitionStart(i,m),r.transitionEnd(i,m)):(r.setTransition(t),r.setTranslate(g),r.updateActiveIndex(n),r.updateSlidesClasses(),r.emit("beforeTransitionStart",t,s),r.transitionStart(i,m),r.animating||(r.animating=!0,r.onSlideToWrapperTransitionEnd||(r.onSlideToWrapperTransitionEnd=function(e){r&&!r.destroyed&&e.target===this&&(r.$wrapperEl[0].removeEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].removeEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd),r.onSlideToWrapperTransitionEnd=null,delete r.onSlideToWrapperTransitionEnd,r.transitionEnd(i,m))}),r.$wrapperEl[0].addEventListener("transitionend",r.onSlideToWrapperTransitionEnd),r.$wrapperEl[0].addEventListener("webkitTransitionEnd",r.onSlideToWrapperTransitionEnd))),!0},slideToLoop:function(e,t,i,s){void 0===e&&(e=0),void 0===t&&(t=this.params.speed),void 0===i&&(i=!0);var a=e;return this.params.loop&&(a+=this.loopedSlides),this.slideTo(a,t,i,s)},slideNext:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.params,a=this.animating,r=this.activeIndex<s.slidesPerGroupSkip?1:s.slidesPerGroup;if(s.loop){if(a)return!1;this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft}return this.slideTo(this.activeIndex+r,e,t,i)},slidePrev:function(e,t,i){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0);var s=this.params,a=this.animating,r=this.snapGrid,n=this.slidesGrid,o=this.rtlTranslate;if(s.loop){if(a)return!1;this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft}function l(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}var d,h=l(o?this.translate:-this.translate),p=r.map((function(e){return l(e)})),c=(n.map((function(e){return l(e)})),r[p.indexOf(h)],r[p.indexOf(h)-1]);return void 0===c&&s.cssMode&&r.forEach((function(e){!c&&h>=e&&(c=e)})),void 0!==c&&(d=n.indexOf(c))<0&&(d=this.activeIndex-1),this.slideTo(d,e,t,i)},slideReset:function(e,t,i){return void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),this.slideTo(this.activeIndex,e,t,i)},slideToClosest:function(e,t,i,s){void 0===e&&(e=this.params.speed),void 0===t&&(t=!0),void 0===s&&(s=.5);var a=this.activeIndex,r=Math.min(this.params.slidesPerGroupSkip,a),n=r+Math.floor((a-r)/this.params.slidesPerGroup),o=this.rtlTranslate?this.translate:-this.translate;if(o>=this.snapGrid[n]){var l=this.snapGrid[n];o-l>(this.snapGrid[n+1]-l)*s&&(a+=this.params.slidesPerGroup)}else{var d=this.snapGrid[n-1];o-d<=(this.snapGrid[n]-d)*s&&(a-=this.params.slidesPerGroup)}return a=Math.max(a,0),a=Math.min(a,this.slidesGrid.length-1),this.slideTo(a,e,t,i)},slideToClickedSlide:function(){var e,t=this,i=t.params,s=t.$wrapperEl,a="auto"===i.slidesPerView?t.slidesPerViewDynamic():i.slidesPerView,r=t.clickedIndex;if(i.loop){if(t.animating)return;e=parseInt(n(t.clickedSlide).attr("data-swiper-slide-index"),10),i.centeredSlides?r<t.loopedSlides-a/2||r>t.slides.length-t.loopedSlides+a/2?(t.loopFix(),r=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),d.nextTick((function(){t.slideTo(r)}))):t.slideTo(r):r>t.slides.length-a?(t.loopFix(),r=s.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]:not(.'+i.slideDuplicateClass+")").eq(0).index(),d.nextTick((function(){t.slideTo(r)}))):t.slideTo(r)}else t.slideTo(r)}};var g={loopCreate:function(){var e=this,t=e.params,s=e.$wrapperEl;s.children("."+t.slideClass+"."+t.slideDuplicateClass).remove();var a=s.children("."+t.slideClass);if(t.loopFillGroupWithBlank){var r=t.slidesPerGroup-a.length%t.slidesPerGroup;if(r!==t.slidesPerGroup){for(var o=0;o<r;o+=1){var l=n(i.createElement("div")).addClass(t.slideClass+" "+t.slideBlankClass);s.append(l)}a=s.children("."+t.slideClass)}}"auto"!==t.slidesPerView||t.loopedSlides||(t.loopedSlides=a.length),e.loopedSlides=Math.ceil(parseFloat(t.loopedSlides||t.slidesPerView,10)),e.loopedSlides+=t.loopAdditionalSlides,e.loopedSlides>a.length&&(e.loopedSlides=a.length);var d=[],h=[];a.each((function(t,i){var s=n(i);t<e.loopedSlides&&h.push(i),t<a.length&&t>=a.length-e.loopedSlides&&d.push(i),s.attr("data-swiper-slide-index",t)}));for(var p=0;p<h.length;p+=1)s.append(n(h[p].cloneNode(!0)).addClass(t.slideDuplicateClass));for(var c=d.length-1;c>=0;c-=1)s.prepend(n(d[c].cloneNode(!0)).addClass(t.slideDuplicateClass))},loopFix:function(){this.emit("beforeLoopFix");var e,t=this.activeIndex,i=this.slides,s=this.loopedSlides,a=this.allowSlidePrev,r=this.allowSlideNext,n=this.snapGrid,o=this.rtlTranslate;this.allowSlidePrev=!0,this.allowSlideNext=!0;var l=-n[t]-this.getTranslate();if(t<s)e=i.length-3*s+t,e+=s,this.slideTo(e,0,!1,!0)&&0!==l&&this.setTranslate((o?-this.translate:this.translate)-l);else if(t>=i.length-s){e=-i.length+t+s,e+=s,this.slideTo(e,0,!1,!0)&&0!==l&&this.setTranslate((o?-this.translate:this.translate)-l)}this.allowSlidePrev=a,this.allowSlideNext=r,this.emit("loopFix")},loopDestroy:function(){var e=this.$wrapperEl,t=this.params,i=this.slides;e.children("."+t.slideClass+"."+t.slideDuplicateClass+",."+t.slideClass+"."+t.slideBlankClass).remove(),i.removeAttr("data-swiper-slide-index")}};var b={setGrabCursor:function(e){if(!(h.touch||!this.params.simulateTouch||this.params.watchOverflow&&this.isLocked||this.params.cssMode)){var t=this.el;t.style.cursor="move",t.style.cursor=e?"-webkit-grabbing":"-webkit-grab",t.style.cursor=e?"-moz-grabbin":"-moz-grab",t.style.cursor=e?"grabbing":"grab"}},unsetGrabCursor:function(){h.touch||this.params.watchOverflow&&this.isLocked||this.params.cssMode||(this.el.style.cursor="")}};var w,y,x,E,T,S,C,M,P,z,k,$,L,I,D,O={appendSlide:function(e){var t=this.$wrapperEl,i=this.params;if(i.loop&&this.loopDestroy(),"object"==typeof e&&"length"in e)for(var s=0;s<e.length;s+=1)e[s]&&t.append(e[s]);else t.append(e);i.loop&&this.loopCreate(),i.observer&&h.observer||this.update()},prependSlide:function(e){var t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&this.loopDestroy();var a=s+1;if("object"==typeof e&&"length"in e){for(var r=0;r<e.length;r+=1)e[r]&&i.prepend(e[r]);a=s+e.length}else i.prepend(e);t.loop&&this.loopCreate(),t.observer&&h.observer||this.update(),this.slideTo(a,0,!1)},addSlide:function(e,t){var i=this.$wrapperEl,s=this.params,a=this.activeIndex;s.loop&&(a-=this.loopedSlides,this.loopDestroy(),this.slides=i.children("."+s.slideClass));var r=this.slides.length;if(e<=0)this.prependSlide(t);else if(e>=r)this.appendSlide(t);else{for(var n=a>e?a+1:a,o=[],l=r-1;l>=e;l-=1){var d=this.slides.eq(l);d.remove(),o.unshift(d)}if("object"==typeof t&&"length"in t){for(var p=0;p<t.length;p+=1)t[p]&&i.append(t[p]);n=a>e?a+t.length:a}else i.append(t);for(var c=0;c<o.length;c+=1)i.append(o[c]);s.loop&&this.loopCreate(),s.observer&&h.observer||this.update(),s.loop?this.slideTo(n+this.loopedSlides,0,!1):this.slideTo(n,0,!1)}},removeSlide:function(e){var t=this.params,i=this.$wrapperEl,s=this.activeIndex;t.loop&&(s-=this.loopedSlides,this.loopDestroy(),this.slides=i.children("."+t.slideClass));var a,r=s;if("object"==typeof e&&"length"in e){for(var n=0;n<e.length;n+=1)a=e[n],this.slides[a]&&this.slides.eq(a).remove(),a<r&&(r-=1);r=Math.max(r,0)}else a=e,this.slides[a]&&this.slides.eq(a).remove(),a<r&&(r-=1),r=Math.max(r,0);t.loop&&this.loopCreate(),t.observer&&h.observer||this.update(),t.loop?this.slideTo(r+this.loopedSlides,0,!1):this.slideTo(r,0,!1)},removeAllSlides:function(){for(var e=[],t=0;t<this.slides.length;t+=1)e.push(t);this.removeSlide(e)}},A=(w=a.navigator.platform,y=a.navigator.userAgent,x={ios:!1,android:!1,androidChrome:!1,desktop:!1,iphone:!1,ipod:!1,ipad:!1,edge:!1,ie:!1,firefox:!1,macos:!1,windows:!1,cordova:!(!a.cordova&&!a.phonegap),phonegap:!(!a.cordova&&!a.phonegap),electron:!1},E=a.screen.width,T=a.screen.height,S=y.match(/(Android);?[\s\/]+([\d.]+)?/),C=y.match(/(iPad).*OS\s([\d_]+)/),M=y.match(/(iPod)(.*OS\s([\d_]+))?/),P=!C&&y.match(/(iPhone\sOS|iOS)\s([\d_]+)/),z=y.indexOf("MSIE ")>=0||y.indexOf("Trident/")>=0,k=y.indexOf("Edge/")>=0,$=y.indexOf("Gecko/")>=0&&y.indexOf("Firefox/")>=0,L="Win32"===w,I=y.toLowerCase().indexOf("electron")>=0,D="MacIntel"===w,!C&&D&&h.touch&&(1024===E&&1366===T||834===E&&1194===T||834===E&&1112===T||768===E&&1024===T)&&(C=y.match(/(Version)\/([\d.]+)/),D=!1),x.ie=z,x.edge=k,x.firefox=$,S&&!L&&(x.os="android",x.osVersion=S[2],x.android=!0,x.androidChrome=y.toLowerCase().indexOf("chrome")>=0),(C||P||M)&&(x.os="ios",x.ios=!0),P&&!M&&(x.osVersion=P[2].replace(/_/g,"."),x.iphone=!0),C&&(x.osVersion=C[2].replace(/_/g,"."),x.ipad=!0),M&&(x.osVersion=M[3]?M[3].replace(/_/g,"."):null,x.ipod=!0),x.ios&&x.osVersion&&y.indexOf("Version/")>=0&&"10"===x.osVersion.split(".")[0]&&(x.osVersion=y.toLowerCase().split("version/")[1].split(" ")[0]),x.webView=!(!(P||C||M)||!y.match(/.*AppleWebKit(?!.*Safari)/i)&&!a.navigator.standalone)||a.matchMedia&&a.matchMedia("(display-mode: standalone)").matches,x.webview=x.webView,x.standalone=x.webView,x.desktop=!(x.ios||x.android)||I,x.desktop&&(x.electron=I,x.macos=D,x.windows=L,x.macos&&(x.os="macos"),x.windows&&(x.os="windows")),x.pixelRatio=a.devicePixelRatio||1,x);function G(e){var t=this.touchEventsData,s=this.params,r=this.touches;if(!this.animating||!s.preventInteractionOnTransition){var o=e;o.originalEvent&&(o=o.originalEvent);var l=n(o.target);if(("wrapper"!==s.touchEventsTarget||l.closest(this.wrapperEl).length)&&(t.isTouchEvent="touchstart"===o.type,(t.isTouchEvent||!("which"in o)||3!==o.which)&&!(!t.isTouchEvent&&"button"in o&&o.button>0||t.isTouched&&t.isMoved)))if(s.noSwiping&&l.closest(s.noSwipingSelector?s.noSwipingSelector:"."+s.noSwipingClass)[0])this.allowClick=!0;else if(!s.swipeHandler||l.closest(s.swipeHandler)[0]){r.currentX="touchstart"===o.type?o.targetTouches[0].pageX:o.pageX,r.currentY="touchstart"===o.type?o.targetTouches[0].pageY:o.pageY;var h=r.currentX,p=r.currentY,c=s.edgeSwipeDetection||s.iOSEdgeSwipeDetection,u=s.edgeSwipeThreshold||s.iOSEdgeSwipeThreshold;if(!c||!(h<=u||h>=a.screen.width-u)){if(d.extend(t,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),r.startX=h,r.startY=p,t.touchStartTime=d.now(),this.allowClick=!0,this.updateSize(),this.swipeDirection=void 0,s.threshold>0&&(t.allowThresholdMove=!1),"touchstart"!==o.type){var v=!0;l.is(t.formElements)&&(v=!1),i.activeElement&&n(i.activeElement).is(t.formElements)&&i.activeElement!==l[0]&&i.activeElement.blur();var f=v&&this.allowTouchMove&&s.touchStartPreventDefault;(s.touchStartForcePreventDefault||f)&&o.preventDefault()}this.emit("touchStart",o)}}}}function H(e){var t=this.touchEventsData,s=this.params,a=this.touches,r=this.rtlTranslate,o=e;if(o.originalEvent&&(o=o.originalEvent),t.isTouched){if(!t.isTouchEvent||"touchmove"===o.type){var l="touchmove"===o.type&&o.targetTouches&&(o.targetTouches[0]||o.changedTouches[0]),h="touchmove"===o.type?l.pageX:o.pageX,p="touchmove"===o.type?l.pageY:o.pageY;if(o.preventedByNestedSwiper)return a.startX=h,void(a.startY=p);if(!this.allowTouchMove)return this.allowClick=!1,void(t.isTouched&&(d.extend(a,{startX:h,startY:p,currentX:h,currentY:p}),t.touchStartTime=d.now()));if(t.isTouchEvent&&s.touchReleaseOnEdges&&!s.loop)if(this.isVertical()){if(p<a.startY&&this.translate<=this.maxTranslate()||p>a.startY&&this.translate>=this.minTranslate())return t.isTouched=!1,void(t.isMoved=!1)}else if(h<a.startX&&this.translate<=this.maxTranslate()||h>a.startX&&this.translate>=this.minTranslate())return;if(t.isTouchEvent&&i.activeElement&&o.target===i.activeElement&&n(o.target).is(t.formElements))return t.isMoved=!0,void(this.allowClick=!1);if(t.allowTouchCallbacks&&this.emit("touchMove",o),!(o.targetTouches&&o.targetTouches.length>1)){a.currentX=h,a.currentY=p;var c=a.currentX-a.startX,u=a.currentY-a.startY;if(!(this.params.threshold&&Math.sqrt(Math.pow(c,2)+Math.pow(u,2))<this.params.threshold)){var v;if(void 0===t.isScrolling)this.isHorizontal()&&a.currentY===a.startY||this.isVertical()&&a.currentX===a.startX?t.isScrolling=!1:c*c+u*u>=25&&(v=180*Math.atan2(Math.abs(u),Math.abs(c))/Math.PI,t.isScrolling=this.isHorizontal()?v>s.touchAngle:90-v>s.touchAngle);if(t.isScrolling&&this.emit("touchMoveOpposite",o),void 0===t.startMoving&&(a.currentX===a.startX&&a.currentY===a.startY||(t.startMoving=!0)),t.isScrolling)t.isTouched=!1;else if(t.startMoving){this.allowClick=!1,!s.cssMode&&o.cancelable&&o.preventDefault(),s.touchMoveStopPropagation&&!s.nested&&o.stopPropagation(),t.isMoved||(s.loop&&this.loopFix(),t.startTranslate=this.getTranslate(),this.setTransition(0),this.animating&&this.$wrapperEl.trigger("webkitTransitionEnd transitionend"),t.allowMomentumBounce=!1,!s.grabCursor||!0!==this.allowSlideNext&&!0!==this.allowSlidePrev||this.setGrabCursor(!0),this.emit("sliderFirstMove",o)),this.emit("sliderMove",o),t.isMoved=!0;var f=this.isHorizontal()?c:u;a.diff=f,f*=s.touchRatio,r&&(f=-f),this.swipeDirection=f>0?"prev":"next",t.currentTranslate=f+t.startTranslate;var m=!0,g=s.resistanceRatio;if(s.touchReleaseOnEdges&&(g=0),f>0&&t.currentTranslate>this.minTranslate()?(m=!1,s.resistance&&(t.currentTranslate=this.minTranslate()-1+Math.pow(-this.minTranslate()+t.startTranslate+f,g))):f<0&&t.currentTranslate<this.maxTranslate()&&(m=!1,s.resistance&&(t.currentTranslate=this.maxTranslate()+1-Math.pow(this.maxTranslate()-t.startTranslate-f,g))),m&&(o.preventedByNestedSwiper=!0),!this.allowSlideNext&&"next"===this.swipeDirection&&t.currentTranslate<t.startTranslate&&(t.currentTranslate=t.startTranslate),!this.allowSlidePrev&&"prev"===this.swipeDirection&&t.currentTranslate>t.startTranslate&&(t.currentTranslate=t.startTranslate),s.threshold>0){if(!(Math.abs(f)>s.threshold||t.allowThresholdMove))return void(t.currentTranslate=t.startTranslate);if(!t.allowThresholdMove)return t.allowThresholdMove=!0,a.startX=a.currentX,a.startY=a.currentY,t.currentTranslate=t.startTranslate,void(a.diff=this.isHorizontal()?a.currentX-a.startX:a.currentY-a.startY)}s.followFinger&&!s.cssMode&&((s.freeMode||s.watchSlidesProgress||s.watchSlidesVisibility)&&(this.updateActiveIndex(),this.updateSlidesClasses()),s.freeMode&&(0===t.velocities.length&&t.velocities.push({position:a[this.isHorizontal()?"startX":"startY"],time:t.touchStartTime}),t.velocities.push({position:a[this.isHorizontal()?"currentX":"currentY"],time:d.now()})),this.updateProgress(t.currentTranslate),this.setTranslate(t.currentTranslate))}}}}}else t.startMoving&&t.isScrolling&&this.emit("touchMoveOpposite",o)}function B(e){var t=this,i=t.touchEventsData,s=t.params,a=t.touches,r=t.rtlTranslate,n=t.$wrapperEl,o=t.slidesGrid,l=t.snapGrid,h=e;if(h.originalEvent&&(h=h.originalEvent),i.allowTouchCallbacks&&t.emit("touchEnd",h),i.allowTouchCallbacks=!1,!i.isTouched)return i.isMoved&&s.grabCursor&&t.setGrabCursor(!1),i.isMoved=!1,void(i.startMoving=!1);s.grabCursor&&i.isMoved&&i.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);var p,c=d.now(),u=c-i.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(h),t.emit("tap click",h),u<300&&c-i.lastClickTime<300&&t.emit("doubleTap doubleClick",h)),i.lastClickTime=d.now(),d.nextTick((function(){t.destroyed||(t.allowClick=!0)})),!i.isTouched||!i.isMoved||!t.swipeDirection||0===a.diff||i.currentTranslate===i.startTranslate)return i.isTouched=!1,i.isMoved=!1,void(i.startMoving=!1);if(i.isTouched=!1,i.isMoved=!1,i.startMoving=!1,p=s.followFinger?r?t.translate:-t.translate:-i.currentTranslate,!s.cssMode)if(s.freeMode){if(p<-t.minTranslate())return void t.slideTo(t.activeIndex);if(p>-t.maxTranslate())return void(t.slides.length<l.length?t.slideTo(l.length-1):t.slideTo(t.slides.length-1));if(s.freeModeMomentum){if(i.velocities.length>1){var v=i.velocities.pop(),f=i.velocities.pop(),m=v.position-f.position,g=v.time-f.time;t.velocity=m/g,t.velocity/=2,Math.abs(t.velocity)<s.freeModeMinimumVelocity&&(t.velocity=0),(g>150||d.now()-v.time>300)&&(t.velocity=0)}else t.velocity=0;t.velocity*=s.freeModeMomentumVelocityRatio,i.velocities.length=0;var b=1e3*s.freeModeMomentumRatio,w=t.velocity*b,y=t.translate+w;r&&(y=-y);var x,E,T=!1,S=20*Math.abs(t.velocity)*s.freeModeMomentumBounceRatio;if(y<t.maxTranslate())s.freeModeMomentumBounce?(y+t.maxTranslate()<-S&&(y=t.maxTranslate()-S),x=t.maxTranslate(),T=!0,i.allowMomentumBounce=!0):y=t.maxTranslate(),s.loop&&s.centeredSlides&&(E=!0);else if(y>t.minTranslate())s.freeModeMomentumBounce?(y-t.minTranslate()>S&&(y=t.minTranslate()+S),x=t.minTranslate(),T=!0,i.allowMomentumBounce=!0):y=t.minTranslate(),s.loop&&s.centeredSlides&&(E=!0);else if(s.freeModeSticky){for(var C,M=0;M<l.length;M+=1)if(l[M]>-y){C=M;break}y=-(y=Math.abs(l[C]-y)<Math.abs(l[C-1]-y)||"next"===t.swipeDirection?l[C]:l[C-1])}if(E&&t.once("transitionEnd",(function(){t.loopFix()})),0!==t.velocity){if(b=r?Math.abs((-y-t.translate)/t.velocity):Math.abs((y-t.translate)/t.velocity),s.freeModeSticky){var P=Math.abs((r?-y:y)-t.translate),z=t.slidesSizesGrid[t.activeIndex];b=P<z?s.speed:P<2*z?1.5*s.speed:2.5*s.speed}}else if(s.freeModeSticky)return void t.slideToClosest();s.freeModeMomentumBounce&&T?(t.updateProgress(x),t.setTransition(b),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating=!0,n.transitionEnd((function(){t&&!t.destroyed&&i.allowMomentumBounce&&(t.emit("momentumBounce"),t.setTransition(s.speed),setTimeout((function(){t.setTranslate(x),n.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()}))}),0))}))):t.velocity?(t.updateProgress(y),t.setTransition(b),t.setTranslate(y),t.transitionStart(!0,t.swipeDirection),t.animating||(t.animating=!0,n.transitionEnd((function(){t&&!t.destroyed&&t.transitionEnd()})))):t.updateProgress(y),t.updateActiveIndex(),t.updateSlidesClasses()}else if(s.freeModeSticky)return void t.slideToClosest();(!s.freeModeMomentum||u>=s.longSwipesMs)&&(t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses())}else{for(var k=0,$=t.slidesSizesGrid[0],L=0;L<o.length;L+=L<s.slidesPerGroupSkip?1:s.slidesPerGroup){var I=L<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;void 0!==o[L+I]?p>=o[L]&&p<o[L+I]&&(k=L,$=o[L+I]-o[L]):p>=o[L]&&(k=L,$=o[o.length-1]-o[o.length-2])}var D=(p-o[k])/$,O=k<s.slidesPerGroupSkip-1?1:s.slidesPerGroup;if(u>s.longSwipesMs){if(!s.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(D>=s.longSwipesRatio?t.slideTo(k+O):t.slideTo(k)),"prev"===t.swipeDirection&&(D>1-s.longSwipesRatio?t.slideTo(k+O):t.slideTo(k))}else{if(!s.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(h.target===t.navigation.nextEl||h.target===t.navigation.prevEl)?h.target===t.navigation.nextEl?t.slideTo(k+O):t.slideTo(k):("next"===t.swipeDirection&&t.slideTo(k+O),"prev"===t.swipeDirection&&t.slideTo(k))}}}function N(){var e=this.params,t=this.el;if(!t||0!==t.offsetWidth){e.breakpoints&&this.setBreakpoint();var i=this.allowSlideNext,s=this.allowSlidePrev,a=this.snapGrid;this.allowSlideNext=!0,this.allowSlidePrev=!0,this.updateSize(),this.updateSlides(),this.updateSlidesClasses(),("auto"===e.slidesPerView||e.slidesPerView>1)&&this.isEnd&&!this.isBeginning&&!this.params.centeredSlides?this.slideTo(this.slides.length-1,0,!1,!0):this.slideTo(this.activeIndex,0,!1,!0),this.autoplay&&this.autoplay.running&&this.autoplay.paused&&this.autoplay.run(),this.allowSlidePrev=s,this.allowSlideNext=i,this.params.watchOverflow&&a!==this.snapGrid&&this.checkOverflow()}}function X(e){this.allowClick||(this.params.preventClicks&&e.preventDefault(),this.params.preventClicksPropagation&&this.animating&&(e.stopPropagation(),e.stopImmediatePropagation()))}function V(){var e=this.wrapperEl,t=this.rtlTranslate;this.previousTranslate=this.translate,this.isHorizontal()?this.translate=t?e.scrollWidth-e.offsetWidth-e.scrollLeft:-e.scrollLeft:this.translate=-e.scrollTop,-0===this.translate&&(this.translate=0),this.updateActiveIndex(),this.updateSlidesClasses();var i=this.maxTranslate()-this.minTranslate();(0===i?0:(this.translate-this.minTranslate())/i)!==this.progress&&this.updateProgress(t?-this.translate:this.translate),this.emit("setTranslate",this.translate,!1)}var Y=!1;function F(){}var W={init:!0,direction:"horizontal",touchEventsTarget:"container",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,preventInteractionOnTransition:!1,edgeSwipeDetection:!1,edgeSwipeThreshold:20,freeMode:!1,freeModeMomentum:!0,freeModeMomentumRatio:1,freeModeMomentumBounce:!0,freeModeMomentumBounceRatio:1,freeModeMomentumVelocityRatio:1,freeModeSticky:!1,freeModeMinimumVelocity:.02,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,spaceBetween:0,slidesPerView:1,slidesPerColumn:1,slidesPerColumnFill:"column",slidesPerGroup:1,slidesPerGroupSkip:0,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!1,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,watchSlidesVisibility:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-container-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0},R={update:u,translate:v,transition:f,slide:m,loop:g,grabCursor:b,manipulation:O,events:{attachEvents:function(){var e=this.params,t=this.touchEvents,s=this.el,a=this.wrapperEl;this.onTouchStart=G.bind(this),this.onTouchMove=H.bind(this),this.onTouchEnd=B.bind(this),e.cssMode&&(this.onScroll=V.bind(this)),this.onClick=X.bind(this);var r=!!e.nested;if(!h.touch&&h.pointerEvents)s.addEventListener(t.start,this.onTouchStart,!1),i.addEventListener(t.move,this.onTouchMove,r),i.addEventListener(t.end,this.onTouchEnd,!1);else{if(h.touch){var n=!("touchstart"!==t.start||!h.passiveListener||!e.passiveListeners)&&{passive:!0,capture:!1};s.addEventListener(t.start,this.onTouchStart,n),s.addEventListener(t.move,this.onTouchMove,h.passiveListener?{passive:!1,capture:r}:r),s.addEventListener(t.end,this.onTouchEnd,n),t.cancel&&s.addEventListener(t.cancel,this.onTouchEnd,n),Y||(i.addEventListener("touchstart",F),Y=!0)}(e.simulateTouch&&!A.ios&&!A.android||e.simulateTouch&&!h.touch&&A.ios)&&(s.addEventListener("mousedown",this.onTouchStart,!1),i.addEventListener("mousemove",this.onTouchMove,r),i.addEventListener("mouseup",this.onTouchEnd,!1))}(e.preventClicks||e.preventClicksPropagation)&&s.addEventListener("click",this.onClick,!0),e.cssMode&&a.addEventListener("scroll",this.onScroll),e.updateOnWindowResize?this.on(A.ios||A.android?"resize orientationchange observerUpdate":"resize observerUpdate",N,!0):this.on("observerUpdate",N,!0)},detachEvents:function(){var e=this.params,t=this.touchEvents,s=this.el,a=this.wrapperEl,r=!!e.nested;if(!h.touch&&h.pointerEvents)s.removeEventListener(t.start,this.onTouchStart,!1),i.removeEventListener(t.move,this.onTouchMove,r),i.removeEventListener(t.end,this.onTouchEnd,!1);else{if(h.touch){var n=!("onTouchStart"!==t.start||!h.passiveListener||!e.passiveListeners)&&{passive:!0,capture:!1};s.removeEventListener(t.start,this.onTouchStart,n),s.removeEventListener(t.move,this.onTouchMove,r),s.removeEventListener(t.end,this.onTouchEnd,n),t.cancel&&s.removeEventListener(t.cancel,this.onTouchEnd,n)}(e.simulateTouch&&!A.ios&&!A.android||e.simulateTouch&&!h.touch&&A.ios)&&(s.removeEventListener("mousedown",this.onTouchStart,!1),i.removeEventListener("mousemove",this.onTouchMove,r),i.removeEventListener("mouseup",this.onTouchEnd,!1))}(e.preventClicks||e.preventClicksPropagation)&&s.removeEventListener("click",this.onClick,!0),e.cssMode&&a.removeEventListener("scroll",this.onScroll),this.off(A.ios||A.android?"resize orientationchange observerUpdate":"resize observerUpdate",N)}},breakpoints:{setBreakpoint:function(){var e=this.activeIndex,t=this.initialized,i=this.loopedSlides;void 0===i&&(i=0);var s=this.params,a=this.$el,r=s.breakpoints;if(r&&(!r||0!==Object.keys(r).length)){var n=this.getBreakpoint(r);if(n&&this.currentBreakpoint!==n){var o=n in r?r[n]:void 0;o&&["slidesPerView","spaceBetween","slidesPerGroup","slidesPerGroupSkip","slidesPerColumn"].forEach((function(e){var t=o[e];void 0!==t&&(o[e]="slidesPerView"!==e||"AUTO"!==t&&"auto"!==t?"slidesPerView"===e?parseFloat(t):parseInt(t,10):"auto")}));var l=o||this.originalParams,h=s.slidesPerColumn>1,p=l.slidesPerColumn>1;h&&!p?a.removeClass(s.containerModifierClass+"multirow "+s.containerModifierClass+"multirow-column"):!h&&p&&(a.addClass(s.containerModifierClass+"multirow"),"column"===l.slidesPerColumnFill&&a.addClass(s.containerModifierClass+"multirow-column"));var c=l.direction&&l.direction!==s.direction,u=s.loop&&(l.slidesPerView!==s.slidesPerView||c);c&&t&&this.changeDirection(),d.extend(this.params,l),d.extend(this,{allowTouchMove:this.params.allowTouchMove,allowSlideNext:this.params.allowSlideNext,allowSlidePrev:this.params.allowSlidePrev}),this.currentBreakpoint=n,u&&t&&(this.loopDestroy(),this.loopCreate(),this.updateSlides(),this.slideTo(e-i+this.loopedSlides,0,!1)),this.emit("breakpoint",l)}}},getBreakpoint:function(e){if(e){var t=!1,i=Object.keys(e).map((function(e){if("string"==typeof e&&0===e.indexOf("@")){var t=parseFloat(e.substr(1));return{value:a.innerHeight*t,point:e}}return{value:e,point:e}}));i.sort((function(e,t){return parseInt(e.value,10)-parseInt(t.value,10)}));for(var s=0;s<i.length;s+=1){var r=i[s],n=r.point;r.value<=a.innerWidth&&(t=n)}return t||"max"}}},checkOverflow:{checkOverflow:function(){var e=this.params,t=this.isLocked,i=this.slides.length>0&&e.slidesOffsetBefore+e.spaceBetween*(this.slides.length-1)+this.slides[0].offsetWidth*this.slides.length;e.slidesOffsetBefore&&e.slidesOffsetAfter&&i?this.isLocked=i<=this.size:this.isLocked=1===this.snapGrid.length,this.allowSlideNext=!this.isLocked,this.allowSlidePrev=!this.isLocked,t!==this.isLocked&&this.emit(this.isLocked?"lock":"unlock"),t&&t!==this.isLocked&&(this.isEnd=!1,this.navigation&&this.navigation.update())}},classes:{addClasses:function(){var e=this.classNames,t=this.params,i=this.rtl,s=this.$el,a=[];a.push("initialized"),a.push(t.direction),t.freeMode&&a.push("free-mode"),t.autoHeight&&a.push("autoheight"),i&&a.push("rtl"),t.slidesPerColumn>1&&(a.push("multirow"),"column"===t.slidesPerColumnFill&&a.push("multirow-column")),A.android&&a.push("android"),A.ios&&a.push("ios"),t.cssMode&&a.push("css-mode"),a.forEach((function(i){e.push(t.containerModifierClass+i)})),s.addClass(e.join(" "))},removeClasses:function(){var e=this.$el,t=this.classNames;e.removeClass(t.join(" "))}},images:{loadImage:function(e,t,i,s,r,o){var l;function d(){o&&o()}n(e).parent("picture")[0]||e.complete&&r?d():t?((l=new a.Image).onload=d,l.onerror=d,s&&(l.sizes=s),i&&(l.srcset=i),t&&(l.src=t)):d()},preloadImages:function(){var e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(var i=0;i<e.imagesToLoad.length;i+=1){var s=e.imagesToLoad[i];e.loadImage(s,s.currentSrc||s.getAttribute("src"),s.srcset||s.getAttribute("srcset"),s.sizes||s.getAttribute("sizes"),!0,t)}}}},q={},j=function(e){function t(){for(var i,s,a,r=[],o=arguments.length;o--;)r[o]=arguments[o];1===r.length&&r[0].constructor&&r[0].constructor===Object?a=r[0]:(s=(i=r)[0],a=i[1]),a||(a={}),a=d.extend({},a),s&&!a.el&&(a.el=s),e.call(this,a),Object.keys(R).forEach((function(e){Object.keys(R[e]).forEach((function(i){t.prototype[i]||(t.prototype[i]=R[e][i])}))}));var l=this;void 0===l.modules&&(l.modules={}),Object.keys(l.modules).forEach((function(e){var t=l.modules[e];if(t.params){var i=Object.keys(t.params)[0],s=t.params[i];if("object"!=typeof s||null===s)return;if(!(i in a)||!("enabled"in s))return;!0===a[i]&&(a[i]={enabled:!0}),"object"!=typeof a[i]||"enabled"in a[i]||(a[i].enabled=!0),a[i]||(a[i]={enabled:!1})}}));var p=d.extend({},W);l.useModulesParams(p),l.params=d.extend({},p,q,a),l.originalParams=d.extend({},l.params),l.passedParams=d.extend({},a),l.$=n;var c=n(l.params.el);if(s=c[0]){if(c.length>1){var u=[];return c.each((function(e,i){var s=d.extend({},a,{el:i});u.push(new t(s))})),u}var v,f,m;return s.swiper=l,c.data("swiper",l),s&&s.shadowRoot&&s.shadowRoot.querySelector?(v=n(s.shadowRoot.querySelector("."+l.params.wrapperClass))).children=function(e){return c.children(e)}:v=c.children("."+l.params.wrapperClass),d.extend(l,{$el:c,el:s,$wrapperEl:v,wrapperEl:v[0],classNames:[],slides:n(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:function(){return"horizontal"===l.params.direction},isVertical:function(){return"vertical"===l.params.direction},rtl:"rtl"===s.dir.toLowerCase()||"rtl"===c.css("direction"),rtlTranslate:"horizontal"===l.params.direction&&("rtl"===s.dir.toLowerCase()||"rtl"===c.css("direction")),wrongRTL:"-webkit-box"===v.css("display"),activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:l.params.allowSlideNext,allowSlidePrev:l.params.allowSlidePrev,touchEvents:(f=["touchstart","touchmove","touchend","touchcancel"],m=["mousedown","mousemove","mouseup"],h.pointerEvents&&(m=["pointerdown","pointermove","pointerup"]),l.touchEventsTouch={start:f[0],move:f[1],end:f[2],cancel:f[3]},l.touchEventsDesktop={start:m[0],move:m[1],end:m[2]},h.touch||!l.params.simulateTouch?l.touchEventsTouch:l.touchEventsDesktop),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,formElements:"input, select, option, textarea, button, video, label",lastClickTime:d.now(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:l.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),l.useModules(),l.params.init&&l.init(),l}}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var i={extendedDefaults:{configurable:!0},defaults:{configurable:!0},Class:{configurable:!0},$:{configurable:!0}};return t.prototype.slidesPerViewDynamic=function(){var e=this.params,t=this.slides,i=this.slidesGrid,s=this.size,a=this.activeIndex,r=1;if(e.centeredSlides){for(var n,o=t[a].swiperSlideSize,l=a+1;l<t.length;l+=1)t[l]&&!n&&(r+=1,(o+=t[l].swiperSlideSize)>s&&(n=!0));for(var d=a-1;d>=0;d-=1)t[d]&&!n&&(r+=1,(o+=t[d].swiperSlideSize)>s&&(n=!0))}else for(var h=a+1;h<t.length;h+=1)i[h]-i[a]<s&&(r+=1);return r},t.prototype.update=function(){var e=this;if(e&&!e.destroyed){var t=e.snapGrid,i=e.params;i.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode?(s(),e.params.autoHeight&&e.updateAutoHeight()):(("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0))||s(),i.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}function s(){var t=e.rtlTranslate?-1*e.translate:e.translate,i=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(i),e.updateActiveIndex(),e.updateSlidesClasses()}},t.prototype.changeDirection=function(e,t){void 0===t&&(t=!0);var i=this.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(this.$el.removeClass(""+this.params.containerModifierClass+i).addClass(""+this.params.containerModifierClass+e),this.params.direction=e,this.slides.each((function(t,i){"vertical"===e?i.style.width="":i.style.height=""})),this.emit("changeDirection"),t&&this.update()),this},t.prototype.init=function(){this.initialized||(this.emit("beforeInit"),this.params.breakpoints&&this.setBreakpoint(),this.addClasses(),this.params.loop&&this.loopCreate(),this.updateSize(),this.updateSlides(),this.params.watchOverflow&&this.checkOverflow(),this.params.grabCursor&&this.setGrabCursor(),this.params.preloadImages&&this.preloadImages(),this.params.loop?this.slideTo(this.params.initialSlide+this.loopedSlides,0,this.params.runCallbacksOnInit):this.slideTo(this.params.initialSlide,0,this.params.runCallbacksOnInit),this.attachEvents(),this.initialized=!0,this.emit("init"))},t.prototype.destroy=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0);var i=this,s=i.params,a=i.$el,r=i.$wrapperEl,n=i.slides;return void 0===i.params||i.destroyed||(i.emit("beforeDestroy"),i.initialized=!1,i.detachEvents(),s.loop&&i.loopDestroy(),t&&(i.removeClasses(),a.removeAttr("style"),r.removeAttr("style"),n&&n.length&&n.removeClass([s.slideVisibleClass,s.slideActiveClass,s.slideNextClass,s.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),i.emit("destroy"),Object.keys(i.eventsListeners).forEach((function(e){i.off(e)})),!1!==e&&(i.$el[0].swiper=null,i.$el.data("swiper",null),d.deleteProps(i)),i.destroyed=!0),null},t.extendDefaults=function(e){d.extend(q,e)},i.extendedDefaults.get=function(){return q},i.defaults.get=function(){return W},i.Class.get=function(){return e},i.$.get=function(){return n},Object.defineProperties(t,i),t}(p),K={name:"device",proto:{device:A},static:{device:A}},U={name:"support",proto:{support:h},static:{support:h}},_={isEdge:!!a.navigator.userAgent.match(/Edge/g),isSafari:function(){var e=a.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(a.navigator.userAgent)},Z={name:"browser",proto:{browser:_},static:{browser:_}},Q={name:"resize",create:function(){var e=this;d.extend(e,{resize:{resizeHandler:function(){e&&!e.destroyed&&e.initialized&&(e.emit("beforeResize"),e.emit("resize"))},orientationChangeHandler:function(){e&&!e.destroyed&&e.initialized&&e.emit("orientationchange")}}})},on:{init:function(){a.addEventListener("resize",this.resize.resizeHandler),a.addEventListener("orientationchange",this.resize.orientationChangeHandler)},destroy:function(){a.removeEventListener("resize",this.resize.resizeHandler),a.removeEventListener("orientationchange",this.resize.orientationChangeHandler)}}},J={func:a.MutationObserver||a.WebkitMutationObserver,attach:function(e,t){void 0===t&&(t={});var i=this,s=new(0,J.func)((function(e){if(1!==e.length){var t=function(){i.emit("observerUpdate",e[0])};a.requestAnimationFrame?a.requestAnimationFrame(t):a.setTimeout(t,0)}else i.emit("observerUpdate",e[0])}));s.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),i.observer.observers.push(s)},init:function(){if(h.observer&&this.params.observer){if(this.params.observeParents)for(var e=this.$el.parents(),t=0;t<e.length;t+=1)this.observer.attach(e[t]);this.observer.attach(this.$el[0],{childList:this.params.observeSlideChildren}),this.observer.attach(this.$wrapperEl[0],{attributes:!1})}},destroy:function(){this.observer.observers.forEach((function(e){e.disconnect()})),this.observer.observers=[]}},ee={name:"observer",params:{observer:!1,observeParents:!1,observeSlideChildren:!1},create:function(){d.extend(this,{observer:{init:J.init.bind(this),attach:J.attach.bind(this),destroy:J.destroy.bind(this),observers:[]}})},on:{init:function(){this.observer.init()},destroy:function(){this.observer.destroy()}}},te={update:function(e){var t=this,i=t.params,s=i.slidesPerView,a=i.slidesPerGroup,r=i.centeredSlides,n=t.params.virtual,o=n.addSlidesBefore,l=n.addSlidesAfter,h=t.virtual,p=h.from,c=h.to,u=h.slides,v=h.slidesGrid,f=h.renderSlide,m=h.offset;t.updateActiveIndex();var g,b,w,y=t.activeIndex||0;g=t.rtlTranslate?"right":t.isHorizontal()?"left":"top",r?(b=Math.floor(s/2)+a+o,w=Math.floor(s/2)+a+l):(b=s+(a-1)+o,w=a+l);var x=Math.max((y||0)-w,0),E=Math.min((y||0)+b,u.length-1),T=(t.slidesGrid[x]||0)-(t.slidesGrid[0]||0);function S(){t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),t.lazy&&t.params.lazy.enabled&&t.lazy.load()}if(d.extend(t.virtual,{from:x,to:E,offset:T,slidesGrid:t.slidesGrid}),p===x&&c===E&&!e)return t.slidesGrid!==v&&T!==m&&t.slides.css(g,T+"px"),void t.updateProgress();if(t.params.virtual.renderExternal)return t.params.virtual.renderExternal.call(t,{offset:T,from:x,to:E,slides:function(){for(var e=[],t=x;t<=E;t+=1)e.push(u[t]);return e}()}),void S();var C=[],M=[];if(e)t.$wrapperEl.find("."+t.params.slideClass).remove();else for(var P=p;P<=c;P+=1)(P<x||P>E)&&t.$wrapperEl.find("."+t.params.slideClass+'[data-swiper-slide-index="'+P+'"]').remove();for(var z=0;z<u.length;z+=1)z>=x&&z<=E&&(void 0===c||e?M.push(z):(z>c&&M.push(z),z<p&&C.push(z)));M.forEach((function(e){t.$wrapperEl.append(f(u[e],e))})),C.sort((function(e,t){return t-e})).forEach((function(e){t.$wrapperEl.prepend(f(u[e],e))})),t.$wrapperEl.children(".swiper-slide").css(g,T+"px"),S()},renderSlide:function(e,t){var i=this.params.virtual;if(i.cache&&this.virtual.cache[t])return this.virtual.cache[t];var s=i.renderSlide?n(i.renderSlide.call(this,e,t)):n('<div class="'+this.params.slideClass+'" data-swiper-slide-index="'+t+'">'+e+"</div>");return s.attr("data-swiper-slide-index")||s.attr("data-swiper-slide-index",t),i.cache&&(this.virtual.cache[t]=s),s},appendSlide:function(e){if("object"==typeof e&&"length"in e)for(var t=0;t<e.length;t+=1)e[t]&&this.virtual.slides.push(e[t]);else this.virtual.slides.push(e);this.virtual.update(!0)},prependSlide:function(e){var t=this.activeIndex,i=t+1,s=1;if(Array.isArray(e)){for(var a=0;a<e.length;a+=1)e[a]&&this.virtual.slides.unshift(e[a]);i=t+e.length,s=e.length}else this.virtual.slides.unshift(e);if(this.params.virtual.cache){var r=this.virtual.cache,n={};Object.keys(r).forEach((function(e){var t=r[e],i=t.attr("data-swiper-slide-index");i&&t.attr("data-swiper-slide-index",parseInt(i,10)+1),n[parseInt(e,10)+s]=t})),this.virtual.cache=n}this.virtual.update(!0),this.slideTo(i,0)},removeSlide:function(e){if(null!=e){var t=this.activeIndex;if(Array.isArray(e))for(var i=e.length-1;i>=0;i-=1)this.virtual.slides.splice(e[i],1),this.params.virtual.cache&&delete this.virtual.cache[e[i]],e[i]<t&&(t-=1),t=Math.max(t,0);else this.virtual.slides.splice(e,1),this.params.virtual.cache&&delete this.virtual.cache[e],e<t&&(t-=1),t=Math.max(t,0);this.virtual.update(!0),this.slideTo(t,0)}},removeAllSlides:function(){this.virtual.slides=[],this.params.virtual.cache&&(this.virtual.cache={}),this.virtual.update(!0),this.slideTo(0,0)}},ie={name:"virtual",params:{virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,addSlidesBefore:0,addSlidesAfter:0}},create:function(){d.extend(this,{virtual:{update:te.update.bind(this),appendSlide:te.appendSlide.bind(this),prependSlide:te.prependSlide.bind(this),removeSlide:te.removeSlide.bind(this),removeAllSlides:te.removeAllSlides.bind(this),renderSlide:te.renderSlide.bind(this),slides:this.params.virtual.slides,cache:{}}})},on:{beforeInit:function(){if(this.params.virtual.enabled){this.classNames.push(this.params.containerModifierClass+"virtual");var e={watchSlidesProgress:!0};d.extend(this.params,e),d.extend(this.originalParams,e),this.params.initialSlide||this.virtual.update()}},setTranslate:function(){this.params.virtual.enabled&&this.virtual.update()}}},se={handle:function(e){var t=this.rtlTranslate,s=e;s.originalEvent&&(s=s.originalEvent);var r=s.keyCode||s.charCode,n=this.params.keyboard.pageUpDown,o=n&&33===r,l=n&&34===r,d=37===r,h=39===r,p=38===r,c=40===r;if(!this.allowSlideNext&&(this.isHorizontal()&&h||this.isVertical()&&c||l))return!1;if(!this.allowSlidePrev&&(this.isHorizontal()&&d||this.isVertical()&&p||o))return!1;if(!(s.shiftKey||s.altKey||s.ctrlKey||s.metaKey||i.activeElement&&i.activeElement.nodeName&&("input"===i.activeElement.nodeName.toLowerCase()||"textarea"===i.activeElement.nodeName.toLowerCase()))){if(this.params.keyboard.onlyInViewport&&(o||l||d||h||p||c)){var u=!1;if(this.$el.parents("."+this.params.slideClass).length>0&&0===this.$el.parents("."+this.params.slideActiveClass).length)return;var v=a.innerWidth,f=a.innerHeight,m=this.$el.offset();t&&(m.left-=this.$el[0].scrollLeft);for(var g=[[m.left,m.top],[m.left+this.width,m.top],[m.left,m.top+this.height],[m.left+this.width,m.top+this.height]],b=0;b<g.length;b+=1){var w=g[b];w[0]>=0&&w[0]<=v&&w[1]>=0&&w[1]<=f&&(u=!0)}if(!u)return}this.isHorizontal()?((o||l||d||h)&&(s.preventDefault?s.preventDefault():s.returnValue=!1),((l||h)&&!t||(o||d)&&t)&&this.slideNext(),((o||d)&&!t||(l||h)&&t)&&this.slidePrev()):((o||l||p||c)&&(s.preventDefault?s.preventDefault():s.returnValue=!1),(l||c)&&this.slideNext(),(o||p)&&this.slidePrev()),this.emit("keyPress",r)}},enable:function(){this.keyboard.enabled||(n(i).on("keydown",this.keyboard.handle),this.keyboard.enabled=!0)},disable:function(){this.keyboard.enabled&&(n(i).off("keydown",this.keyboard.handle),this.keyboard.enabled=!1)}},ae={name:"keyboard",params:{keyboard:{enabled:!1,onlyInViewport:!0,pageUpDown:!0}},create:function(){d.extend(this,{keyboard:{enabled:!1,enable:se.enable.bind(this),disable:se.disable.bind(this),handle:se.handle.bind(this)}})},on:{init:function(){this.params.keyboard.enabled&&this.keyboard.enable()},destroy:function(){this.keyboard.enabled&&this.keyboard.disable()}}};var re={lastScrollTime:d.now(),lastEventBeforeSnap:void 0,recentWheelEvents:[],event:function(){return a.navigator.userAgent.indexOf("firefox")>-1?"DOMMouseScroll":function(){var e="onwheel"in i;if(!e){var t=i.createElement("div");t.setAttribute("onwheel","return;"),e="function"==typeof t.onwheel}return!e&&i.implementation&&i.implementation.hasFeature&&!0!==i.implementation.hasFeature("","")&&(e=i.implementation.hasFeature("Events.wheel","3.0")),e}()?"wheel":"mousewheel"},normalize:function(e){var t=0,i=0,s=0,a=0;return"detail"in e&&(i=e.detail),"wheelDelta"in e&&(i=-e.wheelDelta/120),"wheelDeltaY"in e&&(i=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=i,i=0),s=10*t,a=10*i,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(s=e.deltaX),e.shiftKey&&!s&&(s=a,a=0),(s||a)&&e.deltaMode&&(1===e.deltaMode?(s*=40,a*=40):(s*=800,a*=800)),s&&!t&&(t=s<1?-1:1),a&&!i&&(i=a<1?-1:1),{spinX:t,spinY:i,pixelX:s,pixelY:a}},handleMouseEnter:function(){this.mouseEntered=!0},handleMouseLeave:function(){this.mouseEntered=!1},handle:function(e){var t=e,i=this,s=i.params.mousewheel;i.params.cssMode&&t.preventDefault();var a=i.$el;if("container"!==i.params.mousewheel.eventsTarged&&(a=n(i.params.mousewheel.eventsTarged)),!i.mouseEntered&&!a[0].contains(t.target)&&!s.releaseOnEdges)return!0;t.originalEvent&&(t=t.originalEvent);var r=0,o=i.rtlTranslate?-1:1,l=re.normalize(t);if(s.forceToAxis)if(i.isHorizontal()){if(!(Math.abs(l.pixelX)>Math.abs(l.pixelY)))return!0;r=-l.pixelX*o}else{if(!(Math.abs(l.pixelY)>Math.abs(l.pixelX)))return!0;r=-l.pixelY}else r=Math.abs(l.pixelX)>Math.abs(l.pixelY)?-l.pixelX*o:-l.pixelY;if(0===r)return!0;if(s.invert&&(r=-r),i.params.freeMode){var h={time:d.now(),delta:Math.abs(r),direction:Math.sign(r)},p=i.mousewheel.lastEventBeforeSnap,c=p&&h.time<p.time+500&&h.delta<=p.delta&&h.direction===p.direction;if(!c){i.mousewheel.lastEventBeforeSnap=void 0,i.params.loop&&i.loopFix();var u=i.getTranslate()+r*s.sensitivity,v=i.isBeginning,f=i.isEnd;if(u>=i.minTranslate()&&(u=i.minTranslate()),u<=i.maxTranslate()&&(u=i.maxTranslate()),i.setTransition(0),i.setTranslate(u),i.updateProgress(),i.updateActiveIndex(),i.updateSlidesClasses(),(!v&&i.isBeginning||!f&&i.isEnd)&&i.updateSlidesClasses(),i.params.freeModeSticky){clearTimeout(i.mousewheel.timeout),i.mousewheel.timeout=void 0;var m=i.mousewheel.recentWheelEvents;m.length>=15&&m.shift();var g=m.length?m[m.length-1]:void 0,b=m[0];if(m.push(h),g&&(h.delta>g.delta||h.direction!==g.direction))m.splice(0);else if(m.length>=15&&h.time-b.time<500&&b.delta-h.delta>=1&&h.delta<=6){var w=r>0?.8:.2;i.mousewheel.lastEventBeforeSnap=h,m.splice(0),i.mousewheel.timeout=d.nextTick((function(){i.slideToClosest(i.params.speed,!0,void 0,w)}),0)}i.mousewheel.timeout||(i.mousewheel.timeout=d.nextTick((function(){i.mousewheel.lastEventBeforeSnap=h,m.splice(0),i.slideToClosest(i.params.speed,!0,void 0,.5)}),500))}if(c||i.emit("scroll",t),i.params.autoplay&&i.params.autoplayDisableOnInteraction&&i.autoplay.stop(),u===i.minTranslate()||u===i.maxTranslate())return!0}}else{var y={time:d.now(),delta:Math.abs(r),direction:Math.sign(r),raw:e},x=i.mousewheel.recentWheelEvents;x.length>=2&&x.shift();var E=x.length?x[x.length-1]:void 0;if(x.push(y),E?(y.direction!==E.direction||y.delta>E.delta||y.time>E.time+150)&&i.mousewheel.animateSlider(y):i.mousewheel.animateSlider(y),i.mousewheel.releaseScroll(y))return!0}return t.preventDefault?t.preventDefault():t.returnValue=!1,!1},animateSlider:function(e){return e.delta>=6&&d.now()-this.mousewheel.lastScrollTime<60||(e.direction<0?this.isEnd&&!this.params.loop||this.animating||(this.slideNext(),this.emit("scroll",e.raw)):this.isBeginning&&!this.params.loop||this.animating||(this.slidePrev(),this.emit("scroll",e.raw)),this.mousewheel.lastScrollTime=(new a.Date).getTime(),!1)},releaseScroll:function(e){var t=this.params.mousewheel;if(e.direction<0){if(this.isEnd&&!this.params.loop&&t.releaseOnEdges)return!0}else if(this.isBeginning&&!this.params.loop&&t.releaseOnEdges)return!0;return!1},enable:function(){var e=re.event();if(this.params.cssMode)return this.wrapperEl.removeEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(t=n(this.params.mousewheel.eventsTarged)),t.on("mouseenter",this.mousewheel.handleMouseEnter),t.on("mouseleave",this.mousewheel.handleMouseLeave),t.on(e,this.mousewheel.handle),this.mousewheel.enabled=!0,!0},disable:function(){var e=re.event();if(this.params.cssMode)return this.wrapperEl.addEventListener(e,this.mousewheel.handle),!0;if(!e)return!1;if(!this.mousewheel.enabled)return!1;var t=this.$el;return"container"!==this.params.mousewheel.eventsTarged&&(t=n(this.params.mousewheel.eventsTarged)),t.off(e,this.mousewheel.handle),this.mousewheel.enabled=!1,!0}},ne={update:function(){var e=this.params.navigation;if(!this.params.loop){var t=this.navigation,i=t.$nextEl,s=t.$prevEl;s&&s.length>0&&(this.isBeginning?s.addClass(e.disabledClass):s.removeClass(e.disabledClass),s[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass)),i&&i.length>0&&(this.isEnd?i.addClass(e.disabledClass):i.removeClass(e.disabledClass),i[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](e.lockClass))}},onPrevClick:function(e){e.preventDefault(),this.isBeginning&&!this.params.loop||this.slidePrev()},onNextClick:function(e){e.preventDefault(),this.isEnd&&!this.params.loop||this.slideNext()},init:function(){var e,t,i=this.params.navigation;(i.nextEl||i.prevEl)&&(i.nextEl&&(e=n(i.nextEl),this.params.uniqueNavElements&&"string"==typeof i.nextEl&&e.length>1&&1===this.$el.find(i.nextEl).length&&(e=this.$el.find(i.nextEl))),i.prevEl&&(t=n(i.prevEl),this.params.uniqueNavElements&&"string"==typeof i.prevEl&&t.length>1&&1===this.$el.find(i.prevEl).length&&(t=this.$el.find(i.prevEl))),e&&e.length>0&&e.on("click",this.navigation.onNextClick),t&&t.length>0&&t.on("click",this.navigation.onPrevClick),d.extend(this.navigation,{$nextEl:e,nextEl:e&&e[0],$prevEl:t,prevEl:t&&t[0]}))},destroy:function(){var e=this.navigation,t=e.$nextEl,i=e.$prevEl;t&&t.length&&(t.off("click",this.navigation.onNextClick),t.removeClass(this.params.navigation.disabledClass)),i&&i.length&&(i.off("click",this.navigation.onPrevClick),i.removeClass(this.params.navigation.disabledClass))}},oe={update:function(){var e=this.rtl,t=this.params.pagination;if(t.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var i,s=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,a=this.pagination.$el,r=this.params.loop?Math.ceil((s-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length;if(this.params.loop?((i=Math.ceil((this.activeIndex-this.loopedSlides)/this.params.slidesPerGroup))>s-1-2*this.loopedSlides&&(i-=s-2*this.loopedSlides),i>r-1&&(i-=r),i<0&&"bullets"!==this.params.paginationType&&(i=r+i)):i=void 0!==this.snapIndex?this.snapIndex:this.activeIndex||0,"bullets"===t.type&&this.pagination.bullets&&this.pagination.bullets.length>0){var o,l,d,h=this.pagination.bullets;if(t.dynamicBullets&&(this.pagination.bulletSize=h.eq(0)[this.isHorizontal()?"outerWidth":"outerHeight"](!0),a.css(this.isHorizontal()?"width":"height",this.pagination.bulletSize*(t.dynamicMainBullets+4)+"px"),t.dynamicMainBullets>1&&void 0!==this.previousIndex&&(this.pagination.dynamicBulletIndex+=i-this.previousIndex,this.pagination.dynamicBulletIndex>t.dynamicMainBullets-1?this.pagination.dynamicBulletIndex=t.dynamicMainBullets-1:this.pagination.dynamicBulletIndex<0&&(this.pagination.dynamicBulletIndex=0)),o=i-this.pagination.dynamicBulletIndex,d=((l=o+(Math.min(h.length,t.dynamicMainBullets)-1))+o)/2),h.removeClass(t.bulletActiveClass+" "+t.bulletActiveClass+"-next "+t.bulletActiveClass+"-next-next "+t.bulletActiveClass+"-prev "+t.bulletActiveClass+"-prev-prev "+t.bulletActiveClass+"-main"),a.length>1)h.each((function(e,s){var a=n(s),r=a.index();r===i&&a.addClass(t.bulletActiveClass),t.dynamicBullets&&(r>=o&&r<=l&&a.addClass(t.bulletActiveClass+"-main"),r===o&&a.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),r===l&&a.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next"))}));else{var p=h.eq(i),c=p.index();if(p.addClass(t.bulletActiveClass),t.dynamicBullets){for(var u=h.eq(o),v=h.eq(l),f=o;f<=l;f+=1)h.eq(f).addClass(t.bulletActiveClass+"-main");if(this.params.loop)if(c>=h.length-t.dynamicMainBullets){for(var m=t.dynamicMainBullets;m>=0;m-=1)h.eq(h.length-m).addClass(t.bulletActiveClass+"-main");h.eq(h.length-t.dynamicMainBullets-1).addClass(t.bulletActiveClass+"-prev")}else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),v.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next");else u.prev().addClass(t.bulletActiveClass+"-prev").prev().addClass(t.bulletActiveClass+"-prev-prev"),v.next().addClass(t.bulletActiveClass+"-next").next().addClass(t.bulletActiveClass+"-next-next")}}if(t.dynamicBullets){var g=Math.min(h.length,t.dynamicMainBullets+4),b=(this.pagination.bulletSize*g-this.pagination.bulletSize)/2-d*this.pagination.bulletSize,w=e?"right":"left";h.css(this.isHorizontal()?w:"top",b+"px")}}if("fraction"===t.type&&(a.find("."+t.currentClass).text(t.formatFractionCurrent(i+1)),a.find("."+t.totalClass).text(t.formatFractionTotal(r))),"progressbar"===t.type){var y;y=t.progressbarOpposite?this.isHorizontal()?"vertical":"horizontal":this.isHorizontal()?"horizontal":"vertical";var x=(i+1)/r,E=1,T=1;"horizontal"===y?E=x:T=x,a.find("."+t.progressbarFillClass).transform("translate3d(0,0,0) scaleX("+E+") scaleY("+T+")").transition(this.params.speed)}"custom"===t.type&&t.renderCustom?(a.html(t.renderCustom(this,i+1,r)),this.emit("paginationRender",this,a[0])):this.emit("paginationUpdate",this,a[0]),a[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](t.lockClass)}},render:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.virtual&&this.params.virtual.enabled?this.virtual.slides.length:this.slides.length,i=this.pagination.$el,s="";if("bullets"===e.type){for(var a=this.params.loop?Math.ceil((t-2*this.loopedSlides)/this.params.slidesPerGroup):this.snapGrid.length,r=0;r<a;r+=1)e.renderBullet?s+=e.renderBullet.call(this,r,e.bulletClass):s+="<"+e.bulletElement+' class="'+e.bulletClass+'"></'+e.bulletElement+">";i.html(s),this.pagination.bullets=i.find("."+e.bulletClass)}"fraction"===e.type&&(s=e.renderFraction?e.renderFraction.call(this,e.currentClass,e.totalClass):'<span class="'+e.currentClass+'"></span> / <span class="'+e.totalClass+'"></span>',i.html(s)),"progressbar"===e.type&&(s=e.renderProgressbar?e.renderProgressbar.call(this,e.progressbarFillClass):'<span class="'+e.progressbarFillClass+'"></span>',i.html(s)),"custom"!==e.type&&this.emit("paginationRender",this.pagination.$el[0])}},init:function(){var e=this,t=e.params.pagination;if(t.el){var i=n(t.el);0!==i.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&i.length>1&&(i=e.$el.find(t.el)),"bullets"===t.type&&t.clickable&&i.addClass(t.clickableClass),i.addClass(t.modifierClass+t.type),"bullets"===t.type&&t.dynamicBullets&&(i.addClass(""+t.modifierClass+t.type+"-dynamic"),e.pagination.dynamicBulletIndex=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&i.addClass(t.progressbarOppositeClass),t.clickable&&i.on("click","."+t.bulletClass,(function(t){t.preventDefault();var i=n(this).index()*e.params.slidesPerGroup;e.params.loop&&(i+=e.loopedSlides),e.slideTo(i)})),d.extend(e.pagination,{$el:i,el:i[0]}))}},destroy:function(){var e=this.params.pagination;if(e.el&&this.pagination.el&&this.pagination.$el&&0!==this.pagination.$el.length){var t=this.pagination.$el;t.removeClass(e.hiddenClass),t.removeClass(e.modifierClass+e.type),this.pagination.bullets&&this.pagination.bullets.removeClass(e.bulletActiveClass),e.clickable&&t.off("click","."+e.bulletClass)}}},le={setTranslate:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=this.rtlTranslate,i=this.progress,s=e.dragSize,a=e.trackSize,r=e.$dragEl,n=e.$el,o=this.params.scrollbar,l=s,d=(a-s)*i;t?(d=-d)>0?(l=s-d,d=0):-d+s>a&&(l=a+d):d<0?(l=s+d,d=0):d+s>a&&(l=a-d),this.isHorizontal()?(r.transform("translate3d("+d+"px, 0, 0)"),r[0].style.width=l+"px"):(r.transform("translate3d(0px, "+d+"px, 0)"),r[0].style.height=l+"px"),o.hide&&(clearTimeout(this.scrollbar.timeout),n[0].style.opacity=1,this.scrollbar.timeout=setTimeout((function(){n[0].style.opacity=0,n.transition(400)}),1e3))}},setTransition:function(e){this.params.scrollbar.el&&this.scrollbar.el&&this.scrollbar.$dragEl.transition(e)},updateSize:function(){if(this.params.scrollbar.el&&this.scrollbar.el){var e=this.scrollbar,t=e.$dragEl,i=e.$el;t[0].style.width="",t[0].style.height="";var s,a=this.isHorizontal()?i[0].offsetWidth:i[0].offsetHeight,r=this.size/this.virtualSize,n=r*(a/this.size);s="auto"===this.params.scrollbar.dragSize?a*r:parseInt(this.params.scrollbar.dragSize,10),this.isHorizontal()?t[0].style.width=s+"px":t[0].style.height=s+"px",i[0].style.display=r>=1?"none":"",this.params.scrollbar.hide&&(i[0].style.opacity=0),d.extend(e,{trackSize:a,divider:r,moveDivider:n,dragSize:s}),e.$el[this.params.watchOverflow&&this.isLocked?"addClass":"removeClass"](this.params.scrollbar.lockClass)}},getPointerPosition:function(e){return this.isHorizontal()?"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientX:e.clientX:"touchstart"===e.type||"touchmove"===e.type?e.targetTouches[0].clientY:e.clientY},setDragPosition:function(e){var t,i=this.scrollbar,s=this.rtlTranslate,a=i.$el,r=i.dragSize,n=i.trackSize,o=i.dragStartPos;t=(i.getPointerPosition(e)-a.offset()[this.isHorizontal()?"left":"top"]-(null!==o?o:r/2))/(n-r),t=Math.max(Math.min(t,1),0),s&&(t=1-t);var l=this.minTranslate()+(this.maxTranslate()-this.minTranslate())*t;this.updateProgress(l),this.setTranslate(l),this.updateActiveIndex(),this.updateSlidesClasses()},onDragStart:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el,r=i.$dragEl;this.scrollbar.isTouched=!0,this.scrollbar.dragStartPos=e.target===r[0]||e.target===r?i.getPointerPosition(e)-e.target.getBoundingClientRect()[this.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.transition(100),r.transition(100),i.setDragPosition(e),clearTimeout(this.scrollbar.dragTimeout),a.transition(0),t.hide&&a.css("opacity",1),this.params.cssMode&&this.$wrapperEl.css("scroll-snap-type","none"),this.emit("scrollbarDragStart",e)},onDragMove:function(e){var t=this.scrollbar,i=this.$wrapperEl,s=t.$el,a=t.$dragEl;this.scrollbar.isTouched&&(e.preventDefault?e.preventDefault():e.returnValue=!1,t.setDragPosition(e),i.transition(0),s.transition(0),a.transition(0),this.emit("scrollbarDragMove",e))},onDragEnd:function(e){var t=this.params.scrollbar,i=this.scrollbar,s=this.$wrapperEl,a=i.$el;this.scrollbar.isTouched&&(this.scrollbar.isTouched=!1,this.params.cssMode&&(this.$wrapperEl.css("scroll-snap-type",""),s.transition("")),t.hide&&(clearTimeout(this.scrollbar.dragTimeout),this.scrollbar.dragTimeout=d.nextTick((function(){a.css("opacity",0),a.transition(400)}),1e3)),this.emit("scrollbarDragEnd",e),t.snapOnRelease&&this.slideToClosest())},enableDraggable:function(){if(this.params.scrollbar.el){var e=this.scrollbar,t=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,r=e.$el[0],n=!(!h.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},o=!(!h.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};h.touch?(r.addEventListener(t.start,this.scrollbar.onDragStart,n),r.addEventListener(t.move,this.scrollbar.onDragMove,n),r.addEventListener(t.end,this.scrollbar.onDragEnd,o)):(r.addEventListener(s.start,this.scrollbar.onDragStart,n),i.addEventListener(s.move,this.scrollbar.onDragMove,n),i.addEventListener(s.end,this.scrollbar.onDragEnd,o))}},disableDraggable:function(){if(this.params.scrollbar.el){var e=this.scrollbar,t=this.touchEventsTouch,s=this.touchEventsDesktop,a=this.params,r=e.$el[0],n=!(!h.passiveListener||!a.passiveListeners)&&{passive:!1,capture:!1},o=!(!h.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};h.touch?(r.removeEventListener(t.start,this.scrollbar.onDragStart,n),r.removeEventListener(t.move,this.scrollbar.onDragMove,n),r.removeEventListener(t.end,this.scrollbar.onDragEnd,o)):(r.removeEventListener(s.start,this.scrollbar.onDragStart,n),i.removeEventListener(s.move,this.scrollbar.onDragMove,n),i.removeEventListener(s.end,this.scrollbar.onDragEnd,o))}},init:function(){if(this.params.scrollbar.el){var e=this.scrollbar,t=this.$el,i=this.params.scrollbar,s=n(i.el);this.params.uniqueNavElements&&"string"==typeof i.el&&s.length>1&&1===t.find(i.el).length&&(s=t.find(i.el));var a=s.find("."+this.params.scrollbar.dragClass);0===a.length&&(a=n('<div class="'+this.params.scrollbar.dragClass+'"></div>'),s.append(a)),d.extend(e,{$el:s,el:s[0],$dragEl:a,dragEl:a[0]}),i.draggable&&e.enableDraggable()}},destroy:function(){this.scrollbar.disableDraggable()}},de={setTransform:function(e,t){var i=this.rtl,s=n(e),a=i?-1:1,r=s.attr("data-swiper-parallax")||"0",o=s.attr("data-swiper-parallax-x"),l=s.attr("data-swiper-parallax-y"),d=s.attr("data-swiper-parallax-scale"),h=s.attr("data-swiper-parallax-opacity");if(o||l?(o=o||"0",l=l||"0"):this.isHorizontal()?(o=r,l="0"):(l=r,o="0"),o=o.indexOf("%")>=0?parseInt(o,10)*t*a+"%":o*t*a+"px",l=l.indexOf("%")>=0?parseInt(l,10)*t+"%":l*t+"px",null!=h){var p=h-(h-1)*(1-Math.abs(t));s[0].style.opacity=p}if(null==d)s.transform("translate3d("+o+", "+l+", 0px)");else{var c=d-(d-1)*(1-Math.abs(t));s.transform("translate3d("+o+", "+l+", 0px) scale("+c+")")}},setTranslate:function(){var e=this,t=e.$el,i=e.slides,s=e.progress,a=e.snapGrid;t.children("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,s)})),i.each((function(t,i){var r=i.progress;e.params.slidesPerGroup>1&&"auto"!==e.params.slidesPerView&&(r+=Math.ceil(t/2)-s*(a.length-1)),r=Math.min(Math.max(r,-1),1),n(i).find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){e.parallax.setTransform(i,r)}))}))},setTransition:function(e){void 0===e&&(e=this.params.speed);this.$el.find("[data-swiper-parallax], [data-swiper-parallax-x], [data-swiper-parallax-y], [data-swiper-parallax-opacity], [data-swiper-parallax-scale]").each((function(t,i){var s=n(i),a=parseInt(s.attr("data-swiper-parallax-duration"),10)||e;0===e&&(a=0),s.transition(a)}))}},he={getDistanceBetweenTouches:function(e){if(e.targetTouches.length<2)return 1;var t=e.targetTouches[0].pageX,i=e.targetTouches[0].pageY,s=e.targetTouches[1].pageX,a=e.targetTouches[1].pageY;return Math.sqrt(Math.pow(s-t,2)+Math.pow(a-i,2))},onGestureStart:function(e){var t=this.params.zoom,i=this.zoom,s=i.gesture;if(i.fakeGestureTouched=!1,i.fakeGestureMoved=!1,!h.gestures){if("touchstart"!==e.type||"touchstart"===e.type&&e.targetTouches.length<2)return;i.fakeGestureTouched=!0,s.scaleStart=he.getDistanceBetweenTouches(e)}s.$slideEl&&s.$slideEl.length||(s.$slideEl=n(e.target).closest("."+this.params.slideClass),0===s.$slideEl.length&&(s.$slideEl=this.slides.eq(this.activeIndex)),s.$imageEl=s.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),s.$imageWrapEl=s.$imageEl.parent("."+t.containerClass),s.maxRatio=s.$imageWrapEl.attr("data-swiper-zoom")||t.maxRatio,0!==s.$imageWrapEl.length)?(s.$imageEl&&s.$imageEl.transition(0),this.zoom.isScaling=!0):s.$imageEl=void 0},onGestureChange:function(e){var t=this.params.zoom,i=this.zoom,s=i.gesture;if(!h.gestures){if("touchmove"!==e.type||"touchmove"===e.type&&e.targetTouches.length<2)return;i.fakeGestureMoved=!0,s.scaleMove=he.getDistanceBetweenTouches(e)}s.$imageEl&&0!==s.$imageEl.length&&(i.scale=h.gestures?e.scale*i.currentScale:s.scaleMove/s.scaleStart*i.currentScale,i.scale>s.maxRatio&&(i.scale=s.maxRatio-1+Math.pow(i.scale-s.maxRatio+1,.5)),i.scale<t.minRatio&&(i.scale=t.minRatio+1-Math.pow(t.minRatio-i.scale+1,.5)),s.$imageEl.transform("translate3d(0,0,0) scale("+i.scale+")"))},onGestureEnd:function(e){var t=this.params.zoom,i=this.zoom,s=i.gesture;if(!h.gestures){if(!i.fakeGestureTouched||!i.fakeGestureMoved)return;if("touchend"!==e.type||"touchend"===e.type&&e.changedTouches.length<2&&!A.android)return;i.fakeGestureTouched=!1,i.fakeGestureMoved=!1}s.$imageEl&&0!==s.$imageEl.length&&(i.scale=Math.max(Math.min(i.scale,s.maxRatio),t.minRatio),s.$imageEl.transition(this.params.speed).transform("translate3d(0,0,0) scale("+i.scale+")"),i.currentScale=i.scale,i.isScaling=!1,1===i.scale&&(s.$slideEl=void 0))},onTouchStart:function(e){var t=this.zoom,i=t.gesture,s=t.image;i.$imageEl&&0!==i.$imageEl.length&&(s.isTouched||(A.android&&e.cancelable&&e.preventDefault(),s.isTouched=!0,s.touchesStart.x="touchstart"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesStart.y="touchstart"===e.type?e.targetTouches[0].pageY:e.pageY))},onTouchMove:function(e){var t=this.zoom,i=t.gesture,s=t.image,a=t.velocity;if(i.$imageEl&&0!==i.$imageEl.length&&(this.allowClick=!1,s.isTouched&&i.$slideEl)){s.isMoved||(s.width=i.$imageEl[0].offsetWidth,s.height=i.$imageEl[0].offsetHeight,s.startX=d.getTranslate(i.$imageWrapEl[0],"x")||0,s.startY=d.getTranslate(i.$imageWrapEl[0],"y")||0,i.slideWidth=i.$slideEl[0].offsetWidth,i.slideHeight=i.$slideEl[0].offsetHeight,i.$imageWrapEl.transition(0),this.rtl&&(s.startX=-s.startX,s.startY=-s.startY));var r=s.width*t.scale,n=s.height*t.scale;if(!(r<i.slideWidth&&n<i.slideHeight)){if(s.minX=Math.min(i.slideWidth/2-r/2,0),s.maxX=-s.minX,s.minY=Math.min(i.slideHeight/2-n/2,0),s.maxY=-s.minY,s.touchesCurrent.x="touchmove"===e.type?e.targetTouches[0].pageX:e.pageX,s.touchesCurrent.y="touchmove"===e.type?e.targetTouches[0].pageY:e.pageY,!s.isMoved&&!t.isScaling){if(this.isHorizontal()&&(Math.floor(s.minX)===Math.floor(s.startX)&&s.touchesCurrent.x<s.touchesStart.x||Math.floor(s.maxX)===Math.floor(s.startX)&&s.touchesCurrent.x>s.touchesStart.x))return void(s.isTouched=!1);if(!this.isHorizontal()&&(Math.floor(s.minY)===Math.floor(s.startY)&&s.touchesCurrent.y<s.touchesStart.y||Math.floor(s.maxY)===Math.floor(s.startY)&&s.touchesCurrent.y>s.touchesStart.y))return void(s.isTouched=!1)}e.cancelable&&e.preventDefault(),e.stopPropagation(),s.isMoved=!0,s.currentX=s.touchesCurrent.x-s.touchesStart.x+s.startX,s.currentY=s.touchesCurrent.y-s.touchesStart.y+s.startY,s.currentX<s.minX&&(s.currentX=s.minX+1-Math.pow(s.minX-s.currentX+1,.8)),s.currentX>s.maxX&&(s.currentX=s.maxX-1+Math.pow(s.currentX-s.maxX+1,.8)),s.currentY<s.minY&&(s.currentY=s.minY+1-Math.pow(s.minY-s.currentY+1,.8)),s.currentY>s.maxY&&(s.currentY=s.maxY-1+Math.pow(s.currentY-s.maxY+1,.8)),a.prevPositionX||(a.prevPositionX=s.touchesCurrent.x),a.prevPositionY||(a.prevPositionY=s.touchesCurrent.y),a.prevTime||(a.prevTime=Date.now()),a.x=(s.touchesCurrent.x-a.prevPositionX)/(Date.now()-a.prevTime)/2,a.y=(s.touchesCurrent.y-a.prevPositionY)/(Date.now()-a.prevTime)/2,Math.abs(s.touchesCurrent.x-a.prevPositionX)<2&&(a.x=0),Math.abs(s.touchesCurrent.y-a.prevPositionY)<2&&(a.y=0),a.prevPositionX=s.touchesCurrent.x,a.prevPositionY=s.touchesCurrent.y,a.prevTime=Date.now(),i.$imageWrapEl.transform("translate3d("+s.currentX+"px, "+s.currentY+"px,0)")}}},onTouchEnd:function(){var e=this.zoom,t=e.gesture,i=e.image,s=e.velocity;if(t.$imageEl&&0!==t.$imageEl.length){if(!i.isTouched||!i.isMoved)return i.isTouched=!1,void(i.isMoved=!1);i.isTouched=!1,i.isMoved=!1;var a=300,r=300,n=s.x*a,o=i.currentX+n,l=s.y*r,d=i.currentY+l;0!==s.x&&(a=Math.abs((o-i.currentX)/s.x)),0!==s.y&&(r=Math.abs((d-i.currentY)/s.y));var h=Math.max(a,r);i.currentX=o,i.currentY=d;var p=i.width*e.scale,c=i.height*e.scale;i.minX=Math.min(t.slideWidth/2-p/2,0),i.maxX=-i.minX,i.minY=Math.min(t.slideHeight/2-c/2,0),i.maxY=-i.minY,i.currentX=Math.max(Math.min(i.currentX,i.maxX),i.minX),i.currentY=Math.max(Math.min(i.currentY,i.maxY),i.minY),t.$imageWrapEl.transition(h).transform("translate3d("+i.currentX+"px, "+i.currentY+"px,0)")}},onTransitionEnd:function(){var e=this.zoom,t=e.gesture;t.$slideEl&&this.previousIndex!==this.activeIndex&&(t.$imageEl&&t.$imageEl.transform("translate3d(0,0,0) scale(1)"),t.$imageWrapEl&&t.$imageWrapEl.transform("translate3d(0,0,0)"),e.scale=1,e.currentScale=1,t.$slideEl=void 0,t.$imageEl=void 0,t.$imageWrapEl=void 0)},toggle:function(e){var t=this.zoom;t.scale&&1!==t.scale?t.out():t.in(e)},in:function(e){var t,i,s,a,r,n,o,l,d,h,p,c,u,v,f,m,g=this.zoom,b=this.params.zoom,w=g.gesture,y=g.image;(w.$slideEl||(this.params.virtual&&this.params.virtual.enabled&&this.virtual?w.$slideEl=this.$wrapperEl.children("."+this.params.slideActiveClass):w.$slideEl=this.slides.eq(this.activeIndex),w.$imageEl=w.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),w.$imageWrapEl=w.$imageEl.parent("."+b.containerClass)),w.$imageEl&&0!==w.$imageEl.length)&&(w.$slideEl.addClass(""+b.zoomedSlideClass),void 0===y.touchesStart.x&&e?(t="touchend"===e.type?e.changedTouches[0].pageX:e.pageX,i="touchend"===e.type?e.changedTouches[0].pageY:e.pageY):(t=y.touchesStart.x,i=y.touchesStart.y),g.scale=w.$imageWrapEl.attr("data-swiper-zoom")||b.maxRatio,g.currentScale=w.$imageWrapEl.attr("data-swiper-zoom")||b.maxRatio,e?(f=w.$slideEl[0].offsetWidth,m=w.$slideEl[0].offsetHeight,s=w.$slideEl.offset().left+f/2-t,a=w.$slideEl.offset().top+m/2-i,o=w.$imageEl[0].offsetWidth,l=w.$imageEl[0].offsetHeight,d=o*g.scale,h=l*g.scale,u=-(p=Math.min(f/2-d/2,0)),v=-(c=Math.min(m/2-h/2,0)),(r=s*g.scale)<p&&(r=p),r>u&&(r=u),(n=a*g.scale)<c&&(n=c),n>v&&(n=v)):(r=0,n=0),w.$imageWrapEl.transition(300).transform("translate3d("+r+"px, "+n+"px,0)"),w.$imageEl.transition(300).transform("translate3d(0,0,0) scale("+g.scale+")"))},out:function(){var e=this.zoom,t=this.params.zoom,i=e.gesture;i.$slideEl||(this.params.virtual&&this.params.virtual.enabled&&this.virtual?i.$slideEl=this.$wrapperEl.children("."+this.params.slideActiveClass):i.$slideEl=this.slides.eq(this.activeIndex),i.$imageEl=i.$slideEl.find("img, svg, canvas, picture, .swiper-zoom-target"),i.$imageWrapEl=i.$imageEl.parent("."+t.containerClass)),i.$imageEl&&0!==i.$imageEl.length&&(e.scale=1,e.currentScale=1,i.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),i.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),i.$slideEl.removeClass(""+t.zoomedSlideClass),i.$slideEl=void 0)},enable:function(){var e=this.zoom;if(!e.enabled){e.enabled=!0;var t=!("touchstart"!==this.touchEvents.start||!h.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1},i=!h.passiveListener||{passive:!1,capture:!0},s="."+this.params.slideClass;h.gestures?(this.$wrapperEl.on("gesturestart",s,e.onGestureStart,t),this.$wrapperEl.on("gesturechange",s,e.onGestureChange,t),this.$wrapperEl.on("gestureend",s,e.onGestureEnd,t)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.on(this.touchEvents.start,s,e.onGestureStart,t),this.$wrapperEl.on(this.touchEvents.move,s,e.onGestureChange,i),this.$wrapperEl.on(this.touchEvents.end,s,e.onGestureEnd,t),this.touchEvents.cancel&&this.$wrapperEl.on(this.touchEvents.cancel,s,e.onGestureEnd,t)),this.$wrapperEl.on(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove,i)}},disable:function(){var e=this.zoom;if(e.enabled){this.zoom.enabled=!1;var t=!("touchstart"!==this.touchEvents.start||!h.passiveListener||!this.params.passiveListeners)&&{passive:!0,capture:!1},i=!h.passiveListener||{passive:!1,capture:!0},s="."+this.params.slideClass;h.gestures?(this.$wrapperEl.off("gesturestart",s,e.onGestureStart,t),this.$wrapperEl.off("gesturechange",s,e.onGestureChange,t),this.$wrapperEl.off("gestureend",s,e.onGestureEnd,t)):"touchstart"===this.touchEvents.start&&(this.$wrapperEl.off(this.touchEvents.start,s,e.onGestureStart,t),this.$wrapperEl.off(this.touchEvents.move,s,e.onGestureChange,i),this.$wrapperEl.off(this.touchEvents.end,s,e.onGestureEnd,t),this.touchEvents.cancel&&this.$wrapperEl.off(this.touchEvents.cancel,s,e.onGestureEnd,t)),this.$wrapperEl.off(this.touchEvents.move,"."+this.params.zoom.containerClass,e.onTouchMove,i)}}},pe={loadInSlide:function(e,t){void 0===t&&(t=!0);var i=this,s=i.params.lazy;if(void 0!==e&&0!==i.slides.length){var a=i.virtual&&i.params.virtual.enabled?i.$wrapperEl.children("."+i.params.slideClass+'[data-swiper-slide-index="'+e+'"]'):i.slides.eq(e),r=a.find("."+s.elementClass+":not(."+s.loadedClass+"):not(."+s.loadingClass+")");!a.hasClass(s.elementClass)||a.hasClass(s.loadedClass)||a.hasClass(s.loadingClass)||(r=r.add(a[0])),0!==r.length&&r.each((function(e,r){var o=n(r);o.addClass(s.loadingClass);var l=o.attr("data-background"),d=o.attr("data-src"),h=o.attr("data-srcset"),p=o.attr("data-sizes"),c=o.parent("picture");i.loadImage(o[0],d||l,h,p,!1,(function(){if(null!=i&&i&&(!i||i.params)&&!i.destroyed){if(l?(o.css("background-image",'url("'+l+'")'),o.removeAttr("data-background")):(h&&(o.attr("srcset",h),o.removeAttr("data-srcset")),p&&(o.attr("sizes",p),o.removeAttr("data-sizes")),c.length&&c.children("source").each((function(e,t){var i=n(t);i.attr("data-srcset")&&(i.attr("srcset",i.attr("data-srcset")),i.removeAttr("data-srcset"))})),d&&(o.attr("src",d),o.removeAttr("data-src"))),o.addClass(s.loadedClass).removeClass(s.loadingClass),a.find("."+s.preloaderClass).remove(),i.params.loop&&t){var e=a.attr("data-swiper-slide-index");if(a.hasClass(i.params.slideDuplicateClass)){var r=i.$wrapperEl.children('[data-swiper-slide-index="'+e+'"]:not(.'+i.params.slideDuplicateClass+")");i.lazy.loadInSlide(r.index(),!1)}else{var u=i.$wrapperEl.children("."+i.params.slideDuplicateClass+'[data-swiper-slide-index="'+e+'"]');i.lazy.loadInSlide(u.index(),!1)}}i.emit("lazyImageReady",a[0],o[0]),i.params.autoHeight&&i.updateAutoHeight()}})),i.emit("lazyImageLoad",a[0],o[0])}))}},load:function(){var e=this,t=e.$wrapperEl,i=e.params,s=e.slides,a=e.activeIndex,r=e.virtual&&i.virtual.enabled,o=i.lazy,l=i.slidesPerView;function d(e){if(r){if(t.children("."+i.slideClass+'[data-swiper-slide-index="'+e+'"]').length)return!0}else if(s[e])return!0;return!1}function h(e){return r?n(e).attr("data-swiper-slide-index"):n(e).index()}if("auto"===l&&(l=0),e.lazy.initialImageLoaded||(e.lazy.initialImageLoaded=!0),e.params.watchSlidesVisibility)t.children("."+i.slideVisibleClass).each((function(t,i){var s=r?n(i).attr("data-swiper-slide-index"):n(i).index();e.lazy.loadInSlide(s)}));else if(l>1)for(var p=a;p<a+l;p+=1)d(p)&&e.lazy.loadInSlide(p);else e.lazy.loadInSlide(a);if(o.loadPrevNext)if(l>1||o.loadPrevNextAmount&&o.loadPrevNextAmount>1){for(var c=o.loadPrevNextAmount,u=l,v=Math.min(a+u+Math.max(c,u),s.length),f=Math.max(a-Math.max(u,c),0),m=a+l;m<v;m+=1)d(m)&&e.lazy.loadInSlide(m);for(var g=f;g<a;g+=1)d(g)&&e.lazy.loadInSlide(g)}else{var b=t.children("."+i.slideNextClass);b.length>0&&e.lazy.loadInSlide(h(b));var w=t.children("."+i.slidePrevClass);w.length>0&&e.lazy.loadInSlide(h(w))}}},ce={LinearSpline:function(e,t){var i,s,a,r,n,o=function(e,t){for(s=-1,i=e.length;i-s>1;)e[a=i+s>>1]<=t?s=a:i=a;return i};return this.x=e,this.y=t,this.lastIndex=e.length-1,this.interpolate=function(e){return e?(n=o(this.x,e),r=n-1,(e-this.x[r])*(this.y[n]-this.y[r])/(this.x[n]-this.x[r])+this.y[r]):0},this},getInterpolateFunction:function(e){this.controller.spline||(this.controller.spline=this.params.loop?new ce.LinearSpline(this.slidesGrid,e.slidesGrid):new ce.LinearSpline(this.snapGrid,e.snapGrid))},setTranslate:function(e,t){var i,s,a=this,r=a.controller.control;function n(e){var t=a.rtlTranslate?-a.translate:a.translate;"slide"===a.params.controller.by&&(a.controller.getInterpolateFunction(e),s=-a.controller.spline.interpolate(-t)),s&&"container"!==a.params.controller.by||(i=(e.maxTranslate()-e.minTranslate())/(a.maxTranslate()-a.minTranslate()),s=(t-a.minTranslate())*i+e.minTranslate()),a.params.controller.inverse&&(s=e.maxTranslate()-s),e.updateProgress(s),e.setTranslate(s,a),e.updateActiveIndex(),e.updateSlidesClasses()}if(Array.isArray(r))for(var o=0;o<r.length;o+=1)r[o]!==t&&r[o]instanceof j&&n(r[o]);else r instanceof j&&t!==r&&n(r)},setTransition:function(e,t){var i,s=this,a=s.controller.control;function r(t){t.setTransition(e,s),0!==e&&(t.transitionStart(),t.params.autoHeight&&d.nextTick((function(){t.updateAutoHeight()})),t.$wrapperEl.transitionEnd((function(){a&&(t.params.loop&&"slide"===s.params.controller.by&&t.loopFix(),t.transitionEnd())})))}if(Array.isArray(a))for(i=0;i<a.length;i+=1)a[i]!==t&&a[i]instanceof j&&r(a[i]);else a instanceof j&&t!==a&&r(a)}},ue={makeElFocusable:function(e){return e.attr("tabIndex","0"),e},makeElNotFocusable:function(e){return e.attr("tabIndex","-1"),e},addElRole:function(e,t){return e.attr("role",t),e},addElLabel:function(e,t){return e.attr("aria-label",t),e},disableEl:function(e){return e.attr("aria-disabled",!0),e},enableEl:function(e){return e.attr("aria-disabled",!1),e},onEnterKey:function(e){var t=this.params.a11y;if(13===e.keyCode){var i=n(e.target);this.navigation&&this.navigation.$nextEl&&i.is(this.navigation.$nextEl)&&(this.isEnd&&!this.params.loop||this.slideNext(),this.isEnd?this.a11y.notify(t.lastSlideMessage):this.a11y.notify(t.nextSlideMessage)),this.navigation&&this.navigation.$prevEl&&i.is(this.navigation.$prevEl)&&(this.isBeginning&&!this.params.loop||this.slidePrev(),this.isBeginning?this.a11y.notify(t.firstSlideMessage):this.a11y.notify(t.prevSlideMessage)),this.pagination&&i.is("."+this.params.pagination.bulletClass)&&i[0].click()}},notify:function(e){var t=this.a11y.liveRegion;0!==t.length&&(t.html(""),t.html(e))},updateNavigation:function(){if(!this.params.loop&&this.navigation){var e=this.navigation,t=e.$nextEl,i=e.$prevEl;i&&i.length>0&&(this.isBeginning?(this.a11y.disableEl(i),this.a11y.makeElNotFocusable(i)):(this.a11y.enableEl(i),this.a11y.makeElFocusable(i))),t&&t.length>0&&(this.isEnd?(this.a11y.disableEl(t),this.a11y.makeElNotFocusable(t)):(this.a11y.enableEl(t),this.a11y.makeElFocusable(t)))}},updatePagination:function(){var e=this,t=e.params.a11y;e.pagination&&e.params.pagination.clickable&&e.pagination.bullets&&e.pagination.bullets.length&&e.pagination.bullets.each((function(i,s){var a=n(s);e.a11y.makeElFocusable(a),e.a11y.addElRole(a,"button"),e.a11y.addElLabel(a,t.paginationBulletMessage.replace(/\{\{index\}\}/,a.index()+1))}))},init:function(){this.$el.append(this.a11y.liveRegion);var e,t,i=this.params.a11y;this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&(this.a11y.makeElFocusable(e),this.a11y.addElRole(e,"button"),this.a11y.addElLabel(e,i.nextSlideMessage),e.on("keydown",this.a11y.onEnterKey)),t&&(this.a11y.makeElFocusable(t),this.a11y.addElRole(t,"button"),this.a11y.addElLabel(t,i.prevSlideMessage),t.on("keydown",this.a11y.onEnterKey)),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.on("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)},destroy:function(){var e,t;this.a11y.liveRegion&&this.a11y.liveRegion.length>0&&this.a11y.liveRegion.remove(),this.navigation&&this.navigation.$nextEl&&(e=this.navigation.$nextEl),this.navigation&&this.navigation.$prevEl&&(t=this.navigation.$prevEl),e&&e.off("keydown",this.a11y.onEnterKey),t&&t.off("keydown",this.a11y.onEnterKey),this.pagination&&this.params.pagination.clickable&&this.pagination.bullets&&this.pagination.bullets.length&&this.pagination.$el.off("keydown","."+this.params.pagination.bulletClass,this.a11y.onEnterKey)}},ve={init:function(){if(this.params.history){if(!a.history||!a.history.pushState)return this.params.history.enabled=!1,void(this.params.hashNavigation.enabled=!0);var e=this.history;e.initialized=!0,e.paths=ve.getPathValues(),(e.paths.key||e.paths.value)&&(e.scrollToSlide(0,e.paths.value,this.params.runCallbacksOnInit),this.params.history.replaceState||a.addEventListener("popstate",this.history.setHistoryPopState))}},destroy:function(){this.params.history.replaceState||a.removeEventListener("popstate",this.history.setHistoryPopState)},setHistoryPopState:function(){this.history.paths=ve.getPathValues(),this.history.scrollToSlide(this.params.speed,this.history.paths.value,!1)},getPathValues:function(){var e=a.location.pathname.slice(1).split("/").filter((function(e){return""!==e})),t=e.length;return{key:e[t-2],value:e[t-1]}},setHistory:function(e,t){if(this.history.initialized&&this.params.history.enabled){var i=this.slides.eq(t),s=ve.slugify(i.attr("data-history"));a.location.pathname.includes(e)||(s=e+"/"+s);var r=a.history.state;r&&r.value===s||(this.params.history.replaceState?a.history.replaceState({value:s},null,s):a.history.pushState({value:s},null,s))}},slugify:function(e){return e.toString().replace(/\s+/g,"-").replace(/[^\w-]+/g,"").replace(/--+/g,"-").replace(/^-+/,"").replace(/-+$/,"")},scrollToSlide:function(e,t,i){if(t)for(var s=0,a=this.slides.length;s<a;s+=1){var r=this.slides.eq(s);if(ve.slugify(r.attr("data-history"))===t&&!r.hasClass(this.params.slideDuplicateClass)){var n=r.index();this.slideTo(n,e,i)}}else this.slideTo(0,e,i)}},fe={onHashCange:function(){this.emit("hashChange");var e=i.location.hash.replace("#","");if(e!==this.slides.eq(this.activeIndex).attr("data-hash")){var t=this.$wrapperEl.children("."+this.params.slideClass+'[data-hash="'+e+'"]').index();if(void 0===t)return;this.slideTo(t)}},setHash:function(){if(this.hashNavigation.initialized&&this.params.hashNavigation.enabled)if(this.params.hashNavigation.replaceState&&a.history&&a.history.replaceState)a.history.replaceState(null,null,"#"+this.slides.eq(this.activeIndex).attr("data-hash")||false),this.emit("hashSet");else{var e=this.slides.eq(this.activeIndex),t=e.attr("data-hash")||e.attr("data-history");i.location.hash=t||"",this.emit("hashSet")}},init:function(){if(!(!this.params.hashNavigation.enabled||this.params.history&&this.params.history.enabled)){this.hashNavigation.initialized=!0;var e=i.location.hash.replace("#","");if(e)for(var t=0,s=this.slides.length;t<s;t+=1){var r=this.slides.eq(t);if((r.attr("data-hash")||r.attr("data-history"))===e&&!r.hasClass(this.params.slideDuplicateClass)){var o=r.index();this.slideTo(o,0,this.params.runCallbacksOnInit,!0)}}this.params.hashNavigation.watchState&&n(a).on("hashchange",this.hashNavigation.onHashCange)}},destroy:function(){this.params.hashNavigation.watchState&&n(a).off("hashchange",this.hashNavigation.onHashCange)}},me={run:function(){var e=this,t=e.slides.eq(e.activeIndex),i=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(i=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(e.autoplay.timeout),e.autoplay.timeout=d.nextTick((function(){e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(e.slides.length-1,e.params.speed,!0,!0),e.emit("autoplay")):(e.slidePrev(e.params.speed,!0,!0),e.emit("autoplay")):e.params.loop?(e.loopFix(),e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?e.autoplay.stop():(e.slideTo(0,e.params.speed,!0,!0),e.emit("autoplay")):(e.slideNext(e.params.speed,!0,!0),e.emit("autoplay")),e.params.cssMode&&e.autoplay.running&&e.autoplay.run()}),i)},start:function(){return void 0===this.autoplay.timeout&&(!this.autoplay.running&&(this.autoplay.running=!0,this.emit("autoplayStart"),this.autoplay.run(),!0))},stop:function(){return!!this.autoplay.running&&(void 0!==this.autoplay.timeout&&(this.autoplay.timeout&&(clearTimeout(this.autoplay.timeout),this.autoplay.timeout=void 0),this.autoplay.running=!1,this.emit("autoplayStop"),!0))},pause:function(e){this.autoplay.running&&(this.autoplay.paused||(this.autoplay.timeout&&clearTimeout(this.autoplay.timeout),this.autoplay.paused=!0,0!==e&&this.params.autoplay.waitForTransition?(this.$wrapperEl[0].addEventListener("transitionend",this.autoplay.onTransitionEnd),this.$wrapperEl[0].addEventListener("webkitTransitionEnd",this.autoplay.onTransitionEnd)):(this.autoplay.paused=!1,this.autoplay.run())))}},ge={setTranslate:function(){for(var e=this.slides,t=0;t<e.length;t+=1){var i=this.slides.eq(t),s=-i[0].swiperSlideOffset;this.params.virtualTranslate||(s-=this.translate);var a=0;this.isHorizontal()||(a=s,s=0);var r=this.params.fadeEffect.crossFade?Math.max(1-Math.abs(i[0].progress),0):1+Math.min(Math.max(i[0].progress,-1),0);i.css({opacity:r}).transform("translate3d("+s+"px, "+a+"px, 0px)")}},setTransition:function(e){var t=this,i=t.slides,s=t.$wrapperEl;if(i.transition(e),t.params.virtualTranslate&&0!==e){var a=!1;i.transitionEnd((function(){if(!a&&t&&!t.destroyed){a=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)s.trigger(e[i])}}))}}},be={setTranslate:function(){var e,t=this.$el,i=this.$wrapperEl,s=this.slides,a=this.width,r=this.height,o=this.rtlTranslate,l=this.size,d=this.params.cubeEffect,h=this.isHorizontal(),p=this.virtual&&this.params.virtual.enabled,c=0;d.shadow&&(h?(0===(e=i.find(".swiper-cube-shadow")).length&&(e=n('<div class="swiper-cube-shadow"></div>'),i.append(e)),e.css({height:a+"px"})):0===(e=t.find(".swiper-cube-shadow")).length&&(e=n('<div class="swiper-cube-shadow"></div>'),t.append(e)));for(var u=0;u<s.length;u+=1){var v=s.eq(u),f=u;p&&(f=parseInt(v.attr("data-swiper-slide-index"),10));var m=90*f,g=Math.floor(m/360);o&&(m=-m,g=Math.floor(-m/360));var b=Math.max(Math.min(v[0].progress,1),-1),w=0,y=0,x=0;f%4==0?(w=4*-g*l,x=0):(f-1)%4==0?(w=0,x=4*-g*l):(f-2)%4==0?(w=l+4*g*l,x=l):(f-3)%4==0&&(w=-l,x=3*l+4*l*g),o&&(w=-w),h||(y=w,w=0);var E="rotateX("+(h?0:-m)+"deg) rotateY("+(h?m:0)+"deg) translate3d("+w+"px, "+y+"px, "+x+"px)";if(b<=1&&b>-1&&(c=90*f+90*b,o&&(c=90*-f-90*b)),v.transform(E),d.slideShadows){var T=h?v.find(".swiper-slide-shadow-left"):v.find(".swiper-slide-shadow-top"),S=h?v.find(".swiper-slide-shadow-right"):v.find(".swiper-slide-shadow-bottom");0===T.length&&(T=n('<div class="swiper-slide-shadow-'+(h?"left":"top")+'"></div>'),v.append(T)),0===S.length&&(S=n('<div class="swiper-slide-shadow-'+(h?"right":"bottom")+'"></div>'),v.append(S)),T.length&&(T[0].style.opacity=Math.max(-b,0)),S.length&&(S[0].style.opacity=Math.max(b,0))}}if(i.css({"-webkit-transform-origin":"50% 50% -"+l/2+"px","-moz-transform-origin":"50% 50% -"+l/2+"px","-ms-transform-origin":"50% 50% -"+l/2+"px","transform-origin":"50% 50% -"+l/2+"px"}),d.shadow)if(h)e.transform("translate3d(0px, "+(a/2+d.shadowOffset)+"px, "+-a/2+"px) rotateX(90deg) rotateZ(0deg) scale("+d.shadowScale+")");else{var C=Math.abs(c)-90*Math.floor(Math.abs(c)/90),M=1.5-(Math.sin(2*C*Math.PI/360)/2+Math.cos(2*C*Math.PI/360)/2),P=d.shadowScale,z=d.shadowScale/M,k=d.shadowOffset;e.transform("scale3d("+P+", 1, "+z+") translate3d(0px, "+(r/2+k)+"px, "+-r/2/z+"px) rotateX(-90deg)")}var $=_.isSafari||_.isWebView?-l/2:0;i.transform("translate3d(0px,0,"+$+"px) rotateX("+(this.isHorizontal()?0:c)+"deg) rotateY("+(this.isHorizontal()?-c:0)+"deg)")},setTransition:function(e){var t=this.$el;this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),this.params.cubeEffect.shadow&&!this.isHorizontal()&&t.find(".swiper-cube-shadow").transition(e)}},we={setTranslate:function(){for(var e=this.slides,t=this.rtlTranslate,i=0;i<e.length;i+=1){var s=e.eq(i),a=s[0].progress;this.params.flipEffect.limitRotation&&(a=Math.max(Math.min(s[0].progress,1),-1));var r=-180*a,o=0,l=-s[0].swiperSlideOffset,d=0;if(this.isHorizontal()?t&&(r=-r):(d=l,l=0,o=-r,r=0),s[0].style.zIndex=-Math.abs(Math.round(a))+e.length,this.params.flipEffect.slideShadows){var h=this.isHorizontal()?s.find(".swiper-slide-shadow-left"):s.find(".swiper-slide-shadow-top"),p=this.isHorizontal()?s.find(".swiper-slide-shadow-right"):s.find(".swiper-slide-shadow-bottom");0===h.length&&(h=n('<div class="swiper-slide-shadow-'+(this.isHorizontal()?"left":"top")+'"></div>'),s.append(h)),0===p.length&&(p=n('<div class="swiper-slide-shadow-'+(this.isHorizontal()?"right":"bottom")+'"></div>'),s.append(p)),h.length&&(h[0].style.opacity=Math.max(-a,0)),p.length&&(p[0].style.opacity=Math.max(a,0))}s.transform("translate3d("+l+"px, "+d+"px, 0px) rotateX("+o+"deg) rotateY("+r+"deg)")}},setTransition:function(e){var t=this,i=t.slides,s=t.activeIndex,a=t.$wrapperEl;if(i.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e),t.params.virtualTranslate&&0!==e){var r=!1;i.eq(s).transitionEnd((function(){if(!r&&t&&!t.destroyed){r=!0,t.animating=!1;for(var e=["webkitTransitionEnd","transitionend"],i=0;i<e.length;i+=1)a.trigger(e[i])}}))}}},ye={setTranslate:function(){for(var e=this.width,t=this.height,i=this.slides,s=this.$wrapperEl,a=this.slidesSizesGrid,r=this.params.coverflowEffect,o=this.isHorizontal(),l=this.translate,d=o?e/2-l:t/2-l,p=o?r.rotate:-r.rotate,c=r.depth,u=0,v=i.length;u<v;u+=1){var f=i.eq(u),m=a[u],g=(d-f[0].swiperSlideOffset-m/2)/m*r.modifier,b=o?p*g:0,w=o?0:p*g,y=-c*Math.abs(g),x=r.stretch;"string"==typeof x&&-1!==x.indexOf("%")&&(x=parseFloat(r.stretch)/100*m);var E=o?0:x*g,T=o?x*g:0,S=1-(1-r.scale)*Math.abs(g);Math.abs(T)<.001&&(T=0),Math.abs(E)<.001&&(E=0),Math.abs(y)<.001&&(y=0),Math.abs(b)<.001&&(b=0),Math.abs(w)<.001&&(w=0),Math.abs(S)<.001&&(S=0);var C="translate3d("+T+"px,"+E+"px,"+y+"px) rotateX("+w+"deg) rotateY("+b+"deg) scale("+S+")";if(f.transform(C),f[0].style.zIndex=1-Math.abs(Math.round(g)),r.slideShadows){var M=o?f.find(".swiper-slide-shadow-left"):f.find(".swiper-slide-shadow-top"),P=o?f.find(".swiper-slide-shadow-right"):f.find(".swiper-slide-shadow-bottom");0===M.length&&(M=n('<div class="swiper-slide-shadow-'+(o?"left":"top")+'"></div>'),f.append(M)),0===P.length&&(P=n('<div class="swiper-slide-shadow-'+(o?"right":"bottom")+'"></div>'),f.append(P)),M.length&&(M[0].style.opacity=g>0?g:0),P.length&&(P[0].style.opacity=-g>0?-g:0)}}(h.pointerEvents||h.prefixedPointerEvents)&&(s[0].style.perspectiveOrigin=d+"px 50%")},setTransition:function(e){this.slides.transition(e).find(".swiper-slide-shadow-top, .swiper-slide-shadow-right, .swiper-slide-shadow-bottom, .swiper-slide-shadow-left").transition(e)}},xe={init:function(){var e=this.params.thumbs,t=this.constructor;e.swiper instanceof t?(this.thumbs.swiper=e.swiper,d.extend(this.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),d.extend(this.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1})):d.isObject(e.swiper)&&(this.thumbs.swiper=new t(d.extend({},e.swiper,{watchSlidesVisibility:!0,watchSlidesProgress:!0,slideToClickedSlide:!1})),this.thumbs.swiperCreated=!0),this.thumbs.swiper.$el.addClass(this.params.thumbs.thumbsContainerClass),this.thumbs.swiper.on("tap",this.thumbs.onThumbClick)},onThumbClick:function(){var e=this.thumbs.swiper;if(e){var t=e.clickedIndex,i=e.clickedSlide;if(!(i&&n(i).hasClass(this.params.thumbs.slideThumbActiveClass)||null==t)){var s;if(s=e.params.loop?parseInt(n(e.clickedSlide).attr("data-swiper-slide-index"),10):t,this.params.loop){var a=this.activeIndex;this.slides.eq(a).hasClass(this.params.slideDuplicateClass)&&(this.loopFix(),this._clientLeft=this.$wrapperEl[0].clientLeft,a=this.activeIndex);var r=this.slides.eq(a).prevAll('[data-swiper-slide-index="'+s+'"]').eq(0).index(),o=this.slides.eq(a).nextAll('[data-swiper-slide-index="'+s+'"]').eq(0).index();s=void 0===r?o:void 0===o?r:o-a<a-r?o:r}this.slideTo(s)}}},update:function(e){var t=this.thumbs.swiper;if(t){var i="auto"===t.params.slidesPerView?t.slidesPerViewDynamic():t.params.slidesPerView,s=this.params.thumbs.autoScrollOffset,a=s&&!t.params.loop;if(this.realIndex!==t.realIndex||a){var r,n,o=t.activeIndex;if(t.params.loop){t.slides.eq(o).hasClass(t.params.slideDuplicateClass)&&(t.loopFix(),t._clientLeft=t.$wrapperEl[0].clientLeft,o=t.activeIndex);var l=t.slides.eq(o).prevAll('[data-swiper-slide-index="'+this.realIndex+'"]').eq(0).index(),d=t.slides.eq(o).nextAll('[data-swiper-slide-index="'+this.realIndex+'"]').eq(0).index();r=void 0===l?d:void 0===d?l:d-o==o-l?o:d-o<o-l?d:l,n=this.activeIndex>this.previousIndex?"next":"prev"}else n=(r=this.realIndex)>this.previousIndex?"next":"prev";a&&(r+="next"===n?s:-1*s),t.visibleSlidesIndexes&&t.visibleSlidesIndexes.indexOf(r)<0&&(t.params.centeredSlides?r=r>o?r-Math.floor(i/2)+1:r+Math.floor(i/2)-1:r>o&&(r=r-i+1),t.slideTo(r,e?0:void 0))}var h=1,p=this.params.thumbs.slideThumbActiveClass;if(this.params.slidesPerView>1&&!this.params.centeredSlides&&(h=this.params.slidesPerView),this.params.thumbs.multipleActiveThumbs||(h=1),h=Math.floor(h),t.slides.removeClass(p),t.params.loop||t.params.virtual&&t.params.virtual.enabled)for(var c=0;c<h;c+=1)t.$wrapperEl.children('[data-swiper-slide-index="'+(this.realIndex+c)+'"]').addClass(p);else for(var u=0;u<h;u+=1)t.slides.eq(this.realIndex+u).addClass(p)}}},Ee=[K,U,Z,Q,ee,ie,ae,{name:"mousewheel",params:{mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarged:"container"}},create:function(){d.extend(this,{mousewheel:{enabled:!1,enable:re.enable.bind(this),disable:re.disable.bind(this),handle:re.handle.bind(this),handleMouseEnter:re.handleMouseEnter.bind(this),handleMouseLeave:re.handleMouseLeave.bind(this),animateSlider:re.animateSlider.bind(this),releaseScroll:re.releaseScroll.bind(this),lastScrollTime:d.now(),lastEventBeforeSnap:void 0,recentWheelEvents:[]}})},on:{init:function(){!this.params.mousewheel.enabled&&this.params.cssMode&&this.mousewheel.disable(),this.params.mousewheel.enabled&&this.mousewheel.enable()},destroy:function(){this.params.cssMode&&this.mousewheel.enable(),this.mousewheel.enabled&&this.mousewheel.disable()}}},{name:"navigation",params:{navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}},create:function(){d.extend(this,{navigation:{init:ne.init.bind(this),update:ne.update.bind(this),destroy:ne.destroy.bind(this),onNextClick:ne.onNextClick.bind(this),onPrevClick:ne.onPrevClick.bind(this)}})},on:{init:function(){this.navigation.init(),this.navigation.update()},toEdge:function(){this.navigation.update()},fromEdge:function(){this.navigation.update()},destroy:function(){this.navigation.destroy()},click:function(e){var t,i=this.navigation,s=i.$nextEl,a=i.$prevEl;!this.params.navigation.hideOnClick||n(e.target).is(a)||n(e.target).is(s)||(s?t=s.hasClass(this.params.navigation.hiddenClass):a&&(t=a.hasClass(this.params.navigation.hiddenClass)),!0===t?this.emit("navigationShow",this):this.emit("navigationHide",this),s&&s.toggleClass(this.params.navigation.hiddenClass),a&&a.toggleClass(this.params.navigation.hiddenClass))}}},{name:"pagination",params:{pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:function(e){return e},formatFractionTotal:function(e){return e},bulletClass:"swiper-pagination-bullet",bulletActiveClass:"swiper-pagination-bullet-active",modifierClass:"swiper-pagination-",currentClass:"swiper-pagination-current",totalClass:"swiper-pagination-total",hiddenClass:"swiper-pagination-hidden",progressbarFillClass:"swiper-pagination-progressbar-fill",progressbarOppositeClass:"swiper-pagination-progressbar-opposite",clickableClass:"swiper-pagination-clickable",lockClass:"swiper-pagination-lock"}},create:function(){d.extend(this,{pagination:{init:oe.init.bind(this),render:oe.render.bind(this),update:oe.update.bind(this),destroy:oe.destroy.bind(this),dynamicBulletIndex:0}})},on:{init:function(){this.pagination.init(),this.pagination.render(),this.pagination.update()},activeIndexChange:function(){(this.params.loop||void 0===this.snapIndex)&&this.pagination.update()},snapIndexChange:function(){this.params.loop||this.pagination.update()},slidesLengthChange:function(){this.params.loop&&(this.pagination.render(),this.pagination.update())},snapGridLengthChange:function(){this.params.loop||(this.pagination.render(),this.pagination.update())},destroy:function(){this.pagination.destroy()},click:function(e){this.params.pagination.el&&this.params.pagination.hideOnClick&&this.pagination.$el.length>0&&!n(e.target).hasClass(this.params.pagination.bulletClass)&&(!0===this.pagination.$el.hasClass(this.params.pagination.hiddenClass)?this.emit("paginationShow",this):this.emit("paginationHide",this),this.pagination.$el.toggleClass(this.params.pagination.hiddenClass))}}},{name:"scrollbar",params:{scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag"}},create:function(){d.extend(this,{scrollbar:{init:le.init.bind(this),destroy:le.destroy.bind(this),updateSize:le.updateSize.bind(this),setTranslate:le.setTranslate.bind(this),setTransition:le.setTransition.bind(this),enableDraggable:le.enableDraggable.bind(this),disableDraggable:le.disableDraggable.bind(this),setDragPosition:le.setDragPosition.bind(this),getPointerPosition:le.getPointerPosition.bind(this),onDragStart:le.onDragStart.bind(this),onDragMove:le.onDragMove.bind(this),onDragEnd:le.onDragEnd.bind(this),isTouched:!1,timeout:null,dragTimeout:null}})},on:{init:function(){this.scrollbar.init(),this.scrollbar.updateSize(),this.scrollbar.setTranslate()},update:function(){this.scrollbar.updateSize()},resize:function(){this.scrollbar.updateSize()},observerUpdate:function(){this.scrollbar.updateSize()},setTranslate:function(){this.scrollbar.setTranslate()},setTransition:function(e){this.scrollbar.setTransition(e)},destroy:function(){this.scrollbar.destroy()}}},{name:"parallax",params:{parallax:{enabled:!1}},create:function(){d.extend(this,{parallax:{setTransform:de.setTransform.bind(this),setTranslate:de.setTranslate.bind(this),setTransition:de.setTransition.bind(this)}})},on:{beforeInit:function(){this.params.parallax.enabled&&(this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},init:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTranslate:function(){this.params.parallax.enabled&&this.parallax.setTranslate()},setTransition:function(e){this.params.parallax.enabled&&this.parallax.setTransition(e)}}},{name:"zoom",params:{zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}},create:function(){var e=this,t={enabled:!1,scale:1,currentScale:1,isScaling:!1,gesture:{$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},image:{isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},velocity:{x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0}};"onGestureStart onGestureChange onGestureEnd onTouchStart onTouchMove onTouchEnd onTransitionEnd toggle enable disable in out".split(" ").forEach((function(i){t[i]=he[i].bind(e)})),d.extend(e,{zoom:t});var i=1;Object.defineProperty(e.zoom,"scale",{get:function(){return i},set:function(t){if(i!==t){var s=e.zoom.gesture.$imageEl?e.zoom.gesture.$imageEl[0]:void 0,a=e.zoom.gesture.$slideEl?e.zoom.gesture.$slideEl[0]:void 0;e.emit("zoomChange",t,s,a)}i=t}})},on:{init:function(){this.params.zoom.enabled&&this.zoom.enable()},destroy:function(){this.zoom.disable()},touchStart:function(e){this.zoom.enabled&&this.zoom.onTouchStart(e)},touchEnd:function(e){this.zoom.enabled&&this.zoom.onTouchEnd(e)},doubleTap:function(e){this.params.zoom.enabled&&this.zoom.enabled&&this.params.zoom.toggle&&this.zoom.toggle(e)},transitionEnd:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.zoom.onTransitionEnd()},slideChange:function(){this.zoom.enabled&&this.params.zoom.enabled&&this.params.cssMode&&this.zoom.onTransitionEnd()}}},{name:"lazy",params:{lazy:{enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}},create:function(){d.extend(this,{lazy:{initialImageLoaded:!1,load:pe.load.bind(this),loadInSlide:pe.loadInSlide.bind(this)}})},on:{beforeInit:function(){this.params.lazy.enabled&&this.params.preloadImages&&(this.params.preloadImages=!1)},init:function(){this.params.lazy.enabled&&!this.params.loop&&0===this.params.initialSlide&&this.lazy.load()},scroll:function(){this.params.freeMode&&!this.params.freeModeSticky&&this.lazy.load()},resize:function(){this.params.lazy.enabled&&this.lazy.load()},scrollbarDragMove:function(){this.params.lazy.enabled&&this.lazy.load()},transitionStart:function(){this.params.lazy.enabled&&(this.params.lazy.loadOnTransitionStart||!this.params.lazy.loadOnTransitionStart&&!this.lazy.initialImageLoaded)&&this.lazy.load()},transitionEnd:function(){this.params.lazy.enabled&&!this.params.lazy.loadOnTransitionStart&&this.lazy.load()},slideChange:function(){this.params.lazy.enabled&&this.params.cssMode&&this.lazy.load()}}},{name:"controller",params:{controller:{control:void 0,inverse:!1,by:"slide"}},create:function(){d.extend(this,{controller:{control:this.params.controller.control,getInterpolateFunction:ce.getInterpolateFunction.bind(this),setTranslate:ce.setTranslate.bind(this),setTransition:ce.setTransition.bind(this)}})},on:{update:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},resize:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},observerUpdate:function(){this.controller.control&&this.controller.spline&&(this.controller.spline=void 0,delete this.controller.spline)},setTranslate:function(e,t){this.controller.control&&this.controller.setTranslate(e,t)},setTransition:function(e,t){this.controller.control&&this.controller.setTransition(e,t)}}},{name:"a11y",params:{a11y:{enabled:!0,notificationClass:"swiper-notification",prevSlideMessage:"Previous slide",nextSlideMessage:"Next slide",firstSlideMessage:"This is the first slide",lastSlideMessage:"This is the last slide",paginationBulletMessage:"Go to slide {{index}}"}},create:function(){var e=this;d.extend(e,{a11y:{liveRegion:n('<span class="'+e.params.a11y.notificationClass+'" aria-live="assertive" aria-atomic="true"></span>')}}),Object.keys(ue).forEach((function(t){e.a11y[t]=ue[t].bind(e)}))},on:{init:function(){this.params.a11y.enabled&&(this.a11y.init(),this.a11y.updateNavigation())},toEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},fromEdge:function(){this.params.a11y.enabled&&this.a11y.updateNavigation()},paginationUpdate:function(){this.params.a11y.enabled&&this.a11y.updatePagination()},destroy:function(){this.params.a11y.enabled&&this.a11y.destroy()}}},{name:"history",params:{history:{enabled:!1,replaceState:!1,key:"slides"}},create:function(){d.extend(this,{history:{init:ve.init.bind(this),setHistory:ve.setHistory.bind(this),setHistoryPopState:ve.setHistoryPopState.bind(this),scrollToSlide:ve.scrollToSlide.bind(this),destroy:ve.destroy.bind(this)}})},on:{init:function(){this.params.history.enabled&&this.history.init()},destroy:function(){this.params.history.enabled&&this.history.destroy()},transitionEnd:function(){this.history.initialized&&this.history.setHistory(this.params.history.key,this.activeIndex)},slideChange:function(){this.history.initialized&&this.params.cssMode&&this.history.setHistory(this.params.history.key,this.activeIndex)}}},{name:"hash-navigation",params:{hashNavigation:{enabled:!1,replaceState:!1,watchState:!1}},create:function(){d.extend(this,{hashNavigation:{initialized:!1,init:fe.init.bind(this),destroy:fe.destroy.bind(this),setHash:fe.setHash.bind(this),onHashCange:fe.onHashCange.bind(this)}})},on:{init:function(){this.params.hashNavigation.enabled&&this.hashNavigation.init()},destroy:function(){this.params.hashNavigation.enabled&&this.hashNavigation.destroy()},transitionEnd:function(){this.hashNavigation.initialized&&this.hashNavigation.setHash()},slideChange:function(){this.hashNavigation.initialized&&this.params.cssMode&&this.hashNavigation.setHash()}}},{name:"autoplay",params:{autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1}},create:function(){var e=this;d.extend(e,{autoplay:{running:!1,paused:!1,run:me.run.bind(e),start:me.start.bind(e),stop:me.stop.bind(e),pause:me.pause.bind(e),onVisibilityChange:function(){"hidden"===document.visibilityState&&e.autoplay.running&&e.autoplay.pause(),"visible"===document.visibilityState&&e.autoplay.paused&&(e.autoplay.run(),e.autoplay.paused=!1)},onTransitionEnd:function(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===this&&(e.$wrapperEl[0].removeEventListener("transitionend",e.autoplay.onTransitionEnd),e.$wrapperEl[0].removeEventListener("webkitTransitionEnd",e.autoplay.onTransitionEnd),e.autoplay.paused=!1,e.autoplay.running?e.autoplay.run():e.autoplay.stop())}}})},on:{init:function(){this.params.autoplay.enabled&&(this.autoplay.start(),document.addEventListener("visibilitychange",this.autoplay.onVisibilityChange))},beforeTransitionStart:function(e,t){this.autoplay.running&&(t||!this.params.autoplay.disableOnInteraction?this.autoplay.pause(e):this.autoplay.stop())},sliderFirstMove:function(){this.autoplay.running&&(this.params.autoplay.disableOnInteraction?this.autoplay.stop():this.autoplay.pause())},touchEnd:function(){this.params.cssMode&&this.autoplay.paused&&!this.params.autoplay.disableOnInteraction&&this.autoplay.run()},destroy:function(){this.autoplay.running&&this.autoplay.stop(),document.removeEventListener("visibilitychange",this.autoplay.onVisibilityChange)}}},{name:"effect-fade",params:{fadeEffect:{crossFade:!1}},create:function(){d.extend(this,{fadeEffect:{setTranslate:ge.setTranslate.bind(this),setTransition:ge.setTransition.bind(this)}})},on:{beforeInit:function(){if("fade"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"fade");var e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};d.extend(this.params,e),d.extend(this.originalParams,e)}},setTranslate:function(){"fade"===this.params.effect&&this.fadeEffect.setTranslate()},setTransition:function(e){"fade"===this.params.effect&&this.fadeEffect.setTransition(e)}}},{name:"effect-cube",params:{cubeEffect:{slideShadows:!0,shadow:!0,shadowOffset:20,shadowScale:.94}},create:function(){d.extend(this,{cubeEffect:{setTranslate:be.setTranslate.bind(this),setTransition:be.setTransition.bind(this)}})},on:{beforeInit:function(){if("cube"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"cube"),this.classNames.push(this.params.containerModifierClass+"3d");var e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,resistanceRatio:0,spaceBetween:0,centeredSlides:!1,virtualTranslate:!0};d.extend(this.params,e),d.extend(this.originalParams,e)}},setTranslate:function(){"cube"===this.params.effect&&this.cubeEffect.setTranslate()},setTransition:function(e){"cube"===this.params.effect&&this.cubeEffect.setTransition(e)}}},{name:"effect-flip",params:{flipEffect:{slideShadows:!0,limitRotation:!0}},create:function(){d.extend(this,{flipEffect:{setTranslate:we.setTranslate.bind(this),setTransition:we.setTransition.bind(this)}})},on:{beforeInit:function(){if("flip"===this.params.effect){this.classNames.push(this.params.containerModifierClass+"flip"),this.classNames.push(this.params.containerModifierClass+"3d");var e={slidesPerView:1,slidesPerColumn:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!0};d.extend(this.params,e),d.extend(this.originalParams,e)}},setTranslate:function(){"flip"===this.params.effect&&this.flipEffect.setTranslate()},setTransition:function(e){"flip"===this.params.effect&&this.flipEffect.setTransition(e)}}},{name:"effect-coverflow",params:{coverflowEffect:{rotate:50,stretch:0,depth:100,scale:1,modifier:1,slideShadows:!0}},create:function(){d.extend(this,{coverflowEffect:{setTranslate:ye.setTranslate.bind(this),setTransition:ye.setTransition.bind(this)}})},on:{beforeInit:function(){"coverflow"===this.params.effect&&(this.classNames.push(this.params.containerModifierClass+"coverflow"),this.classNames.push(this.params.containerModifierClass+"3d"),this.params.watchSlidesProgress=!0,this.originalParams.watchSlidesProgress=!0)},setTranslate:function(){"coverflow"===this.params.effect&&this.coverflowEffect.setTranslate()},setTransition:function(e){"coverflow"===this.params.effect&&this.coverflowEffect.setTransition(e)}}},{name:"thumbs",params:{thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-container-thumbs"}},create:function(){d.extend(this,{thumbs:{swiper:null,init:xe.init.bind(this),update:xe.update.bind(this),onThumbClick:xe.onThumbClick.bind(this)}})},on:{beforeInit:function(){var e=this.params.thumbs;e&&e.swiper&&(this.thumbs.init(),this.thumbs.update(!0))},slideChange:function(){this.thumbs.swiper&&this.thumbs.update()},update:function(){this.thumbs.swiper&&this.thumbs.update()},resize:function(){this.thumbs.swiper&&this.thumbs.update()},observerUpdate:function(){this.thumbs.swiper&&this.thumbs.update()},setTransition:function(e){var t=this.thumbs.swiper;t&&t.setTransition(e)},beforeDestroy:function(){var e=this.thumbs.swiper;e&&this.thumbs.swiperCreated&&e&&e.destroy()}}}];return void 0===j.use&&(j.use=j.Class.use,j.installModule=j.Class.installModule),j.use(Ee),j})); 25004//# sourceMappingURL=swiper.min.js.map 25005 25006/***/ }), 25007
vendor: 737 bytes, lines 25008-25038
25008/***/ "../../../../../node_modules/webpack/buildin/global.js": 25009/*!***********************************!*\ 25010 !*** (webpack)/buildin/global.js ***! 25011 \***********************************/ 25012/*! no static exports found */ 25013/***/ (function(module, exports) { 25014 25015var g; 25016 25017// This works in non-strict mode 25018g = (function() { 25019 return this; 25020})(); 25021 25022try { 25023 // This works if eval is allowed (see CSP) 25024 g = g || new Function("return this")(); 25025} catch (e) { 25026 // This works if the window reference is available 25027 if (typeof window === "object") g = window; 25028} 25029 25030// g can still be undefined, but nothing to do about it... 25031// We return undefined, instead of nothing here, so it's 25032// easier to handle this case. if(!global) { ...} 25033 25034module.exports = g; 25035 25036 25037/***/ }), 25038
vendor: 870 bytes, lines 25039-25073
25039/***/ "../../../../../node_modules/webpack/buildin/harmony-module.js": 25040/*!*******************************************!*\ 25041 !*** (webpack)/buildin/harmony-module.js ***! 25042 \*******************************************/ 25043/*! no static exports found */ 25044/***/ (function(module, exports) { 25045 25046module.exports = function(originalModule) { 25047 if (!originalModule.webpackPolyfill) { 25048 var module = Object.create(originalModule); 25049 // module.parent = undefined by default 25050 if (!module.children) module.children = []; 25051 Object.defineProperty(module, "loaded", { 25052 enumerable: true, 25053 get: function() { 25054 return module.l; 25055 } 25056 }); 25057 Object.defineProperty(module, "id", { 25058 enumerable: true, 25059 get: function() { 25060 return module.i; 25061 } 25062 }); 25063 Object.defineProperty(module, "exports", { 25064 enumerable: true 25065 }); 25066 module.webpackPolyfill = 1; 25067 } 25068 return module; 25069}; 25070 25071 25072/***/ }), 25073
25074/***/ "./app.js": 25075/*!****************!*\ 25076 !*** ./app.js ***! 25077 \****************/ 25078/*! no exports provided */ 25079/***/ (function(module, __webpack_exports__, __webpack_require__) { 25080 25081"use strict"; 25082__webpack_require__.r(__webpack_exports__); 25083/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "../../../../../node_modules/jquery/dist/jquery.js"); 25084/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); 25085/* harmony import */ var object_fit_images__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! object-fit-images */ "../../../../../node_modules/object-fit-images/dist/ofi.common-js.js"); 25086/* harmony import */ var object_fit_images__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(object_fit_images__WEBPACK_IMPORTED_MODULE_1__); 25087/* harmony import */ var object_fit_videos__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! object-fit-videos */ "../../../../../node_modules/object-fit-videos/object-fit-videos.js"); 25088/* harmony import */ var object_fit_videos__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(object_fit_videos__WEBPACK_IMPORTED_MODULE_2__); 25089/* harmony import */ var mustache__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mustache */ "../../../../../node_modules/mustache/mustache.js"); 25090/* harmony import */ var mustache__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(mustache__WEBPACK_IMPORTED_MODULE_3__); 25091/* harmony import */ var swiper_js_swiper_min_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! swiper/js/swiper.min.js */ "../../../../../node_modules/swiper/js/swiper.min.js"); 25092/* harmony import */ var swiper_js_swiper_min_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(swiper_js_swiper_min_js__WEBPACK_IMPORTED_MODULE_4__); 25093/* harmony import */ var headroom_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! headroom.js */ "../../../../../node_modules/headroom.js/dist/headroom.js"); 25094/* harmony import */ var headroom_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(headroom_js__WEBPACK_IMPORTED_MODULE_5__); 25095/* harmony import */ var scrollmagic__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! scrollmagic */ "../../../../../node_modules/scrollmagic/scrollmagic/uncompressed/ScrollMagic.js"); 25096/* harmony import */ var scrollmagic__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(scrollmagic__WEBPACK_IMPORTED_MODULE_6__); 25097/* harmony import */ var scrollmagic_scrollmagic_uncompressed_plugins_debug_addIndicators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! scrollmagic/scrollmagic/uncompressed/plugins/debug.addIndicators */ "../../../../../node_modules/scrollmagic/scrollmagic/uncompressed/plugins/debug.addIndicators.js"); 25098/* harmony import */ var scrollmagic_scrollmagic_uncompressed_plugins_debug_addIndicators__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(scrollmagic_scrollmagic_uncompressed_plugins_debug_addIndicators__WEBPACK_IMPORTED_MODULE_7__); 25099/* harmony import */ var animation_gsap__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! animation.gsap */ "../../../../../node_modules/scrollmagic/scrollmagic/minified/plugins/animation.gsap.min.js"); 25100/* harmony import */ var animation_gsap__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(animation_gsap__WEBPACK_IMPORTED_MODULE_8__); 25101function requireAll(r) { r.keys().forEach(r); } 25102 25103requireAll( __webpack_require__("./ico sync recursive ^\\.\\/.*$") ); 25104requireAll( __webpack_require__("./svg sync recursive \\.svg$") ); 25105requireAll( __webpack_require__("./png sync recursive \\.png$") ); 25106 25107 25108 25109window.jQuery = jquery__WEBPACK_IMPORTED_MODULE_0___default.a; 25110window.$ = jquery__WEBPACK_IMPORTED_MODULE_0___default.a; 25111 25112 25113 25114 25115 25116 25117 25118 25119 25120 25121 25122 25123__webpack_require__( /*! es6-object-assign/auto */ "../../../../../node_modules/es6-object-assign/auto.js" ); 25124 25125jquery__WEBPACK_IMPORTED_MODULE_0___default()(function () { 25126 25127 var PROJECT = { 25128 25129 common: { 25130 25131 getViewport: function() { 25132 25133 var viewPortWidth; 25134 var viewPortHeight; 25135 25136 if (typeof window.innerWidth !== 'undefined') { 25137 25138 viewPortWidth = window.innerWidth; 25139 viewPortHeight = window.innerHeight; 25140 25141 } else if ( typeof document.documentElement !== 'undefined' && 25142 typeof document.documentElement.clientWidth !== 'undefined' && 25143 document.documentElement.clientWidth !== 0 ) { 25144 25145 viewPortWidth = document.documentElement.clientWidth; 25146 viewPortHeight = document.documentElement.clientHeight; 25147 25148 } else { 25149 25150 viewPortWidth = document.getElementsByTagName('body')[0].clientWidth; 25151 viewPortHeight = document.getElementsByTagName('body')[0].clientHeight; 25152 } 25153 25154 return { width : viewPortWidth , height : viewPortHeight }; 25155 25156 }, 25157 25158 init: function () { 25159 25160 object_fit_images__WEBPACK_IMPORTED_MODULE_1___default()(); 25161 object_fit_videos__WEBPACK_IMPORTED_MODULE_2___default()(); 25162 25163 PROJECT.nav.init();
25164 PROJECT.lang.init(); 25165 PROJECT.list.init(); 25166 PROJECT.listing.init(); 25167 PROJECT.timeline.init(); 25168 PROJECT.events.init(); 25169 PROJECT.gform.init(); 25170 PROJECT.faq.init(); 25171 PROJECT.video.init(); 25172 PROJECT.lightbox.init(); 25173 25174 } 25175 25176 }, 25177 25178 nav: { 25179 25180 init: function() { 25181 25182 PROJECT.nav.sticky(); 25183 25184 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'click', '.navToggleSubmenu', { 25185 25186 class: 'nav__item--has-submenu-open', 25187 classElement: '.nav__item', 25188 navElement: '.nav__subnav', 25189 reset: true 25190 25191 }, PROJECT.nav.toggle ); 25192 25193 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'click', '.navToggle', { 25194 25195 class: 'state-role-nav--nav-open', 25196 classElement: 'html', 25197 navElement: '', 25198 reset: false 25199 25200 }, PROJECT.nav.toggle ); 25201 25202 }, 25203 25204 toggle: function ( e ) { 25205 25206 e.preventDefault(); 25207 25208 var parent = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).closest( e.data.classElement ); 25209 25210 if ( !jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).hasClass( e.data.class ) ) { 25211 25212 PROJECT.nav.open( e ); 25213 25214 } else { 25215 25216 PROJECT.nav.close( e ); 25217 25218 } 25219 25220 }, 25221 25222 open: function( e ) { 25223 25224 if ( e.data.reset ) { 25225 25226 jquery__WEBPACK_IMPORTED_MODULE_0___default()( e.data.navElement ).slideUp( 250 ); 25227 25228 jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.' + e.data.class ).removeClass( e.data.class ); 25229 25230 } 25231 25232 var parent = jquery__WEBPACK_IMPORTED_MODULE_0___default()( e.currentTarget ).closest( e.data.classElement ); 25233 25234 jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).addClass( e.data.class ); 25235 25236 if ( e.data.navElement !== '' ) { 25237 25238 jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).find( e.data.navElement ).slideDown( 250 ); 25239 25240 } 25241 25242 }, 25243 25244 close: function( e ) { 25245 25246 var parent = jquery__WEBPACK_IMPORTED_MODULE_0___default()( e.currentTarget ).closest( e.data.classElement ); 25247 25248 jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).removeClass( e.data.class ); 25249 25250 if ( e.data.navElement !== '' ) { 25251 25252 jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).find( e.data.navElement ).slideUp( 250 ); 25253 25254 } 25255 25256 }, 25257 25258 esc: function( e ) { 25259 25260 var $element = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ); 25261 25262 if ( !$element.hasClass( '.navToggleSubmenu' ) ) { 25263 25264 var $submenu = $element.closest( '.navSubmenu' ); 25265 25266 if ( $submenu <= 0 ) { 25267 25268 PROJECT.nav.close( { 25269 25270 data : { 25271 25272 class : 'nav__item--has-submenu-open', 25273 classElement : '.nav__item', 25274 navElement : '.nav__subnav', 25275 25276 } 25277 25278 } ); 25279 25280 } 25281 25282 } 25283 25284 }, 25285 25286 sticky: function() { 25287 25288 var header = document.getElementsByTagName( 'body' )[0]; 25289 25290 var headerSticky = new headroom_js__WEBPACK_IMPORTED_MODULE_5___default.a( header, { 25291 25292 offset : 50, 25293 tolerance : 0, 25294 classes : { 25295 25296 initial : "state-role-nav", 25297 pinned : "state-role-nav--pinned", 25298 unpinned : "state-role-nav--unpinned", 25299 top : "state-role-nav--top", 25300 notTop : "state-role-nav--not-top", 25301 bottom : "state-role-nav--bottom", 25302 notBottom : "state-role-nav--not-bottom" 25303 25304 } 25305 25306 }); 25307 25308 headerSticky.init(); 25309 25310 } 25311 25312 }, 25313 25314 lang: { 25315 25316 init: function() { 25317 25318 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'click', '.langToggle', PROJECT.lang.open ); 25319 25320 }, 25321 25322 open: function( e ) { 25323 25324 var viewport = PROJECT.common.getViewport(); 25325 var $switch = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).closest( '.langSwitch' ); 25326 25327 if ( $switch.hasClass( 'navigation__lang--open' ) ) { 25328 25329 $switch.removeClass( 'navigation__lang--open' ); 25330 $switch.find( '.langDropdown' ).slideUp( 200 ); 25331 25332 } else { 25333 25334 $switch.addClass( 'navigation__lang--open' ); 25335 $switch.find( '.langDropdown' ).slideDown( 200 ); 25336 25337 } 25338 25339 } 25340 25341 }, 25342 25343 faq: { 25344 25345 init: function() { 25346 25347 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'click', '.faqToggle', { 25348 25349 class: 'v-faq--open', 25350 classElement: '.faqItem', 25351 navElement: '.faqText', 25352 25353 }, PROJECT.faq.toggle ); 25354 25355 }, 25356 25357 toggle: function ( e ) { 25358 25359 e.preventDefault(); 25360 25361 var parent = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).closest( e.data.classElement ); 25362 25363 if ( !jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).hasClass( e.data.class ) ) { 25364 25365 jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).addClass( e.data.class ); 25366 25367 if ( e.data.navElement !== '' ) { 25368 25369 jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).find( e.data.navElement ).slideDown( 250 ); 25370 25371 } 25372 25373 } else { 25374 25375 jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).removeClass( e.data.class ); 25376 25377 if ( e.data.navElement !== '' ) { 25378 25379 jquery__WEBPACK_IMPORTED_MODULE_0___default()( parent ).find( e.data.navElement ).slide
25379Up( 250 ); 25380 25381 } 25382 25383 } 25384 25385 }, 25386 25387 }, 25388 25389 listing: { 25390 25391 sliders: [], 25392 25393 init: function() { 25394 25395 PROJECT.listing.initSlider(); 25396 25397 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'mouseover', '.hoverListingItem', PROJECT.listing.gotoSlide ); 25398 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'click', '.showHiddenListing', PROJECT.listing.showHidden ); 25399 25400 jquery__WEBPACK_IMPORTED_MODULE_0___default()( window ).on( 'resize orientationchange', PROJECT.listing.initSlider ); 25401 25402 }, 25403 25404 initSlider: function() { 25405 25406 jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.sliderListingCarousel' ).each( function() { 25407 25408 var listingSlider = new swiper_js_swiper_min_js__WEBPACK_IMPORTED_MODULE_4___default.a( jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).get( 0 ), { 25409 25410 slidesPerView: 1, 25411 25412 loop: true, 25413 25414 spaceBetween: 0, 25415 25416 effect: 'fade', 25417 25418 fadeEffect: { 25419 25420 crossFade: true 25421 25422 }, 25423 25424 }); 25425 25426 var key = PROJECT.listing.sliders = listingSlider; 25427 25428 }); 25429 25430 }, 25431 25432 gotoSlide: function( e ) { 25433 25434 var slideNo = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).data( 'slide-no' ); 25435 25436 PROJECT.listing.sliders.slideTo( slideNo ); 25437 25438 }, 25439 25440 showHidden: function( e ) { 25441 25442 e.preventDefault(); 25443 25444 jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).fadeOut( 200, function() { 25445 25446 var $section = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).closest( '.listingSection' ); 25447 25448 $section.find( '.listingHidden' ).slideDown( 200 ); 25449 25450 }); 25451 25452 } 25453 25454 }, 25455 25456 timeline: { 25457 25458 sliders: [], 25459 controller: '', 25460 25461 init: function() { 25462 25463 PROJECT.timeline.initSlider(); 25464 25465 PROJECT.timeline.initScroll(); 25466 25467 }, 25468 25469 initSlider: function() { 25470 25471 jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.jsSliderTimeline' ).each( function() { 25472 25473 var timelineSlider = new swiper_js_swiper_min_js__WEBPACK_IMPORTED_MODULE_4___default.a( jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).get( 0 ), { 25474 25475 slidesPerView: 1, 25476 25477 loop: true, 25478 25479 spaceBetween: 0, 25480 25481 effect: 'fade', 25482 25483 fadeEffect: { 25484 25485 crossFade: true 25486 25487 }, 25488 25489 }); 25490 25491 PROJECT.timeline.sliders = timelineSlider; 25492 25493 }); 25494 25495 }, 25496 25497 initScroll: function () { 25498 25499 PROJECT.timeline.controller = new scrollmagic__WEBPACK_IMPORTED_MODULE_6___default.a.Controller({ addIndicators: true }); 25500 25501 PROJECT.timeline.addTimelineSticky(); 25502 PROJECT.timeline.addTimelineChange(); 25503 25504 jquery__WEBPACK_IMPORTED_MODULE_0___default()( window ).on( 'resize.scrollmagic orientationchange.scrollmagic', PROJECT.timeline.reset ); 25505 25506 }, 25507 25508 addTimelineSticky: function () { 25509 25510 var element = jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.jsTimelineSection' ); 25511 25512 jquery__WEBPACK_IMPORTED_MODULE_0___default()( element ).each( function( i ) { 25513 25514 var viewport = PROJECT.common.getViewport(); 25515 25516 var element = this; 25517 25518 var stickyElement = jquery__WEBPACK_IMPORTED_MODULE_0___default()( element ).find( '.jsScrollTimeline' ); 25519 var heightElement = jquery__WEBPACK_IMPORTED_MODULE_0___default()( element ).find( '.jsTimeline' ); 25520 25521 jquery__WEBPACK_IMPORTED_MODULE_0___default()( stickyElement ).removeAttr( 'style' ); 25522 25523 var stickyElementWidth = stickyElement.width(); 25524 25525 jquery__WEBPACK_IMPORTED_MODULE_0___default()( stickyElement ).width( stickyElementWidth ); 25526 25527 var elementHeight = jquery__WEBPACK_IMPORTED_MODULE_0___default()( heightElement ).height(); 25528 elementHeight = elementHeight - stickyElement.height(); 25529 25530 var stickyScene = new scrollmagic__WEBPACK_IMPORTED_MODULE_6___default.a.Scene({ 25531 25532 triggerElement: element, 25533 triggerHook: '0', 25534 duration: elementHeight, 25535 25536 }) 25537 .setPin( stickyElement.get( 0 ) ) 25538 .addTo( PROJECT.timeline.controller ); 25539 25540 }); 25541 25542 }, 25543 25544 addTimelineChange: function () { 25545 25546 var element = jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.jsTimelineYear' ); 25547 25548 jquery__WEBPACK_IMPORTED_MODULE_0___default()( element ).each( function( i ) { 25549 25550 var element = this; 25551 25552 var stickyScene = new scrollmagic__WEBPACK_IMPORTED_MODULE_6___default.a.Scene({ 25553 25554 triggerElement: element, 25555 triggerHook: '0.5', 25556 duration: 0, 25557 25558 }) 25559 .on( 'start', function( e ) { 25560 25561 jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.timeline__year--active' ).removeClass( 'timeline__year--active' ); 25562 25563 var $triggerElement = jquery__WEBPACK_IMPORTED_MODULE_0___default()( e.currentTarget.triggerElement() ); 25564 $triggerElement.addClass( 'timeline__year--active' ); 25565 25566 var triggerNo = $triggerElement.data( 'trigger-no' ); 25567 25568 PROJECT.timeline.sliders.slideTo( triggerNo ); 25569 25570 }) 25571 .addTo( PROJECT.timeline.controller ); 25572 25573 }); 25574 25575 }, 25576 25577 reset: function() { 25578 25579 jquery__WEBPACK_IMPORTED_MODULE_0___default()( window ).off( 'resize.scrollmagic orientationchange.scrollmagic' ); 25580 25581 PROJECT.timeline.controller.destroy( true ); 25582 25583 PROJECT.timeline.initScroll(); 25584 25585 }, 25586 25587 }, 25588 25589 events: { 25590 25591 sliders: [], 25592 25593 init: function() { 25594 25595 PROJECT.events.initSlider(); 25596 25597 }, 25598 25599 initSlider: function() { 25600 25601 jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.jsEventsSlider' ).each( function() { 25602 25603 var $sliderSection = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).closest( '.jsEventsSection' ); 25604 25605 var prevEl = $sliderSection.find( '.jsEventsPrev' ).get( 0 ); 25606 var nextEl = $sliderSection.find( '.jsEventsNext' ).get( 0 ); 25607 25608 var eventsSlider = new swiper_js_swiper_min_js__WEBPACK_IMPORTED_MODULE_4___default.a( jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).get( 0 ), { 25609 25610 slidesPerView: 2, 25611 25612 loop: true, 25613 25614 spaceBetween: 24, 25615 25616 containerModifierClass: 'events__slider--', 25617 25618 slideClass: 'events__slide', 25619 slideActiveClass: 'events__slide--active', 25620 slideVisibleClass: 'events__slide--visible', 25621 25622 wrapperClass: 'events__wrapper', 25623 25624 navigation: { 25625 25626 nextEl: nextEl, 25627 prevEl: prevEl 25628 25629 }, 25630 25631 breakpoints: { 25632 25633 1200: { 25634 25635 slidesPerView: 3, 25636 spaceBetween: 40 25637 25638 } 25639 25640 } 25641 25642 }); 25643 25644 var key = PROJECT.events.sliders = eventsSlider; 25645 25646 }); 25647 25648 jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.jsEventsSliderModules' ).each( function() { 25649 25650 var $sliderSection = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).closest( '.jsEventsSection' ); 25651 25652 var prevEl = $sliderSection.find( '.jsEventsPrev' ).get( 0 ); 25653 var nextEl = $sliderSection.find( '.jsEventsNext' ).get( 0 ); 25654 25655 var eventsSlider = new swiper_js_swiper_min_js__WEBPACK_IMPORTED_MODULE_4___default.a( jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).get( 0 ), { 25656 25657 slidesPerView: 2, 25658 25659 loop: false, 25660 25661 spaceBetween: 24, 25662 25663 containerModifierClass: 'events__slider--', 25664 25665 slideClass: 'events__slide', 25666 slideActiveClass: 'events__slide--active', 25667 slideVisibleClass: 'events__slide--visible', 25668 25669 wrapperClass: 'events__wrapper', 25670 25671 navigation: { 25672 25673 nextEl: nextEl, 25674 prevEl: prevEl 25675 25676 }, 25677 25678 breakpoints: { 25679 25680 1200: { 25681 25682 slidesPerView: 3, 25683 spaceBetween: 40 25684 25685 } 25686 25687 } 25688 25689 }); 25690 25691 var key = PROJECT.events.sliders = eventsSlider; 25692 25693 }); 25694 25695 }, 25696 25697 }, 25698 25699 gform: { 25700 25701 init: function() { 25702 25703 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'gform_post_render', PROJECT.gform.hideLoader ); 25704 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'gform_page_loaded', PROJECT.gform.hideLoader ); 25705 25706 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'submit', '.gform_wrapper form', PROJECT.gform.showLoader ); 25707 25708 }, 25709 25710 hideLoader: function( event, form_id, current_page ) { 25711 25712 var $container = PROJECT.gform.getFormContainer( jquery__WEBPACK_IMPORTED_MODULE_0___default()( '#gform_' + form_id ) ); 25713 25714 $container.find( '.gformLoader' ).fadeOut( 200 ); 25715 25716 }, 25717 25718 showLoader: function() { 25719 25720 var $container = PROJECT.gform.getFormContainer( jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ) ); 25721 25722 $container.find( '.gformLoader' ).fadeIn( 200 ); 25723 25724 }, 25725 25726 getFormContainer: function( $element ) { 25727 25728 var $container = $element.closest( '.gformContainer' ); 25729 25730 return $container; 25731 25732 } 25733 25734 }, 25735 25736 lightbox : { 25737 25738 init: function() { 25739 25740 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'click', 'body', PROJECT.lightbox.outerClose ); 25741 25742 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'click', '.lightboxClose', PROJECT.lightbox.close ); 25743 25744 jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.lightboxElement' ).delay( 10000 ).fadeIn( 300 ); 25745 }, 25746 25747 open: function( src, style, template, cssClass ) { 25748 25749 jquery__WEBPACK_IMPORTED_MODULE_0___default.a.get( template, function( template ) { 25750 25751 var templateRendered = mustache__WEBPACK_IMPORTED_MODULE_3___default.a.render( template, { 25752 25753 src: src, 25754 style: style, 25755 class: cssClass 25756 25757 }); 25758 25759 var $lightbox = jquery__WEBPACK_IMPORTED_MODULE_0___default()( jquery__WEBPACK_IMPORTED_MODULE_0___default.a.parseHTML( templateRendered ) ); 25760 $lightbox.hide(); 25761 25762 jquery__WEBPACK_IMPORTED_MODULE_0___default()( 'body' ).append( $lightbox ); 25763 25764 $lightbox.css( 'display', 'flex').hide().fadeIn( 300 ); 25765 25766 }); 25767 25768 }, 25769 25770 close: function( e ) { 25771 25772 jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.lightboxElement' ).fadeOut( 300, function() { 25773 25774 jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).remove(); 25775 25776 }); 25777 25778 }, 25779 25780 outerClose: function( e ) { 25781 25782 var search_box = jquery__WEBPACK_IMPORTED_MODULE_0___default()( '.lightboxBox' ); 25783 25784 if ( !search_box.is(e.target) && search_box.has(e.target).length === 0 ) { 25785 25786 PROJECT.lightbox.close(); 25787 25788 } 25789 25790 } 25791 25792 }, 25793 25794 video : { 25795 25796 init: function () { 25797 25798 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'click.videoOpen', '.videoOpen', PROJECT.video.open ); 25799 25800 }, 25801 25802 open: function( e ) { 25803 25804 e.preventDefault(); 25805 25806 var src = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).data( 'video' ) + '&autoplay=true&fun=false&playsinline=true&controls=true';
25807 var style = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).data( 'video-ratio' ); 25808 var template = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).data( 'template' ); 25809 var cssClass = 'view-lightbox--video'; 25810 25811 if ( style != '' ) { 25812 25813 style = 'padding-top: ' + style + '%'; 25814 25815 } 25816 25817 PROJECT.lightbox.open( src, style, template, cssClass ); 25818 25819 } 25820 25821 }, 25822 25823 list: { 25824 25825 oListForm: '.tabsListForm', 25826 oListFilter: '.tabs_list_filter', 25827 oListSearch: '.tabs_list_search', 25828 oList: '.tabsList', 25829 oListPager: '.tabsListPager', 25830 oListLoader: '.tabsListLoader', 25831 oListOpenFilters: '.tabsListOpenFilters', 25832 oListCloseFilters: '.tabsListCloseFilters', 25833 oListFilterInfo: '.tabsListFilterInfo', 25834 25835 /* 25836 * ------------ 25837 * Init 25838 * ------------ 25839 */ 25840 25841 init: function () { 25842 25843 jquery__WEBPACK_IMPORTED_MODULE_0___default()( document ).on( 'submit', PROJECT.list.oListForm, PROJECT.list.bindForm ); 25844 25845 PROJECT.list.initPager(); 25846 25847 }, 25848 25849 initPager: function( e ) { 25850 25851 jquery__WEBPACK_IMPORTED_MODULE_0___default()( 'a', PROJECT.list.oListPager ).off( 'click' ); 25852 jquery__WEBPACK_IMPORTED_MODULE_0___default()( 'a', PROJECT.list.oListPager ).on( 'click', PROJECT.list.bindPager ); 25853 25854 }, 25855 25856 getSection: function( element ) { 25857 25858 var section = jquery__WEBPACK_IMPORTED_MODULE_0___default()( element ).closest( PROJECT.list.oListForm ); 25859 25860 return section; 25861 25862 }, 25863 25864 bindForm: function( e ) { 25865 25866 e.preventDefault(); 25867 25868 var section = PROJECT.list.getSection( this ); 25869 25870 PROJECT.list.getListItems( 1, section ); 25871 25872 }, 25873 25874 bindPager: function( e ) { 25875 25876 e.preventDefault(); 25877 25878 var pageNo = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).data( 'no' ); 25879 var section = PROJECT.list.getSection( this ); 25880 25881 PROJECT.list.getListItems( pageNo, section ); 25882 25883 }, 25884 25885 /* 25886 * ------------ 25887 * The List 25888 * ------------ 25889 */ 25890 25891 getListItemsRunning: false, 25892 25893 getListItems: function ( pageNo, section ) { 25894 25895 if ( PROJECT.list.getListItemsRunning && PROJECT.list.getListItemsRunning.readyState !== 4 ) { 25896 25897 PROJECT.list.getListItemsRunning.abort(); 25898 25899 } 25900 25901 var filters = PROJECT.list.getListFilters( section ); 25902 25903 jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).closest( '.section-list' ).addClass( 'section-list--loading' ); 25904 25905 var config = { 25906 25907 ID : jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).data( 'page' ), 25908 ID_section : jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).data( 'section' ), 25909 cf_list_template : jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).data( 'template' ), 25910 25911 _user_filters : filters, 25912 _user_search : '', 25913 _user_page : pageNo 25914 25915 }; 25916 25917 if ( pageNo == 1 ) { 25918 25919 jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).find( PROJECT.list.oList ).slideUp( 300 ); 25920 25921 } 25922 25923 PROJECT.list.getListItemsRunning = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.get(ajax_object.ajaxurl, { 25924 25925 action : 'list_load', 25926 config : config 25927 25928 }, function( data ) { 25929 25930 data = JSON.parse( data ); 25931 25932 PROJECT.list.updateListFilters( data.filters ); 25933 25934 if ( pageNo == 1 ) { 25935 25936 jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).find( PROJECT.list.oList ).html( data.html ); 25937 jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).find( PROJECT.list.oList ).slideDown( 300 ); 25938 25939 } else { 25940 25941 jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).find( PROJECT.list.oList ).append( data.html ); 25942 25943 } 25944 25945 jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).find( PROJECT.list.oListPager ).html( data.pager_html ); 25946 25947 PROJECT.list.initPager(); 25948 25949 var push_url = data.url; 25950 var push_obj = { rand: Math.random() }; 25951 25952 if ( push_url !== '' ) { 25953 25954 history.pushState( push_obj, '', push_url ); 25955 25956 } 25957 25958 setTimeout( function() { 25959 25960 jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).closest( '.section-list' ).removeClass( 'section-list--loading' ); 25961 25962 }, 500 ); 25963 25964 }); 25965 25966 }, 25967 25968 getListFilters: function ( section ) { 25969 25970 var filters = []; 25971 var filterNames = []; 25972 25973 if ( jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).find( PROJECT.list.oListFilter ).length > 0 ) { 25974 25975 jquery__WEBPACK_IMPORTED_MODULE_0___default()( section ).find( PROJECT.list.oListFilter ).each( function( i, v ) { 25976 25977 var filterName = jquery__WEBPACK_IMPORTED_MODULE_0___default()( this ).attr( 'name' ); 25978 25979 if ( !filterNames.includes( filterName ) ) { 25980 25981 filterNames.push( filterName ); 25982 25983 } 25984 25985 }); 25986
25987 filterNames.forEach( function( filterName ) { 25988 25989 var $filterInput = jquery__WEBPACK_IMPORTED_MODULE_0___default()( 'input[name="' + filterName + '"]' ); 25990 25991 if ( $filterInput.length > 1 ) { 25992 25993 var filterValue = jquery__WEBPACK_IMPORTED_MODULE_0___default()( 'input[name="' + filterName + '"]:checked' ).map( function() { 25994 25995 return jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).val(); 25996 25997 }).get(); 25998 25999 } else { 26000 26001 var filterValue = $filterInput.val(); 26002 26003 } 26004 26005 var filterType = $filterInput.data( 'filter-type' ); 26006 var filterTax = $filterInput.data( 'filter-tax' ); 26007 26008 var filter = { 26009 26010 value : filterValue, 26011 type : filterType, 26012 tax : filterTax, 26013 26014 }; 26015 26016 filters.push( filter ); 26017 26018 }); 26019 26020 } 26021 26022 return filters; 26023 26024 }, 26025 26026 updateListPager: function( no ) { 26027 26028 26029 26030 }, 26031 26032 updateListFilters: function( filters ) { 26033 26034 /* // reset all filters to 0 and set disable class 26035 26036 $( PROJECT.list.oListFilter ).each( function( e ) { 26037 26038 var $parent = $( this ).closest( '.atom-filter-checkbox' ); 26039 var $filterCount = $parent.find( '[data-filter]' ); 26040 26041 if ( $filterCount.length >= 1 ) { 26042 26043 $parent.addClass( 'atom-filter-checkbox--disabled' ); 26044 26045 $filterCount.text( '(0)' ); 26046 26047 } 26048 26049 }); 26050 26051 // update filter count if filter term has value and remove disable class 26052 26053 Object.keys( filters ).forEach( function( filter_key ) { 26054 26055 var $filter = $( '[data-filter="' + filter_key + '"]' ); 26056 var $parent = $filter.closest( '.atom-filter-checkbox' ); 26057 26058 $filter.text( '(' + filters[filter_key] + ')' ); 26059 $parent.removeClass( 'atom-filter-checkbox--disabled' ); 26060 26061 }); */ 26062 26063 }, 26064 26065 }, 26066 26067 }; 26068 26069 var UTIL = { 26070 26071 exec: function (controller, action) { 26072 26073 var ns = PROJECT; 26074 action = (action === undefined) ? 'init' : action; 26075 26076 if (controller !== '' && ns[controller] && typeof ns[controller][action] === 'function') { 26077 26078 ns[controller][action](); 26079 26080 } 26081 26082 }, 26083 26084 init: function () { 26085 26086 var body = document.body, 26087 controller = body.getAttribute('data-controller'), 26088 action = body.getAttribute('data-action'); 26089 26090 UTIL.exec('common'); 26091 UTIL.exec(controller); 26092 UTIL.exec(controller, action); 26093 26094 } 26095 26096 }; 26097 26098 //$.PROJECT = PROJECT; // Make global available 26099 26100 jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).ready(UTIL.init); 26101 26102}); 26103 26104 26105 26106/***/ }), 26107
26108/***/ "./app.scss": 26109/*!******************!*\ 26110 !*** ./app.scss ***! 26111 \******************/ 26112/*! no static exports found */ 26113/***/ (function(module, exports) { 26114 26115// removed by extract-text-webpack-plugin 26116 26117/***/ }), 26118 26119/***/ "./ico sync recursive ^\\.\\/.*$": 26120/*!***************************!*\ 26121 !*** ./ico sync ^\.\/.*$ ***! 26122 \***************************/ 26123/*! no static exports found */ 26124/***/ (function(module, exports, __webpack_require__) { 26125 26126var map = { 26127 "./favicon.ico": "./ico/favicon.ico", 26128 "./favicon_114.png": "./ico/favicon_114.png", 26129 "./favicon_120.png": "./ico/favicon_120.png", 26130 "./favicon_144.png": "./ico/favicon_144.png", 26131 "./favicon_152.png": "./ico/favicon_152.png", 26132 "./favicon_167.png": "./ico/favicon_167.png", 26133 "./favicon_180.png": "./ico/favicon_180.png", 26134 "./favicon_57.png": "./ico/favicon_57.png", 26135 "./favicon_60.png": "./ico/favicon_60.png", 26136 "./favicon_72.png": "./ico/favicon_72.png", 26137 "./favicon_76.png": "./ico/favicon_76.png", 26138 "./favicon_fb.png": "./ico/favicon_fb.png", 26139 "./mask-icon.svg": "./ico/mask-icon.svg", 26140 "./windows_large.png": "./ico/windows_large.png", 26141 "./windows_square.png": "./ico/windows_square.png", 26142 "./windows_tiny.png": "./ico/windows_tiny.png", 26143 "./windows_wide.png": "./ico/windows_wide.png" 26144}; 26145 26146 26147function webpackContext(req) { 26148 var id = webpackContextResolve(req); 26149 return __webpack_require__(id); 26150} 26151function webpackContextResolve(req) { 26152 if(!__webpack_require__.o(map, req)) { 26153 var e = new Error("Cannot find module '" + req + "'"); 26154 e.code = 'MODULE_NOT_FOUND'; 26155 throw e; 26156 } 26157 return map[req]; 26158} 26159webpackContext.keys = function webpackContextKeys() { 26160 return Object.keys(map); 26161}; 26162webpackContext.resolve = webpackContextResolve; 26163module.exports = webpackContext; 26164webpackContext.id = "./ico sync recursive ^\\.\\/.*$"; 26165 26166/***/ }), 26167 26168/***/ "./ico/favicon.ico": 26169/*!*************************!*\ 26170 !*** ./ico/favicon.ico ***! 26171 \*************************/ 26172/*! no static exports found */ 26173/***/ (function(module, exports, __webpack_require__) { 26174 26175module.exports = __webpack_require__.p + "ico/favicon.ico"; 26176 26177/***/ }), 26178
26179/***/ "./ico/favicon_114.png": 26180/*!*****************************!*\ 26181 !*** ./ico/favicon_114.png ***! 26182 \*****************************/ 26183/*! no static exports found */ 26184/***/ (function(module, exports, __webpack_require__) { 26185 26186module.exports = __webpack_require__.p + "ico/favicon_114.png"; 26187 26188/***/ }), 26189
26190/***/ "./ico/favicon_120.png": 26191/*!*****************************!*\ 26192 !*** ./ico/favicon_120.png ***! 26193 \*****************************/ 26194/*! no static exports found */ 26195/***/ (function(module, exports, __webpack_require__) { 26196 26197module.exports = __webpack_require__.p + "ico/favicon_120.png"; 26198 26199/***/ }), 26200
26201/***/ "./ico/favicon_144.png": 26202/*!*****************************!*\ 26203 !*** ./ico/favicon_144.png ***! 26204 \*****************************/ 26205/*! no static exports found */ 26206/***/ (function(module, exports, __webpack_require__) { 26207 26208module.exports = __webpack_require__.p + "ico/favicon_144.png"; 26209 26210/***/ }), 26211
26212/***/ "./ico/favicon_152.png": 26213/*!*****************************!*\ 26214 !*** ./ico/favicon_152.png ***! 26215 \*****************************/ 26216/*! no static exports found */ 26217/***/ (function(module, exports, __webpack_require__) { 26218 26219module.exports = __webpack_require__.p + "ico/favicon_152.png"; 26220 26221/***/ }), 26222
26223/***/ "./ico/favicon_167.png": 26224/*!*****************************!*\ 26225 !*** ./ico/favicon_167.png ***! 26226 \*****************************/ 26227/*! no static exports found */ 26228/***/ (function(module, exports, __webpack_require__) { 26229 26230module.exports = __webpack_require__.p + "ico/favicon_167.png"; 26231 26232/***/ }), 26233
26234/***/ "./ico/favicon_180.png": 26235/*!*****************************!*\ 26236 !*** ./ico/favicon_180.png ***! 26237 \*****************************/ 26238/*! no static exports found */ 26239/***/ (function(module, exports, __webpack_require__) { 26240 26241module.exports = __webpack_require__.p + "ico/favicon_180.png"; 26242 26243/***/ }), 26244
26245/***/ "./ico/favicon_57.png": 26246/*!****************************!*\ 26247 !*** ./ico/favicon_57.png ***! 26248 \****************************/ 26249/*! no static exports found */ 26250/***/ (function(module, exports, __webpack_require__) { 26251 26252module.exports = __webpack_require__.p + "ico/favicon_57.png"; 26253 26254/***/ }), 26255
26256/***/ "./ico/favicon_60.png": 26257/*!****************************!*\ 26258 !*** ./ico/favicon_60.png ***! 26259 \****************************/ 26260/*! no static exports found */ 26261/***/ (function(module, exports, __webpack_require__) { 26262 26263module.exports = __webpack_require__.p + "ico/favicon_60.png"; 26264 26265/***/ }), 26266
26267/***/ "./ico/favicon_72.png": 26268/*!****************************!*\ 26269 !*** ./ico/favicon_72.png ***! 26270 \****************************/ 26271/*! no static exports found */ 26272/***/ (function(module, exports, __webpack_require__) { 26273 26274module.exports = __webpack_require__.p + "ico/favicon_72.png"; 26275 26276/***/ }), 26277
26278/***/ "./ico/favicon_76.png": 26279/*!****************************!*\ 26280 !*** ./ico/favicon_76.png ***! 26281 \****************************/ 26282/*! no static exports found */ 26283/***/ (function(module, exports, __webpack_require__) { 26284 26285module.exports = __webpack_require__.p + "ico/favicon_76.png"; 26286 26287/***/ }), 26288
26289/***/ "./ico/favicon_fb.png": 26290/*!****************************!*\ 26291 !*** ./ico/favicon_fb.png ***! 26292 \****************************/ 26293/*! no static exports found */ 26294/***/ (function(module, exports, __webpack_require__) { 26295 26296module.exports = __webpack_require__.p + "ico/favicon_fb.png"; 26297 26298/***/ }), 26299
26300/***/ "./ico/mask-icon.svg": 26301/*!***************************!*\ 26302 !*** ./ico/mask-icon.svg ***! 26303 \***************************/ 26304/*! no static exports found */ 26305/***/ (function(module, exports, __webpack_require__) { 26306 26307module.exports = __webpack_require__.p + "ico/mask-icon.svg"; 26308 26309/***/ }), 26310
26311/***/ "./ico/windows_large.png": 26312/*!*******************************!*\ 26313 !*** ./ico/windows_large.png ***! 26314 \*******************************/ 26315/*! no static exports found */ 26316/***/ (function(module, exports, __webpack_require__) { 26317 26318module.exports = __webpack_require__.p + "ico/windows_large.png"; 26319 26320/***/ }), 26321
26322/***/ "./ico/windows_square.png": 26323/*!********************************!*\ 26324 !*** ./ico/windows_square.png ***! 26325 \********************************/ 26326/*! no static exports found */ 26327/***/ (function(module, exports, __webpack_require__) { 26328 26329module.exports = __webpack_require__.p + "ico/windows_square.png"; 26330 26331/***/ }), 26332
26333/***/ "./ico/windows_tiny.png": 26334/*!******************************!*\ 26335 !*** ./ico/windows_tiny.png ***! 26336 \******************************/ 26337/*! no static exports found */ 26338/***/ (function(module, exports, __webpack_require__) { 26339 26340module.exports = __webpack_require__.p + "ico/windows_tiny.png"; 26341 26342/***/ }), 26343
26344/***/ "./ico/windows_wide.png": 26345/*!******************************!*\ 26346 !*** ./ico/windows_wide.png ***! 26347 \******************************/ 26348/*! no static exports found */ 26349/***/ (function(module, exports, __webpack_require__) { 26350 26351module.exports = __webpack_require__.p + "ico/windows_wide.png"; 26352 26353/***/ }), 26354 26355/***/ "./png sync recursive \\.png$": 26356/*!*************************!*\ 26357 !*** ./png sync \.png$ ***! 26358 \*************************/ 26359/*! no static exports found */ 26360/***/ (function(module, exports, __webpack_require__) { 26361 26362var map = { 26363 "./footer-sm.png": "./png/footer-sm.png", 26364 "./footer-xs.png": "./png/footer-xs.png", 26365 "./footer.png": "./png/footer.png", 26366 "./grid.png": "./png/grid.png", 26367 "./icon-linkedin.png": "./png/icon-linkedin.png" 26368}; 26369 26370 26371function webpackContext(req) { 26372 var id = webpackContextResolve(req); 26373 return __webpack_require__(id); 26374} 26375function webpackContextResolve(req) { 26376 if(!__webpack_require__.o(map, req)) { 26377 var e = new Error("Cannot find module '" + req + "'"); 26378 e.code = 'MODULE_NOT_FOUND'; 26379 throw e; 26380 } 26381 return map[req]; 26382} 26383webpackContext.keys = function webpackContextKeys() { 26384 return Object.keys(map); 26385}; 26386webpackContext.resolve = webpackContextResolve; 26387module.exports = webpackContext; 26388webpackContext.id = "./png sync recursive \\.png$"; 26389 26390/***/ }), 26391
26392/***/ "./png/footer-sm.png": 26393/*!***************************!*\ 26394 !*** ./png/footer-sm.png ***! 26395 \***************************/ 26396/*! no static exports found */ 26397/***/ (function(module, exports, __webpack_require__) { 26398 26399module.exports = __webpack_require__.p + "png/footer-sm.png"; 26400 26401/***/ }), 26402
26403/***/ "./png/footer-xs.png": 26404/*!***************************!*\ 26405 !*** ./png/footer-xs.png ***! 26406 \***************************/ 26407/*! no static exports found */ 26408/***/ (function(module, exports, __webpack_require__) { 26409 26410module.exports = __webpack_require__.p + "png/footer-xs.png"; 26411 26412/***/ }), 26413
26414/***/ "./png/footer.png": 26415/*!************************!*\ 26416 !*** ./png/footer.png ***! 26417 \************************/ 26418/*! no static exports found */ 26419/***/ (function(module, exports, __webpack_require__) { 26420 26421module.exports = __webpack_require__.p + "png/footer.png"; 26422 26423/***/ }), 26424
26425/***/ "./png/grid.png": 26426/*!**********************!*\ 26427 !*** ./png/grid.png ***! 26428 \**********************/ 26429/*! no static exports found */ 26430/***/ (function(module, exports, __webpack_require__) { 26431 26432module.exports = __webpack_require__.p + "png/grid.png"; 26433 26434/***/ }), 26435
26436/***/ "./png/icon-linkedin.png": 26437/*!*******************************!*\ 26438 !*** ./png/icon-linkedin.png ***! 26439 \*******************************/ 26440/*! no static exports found */ 26441/***/ (function(module, exports, __webpack_require__) { 26442 26443module.exports = __webpack_require__.p + "png/icon-linkedin.png"; 26444 26445/***/ }), 26446 26447/***/ "./svg sync recursive \\.svg$": 26448/*!*************************!*\ 26449 !*** ./svg sync \.svg$ ***! 26450 \*************************/ 26451/*! no static exports found */ 26452/***/ (function(module, exports, __webpack_require__) { 26453 26454var map = { 26455 "./icon-arrow-down-default.svg": "./svg/icon-arrow-down-default.svg", 26456 "./icon-arrow-down-white.svg": "./svg/icon-arrow-down-white.svg", 26457 "./icon-arrow-down.svg": "./svg/icon-arrow-down.svg", 26458 "./icon-arrow-right.svg": "./svg/icon-arrow-right.svg", 26459 "./icon-bolt.svg": "./svg/icon-bolt.svg", 26460 "./icon-calendar.svg": "./svg/icon-calendar.svg", 26461 "./icon-ext-link.svg": "./svg/icon-ext-link.svg", 26462 "./icon-linkedin.svg": "./svg/icon-linkedin.svg", 26463 "./icon-location.svg": "./svg/icon-location.svg", 26464 "./icon-mail.svg": "./svg/icon-mail.svg", 26465 "./icon-marker.svg": "./svg/icon-marker.svg", 26466 "./icon-play-rounded.svg": "./svg/icon-play-rounded.svg", 26467 "./icon-time.svg": "./svg/icon-time.svg", 26468 "./logo.svg": "./svg/logo.svg" 26469}; 26470 26471 26472function webpackContext(req) { 26473 var id = webpackContextResolve(req); 26474 return __webpack_require__(id); 26475} 26476function webpackContextResolve(req) { 26477 if(!__webpack_require__.o(map, req)) { 26478 var e = new Error("Cannot find module '" + req + "'"); 26479 e.code = 'MODULE_NOT_FOUND'; 26480 throw e; 26481 } 26482 return map[req]; 26483} 26484webpackContext.keys = function webpackContextKeys() { 26485 return Object.keys(map); 26486}; 26487webpackContext.resolve = webpackContextResolve; 26488module.exports = webpackContext; 26489webpackContext.id = "./svg sync recursive \\.svg$"; 26490 26491/***/ }), 26492
26493/***/ "./svg/icon-arrow-down-default.svg": 26494/*!*****************************************!*\ 26495 !*** ./svg/icon-arrow-down-default.svg ***! 26496 \*****************************************/ 26497/*! no static exports found */ 26498/***/ (function(module, exports, __webpack_require__) { 26499 26500module.exports = __webpack_require__.p + "svg/icon-arrow-down-default.svg"; 26501 26502/***/ }), 26503
26504/***/ "./svg/icon-arrow-down-white.svg": 26505/*!***************************************!*\ 26506 !*** ./svg/icon-arrow-down-white.svg ***! 26507 \***************************************/ 26508/*! no static exports found */ 26509/***/ (function(module, exports, __webpack_require__) { 26510 26511module.exports = __webpack_require__.p + "svg/icon-arrow-down-white.svg"; 26512 26513/***/ }), 26514
26515/***/ "./svg/icon-arrow-down.svg": 26516/*!*********************************!*\ 26517 !*** ./svg/icon-arrow-down.svg ***! 26518 \*********************************/ 26519/*! no static exports found */ 26520/***/ (function(module, exports, __webpack_require__) { 26521 26522module.exports = __webpack_require__.p + "svg/icon-arrow-down.svg"; 26523 26524/***/ }), 26525
26526/***/ "./svg/icon-arrow-right.svg": 26527/*!**********************************!*\ 26528 !*** ./svg/icon-arrow-right.svg ***! 26529 \**********************************/ 26530/*! no static exports found */ 26531/***/ (function(module, exports, __webpack_require__) { 26532 26533module.exports = __webpack_require__.p + "svg/icon-arrow-right.svg"; 26534 26535/***/ }), 26536
26537/***/ "./svg/icon-bolt.svg": 26538/*!***************************!*\ 26539 !*** ./svg/icon-bolt.svg ***! 26540 \***************************/ 26541/*! no static exports found */ 26542/***/ (function(module, exports, __webpack_require__) { 26543 26544module.exports = __webpack_require__.p + "svg/icon-bolt.svg"; 26545 26546/***/ }), 26547
26548/***/ "./svg/icon-calendar.svg": 26549/*!*******************************!*\ 26550 !*** ./svg/icon-calendar.svg ***! 26551 \*******************************/ 26552/*! no static exports found */ 26553/***/ (function(module, exports, __webpack_require__) { 26554 26555module.exports = __webpack_require__.p + "svg/icon-calendar.svg"; 26556 26557/***/ }), 26558
26559/***/ "./svg/icon-ext-link.svg": 26560/*!*******************************!*\ 26561 !*** ./svg/icon-ext-link.svg ***! 26562 \*******************************/ 26563/*! no static exports found */ 26564/***/ (function(module, exports, __webpack_require__) { 26565 26566module.exports = __webpack_require__.p + "svg/icon-ext-link.svg"; 26567 26568/***/ }), 26569
26570/***/ "./svg/icon-linkedin.svg": 26571/*!*******************************!*\ 26572 !*** ./svg/icon-linkedin.svg ***! 26573 \*******************************/ 26574/*! no static exports found */ 26575/***/ (function(module, exports, __webpack_require__) { 26576 26577module.exports = __webpack_require__.p + "svg/icon-linkedin.svg"; 26578 26579/***/ }), 26580
26581/***/ "./svg/icon-location.svg": 26582/*!*******************************!*\ 26583 !*** ./svg/icon-location.svg ***! 26584 \*******************************/ 26585/*! no static exports found */ 26586/***/ (function(module, exports, __webpack_require__) { 26587 26588module.exports = __webpack_require__.p + "svg/icon-location.svg"; 26589 26590/***/ }), 26591
26592/***/ "./svg/icon-mail.svg": 26593/*!***************************!*\ 26594 !*** ./svg/icon-mail.svg ***! 26595 \***************************/ 26596/*! no static exports found */ 26597/***/ (function(module, exports, __webpack_require__) { 26598 26599module.exports = __webpack_require__.p + "svg/icon-mail.svg"; 26600 26601/***/ }), 26602
26603/***/ "./svg/icon-marker.svg": 26604/*!*****************************!*\ 26605 !*** ./svg/icon-marker.svg ***! 26606 \*****************************/ 26607/*! no static exports found */ 26608/***/ (function(module, exports, __webpack_require__) { 26609 26610module.exports = __webpack_require__.p + "svg/icon-marker.svg"; 26611 26612/***/ }), 26613
26614/***/ "./svg/icon-play-rounded.svg": 26615/*!***********************************!*\ 26616 !*** ./svg/icon-play-rounded.svg ***! 26617 \***********************************/ 26618/*! no static exports found */ 26619/***/ (function(module, exports, __webpack_require__) { 26620 26621module.exports = __webpack_require__.p + "svg/icon-play-rounded.svg"; 26622 26623/***/ }), 26624
26625/***/ "./svg/icon-time.svg": 26626/*!***************************!*\ 26627 !*** ./svg/icon-time.svg ***! 26628 \***************************/ 26629/*! no static exports found */ 26630/***/ (function(module, exports, __webpack_require__) { 26631 26632module.exports = __webpack_require__.p + "svg/icon-time.svg"; 26633 26634/***/ }), 26635
26636/***/ "./svg/logo.svg": 26637/*!**********************!*\ 26638 !*** ./svg/logo.svg ***! 26639 \**********************/ 26640/*! no static exports found */ 26641/***/ (function(module, exports, __webpack_require__) { 26642 26643module.exports = __webpack_require__.p + "svg/logo.svg"; 26644 26645/***/ })
26645, 26646 26647/***/ 0: 26648/*!*********************************!*\ 26649 !*** multi ./app.js ./app.scss ***! 26650 \*********************************/ 26651/*! no static exports found */ 26652/***/ (function(module, exports, __webpack_require__) { 26653 26654__webpack_require__(/*! ./app.js */"./app.js"); 26655module.exports = __webpack_require__(/*! ./app.scss */"./app.scss"); 26656 26657 26658/***/ }) 26659 26660/******/ }); 26661//# sourceMappingURL=app.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.