@fynd-design-engineering/fynd-one-v2 3.4.63 → 3.4.64

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/dist/accordians/dropdown.js +1 -95
  2. package/dist/accordians/index.js +1 -391
  3. package/dist/cms-listing/index.js +1 -24
  4. package/dist/filters/clear-search.js +1 -32
  5. package/dist/filters/konnect.js +1 -165
  6. package/dist/filters/show-count.js +1 -66
  7. package/dist/form/country-dropdown.css +1 -160
  8. package/dist/form/cs-gated-redirection.js +1 -40
  9. package/dist/form/download-file.js +1 -70
  10. package/dist/form/validation.css +1 -1019
  11. package/dist/form/validation.js +7 -10611
  12. package/dist/global/anchor-scroll.js +1 -174
  13. package/dist/global/auth.js +1 -87
  14. package/dist/global/chat.js +1 -185
  15. package/dist/global/console-links.js +1 -89
  16. package/dist/global/contact-popup.js +2 -83
  17. package/dist/global/css/in-page-embed.css +1 -1043
  18. package/dist/global/css/in-project-settings.css +1 -173
  19. package/dist/global/css/temp.css +1 -89
  20. package/dist/global/custom-bg-video.js +1 -40
  21. package/dist/global/footer-accordion.js +1 -44
  22. package/dist/global/lazy-loader.js +1 -135
  23. package/dist/global/loader.js +2 -166
  24. package/dist/global/media-card.js +1 -166
  25. package/dist/global/miscellaneous.js +1 -136
  26. package/dist/global/number-count.js +1 -82
  27. package/dist/global/popup-video.js +1 -276
  28. package/dist/global/progressive-scroll.js +1 -222
  29. package/dist/global/responsive-video.js +1 -321
  30. package/dist/global/style.css +1 -1065
  31. package/dist/global/video-card.js +1 -50
  32. package/dist/hacktimus/2025.js +1 -177
  33. package/dist/hacktimus/styles.css +1 -91
  34. package/dist/home/index.js +1 -17
  35. package/dist/marquee/index.js +1 -3104
  36. package/dist/marquee/marquee-swiper.js +1 -36
  37. package/dist/navigation/announcement/index.js +1 -5169
  38. package/dist/navigation/context-menu/index.js +1 -31
  39. package/dist/navigation/desktop/index.js +1 -4603
  40. package/dist/navigation/initialization.js +1 -602
  41. package/dist/navigation/main.js +1 -4911
  42. package/dist/navigation/mobile/index.js +1 -286
  43. package/dist/navigation/scroll/index.js +1 -62
  44. package/dist/navigation/secondary-navigation/index.js +1 -437
  45. package/dist/navigation/style.css +1 -154
  46. package/dist/navigation/temp.css +0 -2
  47. package/dist/navigation/theme.css +1 -69
  48. package/dist/navigation-v2/index.js +1 -4990
  49. package/dist/navigation-v2/styles.css +1 -233
  50. package/dist/others/feature-detail.js +1 -75
  51. package/dist/others/geolocation.js +1 -50
  52. package/dist/others/hero-aniamtion.js +1 -53
  53. package/dist/others/hero-india-animation-2.js +1 -70
  54. package/dist/others/hero-india-animation.js +1 -93
  55. package/dist/others/home-solution-tab.js +1 -115
  56. package/dist/others/storefront-chat/index.js +1 -487
  57. package/dist/others/storefront-chat/styles.css +1 -107
  58. package/dist/playbook-2026/hero-reveal.js +1 -47
  59. package/dist/playbook-2026/index.js +1 -536
  60. package/dist/playbook-2026/styles.css +1 -110
  61. package/dist/posthog-and-ga/attributes.js +1 -190
  62. package/dist/posthog-and-ga/main.js +1 -528
  63. package/dist/progressive-scroll/index.js +1 -147
  64. package/dist/quick-fix/reload.js +1 -22
  65. package/dist/seo/schema.js +1 -465
  66. package/dist/slider/freescroll.js +1 -34
  67. package/dist/test/sample.js +1 -15
  68. package/dist/testimonials/index.js +1 -2654
  69. package/dist/timeline/index.js +1 -160
  70. package/dist/timeline/style.css +1 -42
  71. package/dist/tracking/custom-id.js +1 -75
  72. package/dist/tracking/fill-form-fields.js +1 -238
  73. package/dist/tracking/form-tracker.js +1 -146
  74. package/dist/tracking/page-categories.js +1 -20
  75. package/dist/tracking/user-journey.js +1 -839
  76. package/dist/tracking/utm-links.js +1 -194
  77. package/dist/utils/sample.js +1 -17
  78. package/dist/validations/localhost.js +1 -221
  79. package/package.json +1 -1
@@ -1,4605 +1,4 @@
1
- "use strict";
2
- (() => {
3
- // bin/live-reload.js
4
- if (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") {
5
- new EventSource(`${"http://localhost:3000"}/esbuild`).addEventListener(
6
- "change",
7
- () => location.reload()
8
- );
9
- } else {
10
- }
11
-
12
- // node_modules/.pnpm/gsap@3.13.0/node_modules/gsap/gsap-core.js
13
- function _assertThisInitialized(self) {
14
- if (self === void 0) {
15
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
16
- }
17
- return self;
18
- }
19
- function _inheritsLoose(subClass, superClass) {
20
- subClass.prototype = Object.create(superClass.prototype);
21
- subClass.prototype.constructor = subClass;
22
- subClass.__proto__ = superClass;
23
- }
24
- var _config = {
25
- autoSleep: 120,
26
- force3D: "auto",
27
- nullTargetWarn: 1,
28
- units: {
29
- lineHeight: ""
30
- }
31
- };
32
- var _defaults = {
33
- duration: 0.5,
34
- overwrite: false,
35
- delay: 0
36
- };
37
- var _suppressOverwrites;
38
- var _reverting;
39
- var _context;
40
- var _bigNum = 1e8;
41
- var _tinyNum = 1 / _bigNum;
42
- var _2PI = Math.PI * 2;
43
- var _HALF_PI = _2PI / 4;
44
- var _gsID = 0;
45
- var _sqrt = Math.sqrt;
46
- var _cos = Math.cos;
47
- var _sin = Math.sin;
48
- var _isString = function _isString2(value) {
49
- return typeof value === "string";
50
- };
51
- var _isFunction = function _isFunction2(value) {
52
- return typeof value === "function";
53
- };
54
- var _isNumber = function _isNumber2(value) {
55
- return typeof value === "number";
56
- };
57
- var _isUndefined = function _isUndefined2(value) {
58
- return typeof value === "undefined";
59
- };
60
- var _isObject = function _isObject2(value) {
61
- return typeof value === "object";
62
- };
63
- var _isNotFalse = function _isNotFalse2(value) {
64
- return value !== false;
65
- };
66
- var _windowExists = function _windowExists2() {
67
- return typeof window !== "undefined";
68
- };
69
- var _isFuncOrString = function _isFuncOrString2(value) {
70
- return _isFunction(value) || _isString(value);
71
- };
72
- var _isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView || function() {
73
- };
74
- var _isArray = Array.isArray;
75
- var _strictNumExp = /(?:-?\.?\d|\.)+/gi;
76
- var _numExp = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g;
77
- var _numWithUnitExp = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g;
78
- var _complexStringNumExp = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi;
79
- var _relExp = /[+-]=-?[.\d]+/;
80
- var _delimitedValueExp = /[^,'"\[\]\s]+/gi;
81
- var _unitExp = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i;
82
- var _globalTimeline;
83
- var _win;
84
- var _coreInitted;
85
- var _doc;
86
- var _globals = {};
87
- var _installScope = {};
88
- var _coreReady;
89
- var _install = function _install2(scope) {
90
- return (_installScope = _merge(scope, _globals)) && gsap;
91
- };
92
- var _missingPlugin = function _missingPlugin2(property, value) {
93
- return console.warn("Invalid property", property, "set to", value, "Missing plugin? gsap.registerPlugin()");
94
- };
95
- var _warn = function _warn2(message, suppress) {
96
- return !suppress && console.warn(message);
97
- };
98
- var _addGlobal = function _addGlobal2(name, obj) {
99
- return name && (_globals[name] = obj) && _installScope && (_installScope[name] = obj) || _globals;
100
- };
101
- var _emptyFunc = function _emptyFunc2() {
102
- return 0;
103
- };
104
- var _startAtRevertConfig = {
105
- suppressEvents: true,
106
- isStart: true,
107
- kill: false
108
- };
109
- var _revertConfigNoKill = {
110
- suppressEvents: true,
111
- kill: false
112
- };
113
- var _revertConfig = {
114
- suppressEvents: true
115
- };
116
- var _reservedProps = {};
117
- var _lazyTweens = [];
118
- var _lazyLookup = {};
119
- var _lastRenderedFrame;
120
- var _plugins = {};
121
- var _effects = {};
122
- var _nextGCFrame = 30;
123
- var _harnessPlugins = [];
124
- var _callbackNames = "";
125
- var _harness = function _harness2(targets) {
126
- var target = targets[0], harnessPlugin, i;
127
- _isObject(target) || _isFunction(target) || (targets = [targets]);
128
- if (!(harnessPlugin = (target._gsap || {}).harness)) {
129
- i = _harnessPlugins.length;
130
- while (i-- && !_harnessPlugins[i].targetTest(target)) {
131
- }
132
- harnessPlugin = _harnessPlugins[i];
133
- }
134
- i = targets.length;
135
- while (i--) {
136
- targets[i] && (targets[i]._gsap || (targets[i]._gsap = new GSCache(targets[i], harnessPlugin))) || targets.splice(i, 1);
137
- }
138
- return targets;
139
- };
140
- var _getCache = function _getCache2(target) {
141
- return target._gsap || _harness(toArray(target))[0]._gsap;
142
- };
143
- var _getProperty = function _getProperty2(target, property, v) {
144
- return (v = target[property]) && _isFunction(v) ? target[property]() : _isUndefined(v) && target.getAttribute && target.getAttribute(property) || v;
145
- };
146
- var _forEachName = function _forEachName2(names, func) {
147
- return (names = names.split(",")).forEach(func) || names;
148
- };
149
- var _round = function _round2(value) {
150
- return Math.round(value * 1e5) / 1e5 || 0;
151
- };
152
- var _roundPrecise = function _roundPrecise2(value) {
153
- return Math.round(value * 1e7) / 1e7 || 0;
154
- };
155
- var _parseRelative = function _parseRelative2(start, value) {
156
- var operator = value.charAt(0), end = parseFloat(value.substr(2));
157
- start = parseFloat(start);
158
- return operator === "+" ? start + end : operator === "-" ? start - end : operator === "*" ? start * end : start / end;
159
- };
160
- var _arrayContainsAny = function _arrayContainsAny2(toSearch, toFind) {
161
- var l = toFind.length, i = 0;
162
- for (; toSearch.indexOf(toFind[i]) < 0 && ++i < l; ) {
163
- }
164
- return i < l;
165
- };
166
- var _lazyRender = function _lazyRender2() {
167
- var l = _lazyTweens.length, a = _lazyTweens.slice(0), i, tween;
168
- _lazyLookup = {};
169
- _lazyTweens.length = 0;
170
- for (i = 0; i < l; i++) {
171
- tween = a[i];
172
- tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0);
173
- }
174
- };
175
- var _isRevertWorthy = function _isRevertWorthy2(animation) {
176
- return !!(animation._initted || animation._startAt || animation.add);
177
- };
178
- var _lazySafeRender = function _lazySafeRender2(animation, time, suppressEvents, force) {
179
- _lazyTweens.length && !_reverting && _lazyRender();
180
- animation.render(time, suppressEvents, force || !!(_reverting && time < 0 && _isRevertWorthy(animation)));
181
- _lazyTweens.length && !_reverting && _lazyRender();
182
- };
183
- var _numericIfPossible = function _numericIfPossible2(value) {
184
- var n = parseFloat(value);
185
- return (n || n === 0) && (value + "").match(_delimitedValueExp).length < 2 ? n : _isString(value) ? value.trim() : value;
186
- };
187
- var _passThrough = function _passThrough2(p) {
188
- return p;
189
- };
190
- var _setDefaults = function _setDefaults2(obj, defaults2) {
191
- for (var p in defaults2) {
192
- p in obj || (obj[p] = defaults2[p]);
193
- }
194
- return obj;
195
- };
196
- var _setKeyframeDefaults = function _setKeyframeDefaults2(excludeDuration) {
197
- return function(obj, defaults2) {
198
- for (var p in defaults2) {
199
- p in obj || p === "duration" && excludeDuration || p === "ease" || (obj[p] = defaults2[p]);
200
- }
201
- };
202
- };
203
- var _merge = function _merge2(base, toMerge) {
204
- for (var p in toMerge) {
205
- base[p] = toMerge[p];
206
- }
207
- return base;
208
- };
209
- var _mergeDeep = function _mergeDeep2(base, toMerge) {
210
- for (var p in toMerge) {
211
- p !== "__proto__" && p !== "constructor" && p !== "prototype" && (base[p] = _isObject(toMerge[p]) ? _mergeDeep2(base[p] || (base[p] = {}), toMerge[p]) : toMerge[p]);
212
- }
213
- return base;
214
- };
215
- var _copyExcluding = function _copyExcluding2(obj, excluding) {
216
- var copy = {}, p;
217
- for (p in obj) {
218
- p in excluding || (copy[p] = obj[p]);
219
- }
220
- return copy;
221
- };
222
- var _inheritDefaults = function _inheritDefaults2(vars) {
223
- var parent = vars.parent || _globalTimeline, func = vars.keyframes ? _setKeyframeDefaults(_isArray(vars.keyframes)) : _setDefaults;
224
- if (_isNotFalse(vars.inherit)) {
225
- while (parent) {
226
- func(vars, parent.vars.defaults);
227
- parent = parent.parent || parent._dp;
228
- }
229
- }
230
- return vars;
231
- };
232
- var _arraysMatch = function _arraysMatch2(a1, a2) {
233
- var i = a1.length, match = i === a2.length;
234
- while (match && i-- && a1[i] === a2[i]) {
235
- }
236
- return i < 0;
237
- };
238
- var _addLinkedListItem = function _addLinkedListItem2(parent, child, firstProp, lastProp, sortBy) {
239
- if (firstProp === void 0) {
240
- firstProp = "_first";
241
- }
242
- if (lastProp === void 0) {
243
- lastProp = "_last";
244
- }
245
- var prev = parent[lastProp], t;
246
- if (sortBy) {
247
- t = child[sortBy];
248
- while (prev && prev[sortBy] > t) {
249
- prev = prev._prev;
250
- }
251
- }
252
- if (prev) {
253
- child._next = prev._next;
254
- prev._next = child;
255
- } else {
256
- child._next = parent[firstProp];
257
- parent[firstProp] = child;
258
- }
259
- if (child._next) {
260
- child._next._prev = child;
261
- } else {
262
- parent[lastProp] = child;
263
- }
264
- child._prev = prev;
265
- child.parent = child._dp = parent;
266
- return child;
267
- };
268
- var _removeLinkedListItem = function _removeLinkedListItem2(parent, child, firstProp, lastProp) {
269
- if (firstProp === void 0) {
270
- firstProp = "_first";
271
- }
272
- if (lastProp === void 0) {
273
- lastProp = "_last";
274
- }
275
- var prev = child._prev, next = child._next;
276
- if (prev) {
277
- prev._next = next;
278
- } else if (parent[firstProp] === child) {
279
- parent[firstProp] = next;
280
- }
281
- if (next) {
282
- next._prev = prev;
283
- } else if (parent[lastProp] === child) {
284
- parent[lastProp] = prev;
285
- }
286
- child._next = child._prev = child.parent = null;
287
- };
288
- var _removeFromParent = function _removeFromParent2(child, onlyIfParentHasAutoRemove) {
289
- child.parent && (!onlyIfParentHasAutoRemove || child.parent.autoRemoveChildren) && child.parent.remove && child.parent.remove(child);
290
- child._act = 0;
291
- };
292
- var _uncache = function _uncache2(animation, child) {
293
- if (animation && (!child || child._end > animation._dur || child._start < 0)) {
294
- var a = animation;
295
- while (a) {
296
- a._dirty = 1;
297
- a = a.parent;
298
- }
299
- }
300
- return animation;
301
- };
302
- var _recacheAncestors = function _recacheAncestors2(animation) {
303
- var parent = animation.parent;
304
- while (parent && parent.parent) {
305
- parent._dirty = 1;
306
- parent.totalDuration();
307
- parent = parent.parent;
308
- }
309
- return animation;
310
- };
311
- var _rewindStartAt = function _rewindStartAt2(tween, totalTime, suppressEvents, force) {
312
- return tween._startAt && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween.vars.immediateRender && !tween.vars.autoRevert || tween._startAt.render(totalTime, true, force));
313
- };
314
- var _hasNoPausedAncestors = function _hasNoPausedAncestors2(animation) {
315
- return !animation || animation._ts && _hasNoPausedAncestors2(animation.parent);
316
- };
317
- var _elapsedCycleDuration = function _elapsedCycleDuration2(animation) {
318
- return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0;
319
- };
320
- var _animationCycle = function _animationCycle2(tTime, cycleDuration) {
321
- var whole = Math.floor(tTime = _roundPrecise(tTime / cycleDuration));
322
- return tTime && whole === tTime ? whole - 1 : whole;
323
- };
324
- var _parentToChildTotalTime = function _parentToChildTotalTime2(parentTime, child) {
325
- return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur);
326
- };
327
- var _setEnd = function _setEnd2(animation) {
328
- return animation._end = _roundPrecise(animation._start + (animation._tDur / Math.abs(animation._ts || animation._rts || _tinyNum) || 0));
329
- };
330
- var _alignPlayhead = function _alignPlayhead2(animation, totalTime) {
331
- var parent = animation._dp;
332
- if (parent && parent.smoothChildTiming && animation._ts) {
333
- animation._start = _roundPrecise(parent._time - (animation._ts > 0 ? totalTime / animation._ts : ((animation._dirty ? animation.totalDuration() : animation._tDur) - totalTime) / -animation._ts));
334
- _setEnd(animation);
335
- parent._dirty || _uncache(parent, animation);
336
- }
337
- return animation;
338
- };
339
- var _postAddChecks = function _postAddChecks2(timeline2, child) {
340
- var t;
341
- if (child._time || !child._dur && child._initted || child._start < timeline2._time && (child._dur || !child.add)) {
342
- t = _parentToChildTotalTime(timeline2.rawTime(), child);
343
- if (!child._dur || _clamp(0, child.totalDuration(), t) - child._tTime > _tinyNum) {
344
- child.render(t, true);
345
- }
346
- }
347
- if (_uncache(timeline2, child)._dp && timeline2._initted && timeline2._time >= timeline2._dur && timeline2._ts) {
348
- if (timeline2._dur < timeline2.duration()) {
349
- t = timeline2;
350
- while (t._dp) {
351
- t.rawTime() >= 0 && t.totalTime(t._tTime);
352
- t = t._dp;
353
- }
354
- }
355
- timeline2._zTime = -_tinyNum;
356
- }
357
- };
358
- var _addToTimeline = function _addToTimeline2(timeline2, child, position, skipChecks) {
359
- child.parent && _removeFromParent(child);
360
- child._start = _roundPrecise((_isNumber(position) ? position : position || timeline2 !== _globalTimeline ? _parsePosition(timeline2, position, child) : timeline2._time) + child._delay);
361
- child._end = _roundPrecise(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0));
362
- _addLinkedListItem(timeline2, child, "_first", "_last", timeline2._sort ? "_start" : 0);
363
- _isFromOrFromStart(child) || (timeline2._recent = child);
364
- skipChecks || _postAddChecks(timeline2, child);
365
- timeline2._ts < 0 && _alignPlayhead(timeline2, timeline2._tTime);
366
- return timeline2;
367
- };
368
- var _scrollTrigger = function _scrollTrigger2(animation, trigger) {
369
- return (_globals.ScrollTrigger || _missingPlugin("scrollTrigger", trigger)) && _globals.ScrollTrigger.create(trigger, animation);
370
- };
371
- var _attemptInitTween = function _attemptInitTween2(tween, time, force, suppressEvents, tTime) {
372
- _initTween(tween, time, tTime);
373
- if (!tween._initted) {
374
- return 1;
375
- }
376
- if (!force && tween._pt && !_reverting && (tween._dur && tween.vars.lazy !== false || !tween._dur && tween.vars.lazy) && _lastRenderedFrame !== _ticker.frame) {
377
- _lazyTweens.push(tween);
378
- tween._lazy = [tTime, suppressEvents];
379
- return 1;
380
- }
381
- };
382
- var _parentPlayheadIsBeforeStart = function _parentPlayheadIsBeforeStart2(_ref) {
383
- var parent = _ref.parent;
384
- return parent && parent._ts && parent._initted && !parent._lock && (parent.rawTime() < 0 || _parentPlayheadIsBeforeStart2(parent));
385
- };
386
- var _isFromOrFromStart = function _isFromOrFromStart2(_ref2) {
387
- var data = _ref2.data;
388
- return data === "isFromStart" || data === "isStart";
389
- };
390
- var _renderZeroDurationTween = function _renderZeroDurationTween2(tween, totalTime, suppressEvents, force) {
391
- var prevRatio = tween.ratio, ratio = totalTime < 0 || !totalTime && (!tween._start && _parentPlayheadIsBeforeStart(tween) && !(!tween._initted && _isFromOrFromStart(tween)) || (tween._ts < 0 || tween._dp._ts < 0) && !_isFromOrFromStart(tween)) ? 0 : 1, repeatDelay = tween._rDelay, tTime = 0, pt, iteration, prevIteration;
392
- if (repeatDelay && tween._repeat) {
393
- tTime = _clamp(0, tween._tDur, totalTime);
394
- iteration = _animationCycle(tTime, repeatDelay);
395
- tween._yoyo && iteration & 1 && (ratio = 1 - ratio);
396
- if (iteration !== _animationCycle(tween._tTime, repeatDelay)) {
397
- prevRatio = 1 - ratio;
398
- tween.vars.repeatRefresh && tween._initted && tween.invalidate();
399
- }
400
- }
401
- if (ratio !== prevRatio || _reverting || force || tween._zTime === _tinyNum || !totalTime && tween._zTime) {
402
- if (!tween._initted && _attemptInitTween(tween, totalTime, force, suppressEvents, tTime)) {
403
- return;
404
- }
405
- prevIteration = tween._zTime;
406
- tween._zTime = totalTime || (suppressEvents ? _tinyNum : 0);
407
- suppressEvents || (suppressEvents = totalTime && !prevIteration);
408
- tween.ratio = ratio;
409
- tween._from && (ratio = 1 - ratio);
410
- tween._time = 0;
411
- tween._tTime = tTime;
412
- pt = tween._pt;
413
- while (pt) {
414
- pt.r(ratio, pt.d);
415
- pt = pt._next;
416
- }
417
- totalTime < 0 && _rewindStartAt(tween, totalTime, suppressEvents, true);
418
- tween._onUpdate && !suppressEvents && _callback(tween, "onUpdate");
419
- tTime && tween._repeat && !suppressEvents && tween.parent && _callback(tween, "onRepeat");
420
- if ((totalTime >= tween._tDur || totalTime < 0) && tween.ratio === ratio) {
421
- ratio && _removeFromParent(tween, 1);
422
- if (!suppressEvents && !_reverting) {
423
- _callback(tween, ratio ? "onComplete" : "onReverseComplete", true);
424
- tween._prom && tween._prom();
425
- }
426
- }
427
- } else if (!tween._zTime) {
428
- tween._zTime = totalTime;
429
- }
430
- };
431
- var _findNextPauseTween = function _findNextPauseTween2(animation, prevTime, time) {
432
- var child;
433
- if (time > prevTime) {
434
- child = animation._first;
435
- while (child && child._start <= time) {
436
- if (child.data === "isPause" && child._start > prevTime) {
437
- return child;
438
- }
439
- child = child._next;
440
- }
441
- } else {
442
- child = animation._last;
443
- while (child && child._start >= time) {
444
- if (child.data === "isPause" && child._start < prevTime) {
445
- return child;
446
- }
447
- child = child._prev;
448
- }
449
- }
450
- };
451
- var _setDuration = function _setDuration2(animation, duration, skipUncache, leavePlayhead) {
452
- var repeat = animation._repeat, dur = _roundPrecise(duration) || 0, totalProgress = animation._tTime / animation._tDur;
453
- totalProgress && !leavePlayhead && (animation._time *= dur / animation._dur);
454
- animation._dur = dur;
455
- animation._tDur = !repeat ? dur : repeat < 0 ? 1e10 : _roundPrecise(dur * (repeat + 1) + animation._rDelay * repeat);
456
- totalProgress > 0 && !leavePlayhead && _alignPlayhead(animation, animation._tTime = animation._tDur * totalProgress);
457
- animation.parent && _setEnd(animation);
458
- skipUncache || _uncache(animation.parent, animation);
459
- return animation;
460
- };
461
- var _onUpdateTotalDuration = function _onUpdateTotalDuration2(animation) {
462
- return animation instanceof Timeline ? _uncache(animation) : _setDuration(animation, animation._dur);
463
- };
464
- var _zeroPosition = {
465
- _start: 0,
466
- endTime: _emptyFunc,
467
- totalDuration: _emptyFunc
468
- };
469
- var _parsePosition = function _parsePosition2(animation, position, percentAnimation) {
470
- var labels = animation.labels, recent = animation._recent || _zeroPosition, clippedDuration = animation.duration() >= _bigNum ? recent.endTime(false) : animation._dur, i, offset, isPercent;
471
- if (_isString(position) && (isNaN(position) || position in labels)) {
472
- offset = position.charAt(0);
473
- isPercent = position.substr(-1) === "%";
474
- i = position.indexOf("=");
475
- if (offset === "<" || offset === ">") {
476
- i >= 0 && (position = position.replace(/=/, ""));
477
- return (offset === "<" ? recent._start : recent.endTime(recent._repeat >= 0)) + (parseFloat(position.substr(1)) || 0) * (isPercent ? (i < 0 ? recent : percentAnimation).totalDuration() / 100 : 1);
478
- }
479
- if (i < 0) {
480
- position in labels || (labels[position] = clippedDuration);
481
- return labels[position];
482
- }
483
- offset = parseFloat(position.charAt(i - 1) + position.substr(i + 1));
484
- if (isPercent && percentAnimation) {
485
- offset = offset / 100 * (_isArray(percentAnimation) ? percentAnimation[0] : percentAnimation).totalDuration();
486
- }
487
- return i > 1 ? _parsePosition2(animation, position.substr(0, i - 1), percentAnimation) + offset : clippedDuration + offset;
488
- }
489
- return position == null ? clippedDuration : +position;
490
- };
491
- var _createTweenType = function _createTweenType2(type, params, timeline2) {
492
- var isLegacy = _isNumber(params[1]), varsIndex = (isLegacy ? 2 : 1) + (type < 2 ? 0 : 1), vars = params[varsIndex], irVars, parent;
493
- isLegacy && (vars.duration = params[1]);
494
- vars.parent = timeline2;
495
- if (type) {
496
- irVars = vars;
497
- parent = timeline2;
498
- while (parent && !("immediateRender" in irVars)) {
499
- irVars = parent.vars.defaults || {};
500
- parent = _isNotFalse(parent.vars.inherit) && parent.parent;
501
- }
502
- vars.immediateRender = _isNotFalse(irVars.immediateRender);
503
- type < 2 ? vars.runBackwards = 1 : vars.startAt = params[varsIndex - 1];
504
- }
505
- return new Tween(params[0], vars, params[varsIndex + 1]);
506
- };
507
- var _conditionalReturn = function _conditionalReturn2(value, func) {
508
- return value || value === 0 ? func(value) : func;
509
- };
510
- var _clamp = function _clamp2(min, max, value) {
511
- return value < min ? min : value > max ? max : value;
512
- };
513
- var getUnit = function getUnit2(value, v) {
514
- return !_isString(value) || !(v = _unitExp.exec(value)) ? "" : v[1];
515
- };
516
- var clamp = function clamp2(min, max, value) {
517
- return _conditionalReturn(value, function(v) {
518
- return _clamp(min, max, v);
519
- });
520
- };
521
- var _slice = [].slice;
522
- var _isArrayLike = function _isArrayLike2(value, nonEmpty) {
523
- return value && _isObject(value) && "length" in value && (!nonEmpty && !value.length || value.length - 1 in value && _isObject(value[0])) && !value.nodeType && value !== _win;
524
- };
525
- var _flatten = function _flatten2(ar, leaveStrings, accumulator) {
526
- if (accumulator === void 0) {
527
- accumulator = [];
528
- }
529
- return ar.forEach(function(value) {
530
- var _accumulator;
531
- return _isString(value) && !leaveStrings || _isArrayLike(value, 1) ? (_accumulator = accumulator).push.apply(_accumulator, toArray(value)) : accumulator.push(value);
532
- }) || accumulator;
533
- };
534
- var toArray = function toArray2(value, scope, leaveStrings) {
535
- return _context && !scope && _context.selector ? _context.selector(value) : _isString(value) && !leaveStrings && (_coreInitted || !_wake()) ? _slice.call((scope || _doc).querySelectorAll(value), 0) : _isArray(value) ? _flatten(value, leaveStrings) : _isArrayLike(value) ? _slice.call(value, 0) : value ? [value] : [];
536
- };
537
- var selector = function selector2(value) {
538
- value = toArray(value)[0] || _warn("Invalid scope") || {};
539
- return function(v) {
540
- var el = value.current || value.nativeElement || value;
541
- return toArray(v, el.querySelectorAll ? el : el === value ? _warn("Invalid scope") || _doc.createElement("div") : value);
542
- };
543
- };
544
- var shuffle = function shuffle2(a) {
545
- return a.sort(function() {
546
- return 0.5 - Math.random();
547
- });
548
- };
549
- var distribute = function distribute2(v) {
550
- if (_isFunction(v)) {
551
- return v;
552
- }
553
- var vars = _isObject(v) ? v : {
554
- each: v
555
- }, ease = _parseEase(vars.ease), from = vars.from || 0, base = parseFloat(vars.base) || 0, cache = {}, isDecimal = from > 0 && from < 1, ratios = isNaN(from) || isDecimal, axis = vars.axis, ratioX = from, ratioY = from;
556
- if (_isString(from)) {
557
- ratioX = ratioY = {
558
- center: 0.5,
559
- edges: 0.5,
560
- end: 1
561
- }[from] || 0;
562
- } else if (!isDecimal && ratios) {
563
- ratioX = from[0];
564
- ratioY = from[1];
565
- }
566
- return function(i, target, a) {
567
- var l = (a || vars).length, distances = cache[l], originX, originY, x, y, d, j, max, min, wrapAt;
568
- if (!distances) {
569
- wrapAt = vars.grid === "auto" ? 0 : (vars.grid || [1, _bigNum])[1];
570
- if (!wrapAt) {
571
- max = -_bigNum;
572
- while (max < (max = a[wrapAt++].getBoundingClientRect().left) && wrapAt < l) {
573
- }
574
- wrapAt < l && wrapAt--;
575
- }
576
- distances = cache[l] = [];
577
- originX = ratios ? Math.min(wrapAt, l) * ratioX - 0.5 : from % wrapAt;
578
- originY = wrapAt === _bigNum ? 0 : ratios ? l * ratioY / wrapAt - 0.5 : from / wrapAt | 0;
579
- max = 0;
580
- min = _bigNum;
581
- for (j = 0; j < l; j++) {
582
- x = j % wrapAt - originX;
583
- y = originY - (j / wrapAt | 0);
584
- distances[j] = d = !axis ? _sqrt(x * x + y * y) : Math.abs(axis === "y" ? y : x);
585
- d > max && (max = d);
586
- d < min && (min = d);
587
- }
588
- from === "random" && shuffle(distances);
589
- distances.max = max - min;
590
- distances.min = min;
591
- distances.v = l = (parseFloat(vars.amount) || parseFloat(vars.each) * (wrapAt > l ? l - 1 : !axis ? Math.max(wrapAt, l / wrapAt) : axis === "y" ? l / wrapAt : wrapAt) || 0) * (from === "edges" ? -1 : 1);
592
- distances.b = l < 0 ? base - l : base;
593
- distances.u = getUnit(vars.amount || vars.each) || 0;
594
- ease = ease && l < 0 ? _invertEase(ease) : ease;
595
- }
596
- l = (distances[i] - distances.min) / distances.max || 0;
597
- return _roundPrecise(distances.b + (ease ? ease(l) : l) * distances.v) + distances.u;
598
- };
599
- };
600
- var _roundModifier = function _roundModifier2(v) {
601
- var p = Math.pow(10, ((v + "").split(".")[1] || "").length);
602
- return function(raw) {
603
- var n = _roundPrecise(Math.round(parseFloat(raw) / v) * v * p);
604
- return (n - n % 1) / p + (_isNumber(raw) ? 0 : getUnit(raw));
605
- };
606
- };
607
- var snap = function snap2(snapTo, value) {
608
- var isArray = _isArray(snapTo), radius, is2D;
609
- if (!isArray && _isObject(snapTo)) {
610
- radius = isArray = snapTo.radius || _bigNum;
611
- if (snapTo.values) {
612
- snapTo = toArray(snapTo.values);
613
- if (is2D = !_isNumber(snapTo[0])) {
614
- radius *= radius;
615
- }
616
- } else {
617
- snapTo = _roundModifier(snapTo.increment);
618
- }
619
- }
620
- return _conditionalReturn(value, !isArray ? _roundModifier(snapTo) : _isFunction(snapTo) ? function(raw) {
621
- is2D = snapTo(raw);
622
- return Math.abs(is2D - raw) <= radius ? is2D : raw;
623
- } : function(raw) {
624
- var x = parseFloat(is2D ? raw.x : raw), y = parseFloat(is2D ? raw.y : 0), min = _bigNum, closest = 0, i = snapTo.length, dx, dy;
625
- while (i--) {
626
- if (is2D) {
627
- dx = snapTo[i].x - x;
628
- dy = snapTo[i].y - y;
629
- dx = dx * dx + dy * dy;
630
- } else {
631
- dx = Math.abs(snapTo[i] - x);
632
- }
633
- if (dx < min) {
634
- min = dx;
635
- closest = i;
636
- }
637
- }
638
- closest = !radius || min <= radius ? snapTo[closest] : raw;
639
- return is2D || closest === raw || _isNumber(raw) ? closest : closest + getUnit(raw);
640
- });
641
- };
642
- var random = function random2(min, max, roundingIncrement, returnFunction) {
643
- return _conditionalReturn(_isArray(min) ? !max : roundingIncrement === true ? !!(roundingIncrement = 0) : !returnFunction, function() {
644
- return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + "").length - 2) : 1) && Math.floor(Math.round((min - roundingIncrement / 2 + Math.random() * (max - min + roundingIncrement * 0.99)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction;
645
- });
646
- };
647
- var pipe = function pipe2() {
648
- for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {
649
- functions[_key] = arguments[_key];
650
- }
651
- return function(value) {
652
- return functions.reduce(function(v, f) {
653
- return f(v);
654
- }, value);
655
- };
656
- };
657
- var unitize = function unitize2(func, unit) {
658
- return function(value) {
659
- return func(parseFloat(value)) + (unit || getUnit(value));
660
- };
661
- };
662
- var normalize = function normalize2(min, max, value) {
663
- return mapRange(min, max, 0, 1, value);
664
- };
665
- var _wrapArray = function _wrapArray2(a, wrapper, value) {
666
- return _conditionalReturn(value, function(index) {
667
- return a[~~wrapper(index)];
668
- });
669
- };
670
- var wrap = function wrap2(min, max, value) {
671
- var range = max - min;
672
- return _isArray(min) ? _wrapArray(min, wrap2(0, min.length), max) : _conditionalReturn(value, function(value2) {
673
- return (range + (value2 - min) % range) % range + min;
674
- });
675
- };
676
- var wrapYoyo = function wrapYoyo2(min, max, value) {
677
- var range = max - min, total = range * 2;
678
- return _isArray(min) ? _wrapArray(min, wrapYoyo2(0, min.length - 1), max) : _conditionalReturn(value, function(value2) {
679
- value2 = (total + (value2 - min) % total) % total || 0;
680
- return min + (value2 > range ? total - value2 : value2);
681
- });
682
- };
683
- var _replaceRandom = function _replaceRandom2(value) {
684
- var prev = 0, s = "", i, nums, end, isArray;
685
- while (~(i = value.indexOf("random(", prev))) {
686
- end = value.indexOf(")", i);
687
- isArray = value.charAt(i + 7) === "[";
688
- nums = value.substr(i + 7, end - i - 7).match(isArray ? _delimitedValueExp : _strictNumExp);
689
- s += value.substr(prev, i - prev) + random(isArray ? nums : +nums[0], isArray ? 0 : +nums[1], +nums[2] || 1e-5);
690
- prev = end + 1;
691
- }
692
- return s + value.substr(prev, value.length - prev);
693
- };
694
- var mapRange = function mapRange2(inMin, inMax, outMin, outMax, value) {
695
- var inRange = inMax - inMin, outRange = outMax - outMin;
696
- return _conditionalReturn(value, function(value2) {
697
- return outMin + ((value2 - inMin) / inRange * outRange || 0);
698
- });
699
- };
700
- var interpolate = function interpolate2(start, end, progress, mutate) {
701
- var func = isNaN(start + end) ? 0 : function(p2) {
702
- return (1 - p2) * start + p2 * end;
703
- };
704
- if (!func) {
705
- var isString = _isString(start), master = {}, p, i, interpolators, l, il;
706
- progress === true && (mutate = 1) && (progress = null);
707
- if (isString) {
708
- start = {
709
- p: start
710
- };
711
- end = {
712
- p: end
713
- };
714
- } else if (_isArray(start) && !_isArray(end)) {
715
- interpolators = [];
716
- l = start.length;
717
- il = l - 2;
718
- for (i = 1; i < l; i++) {
719
- interpolators.push(interpolate2(start[i - 1], start[i]));
720
- }
721
- l--;
722
- func = function func2(p2) {
723
- p2 *= l;
724
- var i2 = Math.min(il, ~~p2);
725
- return interpolators[i2](p2 - i2);
726
- };
727
- progress = end;
728
- } else if (!mutate) {
729
- start = _merge(_isArray(start) ? [] : {}, start);
730
- }
731
- if (!interpolators) {
732
- for (p in end) {
733
- _addPropTween.call(master, start, p, "get", end[p]);
734
- }
735
- func = function func2(p2) {
736
- return _renderPropTweens(p2, master) || (isString ? start.p : start);
737
- };
738
- }
739
- }
740
- return _conditionalReturn(progress, func);
741
- };
742
- var _getLabelInDirection = function _getLabelInDirection2(timeline2, fromTime, backward) {
743
- var labels = timeline2.labels, min = _bigNum, p, distance, label;
744
- for (p in labels) {
745
- distance = labels[p] - fromTime;
746
- if (distance < 0 === !!backward && distance && min > (distance = Math.abs(distance))) {
747
- label = p;
748
- min = distance;
749
- }
750
- }
751
- return label;
752
- };
753
- var _callback = function _callback2(animation, type, executeLazyFirst) {
754
- var v = animation.vars, callback = v[type], prevContext = _context, context3 = animation._ctx, params, scope, result;
755
- if (!callback) {
756
- return;
757
- }
758
- params = v[type + "Params"];
759
- scope = v.callbackScope || animation;
760
- executeLazyFirst && _lazyTweens.length && _lazyRender();
761
- context3 && (_context = context3);
762
- result = params ? callback.apply(scope, params) : callback.call(scope);
763
- _context = prevContext;
764
- return result;
765
- };
766
- var _interrupt = function _interrupt2(animation) {
767
- _removeFromParent(animation);
768
- animation.scrollTrigger && animation.scrollTrigger.kill(!!_reverting);
769
- animation.progress() < 1 && _callback(animation, "onInterrupt");
770
- return animation;
771
- };
772
- var _quickTween;
773
- var _registerPluginQueue = [];
774
- var _createPlugin = function _createPlugin2(config3) {
775
- if (!config3) return;
776
- config3 = !config3.name && config3["default"] || config3;
777
- if (_windowExists() || config3.headless) {
778
- var name = config3.name, isFunc = _isFunction(config3), Plugin = name && !isFunc && config3.init ? function() {
779
- this._props = [];
780
- } : config3, instanceDefaults = {
781
- init: _emptyFunc,
782
- render: _renderPropTweens,
783
- add: _addPropTween,
784
- kill: _killPropTweensOf,
785
- modifier: _addPluginModifier,
786
- rawVars: 0
787
- }, statics = {
788
- targetTest: 0,
789
- get: 0,
790
- getSetter: _getSetter,
791
- aliases: {},
792
- register: 0
793
- };
794
- _wake();
795
- if (config3 !== Plugin) {
796
- if (_plugins[name]) {
797
- return;
798
- }
799
- _setDefaults(Plugin, _setDefaults(_copyExcluding(config3, instanceDefaults), statics));
800
- _merge(Plugin.prototype, _merge(instanceDefaults, _copyExcluding(config3, statics)));
801
- _plugins[Plugin.prop = name] = Plugin;
802
- if (config3.targetTest) {
803
- _harnessPlugins.push(Plugin);
804
- _reservedProps[name] = 1;
805
- }
806
- name = (name === "css" ? "CSS" : name.charAt(0).toUpperCase() + name.substr(1)) + "Plugin";
807
- }
808
- _addGlobal(name, Plugin);
809
- config3.register && config3.register(gsap, Plugin, PropTween);
810
- } else {
811
- _registerPluginQueue.push(config3);
812
- }
813
- };
814
- var _255 = 255;
815
- var _colorLookup = {
816
- aqua: [0, _255, _255],
817
- lime: [0, _255, 0],
818
- silver: [192, 192, 192],
819
- black: [0, 0, 0],
820
- maroon: [128, 0, 0],
821
- teal: [0, 128, 128],
822
- blue: [0, 0, _255],
823
- navy: [0, 0, 128],
824
- white: [_255, _255, _255],
825
- olive: [128, 128, 0],
826
- yellow: [_255, _255, 0],
827
- orange: [_255, 165, 0],
828
- gray: [128, 128, 128],
829
- purple: [128, 0, 128],
830
- green: [0, 128, 0],
831
- red: [_255, 0, 0],
832
- pink: [_255, 192, 203],
833
- cyan: [0, _255, _255],
834
- transparent: [_255, _255, _255, 0]
835
- };
836
- var _hue = function _hue2(h, m1, m2) {
837
- h += h < 0 ? 1 : h > 1 ? -1 : 0;
838
- 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;
839
- };
840
- var splitColor = function splitColor2(v, toHSL, forceAlpha) {
841
- var a = !v ? _colorLookup.black : _isNumber(v) ? [v >> 16, v >> 8 & _255, v & _255] : 0, r, g, b, h, s, l, max, min, d, wasHSL;
842
- if (!a) {
843
- if (v.substr(-1) === ",") {
844
- v = v.substr(0, v.length - 1);
845
- }
846
- if (_colorLookup[v]) {
847
- a = _colorLookup[v];
848
- } else if (v.charAt(0) === "#") {
849
- if (v.length < 6) {
850
- r = v.charAt(1);
851
- g = v.charAt(2);
852
- b = v.charAt(3);
853
- v = "#" + r + r + g + g + b + b + (v.length === 5 ? v.charAt(4) + v.charAt(4) : "");
854
- }
855
- if (v.length === 9) {
856
- a = parseInt(v.substr(1, 6), 16);
857
- return [a >> 16, a >> 8 & _255, a & _255, parseInt(v.substr(7), 16) / 255];
858
- }
859
- v = parseInt(v.substr(1), 16);
860
- a = [v >> 16, v >> 8 & _255, v & _255];
861
- } else if (v.substr(0, 3) === "hsl") {
862
- a = wasHSL = v.match(_strictNumExp);
863
- if (!toHSL) {
864
- h = +a[0] % 360 / 360;
865
- s = +a[1] / 100;
866
- l = +a[2] / 100;
867
- g = l <= 0.5 ? l * (s + 1) : l + s - l * s;
868
- r = l * 2 - g;
869
- a.length > 3 && (a[3] *= 1);
870
- a[0] = _hue(h + 1 / 3, r, g);
871
- a[1] = _hue(h, r, g);
872
- a[2] = _hue(h - 1 / 3, r, g);
873
- } else if (~v.indexOf("=")) {
874
- a = v.match(_numExp);
875
- forceAlpha && a.length < 4 && (a[3] = 1);
876
- return a;
877
- }
878
- } else {
879
- a = v.match(_strictNumExp) || _colorLookup.transparent;
880
- }
881
- a = a.map(Number);
882
- }
883
- if (toHSL && !wasHSL) {
884
- r = a[0] / _255;
885
- g = a[1] / _255;
886
- b = a[2] / _255;
887
- max = Math.max(r, g, b);
888
- min = Math.min(r, g, b);
889
- l = (max + min) / 2;
890
- if (max === min) {
891
- h = s = 0;
892
- } else {
893
- d = max - min;
894
- s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
895
- h = max === r ? (g - b) / d + (g < b ? 6 : 0) : max === g ? (b - r) / d + 2 : (r - g) / d + 4;
896
- h *= 60;
897
- }
898
- a[0] = ~~(h + 0.5);
899
- a[1] = ~~(s * 100 + 0.5);
900
- a[2] = ~~(l * 100 + 0.5);
901
- }
902
- forceAlpha && a.length < 4 && (a[3] = 1);
903
- return a;
904
- };
905
- var _colorOrderData = function _colorOrderData2(v) {
906
- var values = [], c = [], i = -1;
907
- v.split(_colorExp).forEach(function(v2) {
908
- var a = v2.match(_numWithUnitExp) || [];
909
- values.push.apply(values, a);
910
- c.push(i += a.length + 1);
911
- });
912
- values.c = c;
913
- return values;
914
- };
915
- var _formatColors = function _formatColors2(s, toHSL, orderMatchData) {
916
- var result = "", colors = (s + result).match(_colorExp), type = toHSL ? "hsla(" : "rgba(", i = 0, c, shell, d, l;
917
- if (!colors) {
918
- return s;
919
- }
920
- colors = colors.map(function(color) {
921
- return (color = splitColor(color, toHSL, 1)) && type + (toHSL ? color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : color.join(",")) + ")";
922
- });
923
- if (orderMatchData) {
924
- d = _colorOrderData(s);
925
- c = orderMatchData.c;
926
- if (c.join(result) !== d.c.join(result)) {
927
- shell = s.replace(_colorExp, "1").split(_numWithUnitExp);
928
- l = shell.length - 1;
929
- for (; i < l; i++) {
930
- result += shell[i] + (~c.indexOf(i) ? colors.shift() || type + "0,0,0,0)" : (d.length ? d : colors.length ? colors : orderMatchData).shift());
931
- }
932
- }
933
- }
934
- if (!shell) {
935
- shell = s.split(_colorExp);
936
- l = shell.length - 1;
937
- for (; i < l; i++) {
938
- result += shell[i] + colors[i];
939
- }
940
- }
941
- return result + shell[l];
942
- };
943
- var _colorExp = function() {
944
- var s = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", p;
945
- for (p in _colorLookup) {
946
- s += "|" + p + "\\b";
947
- }
948
- return new RegExp(s + ")", "gi");
949
- }();
950
- var _hslExp = /hsl[a]?\(/;
951
- var _colorStringFilter = function _colorStringFilter2(a) {
952
- var combined = a.join(" "), toHSL;
953
- _colorExp.lastIndex = 0;
954
- if (_colorExp.test(combined)) {
955
- toHSL = _hslExp.test(combined);
956
- a[1] = _formatColors(a[1], toHSL);
957
- a[0] = _formatColors(a[0], toHSL, _colorOrderData(a[1]));
958
- return true;
959
- }
960
- };
961
- var _tickerActive;
962
- var _ticker = function() {
963
- var _getTime = Date.now, _lagThreshold = 500, _adjustedLag = 33, _startTime = _getTime(), _lastUpdate = _startTime, _gap = 1e3 / 240, _nextTime = _gap, _listeners2 = [], _id, _req, _raf, _self, _delta, _i, _tick = function _tick2(v) {
964
- var elapsed = _getTime() - _lastUpdate, manual = v === true, overlap, dispatch, time, frame;
965
- (elapsed > _lagThreshold || elapsed < 0) && (_startTime += elapsed - _adjustedLag);
966
- _lastUpdate += elapsed;
967
- time = _lastUpdate - _startTime;
968
- overlap = time - _nextTime;
969
- if (overlap > 0 || manual) {
970
- frame = ++_self.frame;
971
- _delta = time - _self.time * 1e3;
972
- _self.time = time = time / 1e3;
973
- _nextTime += overlap + (overlap >= _gap ? 4 : _gap - overlap);
974
- dispatch = 1;
975
- }
976
- manual || (_id = _req(_tick2));
977
- if (dispatch) {
978
- for (_i = 0; _i < _listeners2.length; _i++) {
979
- _listeners2[_i](time, _delta, frame, v);
980
- }
981
- }
982
- };
983
- _self = {
984
- time: 0,
985
- frame: 0,
986
- tick: function tick() {
987
- _tick(true);
988
- },
989
- deltaRatio: function deltaRatio(fps) {
990
- return _delta / (1e3 / (fps || 60));
991
- },
992
- wake: function wake() {
993
- if (_coreReady) {
994
- if (!_coreInitted && _windowExists()) {
995
- _win = _coreInitted = window;
996
- _doc = _win.document || {};
997
- _globals.gsap = gsap;
998
- (_win.gsapVersions || (_win.gsapVersions = [])).push(gsap.version);
999
- _install(_installScope || _win.GreenSockGlobals || !_win.gsap && _win || {});
1000
- _registerPluginQueue.forEach(_createPlugin);
1001
- }
1002
- _raf = typeof requestAnimationFrame !== "undefined" && requestAnimationFrame;
1003
- _id && _self.sleep();
1004
- _req = _raf || function(f) {
1005
- return setTimeout(f, _nextTime - _self.time * 1e3 + 1 | 0);
1006
- };
1007
- _tickerActive = 1;
1008
- _tick(2);
1009
- }
1010
- },
1011
- sleep: function sleep() {
1012
- (_raf ? cancelAnimationFrame : clearTimeout)(_id);
1013
- _tickerActive = 0;
1014
- _req = _emptyFunc;
1015
- },
1016
- lagSmoothing: function lagSmoothing(threshold, adjustedLag) {
1017
- _lagThreshold = threshold || Infinity;
1018
- _adjustedLag = Math.min(adjustedLag || 33, _lagThreshold);
1019
- },
1020
- fps: function fps(_fps) {
1021
- _gap = 1e3 / (_fps || 240);
1022
- _nextTime = _self.time * 1e3 + _gap;
1023
- },
1024
- add: function add(callback, once, prioritize) {
1025
- var func = once ? function(t, d, f, v) {
1026
- callback(t, d, f, v);
1027
- _self.remove(func);
1028
- } : callback;
1029
- _self.remove(callback);
1030
- _listeners2[prioritize ? "unshift" : "push"](func);
1031
- _wake();
1032
- return func;
1033
- },
1034
- remove: function remove(callback, i) {
1035
- ~(i = _listeners2.indexOf(callback)) && _listeners2.splice(i, 1) && _i >= i && _i--;
1036
- },
1037
- _listeners: _listeners2
1038
- };
1039
- return _self;
1040
- }();
1041
- var _wake = function _wake2() {
1042
- return !_tickerActive && _ticker.wake();
1043
- };
1044
- var _easeMap = {};
1045
- var _customEaseExp = /^[\d.\-M][\d.\-,\s]/;
1046
- var _quotesExp = /["']/g;
1047
- var _parseObjectInString = function _parseObjectInString2(value) {
1048
- var obj = {}, split = value.substr(1, value.length - 3).split(":"), key = split[0], i = 1, l = split.length, index, val, parsedVal;
1049
- for (; i < l; i++) {
1050
- val = split[i];
1051
- index = i !== l - 1 ? val.lastIndexOf(",") : val.length;
1052
- parsedVal = val.substr(0, index);
1053
- obj[key] = isNaN(parsedVal) ? parsedVal.replace(_quotesExp, "").trim() : +parsedVal;
1054
- key = val.substr(index + 1).trim();
1055
- }
1056
- return obj;
1057
- };
1058
- var _valueInParentheses = function _valueInParentheses2(value) {
1059
- var open = value.indexOf("(") + 1, close = value.indexOf(")"), nested = value.indexOf("(", open);
1060
- return value.substring(open, ~nested && nested < close ? value.indexOf(")", close + 1) : close);
1061
- };
1062
- var _configEaseFromString = function _configEaseFromString2(name) {
1063
- var split = (name + "").split("("), ease = _easeMap[split[0]];
1064
- return ease && split.length > 1 && ease.config ? ease.config.apply(null, ~name.indexOf("{") ? [_parseObjectInString(split[1])] : _valueInParentheses(name).split(",").map(_numericIfPossible)) : _easeMap._CE && _customEaseExp.test(name) ? _easeMap._CE("", name) : ease;
1065
- };
1066
- var _invertEase = function _invertEase2(ease) {
1067
- return function(p) {
1068
- return 1 - ease(1 - p);
1069
- };
1070
- };
1071
- var _propagateYoyoEase = function _propagateYoyoEase2(timeline2, isYoyo) {
1072
- var child = timeline2._first, ease;
1073
- while (child) {
1074
- if (child instanceof Timeline) {
1075
- _propagateYoyoEase2(child, isYoyo);
1076
- } else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) {
1077
- if (child.timeline) {
1078
- _propagateYoyoEase2(child.timeline, isYoyo);
1079
- } else {
1080
- ease = child._ease;
1081
- child._ease = child._yEase;
1082
- child._yEase = ease;
1083
- child._yoyo = isYoyo;
1084
- }
1085
- }
1086
- child = child._next;
1087
- }
1088
- };
1089
- var _parseEase = function _parseEase2(ease, defaultEase) {
1090
- return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase;
1091
- };
1092
- var _insertEase = function _insertEase2(names, easeIn, easeOut, easeInOut) {
1093
- if (easeOut === void 0) {
1094
- easeOut = function easeOut2(p) {
1095
- return 1 - easeIn(1 - p);
1096
- };
1097
- }
1098
- if (easeInOut === void 0) {
1099
- easeInOut = function easeInOut2(p) {
1100
- return p < 0.5 ? easeIn(p * 2) / 2 : 1 - easeIn((1 - p) * 2) / 2;
1101
- };
1102
- }
1103
- var ease = {
1104
- easeIn,
1105
- easeOut,
1106
- easeInOut
1107
- }, lowercaseName;
1108
- _forEachName(names, function(name) {
1109
- _easeMap[name] = _globals[name] = ease;
1110
- _easeMap[lowercaseName = name.toLowerCase()] = easeOut;
1111
- for (var p in ease) {
1112
- _easeMap[lowercaseName + (p === "easeIn" ? ".in" : p === "easeOut" ? ".out" : ".inOut")] = _easeMap[name + "." + p] = ease[p];
1113
- }
1114
- });
1115
- return ease;
1116
- };
1117
- var _easeInOutFromOut = function _easeInOutFromOut2(easeOut) {
1118
- return function(p) {
1119
- return p < 0.5 ? (1 - easeOut(1 - p * 2)) / 2 : 0.5 + easeOut((p - 0.5) * 2) / 2;
1120
- };
1121
- };
1122
- var _configElastic = function _configElastic2(type, amplitude, period) {
1123
- var p1 = amplitude >= 1 ? amplitude : 1, p2 = (period || (type ? 0.3 : 0.45)) / (amplitude < 1 ? amplitude : 1), p3 = p2 / _2PI * (Math.asin(1 / p1) || 0), easeOut = function easeOut2(p) {
1124
- return p === 1 ? 1 : p1 * Math.pow(2, -10 * p) * _sin((p - p3) * p2) + 1;
1125
- }, ease = type === "out" ? easeOut : type === "in" ? function(p) {
1126
- return 1 - easeOut(1 - p);
1127
- } : _easeInOutFromOut(easeOut);
1128
- p2 = _2PI / p2;
1129
- ease.config = function(amplitude2, period2) {
1130
- return _configElastic2(type, amplitude2, period2);
1131
- };
1132
- return ease;
1133
- };
1134
- var _configBack = function _configBack2(type, overshoot) {
1135
- if (overshoot === void 0) {
1136
- overshoot = 1.70158;
1137
- }
1138
- var easeOut = function easeOut2(p) {
1139
- return p ? --p * p * ((overshoot + 1) * p + overshoot) + 1 : 0;
1140
- }, ease = type === "out" ? easeOut : type === "in" ? function(p) {
1141
- return 1 - easeOut(1 - p);
1142
- } : _easeInOutFromOut(easeOut);
1143
- ease.config = function(overshoot2) {
1144
- return _configBack2(type, overshoot2);
1145
- };
1146
- return ease;
1147
- };
1148
- _forEachName("Linear,Quad,Cubic,Quart,Quint,Strong", function(name, i) {
1149
- var power = i < 5 ? i + 1 : i;
1150
- _insertEase(name + ",Power" + (power - 1), i ? function(p) {
1151
- return Math.pow(p, power);
1152
- } : function(p) {
1153
- return p;
1154
- }, function(p) {
1155
- return 1 - Math.pow(1 - p, power);
1156
- }, function(p) {
1157
- return p < 0.5 ? Math.pow(p * 2, power) / 2 : 1 - Math.pow((1 - p) * 2, power) / 2;
1158
- });
1159
- });
1160
- _easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn;
1161
- _insertEase("Elastic", _configElastic("in"), _configElastic("out"), _configElastic());
1162
- (function(n, c) {
1163
- var n1 = 1 / c, n2 = 2 * n1, n3 = 2.5 * n1, easeOut = function easeOut2(p) {
1164
- return p < n1 ? n * p * p : p < n2 ? n * Math.pow(p - 1.5 / c, 2) + 0.75 : p < n3 ? n * (p -= 2.25 / c) * p + 0.9375 : n * Math.pow(p - 2.625 / c, 2) + 0.984375;
1165
- };
1166
- _insertEase("Bounce", function(p) {
1167
- return 1 - easeOut(1 - p);
1168
- }, easeOut);
1169
- })(7.5625, 2.75);
1170
- _insertEase("Expo", function(p) {
1171
- return Math.pow(2, 10 * (p - 1)) * p + p * p * p * p * p * p * (1 - p);
1172
- });
1173
- _insertEase("Circ", function(p) {
1174
- return -(_sqrt(1 - p * p) - 1);
1175
- });
1176
- _insertEase("Sine", function(p) {
1177
- return p === 1 ? 1 : -_cos(p * _HALF_PI) + 1;
1178
- });
1179
- _insertEase("Back", _configBack("in"), _configBack("out"), _configBack());
1180
- _easeMap.SteppedEase = _easeMap.steps = _globals.SteppedEase = {
1181
- config: function config(steps, immediateStart) {
1182
- if (steps === void 0) {
1183
- steps = 1;
1184
- }
1185
- var p1 = 1 / steps, p2 = steps + (immediateStart ? 0 : 1), p3 = immediateStart ? 1 : 0, max = 1 - _tinyNum;
1186
- return function(p) {
1187
- return ((p2 * _clamp(0, max, p) | 0) + p3) * p1;
1188
- };
1189
- }
1190
- };
1191
- _defaults.ease = _easeMap["quad.out"];
1192
- _forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(name) {
1193
- return _callbackNames += name + "," + name + "Params,";
1194
- });
1195
- var GSCache = function GSCache2(target, harness) {
1196
- this.id = _gsID++;
1197
- target._gsap = this;
1198
- this.target = target;
1199
- this.harness = harness;
1200
- this.get = harness ? harness.get : _getProperty;
1201
- this.set = harness ? harness.getSetter : _getSetter;
1202
- };
1203
- var Animation = /* @__PURE__ */ function() {
1204
- function Animation2(vars) {
1205
- this.vars = vars;
1206
- this._delay = +vars.delay || 0;
1207
- if (this._repeat = vars.repeat === Infinity ? -2 : vars.repeat || 0) {
1208
- this._rDelay = vars.repeatDelay || 0;
1209
- this._yoyo = !!vars.yoyo || !!vars.yoyoEase;
1210
- }
1211
- this._ts = 1;
1212
- _setDuration(this, +vars.duration, 1, 1);
1213
- this.data = vars.data;
1214
- if (_context) {
1215
- this._ctx = _context;
1216
- _context.data.push(this);
1217
- }
1218
- _tickerActive || _ticker.wake();
1219
- }
1220
- var _proto = Animation2.prototype;
1221
- _proto.delay = function delay(value) {
1222
- if (value || value === 0) {
1223
- this.parent && this.parent.smoothChildTiming && this.startTime(this._start + value - this._delay);
1224
- this._delay = value;
1225
- return this;
1226
- }
1227
- return this._delay;
1228
- };
1229
- _proto.duration = function duration(value) {
1230
- return arguments.length ? this.totalDuration(this._repeat > 0 ? value + (value + this._rDelay) * this._repeat : value) : this.totalDuration() && this._dur;
1231
- };
1232
- _proto.totalDuration = function totalDuration(value) {
1233
- if (!arguments.length) {
1234
- return this._tDur;
1235
- }
1236
- this._dirty = 0;
1237
- return _setDuration(this, this._repeat < 0 ? value : (value - this._repeat * this._rDelay) / (this._repeat + 1));
1238
- };
1239
- _proto.totalTime = function totalTime(_totalTime, suppressEvents) {
1240
- _wake();
1241
- if (!arguments.length) {
1242
- return this._tTime;
1243
- }
1244
- var parent = this._dp;
1245
- if (parent && parent.smoothChildTiming && this._ts) {
1246
- _alignPlayhead(this, _totalTime);
1247
- !parent._dp || parent.parent || _postAddChecks(parent, this);
1248
- while (parent && parent.parent) {
1249
- if (parent.parent._time !== parent._start + (parent._ts >= 0 ? parent._tTime / parent._ts : (parent.totalDuration() - parent._tTime) / -parent._ts)) {
1250
- parent.totalTime(parent._tTime, true);
1251
- }
1252
- parent = parent.parent;
1253
- }
1254
- if (!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && _totalTime < this._tDur || this._ts < 0 && _totalTime > 0 || !this._tDur && !_totalTime)) {
1255
- _addToTimeline(this._dp, this, this._start - this._delay);
1256
- }
1257
- }
1258
- if (this._tTime !== _totalTime || !this._dur && !suppressEvents || this._initted && Math.abs(this._zTime) === _tinyNum || !_totalTime && !this._initted && (this.add || this._ptLookup)) {
1259
- this._ts || (this._pTime = _totalTime);
1260
- _lazySafeRender(this, _totalTime, suppressEvents);
1261
- }
1262
- return this;
1263
- };
1264
- _proto.time = function time(value, suppressEvents) {
1265
- return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % (this._dur + this._rDelay) || (value ? this._dur : 0), suppressEvents) : this._time;
1266
- };
1267
- _proto.totalProgress = function totalProgress(value, suppressEvents) {
1268
- return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() >= 0 && this._initted ? 1 : 0;
1269
- };
1270
- _proto.progress = function progress(value, suppressEvents) {
1271
- return arguments.length ? this.totalTime(this.duration() * (this._yoyo && !(this.iteration() & 1) ? 1 - value : value) + _elapsedCycleDuration(this), suppressEvents) : this.duration() ? Math.min(1, this._time / this._dur) : this.rawTime() > 0 ? 1 : 0;
1272
- };
1273
- _proto.iteration = function iteration(value, suppressEvents) {
1274
- var cycleDuration = this.duration() + this._rDelay;
1275
- return arguments.length ? this.totalTime(this._time + (value - 1) * cycleDuration, suppressEvents) : this._repeat ? _animationCycle(this._tTime, cycleDuration) + 1 : 1;
1276
- };
1277
- _proto.timeScale = function timeScale(value, suppressEvents) {
1278
- if (!arguments.length) {
1279
- return this._rts === -_tinyNum ? 0 : this._rts;
1280
- }
1281
- if (this._rts === value) {
1282
- return this;
1283
- }
1284
- var tTime = this.parent && this._ts ? _parentToChildTotalTime(this.parent._time, this) : this._tTime;
1285
- this._rts = +value || 0;
1286
- this._ts = this._ps || value === -_tinyNum ? 0 : this._rts;
1287
- this.totalTime(_clamp(-Math.abs(this._delay), this.totalDuration(), tTime), suppressEvents !== false);
1288
- _setEnd(this);
1289
- return _recacheAncestors(this);
1290
- };
1291
- _proto.paused = function paused(value) {
1292
- if (!arguments.length) {
1293
- return this._ps;
1294
- }
1295
- if (this._ps !== value) {
1296
- this._ps = value;
1297
- if (value) {
1298
- this._pTime = this._tTime || Math.max(-this._delay, this.rawTime());
1299
- this._ts = this._act = 0;
1300
- } else {
1301
- _wake();
1302
- this._ts = this._rts;
1303
- this.totalTime(this.parent && !this.parent.smoothChildTiming ? this.rawTime() : this._tTime || this._pTime, this.progress() === 1 && Math.abs(this._zTime) !== _tinyNum && (this._tTime -= _tinyNum));
1304
- }
1305
- }
1306
- return this;
1307
- };
1308
- _proto.startTime = function startTime(value) {
1309
- if (arguments.length) {
1310
- this._start = value;
1311
- var parent = this.parent || this._dp;
1312
- parent && (parent._sort || !this.parent) && _addToTimeline(parent, this, value - this._delay);
1313
- return this;
1314
- }
1315
- return this._start;
1316
- };
1317
- _proto.endTime = function endTime(includeRepeats) {
1318
- return this._start + (_isNotFalse(includeRepeats) ? this.totalDuration() : this.duration()) / Math.abs(this._ts || 1);
1319
- };
1320
- _proto.rawTime = function rawTime(wrapRepeats) {
1321
- var parent = this.parent || this._dp;
1322
- return !parent ? this._tTime : wrapRepeats && (!this._ts || this._repeat && this._time && this.totalProgress() < 1) ? this._tTime % (this._dur + this._rDelay) : !this._ts ? this._tTime : _parentToChildTotalTime(parent.rawTime(wrapRepeats), this);
1323
- };
1324
- _proto.revert = function revert(config3) {
1325
- if (config3 === void 0) {
1326
- config3 = _revertConfig;
1327
- }
1328
- var prevIsReverting = _reverting;
1329
- _reverting = config3;
1330
- if (_isRevertWorthy(this)) {
1331
- this.timeline && this.timeline.revert(config3);
1332
- this.totalTime(-0.01, config3.suppressEvents);
1333
- }
1334
- this.data !== "nested" && config3.kill !== false && this.kill();
1335
- _reverting = prevIsReverting;
1336
- return this;
1337
- };
1338
- _proto.globalTime = function globalTime(rawTime) {
1339
- var animation = this, time = arguments.length ? rawTime : animation.rawTime();
1340
- while (animation) {
1341
- time = animation._start + time / (Math.abs(animation._ts) || 1);
1342
- animation = animation._dp;
1343
- }
1344
- return !this.parent && this._sat ? this._sat.globalTime(rawTime) : time;
1345
- };
1346
- _proto.repeat = function repeat(value) {
1347
- if (arguments.length) {
1348
- this._repeat = value === Infinity ? -2 : value;
1349
- return _onUpdateTotalDuration(this);
1350
- }
1351
- return this._repeat === -2 ? Infinity : this._repeat;
1352
- };
1353
- _proto.repeatDelay = function repeatDelay(value) {
1354
- if (arguments.length) {
1355
- var time = this._time;
1356
- this._rDelay = value;
1357
- _onUpdateTotalDuration(this);
1358
- return time ? this.time(time) : this;
1359
- }
1360
- return this._rDelay;
1361
- };
1362
- _proto.yoyo = function yoyo(value) {
1363
- if (arguments.length) {
1364
- this._yoyo = value;
1365
- return this;
1366
- }
1367
- return this._yoyo;
1368
- };
1369
- _proto.seek = function seek(position, suppressEvents) {
1370
- return this.totalTime(_parsePosition(this, position), _isNotFalse(suppressEvents));
1371
- };
1372
- _proto.restart = function restart(includeDelay, suppressEvents) {
1373
- this.play().totalTime(includeDelay ? -this._delay : 0, _isNotFalse(suppressEvents));
1374
- this._dur || (this._zTime = -_tinyNum);
1375
- return this;
1376
- };
1377
- _proto.play = function play(from, suppressEvents) {
1378
- from != null && this.seek(from, suppressEvents);
1379
- return this.reversed(false).paused(false);
1380
- };
1381
- _proto.reverse = function reverse(from, suppressEvents) {
1382
- from != null && this.seek(from || this.totalDuration(), suppressEvents);
1383
- return this.reversed(true).paused(false);
1384
- };
1385
- _proto.pause = function pause(atTime, suppressEvents) {
1386
- atTime != null && this.seek(atTime, suppressEvents);
1387
- return this.paused(true);
1388
- };
1389
- _proto.resume = function resume() {
1390
- return this.paused(false);
1391
- };
1392
- _proto.reversed = function reversed(value) {
1393
- if (arguments.length) {
1394
- !!value !== this.reversed() && this.timeScale(-this._rts || (value ? -_tinyNum : 0));
1395
- return this;
1396
- }
1397
- return this._rts < 0;
1398
- };
1399
- _proto.invalidate = function invalidate() {
1400
- this._initted = this._act = 0;
1401
- this._zTime = -_tinyNum;
1402
- return this;
1403
- };
1404
- _proto.isActive = function isActive() {
1405
- var parent = this.parent || this._dp, start = this._start, rawTime;
1406
- return !!(!parent || this._ts && this._initted && parent.isActive() && (rawTime = parent.rawTime(true)) >= start && rawTime < this.endTime(true) - _tinyNum);
1407
- };
1408
- _proto.eventCallback = function eventCallback(type, callback, params) {
1409
- var vars = this.vars;
1410
- if (arguments.length > 1) {
1411
- if (!callback) {
1412
- delete vars[type];
1413
- } else {
1414
- vars[type] = callback;
1415
- params && (vars[type + "Params"] = params);
1416
- type === "onUpdate" && (this._onUpdate = callback);
1417
- }
1418
- return this;
1419
- }
1420
- return vars[type];
1421
- };
1422
- _proto.then = function then(onFulfilled) {
1423
- var self = this;
1424
- return new Promise(function(resolve) {
1425
- var f = _isFunction(onFulfilled) ? onFulfilled : _passThrough, _resolve = function _resolve2() {
1426
- var _then = self.then;
1427
- self.then = null;
1428
- _isFunction(f) && (f = f(self)) && (f.then || f === self) && (self.then = _then);
1429
- resolve(f);
1430
- self.then = _then;
1431
- };
1432
- if (self._initted && self.totalProgress() === 1 && self._ts >= 0 || !self._tTime && self._ts < 0) {
1433
- _resolve();
1434
- } else {
1435
- self._prom = _resolve;
1436
- }
1437
- });
1438
- };
1439
- _proto.kill = function kill() {
1440
- _interrupt(this);
1441
- };
1442
- return Animation2;
1443
- }();
1444
- _setDefaults(Animation.prototype, {
1445
- _time: 0,
1446
- _start: 0,
1447
- _end: 0,
1448
- _tTime: 0,
1449
- _tDur: 0,
1450
- _dirty: 0,
1451
- _repeat: 0,
1452
- _yoyo: false,
1453
- parent: null,
1454
- _initted: false,
1455
- _rDelay: 0,
1456
- _ts: 1,
1457
- _dp: 0,
1458
- ratio: 0,
1459
- _zTime: -_tinyNum,
1460
- _prom: 0,
1461
- _ps: false,
1462
- _rts: 1
1463
- });
1464
- var Timeline = /* @__PURE__ */ function(_Animation) {
1465
- _inheritsLoose(Timeline2, _Animation);
1466
- function Timeline2(vars, position) {
1467
- var _this;
1468
- if (vars === void 0) {
1469
- vars = {};
1470
- }
1471
- _this = _Animation.call(this, vars) || this;
1472
- _this.labels = {};
1473
- _this.smoothChildTiming = !!vars.smoothChildTiming;
1474
- _this.autoRemoveChildren = !!vars.autoRemoveChildren;
1475
- _this._sort = _isNotFalse(vars.sortChildren);
1476
- _globalTimeline && _addToTimeline(vars.parent || _globalTimeline, _assertThisInitialized(_this), position);
1477
- vars.reversed && _this.reverse();
1478
- vars.paused && _this.paused(true);
1479
- vars.scrollTrigger && _scrollTrigger(_assertThisInitialized(_this), vars.scrollTrigger);
1480
- return _this;
1481
- }
1482
- var _proto2 = Timeline2.prototype;
1483
- _proto2.to = function to(targets, vars, position) {
1484
- _createTweenType(0, arguments, this);
1485
- return this;
1486
- };
1487
- _proto2.from = function from(targets, vars, position) {
1488
- _createTweenType(1, arguments, this);
1489
- return this;
1490
- };
1491
- _proto2.fromTo = function fromTo(targets, fromVars, toVars, position) {
1492
- _createTweenType(2, arguments, this);
1493
- return this;
1494
- };
1495
- _proto2.set = function set(targets, vars, position) {
1496
- vars.duration = 0;
1497
- vars.parent = this;
1498
- _inheritDefaults(vars).repeatDelay || (vars.repeat = 0);
1499
- vars.immediateRender = !!vars.immediateRender;
1500
- new Tween(targets, vars, _parsePosition(this, position), 1);
1501
- return this;
1502
- };
1503
- _proto2.call = function call(callback, params, position) {
1504
- return _addToTimeline(this, Tween.delayedCall(0, callback, params), position);
1505
- };
1506
- _proto2.staggerTo = function staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {
1507
- vars.duration = duration;
1508
- vars.stagger = vars.stagger || stagger;
1509
- vars.onComplete = onCompleteAll;
1510
- vars.onCompleteParams = onCompleteAllParams;
1511
- vars.parent = this;
1512
- new Tween(targets, vars, _parsePosition(this, position));
1513
- return this;
1514
- };
1515
- _proto2.staggerFrom = function staggerFrom(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams) {
1516
- vars.runBackwards = 1;
1517
- _inheritDefaults(vars).immediateRender = _isNotFalse(vars.immediateRender);
1518
- return this.staggerTo(targets, duration, vars, stagger, position, onCompleteAll, onCompleteAllParams);
1519
- };
1520
- _proto2.staggerFromTo = function staggerFromTo(targets, duration, fromVars, toVars, stagger, position, onCompleteAll, onCompleteAllParams) {
1521
- toVars.startAt = fromVars;
1522
- _inheritDefaults(toVars).immediateRender = _isNotFalse(toVars.immediateRender);
1523
- return this.staggerTo(targets, duration, toVars, stagger, position, onCompleteAll, onCompleteAllParams);
1524
- };
1525
- _proto2.render = function render3(totalTime, suppressEvents, force) {
1526
- var prevTime = this._time, tDur = this._dirty ? this.totalDuration() : this._tDur, dur = this._dur, tTime = totalTime <= 0 ? 0 : _roundPrecise(totalTime), crossingStart = this._zTime < 0 !== totalTime < 0 && (this._initted || !dur), time, child, next, iteration, cycleDuration, prevPaused, pauseTween, timeScale, prevStart, prevIteration, yoyo, isYoyo;
1527
- this !== _globalTimeline && tTime > tDur && totalTime >= 0 && (tTime = tDur);
1528
- if (tTime !== this._tTime || force || crossingStart) {
1529
- if (prevTime !== this._time && dur) {
1530
- tTime += this._time - prevTime;
1531
- totalTime += this._time - prevTime;
1532
- }
1533
- time = tTime;
1534
- prevStart = this._start;
1535
- timeScale = this._ts;
1536
- prevPaused = !timeScale;
1537
- if (crossingStart) {
1538
- dur || (prevTime = this._zTime);
1539
- (totalTime || !suppressEvents) && (this._zTime = totalTime);
1540
- }
1541
- if (this._repeat) {
1542
- yoyo = this._yoyo;
1543
- cycleDuration = dur + this._rDelay;
1544
- if (this._repeat < -1 && totalTime < 0) {
1545
- return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force);
1546
- }
1547
- time = _roundPrecise(tTime % cycleDuration);
1548
- if (tTime === tDur) {
1549
- iteration = this._repeat;
1550
- time = dur;
1551
- } else {
1552
- prevIteration = _roundPrecise(tTime / cycleDuration);
1553
- iteration = ~~prevIteration;
1554
- if (iteration && iteration === prevIteration) {
1555
- time = dur;
1556
- iteration--;
1557
- }
1558
- time > dur && (time = dur);
1559
- }
1560
- prevIteration = _animationCycle(this._tTime, cycleDuration);
1561
- !prevTime && this._tTime && prevIteration !== iteration && this._tTime - prevIteration * cycleDuration - this._dur <= 0 && (prevIteration = iteration);
1562
- if (yoyo && iteration & 1) {
1563
- time = dur - time;
1564
- isYoyo = 1;
1565
- }
1566
- if (iteration !== prevIteration && !this._lock) {
1567
- var rewinding = yoyo && prevIteration & 1, doesWrap = rewinding === (yoyo && iteration & 1);
1568
- iteration < prevIteration && (rewinding = !rewinding);
1569
- prevTime = rewinding ? 0 : tTime % dur ? dur : tTime;
1570
- this._lock = 1;
1571
- this.render(prevTime || (isYoyo ? 0 : _roundPrecise(iteration * cycleDuration)), suppressEvents, !dur)._lock = 0;
1572
- this._tTime = tTime;
1573
- !suppressEvents && this.parent && _callback(this, "onRepeat");
1574
- this.vars.repeatRefresh && !isYoyo && (this.invalidate()._lock = 1);
1575
- if (prevTime && prevTime !== this._time || prevPaused !== !this._ts || this.vars.onRepeat && !this.parent && !this._act) {
1576
- return this;
1577
- }
1578
- dur = this._dur;
1579
- tDur = this._tDur;
1580
- if (doesWrap) {
1581
- this._lock = 2;
1582
- prevTime = rewinding ? dur : -1e-4;
1583
- this.render(prevTime, true);
1584
- this.vars.repeatRefresh && !isYoyo && this.invalidate();
1585
- }
1586
- this._lock = 0;
1587
- if (!this._ts && !prevPaused) {
1588
- return this;
1589
- }
1590
- _propagateYoyoEase(this, isYoyo);
1591
- }
1592
- }
1593
- if (this._hasPause && !this._forcing && this._lock < 2) {
1594
- pauseTween = _findNextPauseTween(this, _roundPrecise(prevTime), _roundPrecise(time));
1595
- if (pauseTween) {
1596
- tTime -= time - (time = pauseTween._start);
1597
- }
1598
- }
1599
- this._tTime = tTime;
1600
- this._time = time;
1601
- this._act = !timeScale;
1602
- if (!this._initted) {
1603
- this._onUpdate = this.vars.onUpdate;
1604
- this._initted = 1;
1605
- this._zTime = totalTime;
1606
- prevTime = 0;
1607
- }
1608
- if (!prevTime && tTime && !suppressEvents && !prevIteration) {
1609
- _callback(this, "onStart");
1610
- if (this._tTime !== tTime) {
1611
- return this;
1612
- }
1613
- }
1614
- if (time >= prevTime && totalTime >= 0) {
1615
- child = this._first;
1616
- while (child) {
1617
- next = child._next;
1618
- if ((child._act || time >= child._start) && child._ts && pauseTween !== child) {
1619
- if (child.parent !== this) {
1620
- return this.render(totalTime, suppressEvents, force);
1621
- }
1622
- child.render(child._ts > 0 ? (time - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (time - child._start) * child._ts, suppressEvents, force);
1623
- if (time !== this._time || !this._ts && !prevPaused) {
1624
- pauseTween = 0;
1625
- next && (tTime += this._zTime = -_tinyNum);
1626
- break;
1627
- }
1628
- }
1629
- child = next;
1630
- }
1631
- } else {
1632
- child = this._last;
1633
- var adjustedTime = totalTime < 0 ? totalTime : time;
1634
- while (child) {
1635
- next = child._prev;
1636
- if ((child._act || adjustedTime <= child._end) && child._ts && pauseTween !== child) {
1637
- if (child.parent !== this) {
1638
- return this.render(totalTime, suppressEvents, force);
1639
- }
1640
- child.render(child._ts > 0 ? (adjustedTime - child._start) * child._ts : (child._dirty ? child.totalDuration() : child._tDur) + (adjustedTime - child._start) * child._ts, suppressEvents, force || _reverting && _isRevertWorthy(child));
1641
- if (time !== this._time || !this._ts && !prevPaused) {
1642
- pauseTween = 0;
1643
- next && (tTime += this._zTime = adjustedTime ? -_tinyNum : _tinyNum);
1644
- break;
1645
- }
1646
- }
1647
- child = next;
1648
- }
1649
- }
1650
- if (pauseTween && !suppressEvents) {
1651
- this.pause();
1652
- pauseTween.render(time >= prevTime ? 0 : -_tinyNum)._zTime = time >= prevTime ? 1 : -1;
1653
- if (this._ts) {
1654
- this._start = prevStart;
1655
- _setEnd(this);
1656
- return this.render(totalTime, suppressEvents, force);
1657
- }
1658
- }
1659
- this._onUpdate && !suppressEvents && _callback(this, "onUpdate", true);
1660
- if (tTime === tDur && this._tTime >= this.totalDuration() || !tTime && prevTime) {
1661
- if (prevStart === this._start || Math.abs(timeScale) !== Math.abs(this._ts)) {
1662
- if (!this._lock) {
1663
- (totalTime || !dur) && (tTime === tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1);
1664
- if (!suppressEvents && !(totalTime < 0 && !prevTime) && (tTime || prevTime || !tDur)) {
1665
- _callback(this, tTime === tDur && totalTime >= 0 ? "onComplete" : "onReverseComplete", true);
1666
- this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();
1667
- }
1668
- }
1669
- }
1670
- }
1671
- }
1672
- return this;
1673
- };
1674
- _proto2.add = function add(child, position) {
1675
- var _this2 = this;
1676
- _isNumber(position) || (position = _parsePosition(this, position, child));
1677
- if (!(child instanceof Animation)) {
1678
- if (_isArray(child)) {
1679
- child.forEach(function(obj) {
1680
- return _this2.add(obj, position);
1681
- });
1682
- return this;
1683
- }
1684
- if (_isString(child)) {
1685
- return this.addLabel(child, position);
1686
- }
1687
- if (_isFunction(child)) {
1688
- child = Tween.delayedCall(0, child);
1689
- } else {
1690
- return this;
1691
- }
1692
- }
1693
- return this !== child ? _addToTimeline(this, child, position) : this;
1694
- };
1695
- _proto2.getChildren = function getChildren(nested, tweens, timelines, ignoreBeforeTime) {
1696
- if (nested === void 0) {
1697
- nested = true;
1698
- }
1699
- if (tweens === void 0) {
1700
- tweens = true;
1701
- }
1702
- if (timelines === void 0) {
1703
- timelines = true;
1704
- }
1705
- if (ignoreBeforeTime === void 0) {
1706
- ignoreBeforeTime = -_bigNum;
1707
- }
1708
- var a = [], child = this._first;
1709
- while (child) {
1710
- if (child._start >= ignoreBeforeTime) {
1711
- if (child instanceof Tween) {
1712
- tweens && a.push(child);
1713
- } else {
1714
- timelines && a.push(child);
1715
- nested && a.push.apply(a, child.getChildren(true, tweens, timelines));
1716
- }
1717
- }
1718
- child = child._next;
1719
- }
1720
- return a;
1721
- };
1722
- _proto2.getById = function getById2(id) {
1723
- var animations = this.getChildren(1, 1, 1), i = animations.length;
1724
- while (i--) {
1725
- if (animations[i].vars.id === id) {
1726
- return animations[i];
1727
- }
1728
- }
1729
- };
1730
- _proto2.remove = function remove(child) {
1731
- if (_isString(child)) {
1732
- return this.removeLabel(child);
1733
- }
1734
- if (_isFunction(child)) {
1735
- return this.killTweensOf(child);
1736
- }
1737
- child.parent === this && _removeLinkedListItem(this, child);
1738
- if (child === this._recent) {
1739
- this._recent = this._last;
1740
- }
1741
- return _uncache(this);
1742
- };
1743
- _proto2.totalTime = function totalTime(_totalTime2, suppressEvents) {
1744
- if (!arguments.length) {
1745
- return this._tTime;
1746
- }
1747
- this._forcing = 1;
1748
- if (!this._dp && this._ts) {
1749
- this._start = _roundPrecise(_ticker.time - (this._ts > 0 ? _totalTime2 / this._ts : (this.totalDuration() - _totalTime2) / -this._ts));
1750
- }
1751
- _Animation.prototype.totalTime.call(this, _totalTime2, suppressEvents);
1752
- this._forcing = 0;
1753
- return this;
1754
- };
1755
- _proto2.addLabel = function addLabel(label, position) {
1756
- this.labels[label] = _parsePosition(this, position);
1757
- return this;
1758
- };
1759
- _proto2.removeLabel = function removeLabel(label) {
1760
- delete this.labels[label];
1761
- return this;
1762
- };
1763
- _proto2.addPause = function addPause(position, callback, params) {
1764
- var t = Tween.delayedCall(0, callback || _emptyFunc, params);
1765
- t.data = "isPause";
1766
- this._hasPause = 1;
1767
- return _addToTimeline(this, t, _parsePosition(this, position));
1768
- };
1769
- _proto2.removePause = function removePause(position) {
1770
- var child = this._first;
1771
- position = _parsePosition(this, position);
1772
- while (child) {
1773
- if (child._start === position && child.data === "isPause") {
1774
- _removeFromParent(child);
1775
- }
1776
- child = child._next;
1777
- }
1778
- };
1779
- _proto2.killTweensOf = function killTweensOf(targets, props, onlyActive) {
1780
- var tweens = this.getTweensOf(targets, onlyActive), i = tweens.length;
1781
- while (i--) {
1782
- _overwritingTween !== tweens[i] && tweens[i].kill(targets, props);
1783
- }
1784
- return this;
1785
- };
1786
- _proto2.getTweensOf = function getTweensOf2(targets, onlyActive) {
1787
- var a = [], parsedTargets = toArray(targets), child = this._first, isGlobalTime = _isNumber(onlyActive), children;
1788
- while (child) {
1789
- if (child instanceof Tween) {
1790
- if (_arrayContainsAny(child._targets, parsedTargets) && (isGlobalTime ? (!_overwritingTween || child._initted && child._ts) && child.globalTime(0) <= onlyActive && child.globalTime(child.totalDuration()) > onlyActive : !onlyActive || child.isActive())) {
1791
- a.push(child);
1792
- }
1793
- } else if ((children = child.getTweensOf(parsedTargets, onlyActive)).length) {
1794
- a.push.apply(a, children);
1795
- }
1796
- child = child._next;
1797
- }
1798
- return a;
1799
- };
1800
- _proto2.tweenTo = function tweenTo(position, vars) {
1801
- vars = vars || {};
1802
- var tl = this, endTime = _parsePosition(tl, position), _vars = vars, startAt = _vars.startAt, _onStart = _vars.onStart, onStartParams = _vars.onStartParams, immediateRender = _vars.immediateRender, initted, tween = Tween.to(tl, _setDefaults({
1803
- ease: vars.ease || "none",
1804
- lazy: false,
1805
- immediateRender: false,
1806
- time: endTime,
1807
- overwrite: "auto",
1808
- duration: vars.duration || Math.abs((endTime - (startAt && "time" in startAt ? startAt.time : tl._time)) / tl.timeScale()) || _tinyNum,
1809
- onStart: function onStart() {
1810
- tl.pause();
1811
- if (!initted) {
1812
- var duration = vars.duration || Math.abs((endTime - (startAt && "time" in startAt ? startAt.time : tl._time)) / tl.timeScale());
1813
- tween._dur !== duration && _setDuration(tween, duration, 0, 1).render(tween._time, true, true);
1814
- initted = 1;
1815
- }
1816
- _onStart && _onStart.apply(tween, onStartParams || []);
1817
- }
1818
- }, vars));
1819
- return immediateRender ? tween.render(0) : tween;
1820
- };
1821
- _proto2.tweenFromTo = function tweenFromTo(fromPosition, toPosition, vars) {
1822
- return this.tweenTo(toPosition, _setDefaults({
1823
- startAt: {
1824
- time: _parsePosition(this, fromPosition)
1825
- }
1826
- }, vars));
1827
- };
1828
- _proto2.recent = function recent() {
1829
- return this._recent;
1830
- };
1831
- _proto2.nextLabel = function nextLabel(afterTime) {
1832
- if (afterTime === void 0) {
1833
- afterTime = this._time;
1834
- }
1835
- return _getLabelInDirection(this, _parsePosition(this, afterTime));
1836
- };
1837
- _proto2.previousLabel = function previousLabel(beforeTime) {
1838
- if (beforeTime === void 0) {
1839
- beforeTime = this._time;
1840
- }
1841
- return _getLabelInDirection(this, _parsePosition(this, beforeTime), 1);
1842
- };
1843
- _proto2.currentLabel = function currentLabel(value) {
1844
- return arguments.length ? this.seek(value, true) : this.previousLabel(this._time + _tinyNum);
1845
- };
1846
- _proto2.shiftChildren = function shiftChildren(amount, adjustLabels, ignoreBeforeTime) {
1847
- if (ignoreBeforeTime === void 0) {
1848
- ignoreBeforeTime = 0;
1849
- }
1850
- var child = this._first, labels = this.labels, p;
1851
- while (child) {
1852
- if (child._start >= ignoreBeforeTime) {
1853
- child._start += amount;
1854
- child._end += amount;
1855
- }
1856
- child = child._next;
1857
- }
1858
- if (adjustLabels) {
1859
- for (p in labels) {
1860
- if (labels[p] >= ignoreBeforeTime) {
1861
- labels[p] += amount;
1862
- }
1863
- }
1864
- }
1865
- return _uncache(this);
1866
- };
1867
- _proto2.invalidate = function invalidate(soft) {
1868
- var child = this._first;
1869
- this._lock = 0;
1870
- while (child) {
1871
- child.invalidate(soft);
1872
- child = child._next;
1873
- }
1874
- return _Animation.prototype.invalidate.call(this, soft);
1875
- };
1876
- _proto2.clear = function clear(includeLabels) {
1877
- if (includeLabels === void 0) {
1878
- includeLabels = true;
1879
- }
1880
- var child = this._first, next;
1881
- while (child) {
1882
- next = child._next;
1883
- this.remove(child);
1884
- child = next;
1885
- }
1886
- this._dp && (this._time = this._tTime = this._pTime = 0);
1887
- includeLabels && (this.labels = {});
1888
- return _uncache(this);
1889
- };
1890
- _proto2.totalDuration = function totalDuration(value) {
1891
- var max = 0, self = this, child = self._last, prevStart = _bigNum, prev, start, parent;
1892
- if (arguments.length) {
1893
- return self.timeScale((self._repeat < 0 ? self.duration() : self.totalDuration()) / (self.reversed() ? -value : value));
1894
- }
1895
- if (self._dirty) {
1896
- parent = self.parent;
1897
- while (child) {
1898
- prev = child._prev;
1899
- child._dirty && child.totalDuration();
1900
- start = child._start;
1901
- if (start > prevStart && self._sort && child._ts && !self._lock) {
1902
- self._lock = 1;
1903
- _addToTimeline(self, child, start - child._delay, 1)._lock = 0;
1904
- } else {
1905
- prevStart = start;
1906
- }
1907
- if (start < 0 && child._ts) {
1908
- max -= start;
1909
- if (!parent && !self._dp || parent && parent.smoothChildTiming) {
1910
- self._start += start / self._ts;
1911
- self._time -= start;
1912
- self._tTime -= start;
1913
- }
1914
- self.shiftChildren(-start, false, -Infinity);
1915
- prevStart = 0;
1916
- }
1917
- child._end > max && child._ts && (max = child._end);
1918
- child = prev;
1919
- }
1920
- _setDuration(self, self === _globalTimeline && self._time > max ? self._time : max, 1, 1);
1921
- self._dirty = 0;
1922
- }
1923
- return self._tDur;
1924
- };
1925
- Timeline2.updateRoot = function updateRoot(time) {
1926
- if (_globalTimeline._ts) {
1927
- _lazySafeRender(_globalTimeline, _parentToChildTotalTime(time, _globalTimeline));
1928
- _lastRenderedFrame = _ticker.frame;
1929
- }
1930
- if (_ticker.frame >= _nextGCFrame) {
1931
- _nextGCFrame += _config.autoSleep || 120;
1932
- var child = _globalTimeline._first;
1933
- if (!child || !child._ts) {
1934
- if (_config.autoSleep && _ticker._listeners.length < 2) {
1935
- while (child && !child._ts) {
1936
- child = child._next;
1937
- }
1938
- child || _ticker.sleep();
1939
- }
1940
- }
1941
- }
1942
- };
1943
- return Timeline2;
1944
- }(Animation);
1945
- _setDefaults(Timeline.prototype, {
1946
- _lock: 0,
1947
- _hasPause: 0,
1948
- _forcing: 0
1949
- });
1950
- var _addComplexStringPropTween = function _addComplexStringPropTween2(target, prop, start, end, setter, stringFilter, funcParam) {
1951
- var pt = new PropTween(this._pt, target, prop, 0, 1, _renderComplexString, null, setter), index = 0, matchIndex = 0, result, startNums, color, endNum, chunk, startNum, hasRandom, a;
1952
- pt.b = start;
1953
- pt.e = end;
1954
- start += "";
1955
- end += "";
1956
- if (hasRandom = ~end.indexOf("random(")) {
1957
- end = _replaceRandom(end);
1958
- }
1959
- if (stringFilter) {
1960
- a = [start, end];
1961
- stringFilter(a, target, prop);
1962
- start = a[0];
1963
- end = a[1];
1964
- }
1965
- startNums = start.match(_complexStringNumExp) || [];
1966
- while (result = _complexStringNumExp.exec(end)) {
1967
- endNum = result[0];
1968
- chunk = end.substring(index, result.index);
1969
- if (color) {
1970
- color = (color + 1) % 5;
1971
- } else if (chunk.substr(-5) === "rgba(") {
1972
- color = 1;
1973
- }
1974
- if (endNum !== startNums[matchIndex++]) {
1975
- startNum = parseFloat(startNums[matchIndex - 1]) || 0;
1976
- pt._pt = {
1977
- _next: pt._pt,
1978
- p: chunk || matchIndex === 1 ? chunk : ",",
1979
- //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.
1980
- s: startNum,
1981
- c: endNum.charAt(1) === "=" ? _parseRelative(startNum, endNum) - startNum : parseFloat(endNum) - startNum,
1982
- m: color && color < 4 ? Math.round : 0
1983
- };
1984
- index = _complexStringNumExp.lastIndex;
1985
- }
1986
- }
1987
- pt.c = index < end.length ? end.substring(index, end.length) : "";
1988
- pt.fp = funcParam;
1989
- if (_relExp.test(end) || hasRandom) {
1990
- pt.e = 0;
1991
- }
1992
- this._pt = pt;
1993
- return pt;
1994
- };
1995
- var _addPropTween = function _addPropTween2(target, prop, start, end, index, targets, modifier, stringFilter, funcParam, optional) {
1996
- _isFunction(end) && (end = end(index || 0, target, targets));
1997
- var currentValue = target[prop], parsedStart = start !== "get" ? start : !_isFunction(currentValue) ? currentValue : funcParam ? target[prop.indexOf("set") || !_isFunction(target["get" + prop.substr(3)]) ? prop : "get" + prop.substr(3)](funcParam) : target[prop](), setter = !_isFunction(currentValue) ? _setterPlain : funcParam ? _setterFuncWithParam : _setterFunc, pt;
1998
- if (_isString(end)) {
1999
- if (~end.indexOf("random(")) {
2000
- end = _replaceRandom(end);
2001
- }
2002
- if (end.charAt(1) === "=") {
2003
- pt = _parseRelative(parsedStart, end) + (getUnit(parsedStart) || 0);
2004
- if (pt || pt === 0) {
2005
- end = pt;
2006
- }
2007
- }
2008
- }
2009
- if (!optional || parsedStart !== end || _forceAllPropTweens) {
2010
- if (!isNaN(parsedStart * end) && end !== "") {
2011
- pt = new PropTween(this._pt, target, prop, +parsedStart || 0, end - (parsedStart || 0), typeof currentValue === "boolean" ? _renderBoolean : _renderPlain, 0, setter);
2012
- funcParam && (pt.fp = funcParam);
2013
- modifier && pt.modifier(modifier, this, target);
2014
- return this._pt = pt;
2015
- }
2016
- !currentValue && !(prop in target) && _missingPlugin(prop, end);
2017
- return _addComplexStringPropTween.call(this, target, prop, parsedStart, end, setter, stringFilter || _config.stringFilter, funcParam);
2018
- }
2019
- };
2020
- var _processVars = function _processVars2(vars, index, target, targets, tween) {
2021
- _isFunction(vars) && (vars = _parseFuncOrString(vars, tween, index, target, targets));
2022
- if (!_isObject(vars) || vars.style && vars.nodeType || _isArray(vars) || _isTypedArray(vars)) {
2023
- return _isString(vars) ? _parseFuncOrString(vars, tween, index, target, targets) : vars;
2024
- }
2025
- var copy = {}, p;
2026
- for (p in vars) {
2027
- copy[p] = _parseFuncOrString(vars[p], tween, index, target, targets);
2028
- }
2029
- return copy;
2030
- };
2031
- var _checkPlugin = function _checkPlugin2(property, vars, tween, index, target, targets) {
2032
- var plugin, pt, ptLookup, i;
2033
- if (_plugins[property] && (plugin = new _plugins[property]()).init(target, plugin.rawVars ? vars[property] : _processVars(vars[property], index, target, targets, tween), tween, index, targets) !== false) {
2034
- tween._pt = pt = new PropTween(tween._pt, target, property, 0, 1, plugin.render, plugin, 0, plugin.priority);
2035
- if (tween !== _quickTween) {
2036
- ptLookup = tween._ptLookup[tween._targets.indexOf(target)];
2037
- i = plugin._props.length;
2038
- while (i--) {
2039
- ptLookup[plugin._props[i]] = pt;
2040
- }
2041
- }
2042
- }
2043
- return plugin;
2044
- };
2045
- var _overwritingTween;
2046
- var _forceAllPropTweens;
2047
- var _initTween = function _initTween2(tween, time, tTime) {
2048
- var vars = tween.vars, ease = vars.ease, startAt = vars.startAt, immediateRender = vars.immediateRender, lazy = vars.lazy, onUpdate = vars.onUpdate, runBackwards = vars.runBackwards, yoyoEase = vars.yoyoEase, keyframes = vars.keyframes, autoRevert = vars.autoRevert, dur = tween._dur, prevStartAt = tween._startAt, targets = tween._targets, parent = tween.parent, fullTargets = parent && parent.data === "nested" ? parent.vars.targets : targets, autoOverwrite = tween._overwrite === "auto" && !_suppressOverwrites, tl = tween.timeline, cleanVars, i, p, pt, target, hasPriority, gsData, harness, plugin, ptLookup, index, harnessVars, overwritten;
2049
- tl && (!keyframes || !ease) && (ease = "none");
2050
- tween._ease = _parseEase(ease, _defaults.ease);
2051
- tween._yEase = yoyoEase ? _invertEase(_parseEase(yoyoEase === true ? ease : yoyoEase, _defaults.ease)) : 0;
2052
- if (yoyoEase && tween._yoyo && !tween._repeat) {
2053
- yoyoEase = tween._yEase;
2054
- tween._yEase = tween._ease;
2055
- tween._ease = yoyoEase;
2056
- }
2057
- tween._from = !tl && !!vars.runBackwards;
2058
- if (!tl || keyframes && !vars.stagger) {
2059
- harness = targets[0] ? _getCache(targets[0]).harness : 0;
2060
- harnessVars = harness && vars[harness.prop];
2061
- cleanVars = _copyExcluding(vars, _reservedProps);
2062
- if (prevStartAt) {
2063
- prevStartAt._zTime < 0 && prevStartAt.progress(1);
2064
- time < 0 && runBackwards && immediateRender && !autoRevert ? prevStartAt.render(-1, true) : prevStartAt.revert(runBackwards && dur ? _revertConfigNoKill : _startAtRevertConfig);
2065
- prevStartAt._lazy = 0;
2066
- }
2067
- if (startAt) {
2068
- _removeFromParent(tween._startAt = Tween.set(targets, _setDefaults({
2069
- data: "isStart",
2070
- overwrite: false,
2071
- parent,
2072
- immediateRender: true,
2073
- lazy: !prevStartAt && _isNotFalse(lazy),
2074
- startAt: null,
2075
- delay: 0,
2076
- onUpdate: onUpdate && function() {
2077
- return _callback(tween, "onUpdate");
2078
- },
2079
- stagger: 0
2080
- }, startAt)));
2081
- tween._startAt._dp = 0;
2082
- tween._startAt._sat = tween;
2083
- time < 0 && (_reverting || !immediateRender && !autoRevert) && tween._startAt.revert(_revertConfigNoKill);
2084
- if (immediateRender) {
2085
- if (dur && time <= 0 && tTime <= 0) {
2086
- time && (tween._zTime = time);
2087
- return;
2088
- }
2089
- }
2090
- } else if (runBackwards && dur) {
2091
- if (!prevStartAt) {
2092
- time && (immediateRender = false);
2093
- p = _setDefaults({
2094
- overwrite: false,
2095
- data: "isFromStart",
2096
- //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.
2097
- lazy: immediateRender && !prevStartAt && _isNotFalse(lazy),
2098
- immediateRender,
2099
- //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)
2100
- stagger: 0,
2101
- parent
2102
- //ensures that nested tweens that had a stagger are handled properly, like gsap.from(".class", {y: gsap.utils.wrap([-100,100]), stagger: 0.5})
2103
- }, cleanVars);
2104
- harnessVars && (p[harness.prop] = harnessVars);
2105
- _removeFromParent(tween._startAt = Tween.set(targets, p));
2106
- tween._startAt._dp = 0;
2107
- tween._startAt._sat = tween;
2108
- time < 0 && (_reverting ? tween._startAt.revert(_revertConfigNoKill) : tween._startAt.render(-1, true));
2109
- tween._zTime = time;
2110
- if (!immediateRender) {
2111
- _initTween2(tween._startAt, _tinyNum, _tinyNum);
2112
- } else if (!time) {
2113
- return;
2114
- }
2115
- }
2116
- }
2117
- tween._pt = tween._ptCache = 0;
2118
- lazy = dur && _isNotFalse(lazy) || lazy && !dur;
2119
- for (i = 0; i < targets.length; i++) {
2120
- target = targets[i];
2121
- gsData = target._gsap || _harness(targets)[i]._gsap;
2122
- tween._ptLookup[i] = ptLookup = {};
2123
- _lazyLookup[gsData.id] && _lazyTweens.length && _lazyRender();
2124
- index = fullTargets === targets ? i : fullTargets.indexOf(target);
2125
- if (harness && (plugin = new harness()).init(target, harnessVars || cleanVars, tween, index, fullTargets) !== false) {
2126
- tween._pt = pt = new PropTween(tween._pt, target, plugin.name, 0, 1, plugin.render, plugin, 0, plugin.priority);
2127
- plugin._props.forEach(function(name) {
2128
- ptLookup[name] = pt;
2129
- });
2130
- plugin.priority && (hasPriority = 1);
2131
- }
2132
- if (!harness || harnessVars) {
2133
- for (p in cleanVars) {
2134
- if (_plugins[p] && (plugin = _checkPlugin(p, cleanVars, tween, index, target, fullTargets))) {
2135
- plugin.priority && (hasPriority = 1);
2136
- } else {
2137
- ptLookup[p] = pt = _addPropTween.call(tween, target, p, "get", cleanVars[p], index, fullTargets, 0, vars.stringFilter);
2138
- }
2139
- }
2140
- }
2141
- tween._op && tween._op[i] && tween.kill(target, tween._op[i]);
2142
- if (autoOverwrite && tween._pt) {
2143
- _overwritingTween = tween;
2144
- _globalTimeline.killTweensOf(target, ptLookup, tween.globalTime(time));
2145
- overwritten = !tween.parent;
2146
- _overwritingTween = 0;
2147
- }
2148
- tween._pt && lazy && (_lazyLookup[gsData.id] = 1);
2149
- }
2150
- hasPriority && _sortPropTweensByPriority(tween);
2151
- tween._onInit && tween._onInit(tween);
2152
- }
2153
- tween._onUpdate = onUpdate;
2154
- tween._initted = (!tween._op || tween._pt) && !overwritten;
2155
- keyframes && time <= 0 && tl.render(_bigNum, true, true);
2156
- };
2157
- var _updatePropTweens = function _updatePropTweens2(tween, property, value, start, startIsRelative, ratio, time, skipRecursion) {
2158
- var ptCache = (tween._pt && tween._ptCache || (tween._ptCache = {}))[property], pt, rootPT, lookup, i;
2159
- if (!ptCache) {
2160
- ptCache = tween._ptCache[property] = [];
2161
- lookup = tween._ptLookup;
2162
- i = tween._targets.length;
2163
- while (i--) {
2164
- pt = lookup[i][property];
2165
- if (pt && pt.d && pt.d._pt) {
2166
- pt = pt.d._pt;
2167
- while (pt && pt.p !== property && pt.fp !== property) {
2168
- pt = pt._next;
2169
- }
2170
- }
2171
- if (!pt) {
2172
- _forceAllPropTweens = 1;
2173
- tween.vars[property] = "+=0";
2174
- _initTween(tween, time);
2175
- _forceAllPropTweens = 0;
2176
- return skipRecursion ? _warn(property + " not eligible for reset") : 1;
2177
- }
2178
- ptCache.push(pt);
2179
- }
2180
- }
2181
- i = ptCache.length;
2182
- while (i--) {
2183
- rootPT = ptCache[i];
2184
- pt = rootPT._pt || rootPT;
2185
- pt.s = (start || start === 0) && !startIsRelative ? start : pt.s + (start || 0) + ratio * pt.c;
2186
- pt.c = value - pt.s;
2187
- rootPT.e && (rootPT.e = _round(value) + getUnit(rootPT.e));
2188
- rootPT.b && (rootPT.b = pt.s + getUnit(rootPT.b));
2189
- }
2190
- };
2191
- var _addAliasesToVars = function _addAliasesToVars2(targets, vars) {
2192
- var harness = targets[0] ? _getCache(targets[0]).harness : 0, propertyAliases = harness && harness.aliases, copy, p, i, aliases;
2193
- if (!propertyAliases) {
2194
- return vars;
2195
- }
2196
- copy = _merge({}, vars);
2197
- for (p in propertyAliases) {
2198
- if (p in copy) {
2199
- aliases = propertyAliases[p].split(",");
2200
- i = aliases.length;
2201
- while (i--) {
2202
- copy[aliases[i]] = copy[p];
2203
- }
2204
- }
2205
- }
2206
- return copy;
2207
- };
2208
- var _parseKeyframe = function _parseKeyframe2(prop, obj, allProps, easeEach) {
2209
- var ease = obj.ease || easeEach || "power1.inOut", p, a;
2210
- if (_isArray(obj)) {
2211
- a = allProps[prop] || (allProps[prop] = []);
2212
- obj.forEach(function(value, i) {
2213
- return a.push({
2214
- t: i / (obj.length - 1) * 100,
2215
- v: value,
2216
- e: ease
2217
- });
2218
- });
2219
- } else {
2220
- for (p in obj) {
2221
- a = allProps[p] || (allProps[p] = []);
2222
- p === "ease" || a.push({
2223
- t: parseFloat(prop),
2224
- v: obj[p],
2225
- e: ease
2226
- });
2227
- }
2228
- }
2229
- };
2230
- var _parseFuncOrString = function _parseFuncOrString2(value, tween, i, target, targets) {
2231
- return _isFunction(value) ? value.call(tween, i, target, targets) : _isString(value) && ~value.indexOf("random(") ? _replaceRandom(value) : value;
2232
- };
2233
- var _staggerTweenProps = _callbackNames + "repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert";
2234
- var _staggerPropsToSkip = {};
2235
- _forEachName(_staggerTweenProps + ",id,stagger,delay,duration,paused,scrollTrigger", function(name) {
2236
- return _staggerPropsToSkip[name] = 1;
2237
- });
2238
- var Tween = /* @__PURE__ */ function(_Animation2) {
2239
- _inheritsLoose(Tween2, _Animation2);
2240
- function Tween2(targets, vars, position, skipInherit) {
2241
- var _this3;
2242
- if (typeof vars === "number") {
2243
- position.duration = vars;
2244
- vars = position;
2245
- position = null;
2246
- }
2247
- _this3 = _Animation2.call(this, skipInherit ? vars : _inheritDefaults(vars)) || this;
2248
- var _this3$vars = _this3.vars, duration = _this3$vars.duration, delay = _this3$vars.delay, immediateRender = _this3$vars.immediateRender, stagger = _this3$vars.stagger, overwrite = _this3$vars.overwrite, keyframes = _this3$vars.keyframes, defaults2 = _this3$vars.defaults, scrollTrigger = _this3$vars.scrollTrigger, yoyoEase = _this3$vars.yoyoEase, parent = vars.parent || _globalTimeline, parsedTargets = (_isArray(targets) || _isTypedArray(targets) ? _isNumber(targets[0]) : "length" in vars) ? [targets] : toArray(targets), tl, i, copy, l, p, curTarget, staggerFunc, staggerVarsToMerge;
2249
- _this3._targets = parsedTargets.length ? _harness(parsedTargets) : _warn("GSAP target " + targets + " not found. https://gsap.com", !_config.nullTargetWarn) || [];
2250
- _this3._ptLookup = [];
2251
- _this3._overwrite = overwrite;
2252
- if (keyframes || stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {
2253
- vars = _this3.vars;
2254
- tl = _this3.timeline = new Timeline({
2255
- data: "nested",
2256
- defaults: defaults2 || {},
2257
- targets: parent && parent.data === "nested" ? parent.vars.targets : parsedTargets
2258
- });
2259
- tl.kill();
2260
- tl.parent = tl._dp = _assertThisInitialized(_this3);
2261
- tl._start = 0;
2262
- if (stagger || _isFuncOrString(duration) || _isFuncOrString(delay)) {
2263
- l = parsedTargets.length;
2264
- staggerFunc = stagger && distribute(stagger);
2265
- if (_isObject(stagger)) {
2266
- for (p in stagger) {
2267
- if (~_staggerTweenProps.indexOf(p)) {
2268
- staggerVarsToMerge || (staggerVarsToMerge = {});
2269
- staggerVarsToMerge[p] = stagger[p];
2270
- }
2271
- }
2272
- }
2273
- for (i = 0; i < l; i++) {
2274
- copy = _copyExcluding(vars, _staggerPropsToSkip);
2275
- copy.stagger = 0;
2276
- yoyoEase && (copy.yoyoEase = yoyoEase);
2277
- staggerVarsToMerge && _merge(copy, staggerVarsToMerge);
2278
- curTarget = parsedTargets[i];
2279
- copy.duration = +_parseFuncOrString(duration, _assertThisInitialized(_this3), i, curTarget, parsedTargets);
2280
- copy.delay = (+_parseFuncOrString(delay, _assertThisInitialized(_this3), i, curTarget, parsedTargets) || 0) - _this3._delay;
2281
- if (!stagger && l === 1 && copy.delay) {
2282
- _this3._delay = delay = copy.delay;
2283
- _this3._start += delay;
2284
- copy.delay = 0;
2285
- }
2286
- tl.to(curTarget, copy, staggerFunc ? staggerFunc(i, curTarget, parsedTargets) : 0);
2287
- tl._ease = _easeMap.none;
2288
- }
2289
- tl.duration() ? duration = delay = 0 : _this3.timeline = 0;
2290
- } else if (keyframes) {
2291
- _inheritDefaults(_setDefaults(tl.vars.defaults, {
2292
- ease: "none"
2293
- }));
2294
- tl._ease = _parseEase(keyframes.ease || vars.ease || "none");
2295
- var time = 0, a, kf, v;
2296
- if (_isArray(keyframes)) {
2297
- keyframes.forEach(function(frame) {
2298
- return tl.to(parsedTargets, frame, ">");
2299
- });
2300
- tl.duration();
2301
- } else {
2302
- copy = {};
2303
- for (p in keyframes) {
2304
- p === "ease" || p === "easeEach" || _parseKeyframe(p, keyframes[p], copy, keyframes.easeEach);
2305
- }
2306
- for (p in copy) {
2307
- a = copy[p].sort(function(a2, b) {
2308
- return a2.t - b.t;
2309
- });
2310
- time = 0;
2311
- for (i = 0; i < a.length; i++) {
2312
- kf = a[i];
2313
- v = {
2314
- ease: kf.e,
2315
- duration: (kf.t - (i ? a[i - 1].t : 0)) / 100 * duration
2316
- };
2317
- v[p] = kf.v;
2318
- tl.to(parsedTargets, v, time);
2319
- time += v.duration;
2320
- }
2321
- }
2322
- tl.duration() < duration && tl.to({}, {
2323
- duration: duration - tl.duration()
2324
- });
2325
- }
2326
- }
2327
- duration || _this3.duration(duration = tl.duration());
2328
- } else {
2329
- _this3.timeline = 0;
2330
- }
2331
- if (overwrite === true && !_suppressOverwrites) {
2332
- _overwritingTween = _assertThisInitialized(_this3);
2333
- _globalTimeline.killTweensOf(parsedTargets);
2334
- _overwritingTween = 0;
2335
- }
2336
- _addToTimeline(parent, _assertThisInitialized(_this3), position);
2337
- vars.reversed && _this3.reverse();
2338
- vars.paused && _this3.paused(true);
2339
- if (immediateRender || !duration && !keyframes && _this3._start === _roundPrecise(parent._time) && _isNotFalse(immediateRender) && _hasNoPausedAncestors(_assertThisInitialized(_this3)) && parent.data !== "nested") {
2340
- _this3._tTime = -_tinyNum;
2341
- _this3.render(Math.max(0, -delay) || 0);
2342
- }
2343
- scrollTrigger && _scrollTrigger(_assertThisInitialized(_this3), scrollTrigger);
2344
- return _this3;
2345
- }
2346
- var _proto3 = Tween2.prototype;
2347
- _proto3.render = function render3(totalTime, suppressEvents, force) {
2348
- var prevTime = this._time, tDur = this._tDur, dur = this._dur, isNegative = totalTime < 0, tTime = totalTime > tDur - _tinyNum && !isNegative ? tDur : totalTime < _tinyNum ? 0 : totalTime, time, pt, iteration, cycleDuration, prevIteration, isYoyo, ratio, timeline2, yoyoEase;
2349
- if (!dur) {
2350
- _renderZeroDurationTween(this, totalTime, suppressEvents, force);
2351
- } else if (tTime !== this._tTime || !totalTime || force || !this._initted && this._tTime || this._startAt && this._zTime < 0 !== isNegative || this._lazy) {
2352
- time = tTime;
2353
- timeline2 = this.timeline;
2354
- if (this._repeat) {
2355
- cycleDuration = dur + this._rDelay;
2356
- if (this._repeat < -1 && isNegative) {
2357
- return this.totalTime(cycleDuration * 100 + totalTime, suppressEvents, force);
2358
- }
2359
- time = _roundPrecise(tTime % cycleDuration);
2360
- if (tTime === tDur) {
2361
- iteration = this._repeat;
2362
- time = dur;
2363
- } else {
2364
- prevIteration = _roundPrecise(tTime / cycleDuration);
2365
- iteration = ~~prevIteration;
2366
- if (iteration && iteration === prevIteration) {
2367
- time = dur;
2368
- iteration--;
2369
- } else if (time > dur) {
2370
- time = dur;
2371
- }
2372
- }
2373
- isYoyo = this._yoyo && iteration & 1;
2374
- if (isYoyo) {
2375
- yoyoEase = this._yEase;
2376
- time = dur - time;
2377
- }
2378
- prevIteration = _animationCycle(this._tTime, cycleDuration);
2379
- if (time === prevTime && !force && this._initted && iteration === prevIteration) {
2380
- this._tTime = tTime;
2381
- return this;
2382
- }
2383
- if (iteration !== prevIteration) {
2384
- timeline2 && this._yEase && _propagateYoyoEase(timeline2, isYoyo);
2385
- if (this.vars.repeatRefresh && !isYoyo && !this._lock && time !== cycleDuration && this._initted) {
2386
- this._lock = force = 1;
2387
- this.render(_roundPrecise(cycleDuration * iteration), true).invalidate()._lock = 0;
2388
- }
2389
- }
2390
- }
2391
- if (!this._initted) {
2392
- if (_attemptInitTween(this, isNegative ? totalTime : time, force, suppressEvents, tTime)) {
2393
- this._tTime = 0;
2394
- return this;
2395
- }
2396
- if (prevTime !== this._time && !(force && this.vars.repeatRefresh && iteration !== prevIteration)) {
2397
- return this;
2398
- }
2399
- if (dur !== this._dur) {
2400
- return this.render(totalTime, suppressEvents, force);
2401
- }
2402
- }
2403
- this._tTime = tTime;
2404
- this._time = time;
2405
- if (!this._act && this._ts) {
2406
- this._act = 1;
2407
- this._lazy = 0;
2408
- }
2409
- this.ratio = ratio = (yoyoEase || this._ease)(time / dur);
2410
- if (this._from) {
2411
- this.ratio = ratio = 1 - ratio;
2412
- }
2413
- if (!prevTime && tTime && !suppressEvents && !prevIteration) {
2414
- _callback(this, "onStart");
2415
- if (this._tTime !== tTime) {
2416
- return this;
2417
- }
2418
- }
2419
- pt = this._pt;
2420
- while (pt) {
2421
- pt.r(ratio, pt.d);
2422
- pt = pt._next;
2423
- }
2424
- timeline2 && timeline2.render(totalTime < 0 ? totalTime : timeline2._dur * timeline2._ease(time / this._dur), suppressEvents, force) || this._startAt && (this._zTime = totalTime);
2425
- if (this._onUpdate && !suppressEvents) {
2426
- isNegative && _rewindStartAt(this, totalTime, suppressEvents, force);
2427
- _callback(this, "onUpdate");
2428
- }
2429
- this._repeat && iteration !== prevIteration && this.vars.onRepeat && !suppressEvents && this.parent && _callback(this, "onRepeat");
2430
- if ((tTime === this._tDur || !tTime) && this._tTime === tTime) {
2431
- isNegative && !this._onUpdate && _rewindStartAt(this, totalTime, true, true);
2432
- (totalTime || !dur) && (tTime === this._tDur && this._ts > 0 || !tTime && this._ts < 0) && _removeFromParent(this, 1);
2433
- if (!suppressEvents && !(isNegative && !prevTime) && (tTime || prevTime || isYoyo)) {
2434
- _callback(this, tTime === tDur ? "onComplete" : "onReverseComplete", true);
2435
- this._prom && !(tTime < tDur && this.timeScale() > 0) && this._prom();
2436
- }
2437
- }
2438
- }
2439
- return this;
2440
- };
2441
- _proto3.targets = function targets() {
2442
- return this._targets;
2443
- };
2444
- _proto3.invalidate = function invalidate(soft) {
2445
- (!soft || !this.vars.runBackwards) && (this._startAt = 0);
2446
- this._pt = this._op = this._onUpdate = this._lazy = this.ratio = 0;
2447
- this._ptLookup = [];
2448
- this.timeline && this.timeline.invalidate(soft);
2449
- return _Animation2.prototype.invalidate.call(this, soft);
2450
- };
2451
- _proto3.resetTo = function resetTo(property, value, start, startIsRelative, skipRecursion) {
2452
- _tickerActive || _ticker.wake();
2453
- this._ts || this.play();
2454
- var time = Math.min(this._dur, (this._dp._time - this._start) * this._ts), ratio;
2455
- this._initted || _initTween(this, time);
2456
- ratio = this._ease(time / this._dur);
2457
- if (_updatePropTweens(this, property, value, start, startIsRelative, ratio, time, skipRecursion)) {
2458
- return this.resetTo(property, value, start, startIsRelative, 1);
2459
- }
2460
- _alignPlayhead(this, 0);
2461
- this.parent || _addLinkedListItem(this._dp, this, "_first", "_last", this._dp._sort ? "_start" : 0);
2462
- return this.render(0);
2463
- };
2464
- _proto3.kill = function kill(targets, vars) {
2465
- if (vars === void 0) {
2466
- vars = "all";
2467
- }
2468
- if (!targets && (!vars || vars === "all")) {
2469
- this._lazy = this._pt = 0;
2470
- this.parent ? _interrupt(this) : this.scrollTrigger && this.scrollTrigger.kill(!!_reverting);
2471
- return this;
2472
- }
2473
- if (this.timeline) {
2474
- var tDur = this.timeline.totalDuration();
2475
- this.timeline.killTweensOf(targets, vars, _overwritingTween && _overwritingTween.vars.overwrite !== true)._first || _interrupt(this);
2476
- this.parent && tDur !== this.timeline.totalDuration() && _setDuration(this, this._dur * this.timeline._tDur / tDur, 0, 1);
2477
- return this;
2478
- }
2479
- var parsedTargets = this._targets, killingTargets = targets ? toArray(targets) : parsedTargets, propTweenLookup = this._ptLookup, firstPT = this._pt, overwrittenProps, curLookup, curOverwriteProps, props, p, pt, i;
2480
- if ((!vars || vars === "all") && _arraysMatch(parsedTargets, killingTargets)) {
2481
- vars === "all" && (this._pt = 0);
2482
- return _interrupt(this);
2483
- }
2484
- overwrittenProps = this._op = this._op || [];
2485
- if (vars !== "all") {
2486
- if (_isString(vars)) {
2487
- p = {};
2488
- _forEachName(vars, function(name) {
2489
- return p[name] = 1;
2490
- });
2491
- vars = p;
2492
- }
2493
- vars = _addAliasesToVars(parsedTargets, vars);
2494
- }
2495
- i = parsedTargets.length;
2496
- while (i--) {
2497
- if (~killingTargets.indexOf(parsedTargets[i])) {
2498
- curLookup = propTweenLookup[i];
2499
- if (vars === "all") {
2500
- overwrittenProps[i] = vars;
2501
- props = curLookup;
2502
- curOverwriteProps = {};
2503
- } else {
2504
- curOverwriteProps = overwrittenProps[i] = overwrittenProps[i] || {};
2505
- props = vars;
2506
- }
2507
- for (p in props) {
2508
- pt = curLookup && curLookup[p];
2509
- if (pt) {
2510
- if (!("kill" in pt.d) || pt.d.kill(p) === true) {
2511
- _removeLinkedListItem(this, pt, "_pt");
2512
- }
2513
- delete curLookup[p];
2514
- }
2515
- if (curOverwriteProps !== "all") {
2516
- curOverwriteProps[p] = 1;
2517
- }
2518
- }
2519
- }
2520
- }
2521
- this._initted && !this._pt && firstPT && _interrupt(this);
2522
- return this;
2523
- };
2524
- Tween2.to = function to(targets, vars) {
2525
- return new Tween2(targets, vars, arguments[2]);
2526
- };
2527
- Tween2.from = function from(targets, vars) {
2528
- return _createTweenType(1, arguments);
2529
- };
2530
- Tween2.delayedCall = function delayedCall(delay, callback, params, scope) {
2531
- return new Tween2(callback, 0, {
2532
- immediateRender: false,
2533
- lazy: false,
2534
- overwrite: false,
2535
- delay,
2536
- onComplete: callback,
2537
- onReverseComplete: callback,
2538
- onCompleteParams: params,
2539
- onReverseCompleteParams: params,
2540
- callbackScope: scope
2541
- });
2542
- };
2543
- Tween2.fromTo = function fromTo(targets, fromVars, toVars) {
2544
- return _createTweenType(2, arguments);
2545
- };
2546
- Tween2.set = function set(targets, vars) {
2547
- vars.duration = 0;
2548
- vars.repeatDelay || (vars.repeat = 0);
2549
- return new Tween2(targets, vars);
2550
- };
2551
- Tween2.killTweensOf = function killTweensOf(targets, props, onlyActive) {
2552
- return _globalTimeline.killTweensOf(targets, props, onlyActive);
2553
- };
2554
- return Tween2;
2555
- }(Animation);
2556
- _setDefaults(Tween.prototype, {
2557
- _targets: [],
2558
- _lazy: 0,
2559
- _startAt: 0,
2560
- _op: 0,
2561
- _onInit: 0
2562
- });
2563
- _forEachName("staggerTo,staggerFrom,staggerFromTo", function(name) {
2564
- Tween[name] = function() {
2565
- var tl = new Timeline(), params = _slice.call(arguments, 0);
2566
- params.splice(name === "staggerFromTo" ? 5 : 4, 0, 0);
2567
- return tl[name].apply(tl, params);
2568
- };
2569
- });
2570
- var _setterPlain = function _setterPlain2(target, property, value) {
2571
- return target[property] = value;
2572
- };
2573
- var _setterFunc = function _setterFunc2(target, property, value) {
2574
- return target[property](value);
2575
- };
2576
- var _setterFuncWithParam = function _setterFuncWithParam2(target, property, value, data) {
2577
- return target[property](data.fp, value);
2578
- };
2579
- var _setterAttribute = function _setterAttribute2(target, property, value) {
2580
- return target.setAttribute(property, value);
2581
- };
2582
- var _getSetter = function _getSetter2(target, property) {
2583
- return _isFunction(target[property]) ? _setterFunc : _isUndefined(target[property]) && target.setAttribute ? _setterAttribute : _setterPlain;
2584
- };
2585
- var _renderPlain = function _renderPlain2(ratio, data) {
2586
- return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 1e6) / 1e6, data);
2587
- };
2588
- var _renderBoolean = function _renderBoolean2(ratio, data) {
2589
- return data.set(data.t, data.p, !!(data.s + data.c * ratio), data);
2590
- };
2591
- var _renderComplexString = function _renderComplexString2(ratio, data) {
2592
- var pt = data._pt, s = "";
2593
- if (!ratio && data.b) {
2594
- s = data.b;
2595
- } else if (ratio === 1 && data.e) {
2596
- s = data.e;
2597
- } else {
2598
- while (pt) {
2599
- s = pt.p + (pt.m ? pt.m(pt.s + pt.c * ratio) : Math.round((pt.s + pt.c * ratio) * 1e4) / 1e4) + s;
2600
- pt = pt._next;
2601
- }
2602
- s += data.c;
2603
- }
2604
- data.set(data.t, data.p, s, data);
2605
- };
2606
- var _renderPropTweens = function _renderPropTweens2(ratio, data) {
2607
- var pt = data._pt;
2608
- while (pt) {
2609
- pt.r(ratio, pt.d);
2610
- pt = pt._next;
2611
- }
2612
- };
2613
- var _addPluginModifier = function _addPluginModifier2(modifier, tween, target, property) {
2614
- var pt = this._pt, next;
2615
- while (pt) {
2616
- next = pt._next;
2617
- pt.p === property && pt.modifier(modifier, tween, target);
2618
- pt = next;
2619
- }
2620
- };
2621
- var _killPropTweensOf = function _killPropTweensOf2(property) {
2622
- var pt = this._pt, hasNonDependentRemaining, next;
2623
- while (pt) {
2624
- next = pt._next;
2625
- if (pt.p === property && !pt.op || pt.op === property) {
2626
- _removeLinkedListItem(this, pt, "_pt");
2627
- } else if (!pt.dep) {
2628
- hasNonDependentRemaining = 1;
2629
- }
2630
- pt = next;
2631
- }
2632
- return !hasNonDependentRemaining;
2633
- };
2634
- var _setterWithModifier = function _setterWithModifier2(target, property, value, data) {
2635
- data.mSet(target, property, data.m.call(data.tween, value, data.mt), data);
2636
- };
2637
- var _sortPropTweensByPriority = function _sortPropTweensByPriority2(parent) {
2638
- var pt = parent._pt, next, pt2, first, last;
2639
- while (pt) {
2640
- next = pt._next;
2641
- pt2 = first;
2642
- while (pt2 && pt2.pr > pt.pr) {
2643
- pt2 = pt2._next;
2644
- }
2645
- if (pt._prev = pt2 ? pt2._prev : last) {
2646
- pt._prev._next = pt;
2647
- } else {
2648
- first = pt;
2649
- }
2650
- if (pt._next = pt2) {
2651
- pt2._prev = pt;
2652
- } else {
2653
- last = pt;
2654
- }
2655
- pt = next;
2656
- }
2657
- parent._pt = first;
2658
- };
2659
- var PropTween = /* @__PURE__ */ function() {
2660
- function PropTween2(next, target, prop, start, change, renderer, data, setter, priority) {
2661
- this.t = target;
2662
- this.s = start;
2663
- this.c = change;
2664
- this.p = prop;
2665
- this.r = renderer || _renderPlain;
2666
- this.d = data || this;
2667
- this.set = setter || _setterPlain;
2668
- this.pr = priority || 0;
2669
- this._next = next;
2670
- if (next) {
2671
- next._prev = this;
2672
- }
2673
- }
2674
- var _proto4 = PropTween2.prototype;
2675
- _proto4.modifier = function modifier(func, tween, target) {
2676
- this.mSet = this.mSet || this.set;
2677
- this.set = _setterWithModifier;
2678
- this.m = func;
2679
- this.mt = target;
2680
- this.tween = tween;
2681
- };
2682
- return PropTween2;
2683
- }();
2684
- _forEachName(_callbackNames + "parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger", function(name) {
2685
- return _reservedProps[name] = 1;
2686
- });
2687
- _globals.TweenMax = _globals.TweenLite = Tween;
2688
- _globals.TimelineLite = _globals.TimelineMax = Timeline;
2689
- _globalTimeline = new Timeline({
2690
- sortChildren: false,
2691
- defaults: _defaults,
2692
- autoRemoveChildren: true,
2693
- id: "root",
2694
- smoothChildTiming: true
2695
- });
2696
- _config.stringFilter = _colorStringFilter;
2697
- var _media = [];
2698
- var _listeners = {};
2699
- var _emptyArray = [];
2700
- var _lastMediaTime = 0;
2701
- var _contextID = 0;
2702
- var _dispatch = function _dispatch2(type) {
2703
- return (_listeners[type] || _emptyArray).map(function(f) {
2704
- return f();
2705
- });
2706
- };
2707
- var _onMediaChange = function _onMediaChange2() {
2708
- var time = Date.now(), matches = [];
2709
- if (time - _lastMediaTime > 2) {
2710
- _dispatch("matchMediaInit");
2711
- _media.forEach(function(c) {
2712
- var queries = c.queries, conditions = c.conditions, match, p, anyMatch, toggled;
2713
- for (p in queries) {
2714
- match = _win.matchMedia(queries[p]).matches;
2715
- match && (anyMatch = 1);
2716
- if (match !== conditions[p]) {
2717
- conditions[p] = match;
2718
- toggled = 1;
2719
- }
2720
- }
2721
- if (toggled) {
2722
- c.revert();
2723
- anyMatch && matches.push(c);
2724
- }
2725
- });
2726
- _dispatch("matchMediaRevert");
2727
- matches.forEach(function(c) {
2728
- return c.onMatch(c, function(func) {
2729
- return c.add(null, func);
2730
- });
2731
- });
2732
- _lastMediaTime = time;
2733
- _dispatch("matchMedia");
2734
- }
2735
- };
2736
- var Context = /* @__PURE__ */ function() {
2737
- function Context2(func, scope) {
2738
- this.selector = scope && selector(scope);
2739
- this.data = [];
2740
- this._r = [];
2741
- this.isReverted = false;
2742
- this.id = _contextID++;
2743
- func && this.add(func);
2744
- }
2745
- var _proto5 = Context2.prototype;
2746
- _proto5.add = function add(name, func, scope) {
2747
- if (_isFunction(name)) {
2748
- scope = func;
2749
- func = name;
2750
- name = _isFunction;
2751
- }
2752
- var self = this, f = function f2() {
2753
- var prev = _context, prevSelector = self.selector, result;
2754
- prev && prev !== self && prev.data.push(self);
2755
- scope && (self.selector = selector(scope));
2756
- _context = self;
2757
- result = func.apply(self, arguments);
2758
- _isFunction(result) && self._r.push(result);
2759
- _context = prev;
2760
- self.selector = prevSelector;
2761
- self.isReverted = false;
2762
- return result;
2763
- };
2764
- self.last = f;
2765
- return name === _isFunction ? f(self, function(func2) {
2766
- return self.add(null, func2);
2767
- }) : name ? self[name] = f : f;
2768
- };
2769
- _proto5.ignore = function ignore(func) {
2770
- var prev = _context;
2771
- _context = null;
2772
- func(this);
2773
- _context = prev;
2774
- };
2775
- _proto5.getTweens = function getTweens() {
2776
- var a = [];
2777
- this.data.forEach(function(e) {
2778
- return e instanceof Context2 ? a.push.apply(a, e.getTweens()) : e instanceof Tween && !(e.parent && e.parent.data === "nested") && a.push(e);
2779
- });
2780
- return a;
2781
- };
2782
- _proto5.clear = function clear() {
2783
- this._r.length = this.data.length = 0;
2784
- };
2785
- _proto5.kill = function kill(revert, matchMedia2) {
2786
- var _this4 = this;
2787
- if (revert) {
2788
- (function() {
2789
- var tweens = _this4.getTweens(), i2 = _this4.data.length, t;
2790
- while (i2--) {
2791
- t = _this4.data[i2];
2792
- if (t.data === "isFlip") {
2793
- t.revert();
2794
- t.getChildren(true, true, false).forEach(function(tween) {
2795
- return tweens.splice(tweens.indexOf(tween), 1);
2796
- });
2797
- }
2798
- }
2799
- tweens.map(function(t2) {
2800
- return {
2801
- g: t2._dur || t2._delay || t2._sat && !t2._sat.vars.immediateRender ? t2.globalTime(0) : -Infinity,
2802
- t: t2
2803
- };
2804
- }).sort(function(a, b) {
2805
- return b.g - a.g || -Infinity;
2806
- }).forEach(function(o) {
2807
- return o.t.revert(revert);
2808
- });
2809
- i2 = _this4.data.length;
2810
- while (i2--) {
2811
- t = _this4.data[i2];
2812
- if (t instanceof Timeline) {
2813
- if (t.data !== "nested") {
2814
- t.scrollTrigger && t.scrollTrigger.revert();
2815
- t.kill();
2816
- }
2817
- } else {
2818
- !(t instanceof Tween) && t.revert && t.revert(revert);
2819
- }
2820
- }
2821
- _this4._r.forEach(function(f) {
2822
- return f(revert, _this4);
2823
- });
2824
- _this4.isReverted = true;
2825
- })();
2826
- } else {
2827
- this.data.forEach(function(e) {
2828
- return e.kill && e.kill();
2829
- });
2830
- }
2831
- this.clear();
2832
- if (matchMedia2) {
2833
- var i = _media.length;
2834
- while (i--) {
2835
- _media[i].id === this.id && _media.splice(i, 1);
2836
- }
2837
- }
2838
- };
2839
- _proto5.revert = function revert(config3) {
2840
- this.kill(config3 || {});
2841
- };
2842
- return Context2;
2843
- }();
2844
- var MatchMedia = /* @__PURE__ */ function() {
2845
- function MatchMedia2(scope) {
2846
- this.contexts = [];
2847
- this.scope = scope;
2848
- _context && _context.data.push(this);
2849
- }
2850
- var _proto6 = MatchMedia2.prototype;
2851
- _proto6.add = function add(conditions, func, scope) {
2852
- _isObject(conditions) || (conditions = {
2853
- matches: conditions
2854
- });
2855
- var context3 = new Context(0, scope || this.scope), cond = context3.conditions = {}, mq, p, active;
2856
- _context && !context3.selector && (context3.selector = _context.selector);
2857
- this.contexts.push(context3);
2858
- func = context3.add("onMatch", func);
2859
- context3.queries = conditions;
2860
- for (p in conditions) {
2861
- if (p === "all") {
2862
- active = 1;
2863
- } else {
2864
- mq = _win.matchMedia(conditions[p]);
2865
- if (mq) {
2866
- _media.indexOf(context3) < 0 && _media.push(context3);
2867
- (cond[p] = mq.matches) && (active = 1);
2868
- mq.addListener ? mq.addListener(_onMediaChange) : mq.addEventListener("change", _onMediaChange);
2869
- }
2870
- }
2871
- }
2872
- active && func(context3, function(f) {
2873
- return context3.add(null, f);
2874
- });
2875
- return this;
2876
- };
2877
- _proto6.revert = function revert(config3) {
2878
- this.kill(config3 || {});
2879
- };
2880
- _proto6.kill = function kill(revert) {
2881
- this.contexts.forEach(function(c) {
2882
- return c.kill(revert, true);
2883
- });
2884
- };
2885
- return MatchMedia2;
2886
- }();
2887
- var _gsap = {
2888
- registerPlugin: function registerPlugin() {
2889
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
2890
- args[_key2] = arguments[_key2];
2891
- }
2892
- args.forEach(function(config3) {
2893
- return _createPlugin(config3);
2894
- });
2895
- },
2896
- timeline: function timeline(vars) {
2897
- return new Timeline(vars);
2898
- },
2899
- getTweensOf: function getTweensOf(targets, onlyActive) {
2900
- return _globalTimeline.getTweensOf(targets, onlyActive);
2901
- },
2902
- getProperty: function getProperty(target, property, unit, uncache) {
2903
- _isString(target) && (target = toArray(target)[0]);
2904
- var getter = _getCache(target || {}).get, format = unit ? _passThrough : _numericIfPossible;
2905
- unit === "native" && (unit = "");
2906
- return !target ? target : !property ? function(property2, unit2, uncache2) {
2907
- return format((_plugins[property2] && _plugins[property2].get || getter)(target, property2, unit2, uncache2));
2908
- } : format((_plugins[property] && _plugins[property].get || getter)(target, property, unit, uncache));
2909
- },
2910
- quickSetter: function quickSetter(target, property, unit) {
2911
- target = toArray(target);
2912
- if (target.length > 1) {
2913
- var setters = target.map(function(t) {
2914
- return gsap.quickSetter(t, property, unit);
2915
- }), l = setters.length;
2916
- return function(value) {
2917
- var i = l;
2918
- while (i--) {
2919
- setters[i](value);
2920
- }
2921
- };
2922
- }
2923
- target = target[0] || {};
2924
- var Plugin = _plugins[property], cache = _getCache(target), p = cache.harness && (cache.harness.aliases || {})[property] || property, setter = Plugin ? function(value) {
2925
- var p2 = new Plugin();
2926
- _quickTween._pt = 0;
2927
- p2.init(target, unit ? value + unit : value, _quickTween, 0, [target]);
2928
- p2.render(1, p2);
2929
- _quickTween._pt && _renderPropTweens(1, _quickTween);
2930
- } : cache.set(target, p);
2931
- return Plugin ? setter : function(value) {
2932
- return setter(target, p, unit ? value + unit : value, cache, 1);
2933
- };
2934
- },
2935
- quickTo: function quickTo(target, property, vars) {
2936
- var _setDefaults22;
2937
- var tween = gsap.to(target, _setDefaults((_setDefaults22 = {}, _setDefaults22[property] = "+=0.1", _setDefaults22.paused = true, _setDefaults22.stagger = 0, _setDefaults22), vars || {})), func = function func2(value, start, startIsRelative) {
2938
- return tween.resetTo(property, value, start, startIsRelative);
2939
- };
2940
- func.tween = tween;
2941
- return func;
2942
- },
2943
- isTweening: function isTweening(targets) {
2944
- return _globalTimeline.getTweensOf(targets, true).length > 0;
2945
- },
2946
- defaults: function defaults(value) {
2947
- value && value.ease && (value.ease = _parseEase(value.ease, _defaults.ease));
2948
- return _mergeDeep(_defaults, value || {});
2949
- },
2950
- config: function config2(value) {
2951
- return _mergeDeep(_config, value || {});
2952
- },
2953
- registerEffect: function registerEffect(_ref3) {
2954
- var name = _ref3.name, effect = _ref3.effect, plugins = _ref3.plugins, defaults2 = _ref3.defaults, extendTimeline = _ref3.extendTimeline;
2955
- (plugins || "").split(",").forEach(function(pluginName) {
2956
- return pluginName && !_plugins[pluginName] && !_globals[pluginName] && _warn(name + " effect requires " + pluginName + " plugin.");
2957
- });
2958
- _effects[name] = function(targets, vars, tl) {
2959
- return effect(toArray(targets), _setDefaults(vars || {}, defaults2), tl);
2960
- };
2961
- if (extendTimeline) {
2962
- Timeline.prototype[name] = function(targets, vars, position) {
2963
- return this.add(_effects[name](targets, _isObject(vars) ? vars : (position = vars) && {}, this), position);
2964
- };
2965
- }
2966
- },
2967
- registerEase: function registerEase(name, ease) {
2968
- _easeMap[name] = _parseEase(ease);
2969
- },
2970
- parseEase: function parseEase(ease, defaultEase) {
2971
- return arguments.length ? _parseEase(ease, defaultEase) : _easeMap;
2972
- },
2973
- getById: function getById(id) {
2974
- return _globalTimeline.getById(id);
2975
- },
2976
- exportRoot: function exportRoot(vars, includeDelayedCalls) {
2977
- if (vars === void 0) {
2978
- vars = {};
2979
- }
2980
- var tl = new Timeline(vars), child, next;
2981
- tl.smoothChildTiming = _isNotFalse(vars.smoothChildTiming);
2982
- _globalTimeline.remove(tl);
2983
- tl._dp = 0;
2984
- tl._time = tl._tTime = _globalTimeline._time;
2985
- child = _globalTimeline._first;
2986
- while (child) {
2987
- next = child._next;
2988
- if (includeDelayedCalls || !(!child._dur && child instanceof Tween && child.vars.onComplete === child._targets[0])) {
2989
- _addToTimeline(tl, child, child._start - child._delay);
2990
- }
2991
- child = next;
2992
- }
2993
- _addToTimeline(_globalTimeline, tl, 0);
2994
- return tl;
2995
- },
2996
- context: function context(func, scope) {
2997
- return func ? new Context(func, scope) : _context;
2998
- },
2999
- matchMedia: function matchMedia(scope) {
3000
- return new MatchMedia(scope);
3001
- },
3002
- matchMediaRefresh: function matchMediaRefresh() {
3003
- return _media.forEach(function(c) {
3004
- var cond = c.conditions, found, p;
3005
- for (p in cond) {
3006
- if (cond[p]) {
3007
- cond[p] = false;
3008
- found = 1;
3009
- }
3010
- }
3011
- found && c.revert();
3012
- }) || _onMediaChange();
3013
- },
3014
- addEventListener: function addEventListener(type, callback) {
3015
- var a = _listeners[type] || (_listeners[type] = []);
3016
- ~a.indexOf(callback) || a.push(callback);
3017
- },
3018
- removeEventListener: function removeEventListener(type, callback) {
3019
- var a = _listeners[type], i = a && a.indexOf(callback);
3020
- i >= 0 && a.splice(i, 1);
3021
- },
3022
- utils: {
3023
- wrap,
3024
- wrapYoyo,
3025
- distribute,
3026
- random,
3027
- snap,
3028
- normalize,
3029
- getUnit,
3030
- clamp,
3031
- splitColor,
3032
- toArray,
3033
- selector,
3034
- mapRange,
3035
- pipe,
3036
- unitize,
3037
- interpolate,
3038
- shuffle
3039
- },
3040
- install: _install,
3041
- effects: _effects,
3042
- ticker: _ticker,
3043
- updateRoot: Timeline.updateRoot,
3044
- plugins: _plugins,
3045
- globalTimeline: _globalTimeline,
3046
- core: {
3047
- PropTween,
3048
- globals: _addGlobal,
3049
- Tween,
3050
- Timeline,
3051
- Animation,
3052
- getCache: _getCache,
3053
- _removeLinkedListItem,
3054
- reverting: function reverting() {
3055
- return _reverting;
3056
- },
3057
- context: function context2(toAdd) {
3058
- if (toAdd && _context) {
3059
- _context.data.push(toAdd);
3060
- toAdd._ctx = _context;
3061
- }
3062
- return _context;
3063
- },
3064
- suppressOverwrites: function suppressOverwrites(value) {
3065
- return _suppressOverwrites = value;
3066
- }
3067
- }
3068
- };
3069
- _forEachName("to,from,fromTo,delayedCall,set,killTweensOf", function(name) {
3070
- return _gsap[name] = Tween[name];
3071
- });
3072
- _ticker.add(Timeline.updateRoot);
3073
- _quickTween = _gsap.to({}, {
3074
- duration: 0
3075
- });
3076
- var _getPluginPropTween = function _getPluginPropTween2(plugin, prop) {
3077
- var pt = plugin._pt;
3078
- while (pt && pt.p !== prop && pt.op !== prop && pt.fp !== prop) {
3079
- pt = pt._next;
3080
- }
3081
- return pt;
3082
- };
3083
- var _addModifiers = function _addModifiers2(tween, modifiers) {
3084
- var targets = tween._targets, p, i, pt;
3085
- for (p in modifiers) {
3086
- i = targets.length;
3087
- while (i--) {
3088
- pt = tween._ptLookup[i][p];
3089
- if (pt && (pt = pt.d)) {
3090
- if (pt._pt) {
3091
- pt = _getPluginPropTween(pt, p);
3092
- }
3093
- pt && pt.modifier && pt.modifier(modifiers[p], tween, targets[i], p);
3094
- }
3095
- }
3096
- }
3097
- };
3098
- var _buildModifierPlugin = function _buildModifierPlugin2(name, modifier) {
3099
- return {
3100
- name,
3101
- headless: 1,
3102
- rawVars: 1,
3103
- //don't pre-process function-based values or "random()" strings.
3104
- init: function init4(target, vars, tween) {
3105
- tween._onInit = function(tween2) {
3106
- var temp, p;
3107
- if (_isString(vars)) {
3108
- temp = {};
3109
- _forEachName(vars, function(name2) {
3110
- return temp[name2] = 1;
3111
- });
3112
- vars = temp;
3113
- }
3114
- if (modifier) {
3115
- temp = {};
3116
- for (p in vars) {
3117
- temp[p] = modifier(vars[p]);
3118
- }
3119
- vars = temp;
3120
- }
3121
- _addModifiers(tween2, vars);
3122
- };
3123
- }
3124
- };
3125
- };
3126
- var gsap = _gsap.registerPlugin({
3127
- name: "attr",
3128
- init: function init(target, vars, tween, index, targets) {
3129
- var p, pt, v;
3130
- this.tween = tween;
3131
- for (p in vars) {
3132
- v = target.getAttribute(p) || "";
3133
- pt = this.add(target, "setAttribute", (v || 0) + "", vars[p], index, targets, 0, 0, p);
3134
- pt.op = p;
3135
- pt.b = v;
3136
- this._props.push(p);
3137
- }
3138
- },
3139
- render: function render(ratio, data) {
3140
- var pt = data._pt;
3141
- while (pt) {
3142
- _reverting ? pt.set(pt.t, pt.p, pt.b, pt) : pt.r(ratio, pt.d);
3143
- pt = pt._next;
3144
- }
3145
- }
3146
- }, {
3147
- name: "endArray",
3148
- headless: 1,
3149
- init: function init2(target, value) {
3150
- var i = value.length;
3151
- while (i--) {
3152
- this.add(target, i, target[i] || 0, value[i], 0, 0, 0, 0, 0, 1);
3153
- }
3154
- }
3155
- }, _buildModifierPlugin("roundProps", _roundModifier), _buildModifierPlugin("modifiers"), _buildModifierPlugin("snap", snap)) || _gsap;
3156
- Tween.version = Timeline.version = gsap.version = "3.13.0";
3157
- _coreReady = 1;
3158
- _windowExists() && _wake();
3159
- var Power0 = _easeMap.Power0;
3160
- var Power1 = _easeMap.Power1;
3161
- var Power2 = _easeMap.Power2;
3162
- var Power3 = _easeMap.Power3;
3163
- var Power4 = _easeMap.Power4;
3164
- var Linear = _easeMap.Linear;
3165
- var Quad = _easeMap.Quad;
3166
- var Cubic = _easeMap.Cubic;
3167
- var Quart = _easeMap.Quart;
3168
- var Quint = _easeMap.Quint;
3169
- var Strong = _easeMap.Strong;
3170
- var Elastic = _easeMap.Elastic;
3171
- var Back = _easeMap.Back;
3172
- var SteppedEase = _easeMap.SteppedEase;
3173
- var Bounce = _easeMap.Bounce;
3174
- var Sine = _easeMap.Sine;
3175
- var Expo = _easeMap.Expo;
3176
- var Circ = _easeMap.Circ;
3177
-
3178
- // node_modules/.pnpm/gsap@3.13.0/node_modules/gsap/CSSPlugin.js
3179
- var _win2;
3180
- var _doc2;
3181
- var _docElement;
3182
- var _pluginInitted;
3183
- var _tempDiv;
3184
- var _tempDivStyler;
3185
- var _recentSetterPlugin;
3186
- var _reverting2;
3187
- var _windowExists3 = function _windowExists4() {
3188
- return typeof window !== "undefined";
3189
- };
3190
- var _transformProps = {};
3191
- var _RAD2DEG = 180 / Math.PI;
3192
- var _DEG2RAD = Math.PI / 180;
3193
- var _atan2 = Math.atan2;
3194
- var _bigNum2 = 1e8;
3195
- var _capsExp = /([A-Z])/g;
3196
- var _horizontalExp = /(left|right|width|margin|padding|x)/i;
3197
- var _complexExp = /[\s,\(]\S/;
3198
- var _propertyAliases = {
3199
- autoAlpha: "opacity,visibility",
3200
- scale: "scaleX,scaleY",
3201
- alpha: "opacity"
3202
- };
3203
- var _renderCSSProp = function _renderCSSProp2(ratio, data) {
3204
- return data.set(data.t, data.p, Math.round((data.s + data.c * ratio) * 1e4) / 1e4 + data.u, data);
3205
- };
3206
- var _renderPropWithEnd = function _renderPropWithEnd2(ratio, data) {
3207
- return data.set(data.t, data.p, ratio === 1 ? data.e : Math.round((data.s + data.c * ratio) * 1e4) / 1e4 + data.u, data);
3208
- };
3209
- var _renderCSSPropWithBeginning = function _renderCSSPropWithBeginning2(ratio, data) {
3210
- return data.set(data.t, data.p, ratio ? Math.round((data.s + data.c * ratio) * 1e4) / 1e4 + data.u : data.b, data);
3211
- };
3212
- var _renderRoundedCSSProp = function _renderRoundedCSSProp2(ratio, data) {
3213
- var value = data.s + data.c * ratio;
3214
- data.set(data.t, data.p, ~~(value + (value < 0 ? -0.5 : 0.5)) + data.u, data);
3215
- };
3216
- var _renderNonTweeningValue = function _renderNonTweeningValue2(ratio, data) {
3217
- return data.set(data.t, data.p, ratio ? data.e : data.b, data);
3218
- };
3219
- var _renderNonTweeningValueOnlyAtEnd = function _renderNonTweeningValueOnlyAtEnd2(ratio, data) {
3220
- return data.set(data.t, data.p, ratio !== 1 ? data.b : data.e, data);
3221
- };
3222
- var _setterCSSStyle = function _setterCSSStyle2(target, property, value) {
3223
- return target.style[property] = value;
3224
- };
3225
- var _setterCSSProp = function _setterCSSProp2(target, property, value) {
3226
- return target.style.setProperty(property, value);
3227
- };
3228
- var _setterTransform = function _setterTransform2(target, property, value) {
3229
- return target._gsap[property] = value;
3230
- };
3231
- var _setterScale = function _setterScale2(target, property, value) {
3232
- return target._gsap.scaleX = target._gsap.scaleY = value;
3233
- };
3234
- var _setterScaleWithRender = function _setterScaleWithRender2(target, property, value, data, ratio) {
3235
- var cache = target._gsap;
3236
- cache.scaleX = cache.scaleY = value;
3237
- cache.renderTransform(ratio, cache);
3238
- };
3239
- var _setterTransformWithRender = function _setterTransformWithRender2(target, property, value, data, ratio) {
3240
- var cache = target._gsap;
3241
- cache[property] = value;
3242
- cache.renderTransform(ratio, cache);
3243
- };
3244
- var _transformProp = "transform";
3245
- var _transformOriginProp = _transformProp + "Origin";
3246
- var _saveStyle = function _saveStyle2(property, isNotCSS) {
3247
- var _this = this;
3248
- var target = this.target, style = target.style, cache = target._gsap;
3249
- if (property in _transformProps && style) {
3250
- this.tfm = this.tfm || {};
3251
- if (property !== "transform") {
3252
- property = _propertyAliases[property] || property;
3253
- ~property.indexOf(",") ? property.split(",").forEach(function(a) {
3254
- return _this.tfm[a] = _get(target, a);
3255
- }) : this.tfm[property] = cache.x ? cache[property] : _get(target, property);
3256
- property === _transformOriginProp && (this.tfm.zOrigin = cache.zOrigin);
3257
- } else {
3258
- return _propertyAliases.transform.split(",").forEach(function(p) {
3259
- return _saveStyle2.call(_this, p, isNotCSS);
3260
- });
3261
- }
3262
- if (this.props.indexOf(_transformProp) >= 0) {
3263
- return;
3264
- }
3265
- if (cache.svg) {
3266
- this.svgo = target.getAttribute("data-svg-origin");
3267
- this.props.push(_transformOriginProp, isNotCSS, "");
3268
- }
3269
- property = _transformProp;
3270
- }
3271
- (style || isNotCSS) && this.props.push(property, isNotCSS, style[property]);
3272
- };
3273
- var _removeIndependentTransforms = function _removeIndependentTransforms2(style) {
3274
- if (style.translate) {
3275
- style.removeProperty("translate");
3276
- style.removeProperty("scale");
3277
- style.removeProperty("rotate");
3278
- }
3279
- };
3280
- var _revertStyle = function _revertStyle2() {
3281
- var props = this.props, target = this.target, style = target.style, cache = target._gsap, i, p;
3282
- for (i = 0; i < props.length; i += 3) {
3283
- if (!props[i + 1]) {
3284
- props[i + 2] ? style[props[i]] = props[i + 2] : style.removeProperty(props[i].substr(0, 2) === "--" ? props[i] : props[i].replace(_capsExp, "-$1").toLowerCase());
3285
- } else if (props[i + 1] === 2) {
3286
- target[props[i]](props[i + 2]);
3287
- } else {
3288
- target[props[i]] = props[i + 2];
3289
- }
3290
- }
3291
- if (this.tfm) {
3292
- for (p in this.tfm) {
3293
- cache[p] = this.tfm[p];
3294
- }
3295
- if (cache.svg) {
3296
- cache.renderTransform();
3297
- target.setAttribute("data-svg-origin", this.svgo || "");
3298
- }
3299
- i = _reverting2();
3300
- if ((!i || !i.isStart) && !style[_transformProp]) {
3301
- _removeIndependentTransforms(style);
3302
- if (cache.zOrigin && style[_transformOriginProp]) {
3303
- style[_transformOriginProp] += " " + cache.zOrigin + "px";
3304
- cache.zOrigin = 0;
3305
- cache.renderTransform();
3306
- }
3307
- cache.uncache = 1;
3308
- }
3309
- }
3310
- };
3311
- var _getStyleSaver = function _getStyleSaver2(target, properties) {
3312
- var saver = {
3313
- target,
3314
- props: [],
3315
- revert: _revertStyle,
3316
- save: _saveStyle
3317
- };
3318
- target._gsap || gsap.core.getCache(target);
3319
- properties && target.style && target.nodeType && properties.split(",").forEach(function(p) {
3320
- return saver.save(p);
3321
- });
3322
- return saver;
3323
- };
3324
- var _supports3D;
3325
- var _createElement = function _createElement2(type, ns) {
3326
- var e = _doc2.createElementNS ? _doc2.createElementNS((ns || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), type) : _doc2.createElement(type);
3327
- return e && e.style ? e : _doc2.createElement(type);
3328
- };
3329
- var _getComputedProperty = function _getComputedProperty2(target, property, skipPrefixFallback) {
3330
- var cs = getComputedStyle(target);
3331
- return cs[property] || cs.getPropertyValue(property.replace(_capsExp, "-$1").toLowerCase()) || cs.getPropertyValue(property) || !skipPrefixFallback && _getComputedProperty2(target, _checkPropPrefix(property) || property, 1) || "";
3332
- };
3333
- var _prefixes = "O,Moz,ms,Ms,Webkit".split(",");
3334
- var _checkPropPrefix = function _checkPropPrefix2(property, element, preferPrefix) {
3335
- var e = element || _tempDiv, s = e.style, i = 5;
3336
- if (property in s && !preferPrefix) {
3337
- return property;
3338
- }
3339
- property = property.charAt(0).toUpperCase() + property.substr(1);
3340
- while (i-- && !(_prefixes[i] + property in s)) {
3341
- }
3342
- return i < 0 ? null : (i === 3 ? "ms" : i >= 0 ? _prefixes[i] : "") + property;
3343
- };
3344
- var _initCore = function _initCore2() {
3345
- if (_windowExists3() && window.document) {
3346
- _win2 = window;
3347
- _doc2 = _win2.document;
3348
- _docElement = _doc2.documentElement;
3349
- _tempDiv = _createElement("div") || {
3350
- style: {}
3351
- };
3352
- _tempDivStyler = _createElement("div");
3353
- _transformProp = _checkPropPrefix(_transformProp);
3354
- _transformOriginProp = _transformProp + "Origin";
3355
- _tempDiv.style.cssText = "border-width:0;line-height:0;position:absolute;padding:0";
3356
- _supports3D = !!_checkPropPrefix("perspective");
3357
- _reverting2 = gsap.core.reverting;
3358
- _pluginInitted = 1;
3359
- }
3360
- };
3361
- var _getReparentedCloneBBox = function _getReparentedCloneBBox2(target) {
3362
- var owner = target.ownerSVGElement, svg = _createElement("svg", owner && owner.getAttribute("xmlns") || "http://www.w3.org/2000/svg"), clone = target.cloneNode(true), bbox;
3363
- clone.style.display = "block";
3364
- svg.appendChild(clone);
3365
- _docElement.appendChild(svg);
3366
- try {
3367
- bbox = clone.getBBox();
3368
- } catch (e) {
3369
- }
3370
- svg.removeChild(clone);
3371
- _docElement.removeChild(svg);
3372
- return bbox;
3373
- };
3374
- var _getAttributeFallbacks = function _getAttributeFallbacks2(target, attributesArray) {
3375
- var i = attributesArray.length;
3376
- while (i--) {
3377
- if (target.hasAttribute(attributesArray[i])) {
3378
- return target.getAttribute(attributesArray[i]);
3379
- }
3380
- }
3381
- };
3382
- var _getBBox = function _getBBox2(target) {
3383
- var bounds, cloned;
3384
- try {
3385
- bounds = target.getBBox();
3386
- } catch (error) {
3387
- bounds = _getReparentedCloneBBox(target);
3388
- cloned = 1;
3389
- }
3390
- bounds && (bounds.width || bounds.height) || cloned || (bounds = _getReparentedCloneBBox(target));
3391
- return bounds && !bounds.width && !bounds.x && !bounds.y ? {
3392
- x: +_getAttributeFallbacks(target, ["x", "cx", "x1"]) || 0,
3393
- y: +_getAttributeFallbacks(target, ["y", "cy", "y1"]) || 0,
3394
- width: 0,
3395
- height: 0
3396
- } : bounds;
3397
- };
3398
- var _isSVG = function _isSVG2(e) {
3399
- return !!(e.getCTM && (!e.parentNode || e.ownerSVGElement) && _getBBox(e));
3400
- };
3401
- var _removeProperty = function _removeProperty2(target, property) {
3402
- if (property) {
3403
- var style = target.style, first2Chars;
3404
- if (property in _transformProps && property !== _transformOriginProp) {
3405
- property = _transformProp;
3406
- }
3407
- if (style.removeProperty) {
3408
- first2Chars = property.substr(0, 2);
3409
- if (first2Chars === "ms" || property.substr(0, 6) === "webkit") {
3410
- property = "-" + property;
3411
- }
3412
- style.removeProperty(first2Chars === "--" ? property : property.replace(_capsExp, "-$1").toLowerCase());
3413
- } else {
3414
- style.removeAttribute(property);
3415
- }
3416
- }
3417
- };
3418
- var _addNonTweeningPT = function _addNonTweeningPT2(plugin, target, property, beginning, end, onlySetAtEnd) {
3419
- var pt = new PropTween(plugin._pt, target, property, 0, 1, onlySetAtEnd ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue);
3420
- plugin._pt = pt;
3421
- pt.b = beginning;
3422
- pt.e = end;
3423
- plugin._props.push(property);
3424
- return pt;
3425
- };
3426
- var _nonConvertibleUnits = {
3427
- deg: 1,
3428
- rad: 1,
3429
- turn: 1
3430
- };
3431
- var _nonStandardLayouts = {
3432
- grid: 1,
3433
- flex: 1
3434
- };
3435
- var _convertToUnit = function _convertToUnit2(target, property, value, unit) {
3436
- var curValue = parseFloat(value) || 0, curUnit = (value + "").trim().substr((curValue + "").length) || "px", style = _tempDiv.style, horizontal = _horizontalExp.test(property), isRootSVG = target.tagName.toLowerCase() === "svg", measureProperty = (isRootSVG ? "client" : "offset") + (horizontal ? "Width" : "Height"), amount = 100, toPixels = unit === "px", toPercent = unit === "%", px, parent, cache, isSVG;
3437
- if (unit === curUnit || !curValue || _nonConvertibleUnits[unit] || _nonConvertibleUnits[curUnit]) {
3438
- return curValue;
3439
- }
3440
- curUnit !== "px" && !toPixels && (curValue = _convertToUnit2(target, property, value, "px"));
3441
- isSVG = target.getCTM && _isSVG(target);
3442
- if ((toPercent || curUnit === "%") && (_transformProps[property] || ~property.indexOf("adius"))) {
3443
- px = isSVG ? target.getBBox()[horizontal ? "width" : "height"] : target[measureProperty];
3444
- return _round(toPercent ? curValue / px * amount : curValue / 100 * px);
3445
- }
3446
- style[horizontal ? "width" : "height"] = amount + (toPixels ? curUnit : unit);
3447
- parent = unit !== "rem" && ~property.indexOf("adius") || unit === "em" && target.appendChild && !isRootSVG ? target : target.parentNode;
3448
- if (isSVG) {
3449
- parent = (target.ownerSVGElement || {}).parentNode;
3450
- }
3451
- if (!parent || parent === _doc2 || !parent.appendChild) {
3452
- parent = _doc2.body;
3453
- }
3454
- cache = parent._gsap;
3455
- if (cache && toPercent && cache.width && horizontal && cache.time === _ticker.time && !cache.uncache) {
3456
- return _round(curValue / cache.width * amount);
3457
- } else {
3458
- if (toPercent && (property === "height" || property === "width")) {
3459
- var v = target.style[property];
3460
- target.style[property] = amount + unit;
3461
- px = target[measureProperty];
3462
- v ? target.style[property] = v : _removeProperty(target, property);
3463
- } else {
3464
- (toPercent || curUnit === "%") && !_nonStandardLayouts[_getComputedProperty(parent, "display")] && (style.position = _getComputedProperty(target, "position"));
3465
- parent === target && (style.position = "static");
3466
- parent.appendChild(_tempDiv);
3467
- px = _tempDiv[measureProperty];
3468
- parent.removeChild(_tempDiv);
3469
- style.position = "absolute";
3470
- }
3471
- if (horizontal && toPercent) {
3472
- cache = _getCache(parent);
3473
- cache.time = _ticker.time;
3474
- cache.width = parent[measureProperty];
3475
- }
3476
- }
3477
- return _round(toPixels ? px * curValue / amount : px && curValue ? amount / px * curValue : 0);
3478
- };
3479
- var _get = function _get2(target, property, unit, uncache) {
3480
- var value;
3481
- _pluginInitted || _initCore();
3482
- if (property in _propertyAliases && property !== "transform") {
3483
- property = _propertyAliases[property];
3484
- if (~property.indexOf(",")) {
3485
- property = property.split(",")[0];
3486
- }
3487
- }
3488
- if (_transformProps[property] && property !== "transform") {
3489
- value = _parseTransform(target, uncache);
3490
- value = property !== "transformOrigin" ? value[property] : value.svg ? value.origin : _firstTwoOnly(_getComputedProperty(target, _transformOriginProp)) + " " + value.zOrigin + "px";
3491
- } else {
3492
- value = target.style[property];
3493
- if (!value || value === "auto" || uncache || ~(value + "").indexOf("calc(")) {
3494
- value = _specialProps[property] && _specialProps[property](target, property, unit) || _getComputedProperty(target, property) || _getProperty(target, property) || (property === "opacity" ? 1 : 0);
3495
- }
3496
- }
3497
- return unit && !~(value + "").trim().indexOf(" ") ? _convertToUnit(target, property, value, unit) + unit : value;
3498
- };
3499
- var _tweenComplexCSSString = function _tweenComplexCSSString2(target, prop, start, end) {
3500
- if (!start || start === "none") {
3501
- var p = _checkPropPrefix(prop, target, 1), s = p && _getComputedProperty(target, p, 1);
3502
- if (s && s !== start) {
3503
- prop = p;
3504
- start = s;
3505
- } else if (prop === "borderColor") {
3506
- start = _getComputedProperty(target, "borderTopColor");
3507
- }
3508
- }
3509
- var pt = new PropTween(this._pt, target.style, prop, 0, 1, _renderComplexString), index = 0, matchIndex = 0, a, result, startValues, startNum, color, startValue, endValue, endNum, chunk, endUnit, startUnit, endValues;
3510
- pt.b = start;
3511
- pt.e = end;
3512
- start += "";
3513
- end += "";
3514
- if (end.substring(0, 6) === "var(--") {
3515
- end = _getComputedProperty(target, end.substring(4, end.indexOf(")")));
3516
- }
3517
- if (end === "auto") {
3518
- startValue = target.style[prop];
3519
- target.style[prop] = end;
3520
- end = _getComputedProperty(target, prop) || end;
3521
- startValue ? target.style[prop] = startValue : _removeProperty(target, prop);
3522
- }
3523
- a = [start, end];
3524
- _colorStringFilter(a);
3525
- start = a[0];
3526
- end = a[1];
3527
- startValues = start.match(_numWithUnitExp) || [];
3528
- endValues = end.match(_numWithUnitExp) || [];
3529
- if (endValues.length) {
3530
- while (result = _numWithUnitExp.exec(end)) {
3531
- endValue = result[0];
3532
- chunk = end.substring(index, result.index);
3533
- if (color) {
3534
- color = (color + 1) % 5;
3535
- } else if (chunk.substr(-5) === "rgba(" || chunk.substr(-5) === "hsla(") {
3536
- color = 1;
3537
- }
3538
- if (endValue !== (startValue = startValues[matchIndex++] || "")) {
3539
- startNum = parseFloat(startValue) || 0;
3540
- startUnit = startValue.substr((startNum + "").length);
3541
- endValue.charAt(1) === "=" && (endValue = _parseRelative(startNum, endValue) + startUnit);
3542
- endNum = parseFloat(endValue);
3543
- endUnit = endValue.substr((endNum + "").length);
3544
- index = _numWithUnitExp.lastIndex - endUnit.length;
3545
- if (!endUnit) {
3546
- endUnit = endUnit || _config.units[prop] || startUnit;
3547
- if (index === end.length) {
3548
- end += endUnit;
3549
- pt.e += endUnit;
3550
- }
3551
- }
3552
- if (startUnit !== endUnit) {
3553
- startNum = _convertToUnit(target, prop, startValue, endUnit) || 0;
3554
- }
3555
- pt._pt = {
3556
- _next: pt._pt,
3557
- p: chunk || matchIndex === 1 ? chunk : ",",
3558
- //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.
3559
- s: startNum,
3560
- c: endNum - startNum,
3561
- m: color && color < 4 || prop === "zIndex" ? Math.round : 0
3562
- };
3563
- }
3564
- }
3565
- pt.c = index < end.length ? end.substring(index, end.length) : "";
3566
- } else {
3567
- pt.r = prop === "display" && end === "none" ? _renderNonTweeningValueOnlyAtEnd : _renderNonTweeningValue;
3568
- }
3569
- _relExp.test(end) && (pt.e = 0);
3570
- this._pt = pt;
3571
- return pt;
3572
- };
3573
- var _keywordToPercent = {
3574
- top: "0%",
3575
- bottom: "100%",
3576
- left: "0%",
3577
- right: "100%",
3578
- center: "50%"
3579
- };
3580
- var _convertKeywordsToPercentages = function _convertKeywordsToPercentages2(value) {
3581
- var split = value.split(" "), x = split[0], y = split[1] || "50%";
3582
- if (x === "top" || x === "bottom" || y === "left" || y === "right") {
3583
- value = x;
3584
- x = y;
3585
- y = value;
3586
- }
3587
- split[0] = _keywordToPercent[x] || x;
3588
- split[1] = _keywordToPercent[y] || y;
3589
- return split.join(" ");
3590
- };
3591
- var _renderClearProps = function _renderClearProps2(ratio, data) {
3592
- if (data.tween && data.tween._time === data.tween._dur) {
3593
- var target = data.t, style = target.style, props = data.u, cache = target._gsap, prop, clearTransforms, i;
3594
- if (props === "all" || props === true) {
3595
- style.cssText = "";
3596
- clearTransforms = 1;
3597
- } else {
3598
- props = props.split(",");
3599
- i = props.length;
3600
- while (--i > -1) {
3601
- prop = props[i];
3602
- if (_transformProps[prop]) {
3603
- clearTransforms = 1;
3604
- prop = prop === "transformOrigin" ? _transformOriginProp : _transformProp;
3605
- }
3606
- _removeProperty(target, prop);
3607
- }
3608
- }
3609
- if (clearTransforms) {
3610
- _removeProperty(target, _transformProp);
3611
- if (cache) {
3612
- cache.svg && target.removeAttribute("transform");
3613
- style.scale = style.rotate = style.translate = "none";
3614
- _parseTransform(target, 1);
3615
- cache.uncache = 1;
3616
- _removeIndependentTransforms(style);
3617
- }
3618
- }
3619
- }
3620
- };
3621
- var _specialProps = {
3622
- clearProps: function clearProps(plugin, target, property, endValue, tween) {
3623
- if (tween.data !== "isFromStart") {
3624
- var pt = plugin._pt = new PropTween(plugin._pt, target, property, 0, 0, _renderClearProps);
3625
- pt.u = endValue;
3626
- pt.pr = -10;
3627
- pt.tween = tween;
3628
- plugin._props.push(property);
3629
- return 1;
3630
- }
3631
- }
3632
- /* className feature (about 0.4kb gzipped).
3633
- , className(plugin, target, property, endValue, tween) {
3634
- let _renderClassName = (ratio, data) => {
3635
- data.css.render(ratio, data.css);
3636
- if (!ratio || ratio === 1) {
3637
- let inline = data.rmv,
3638
- target = data.t,
3639
- p;
3640
- target.setAttribute("class", ratio ? data.e : data.b);
3641
- for (p in inline) {
3642
- _removeProperty(target, p);
3643
- }
3644
- }
3645
- },
3646
- _getAllStyles = (target) => {
3647
- let styles = {},
3648
- computed = getComputedStyle(target),
3649
- p;
3650
- for (p in computed) {
3651
- if (isNaN(p) && p !== "cssText" && p !== "length") {
3652
- styles[p] = computed[p];
3653
- }
3654
- }
3655
- _setDefaults(styles, _parseTransform(target, 1));
3656
- return styles;
3657
- },
3658
- startClassList = target.getAttribute("class"),
3659
- style = target.style,
3660
- cssText = style.cssText,
3661
- cache = target._gsap,
3662
- classPT = cache.classPT,
3663
- inlineToRemoveAtEnd = {},
3664
- data = {t:target, plugin:plugin, rmv:inlineToRemoveAtEnd, b:startClassList, e:(endValue.charAt(1) !== "=") ? endValue : startClassList.replace(new RegExp("(?:\\s|^)" + endValue.substr(2) + "(?![\\w-])"), "") + ((endValue.charAt(0) === "+") ? " " + endValue.substr(2) : "")},
3665
- changingVars = {},
3666
- startVars = _getAllStyles(target),
3667
- transformRelated = /(transform|perspective)/i,
3668
- endVars, p;
3669
- if (classPT) {
3670
- classPT.r(1, classPT.d);
3671
- _removeLinkedListItem(classPT.d.plugin, classPT, "_pt");
3672
- }
3673
- target.setAttribute("class", data.e);
3674
- endVars = _getAllStyles(target, true);
3675
- target.setAttribute("class", startClassList);
3676
- for (p in endVars) {
3677
- if (endVars[p] !== startVars[p] && !transformRelated.test(p)) {
3678
- changingVars[p] = endVars[p];
3679
- if (!style[p] && style[p] !== "0") {
3680
- inlineToRemoveAtEnd[p] = 1;
3681
- }
3682
- }
3683
- }
3684
- cache.classPT = plugin._pt = new PropTween(plugin._pt, target, "className", 0, 0, _renderClassName, data, 0, -11);
3685
- if (style.cssText !== cssText) { //only apply if things change. Otherwise, in cases like a background-image that's pulled dynamically, it could cause a refresh. See https://gsap.com/forums/topic/20368-possible-gsap-bug-switching-classnames-in-chrome/.
3686
- 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).
3687
- }
3688
- _parseTransform(target, true); //to clear the caching of transforms
3689
- data.css = new gsap.plugins.css();
3690
- data.css.init(target, changingVars, tween);
3691
- plugin._props.push(...data.css._props);
3692
- return 1;
3693
- }
3694
- */
3695
- };
3696
- var _identity2DMatrix = [1, 0, 0, 1, 0, 0];
3697
- var _rotationalProperties = {};
3698
- var _isNullTransform = function _isNullTransform2(value) {
3699
- return value === "matrix(1, 0, 0, 1, 0, 0)" || value === "none" || !value;
3700
- };
3701
- var _getComputedTransformMatrixAsArray = function _getComputedTransformMatrixAsArray2(target) {
3702
- var matrixString = _getComputedProperty(target, _transformProp);
3703
- return _isNullTransform(matrixString) ? _identity2DMatrix : matrixString.substr(7).match(_numExp).map(_round);
3704
- };
3705
- var _getMatrix = function _getMatrix2(target, force2D) {
3706
- var cache = target._gsap || _getCache(target), style = target.style, matrix = _getComputedTransformMatrixAsArray(target), parent, nextSibling, temp, addedToDOM;
3707
- if (cache.svg && target.getAttribute("transform")) {
3708
- temp = target.transform.baseVal.consolidate().matrix;
3709
- matrix = [temp.a, temp.b, temp.c, temp.d, temp.e, temp.f];
3710
- return matrix.join(",") === "1,0,0,1,0,0" ? _identity2DMatrix : matrix;
3711
- } else if (matrix === _identity2DMatrix && !target.offsetParent && target !== _docElement && !cache.svg) {
3712
- temp = style.display;
3713
- style.display = "block";
3714
- parent = target.parentNode;
3715
- if (!parent || !target.offsetParent && !target.getBoundingClientRect().width) {
3716
- addedToDOM = 1;
3717
- nextSibling = target.nextElementSibling;
3718
- _docElement.appendChild(target);
3719
- }
3720
- matrix = _getComputedTransformMatrixAsArray(target);
3721
- temp ? style.display = temp : _removeProperty(target, "display");
3722
- if (addedToDOM) {
3723
- nextSibling ? parent.insertBefore(target, nextSibling) : parent ? parent.appendChild(target) : _docElement.removeChild(target);
3724
- }
3725
- }
3726
- return force2D && matrix.length > 6 ? [matrix[0], matrix[1], matrix[4], matrix[5], matrix[12], matrix[13]] : matrix;
3727
- };
3728
- var _applySVGOrigin = function _applySVGOrigin2(target, origin, originIsAbsolute, smooth, matrixArray, pluginToAddPropTweensTo) {
3729
- var cache = target._gsap, matrix = matrixArray || _getMatrix(target, true), xOriginOld = cache.xOrigin || 0, yOriginOld = cache.yOrigin || 0, xOffsetOld = cache.xOffset || 0, yOffsetOld = cache.yOffset || 0, a = matrix[0], b = matrix[1], c = matrix[2], d = matrix[3], tx = matrix[4], ty = matrix[5], originSplit = origin.split(" "), xOrigin = parseFloat(originSplit[0]) || 0, yOrigin = parseFloat(originSplit[1]) || 0, bounds, determinant, x, y;
3730
- if (!originIsAbsolute) {
3731
- bounds = _getBBox(target);
3732
- xOrigin = bounds.x + (~originSplit[0].indexOf("%") ? xOrigin / 100 * bounds.width : xOrigin);
3733
- yOrigin = bounds.y + (~(originSplit[1] || originSplit[0]).indexOf("%") ? yOrigin / 100 * bounds.height : yOrigin);
3734
- } else if (matrix !== _identity2DMatrix && (determinant = a * d - b * c)) {
3735
- x = xOrigin * (d / determinant) + yOrigin * (-c / determinant) + (c * ty - d * tx) / determinant;
3736
- y = xOrigin * (-b / determinant) + yOrigin * (a / determinant) - (a * ty - b * tx) / determinant;
3737
- xOrigin = x;
3738
- yOrigin = y;
3739
- }
3740
- if (smooth || smooth !== false && cache.smooth) {
3741
- tx = xOrigin - xOriginOld;
3742
- ty = yOrigin - yOriginOld;
3743
- cache.xOffset = xOffsetOld + (tx * a + ty * c) - tx;
3744
- cache.yOffset = yOffsetOld + (tx * b + ty * d) - ty;
3745
- } else {
3746
- cache.xOffset = cache.yOffset = 0;
3747
- }
3748
- cache.xOrigin = xOrigin;
3749
- cache.yOrigin = yOrigin;
3750
- cache.smooth = !!smooth;
3751
- cache.origin = origin;
3752
- cache.originIsAbsolute = !!originIsAbsolute;
3753
- target.style[_transformOriginProp] = "0px 0px";
3754
- if (pluginToAddPropTweensTo) {
3755
- _addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOrigin", xOriginOld, xOrigin);
3756
- _addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOrigin", yOriginOld, yOrigin);
3757
- _addNonTweeningPT(pluginToAddPropTweensTo, cache, "xOffset", xOffsetOld, cache.xOffset);
3758
- _addNonTweeningPT(pluginToAddPropTweensTo, cache, "yOffset", yOffsetOld, cache.yOffset);
3759
- }
3760
- target.setAttribute("data-svg-origin", xOrigin + " " + yOrigin);
3761
- };
3762
- var _parseTransform = function _parseTransform2(target, uncache) {
3763
- var cache = target._gsap || new GSCache(target);
3764
- if ("x" in cache && !uncache && !cache.uncache) {
3765
- return cache;
3766
- }
3767
- var style = target.style, invertedScaleX = cache.scaleX < 0, px = "px", deg = "deg", cs = getComputedStyle(target), origin = _getComputedProperty(target, _transformOriginProp) || "0", x, y, z, scaleX, scaleY, rotation, rotationX, rotationY, skewX, skewY, perspective, xOrigin, yOrigin, matrix, angle, cos, sin, a, b, c, d, a12, a22, t1, t2, t3, a13, a23, a33, a42, a43, a32;
3768
- x = y = z = rotation = rotationX = rotationY = skewX = skewY = perspective = 0;
3769
- scaleX = scaleY = 1;
3770
- cache.svg = !!(target.getCTM && _isSVG(target));
3771
- if (cs.translate) {
3772
- if (cs.translate !== "none" || cs.scale !== "none" || cs.rotate !== "none") {
3773
- style[_transformProp] = (cs.translate !== "none" ? "translate3d(" + (cs.translate + " 0 0").split(" ").slice(0, 3).join(", ") + ") " : "") + (cs.rotate !== "none" ? "rotate(" + cs.rotate + ") " : "") + (cs.scale !== "none" ? "scale(" + cs.scale.split(" ").join(",") + ") " : "") + (cs[_transformProp] !== "none" ? cs[_transformProp] : "");
3774
- }
3775
- style.scale = style.rotate = style.translate = "none";
3776
- }
3777
- matrix = _getMatrix(target, cache.svg);
3778
- if (cache.svg) {
3779
- if (cache.uncache) {
3780
- t2 = target.getBBox();
3781
- origin = cache.xOrigin - t2.x + "px " + (cache.yOrigin - t2.y) + "px";
3782
- t1 = "";
3783
- } else {
3784
- t1 = !uncache && target.getAttribute("data-svg-origin");
3785
- }
3786
- _applySVGOrigin(target, t1 || origin, !!t1 || cache.originIsAbsolute, cache.smooth !== false, matrix);
3787
- }
3788
- xOrigin = cache.xOrigin || 0;
3789
- yOrigin = cache.yOrigin || 0;
3790
- if (matrix !== _identity2DMatrix) {
3791
- a = matrix[0];
3792
- b = matrix[1];
3793
- c = matrix[2];
3794
- d = matrix[3];
3795
- x = a12 = matrix[4];
3796
- y = a22 = matrix[5];
3797
- if (matrix.length === 6) {
3798
- scaleX = Math.sqrt(a * a + b * b);
3799
- scaleY = Math.sqrt(d * d + c * c);
3800
- rotation = a || b ? _atan2(b, a) * _RAD2DEG : 0;
3801
- skewX = c || d ? _atan2(c, d) * _RAD2DEG + rotation : 0;
3802
- skewX && (scaleY *= Math.abs(Math.cos(skewX * _DEG2RAD)));
3803
- if (cache.svg) {
3804
- x -= xOrigin - (xOrigin * a + yOrigin * c);
3805
- y -= yOrigin - (xOrigin * b + yOrigin * d);
3806
- }
3807
- } else {
3808
- a32 = matrix[6];
3809
- a42 = matrix[7];
3810
- a13 = matrix[8];
3811
- a23 = matrix[9];
3812
- a33 = matrix[10];
3813
- a43 = matrix[11];
3814
- x = matrix[12];
3815
- y = matrix[13];
3816
- z = matrix[14];
3817
- angle = _atan2(a32, a33);
3818
- rotationX = angle * _RAD2DEG;
3819
- if (angle) {
3820
- cos = Math.cos(-angle);
3821
- sin = Math.sin(-angle);
3822
- t1 = a12 * cos + a13 * sin;
3823
- t2 = a22 * cos + a23 * sin;
3824
- t3 = a32 * cos + a33 * sin;
3825
- a13 = a12 * -sin + a13 * cos;
3826
- a23 = a22 * -sin + a23 * cos;
3827
- a33 = a32 * -sin + a33 * cos;
3828
- a43 = a42 * -sin + a43 * cos;
3829
- a12 = t1;
3830
- a22 = t2;
3831
- a32 = t3;
3832
- }
3833
- angle = _atan2(-c, a33);
3834
- rotationY = angle * _RAD2DEG;
3835
- if (angle) {
3836
- cos = Math.cos(-angle);
3837
- sin = Math.sin(-angle);
3838
- t1 = a * cos - a13 * sin;
3839
- t2 = b * cos - a23 * sin;
3840
- t3 = c * cos - a33 * sin;
3841
- a43 = d * sin + a43 * cos;
3842
- a = t1;
3843
- b = t2;
3844
- c = t3;
3845
- }
3846
- angle = _atan2(b, a);
3847
- rotation = angle * _RAD2DEG;
3848
- if (angle) {
3849
- cos = Math.cos(angle);
3850
- sin = Math.sin(angle);
3851
- t1 = a * cos + b * sin;
3852
- t2 = a12 * cos + a22 * sin;
3853
- b = b * cos - a * sin;
3854
- a22 = a22 * cos - a12 * sin;
3855
- a = t1;
3856
- a12 = t2;
3857
- }
3858
- if (rotationX && Math.abs(rotationX) + Math.abs(rotation) > 359.9) {
3859
- rotationX = rotation = 0;
3860
- rotationY = 180 - rotationY;
3861
- }
3862
- scaleX = _round(Math.sqrt(a * a + b * b + c * c));
3863
- scaleY = _round(Math.sqrt(a22 * a22 + a32 * a32));
3864
- angle = _atan2(a12, a22);
3865
- skewX = Math.abs(angle) > 2e-4 ? angle * _RAD2DEG : 0;
3866
- perspective = a43 ? 1 / (a43 < 0 ? -a43 : a43) : 0;
3867
- }
3868
- if (cache.svg) {
3869
- t1 = target.getAttribute("transform");
3870
- cache.forceCSS = target.setAttribute("transform", "") || !_isNullTransform(_getComputedProperty(target, _transformProp));
3871
- t1 && target.setAttribute("transform", t1);
3872
- }
3873
- }
3874
- if (Math.abs(skewX) > 90 && Math.abs(skewX) < 270) {
3875
- if (invertedScaleX) {
3876
- scaleX *= -1;
3877
- skewX += rotation <= 0 ? 180 : -180;
3878
- rotation += rotation <= 0 ? 180 : -180;
3879
- } else {
3880
- scaleY *= -1;
3881
- skewX += skewX <= 0 ? 180 : -180;
3882
- }
3883
- }
3884
- uncache = uncache || cache.uncache;
3885
- cache.x = x - ((cache.xPercent = x && (!uncache && cache.xPercent || (Math.round(target.offsetWidth / 2) === Math.round(-x) ? -50 : 0))) ? target.offsetWidth * cache.xPercent / 100 : 0) + px;
3886
- cache.y = y - ((cache.yPercent = y && (!uncache && cache.yPercent || (Math.round(target.offsetHeight / 2) === Math.round(-y) ? -50 : 0))) ? target.offsetHeight * cache.yPercent / 100 : 0) + px;
3887
- cache.z = z + px;
3888
- cache.scaleX = _round(scaleX);
3889
- cache.scaleY = _round(scaleY);
3890
- cache.rotation = _round(rotation) + deg;
3891
- cache.rotationX = _round(rotationX) + deg;
3892
- cache.rotationY = _round(rotationY) + deg;
3893
- cache.skewX = skewX + deg;
3894
- cache.skewY = skewY + deg;
3895
- cache.transformPerspective = perspective + px;
3896
- if (cache.zOrigin = parseFloat(origin.split(" ")[2]) || !uncache && cache.zOrigin || 0) {
3897
- style[_transformOriginProp] = _firstTwoOnly(origin);
3898
- }
3899
- cache.xOffset = cache.yOffset = 0;
3900
- cache.force3D = _config.force3D;
3901
- cache.renderTransform = cache.svg ? _renderSVGTransforms : _supports3D ? _renderCSSTransforms : _renderNon3DTransforms;
3902
- cache.uncache = 0;
3903
- return cache;
3904
- };
3905
- var _firstTwoOnly = function _firstTwoOnly2(value) {
3906
- return (value = value.split(" "))[0] + " " + value[1];
3907
- };
3908
- var _addPxTranslate = function _addPxTranslate2(target, start, value) {
3909
- var unit = getUnit(start);
3910
- return _round(parseFloat(start) + parseFloat(_convertToUnit(target, "x", value + "px", unit))) + unit;
3911
- };
3912
- var _renderNon3DTransforms = function _renderNon3DTransforms2(ratio, cache) {
3913
- cache.z = "0px";
3914
- cache.rotationY = cache.rotationX = "0deg";
3915
- cache.force3D = 0;
3916
- _renderCSSTransforms(ratio, cache);
3917
- };
3918
- var _zeroDeg = "0deg";
3919
- var _zeroPx = "0px";
3920
- var _endParenthesis = ") ";
3921
- var _renderCSSTransforms = function _renderCSSTransforms2(ratio, cache) {
3922
- var _ref = cache || this, xPercent = _ref.xPercent, yPercent = _ref.yPercent, x = _ref.x, y = _ref.y, z = _ref.z, rotation = _ref.rotation, rotationY = _ref.rotationY, rotationX = _ref.rotationX, skewX = _ref.skewX, skewY = _ref.skewY, scaleX = _ref.scaleX, scaleY = _ref.scaleY, transformPerspective = _ref.transformPerspective, force3D = _ref.force3D, target = _ref.target, zOrigin = _ref.zOrigin, transforms = "", use3D = force3D === "auto" && ratio && ratio !== 1 || force3D === true;
3923
- if (zOrigin && (rotationX !== _zeroDeg || rotationY !== _zeroDeg)) {
3924
- var angle = parseFloat(rotationY) * _DEG2RAD, a13 = Math.sin(angle), a33 = Math.cos(angle), cos;
3925
- angle = parseFloat(rotationX) * _DEG2RAD;
3926
- cos = Math.cos(angle);
3927
- x = _addPxTranslate(target, x, a13 * cos * -zOrigin);
3928
- y = _addPxTranslate(target, y, -Math.sin(angle) * -zOrigin);
3929
- z = _addPxTranslate(target, z, a33 * cos * -zOrigin + zOrigin);
3930
- }
3931
- if (transformPerspective !== _zeroPx) {
3932
- transforms += "perspective(" + transformPerspective + _endParenthesis;
3933
- }
3934
- if (xPercent || yPercent) {
3935
- transforms += "translate(" + xPercent + "%, " + yPercent + "%) ";
3936
- }
3937
- if (use3D || x !== _zeroPx || y !== _zeroPx || z !== _zeroPx) {
3938
- transforms += z !== _zeroPx || use3D ? "translate3d(" + x + ", " + y + ", " + z + ") " : "translate(" + x + ", " + y + _endParenthesis;
3939
- }
3940
- if (rotation !== _zeroDeg) {
3941
- transforms += "rotate(" + rotation + _endParenthesis;
3942
- }
3943
- if (rotationY !== _zeroDeg) {
3944
- transforms += "rotateY(" + rotationY + _endParenthesis;
3945
- }
3946
- if (rotationX !== _zeroDeg) {
3947
- transforms += "rotateX(" + rotationX + _endParenthesis;
3948
- }
3949
- if (skewX !== _zeroDeg || skewY !== _zeroDeg) {
3950
- transforms += "skew(" + skewX + ", " + skewY + _endParenthesis;
3951
- }
3952
- if (scaleX !== 1 || scaleY !== 1) {
3953
- transforms += "scale(" + scaleX + ", " + scaleY + _endParenthesis;
3954
- }
3955
- target.style[_transformProp] = transforms || "translate(0, 0)";
3956
- };
3957
- var _renderSVGTransforms = function _renderSVGTransforms2(ratio, cache) {
3958
- var _ref2 = cache || this, xPercent = _ref2.xPercent, yPercent = _ref2.yPercent, x = _ref2.x, y = _ref2.y, rotation = _ref2.rotation, skewX = _ref2.skewX, skewY = _ref2.skewY, scaleX = _ref2.scaleX, scaleY = _ref2.scaleY, target = _ref2.target, xOrigin = _ref2.xOrigin, yOrigin = _ref2.yOrigin, xOffset = _ref2.xOffset, yOffset = _ref2.yOffset, forceCSS = _ref2.forceCSS, tx = parseFloat(x), ty = parseFloat(y), a11, a21, a12, a22, temp;
3959
- rotation = parseFloat(rotation);
3960
- skewX = parseFloat(skewX);
3961
- skewY = parseFloat(skewY);
3962
- if (skewY) {
3963
- skewY = parseFloat(skewY);
3964
- skewX += skewY;
3965
- rotation += skewY;
3966
- }
3967
- if (rotation || skewX) {
3968
- rotation *= _DEG2RAD;
3969
- skewX *= _DEG2RAD;
3970
- a11 = Math.cos(rotation) * scaleX;
3971
- a21 = Math.sin(rotation) * scaleX;
3972
- a12 = Math.sin(rotation - skewX) * -scaleY;
3973
- a22 = Math.cos(rotation - skewX) * scaleY;
3974
- if (skewX) {
3975
- skewY *= _DEG2RAD;
3976
- temp = Math.tan(skewX - skewY);
3977
- temp = Math.sqrt(1 + temp * temp);
3978
- a12 *= temp;
3979
- a22 *= temp;
3980
- if (skewY) {
3981
- temp = Math.tan(skewY);
3982
- temp = Math.sqrt(1 + temp * temp);
3983
- a11 *= temp;
3984
- a21 *= temp;
3985
- }
3986
- }
3987
- a11 = _round(a11);
3988
- a21 = _round(a21);
3989
- a12 = _round(a12);
3990
- a22 = _round(a22);
3991
- } else {
3992
- a11 = scaleX;
3993
- a22 = scaleY;
3994
- a21 = a12 = 0;
3995
- }
3996
- if (tx && !~(x + "").indexOf("px") || ty && !~(y + "").indexOf("px")) {
3997
- tx = _convertToUnit(target, "x", x, "px");
3998
- ty = _convertToUnit(target, "y", y, "px");
3999
- }
4000
- if (xOrigin || yOrigin || xOffset || yOffset) {
4001
- tx = _round(tx + xOrigin - (xOrigin * a11 + yOrigin * a12) + xOffset);
4002
- ty = _round(ty + yOrigin - (xOrigin * a21 + yOrigin * a22) + yOffset);
4003
- }
4004
- if (xPercent || yPercent) {
4005
- temp = target.getBBox();
4006
- tx = _round(tx + xPercent / 100 * temp.width);
4007
- ty = _round(ty + yPercent / 100 * temp.height);
4008
- }
4009
- temp = "matrix(" + a11 + "," + a21 + "," + a12 + "," + a22 + "," + tx + "," + ty + ")";
4010
- target.setAttribute("transform", temp);
4011
- forceCSS && (target.style[_transformProp] = temp);
4012
- };
4013
- var _addRotationalPropTween = function _addRotationalPropTween2(plugin, target, property, startNum, endValue) {
4014
- var cap = 360, isString = _isString(endValue), endNum = parseFloat(endValue) * (isString && ~endValue.indexOf("rad") ? _RAD2DEG : 1), change = endNum - startNum, finalValue = startNum + change + "deg", direction, pt;
4015
- if (isString) {
4016
- direction = endValue.split("_")[1];
4017
- if (direction === "short") {
4018
- change %= cap;
4019
- if (change !== change % (cap / 2)) {
4020
- change += change < 0 ? cap : -cap;
4021
- }
4022
- }
4023
- if (direction === "cw" && change < 0) {
4024
- change = (change + cap * _bigNum2) % cap - ~~(change / cap) * cap;
4025
- } else if (direction === "ccw" && change > 0) {
4026
- change = (change - cap * _bigNum2) % cap - ~~(change / cap) * cap;
4027
- }
4028
- }
4029
- plugin._pt = pt = new PropTween(plugin._pt, target, property, startNum, change, _renderPropWithEnd);
4030
- pt.e = finalValue;
4031
- pt.u = "deg";
4032
- plugin._props.push(property);
4033
- return pt;
4034
- };
4035
- var _assign = function _assign2(target, source) {
4036
- for (var p in source) {
4037
- target[p] = source[p];
4038
- }
4039
- return target;
4040
- };
4041
- var _addRawTransformPTs = function _addRawTransformPTs2(plugin, transforms, target) {
4042
- var startCache = _assign({}, target._gsap), exclude = "perspective,force3D,transformOrigin,svgOrigin", style = target.style, endCache, p, startValue, endValue, startNum, endNum, startUnit, endUnit;
4043
- if (startCache.svg) {
4044
- startValue = target.getAttribute("transform");
4045
- target.setAttribute("transform", "");
4046
- style[_transformProp] = transforms;
4047
- endCache = _parseTransform(target, 1);
4048
- _removeProperty(target, _transformProp);
4049
- target.setAttribute("transform", startValue);
4050
- } else {
4051
- startValue = getComputedStyle(target)[_transformProp];
4052
- style[_transformProp] = transforms;
4053
- endCache = _parseTransform(target, 1);
4054
- style[_transformProp] = startValue;
4055
- }
4056
- for (p in _transformProps) {
4057
- startValue = startCache[p];
4058
- endValue = endCache[p];
4059
- if (startValue !== endValue && exclude.indexOf(p) < 0) {
4060
- startUnit = getUnit(startValue);
4061
- endUnit = getUnit(endValue);
4062
- startNum = startUnit !== endUnit ? _convertToUnit(target, p, startValue, endUnit) : parseFloat(startValue);
4063
- endNum = parseFloat(endValue);
4064
- plugin._pt = new PropTween(plugin._pt, endCache, p, startNum, endNum - startNum, _renderCSSProp);
4065
- plugin._pt.u = endUnit || 0;
4066
- plugin._props.push(p);
4067
- }
4068
- }
4069
- _assign(endCache, startCache);
4070
- };
4071
- _forEachName("padding,margin,Width,Radius", function(name, index) {
4072
- var t = "Top", r = "Right", b = "Bottom", l = "Left", props = (index < 3 ? [t, r, b, l] : [t + l, t + r, b + r, b + l]).map(function(side) {
4073
- return index < 2 ? name + side : "border" + side + name;
4074
- });
4075
- _specialProps[index > 1 ? "border" + name : name] = function(plugin, target, property, endValue, tween) {
4076
- var a, vars;
4077
- if (arguments.length < 4) {
4078
- a = props.map(function(prop) {
4079
- return _get(plugin, prop, property);
4080
- });
4081
- vars = a.join(" ");
4082
- return vars.split(a[0]).length === 5 ? a[0] : vars;
4083
- }
4084
- a = (endValue + "").split(" ");
4085
- vars = {};
4086
- props.forEach(function(prop, i) {
4087
- return vars[prop] = a[i] = a[i] || a[(i - 1) / 2 | 0];
4088
- });
4089
- plugin.init(target, vars, tween);
4090
- };
4091
- });
4092
- var CSSPlugin = {
4093
- name: "css",
4094
- register: _initCore,
4095
- targetTest: function targetTest(target) {
4096
- return target.style && target.nodeType;
4097
- },
4098
- init: function init3(target, vars, tween, index, targets) {
4099
- var props = this._props, style = target.style, startAt = tween.vars.startAt, startValue, endValue, endNum, startNum, type, specialProp, p, startUnit, endUnit, relative, isTransformRelated, transformPropTween, cache, smooth, hasPriority, inlineProps;
4100
- _pluginInitted || _initCore();
4101
- this.styles = this.styles || _getStyleSaver(target);
4102
- inlineProps = this.styles.props;
4103
- this.tween = tween;
4104
- for (p in vars) {
4105
- if (p === "autoRound") {
4106
- continue;
4107
- }
4108
- endValue = vars[p];
4109
- if (_plugins[p] && _checkPlugin(p, vars, tween, index, target, targets)) {
4110
- continue;
4111
- }
4112
- type = typeof endValue;
4113
- specialProp = _specialProps[p];
4114
- if (type === "function") {
4115
- endValue = endValue.call(tween, index, target, targets);
4116
- type = typeof endValue;
4117
- }
4118
- if (type === "string" && ~endValue.indexOf("random(")) {
4119
- endValue = _replaceRandom(endValue);
4120
- }
4121
- if (specialProp) {
4122
- specialProp(this, target, p, endValue, tween) && (hasPriority = 1);
4123
- } else if (p.substr(0, 2) === "--") {
4124
- startValue = (getComputedStyle(target).getPropertyValue(p) + "").trim();
4125
- endValue += "";
4126
- _colorExp.lastIndex = 0;
4127
- if (!_colorExp.test(startValue)) {
4128
- startUnit = getUnit(startValue);
4129
- endUnit = getUnit(endValue);
4130
- }
4131
- endUnit ? startUnit !== endUnit && (startValue = _convertToUnit(target, p, startValue, endUnit) + endUnit) : startUnit && (endValue += startUnit);
4132
- this.add(style, "setProperty", startValue, endValue, index, targets, 0, 0, p);
4133
- props.push(p);
4134
- inlineProps.push(p, 0, style[p]);
4135
- } else if (type !== "undefined") {
4136
- if (startAt && p in startAt) {
4137
- startValue = typeof startAt[p] === "function" ? startAt[p].call(tween, index, target, targets) : startAt[p];
4138
- _isString(startValue) && ~startValue.indexOf("random(") && (startValue = _replaceRandom(startValue));
4139
- getUnit(startValue + "") || startValue === "auto" || (startValue += _config.units[p] || getUnit(_get(target, p)) || "");
4140
- (startValue + "").charAt(1) === "=" && (startValue = _get(target, p));
4141
- } else {
4142
- startValue = _get(target, p);
4143
- }
4144
- startNum = parseFloat(startValue);
4145
- relative = type === "string" && endValue.charAt(1) === "=" && endValue.substr(0, 2);
4146
- relative && (endValue = endValue.substr(2));
4147
- endNum = parseFloat(endValue);
4148
- if (p in _propertyAliases) {
4149
- if (p === "autoAlpha") {
4150
- if (startNum === 1 && _get(target, "visibility") === "hidden" && endNum) {
4151
- startNum = 0;
4152
- }
4153
- inlineProps.push("visibility", 0, style.visibility);
4154
- _addNonTweeningPT(this, style, "visibility", startNum ? "inherit" : "hidden", endNum ? "inherit" : "hidden", !endNum);
4155
- }
4156
- if (p !== "scale" && p !== "transform") {
4157
- p = _propertyAliases[p];
4158
- ~p.indexOf(",") && (p = p.split(",")[0]);
4159
- }
4160
- }
4161
- isTransformRelated = p in _transformProps;
4162
- if (isTransformRelated) {
4163
- this.styles.save(p);
4164
- if (type === "string" && endValue.substring(0, 6) === "var(--") {
4165
- endValue = _getComputedProperty(target, endValue.substring(4, endValue.indexOf(")")));
4166
- endNum = parseFloat(endValue);
4167
- }
4168
- if (!transformPropTween) {
4169
- cache = target._gsap;
4170
- cache.renderTransform && !vars.parseTransform || _parseTransform(target, vars.parseTransform);
4171
- smooth = vars.smoothOrigin !== false && cache.smooth;
4172
- transformPropTween = this._pt = new PropTween(this._pt, style, _transformProp, 0, 1, cache.renderTransform, cache, 0, -1);
4173
- transformPropTween.dep = 1;
4174
- }
4175
- if (p === "scale") {
4176
- this._pt = new PropTween(this._pt, cache, "scaleY", cache.scaleY, (relative ? _parseRelative(cache.scaleY, relative + endNum) : endNum) - cache.scaleY || 0, _renderCSSProp);
4177
- this._pt.u = 0;
4178
- props.push("scaleY", p);
4179
- p += "X";
4180
- } else if (p === "transformOrigin") {
4181
- inlineProps.push(_transformOriginProp, 0, style[_transformOriginProp]);
4182
- endValue = _convertKeywordsToPercentages(endValue);
4183
- if (cache.svg) {
4184
- _applySVGOrigin(target, endValue, 0, smooth, 0, this);
4185
- } else {
4186
- endUnit = parseFloat(endValue.split(" ")[2]) || 0;
4187
- endUnit !== cache.zOrigin && _addNonTweeningPT(this, cache, "zOrigin", cache.zOrigin, endUnit);
4188
- _addNonTweeningPT(this, style, p, _firstTwoOnly(startValue), _firstTwoOnly(endValue));
4189
- }
4190
- continue;
4191
- } else if (p === "svgOrigin") {
4192
- _applySVGOrigin(target, endValue, 1, smooth, 0, this);
4193
- continue;
4194
- } else if (p in _rotationalProperties) {
4195
- _addRotationalPropTween(this, cache, p, startNum, relative ? _parseRelative(startNum, relative + endValue) : endValue);
4196
- continue;
4197
- } else if (p === "smoothOrigin") {
4198
- _addNonTweeningPT(this, cache, "smooth", cache.smooth, endValue);
4199
- continue;
4200
- } else if (p === "force3D") {
4201
- cache[p] = endValue;
4202
- continue;
4203
- } else if (p === "transform") {
4204
- _addRawTransformPTs(this, endValue, target);
4205
- continue;
4206
- }
4207
- } else if (!(p in style)) {
4208
- p = _checkPropPrefix(p) || p;
4209
- }
4210
- if (isTransformRelated || (endNum || endNum === 0) && (startNum || startNum === 0) && !_complexExp.test(endValue) && p in style) {
4211
- startUnit = (startValue + "").substr((startNum + "").length);
4212
- endNum || (endNum = 0);
4213
- endUnit = getUnit(endValue) || (p in _config.units ? _config.units[p] : startUnit);
4214
- startUnit !== endUnit && (startNum = _convertToUnit(target, p, startValue, endUnit));
4215
- this._pt = new PropTween(this._pt, isTransformRelated ? cache : style, p, startNum, (relative ? _parseRelative(startNum, relative + endNum) : endNum) - startNum, !isTransformRelated && (endUnit === "px" || p === "zIndex") && vars.autoRound !== false ? _renderRoundedCSSProp : _renderCSSProp);
4216
- this._pt.u = endUnit || 0;
4217
- if (startUnit !== endUnit && endUnit !== "%") {
4218
- this._pt.b = startValue;
4219
- this._pt.r = _renderCSSPropWithBeginning;
4220
- }
4221
- } else if (!(p in style)) {
4222
- if (p in target) {
4223
- this.add(target, p, startValue || target[p], relative ? relative + endValue : endValue, index, targets);
4224
- } else if (p !== "parseTransform") {
4225
- _missingPlugin(p, endValue);
4226
- continue;
4227
- }
4228
- } else {
4229
- _tweenComplexCSSString.call(this, target, p, startValue, relative ? relative + endValue : endValue);
4230
- }
4231
- isTransformRelated || (p in style ? inlineProps.push(p, 0, style[p]) : typeof target[p] === "function" ? inlineProps.push(p, 2, target[p]()) : inlineProps.push(p, 1, startValue || target[p]));
4232
- props.push(p);
4233
- }
4234
- }
4235
- hasPriority && _sortPropTweensByPriority(this);
4236
- },
4237
- render: function render2(ratio, data) {
4238
- if (data.tween._time || !_reverting2()) {
4239
- var pt = data._pt;
4240
- while (pt) {
4241
- pt.r(ratio, pt.d);
4242
- pt = pt._next;
4243
- }
4244
- } else {
4245
- data.styles.revert();
4246
- }
4247
- },
4248
- get: _get,
4249
- aliases: _propertyAliases,
4250
- getSetter: function getSetter(target, property, plugin) {
4251
- var p = _propertyAliases[property];
4252
- p && p.indexOf(",") < 0 && (property = p);
4253
- return property in _transformProps && property !== _transformOriginProp && (target._gsap.x || _get(target, "x")) ? plugin && _recentSetterPlugin === plugin ? property === "scale" ? _setterScale : _setterTransform : (_recentSetterPlugin = plugin || {}) && (property === "scale" ? _setterScaleWithRender : _setterTransformWithRender) : target.style && !_isUndefined(target.style[property]) ? _setterCSSStyle : ~property.indexOf("-") ? _setterCSSProp : _getSetter(target, property);
4254
- },
4255
- core: {
4256
- _removeProperty,
4257
- _getMatrix
4258
- }
4259
- };
4260
- gsap.utils.checkPrefix = _checkPropPrefix;
4261
- gsap.core.getStyleSaver = _getStyleSaver;
4262
- (function(positionAndScale, rotation, others, aliases) {
4263
- var all = _forEachName(positionAndScale + "," + rotation + "," + others, function(name) {
4264
- _transformProps[name] = 1;
4265
- });
4266
- _forEachName(rotation, function(name) {
4267
- _config.units[name] = "deg";
4268
- _rotationalProperties[name] = 1;
4269
- });
4270
- _propertyAliases[all[13]] = positionAndScale + "," + rotation;
4271
- _forEachName(aliases, function(name) {
4272
- var split = name.split(":");
4273
- _propertyAliases[split[1]] = all[split[0]];
4274
- });
4275
- })("x,y,z,scale,scaleX,scaleY,xPercent,yPercent", "rotation,rotationX,rotationY,skewX,skewY", "transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective", "0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");
4276
- _forEachName("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective", function(name) {
4277
- _config.units[name] = "px";
4278
- });
4279
- gsap.registerPlugin(CSSPlugin);
4280
-
4281
- // node_modules/.pnpm/gsap@3.13.0/node_modules/gsap/index.js
4282
- var gsapWithCSS = gsap.registerPlugin(CSSPlugin) || gsap;
4283
- var TweenMaxWithCSS = gsapWithCSS.core.Tween;
4284
-
4285
- // src/navigation/desktop/index.ts
4286
- var isDropdownOpen = false;
4287
- var currentAnimationTimeline = null;
4288
- var navigationMode = "light";
4289
- var dropdownDimensions = [
4290
- {
4291
- name: "solutions",
4292
- width: 1026,
4293
- height: 668,
4294
- isCurrent: false
4295
- },
4296
- {
4297
- name: "resources",
4298
- width: 546,
4299
- height: 354,
4300
- isCurrent: false
4301
- },
4302
- {
4303
- name: "company",
4304
- width: 436,
4305
- height: 354,
4306
- isCurrent: false
4307
- }
4308
- ];
4309
- var getElements = () => ({
4310
- dropdownOverlay: document.querySelector('[data-nav-element="overlay"]'),
4311
- navItems: document.querySelectorAll('[data-nav-item="link"]'),
4312
- navItemsWrapper: document.querySelectorAll('[data-nav-animation="links"]'),
4313
- dropdownMover: document.querySelector('[data-nav-item="dropdown-mover"]'),
4314
- dropdownItems: document.querySelector('[data-nav-item="dropdown-mover"]'),
4315
- tabLinks: document.querySelectorAll("[data-tab-link]"),
4316
- tabContents: document.querySelectorAll("[data-tab-content]"),
4317
- navigationModeElement: document.querySelector("[navigation-mode]"),
4318
- navElements: document.querySelectorAll("[style-navigation]"),
4319
- mover: document.querySelector('[data-nav-element="mover"]'),
4320
- overlay: document.querySelector('[data-nav-element="overlay"]'),
4321
- wrapper: document.querySelector('[data-nav-element="wrapper"]'),
4322
- dropdownContents: document.querySelectorAll("[data-desktop-content]"),
4323
- navlinks: document.querySelectorAll("[data-desktop-navlink]")
4324
- });
4325
- document.addEventListener("DOMContentLoaded", () => {
4326
- if (window.innerWidth > 991) {
4327
- const elements = getElements();
4328
- initNavigationMode();
4329
- initTabs(elements.tabLinks, elements.tabContents);
4330
- updateDropdownState(elements.navItemsWrapper);
4331
- initNavlinksHover(elements.navItems);
4332
- }
4333
- });
4334
- function initNavigationMode() {
4335
- const elements = getElements();
4336
- const modeAttribute = elements.navigationModeElement?.getAttribute("navigation-mode");
4337
- navigationMode = modeAttribute || "light";
4338
- if (navigationMode === "light") {
4339
- } else if (navigationMode === "dark") {
4340
- styleDarkMode();
4341
- } else {
4342
- }
4343
- }
4344
- function styleDarkMode() {
4345
- const elements = getElements();
4346
- elements.navElements.forEach((element) => {
4347
- const styleValue = element.getAttribute("style-navigation");
4348
- switch (styleValue) {
4349
- case "navbg":
4350
- element.style.backgroundColor = "black";
4351
- break;
4352
- case "navlogo":
4353
- element.style.color = "white";
4354
- break;
4355
- case "navlink":
4356
- element.style.color = "white";
4357
- break;
4358
- case "button-primary":
4359
- element.style.backgroundColor = "white";
4360
- element.style.color = "black";
4361
- break;
4362
- case "button-secondary":
4363
- element.style.color = "white";
4364
- break;
4365
- }
4366
- });
4367
- }
4368
- function styleLightMode() {
4369
- const elements = getElements();
4370
- elements.navElements.forEach((element) => {
4371
- const styleValue = element.getAttribute("style-navigation");
4372
- switch (styleValue) {
4373
- case "navbg":
4374
- element.style.backgroundColor = "white";
4375
- break;
4376
- case "navlogo":
4377
- element.style.color = "black";
4378
- break;
4379
- case "navlink":
4380
- element.style.color = "black";
4381
- break;
4382
- case "button-primary":
4383
- element.style.backgroundColor = "black";
4384
- element.style.color = "white";
4385
- break;
4386
- case "button-secondary":
4387
- element.style.color = "black";
4388
- break;
4389
- }
4390
- });
4391
- }
4392
- function initTabs(tabLinks, tabContents) {
4393
- if (tabLinks.length > 0) {
4394
- const initialValue = tabLinks[0].getAttribute("data-tab-link");
4395
- tabLinks[0].setAttribute("data-tab-link-active", "true");
4396
- tabContents.forEach((content) => {
4397
- content.setAttribute(
4398
- "data-tab-content-active",
4399
- content.getAttribute("data-tab-content") === initialValue ? "true" : "false"
4400
- );
4401
- });
4402
- tabLinks.forEach((tab) => {
4403
- tab.addEventListener("mouseover", function() {
4404
- const activeValue = this.getAttribute("data-tab-link");
4405
- tabLinks.forEach(
4406
- (t) => t.setAttribute("data-tab-link-active", "false")
4407
- );
4408
- this.setAttribute("data-tab-link-active", "true");
4409
- tabContents.forEach((content) => {
4410
- content.setAttribute(
4411
- "data-tab-content-active",
4412
- content.getAttribute("data-tab-content") === activeValue ? "true" : "false"
4413
- );
4414
- });
4415
- });
4416
- });
4417
- }
4418
- }
4419
- function updateDropdownState(navItemsWrapper) {
4420
- navItemsWrapper.forEach((element) => {
4421
- element.addEventListener("mouseleave", () => {
4422
- isDropdownOpen = false;
4423
- if (navigationMode === "dark") {
4424
- styleDarkMode();
4425
- } else {
4426
- styleLightMode();
4427
- }
4428
- closeDropdownWrapper();
4429
- });
4430
- });
4431
- }
4432
- function initNavlinksHover(navLinks) {
4433
- navLinks.forEach((link) => {
4434
- link.addEventListener("mouseenter", function() {
4435
- const index = parseInt(this.getAttribute("data-nav-link") || "0", 10);
4436
- if (!isDropdownOpen) {
4437
- triggerDropdownOpen(this, index);
4438
- isDropdownOpen = true;
4439
- styleLightMode();
4440
- } else {
4441
- triggerDropdownOpen(this, index);
4442
- }
4443
- });
4444
- });
4445
- }
4446
- function triggerDropdownOpen(currentLink, index) {
4447
- if (currentAnimationTimeline) {
4448
- currentAnimationTimeline.kill();
4449
- }
4450
- if (!isDropdownOpen) {
4451
- updateNavHover(index);
4452
- initDropdownContent(index);
4453
- initMover(currentLink, index);
4454
- openDropdownWrapper(index);
4455
- } else {
4456
- updateNavHover(index);
4457
- updateDropdownContent(index);
4458
- animateMover(currentLink, index);
4459
- }
4460
- }
4461
- function openDropdownWrapper(index) {
4462
- const elements = getElements();
4463
- const calculatedHeight = dropdownDimensions[index].height;
4464
- elements.wrapper.style.display = "block";
4465
- elements.overlay.style.display = "block";
4466
- gsapWithCSS.killTweensOf([elements.mover, elements.overlay]);
4467
- currentAnimationTimeline = gsapWithCSS.timeline();
4468
- currentAnimationTimeline.to(elements.overlay, {
4469
- opacity: 0,
4470
- duration: 0.3,
4471
- ease: "power2.out"
4472
- });
4473
- currentAnimationTimeline.to(
4474
- elements.mover,
4475
- {
4476
- height: `${calculatedHeight}px`,
4477
- duration: 0.4,
4478
- ease: "power2.out"
4479
- },
4480
- "-=0.2"
4481
- );
4482
- }
4483
- function closeDropdownWrapper() {
4484
- const elements = getElements();
4485
- if (currentAnimationTimeline) {
4486
- currentAnimationTimeline.kill();
4487
- }
4488
- currentAnimationTimeline = gsapWithCSS.timeline();
4489
- currentAnimationTimeline.to(elements.mover, {
4490
- height: 0,
4491
- duration: 0.3,
4492
- ease: "power2.in"
4493
- });
4494
- currentAnimationTimeline.to(
4495
- elements.overlay,
4496
- {
4497
- opacity: 0,
4498
- duration: 0.3,
4499
- ease: "power2.out"
4500
- },
4501
- "-=0.1"
4502
- );
4503
- currentAnimationTimeline.to(
4504
- elements.navlinks,
4505
- {
4506
- opacity: 1,
4507
- duration: 0.2
4508
- },
4509
- "-=0.2"
4510
- );
4511
- currentAnimationTimeline.call(() => {
4512
- elements.wrapper.style.display = "none";
4513
- elements.overlay.style.display = "none";
4514
- elements.dropdownContents.forEach((content) => {
4515
- content.style.display = "none";
4516
- content.style.opacity = "0";
4517
- });
4518
- });
4519
- }
4520
- function animateMover(currentLink, index) {
4521
- const elements = getElements();
4522
- const calculatedHeight = dropdownDimensions[index].height;
4523
- const calculatedWidth = dropdownDimensions[index].width;
4524
- const itemRect = currentLink.getBoundingClientRect();
4525
- const navRect = currentLink.parentElement.getBoundingClientRect();
4526
- const offsetX = itemRect.left - navRect.left;
4527
- gsapWithCSS.killTweensOf(elements.mover);
4528
- currentAnimationTimeline = gsapWithCSS.timeline();
4529
- currentAnimationTimeline.to(elements.mover, {
4530
- x: offsetX,
4531
- width: `${calculatedWidth}px`,
4532
- height: `${calculatedHeight}px`,
4533
- duration: 0.2,
4534
- ease: "power2.out"
4535
- });
4536
- }
4537
- function initMover(currentLink, index) {
4538
- const elements = getElements();
4539
- const calculatedHeight = dropdownDimensions[index].height;
4540
- const calculatedWidth = dropdownDimensions[index].width;
4541
- const itemRect = currentLink.getBoundingClientRect();
4542
- const navRect = currentLink.parentElement.getBoundingClientRect();
4543
- const offsetX = itemRect.left - navRect.left;
4544
- gsapWithCSS.set(elements.mover, {
4545
- x: offsetX,
4546
- height: "0px",
4547
- width: `${calculatedWidth}px`
4548
- });
4549
- }
4550
- function updateDropdownContent(currentIndex) {
4551
- const elements = getElements();
4552
- gsapWithCSS.killTweensOf(elements.dropdownContents);
4553
- const contentTimeline = gsapWithCSS.timeline();
4554
- contentTimeline.to(elements.dropdownContents, {
4555
- opacity: 0,
4556
- duration: 0.15,
4557
- onComplete: () => {
4558
- elements.dropdownContents.forEach((content) => {
4559
- content.style.display = "none";
4560
- });
4561
- const currentContent = elements.dropdownContents[currentIndex];
4562
- if (currentContent) {
4563
- if (currentIndex === 0 || currentIndex === 1 || currentIndex === 2) {
4564
- currentContent.style.display = "grid";
4565
- } else {
4566
- currentContent.style.display = "block";
4567
- }
4568
- gsapWithCSS.to(currentContent, { opacity: 1, duration: 0.15 });
4569
- }
4570
- }
4571
- });
4572
- }
4573
- function initDropdownContent(currentIndex) {
4574
- const elements = getElements();
4575
- elements.dropdownContents.forEach((content) => {
4576
- content.style.opacity = "0";
4577
- content.style.display = "none";
4578
- });
4579
- const currentContent = elements.dropdownContents[currentIndex];
4580
- if (currentContent) {
4581
- if (currentIndex === 0 || currentIndex === 1 || currentIndex === 2) {
4582
- currentContent.style.display = "grid";
4583
- } else {
4584
- currentContent.style.display = "block";
4585
- }
4586
- gsapWithCSS.to(currentContent, { opacity: 1, duration: 0.2, delay: 0.1 });
4587
- }
4588
- }
4589
- function updateNavHover(currentIndex) {
4590
- const elements = getElements();
4591
- const currentContent = elements.navlinks[currentIndex];
4592
- gsapWithCSS.killTweensOf(elements.navlinks);
4593
- gsapWithCSS.to(elements.navlinks, {
4594
- opacity: 0.5,
4595
- duration: 0.15
4596
- });
4597
- gsapWithCSS.to(currentContent, {
4598
- opacity: 1,
4599
- duration: 0.15
4600
- });
4601
- }
4602
- })();
1
+ "use strict";(()=>{function vt(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}function Bi(o,t){o.prototype=Object.create(t.prototype),o.prototype.constructor=o,o.__proto__=t}var it={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},Wt={duration:.5,overwrite:!1,delay:0},ii,W,R,lt=1e8,C=1/lt,Xe=Math.PI*2,qr=Xe/4,Yr=0,Vi=Math.sqrt,Xr=Math.cos,Wr=Math.sin,H=function(t){return typeof t=="string"},F=function(t){return typeof t=="function"},xt=function(t){return typeof t=="number"},Pe=function(t){return typeof t>"u"},mt=function(t){return typeof t=="object"},et=function(t){return t!==!1},ri=function(){return typeof window<"u"},ve=function(t){return F(t)||H(t)},Hi=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},Q=Array.isArray,We=/(?:-?\.?\d|\.)+/gi,ni=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,Nt=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,Ie=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,si=/[+-]=-?[.\d]+/,Ui=/[^,'"\[\]\s]+/gi,Gr=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,L,dt,Ge,ai,at={},we={},qi,Yi=function(t){return(we=Gt(t,at))&&$},Ce=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},le=function(t,e){return!e&&console.warn(t)},Xi=function(t,e){return t&&(at[t]=e)&&we&&(we[t]=e)||at},fe=function(){return 0},Qr={suppressEvents:!0,isStart:!0,kill:!1},Te={suppressEvents:!0,kill:!1},$r={suppressEvents:!0},oi={},St=[],Qe={},Wi,J={},Be={},Ai=30,xe=[],ui="",li=function(t){var e=t[0],i,r;if(mt(e)||F(e)||(t=[t]),!(i=(e._gsap||{}).harness)){for(r=xe.length;r--&&!xe[r].targetTest(e););i=xe[r]}for(r=t.length;r--;)t[r]&&(t[r]._gsap||(t[r]._gsap=new ci(t[r],i)))||t.splice(r,1);return t},Mt=function(t){return t._gsap||li(ft(t))[0]._gsap},fi=function(t,e,i){return(i=t[e])&&F(i)?t[e]():Pe(i)&&t.getAttribute&&t.getAttribute(e)||i},K=function(t,e){return(t=t.split(",")).forEach(e)||t},N=function(t){return Math.round(t*1e5)/1e5||0},V=function(t){return Math.round(t*1e7)/1e7||0},It=function(t,e){var i=e.charAt(0),r=parseFloat(e.substr(2));return t=parseFloat(t),i==="+"?t+r:i==="-"?t-r:i==="*"?t*r:t/r},Kr=function(t,e){for(var i=e.length,r=0;t.indexOf(e[r])<0&&++r<i;);return r<i},ke=function(){var t=St.length,e=St.slice(0),i,r;for(Qe={},St.length=0,i=0;i<t;i++)r=e[i],r&&r._lazy&&(r.render(r._lazy[0],r._lazy[1],!0)._lazy=0)},hi=function(t){return!!(t._initted||t._startAt||t.add)},Gi=function(t,e,i,r){St.length&&!W&&ke(),t.render(e,i,r||!!(W&&e<0&&hi(t))),St.length&&!W&&ke()},Qi=function(t){var e=parseFloat(t);return(e||e===0)&&(t+"").match(Ui).length<2?e:H(t)?t.trim():t},$i=function(t){return t},ot=function(t,e){for(var i in e)i in t||(t[i]=e[i]);return t},Zr=function(t){return function(e,i){for(var r in i)r in e||r==="duration"&&t||r==="ease"||(e[r]=i[r])}},Gt=function(t,e){for(var i in e)t[i]=e[i];return t},Ri=function o(t,e){for(var i in e)i!=="__proto__"&&i!=="constructor"&&i!=="prototype"&&(t[i]=mt(e[i])?o(t[i]||(t[i]={}),e[i]):e[i]);return t},Se=function(t,e){var i={},r;for(r in t)r in e||(i[r]=t[r]);return i},ae=function(t){var e=t.parent||L,i=t.keyframes?Zr(Q(t.keyframes)):ot;if(et(t.inherit))for(;e;)i(t,e.vars.defaults),e=e.parent||e._dp;return t},jr=function(t,e){for(var i=t.length,r=i===e.length;r&&i--&&t[i]===e[i];);return i<0},Ki=function(t,e,i,r,n){i===void 0&&(i="_first"),r===void 0&&(r="_last");var s=t[r],a;if(n)for(a=e[n];s&&s[n]>a;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[i],t[i]=e),e._next?e._next._prev=e:t[r]=e,e._prev=s,e.parent=e._dp=t,e},Ee=function(t,e,i,r){i===void 0&&(i="_first"),r===void 0&&(r="_last");var n=e._prev,s=e._next;n?n._next=s:t[i]===e&&(t[i]=s),s?s._prev=n:t[r]===e&&(t[r]=n),e._next=e._prev=e.parent=null},Ot=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Lt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var i=t;i;)i._dirty=1,i=i.parent;return t},Jr=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},$e=function(t,e,i,r){return t._startAt&&(W?t._startAt.revert(Te):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,r))},tn=function o(t){return!t||t._ts&&o(t.parent)},Li=function(t){return t._repeat?Qt(t._tTime,t=t.duration()+t._rDelay)*t:0},Qt=function(t,e){var i=Math.floor(t=V(t/e));return t&&i===t?i-1:i},Me=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},De=function(t){return t._end=V(t._start+(t._tDur/Math.abs(t._ts||t._rts||C)||0))},Ae=function(t,e){var i=t._dp;return i&&i.smoothChildTiming&&t._ts&&(t._start=V(i._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),De(t),i._dirty||Lt(i,t)),t},Zi=function(t,e){var i;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(i=Me(t.rawTime(),e),(!e._dur||ce(0,e.totalDuration(),i)-e._tTime>C)&&e.render(i,!0)),Lt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(i=t;i._dp;)i.rawTime()>=0&&i.totalTime(i._tTime),i=i._dp;t._zTime=-C}},pt=function(t,e,i,r){return e.parent&&Ot(e),e._start=V((xt(i)?i:i||t!==L?ut(t,i,e):t._time)+e._delay),e._end=V(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Ki(t,e,"_first","_last",t._sort?"_start":0),Ke(e)||(t._recent=e),r||Zi(t,e),t._ts<0&&Ae(t,t._tTime),t},ji=function(t,e){return(at.ScrollTrigger||Ce("scrollTrigger",e))&&at.ScrollTrigger.create(e,t)},Ji=function(t,e,i,r,n){if(mi(t,e,n),!t._initted)return 1;if(!i&&t._pt&&!W&&(t._dur&&t.vars.lazy!==!1||!t._dur&&t.vars.lazy)&&Wi!==tt.frame)return St.push(t),t._lazy=[n,r],1},en=function o(t){var e=t.parent;return e&&e._ts&&e._initted&&!e._lock&&(e.rawTime()<0||o(e))},Ke=function(t){var e=t.data;return e==="isFromStart"||e==="isStart"},rn=function(t,e,i,r){var n=t.ratio,s=e<0||!e&&(!t._start&&en(t)&&!(!t._initted&&Ke(t))||(t._ts<0||t._dp._ts<0)&&!Ke(t))?0:1,a=t._rDelay,u=0,l,f,_;if(a&&t._repeat&&(u=ce(0,t._tDur,e),f=Qt(u,a),t._yoyo&&f&1&&(s=1-s),f!==Qt(t._tTime,a)&&(n=1-s,t.vars.repeatRefresh&&t._initted&&t.invalidate())),s!==n||W||r||t._zTime===C||!e&&t._zTime){if(!t._initted&&Ji(t,e,r,i,u))return;for(_=t._zTime,t._zTime=e||(i?C:0),i||(i=e&&!_),t.ratio=s,t._from&&(s=1-s),t._time=0,t._tTime=u,l=t._pt;l;)l.r(s,l.d),l=l._next;e<0&&$e(t,e,i,!0),t._onUpdate&&!i&&st(t,"onUpdate"),u&&t._repeat&&!i&&t.parent&&st(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===s&&(s&&Ot(t,1),!i&&!W&&(st(t,s?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)},nn=function(t,e,i){var r;if(i>e)for(r=t._first;r&&r._start<=i;){if(r.data==="isPause"&&r._start>e)return r;r=r._next}else for(r=t._last;r&&r._start>=i;){if(r.data==="isPause"&&r._start<e)return r;r=r._prev}},$t=function(t,e,i,r){var n=t._repeat,s=V(e)||0,a=t._tTime/t._tDur;return a&&!r&&(t._time*=s/t._dur),t._dur=s,t._tDur=n?n<0?1e10:V(s*(n+1)+t._rDelay*n):s,a>0&&!r&&Ae(t,t._tTime=t._tDur*a),t.parent&&De(t),i||Lt(t.parent,t),t},zi=function(t){return t instanceof X?Lt(t):$t(t,t._dur)},sn={_start:0,endTime:fe,totalDuration:fe},ut=function o(t,e,i){var r=t.labels,n=t._recent||sn,s=t.duration()>=lt?n.endTime(!1):t._dur,a,u,l;return H(e)&&(isNaN(e)||e in r)?(u=e.charAt(0),l=e.substr(-1)==="%",a=e.indexOf("="),u==="<"||u===">"?(a>=0&&(e=e.replace(/=/,"")),(u==="<"?n._start:n.endTime(n._repeat>=0))+(parseFloat(e.substr(1))||0)*(l?(a<0?n:i).totalDuration()/100:1)):a<0?(e in r||(r[e]=s),r[e]):(u=parseFloat(e.charAt(a-1)+e.substr(a+1)),l&&i&&(u=u/100*(Q(i)?i[0]:i).totalDuration()),a>1?o(t,e.substr(0,a-1),i)+u:s+u)):e==null?s:+e},oe=function(t,e,i){var r=xt(e[1]),n=(r?2:1)+(t<2?0:1),s=e[n],a,u;if(r&&(s.duration=e[1]),s.parent=i,t){for(a=s,u=i;u&&!("immediateRender"in a);)a=u.vars.defaults||{},u=et(u.vars.inherit)&&u.parent;s.immediateRender=et(a.immediateRender),t<2?s.runBackwards=1:s.startAt=e[n-1]}return new I(e[0],s,e[n+1])},Pt=function(t,e){return t||t===0?e(t):e},ce=function(t,e,i){return i<t?t:i>e?e:i},G=function(t,e){return!H(t)||!(e=Gr.exec(t))?"":e[1]},an=function(t,e,i){return Pt(i,function(r){return ce(t,e,r)})},Ze=[].slice,tr=function(t,e){return t&&mt(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&mt(t[0]))&&!t.nodeType&&t!==dt},on=function(t,e,i){return i===void 0&&(i=[]),t.forEach(function(r){var n;return H(r)&&!e||tr(r,1)?(n=i).push.apply(n,ft(r)):i.push(r)})||i},ft=function(t,e,i){return R&&!e&&R.selector?R.selector(t):H(t)&&!i&&(Ge||!Kt())?Ze.call((e||ai).querySelectorAll(t),0):Q(t)?on(t,i):tr(t)?Ze.call(t,0):t?[t]:[]},je=function(t){return t=ft(t)[0]||le("Invalid scope")||{},function(e){var i=t.current||t.nativeElement||t;return ft(e,i.querySelectorAll?i:i===t?le("Invalid scope")||ai.createElement("div"):t)}},er=function(t){return t.sort(function(){return .5-Math.random()})},ir=function(t){if(F(t))return t;var e=mt(t)?t:{each:t},i=zt(e.ease),r=e.from||0,n=parseFloat(e.base)||0,s={},a=r>0&&r<1,u=isNaN(r)||a,l=e.axis,f=r,_=r;return H(r)?f=_={center:.5,edges:.5,end:1}[r]||0:!a&&u&&(f=r[0],_=r[1]),function(c,d,p){var h=(p||e).length,m=s[h],y,v,T,x,g,w,k,S,b;if(!m){if(b=e.grid==="auto"?0:(e.grid||[1,lt])[1],!b){for(k=-lt;k<(k=p[b++].getBoundingClientRect().left)&&b<h;);b<h&&b--}for(m=s[h]=[],y=u?Math.min(b,h)*f-.5:r%b,v=b===lt?0:u?h*_/b-.5:r/b|0,k=0,S=lt,w=0;w<h;w++)T=w%b-y,x=v-(w/b|0),m[w]=g=l?Math.abs(l==="y"?x:T):Vi(T*T+x*x),g>k&&(k=g),g<S&&(S=g);r==="random"&&er(m),m.max=k-S,m.min=S,m.v=h=(parseFloat(e.amount)||parseFloat(e.each)*(b>h?h-1:l?l==="y"?h/b:b:Math.max(b,h/b))||0)*(r==="edges"?-1:1),m.b=h<0?n-h:n,m.u=G(e.amount||e.each)||0,i=i&&h<0?hr(i):i}return h=(m[c]-m.min)/m.max||0,V(m.b+(i?i(h):h)*m.v)+m.u}},Je=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(i){var r=V(Math.round(parseFloat(i)/t)*t*e);return(r-r%1)/e+(xt(i)?0:G(i))}},rr=function(t,e){var i=Q(t),r,n;return!i&&mt(t)&&(r=i=t.radius||lt,t.values?(t=ft(t.values),(n=!xt(t[0]))&&(r*=r)):t=Je(t.increment)),Pt(e,i?F(t)?function(s){return n=t(s),Math.abs(n-s)<=r?n:s}:function(s){for(var a=parseFloat(n?s.x:s),u=parseFloat(n?s.y:0),l=lt,f=0,_=t.length,c,d;_--;)n?(c=t[_].x-a,d=t[_].y-u,c=c*c+d*d):c=Math.abs(t[_]-a),c<l&&(l=c,f=_);return f=!r||l<=r?t[f]:s,n||f===s||xt(s)?f:f+G(s)}:Je(t))},nr=function(t,e,i,r){return Pt(Q(t)?!e:i===!0?!!(i=0):!r,function(){return Q(t)?t[~~(Math.random()*t.length)]:(i=i||1e-5)&&(r=i<1?Math.pow(10,(i+"").length-2):1)&&Math.floor(Math.round((t-i/2+Math.random()*(e-t+i*.99))/i)*i*r)/r})},un=function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return function(r){return e.reduce(function(n,s){return s(n)},r)}},ln=function(t,e){return function(i){return t(parseFloat(i))+(e||G(i))}},fn=function(t,e,i){return ar(t,e,0,1,i)},sr=function(t,e,i){return Pt(i,function(r){return t[~~e(r)]})},hn=function o(t,e,i){var r=e-t;return Q(t)?sr(t,o(0,t.length),e):Pt(i,function(n){return(r+(n-t)%r)%r+t})},_n=function o(t,e,i){var r=e-t,n=r*2;return Q(t)?sr(t,o(0,t.length-1),e):Pt(i,function(s){return s=(n+(s-t)%n)%n||0,t+(s>r?n-s:s)})},Zt=function(t){for(var e=0,i="",r,n,s,a;~(r=t.indexOf("random(",e));)s=t.indexOf(")",r),a=t.charAt(r+7)==="[",n=t.substr(r+7,s-r-7).match(a?Ui:We),i+=t.substr(e,r-e)+nr(a?n:+n[0],a?0:+n[1],+n[2]||1e-5),e=s+1;return i+t.substr(e,t.length-e)},ar=function(t,e,i,r,n){var s=e-t,a=r-i;return Pt(n,function(u){return i+((u-t)/s*a||0)})},cn=function o(t,e,i,r){var n=isNaN(t+e)?0:function(d){return(1-d)*t+d*e};if(!n){var s=H(t),a={},u,l,f,_,c;if(i===!0&&(r=1)&&(i=null),s)t={p:t},e={p:e};else if(Q(t)&&!Q(e)){for(f=[],_=t.length,c=_-2,l=1;l<_;l++)f.push(o(t[l-1],t[l]));_--,n=function(p){p*=_;var h=Math.min(c,~~p);return f[h](p-h)},i=e}else r||(t=Gt(Q(t)?[]:{},t));if(!f){for(u in e)di.call(a,t,u,"get",e[u]);n=function(p){return vi(p,a)||(s?t.p:t)}}}return Pt(i,n)},Fi=function(t,e,i){var r=t.labels,n=lt,s,a,u;for(s in r)a=r[s]-e,a<0==!!i&&a&&n>(a=Math.abs(a))&&(u=s,n=a);return u},st=function(t,e,i){var r=t.vars,n=r[e],s=R,a=t._ctx,u,l,f;if(n)return u=r[e+"Params"],l=r.callbackScope||t,i&&St.length&&ke(),a&&(R=a),f=u?n.apply(l,u):n.call(l),R=s,f},ne=function(t){return Ot(t),t.scrollTrigger&&t.scrollTrigger.kill(!!W),t.progress()<1&&st(t,"onInterrupt"),t},Xt,or=[],ur=function(t){if(t)if(t=!t.name&&t.default||t,ri()||t.headless){var e=t.name,i=F(t),r=e&&!i&&t.init?function(){this._props=[]}:t,n={init:fe,render:vi,add:di,kill:Cn,modifier:Pn,rawVars:0},s={targetTest:0,get:0,getSetter:Re,aliases:{},register:0};if(Kt(),t!==r){if(J[e])return;ot(r,ot(Se(t,n),s)),Gt(r.prototype,Gt(n,Se(t,s))),J[r.prop=e]=r,t.targetTest&&(xe.push(r),oi[e]=1),e=(e==="css"?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}Xi(e,r),t.register&&t.register($,r,Z)}else or.push(t)},P=255,se={aqua:[0,P,P],lime:[0,P,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,P],navy:[0,0,128],white:[P,P,P],olive:[128,128,0],yellow:[P,P,0],orange:[P,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[P,0,0],pink:[P,192,203],cyan:[0,P,P],transparent:[P,P,P,0]},Ve=function(t,e,i){return t+=t<0?1:t>1?-1:0,(t*6<1?e+(i-e)*t*6:t<.5?i:t*3<2?e+(i-e)*(2/3-t)*6:e)*P+.5|0},lr=function(t,e,i){var r=t?xt(t)?[t>>16,t>>8&P,t&P]:0:se.black,n,s,a,u,l,f,_,c,d,p;if(!r){if(t.substr(-1)===","&&(t=t.substr(0,t.length-1)),se[t])r=se[t];else if(t.charAt(0)==="#"){if(t.length<6&&(n=t.charAt(1),s=t.charAt(2),a=t.charAt(3),t="#"+n+n+s+s+a+a+(t.length===5?t.charAt(4)+t.charAt(4):"")),t.length===9)return r=parseInt(t.substr(1,6),16),[r>>16,r>>8&P,r&P,parseInt(t.substr(7),16)/255];t=parseInt(t.substr(1),16),r=[t>>16,t>>8&P,t&P]}else if(t.substr(0,3)==="hsl"){if(r=p=t.match(We),!e)u=+r[0]%360/360,l=+r[1]/100,f=+r[2]/100,s=f<=.5?f*(l+1):f+l-f*l,n=f*2-s,r.length>3&&(r[3]*=1),r[0]=Ve(u+1/3,n,s),r[1]=Ve(u,n,s),r[2]=Ve(u-1/3,n,s);else if(~t.indexOf("="))return r=t.match(ni),i&&r.length<4&&(r[3]=1),r}else r=t.match(We)||se.transparent;r=r.map(Number)}return e&&!p&&(n=r[0]/P,s=r[1]/P,a=r[2]/P,_=Math.max(n,s,a),c=Math.min(n,s,a),f=(_+c)/2,_===c?u=l=0:(d=_-c,l=f>.5?d/(2-_-c):d/(_+c),u=_===n?(s-a)/d+(s<a?6:0):_===s?(a-n)/d+2:(n-s)/d+4,u*=60),r[0]=~~(u+.5),r[1]=~~(l*100+.5),r[2]=~~(f*100+.5)),i&&r.length<4&&(r[3]=1),r},fr=function(t){var e=[],i=[],r=-1;return t.split(Tt).forEach(function(n){var s=n.match(Nt)||[];e.push.apply(e,s),i.push(r+=s.length+1)}),e.c=i,e},Ni=function(t,e,i){var r="",n=(t+r).match(Tt),s=e?"hsla(":"rgba(",a=0,u,l,f,_;if(!n)return t;if(n=n.map(function(c){return(c=lr(c,e,1))&&s+(e?c[0]+","+c[1]+"%,"+c[2]+"%,"+c[3]:c.join(","))+")"}),i&&(f=fr(t),u=i.c,u.join(r)!==f.c.join(r)))for(l=t.replace(Tt,"1").split(Nt),_=l.length-1;a<_;a++)r+=l[a]+(~u.indexOf(a)?n.shift()||s+"0,0,0,0)":(f.length?f:n.length?n:i).shift());if(!l)for(l=t.split(Tt),_=l.length-1;a<_;a++)r+=l[a]+n[a];return r+l[_]},Tt=function(){var o="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",t;for(t in se)o+="|"+t+"\\b";return new RegExp(o+")","gi")}(),dn=/hsl[a]?\(/,_i=function(t){var e=t.join(" "),i;if(Tt.lastIndex=0,Tt.test(e))return i=dn.test(e),t[1]=Ni(t[1],i),t[0]=Ni(t[0],i,fr(t[1])),!0},he,tt=function(){var o=Date.now,t=500,e=33,i=o(),r=i,n=1e3/240,s=n,a=[],u,l,f,_,c,d,p=function h(m){var y=o()-r,v=m===!0,T,x,g,w;if((y>t||y<0)&&(i+=y-e),r+=y,g=r-i,T=g-s,(T>0||v)&&(w=++_.frame,c=g-_.time*1e3,_.time=g=g/1e3,s+=T+(T>=n?4:n-T),x=1),v||(u=l(h)),x)for(d=0;d<a.length;d++)a[d](g,c,w,m)};return _={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(m){return c/(1e3/(m||60))},wake:function(){qi&&(!Ge&&ri()&&(dt=Ge=window,ai=dt.document||{},at.gsap=$,(dt.gsapVersions||(dt.gsapVersions=[])).push($.version),Yi(we||dt.GreenSockGlobals||!dt.gsap&&dt||{}),or.forEach(ur)),f=typeof requestAnimationFrame<"u"&&requestAnimationFrame,u&&_.sleep(),l=f||function(m){return setTimeout(m,s-_.time*1e3+1|0)},he=1,p(2))},sleep:function(){(f?cancelAnimationFrame:clearTimeout)(u),he=0,l=fe},lagSmoothing:function(m,y){t=m||1/0,e=Math.min(y||33,t)},fps:function(m){n=1e3/(m||240),s=_.time*1e3+n},add:function(m,y,v){var T=y?function(x,g,w,k){m(x,g,w,k),_.remove(T)}:m;return _.remove(m),a[v?"unshift":"push"](T),Kt(),T},remove:function(m,y){~(y=a.indexOf(m))&&a.splice(y,1)&&d>=y&&d--},_listeners:a},_}(),Kt=function(){return!he&&tt.wake()},M={},pn=/^[\d.\-M][\d.\-,\s]/,mn=/["']/g,gn=function(t){for(var e={},i=t.substr(1,t.length-3).split(":"),r=i[0],n=1,s=i.length,a,u,l;n<s;n++)u=i[n],a=n!==s-1?u.lastIndexOf(","):u.length,l=u.substr(0,a),e[r]=isNaN(l)?l.replace(mn,"").trim():+l,r=u.substr(a+1).trim();return e},yn=function(t){var e=t.indexOf("(")+1,i=t.indexOf(")"),r=t.indexOf("(",e);return t.substring(e,~r&&r<i?t.indexOf(")",i+1):i)},vn=function(t){var e=(t+"").split("("),i=M[e[0]];return i&&e.length>1&&i.config?i.config.apply(null,~t.indexOf("{")?[gn(e[1])]:yn(t).split(",").map(Qi)):M._CE&&pn.test(t)?M._CE("",t):i},hr=function(t){return function(e){return 1-t(1-e)}},_r=function o(t,e){for(var i=t._first,r;i;)i instanceof X?o(i,e):i.vars.yoyoEase&&(!i._yoyo||!i._repeat)&&i._yoyo!==e&&(i.timeline?o(i.timeline,e):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=e)),i=i._next},zt=function(t,e){return t&&(F(t)?t:M[t]||vn(t))||e},Bt=function(t,e,i,r){i===void 0&&(i=function(u){return 1-e(1-u)}),r===void 0&&(r=function(u){return u<.5?e(u*2)/2:1-e((1-u)*2)/2});var n={easeIn:e,easeOut:i,easeInOut:r},s;return K(t,function(a){M[a]=at[a]=n,M[s=a.toLowerCase()]=i;for(var u in n)M[s+(u==="easeIn"?".in":u==="easeOut"?".out":".inOut")]=M[a+"."+u]=n[u]}),n},cr=function(t){return function(e){return e<.5?(1-t(1-e*2))/2:.5+t((e-.5)*2)/2}},He=function o(t,e,i){var r=e>=1?e:1,n=(i||(t?.3:.45))/(e<1?e:1),s=n/Xe*(Math.asin(1/r)||0),a=function(f){return f===1?1:r*Math.pow(2,-10*f)*Wr((f-s)*n)+1},u=t==="out"?a:t==="in"?function(l){return 1-a(1-l)}:cr(a);return n=Xe/n,u.config=function(l,f){return o(t,l,f)},u},Ue=function o(t,e){e===void 0&&(e=1.70158);var i=function(s){return s?--s*s*((e+1)*s+e)+1:0},r=t==="out"?i:t==="in"?function(n){return 1-i(1-n)}:cr(i);return r.config=function(n){return o(t,n)},r};K("Linear,Quad,Cubic,Quart,Quint,Strong",function(o,t){var e=t<5?t+1:t;Bt(o+",Power"+(e-1),t?function(i){return Math.pow(i,e)}:function(i){return i},function(i){return 1-Math.pow(1-i,e)},function(i){return i<.5?Math.pow(i*2,e)/2:1-Math.pow((1-i)*2,e)/2})});M.Linear.easeNone=M.none=M.Linear.easeIn;Bt("Elastic",He("in"),He("out"),He());(function(o,t){var e=1/t,i=2*e,r=2.5*e,n=function(a){return a<e?o*a*a:a<i?o*Math.pow(a-1.5/t,2)+.75:a<r?o*(a-=2.25/t)*a+.9375:o*Math.pow(a-2.625/t,2)+.984375};Bt("Bounce",function(s){return 1-n(1-s)},n)})(7.5625,2.75);Bt("Expo",function(o){return Math.pow(2,10*(o-1))*o+o*o*o*o*o*o*(1-o)});Bt("Circ",function(o){return-(Vi(1-o*o)-1)});Bt("Sine",function(o){return o===1?1:-Xr(o*qr)+1});Bt("Back",Ue("in"),Ue("out"),Ue());M.SteppedEase=M.steps=at.SteppedEase={config:function(t,e){t===void 0&&(t=1);var i=1/t,r=t+(e?0:1),n=e?1:0,s=1-C;return function(a){return((r*ce(0,s,a)|0)+n)*i}}};Wt.ease=M["quad.out"];K("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(o){return ui+=o+","+o+"Params,"});var ci=function(t,e){this.id=Yr++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:fi,this.set=e?e.getSetter:Re},_e=function(){function o(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,$t(this,+e.duration,1,1),this.data=e.data,R&&(this._ctx=R,R.data.push(this)),he||tt.wake()}var t=o.prototype;return t.delay=function(i){return i||i===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+i-this._delay),this._delay=i,this):this._delay},t.duration=function(i){return arguments.length?this.totalDuration(this._repeat>0?i+(i+this._rDelay)*this._repeat:i):this.totalDuration()&&this._dur},t.totalDuration=function(i){return arguments.length?(this._dirty=0,$t(this,this._repeat<0?i:(i-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(i,r){if(Kt(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(Ae(this,i),!n._dp||n.parent||Zi(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&i<this._tDur||this._ts<0&&i>0||!this._tDur&&!i)&&pt(this._dp,this,this._start-this._delay)}return(this._tTime!==i||!this._dur&&!r||this._initted&&Math.abs(this._zTime)===C||!i&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=i),Gi(this,i,r)),this},t.time=function(i,r){return arguments.length?this.totalTime(Math.min(this.totalDuration(),i+Li(this))%(this._dur+this._rDelay)||(i?this._dur:0),r):this._time},t.totalProgress=function(i,r){return arguments.length?this.totalTime(this.totalDuration()*i,r):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},t.progress=function(i,r){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-i:i)+Li(this),r):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},t.iteration=function(i,r){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(i-1)*n,r):this._repeat?Qt(this._tTime,n)+1:1},t.timeScale=function(i,r){if(!arguments.length)return this._rts===-C?0:this._rts;if(this._rts===i)return this;var n=this.parent&&this._ts?Me(this.parent._time,this):this._tTime;return this._rts=+i||0,this._ts=this._ps||i===-C?0:this._rts,this.totalTime(ce(-Math.abs(this._delay),this.totalDuration(),n),r!==!1),De(this),Jr(this)},t.paused=function(i){return arguments.length?(this._ps!==i&&(this._ps=i,i?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Kt(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==C&&(this._tTime-=C)))),this):this._ps},t.startTime=function(i){if(arguments.length){this._start=i;var r=this.parent||this._dp;return r&&(r._sort||!this.parent)&&pt(r,this,i-this._delay),this}return this._start},t.endTime=function(i){return this._start+(et(i)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(i){var r=this.parent||this._dp;return r?i&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Me(r.rawTime(i),this):this._tTime:this._tTime},t.revert=function(i){i===void 0&&(i=$r);var r=W;return W=i,hi(this)&&(this.timeline&&this.timeline.revert(i),this.totalTime(-.01,i.suppressEvents)),this.data!=="nested"&&i.kill!==!1&&this.kill(),W=r,this},t.globalTime=function(i){for(var r=this,n=arguments.length?i:r.rawTime();r;)n=r._start+n/(Math.abs(r._ts)||1),r=r._dp;return!this.parent&&this._sat?this._sat.globalTime(i):n},t.repeat=function(i){return arguments.length?(this._repeat=i===1/0?-2:i,zi(this)):this._repeat===-2?1/0:this._repeat},t.repeatDelay=function(i){if(arguments.length){var r=this._time;return this._rDelay=i,zi(this),r?this.time(r):this}return this._rDelay},t.yoyo=function(i){return arguments.length?(this._yoyo=i,this):this._yoyo},t.seek=function(i,r){return this.totalTime(ut(this,i),et(r))},t.restart=function(i,r){return this.play().totalTime(i?-this._delay:0,et(r)),this._dur||(this._zTime=-C),this},t.play=function(i,r){return i!=null&&this.seek(i,r),this.reversed(!1).paused(!1)},t.reverse=function(i,r){return i!=null&&this.seek(i||this.totalDuration(),r),this.reversed(!0).paused(!1)},t.pause=function(i,r){return i!=null&&this.seek(i,r),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(i){return arguments.length?(!!i!==this.reversed()&&this.timeScale(-this._rts||(i?-C:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-C,this},t.isActive=function(){var i=this.parent||this._dp,r=this._start,n;return!!(!i||this._ts&&this._initted&&i.isActive()&&(n=i.rawTime(!0))>=r&&n<this.endTime(!0)-C)},t.eventCallback=function(i,r,n){var s=this.vars;return arguments.length>1?(r?(s[i]=r,n&&(s[i+"Params"]=n),i==="onUpdate"&&(this._onUpdate=r)):delete s[i],this):s[i]},t.then=function(i){var r=this;return new Promise(function(n){var s=F(i)?i:$i,a=function(){var l=r.then;r.then=null,F(s)&&(s=s(r))&&(s.then||s===r)&&(r.then=l),n(s),r.then=l};r._initted&&r.totalProgress()===1&&r._ts>=0||!r._tTime&&r._ts<0?a():r._prom=a})},t.kill=function(){ne(this)},o}();ot(_e.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-C,_prom:0,_ps:!1,_rts:1});var X=function(o){Bi(t,o);function t(i,r){var n;return i===void 0&&(i={}),n=o.call(this,i)||this,n.labels={},n.smoothChildTiming=!!i.smoothChildTiming,n.autoRemoveChildren=!!i.autoRemoveChildren,n._sort=et(i.sortChildren),L&&pt(i.parent||L,vt(n),r),i.reversed&&n.reverse(),i.paused&&n.paused(!0),i.scrollTrigger&&ji(vt(n),i.scrollTrigger),n}var e=t.prototype;return e.to=function(r,n,s){return oe(0,arguments,this),this},e.from=function(r,n,s){return oe(1,arguments,this),this},e.fromTo=function(r,n,s,a){return oe(2,arguments,this),this},e.set=function(r,n,s){return n.duration=0,n.parent=this,ae(n).repeatDelay||(n.repeat=0),n.immediateRender=!!n.immediateRender,new I(r,n,ut(this,s),1),this},e.call=function(r,n,s){return pt(this,I.delayedCall(0,r,n),s)},e.staggerTo=function(r,n,s,a,u,l,f){return s.duration=n,s.stagger=s.stagger||a,s.onComplete=l,s.onCompleteParams=f,s.parent=this,new I(r,s,ut(this,u)),this},e.staggerFrom=function(r,n,s,a,u,l,f){return s.runBackwards=1,ae(s).immediateRender=et(s.immediateRender),this.staggerTo(r,n,s,a,u,l,f)},e.staggerFromTo=function(r,n,s,a,u,l,f,_){return a.startAt=s,ae(a).immediateRender=et(a.immediateRender),this.staggerTo(r,n,a,u,l,f,_)},e.render=function(r,n,s){var a=this._time,u=this._dirty?this.totalDuration():this._tDur,l=this._dur,f=r<=0?0:V(r),_=this._zTime<0!=r<0&&(this._initted||!l),c,d,p,h,m,y,v,T,x,g,w,k;if(this!==L&&f>u&&r>=0&&(f=u),f!==this._tTime||s||_){if(a!==this._time&&l&&(f+=this._time-a,r+=this._time-a),c=f,x=this._start,T=this._ts,y=!T,_&&(l||(a=this._zTime),(r||!n)&&(this._zTime=r)),this._repeat){if(w=this._yoyo,m=l+this._rDelay,this._repeat<-1&&r<0)return this.totalTime(m*100+r,n,s);if(c=V(f%m),f===u?(h=this._repeat,c=l):(g=V(f/m),h=~~g,h&&h===g&&(c=l,h--),c>l&&(c=l)),g=Qt(this._tTime,m),!a&&this._tTime&&g!==h&&this._tTime-g*m-this._dur<=0&&(g=h),w&&h&1&&(c=l-c,k=1),h!==g&&!this._lock){var S=w&&g&1,b=S===(w&&h&1);if(h<g&&(S=!S),a=S?0:f%l?l:f,this._lock=1,this.render(a||(k?0:V(h*m)),n,!l)._lock=0,this._tTime=f,!n&&this.parent&&st(this,"onRepeat"),this.vars.repeatRefresh&&!k&&(this.invalidate()._lock=1),a&&a!==this._time||y!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(l=this._dur,u=this._tDur,b&&(this._lock=2,a=S?l:-1e-4,this.render(a,!0),this.vars.repeatRefresh&&!k&&this.invalidate()),this._lock=0,!this._ts&&!y)return this;_r(this,k)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(v=nn(this,V(a),V(c)),v&&(f-=c-(c=v._start))),this._tTime=f,this._time=c,this._act=!T,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=r,a=0),!a&&f&&!n&&!g&&(st(this,"onStart"),this._tTime!==f))return this;if(c>=a&&r>=0)for(d=this._first;d;){if(p=d._next,(d._act||c>=d._start)&&d._ts&&v!==d){if(d.parent!==this)return this.render(r,n,s);if(d.render(d._ts>0?(c-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(c-d._start)*d._ts,n,s),c!==this._time||!this._ts&&!y){v=0,p&&(f+=this._zTime=-C);break}}d=p}else{d=this._last;for(var O=r<0?r:c;d;){if(p=d._prev,(d._act||O<=d._end)&&d._ts&&v!==d){if(d.parent!==this)return this.render(r,n,s);if(d.render(d._ts>0?(O-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(O-d._start)*d._ts,n,s||W&&hi(d)),c!==this._time||!this._ts&&!y){v=0,p&&(f+=this._zTime=O?-C:C);break}}d=p}}if(v&&!n&&(this.pause(),v.render(c>=a?0:-C)._zTime=c>=a?1:-1,this._ts))return this._start=x,De(this),this.render(r,n,s);this._onUpdate&&!n&&st(this,"onUpdate",!0),(f===u&&this._tTime>=this.totalDuration()||!f&&a)&&(x===this._start||Math.abs(T)!==Math.abs(this._ts))&&(this._lock||((r||!l)&&(f===u&&this._ts>0||!f&&this._ts<0)&&Ot(this,1),!n&&!(r<0&&!a)&&(f||a||!u)&&(st(this,f===u&&r>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(f<u&&this.timeScale()>0)&&this._prom())))}return this},e.add=function(r,n){var s=this;if(xt(n)||(n=ut(this,n,r)),!(r instanceof _e)){if(Q(r))return r.forEach(function(a){return s.add(a,n)}),this;if(H(r))return this.addLabel(r,n);if(F(r))r=I.delayedCall(0,r);else return this}return this!==r?pt(this,r,n):this},e.getChildren=function(r,n,s,a){r===void 0&&(r=!0),n===void 0&&(n=!0),s===void 0&&(s=!0),a===void 0&&(a=-lt);for(var u=[],l=this._first;l;)l._start>=a&&(l instanceof I?n&&u.push(l):(s&&u.push(l),r&&u.push.apply(u,l.getChildren(!0,n,s)))),l=l._next;return u},e.getById=function(r){for(var n=this.getChildren(1,1,1),s=n.length;s--;)if(n[s].vars.id===r)return n[s]},e.remove=function(r){return H(r)?this.removeLabel(r):F(r)?this.killTweensOf(r):(r.parent===this&&Ee(this,r),r===this._recent&&(this._recent=this._last),Lt(this))},e.totalTime=function(r,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=V(tt.time-(this._ts>0?r/this._ts:(this.totalDuration()-r)/-this._ts))),o.prototype.totalTime.call(this,r,n),this._forcing=0,this):this._tTime},e.addLabel=function(r,n){return this.labels[r]=ut(this,n),this},e.removeLabel=function(r){return delete this.labels[r],this},e.addPause=function(r,n,s){var a=I.delayedCall(0,n||fe,s);return a.data="isPause",this._hasPause=1,pt(this,a,ut(this,r))},e.removePause=function(r){var n=this._first;for(r=ut(this,r);n;)n._start===r&&n.data==="isPause"&&Ot(n),n=n._next},e.killTweensOf=function(r,n,s){for(var a=this.getTweensOf(r,s),u=a.length;u--;)kt!==a[u]&&a[u].kill(r,n);return this},e.getTweensOf=function(r,n){for(var s=[],a=ft(r),u=this._first,l=xt(n),f;u;)u instanceof I?Kr(u._targets,a)&&(l?(!kt||u._initted&&u._ts)&&u.globalTime(0)<=n&&u.globalTime(u.totalDuration())>n:!n||u.isActive())&&s.push(u):(f=u.getTweensOf(a,n)).length&&s.push.apply(s,f),u=u._next;return s},e.tweenTo=function(r,n){n=n||{};var s=this,a=ut(s,r),u=n,l=u.startAt,f=u.onStart,_=u.onStartParams,c=u.immediateRender,d,p=I.to(s,ot({ease:n.ease||"none",lazy:!1,immediateRender:!1,time:a,overwrite:"auto",duration:n.duration||Math.abs((a-(l&&"time"in l?l.time:s._time))/s.timeScale())||C,onStart:function(){if(s.pause(),!d){var m=n.duration||Math.abs((a-(l&&"time"in l?l.time:s._time))/s.timeScale());p._dur!==m&&$t(p,m,0,1).render(p._time,!0,!0),d=1}f&&f.apply(p,_||[])}},n));return c?p.render(0):p},e.tweenFromTo=function(r,n,s){return this.tweenTo(n,ot({startAt:{time:ut(this,r)}},s))},e.recent=function(){return this._recent},e.nextLabel=function(r){return r===void 0&&(r=this._time),Fi(this,ut(this,r))},e.previousLabel=function(r){return r===void 0&&(r=this._time),Fi(this,ut(this,r),1)},e.currentLabel=function(r){return arguments.length?this.seek(r,!0):this.previousLabel(this._time+C)},e.shiftChildren=function(r,n,s){s===void 0&&(s=0);for(var a=this._first,u=this.labels,l;a;)a._start>=s&&(a._start+=r,a._end+=r),a=a._next;if(n)for(l in u)u[l]>=s&&(u[l]+=r);return Lt(this)},e.invalidate=function(r){var n=this._first;for(this._lock=0;n;)n.invalidate(r),n=n._next;return o.prototype.invalidate.call(this,r)},e.clear=function(r){r===void 0&&(r=!0);for(var n=this._first,s;n;)s=n._next,this.remove(n),n=s;return this._dp&&(this._time=this._tTime=this._pTime=0),r&&(this.labels={}),Lt(this)},e.totalDuration=function(r){var n=0,s=this,a=s._last,u=lt,l,f,_;if(arguments.length)return s.timeScale((s._repeat<0?s.duration():s.totalDuration())/(s.reversed()?-r:r));if(s._dirty){for(_=s.parent;a;)l=a._prev,a._dirty&&a.totalDuration(),f=a._start,f>u&&s._sort&&a._ts&&!s._lock?(s._lock=1,pt(s,a,f-a._delay,1)._lock=0):u=f,f<0&&a._ts&&(n-=f,(!_&&!s._dp||_&&_.smoothChildTiming)&&(s._start+=f/s._ts,s._time-=f,s._tTime-=f),s.shiftChildren(-f,!1,-1/0),u=0),a._end>n&&a._ts&&(n=a._end),a=l;$t(s,s===L&&s._time>n?s._time:n,1,1),s._dirty=0}return s._tDur},t.updateRoot=function(r){if(L._ts&&(Gi(L,Me(r,L)),Wi=tt.frame),tt.frame>=Ai){Ai+=it.autoSleep||120;var n=L._first;if((!n||!n._ts)&&it.autoSleep&&tt._listeners.length<2){for(;n&&!n._ts;)n=n._next;n||tt.sleep()}}},t}(_e);ot(X.prototype,{_lock:0,_hasPause:0,_forcing:0});var Tn=function(t,e,i,r,n,s,a){var u=new Z(this._pt,t,e,0,1,yi,null,n),l=0,f=0,_,c,d,p,h,m,y,v;for(u.b=i,u.e=r,i+="",r+="",(y=~r.indexOf("random("))&&(r=Zt(r)),s&&(v=[i,r],s(v,t,e),i=v[0],r=v[1]),c=i.match(Ie)||[];_=Ie.exec(r);)p=_[0],h=r.substring(l,_.index),d?d=(d+1)%5:h.substr(-5)==="rgba("&&(d=1),p!==c[f++]&&(m=parseFloat(c[f-1])||0,u._pt={_next:u._pt,p:h||f===1?h:",",s:m,c:p.charAt(1)==="="?It(m,p)-m:parseFloat(p)-m,m:d&&d<4?Math.round:0},l=Ie.lastIndex);return u.c=l<r.length?r.substring(l,r.length):"",u.fp=a,(si.test(r)||y)&&(u.e=0),this._pt=u,u},di=function(t,e,i,r,n,s,a,u,l,f){F(r)&&(r=r(n||0,t,s));var _=t[e],c=i!=="get"?i:F(_)?l?t[e.indexOf("set")||!F(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():_,d=F(_)?l?Sn:mr:gi,p;if(H(r)&&(~r.indexOf("random(")&&(r=Zt(r)),r.charAt(1)==="="&&(p=It(c,r)+(G(c)||0),(p||p===0)&&(r=p))),!f||c!==r||ti)return!isNaN(c*r)&&r!==""?(p=new Z(this._pt,t,e,+c||0,r-(c||0),typeof _=="boolean"?On:gr,0,d),l&&(p.fp=l),a&&p.modifier(a,this,t),this._pt=p):(!_&&!(e in t)&&Ce(e,r),Tn.call(this,t,e,c,r,d,u||it.stringFilter,l))},xn=function(t,e,i,r,n){if(F(t)&&(t=ue(t,n,e,i,r)),!mt(t)||t.style&&t.nodeType||Q(t)||Hi(t))return H(t)?ue(t,n,e,i,r):t;var s={},a;for(a in t)s[a]=ue(t[a],n,e,i,r);return s},pi=function(t,e,i,r,n,s){var a,u,l,f;if(J[t]&&(a=new J[t]).init(n,a.rawVars?e[t]:xn(e[t],r,n,s,i),i,r,s)!==!1&&(i._pt=u=new Z(i._pt,n,t,0,1,a.render,a,0,a.priority),i!==Xt))for(l=i._ptLookup[i._targets.indexOf(n)],f=a._props.length;f--;)l[a._props[f]]=u;return a},kt,ti,mi=function o(t,e,i){var r=t.vars,n=r.ease,s=r.startAt,a=r.immediateRender,u=r.lazy,l=r.onUpdate,f=r.runBackwards,_=r.yoyoEase,c=r.keyframes,d=r.autoRevert,p=t._dur,h=t._startAt,m=t._targets,y=t.parent,v=y&&y.data==="nested"?y.vars.targets:m,T=t._overwrite==="auto"&&!ii,x=t.timeline,g,w,k,S,b,O,A,E,D,Y,U,B,q;if(x&&(!c||!n)&&(n="none"),t._ease=zt(n,Wt.ease),t._yEase=_?hr(zt(_===!0?n:_,Wt.ease)):0,_&&t._yoyo&&!t._repeat&&(_=t._yEase,t._yEase=t._ease,t._ease=_),t._from=!x&&!!r.runBackwards,!x||c&&!r.stagger){if(E=m[0]?Mt(m[0]).harness:0,B=E&&r[E.prop],g=Se(r,oi),h&&(h._zTime<0&&h.progress(1),e<0&&f&&a&&!d?h.render(-1,!0):h.revert(f&&p?Te:Qr),h._lazy=0),s){if(Ot(t._startAt=I.set(m,ot({data:"isStart",overwrite:!1,parent:y,immediateRender:!0,lazy:!h&&et(u),startAt:null,delay:0,onUpdate:l&&function(){return st(t,"onUpdate")},stagger:0},s))),t._startAt._dp=0,t._startAt._sat=t,e<0&&(W||!a&&!d)&&t._startAt.revert(Te),a&&p&&e<=0&&i<=0){e&&(t._zTime=e);return}}else if(f&&p&&!h){if(e&&(a=!1),k=ot({overwrite:!1,data:"isFromStart",lazy:a&&!h&&et(u),immediateRender:a,stagger:0,parent:y},g),B&&(k[E.prop]=B),Ot(t._startAt=I.set(m,k)),t._startAt._dp=0,t._startAt._sat=t,e<0&&(W?t._startAt.revert(Te):t._startAt.render(-1,!0)),t._zTime=e,!a)o(t._startAt,C,C);else if(!e)return}for(t._pt=t._ptCache=0,u=p&&et(u)||u&&!p,w=0;w<m.length;w++){if(b=m[w],A=b._gsap||li(m)[w]._gsap,t._ptLookup[w]=Y={},Qe[A.id]&&St.length&&ke(),U=v===m?w:v.indexOf(b),E&&(D=new E).init(b,B||g,t,U,v)!==!1&&(t._pt=S=new Z(t._pt,b,D.name,0,1,D.render,D,0,D.priority),D._props.forEach(function(_t){Y[_t]=S}),D.priority&&(O=1)),!E||B)for(k in g)J[k]&&(D=pi(k,g,t,U,b,v))?D.priority&&(O=1):Y[k]=S=di.call(t,b,k,"get",g[k],U,v,0,r.stringFilter);t._op&&t._op[w]&&t.kill(b,t._op[w]),T&&t._pt&&(kt=t,L.killTweensOf(b,Y,t.globalTime(e)),q=!t.parent,kt=0),t._pt&&u&&(Qe[A.id]=1)}O&&Ti(t),t._onInit&&t._onInit(t)}t._onUpdate=l,t._initted=(!t._op||t._pt)&&!q,c&&e<=0&&x.render(lt,!0,!0)},bn=function(t,e,i,r,n,s,a,u){var l=(t._pt&&t._ptCache||(t._ptCache={}))[e],f,_,c,d;if(!l)for(l=t._ptCache[e]=[],c=t._ptLookup,d=t._targets.length;d--;){if(f=c[d][e],f&&f.d&&f.d._pt)for(f=f.d._pt;f&&f.p!==e&&f.fp!==e;)f=f._next;if(!f)return ti=1,t.vars[e]="+=0",mi(t,a),ti=0,u?le(e+" not eligible for reset"):1;l.push(f)}for(d=l.length;d--;)_=l[d],f=_._pt||_,f.s=(r||r===0)&&!n?r:f.s+(r||0)+s*f.c,f.c=i-f.s,_.e&&(_.e=N(i)+G(_.e)),_.b&&(_.b=f.s+G(_.b))},wn=function(t,e){var i=t[0]?Mt(t[0]).harness:0,r=i&&i.aliases,n,s,a,u;if(!r)return e;n=Gt({},e);for(s in r)if(s in n)for(u=r[s].split(","),a=u.length;a--;)n[u[a]]=n[s];return n},kn=function(t,e,i,r){var n=e.ease||r||"power1.inOut",s,a;if(Q(e))a=i[t]||(i[t]=[]),e.forEach(function(u,l){return a.push({t:l/(e.length-1)*100,v:u,e:n})});else for(s in e)a=i[s]||(i[s]=[]),s==="ease"||a.push({t:parseFloat(t),v:e[s],e:n})},ue=function(t,e,i,r,n){return F(t)?t.call(e,i,r,n):H(t)&&~t.indexOf("random(")?Zt(t):t},dr=ui+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",pr={};K(dr+",id,stagger,delay,duration,paused,scrollTrigger",function(o){return pr[o]=1});var I=function(o){Bi(t,o);function t(i,r,n,s){var a;typeof r=="number"&&(n.duration=r,r=n,n=null),a=o.call(this,s?r:ae(r))||this;var u=a.vars,l=u.duration,f=u.delay,_=u.immediateRender,c=u.stagger,d=u.overwrite,p=u.keyframes,h=u.defaults,m=u.scrollTrigger,y=u.yoyoEase,v=r.parent||L,T=(Q(i)||Hi(i)?xt(i[0]):"length"in r)?[i]:ft(i),x,g,w,k,S,b,O,A;if(a._targets=T.length?li(T):le("GSAP target "+i+" not found. https://gsap.com",!it.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=d,p||c||ve(l)||ve(f)){if(r=a.vars,x=a.timeline=new X({data:"nested",defaults:h||{},targets:v&&v.data==="nested"?v.vars.targets:T}),x.kill(),x.parent=x._dp=vt(a),x._start=0,c||ve(l)||ve(f)){if(k=T.length,O=c&&ir(c),mt(c))for(S in c)~dr.indexOf(S)&&(A||(A={}),A[S]=c[S]);for(g=0;g<k;g++)w=Se(r,pr),w.stagger=0,y&&(w.yoyoEase=y),A&&Gt(w,A),b=T[g],w.duration=+ue(l,vt(a),g,b,T),w.delay=(+ue(f,vt(a),g,b,T)||0)-a._delay,!c&&k===1&&w.delay&&(a._delay=f=w.delay,a._start+=f,w.delay=0),x.to(b,w,O?O(g,b,T):0),x._ease=M.none;x.duration()?l=f=0:a.timeline=0}else if(p){ae(ot(x.vars.defaults,{ease:"none"})),x._ease=zt(p.ease||r.ease||"none");var E=0,D,Y,U;if(Q(p))p.forEach(function(B){return x.to(T,B,">")}),x.duration();else{w={};for(S in p)S==="ease"||S==="easeEach"||kn(S,p[S],w,p.easeEach);for(S in w)for(D=w[S].sort(function(B,q){return B.t-q.t}),E=0,g=0;g<D.length;g++)Y=D[g],U={ease:Y.e,duration:(Y.t-(g?D[g-1].t:0))/100*l},U[S]=Y.v,x.to(T,U,E),E+=U.duration;x.duration()<l&&x.to({},{duration:l-x.duration()})}}l||a.duration(l=x.duration())}else a.timeline=0;return d===!0&&!ii&&(kt=vt(a),L.killTweensOf(T),kt=0),pt(v,vt(a),n),r.reversed&&a.reverse(),r.paused&&a.paused(!0),(_||!l&&!p&&a._start===V(v._time)&&et(_)&&tn(vt(a))&&v.data!=="nested")&&(a._tTime=-C,a.render(Math.max(0,-f)||0)),m&&ji(vt(a),m),a}var e=t.prototype;return e.render=function(r,n,s){var a=this._time,u=this._tDur,l=this._dur,f=r<0,_=r>u-C&&!f?u:r<C?0:r,c,d,p,h,m,y,v,T,x;if(!l)rn(this,r,n,s);else if(_!==this._tTime||!r||s||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==f||this._lazy){if(c=_,T=this.timeline,this._repeat){if(h=l+this._rDelay,this._repeat<-1&&f)return this.totalTime(h*100+r,n,s);if(c=V(_%h),_===u?(p=this._repeat,c=l):(m=V(_/h),p=~~m,p&&p===m?(c=l,p--):c>l&&(c=l)),y=this._yoyo&&p&1,y&&(x=this._yEase,c=l-c),m=Qt(this._tTime,h),c===a&&!s&&this._initted&&p===m)return this._tTime=_,this;p!==m&&(T&&this._yEase&&_r(T,y),this.vars.repeatRefresh&&!y&&!this._lock&&c!==h&&this._initted&&(this._lock=s=1,this.render(V(h*p),!0).invalidate()._lock=0))}if(!this._initted){if(Ji(this,f?r:c,s,n,_))return this._tTime=0,this;if(a!==this._time&&!(s&&this.vars.repeatRefresh&&p!==m))return this;if(l!==this._dur)return this.render(r,n,s)}if(this._tTime=_,this._time=c,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=v=(x||this._ease)(c/l),this._from&&(this.ratio=v=1-v),!a&&_&&!n&&!m&&(st(this,"onStart"),this._tTime!==_))return this;for(d=this._pt;d;)d.r(v,d.d),d=d._next;T&&T.render(r<0?r:T._dur*T._ease(c/this._dur),n,s)||this._startAt&&(this._zTime=r),this._onUpdate&&!n&&(f&&$e(this,r,n,s),st(this,"onUpdate")),this._repeat&&p!==m&&this.vars.onRepeat&&!n&&this.parent&&st(this,"onRepeat"),(_===this._tDur||!_)&&this._tTime===_&&(f&&!this._onUpdate&&$e(this,r,!0,!0),(r||!l)&&(_===this._tDur&&this._ts>0||!_&&this._ts<0)&&Ot(this,1),!n&&!(f&&!a)&&(_||a||y)&&(st(this,_===u?"onComplete":"onReverseComplete",!0),this._prom&&!(_<u&&this.timeScale()>0)&&this._prom()))}return this},e.targets=function(){return this._targets},e.invalidate=function(r){return(!r||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(r),o.prototype.invalidate.call(this,r)},e.resetTo=function(r,n,s,a,u){he||tt.wake(),this._ts||this.play();var l=Math.min(this._dur,(this._dp._time-this._start)*this._ts),f;return this._initted||mi(this,l),f=this._ease(l/this._dur),bn(this,r,n,s,a,f,l,u)?this.resetTo(r,n,s,a,1):(Ae(this,0),this.parent||Ki(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},e.kill=function(r,n){if(n===void 0&&(n="all"),!r&&(!n||n==="all"))return this._lazy=this._pt=0,this.parent?ne(this):this.scrollTrigger&&this.scrollTrigger.kill(!!W),this;if(this.timeline){var s=this.timeline.totalDuration();return this.timeline.killTweensOf(r,n,kt&&kt.vars.overwrite!==!0)._first||ne(this),this.parent&&s!==this.timeline.totalDuration()&&$t(this,this._dur*this.timeline._tDur/s,0,1),this}var a=this._targets,u=r?ft(r):a,l=this._ptLookup,f=this._pt,_,c,d,p,h,m,y;if((!n||n==="all")&&jr(a,u))return n==="all"&&(this._pt=0),ne(this);for(_=this._op=this._op||[],n!=="all"&&(H(n)&&(h={},K(n,function(v){return h[v]=1}),n=h),n=wn(a,n)),y=a.length;y--;)if(~u.indexOf(a[y])){c=l[y],n==="all"?(_[y]=n,p=c,d={}):(d=_[y]=_[y]||{},p=n);for(h in p)m=c&&c[h],m&&((!("kill"in m.d)||m.d.kill(h)===!0)&&Ee(this,m,"_pt"),delete c[h]),d!=="all"&&(d[h]=1)}return this._initted&&!this._pt&&f&&ne(this),this},t.to=function(r,n){return new t(r,n,arguments[2])},t.from=function(r,n){return oe(1,arguments)},t.delayedCall=function(r,n,s,a){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:r,onComplete:n,onReverseComplete:n,onCompleteParams:s,onReverseCompleteParams:s,callbackScope:a})},t.fromTo=function(r,n,s){return oe(2,arguments)},t.set=function(r,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(r,n)},t.killTweensOf=function(r,n,s){return L.killTweensOf(r,n,s)},t}(_e);ot(I.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});K("staggerTo,staggerFrom,staggerFromTo",function(o){I[o]=function(){var t=new X,e=Ze.call(arguments,0);return e.splice(o==="staggerFromTo"?5:4,0,0),t[o].apply(t,e)}});var gi=function(t,e,i){return t[e]=i},mr=function(t,e,i){return t[e](i)},Sn=function(t,e,i,r){return t[e](r.fp,i)},Mn=function(t,e,i){return t.setAttribute(e,i)},Re=function(t,e){return F(t[e])?mr:Pe(t[e])&&t.setAttribute?Mn:gi},gr=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e6)/1e6,e)},On=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},yi=function(t,e){var i=e._pt,r="";if(!t&&e.b)r=e.b;else if(t===1&&e.e)r=e.e;else{for(;i;)r=i.p+(i.m?i.m(i.s+i.c*t):Math.round((i.s+i.c*t)*1e4)/1e4)+r,i=i._next;r+=e.c}e.set(e.t,e.p,r,e)},vi=function(t,e){for(var i=e._pt;i;)i.r(t,i.d),i=i._next},Pn=function(t,e,i,r){for(var n=this._pt,s;n;)s=n._next,n.p===r&&n.modifier(t,e,i),n=s},Cn=function(t){for(var e=this._pt,i,r;e;)r=e._next,e.p===t&&!e.op||e.op===t?Ee(this,e,"_pt"):e.dep||(i=1),e=r;return!i},En=function(t,e,i,r){r.mSet(t,e,r.m.call(r.tween,i,r.mt),r)},Ti=function(t){for(var e=t._pt,i,r,n,s;e;){for(i=e._next,r=n;r&&r.pr>e.pr;)r=r._next;(e._prev=r?r._prev:s)?e._prev._next=e:n=e,(e._next=r)?r._prev=e:s=e,e=i}t._pt=n},Z=function(){function o(e,i,r,n,s,a,u,l,f){this.t=i,this.s=n,this.c=s,this.p=r,this.r=a||gr,this.d=u||this,this.set=l||gi,this.pr=f||0,this._next=e,e&&(e._prev=this)}var t=o.prototype;return t.modifier=function(i,r,n){this.mSet=this.mSet||this.set,this.set=En,this.m=i,this.mt=n,this.tween=r},o}();K(ui+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(o){return oi[o]=1});at.TweenMax=at.TweenLite=I;at.TimelineLite=at.TimelineMax=X;L=new X({sortChildren:!1,defaults:Wt,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});it.stringFilter=_i;var Ft=[],be={},Dn=[],Ii=0,An=0,qe=function(t){return(be[t]||Dn).map(function(e){return e()})},ei=function(){var t=Date.now(),e=[];t-Ii>2&&(qe("matchMediaInit"),Ft.forEach(function(i){var r=i.queries,n=i.conditions,s,a,u,l;for(a in r)s=dt.matchMedia(r[a]).matches,s&&(u=1),s!==n[a]&&(n[a]=s,l=1);l&&(i.revert(),u&&e.push(i))}),qe("matchMediaRevert"),e.forEach(function(i){return i.onMatch(i,function(r){return i.add(null,r)})}),Ii=t,qe("matchMedia"))},yr=function(){function o(e,i){this.selector=i&&je(i),this.data=[],this._r=[],this.isReverted=!1,this.id=An++,e&&this.add(e)}var t=o.prototype;return t.add=function(i,r,n){F(i)&&(n=r,r=i,i=F);var s=this,a=function(){var l=R,f=s.selector,_;return l&&l!==s&&l.data.push(s),n&&(s.selector=je(n)),R=s,_=r.apply(s,arguments),F(_)&&s._r.push(_),R=l,s.selector=f,s.isReverted=!1,_};return s.last=a,i===F?a(s,function(u){return s.add(null,u)}):i?s[i]=a:a},t.ignore=function(i){var r=R;R=null,i(this),R=r},t.getTweens=function(){var i=[];return this.data.forEach(function(r){return r instanceof o?i.push.apply(i,r.getTweens()):r instanceof I&&!(r.parent&&r.parent.data==="nested")&&i.push(r)}),i},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(i,r){var n=this;if(i?function(){for(var a=n.getTweens(),u=n.data.length,l;u--;)l=n.data[u],l.data==="isFlip"&&(l.revert(),l.getChildren(!0,!0,!1).forEach(function(f){return a.splice(a.indexOf(f),1)}));for(a.map(function(f){return{g:f._dur||f._delay||f._sat&&!f._sat.vars.immediateRender?f.globalTime(0):-1/0,t:f}}).sort(function(f,_){return _.g-f.g||-1/0}).forEach(function(f){return f.t.revert(i)}),u=n.data.length;u--;)l=n.data[u],l instanceof X?l.data!=="nested"&&(l.scrollTrigger&&l.scrollTrigger.revert(),l.kill()):!(l instanceof I)&&l.revert&&l.revert(i);n._r.forEach(function(f){return f(i,n)}),n.isReverted=!0}():this.data.forEach(function(a){return a.kill&&a.kill()}),this.clear(),r)for(var s=Ft.length;s--;)Ft[s].id===this.id&&Ft.splice(s,1)},t.revert=function(i){this.kill(i||{})},o}(),Rn=function(){function o(e){this.contexts=[],this.scope=e,R&&R.data.push(this)}var t=o.prototype;return t.add=function(i,r,n){mt(i)||(i={matches:i});var s=new yr(0,n||this.scope),a=s.conditions={},u,l,f;R&&!s.selector&&(s.selector=R.selector),this.contexts.push(s),r=s.add("onMatch",r),s.queries=i;for(l in i)l==="all"?f=1:(u=dt.matchMedia(i[l]),u&&(Ft.indexOf(s)<0&&Ft.push(s),(a[l]=u.matches)&&(f=1),u.addListener?u.addListener(ei):u.addEventListener("change",ei)));return f&&r(s,function(_){return s.add(null,_)}),this},t.revert=function(i){this.kill(i||{})},t.kill=function(i){this.contexts.forEach(function(r){return r.kill(i,!0)})},o}(),Oe={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];e.forEach(function(r){return ur(r)})},timeline:function(t){return new X(t)},getTweensOf:function(t,e){return L.getTweensOf(t,e)},getProperty:function(t,e,i,r){H(t)&&(t=ft(t)[0]);var n=Mt(t||{}).get,s=i?$i:Qi;return i==="native"&&(i=""),t&&(e?s((J[e]&&J[e].get||n)(t,e,i,r)):function(a,u,l){return s((J[a]&&J[a].get||n)(t,a,u,l))})},quickSetter:function(t,e,i){if(t=ft(t),t.length>1){var r=t.map(function(f){return $.quickSetter(f,e,i)}),n=r.length;return function(f){for(var _=n;_--;)r[_](f)}}t=t[0]||{};var s=J[e],a=Mt(t),u=a.harness&&(a.harness.aliases||{})[e]||e,l=s?function(f){var _=new s;Xt._pt=0,_.init(t,i?f+i:f,Xt,0,[t]),_.render(1,_),Xt._pt&&vi(1,Xt)}:a.set(t,u);return s?l:function(f){return l(t,u,i?f+i:f,a,1)}},quickTo:function(t,e,i){var r,n=$.to(t,ot((r={},r[e]="+=0.1",r.paused=!0,r.stagger=0,r),i||{})),s=function(u,l,f){return n.resetTo(e,u,l,f)};return s.tween=n,s},isTweening:function(t){return L.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=zt(t.ease,Wt.ease)),Ri(Wt,t||{})},config:function(t){return Ri(it,t||{})},registerEffect:function(t){var e=t.name,i=t.effect,r=t.plugins,n=t.defaults,s=t.extendTimeline;(r||"").split(",").forEach(function(a){return a&&!J[a]&&!at[a]&&le(e+" effect requires "+a+" plugin.")}),Be[e]=function(a,u,l){return i(ft(a),ot(u||{},n),l)},s&&(X.prototype[e]=function(a,u,l){return this.add(Be[e](a,mt(u)?u:(l=u)&&{},this),l)})},registerEase:function(t,e){M[t]=zt(e)},parseEase:function(t,e){return arguments.length?zt(t,e):M},getById:function(t){return L.getById(t)},exportRoot:function(t,e){t===void 0&&(t={});var i=new X(t),r,n;for(i.smoothChildTiming=et(t.smoothChildTiming),L.remove(i),i._dp=0,i._time=i._tTime=L._time,r=L._first;r;)n=r._next,(e||!(!r._dur&&r instanceof I&&r.vars.onComplete===r._targets[0]))&&pt(i,r,r._start-r._delay),r=n;return pt(L,i,0),i},context:function(t,e){return t?new yr(t,e):R},matchMedia:function(t){return new Rn(t)},matchMediaRefresh:function(){return Ft.forEach(function(t){var e=t.conditions,i,r;for(r in e)e[r]&&(e[r]=!1,i=1);i&&t.revert()})||ei()},addEventListener:function(t,e){var i=be[t]||(be[t]=[]);~i.indexOf(e)||i.push(e)},removeEventListener:function(t,e){var i=be[t],r=i&&i.indexOf(e);r>=0&&i.splice(r,1)},utils:{wrap:hn,wrapYoyo:_n,distribute:ir,random:nr,snap:rr,normalize:fn,getUnit:G,clamp:an,splitColor:lr,toArray:ft,selector:je,mapRange:ar,pipe:un,unitize:ln,interpolate:cn,shuffle:er},install:Yi,effects:Be,ticker:tt,updateRoot:X.updateRoot,plugins:J,globalTimeline:L,core:{PropTween:Z,globals:Xi,Tween:I,Timeline:X,Animation:_e,getCache:Mt,_removeLinkedListItem:Ee,reverting:function(){return W},context:function(t){return t&&R&&(R.data.push(t),t._ctx=R),R},suppressOverwrites:function(t){return ii=t}}};K("to,from,fromTo,delayedCall,set,killTweensOf",function(o){return Oe[o]=I[o]});tt.add(X.updateRoot);Xt=Oe.to({},{duration:0});var Ln=function(t,e){for(var i=t._pt;i&&i.p!==e&&i.op!==e&&i.fp!==e;)i=i._next;return i},zn=function(t,e){var i=t._targets,r,n,s;for(r in e)for(n=i.length;n--;)s=t._ptLookup[n][r],s&&(s=s.d)&&(s._pt&&(s=Ln(s,r)),s&&s.modifier&&s.modifier(e[r],t,i[n],r))},Ye=function(t,e){return{name:t,headless:1,rawVars:1,init:function(r,n,s){s._onInit=function(a){var u,l;if(H(n)&&(u={},K(n,function(f){return u[f]=1}),n=u),e){u={};for(l in n)u[l]=e(n[l]);n=u}zn(a,n)}}}},$=Oe.registerPlugin({name:"attr",init:function(t,e,i,r,n){var s,a,u;this.tween=i;for(s in e)u=t.getAttribute(s)||"",a=this.add(t,"setAttribute",(u||0)+"",e[s],r,n,0,0,s),a.op=s,a.b=u,this._props.push(s)},render:function(t,e){for(var i=e._pt;i;)W?i.set(i.t,i.p,i.b,i):i.r(t,i.d),i=i._next}},{name:"endArray",headless:1,init:function(t,e){for(var i=e.length;i--;)this.add(t,i,t[i]||0,e[i],0,0,0,0,0,1)}},Ye("roundProps",Je),Ye("modifiers"),Ye("snap",rr))||Oe;I.version=X.version=$.version="3.13.0";qi=1;ri()&&Kt();var Fn=M.Power0,Nn=M.Power1,In=M.Power2,Bn=M.Power3,Vn=M.Power4,Hn=M.Linear,Un=M.Quad,qn=M.Cubic,Yn=M.Quart,Xn=M.Quint,Wn=M.Strong,Gn=M.Elastic,Qn=M.Back,$n=M.SteppedEase,Kn=M.Bounce,Zn=M.Sine,jn=M.Expo,Jn=M.Circ;var vr,Ct,Jt,Mi,qt,ts,Tr,Oi,es=function(){return typeof window<"u"},wt={},Ut=180/Math.PI,te=Math.PI/180,jt=Math.atan2,xr=1e8,Pi=/([A-Z])/g,is=/(left|right|width|margin|padding|x)/i,rs=/[\s,\(]\S/,gt={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},bi=function(t,e){return e.set(e.t,e.p,Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},ns=function(t,e){return e.set(e.t,e.p,t===1?e.e:Math.round((e.s+e.c*t)*1e4)/1e4+e.u,e)},ss=function(t,e){return e.set(e.t,e.p,t?Math.round((e.s+e.c*t)*1e4)/1e4+e.u:e.b,e)},as=function(t,e){var i=e.s+e.c*t;e.set(e.t,e.p,~~(i+(i<0?-.5:.5))+e.u,e)},Cr=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},Er=function(t,e){return e.set(e.t,e.p,t!==1?e.b:e.e,e)},os=function(t,e,i){return t.style[e]=i},us=function(t,e,i){return t.style.setProperty(e,i)},ls=function(t,e,i){return t._gsap[e]=i},fs=function(t,e,i){return t._gsap.scaleX=t._gsap.scaleY=i},hs=function(t,e,i,r,n){var s=t._gsap;s.scaleX=s.scaleY=i,s.renderTransform(n,s)},_s=function(t,e,i,r,n){var s=t._gsap;s[e]=i,s.renderTransform(n,s)},z="transform",rt=z+"Origin",cs=function o(t,e){var i=this,r=this.target,n=r.style,s=r._gsap;if(t in wt&&n){if(this.tfm=this.tfm||{},t!=="transform")t=gt[t]||t,~t.indexOf(",")?t.split(",").forEach(function(a){return i.tfm[a]=bt(r,a)}):this.tfm[t]=s.x?s[t]:bt(r,t),t===rt&&(this.tfm.zOrigin=s.zOrigin);else return gt.transform.split(",").forEach(function(a){return o.call(i,a,e)});if(this.props.indexOf(z)>=0)return;s.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(rt,e,"")),t=z}(n||e)&&this.props.push(t,e,n[t])},Dr=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},ds=function(){var t=this.props,e=this.target,i=e.style,r=e._gsap,n,s;for(n=0;n<t.length;n+=3)t[n+1]?t[n+1]===2?e[t[n]](t[n+2]):e[t[n]]=t[n+2]:t[n+2]?i[t[n]]=t[n+2]:i.removeProperty(t[n].substr(0,2)==="--"?t[n]:t[n].replace(Pi,"-$1").toLowerCase());if(this.tfm){for(s in this.tfm)r[s]=this.tfm[s];r.svg&&(r.renderTransform(),e.setAttribute("data-svg-origin",this.svgo||"")),n=Oi(),(!n||!n.isStart)&&!i[z]&&(Dr(i),r.zOrigin&&i[rt]&&(i[rt]+=" "+r.zOrigin+"px",r.zOrigin=0,r.renderTransform()),r.uncache=1)}},Ar=function(t,e){var i={target:t,props:[],revert:ds,save:cs};return t._gsap||$.core.getCache(t),e&&t.style&&t.nodeType&&e.split(",").forEach(function(r){return i.save(r)}),i},Rr,wi=function(t,e){var i=Ct.createElementNS?Ct.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Ct.createElement(t);return i&&i.style?i:Ct.createElement(t)},ht=function o(t,e,i){var r=getComputedStyle(t);return r[e]||r.getPropertyValue(e.replace(Pi,"-$1").toLowerCase())||r.getPropertyValue(e)||!i&&o(t,ee(e)||e,1)||""},br="O,Moz,ms,Ms,Webkit".split(","),ee=function(t,e,i){var r=e||qt,n=r.style,s=5;if(t in n&&!i)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);s--&&!(br[s]+t in n););return s<0?null:(s===3?"ms":s>=0?br[s]:"")+t},ki=function(){es()&&window.document&&(vr=window,Ct=vr.document,Jt=Ct.documentElement,qt=wi("div")||{style:{}},ts=wi("div"),z=ee(z),rt=z+"Origin",qt.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",Rr=!!ee("perspective"),Oi=$.core.reverting,Mi=1)},wr=function(t){var e=t.ownerSVGElement,i=wi("svg",e&&e.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),r=t.cloneNode(!0),n;r.style.display="block",i.appendChild(r),Jt.appendChild(i);try{n=r.getBBox()}catch{}return i.removeChild(r),Jt.removeChild(i),n},kr=function(t,e){for(var i=e.length;i--;)if(t.hasAttribute(e[i]))return t.getAttribute(e[i])},Lr=function(t){var e,i;try{e=t.getBBox()}catch{e=wr(t),i=1}return e&&(e.width||e.height)||i||(e=wr(t)),e&&!e.width&&!e.x&&!e.y?{x:+kr(t,["x","cx","x1"])||0,y:+kr(t,["y","cy","y1"])||0,width:0,height:0}:e},zr=function(t){return!!(t.getCTM&&(!t.parentNode||t.ownerSVGElement)&&Lr(t))},Yt=function(t,e){if(e){var i=t.style,r;e in wt&&e!==rt&&(e=z),i.removeProperty?(r=e.substr(0,2),(r==="ms"||e.substr(0,6)==="webkit")&&(e="-"+e),i.removeProperty(r==="--"?e:e.replace(Pi,"-$1").toLowerCase())):i.removeAttribute(e)}},Et=function(t,e,i,r,n,s){var a=new Z(t._pt,e,i,0,1,s?Er:Cr);return t._pt=a,a.b=r,a.e=n,t._props.push(i),a},Sr={deg:1,rad:1,turn:1},ps={grid:1,flex:1},Dt=function o(t,e,i,r){var n=parseFloat(i)||0,s=(i+"").trim().substr((n+"").length)||"px",a=qt.style,u=is.test(e),l=t.tagName.toLowerCase()==="svg",f=(l?"client":"offset")+(u?"Width":"Height"),_=100,c=r==="px",d=r==="%",p,h,m,y;if(r===s||!n||Sr[r]||Sr[s])return n;if(s!=="px"&&!c&&(n=o(t,e,i,"px")),y=t.getCTM&&zr(t),(d||s==="%")&&(wt[e]||~e.indexOf("adius")))return p=y?t.getBBox()[u?"width":"height"]:t[f],N(d?n/p*_:n/100*p);if(a[u?"width":"height"]=_+(c?s:r),h=r!=="rem"&&~e.indexOf("adius")||r==="em"&&t.appendChild&&!l?t:t.parentNode,y&&(h=(t.ownerSVGElement||{}).parentNode),(!h||h===Ct||!h.appendChild)&&(h=Ct.body),m=h._gsap,m&&d&&m.width&&u&&m.time===tt.time&&!m.uncache)return N(n/m.width*_);if(d&&(e==="height"||e==="width")){var v=t.style[e];t.style[e]=_+r,p=t[f],v?t.style[e]=v:Yt(t,e)}else(d||s==="%")&&!ps[ht(h,"display")]&&(a.position=ht(t,"position")),h===t&&(a.position="static"),h.appendChild(qt),p=qt[f],h.removeChild(qt),a.position="absolute";return u&&d&&(m=Mt(h),m.time=tt.time,m.width=h[f]),N(c?p*n/_:p&&n?_/p*n:0)},bt=function(t,e,i,r){var n;return Mi||ki(),e in gt&&e!=="transform"&&(e=gt[e],~e.indexOf(",")&&(e=e.split(",")[0])),wt[e]&&e!=="transform"?(n=me(t,r),n=e!=="transformOrigin"?n[e]:n.svg?n.origin:ze(ht(t,rt))+" "+n.zOrigin+"px"):(n=t.style[e],(!n||n==="auto"||r||~(n+"").indexOf("calc("))&&(n=Le[e]&&Le[e](t,e,i)||ht(t,e)||fi(t,e)||(e==="opacity"?1:0))),i&&!~(n+"").trim().indexOf(" ")?Dt(t,e,n,i)+i:n},ms=function(t,e,i,r){if(!i||i==="none"){var n=ee(e,t,1),s=n&&ht(t,n,1);s&&s!==i?(e=n,i=s):e==="borderColor"&&(i=ht(t,"borderTopColor"))}var a=new Z(this._pt,t.style,e,0,1,yi),u=0,l=0,f,_,c,d,p,h,m,y,v,T,x,g;if(a.b=i,a.e=r,i+="",r+="",r.substring(0,6)==="var(--"&&(r=ht(t,r.substring(4,r.indexOf(")")))),r==="auto"&&(h=t.style[e],t.style[e]=r,r=ht(t,e)||r,h?t.style[e]=h:Yt(t,e)),f=[i,r],_i(f),i=f[0],r=f[1],c=i.match(Nt)||[],g=r.match(Nt)||[],g.length){for(;_=Nt.exec(r);)m=_[0],v=r.substring(u,_.index),p?p=(p+1)%5:(v.substr(-5)==="rgba("||v.substr(-5)==="hsla(")&&(p=1),m!==(h=c[l++]||"")&&(d=parseFloat(h)||0,x=h.substr((d+"").length),m.charAt(1)==="="&&(m=It(d,m)+x),y=parseFloat(m),T=m.substr((y+"").length),u=Nt.lastIndex-T.length,T||(T=T||it.units[e]||x,u===r.length&&(r+=T,a.e+=T)),x!==T&&(d=Dt(t,e,h,T)||0),a._pt={_next:a._pt,p:v||l===1?v:",",s:d,c:y-d,m:p&&p<4||e==="zIndex"?Math.round:0});a.c=u<r.length?r.substring(u,r.length):""}else a.r=e==="display"&&r==="none"?Er:Cr;return si.test(r)&&(a.e=0),this._pt=a,a},Mr={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},gs=function(t){var e=t.split(" "),i=e[0],r=e[1]||"50%";return(i==="top"||i==="bottom"||r==="left"||r==="right")&&(t=i,i=r,r=t),e[0]=Mr[i]||i,e[1]=Mr[r]||r,e.join(" ")},ys=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var i=e.t,r=i.style,n=e.u,s=i._gsap,a,u,l;if(n==="all"||n===!0)r.cssText="",u=1;else for(n=n.split(","),l=n.length;--l>-1;)a=n[l],wt[a]&&(u=1,a=a==="transformOrigin"?rt:z),Yt(i,a);u&&(Yt(i,z),s&&(s.svg&&i.removeAttribute("transform"),r.scale=r.rotate=r.translate="none",me(i,1),s.uncache=1,Dr(r)))}},Le={clearProps:function(t,e,i,r,n){if(n.data!=="isFromStart"){var s=t._pt=new Z(t._pt,e,i,0,0,ys);return s.u=r,s.pr=-10,s.tween=n,t._props.push(i),1}}},pe=[1,0,0,1,0,0],Fr={},Nr=function(t){return t==="matrix(1, 0, 0, 1, 0, 0)"||t==="none"||!t},Or=function(t){var e=ht(t,z);return Nr(e)?pe:e.substr(7).match(ni).map(N)},Ci=function(t,e){var i=t._gsap||Mt(t),r=t.style,n=Or(t),s,a,u,l;return i.svg&&t.getAttribute("transform")?(u=t.transform.baseVal.consolidate().matrix,n=[u.a,u.b,u.c,u.d,u.e,u.f],n.join(",")==="1,0,0,1,0,0"?pe:n):(n===pe&&!t.offsetParent&&t!==Jt&&!i.svg&&(u=r.display,r.display="block",s=t.parentNode,(!s||!t.offsetParent&&!t.getBoundingClientRect().width)&&(l=1,a=t.nextElementSibling,Jt.appendChild(t)),n=Or(t),u?r.display=u:Yt(t,"display"),l&&(a?s.insertBefore(t,a):s?s.appendChild(t):Jt.removeChild(t))),e&&n.length>6?[n[0],n[1],n[4],n[5],n[12],n[13]]:n)},Si=function(t,e,i,r,n,s){var a=t._gsap,u=n||Ci(t,!0),l=a.xOrigin||0,f=a.yOrigin||0,_=a.xOffset||0,c=a.yOffset||0,d=u[0],p=u[1],h=u[2],m=u[3],y=u[4],v=u[5],T=e.split(" "),x=parseFloat(T[0])||0,g=parseFloat(T[1])||0,w,k,S,b;i?u!==pe&&(k=d*m-p*h)&&(S=x*(m/k)+g*(-h/k)+(h*v-m*y)/k,b=x*(-p/k)+g*(d/k)-(d*v-p*y)/k,x=S,g=b):(w=Lr(t),x=w.x+(~T[0].indexOf("%")?x/100*w.width:x),g=w.y+(~(T[1]||T[0]).indexOf("%")?g/100*w.height:g)),r||r!==!1&&a.smooth?(y=x-l,v=g-f,a.xOffset=_+(y*d+v*h)-y,a.yOffset=c+(y*p+v*m)-v):a.xOffset=a.yOffset=0,a.xOrigin=x,a.yOrigin=g,a.smooth=!!r,a.origin=e,a.originIsAbsolute=!!i,t.style[rt]="0px 0px",s&&(Et(s,a,"xOrigin",l,x),Et(s,a,"yOrigin",f,g),Et(s,a,"xOffset",_,a.xOffset),Et(s,a,"yOffset",c,a.yOffset)),t.setAttribute("data-svg-origin",x+" "+g)},me=function(t,e){var i=t._gsap||new ci(t);if("x"in i&&!e&&!i.uncache)return i;var r=t.style,n=i.scaleX<0,s="px",a="deg",u=getComputedStyle(t),l=ht(t,rt)||"0",f,_,c,d,p,h,m,y,v,T,x,g,w,k,S,b,O,A,E,D,Y,U,B,q,_t,ye,ie,re,At,Di,yt,Rt;return f=_=c=h=m=y=v=T=x=0,d=p=1,i.svg=!!(t.getCTM&&zr(t)),u.translate&&((u.translate!=="none"||u.scale!=="none"||u.rotate!=="none")&&(r[z]=(u.translate!=="none"?"translate3d("+(u.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(u.rotate!=="none"?"rotate("+u.rotate+") ":"")+(u.scale!=="none"?"scale("+u.scale.split(" ").join(",")+") ":"")+(u[z]!=="none"?u[z]:"")),r.scale=r.rotate=r.translate="none"),k=Ci(t,i.svg),i.svg&&(i.uncache?(_t=t.getBBox(),l=i.xOrigin-_t.x+"px "+(i.yOrigin-_t.y)+"px",q=""):q=!e&&t.getAttribute("data-svg-origin"),Si(t,q||l,!!q||i.originIsAbsolute,i.smooth!==!1,k)),g=i.xOrigin||0,w=i.yOrigin||0,k!==pe&&(A=k[0],E=k[1],D=k[2],Y=k[3],f=U=k[4],_=B=k[5],k.length===6?(d=Math.sqrt(A*A+E*E),p=Math.sqrt(Y*Y+D*D),h=A||E?jt(E,A)*Ut:0,v=D||Y?jt(D,Y)*Ut+h:0,v&&(p*=Math.abs(Math.cos(v*te))),i.svg&&(f-=g-(g*A+w*D),_-=w-(g*E+w*Y))):(Rt=k[6],Di=k[7],ie=k[8],re=k[9],At=k[10],yt=k[11],f=k[12],_=k[13],c=k[14],S=jt(Rt,At),m=S*Ut,S&&(b=Math.cos(-S),O=Math.sin(-S),q=U*b+ie*O,_t=B*b+re*O,ye=Rt*b+At*O,ie=U*-O+ie*b,re=B*-O+re*b,At=Rt*-O+At*b,yt=Di*-O+yt*b,U=q,B=_t,Rt=ye),S=jt(-D,At),y=S*Ut,S&&(b=Math.cos(-S),O=Math.sin(-S),q=A*b-ie*O,_t=E*b-re*O,ye=D*b-At*O,yt=Y*O+yt*b,A=q,E=_t,D=ye),S=jt(E,A),h=S*Ut,S&&(b=Math.cos(S),O=Math.sin(S),q=A*b+E*O,_t=U*b+B*O,E=E*b-A*O,B=B*b-U*O,A=q,U=_t),m&&Math.abs(m)+Math.abs(h)>359.9&&(m=h=0,y=180-y),d=N(Math.sqrt(A*A+E*E+D*D)),p=N(Math.sqrt(B*B+Rt*Rt)),S=jt(U,B),v=Math.abs(S)>2e-4?S*Ut:0,x=yt?1/(yt<0?-yt:yt):0),i.svg&&(q=t.getAttribute("transform"),i.forceCSS=t.setAttribute("transform","")||!Nr(ht(t,z)),q&&t.setAttribute("transform",q))),Math.abs(v)>90&&Math.abs(v)<270&&(n?(d*=-1,v+=h<=0?180:-180,h+=h<=0?180:-180):(p*=-1,v+=v<=0?180:-180)),e=e||i.uncache,i.x=f-((i.xPercent=f&&(!e&&i.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-f)?-50:0)))?t.offsetWidth*i.xPercent/100:0)+s,i.y=_-((i.yPercent=_&&(!e&&i.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-_)?-50:0)))?t.offsetHeight*i.yPercent/100:0)+s,i.z=c+s,i.scaleX=N(d),i.scaleY=N(p),i.rotation=N(h)+a,i.rotationX=N(m)+a,i.rotationY=N(y)+a,i.skewX=v+a,i.skewY=T+a,i.transformPerspective=x+s,(i.zOrigin=parseFloat(l.split(" ")[2])||!e&&i.zOrigin||0)&&(r[rt]=ze(l)),i.xOffset=i.yOffset=0,i.force3D=it.force3D,i.renderTransform=i.svg?Ts:Rr?Ir:vs,i.uncache=0,i},ze=function(t){return(t=t.split(" "))[0]+" "+t[1]},xi=function(t,e,i){var r=G(e);return N(parseFloat(e)+parseFloat(Dt(t,"x",i+"px",r)))+r},vs=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Ir(t,e)},Vt="0deg",de="0px",Ht=") ",Ir=function(t,e){var i=e||this,r=i.xPercent,n=i.yPercent,s=i.x,a=i.y,u=i.z,l=i.rotation,f=i.rotationY,_=i.rotationX,c=i.skewX,d=i.skewY,p=i.scaleX,h=i.scaleY,m=i.transformPerspective,y=i.force3D,v=i.target,T=i.zOrigin,x="",g=y==="auto"&&t&&t!==1||y===!0;if(T&&(_!==Vt||f!==Vt)){var w=parseFloat(f)*te,k=Math.sin(w),S=Math.cos(w),b;w=parseFloat(_)*te,b=Math.cos(w),s=xi(v,s,k*b*-T),a=xi(v,a,-Math.sin(w)*-T),u=xi(v,u,S*b*-T+T)}m!==de&&(x+="perspective("+m+Ht),(r||n)&&(x+="translate("+r+"%, "+n+"%) "),(g||s!==de||a!==de||u!==de)&&(x+=u!==de||g?"translate3d("+s+", "+a+", "+u+") ":"translate("+s+", "+a+Ht),l!==Vt&&(x+="rotate("+l+Ht),f!==Vt&&(x+="rotateY("+f+Ht),_!==Vt&&(x+="rotateX("+_+Ht),(c!==Vt||d!==Vt)&&(x+="skew("+c+", "+d+Ht),(p!==1||h!==1)&&(x+="scale("+p+", "+h+Ht),v.style[z]=x||"translate(0, 0)"},Ts=function(t,e){var i=e||this,r=i.xPercent,n=i.yPercent,s=i.x,a=i.y,u=i.rotation,l=i.skewX,f=i.skewY,_=i.scaleX,c=i.scaleY,d=i.target,p=i.xOrigin,h=i.yOrigin,m=i.xOffset,y=i.yOffset,v=i.forceCSS,T=parseFloat(s),x=parseFloat(a),g,w,k,S,b;u=parseFloat(u),l=parseFloat(l),f=parseFloat(f),f&&(f=parseFloat(f),l+=f,u+=f),u||l?(u*=te,l*=te,g=Math.cos(u)*_,w=Math.sin(u)*_,k=Math.sin(u-l)*-c,S=Math.cos(u-l)*c,l&&(f*=te,b=Math.tan(l-f),b=Math.sqrt(1+b*b),k*=b,S*=b,f&&(b=Math.tan(f),b=Math.sqrt(1+b*b),g*=b,w*=b)),g=N(g),w=N(w),k=N(k),S=N(S)):(g=_,S=c,w=k=0),(T&&!~(s+"").indexOf("px")||x&&!~(a+"").indexOf("px"))&&(T=Dt(d,"x",s,"px"),x=Dt(d,"y",a,"px")),(p||h||m||y)&&(T=N(T+p-(p*g+h*k)+m),x=N(x+h-(p*w+h*S)+y)),(r||n)&&(b=d.getBBox(),T=N(T+r/100*b.width),x=N(x+n/100*b.height)),b="matrix("+g+","+w+","+k+","+S+","+T+","+x+")",d.setAttribute("transform",b),v&&(d.style[z]=b)},xs=function(t,e,i,r,n){var s=360,a=H(n),u=parseFloat(n)*(a&&~n.indexOf("rad")?Ut:1),l=u-r,f=r+l+"deg",_,c;return a&&(_=n.split("_")[1],_==="short"&&(l%=s,l!==l%(s/2)&&(l+=l<0?s:-s)),_==="cw"&&l<0?l=(l+s*xr)%s-~~(l/s)*s:_==="ccw"&&l>0&&(l=(l-s*xr)%s-~~(l/s)*s)),t._pt=c=new Z(t._pt,e,i,r,l,ns),c.e=f,c.u="deg",t._props.push(i),c},Pr=function(t,e){for(var i in e)t[i]=e[i];return t},bs=function(t,e,i){var r=Pr({},i._gsap),n="perspective,force3D,transformOrigin,svgOrigin",s=i.style,a,u,l,f,_,c,d,p;r.svg?(l=i.getAttribute("transform"),i.setAttribute("transform",""),s[z]=e,a=me(i,1),Yt(i,z),i.setAttribute("transform",l)):(l=getComputedStyle(i)[z],s[z]=e,a=me(i,1),s[z]=l);for(u in wt)l=r[u],f=a[u],l!==f&&n.indexOf(u)<0&&(d=G(l),p=G(f),_=d!==p?Dt(i,u,l,p):parseFloat(l),c=parseFloat(f),t._pt=new Z(t._pt,a,u,_,c-_,bi),t._pt.u=p||0,t._props.push(u));Pr(a,r)};K("padding,margin,Width,Radius",function(o,t){var e="Top",i="Right",r="Bottom",n="Left",s=(t<3?[e,i,r,n]:[e+n,e+i,r+i,r+n]).map(function(a){return t<2?o+a:"border"+a+o});Le[t>1?"border"+o:o]=function(a,u,l,f,_){var c,d;if(arguments.length<4)return c=s.map(function(p){return bt(a,p,l)}),d=c.join(" "),d.split(c[0]).length===5?c[0]:d;c=(f+"").split(" "),d={},s.forEach(function(p,h){return d[p]=c[h]=c[h]||c[(h-1)/2|0]}),a.init(u,d,_)}});var Ei={name:"css",register:ki,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,i,r,n){var s=this._props,a=t.style,u=i.vars.startAt,l,f,_,c,d,p,h,m,y,v,T,x,g,w,k,S;Mi||ki(),this.styles=this.styles||Ar(t),S=this.styles.props,this.tween=i;for(h in e)if(h!=="autoRound"&&(f=e[h],!(J[h]&&pi(h,e,i,r,t,n)))){if(d=typeof f,p=Le[h],d==="function"&&(f=f.call(i,r,t,n),d=typeof f),d==="string"&&~f.indexOf("random(")&&(f=Zt(f)),p)p(this,t,h,f,i)&&(k=1);else if(h.substr(0,2)==="--")l=(getComputedStyle(t).getPropertyValue(h)+"").trim(),f+="",Tt.lastIndex=0,Tt.test(l)||(m=G(l),y=G(f)),y?m!==y&&(l=Dt(t,h,l,y)+y):m&&(f+=m),this.add(a,"setProperty",l,f,r,n,0,0,h),s.push(h),S.push(h,0,a[h]);else if(d!=="undefined"){if(u&&h in u?(l=typeof u[h]=="function"?u[h].call(i,r,t,n):u[h],H(l)&&~l.indexOf("random(")&&(l=Zt(l)),G(l+"")||l==="auto"||(l+=it.units[h]||G(bt(t,h))||""),(l+"").charAt(1)==="="&&(l=bt(t,h))):l=bt(t,h),c=parseFloat(l),v=d==="string"&&f.charAt(1)==="="&&f.substr(0,2),v&&(f=f.substr(2)),_=parseFloat(f),h in gt&&(h==="autoAlpha"&&(c===1&&bt(t,"visibility")==="hidden"&&_&&(c=0),S.push("visibility",0,a.visibility),Et(this,a,"visibility",c?"inherit":"hidden",_?"inherit":"hidden",!_)),h!=="scale"&&h!=="transform"&&(h=gt[h],~h.indexOf(",")&&(h=h.split(",")[0]))),T=h in wt,T){if(this.styles.save(h),d==="string"&&f.substring(0,6)==="var(--"&&(f=ht(t,f.substring(4,f.indexOf(")"))),_=parseFloat(f)),x||(g=t._gsap,g.renderTransform&&!e.parseTransform||me(t,e.parseTransform),w=e.smoothOrigin!==!1&&g.smooth,x=this._pt=new Z(this._pt,a,z,0,1,g.renderTransform,g,0,-1),x.dep=1),h==="scale")this._pt=new Z(this._pt,g,"scaleY",g.scaleY,(v?It(g.scaleY,v+_):_)-g.scaleY||0,bi),this._pt.u=0,s.push("scaleY",h),h+="X";else if(h==="transformOrigin"){S.push(rt,0,a[rt]),f=gs(f),g.svg?Si(t,f,0,w,0,this):(y=parseFloat(f.split(" ")[2])||0,y!==g.zOrigin&&Et(this,g,"zOrigin",g.zOrigin,y),Et(this,a,h,ze(l),ze(f)));continue}else if(h==="svgOrigin"){Si(t,f,1,w,0,this);continue}else if(h in Fr){xs(this,g,h,c,v?It(c,v+f):f);continue}else if(h==="smoothOrigin"){Et(this,g,"smooth",g.smooth,f);continue}else if(h==="force3D"){g[h]=f;continue}else if(h==="transform"){bs(this,f,t);continue}}else h in a||(h=ee(h)||h);if(T||(_||_===0)&&(c||c===0)&&!rs.test(f)&&h in a)m=(l+"").substr((c+"").length),_||(_=0),y=G(f)||(h in it.units?it.units[h]:m),m!==y&&(c=Dt(t,h,l,y)),this._pt=new Z(this._pt,T?g:a,h,c,(v?It(c,v+_):_)-c,!T&&(y==="px"||h==="zIndex")&&e.autoRound!==!1?as:bi),this._pt.u=y||0,m!==y&&y!=="%"&&(this._pt.b=l,this._pt.r=ss);else if(h in a)ms.call(this,t,h,l,v?v+f:f);else if(h in t)this.add(t,h,l||t[h],v?v+f:f,r,n);else if(h!=="parseTransform"){Ce(h,f);continue}T||(h in a?S.push(h,0,a[h]):typeof t[h]=="function"?S.push(h,2,t[h]()):S.push(h,1,l||t[h])),s.push(h)}}k&&Ti(this)},render:function(t,e){if(e.tween._time||!Oi())for(var i=e._pt;i;)i.r(t,i.d),i=i._next;else e.styles.revert()},get:bt,aliases:gt,getSetter:function(t,e,i){var r=gt[e];return r&&r.indexOf(",")<0&&(e=r),e in wt&&e!==rt&&(t._gsap.x||bt(t,"x"))?i&&Tr===i?e==="scale"?fs:ls:(Tr=i||{})&&(e==="scale"?hs:_s):t.style&&!Pe(t.style[e])?os:~e.indexOf("-")?us:Re(t,e)},core:{_removeProperty:Yt,_getMatrix:Ci}};$.utils.checkPrefix=ee;$.core.getStyleSaver=Ar;(function(o,t,e,i){var r=K(o+","+t+","+e,function(n){wt[n]=1});K(t,function(n){it.units[n]="deg",Fr[n]=1}),gt[r[13]]=o+","+t,K(i,function(n){var s=n.split(":");gt[s[1]]=r[s[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");K("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(o){it.units[o]="px"});$.registerPlugin(Ei);var j=$.registerPlugin(Ei)||$,Vs=j.core.Tween;var Ne=!1;var nt=null,Fe="light",ge=[{name:"solutions",width:1026,height:668,isCurrent:!1},{name:"resources",width:546,height:354,isCurrent:!1},{name:"company",width:436,height:354,isCurrent:!1}],ct=()=>({dropdownOverlay:document.querySelector('[data-nav-element="overlay"]'),navItems:document.querySelectorAll('[data-nav-item="link"]'),navItemsWrapper:document.querySelectorAll('[data-nav-animation="links"]'),dropdownMover:document.querySelector('[data-nav-item="dropdown-mover"]'),dropdownItems:document.querySelector('[data-nav-item="dropdown-mover"]'),tabLinks:document.querySelectorAll("[data-tab-link]"),tabContents:document.querySelectorAll("[data-tab-content]"),navigationModeElement:document.querySelector("[navigation-mode]"),navElements:document.querySelectorAll("[style-navigation]"),mover:document.querySelector('[data-nav-element="mover"]'),overlay:document.querySelector('[data-nav-element="overlay"]'),wrapper:document.querySelector('[data-nav-element="wrapper"]'),dropdownContents:document.querySelectorAll("[data-desktop-content]"),navlinks:document.querySelectorAll("[data-desktop-navlink]")});document.addEventListener("DOMContentLoaded",()=>{if(window.innerWidth>991){let o=ct();ws(),ks(o.tabLinks,o.tabContents),Ss(o.navItemsWrapper),Ms(o.navItems)}});function ws(){Fe=ct().navigationModeElement?.getAttribute("navigation-mode")||"light",Fe==="light"||Fe==="dark"&&Hr()}function Hr(){ct().navElements.forEach(t=>{switch(t.getAttribute("style-navigation")){case"navbg":t.style.backgroundColor="black";break;case"navlogo":t.style.color="white";break;case"navlink":t.style.color="white";break;case"button-primary":t.style.backgroundColor="white",t.style.color="black";break;case"button-secondary":t.style.color="white";break}})}function Ur(){ct().navElements.forEach(t=>{switch(t.getAttribute("style-navigation")){case"navbg":t.style.backgroundColor="white";break;case"navlogo":t.style.color="black";break;case"navlink":t.style.color="black";break;case"button-primary":t.style.backgroundColor="black",t.style.color="white";break;case"button-secondary":t.style.color="black";break}})}function ks(o,t){if(o.length>0){let e=o[0].getAttribute("data-tab-link");o[0].setAttribute("data-tab-link-active","true"),t.forEach(i=>{i.setAttribute("data-tab-content-active",i.getAttribute("data-tab-content")===e?"true":"false")}),o.forEach(i=>{i.addEventListener("mouseover",function(){let r=this.getAttribute("data-tab-link");o.forEach(n=>n.setAttribute("data-tab-link-active","false")),this.setAttribute("data-tab-link-active","true"),t.forEach(n=>{n.setAttribute("data-tab-content-active",n.getAttribute("data-tab-content")===r?"true":"false")})})})}}function Ss(o){o.forEach(t=>{t.addEventListener("mouseleave",()=>{Ne=!1,Fe==="dark"?Hr():Ur(),Ps()})})}function Ms(o){o.forEach(t=>{t.addEventListener("mouseenter",function(){let e=parseInt(this.getAttribute("data-nav-link")||"0",10);Ne?Br(this,e):(Br(this,e),Ne=!0,Ur())})})}function Br(o,t){nt&&nt.kill(),Ne?(Vr(t),Ds(t),Cs(o,t)):(Vr(t),As(t),Es(o,t),Os(t))}function Os(o){let t=ct(),e=ge[o].height;t.wrapper.style.display="block",t.overlay.style.display="block",j.killTweensOf([t.mover,t.overlay]),nt=j.timeline(),nt.to(t.overlay,{opacity:0,duration:.3,ease:"power2.out"}),nt.to(t.mover,{height:`${e}px`,duration:.4,ease:"power2.out"},"-=0.2")}function Ps(){let o=ct();nt&&nt.kill(),nt=j.timeline(),nt.to(o.mover,{height:0,duration:.3,ease:"power2.in"}),nt.to(o.overlay,{opacity:0,duration:.3,ease:"power2.out"},"-=0.1"),nt.to(o.navlinks,{opacity:1,duration:.2},"-=0.2"),nt.call(()=>{o.wrapper.style.display="none",o.overlay.style.display="none",o.dropdownContents.forEach(t=>{t.style.display="none",t.style.opacity="0"})})}function Cs(o,t){let e=ct(),i=ge[t].height,r=ge[t].width,n=o.getBoundingClientRect(),s=o.parentElement.getBoundingClientRect(),a=n.left-s.left;j.killTweensOf(e.mover),nt=j.timeline(),nt.to(e.mover,{x:a,width:`${r}px`,height:`${i}px`,duration:.2,ease:"power2.out"})}function Es(o,t){let e=ct(),i=ge[t].height,r=ge[t].width,n=o.getBoundingClientRect(),s=o.parentElement.getBoundingClientRect(),a=n.left-s.left;j.set(e.mover,{x:a,height:"0px",width:`${r}px`})}function Ds(o){let t=ct();j.killTweensOf(t.dropdownContents),j.timeline().to(t.dropdownContents,{opacity:0,duration:.15,onComplete:()=>{t.dropdownContents.forEach(r=>{r.style.display="none"});let i=t.dropdownContents[o];i&&(o===0||o===1||o===2?i.style.display="grid":i.style.display="block",j.to(i,{opacity:1,duration:.15}))}})}function As(o){let t=ct();t.dropdownContents.forEach(i=>{i.style.opacity="0",i.style.display="none"});let e=t.dropdownContents[o];e&&(o===0||o===1||o===2?e.style.display="grid":e.style.display="block",j.to(e,{opacity:1,duration:.2,delay:.1}))}function Vr(o){let t=ct(),e=t.navlinks[o];j.killTweensOf(t.navlinks),j.to(t.navlinks,{opacity:.5,duration:.15}),j.to(e,{opacity:1,duration:.15})}})();
4603
2
  /*! Bundled license information:
4604
3
 
4605
4
  gsap/gsap-core.js:
@@ -4622,4 +21,3 @@ gsap/CSSPlugin.js:
4622
21
  * @author: Jack Doyle, jack@greensock.com
4623
22
  *)
4624
23
  */
4625
- //# sourceMappingURL=index.js.map