Showing preview only (3,915K chars total). Download the full file or copy to clipboard to get everything.
Repository: greensock/GSAP
Branch: master
Commit: e830e8fc16fa
Files: 130
Total size: 3.7 MB
Directory structure:
gitextract_1zvquy92/
├── .gitignore
├── README.md
├── SECURITY.md
├── dist/
│ ├── CSSRulePlugin.js
│ ├── CustomBounce.js
│ ├── CustomEase.js
│ ├── CustomWiggle.js
│ ├── Draggable.js
│ ├── DrawSVGPlugin.js
│ ├── EasePack.js
│ ├── EaselPlugin.js
│ ├── Flip.js
│ ├── GSDevTools.js
│ ├── InertiaPlugin.js
│ ├── MorphSVGPlugin.js
│ ├── MotionPathHelper.js
│ ├── MotionPathPlugin.js
│ ├── Observer.js
│ ├── Physics2DPlugin.js
│ ├── PhysicsPropsPlugin.js
│ ├── PixiPlugin.js
│ ├── ScrambleTextPlugin.js
│ ├── ScrollSmoother.js
│ ├── ScrollToPlugin.js
│ ├── ScrollTrigger.js
│ ├── SplitText.js
│ ├── TextPlugin.js
│ ├── all.js
│ └── gsap.js
├── esm/
│ ├── CSSPlugin.js
│ ├── CSSRulePlugin.js
│ ├── CustomBounce.js
│ ├── CustomEase.js
│ ├── CustomWiggle.js
│ ├── Draggable.js
│ ├── DrawSVGPlugin.js
│ ├── EasePack.js
│ ├── EaselPlugin.js
│ ├── Flip.js
│ ├── GSDevTools.js
│ ├── InertiaPlugin.js
│ ├── MorphSVGPlugin.js
│ ├── MotionPathHelper.js
│ ├── MotionPathPlugin.js
│ ├── Observer.js
│ ├── Physics2DPlugin.js
│ ├── PhysicsPropsPlugin.js
│ ├── PixiPlugin.js
│ ├── ScrambleTextPlugin.js
│ ├── ScrollSmoother.js
│ ├── ScrollToPlugin.js
│ ├── ScrollTrigger.js
│ ├── SplitText.js
│ ├── TextPlugin.js
│ ├── all.js
│ ├── gsap-core.js
│ ├── index.js
│ └── utils/
│ ├── PathEditor.js
│ ├── VelocityTracker.js
│ ├── matrix.js
│ ├── paths.js
│ └── strings.js
├── package.json
├── src/
│ ├── CSSPlugin.js
│ ├── CSSRulePlugin.js
│ ├── CustomBounce.js
│ ├── CustomEase.js
│ ├── CustomWiggle.js
│ ├── Draggable.js
│ ├── DrawSVGPlugin.js
│ ├── EasePack.js
│ ├── EaselPlugin.js
│ ├── Flip.js
│ ├── GSDevTools.js
│ ├── InertiaPlugin.js
│ ├── MorphSVGPlugin.js
│ ├── MotionPathHelper.js
│ ├── MotionPathPlugin.js
│ ├── Observer.js
│ ├── Physics2DPlugin.js
│ ├── PhysicsPropsPlugin.js
│ ├── PixiPlugin.js
│ ├── ScrambleTextPlugin.js
│ ├── ScrollSmoother.js
│ ├── ScrollToPlugin.js
│ ├── ScrollTrigger.js
│ ├── SplitText.js
│ ├── SplitText.ts
│ ├── TextPlugin.js
│ ├── all.js
│ ├── gsap-core.js
│ ├── index.js
│ └── utils/
│ ├── PathEditor.js
│ ├── VelocityTracker.js
│ ├── matrix.js
│ ├── paths.js
│ └── strings.js
└── types/
├── animation.d.ts
├── css-plugin.d.ts
├── css-rule-plugin.d.ts
├── custom-bounce.d.ts
├── custom-ease.d.ts
├── custom-wiggle.d.ts
├── draggable.d.ts
├── draw-svg-plugin.d.ts
├── ease.d.ts
├── easel-plugin.d.ts
├── flip.d.ts
├── gs-dev-tools.d.ts
├── gsap-core.d.ts
├── gsap-plugins.d.ts
├── gsap-utils.d.ts
├── index.d.ts
├── inertia-plugin.d.ts
├── morph-svg-plugin.d.ts
├── motion-path-helper.d.ts
├── motion-path-plugin.d.ts
├── observer.d.ts
├── physics-2d-plugin.d.ts
├── physics-props-plugin.d.ts
├── pixi-plugin.d.ts
├── scramble-text-plugin.d.ts
├── scroll-smoother.d.ts
├── scroll-to-plugin.d.ts
├── scroll-trigger.d.ts
├── split-text.d.ts
├── text-plugin.d.ts
├── timeline.d.ts
├── tween.d.ts
└── utils/
└── velocity-tracker.d.ts
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitignore
================================================
.DS_Store
.AppleDouble
.LSOverride
Icon
# Thumbnails
._*
# Files that might appear on external disk
.Spotlight-V100
.Trashes
# Windows image file caches
Thumbs.db
ehthumbs.db
# Folder config file
Desktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
================================================
FILE: README.md
================================================
# GSAP (GreenSock Animation Platform)
[](https://gsap.com)
GSAP is a **framework-agnostic** JavaScript animation library that turns developers into animation superheroes. Build high-performance animations that work in **every** major browser. Animate CSS, SVG, canvas, React, Vue, WebGL, colors, strings, motion paths, generic objects... anything JavaScript can touch! GSAP's <a href="https://gsap.com/docs/v3/Plugins/ScrollTrigger/">ScrollTrigger</a> plugin delivers jaw-dropping scroll-based animations with minimal code. <a href="https://gsap.com/docs/v3/GSAP/gsap.matchMedia()">gsap.matchMedia()</a> makes building responsive, accessibility-friendly animations a breeze.
No other library delivers such advanced sequencing, reliability, and tight control while solving real-world problems on over 12 million sites. GSAP works around countless browser inconsistencies; your animations ***just work***. At its core, GSAP is a high-speed property manipulator, updating values over time with extreme accuracy. It's up to 20x faster than jQuery!
GSAP is completely flexible; sprinkle it wherever you want. **Zero dependencies.**
There are many optional <a href="https://gsap.com/docs/v3/Plugins">plugins</a> and <a href="https://gsap.com/docs/v3/Eases">easing</a> functions for achieving advanced effects easily like <a href="https://gsap.com/docs/v3/Plugins/ScrollTrigger/">scrolling</a>, <a href="https://gsap.com/docs/v3/Plugins/MorphSVGPlugin">morphing</a>, [text splitting](https://gsap.com/docs/v3/Plugins/SplitText), animating along a <a href="https://gsap.com/docs/v3/Plugins/MotionPathPlugin">motion path</a> or <a href="https://gsap.com/docs/v3/Plugins/Flip/">FLIP</a> animations. There's even a handy <a href="https://gsap.com/docs/v3/Plugins/Observer/">Observer</a> for normalizing event detection across browsers/devices.
### Get Started
[](https://gsap.com/get-started)
## Docs & Installation
View the <a href="https://gsap.com/docs">full documentation here</a>, including an <a href="https://gsap.com/install">installation guide</a>.
### CDN
```html
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14/dist/gsap.min.js"></script>
```
See <a href="https://www.jsdelivr.com/gsap">JSDelivr's dedicated GSAP page</a> for quick CDN links to the core files/plugins. There are more <a href="https://gsap.com/install">installation instructions</a> at gsap.com.
**Every major ad network excludes GSAP from file size calculations** and most have it on their own CDNs, so contact them for the appropriate URL(s).
### NPM
See the <a href="https://gsap.com/install">guide to using GSAP via NPM here</a>.
```javascript
npm install gsap
```
GSAP's core can animate almost anything including CSS and attributes, plus it includes all of the <a href="https://gsap.com/docs/v3/GSAP/UtilityMethods">utility methods</a> like <a href="https://gsap.com/docs/v3/GSAP/UtilityMethods/interpolate()">interpolate()</a>, <a href="https://gsap.com/docs/v3/GSAP/UtilityMethods/mapRange()">mapRange()</a>, most of the <a href="https://gsap.com/docs/v3/Eases">eases</a>, and it can do snapping and modifiers.
```javascript
// typical import
import gsap from "gsap";
// get other plugins:
import ScrollTrigger from "gsap/ScrollTrigger";
import Flip from "gsap/Flip";
import Draggable from "gsap/Draggable";
// or all tools are exported from the "all" file (excluding members-only plugins):
import { gsap, ScrollTrigger, Draggable, MotionPathPlugin } from "gsap/all";
// don't forget to register plugins
gsap.registerPlugin(ScrollTrigger, Draggable, Flip, MotionPathPlugin);
```
The NPM files are ES modules, but there's also a /dist/ directory with <a href="https://www.davidbcalhoun.com/2014/what-is-amd-commonjs-and-umd/">UMD</a> files for extra compatibility.
## GSAP is FREE!
Thanks to [Webflow](https://webflow.com), GSAP is now **100% FREE** including ALL of the bonus plugins like [SplitText](https://gsap.com/docs/v3/Plugins/SplitText), [MorphSVG](https://gsap.com/docs/v3/Plugins/MorphSVGPlugin), and all the others that were exclusively available to Club GSAP members. That's right - the entire GSAP toolset is FREE, even for commercial use! 🤯 Read more [here](https://webflow.com/blog/gsap-becomes-free)
### ScrollTrigger & ScrollSmoother
If you're looking for scroll-driven animations, GSAP's <a href="https://gsap.com/docs/v3/Plugins/ScrollTrigger/">ScrollTrigger</a> plugin is the standard. There's a companion <a href="https://gsap.com/docs/v3/Plugins/ScrollSmoother/">ScrollSmoother</a> as well.
[](https://gsap.com/docs/v3/Plugins/ScrollTrigger)
### Using React?
There's a <a href="https://www.npmjs.com/package/@gsap/react">@gsap/react</a> package that exposes a `useGSAP()` hook which is a drop-in replacement for `useEffect()`/`useLayoutEffect()`, automating cleanup tasks. Please read the <a href="https://gsap.com/react">React guide</a> for details.
### Resources
* <a href="https://gsap.com/">gsap.com</a>
* <a href="https://gsap.com/get-started/">Getting started guide</a>
* <a href="https://gsap.com/docs/">Docs</a>
* <a href="https://gsap.com/demos">Demos & starter templates</a>
* <a href="https://gsap.com/community/">Community forums</a>
* <a href="https://gsap.com/docs/v3/Eases">Ease Visualizer</a>
* <a href="https://gsap.com/showcase">Showcase</a>
* <a href="https://www.youtube.com/@GreenSockLearning">YouTube Channel</a>
* <a href="https://gsap.com/cheatsheet">Cheat sheet</a>
* <a href="https://webflow.com">Webflow</a>
### Need help?
Ask in the friendly <a href="https://gsap.com/community/">GSAP forums</a>. Or share your knowledge and help someone else - it's a great way to sharpen your skills! Report any bugs there too (or <a href="https://github.com/greensock/GSAP/issues">file an issue here</a> if you prefer).
### License
GreenSock's standard "no charge" license can be viewed at <a href="https://gsap.com/standard-license">https://gsap.com/standard-license</a>.
Copyright (c) 2008-2025, GreenSock. All rights reserved.
================================================
FILE: SECURITY.md
================================================
# Security Policy
Please report (suspected) security vulnerabilities to
**[info@greensock.com](mailto:info@greensock.com)**. You will receive a response from
us within 72 hours. If the issue is confirmed, we will release a patch as soon
as possible depending on complexity.
================================================
FILE: dist/CSSRulePlugin.js
================================================
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
/*!
* CSSRulePlugin 3.14.2
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var gsap,
_coreInitted,
_doc,
CSSPlugin,
_windowExists = function _windowExists() {
return typeof window !== "undefined";
},
_getGSAP = function _getGSAP() {
return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap;
},
_checkRegister = function _checkRegister() {
if (!_coreInitted) {
_initCore();
if (!CSSPlugin) {
console.warn("Please gsap.registerPlugin(CSSPlugin, CSSRulePlugin)");
}
}
return _coreInitted;
},
_initCore = function _initCore(core) {
gsap = core || _getGSAP();
if (_windowExists()) {
_doc = document;
}
if (gsap) {
CSSPlugin = gsap.plugins.css;
if (CSSPlugin) {
_coreInitted = 1;
}
}
};
var CSSRulePlugin = {
version: "3.14.2",
name: "cssRule",
init: function init(target, value, tween, index, targets) {
if (!_checkRegister() || typeof target.cssText === "undefined") {
return false;
}
var div = target._gsProxy = target._gsProxy || _doc.createElement("div");
this.ss = target;
this.style = div.style;
div.style.cssText = target.cssText;
CSSPlugin.prototype.init.call(this, div, value, tween, index, targets);
},
render: function render(ratio, data) {
var pt = data._pt,
style = data.style,
ss = data.ss,
i;
while (pt) {
pt.r(ratio, pt.d);
pt = pt._next;
}
i = style.length;
while (--i > -1) {
ss[style[i]] = style[style[i]];
}
},
getRule: function getRule(selector) {
_checkRegister();
var ruleProp = _doc.all ? "rules" : "cssRules",
styleSheets = _doc.styleSheets,
i = styleSheets.length,
pseudo = selector.charAt(0) === ":",
j,
curSS,
cs,
a;
selector = (pseudo ? "" : ",") + selector.split("::").join(":").toLowerCase() + ",";
if (pseudo) {
a = [];
}
while (i--) {
try {
curSS = styleSheets[i][ruleProp];
if (!curSS) {
continue;
}
j = curSS.length;
} catch (e) {
console.warn(e);
continue;
}
while (--j > -1) {
cs = curSS[j];
if (cs.selectorText && ("," + cs.selectorText.split("::").join(":").toLowerCase() + ",").indexOf(selector) !== -1) {
if (pseudo) {
a.push(cs.style);
} else {
return cs.style;
}
}
}
}
return a;
},
register: _initCore
};
_getGSAP() && gsap.registerPlugin(CSSRulePlugin);
exports.CSSRulePlugin = CSSRulePlugin;
exports.default = CSSRulePlugin;
Object.defineProperty(exports, '__esModule', { value: true });
})));
================================================
FILE: dist/CustomBounce.js
================================================
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
/*!
* CustomBounce 3.14.2
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var gsap,
_coreInitted,
createCustomEase,
_getGSAP = function _getGSAP() {
return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap;
},
_initCore = function _initCore(required) {
gsap = _getGSAP();
createCustomEase = gsap && gsap.parseEase("_CE");
if (createCustomEase) {
_coreInitted = 1;
gsap.parseEase("bounce").config = function (vars) {
return typeof vars === "object" ? _create("", vars) : _create("bounce(" + vars + ")", {
strength: +vars
});
};
} else {
required && console.warn("Please gsap.registerPlugin(CustomEase, CustomBounce)");
}
},
_normalizeX = function _normalizeX(a) {
var l = a.length,
s = 1 / a[l - 2],
rnd = 1000,
i;
for (i = 2; i < l; i += 2) {
a[i] = ~~(a[i] * s * rnd) / rnd;
}
a[l - 2] = 1;
},
_create = function _create(id, vars) {
if (!_coreInitted) {
_initCore(1);
}
vars = vars || {};
{
var max = 0.999,
decay = Math.min(max, vars.strength || 0.7),
decayX = decay,
gap = (vars.squash || 0) / 100,
originalGap = gap,
slope = 1 / 0.03,
w = 0.2,
h = 1,
prevX = 0.1,
path = [0, 0, 0.07, 0, 0.1, 1, 0.1, 1],
squashPath = [0, 0, 0, 0, 0.1, 0, 0.1, 0],
cp1,
cp2,
x,
y,
i,
nextX,
squishMagnitude;
for (i = 0; i < 200; i++) {
w *= decayX * ((decayX + 1) / 2);
h *= decay * decay;
nextX = prevX + w;
x = prevX + w * 0.49;
y = 1 - h;
cp1 = prevX + h / slope;
cp2 = x + (x - cp1) * 0.8;
if (gap) {
prevX += gap;
cp1 += gap;
x += gap;
cp2 += gap;
nextX += gap;
squishMagnitude = gap / originalGap;
squashPath.push(prevX - gap, 0, prevX - gap, squishMagnitude, prevX - gap / 2, squishMagnitude, prevX, squishMagnitude, prevX, 0, prevX, 0, prevX, squishMagnitude * -0.6, prevX + (nextX - prevX) / 6, 0, nextX, 0);
path.push(prevX - gap, 1, prevX, 1, prevX, 1);
gap *= decay * decay;
}
path.push(prevX, 1, cp1, y, x, y, cp2, y, nextX, 1, nextX, 1);
decay *= 0.95;
slope = h / (nextX - cp2);
prevX = nextX;
if (y > max) {
break;
}
}
if (vars.endAtStart && vars.endAtStart !== "false") {
x = -0.1;
path.unshift(x, 1, x, 1, -0.07, 0);
if (originalGap) {
gap = originalGap * 2.5;
x -= gap;
path.unshift(x, 1, x, 1, x, 1);
squashPath.splice(0, 6);
squashPath.unshift(x, 0, x, 0, x, 1, x + gap / 2, 1, x + gap, 1, x + gap, 0, x + gap, 0, x + gap, -0.6, x + gap + 0.033, 0);
for (i = 0; i < squashPath.length; i += 2) {
squashPath[i] -= x;
}
}
for (i = 0; i < path.length; i += 2) {
path[i] -= x;
path[i + 1] = 1 - path[i + 1];
}
}
if (gap) {
_normalizeX(squashPath);
squashPath[2] = "C" + squashPath[2];
createCustomEase(vars.squashID || id + "-squash", "M" + squashPath.join(","));
}
_normalizeX(path);
path[2] = "C" + path[2];
return createCustomEase(id, "M" + path.join(","));
}
};
var CustomBounce = function () {
function CustomBounce(id, vars) {
this.ease = _create(id, vars);
}
CustomBounce.create = function create(id, vars) {
return _create(id, vars);
};
CustomBounce.register = function register(core) {
gsap = core;
_initCore();
};
return CustomBounce;
}();
_getGSAP() && gsap.registerPlugin(CustomBounce);
CustomBounce.version = "3.14.2";
exports.CustomBounce = CustomBounce;
exports.default = CustomBounce;
Object.defineProperty(exports, '__esModule', { value: true });
})));
================================================
FILE: dist/CustomEase.js
================================================
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
var _svgPathExp = /[achlmqstvz]|(-?\d*\.?\d*(?:e[\-+]?\d+)?)[0-9]/ig,
_scientific = /[\+\-]?\d*\.?\d+e[\+\-]?\d+/ig,
_DEG2RAD = Math.PI / 180,
_sin = Math.sin,
_cos = Math.cos,
_abs = Math.abs,
_sqrt = Math.sqrt,
_isNumber = function _isNumber(value) {
return typeof value === "number";
},
_roundingNum = 1e5,
_round = function _round(value) {
return Math.round(value * _roundingNum) / _roundingNum || 0;
},
_segmentIsClosed = function _segmentIsClosed(segment) {
return segment.closed = Math.abs(segment[0] - segment[segment.length - 2]) < 0.001 && Math.abs(segment[1] - segment[segment.length - 1]) < 0.001;
};
function transformRawPath(rawPath, a, b, c, d, tx, ty) {
var j = rawPath.length,
segment,
l,
i,
x,
y;
while (--j > -1) {
segment = rawPath[j];
l = segment.length;
for (i = 0; i < l; i += 2) {
x = segment[i];
y = segment[i + 1];
segment[i] = x * a + y * c + tx;
segment[i + 1] = x * b + y * d + ty;
}
}
rawPath._dirty = 1;
return rawPath;
}
function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFlag, x, y) {
if (lastX === x && lastY === y) {
return;
}
rx = _abs(rx);
ry = _abs(ry);
var angleRad = angle % 360 * _DEG2RAD,
cosAngle = _cos(angleRad),
sinAngle = _sin(angleRad),
PI = Math.PI,
TWOPI = PI * 2,
dx2 = (lastX - x) / 2,
dy2 = (lastY - y) / 2,
x1 = cosAngle * dx2 + sinAngle * dy2,
y1 = -sinAngle * dx2 + cosAngle * dy2,
x1_sq = x1 * x1,
y1_sq = y1 * y1,
radiiCheck = x1_sq / (rx * rx) + y1_sq / (ry * ry);
if (radiiCheck > 1) {
rx = _sqrt(radiiCheck) * rx;
ry = _sqrt(radiiCheck) * ry;
}
var rx_sq = rx * rx,
ry_sq = ry * ry,
sq = (rx_sq * ry_sq - rx_sq * y1_sq - ry_sq * x1_sq) / (rx_sq * y1_sq + ry_sq * x1_sq);
if (sq < 0) {
sq = 0;
}
var coef = (largeArcFlag === sweepFlag ? -1 : 1) * _sqrt(sq),
cx1 = coef * (rx * y1 / ry),
cy1 = coef * -(ry * x1 / rx),
sx2 = (lastX + x) / 2,
sy2 = (lastY + y) / 2,
cx = sx2 + (cosAngle * cx1 - sinAngle * cy1),
cy = sy2 + (sinAngle * cx1 + cosAngle * cy1),
ux = (x1 - cx1) / rx,
uy = (y1 - cy1) / ry,
vx = (-x1 - cx1) / rx,
vy = (-y1 - cy1) / ry,
temp = ux * ux + uy * uy,
angleStart = (uy < 0 ? -1 : 1) * Math.acos(ux / _sqrt(temp)),
angleExtent = (ux * vy - uy * vx < 0 ? -1 : 1) * Math.acos((ux * vx + uy * vy) / _sqrt(temp * (vx * vx + vy * vy)));
isNaN(angleExtent) && (angleExtent = PI);
if (!sweepFlag && angleExtent > 0) {
angleExtent -= TWOPI;
} else if (sweepFlag && angleExtent < 0) {
angleExtent += TWOPI;
}
angleStart %= TWOPI;
angleExtent %= TWOPI;
var segments = Math.ceil(_abs(angleExtent) / (TWOPI / 4)),
rawPath = [],
angleIncrement = angleExtent / segments,
controlLength = 4 / 3 * _sin(angleIncrement / 2) / (1 + _cos(angleIncrement / 2)),
ma = cosAngle * rx,
mb = sinAngle * rx,
mc = sinAngle * -ry,
md = cosAngle * ry,
i;
for (i = 0; i < segments; i++) {
angle = angleStart + i * angleIncrement;
x1 = _cos(angle);
y1 = _sin(angle);
ux = _cos(angle += angleIncrement);
uy = _sin(angle);
rawPath.push(x1 - controlLength * y1, y1 + controlLength * x1, ux + controlLength * uy, uy - controlLength * ux, ux, uy);
}
for (i = 0; i < rawPath.length; i += 2) {
x1 = rawPath[i];
y1 = rawPath[i + 1];
rawPath[i] = x1 * ma + y1 * mc + cx;
rawPath[i + 1] = x1 * mb + y1 * md + cy;
}
rawPath[i - 2] = x;
rawPath[i - 1] = y;
return rawPath;
}
function stringToRawPath(d) {
var a = (d + "").replace(_scientific, function (m) {
var n = +m;
return n < 0.0001 && n > -0.0001 ? 0 : n;
}).match(_svgPathExp) || [],
path = [],
relativeX = 0,
relativeY = 0,
twoThirds = 2 / 3,
elements = a.length,
points = 0,
errorMessage = "ERROR: malformed path: " + d,
i,
j,
x,
y,
command,
isRelative,
segment,
startX,
startY,
difX,
difY,
beziers,
prevCommand,
flag1,
flag2,
line = function line(sx, sy, ex, ey) {
difX = (ex - sx) / 3;
difY = (ey - sy) / 3;
segment.push(sx + difX, sy + difY, ex - difX, ey - difY, ex, ey);
};
if (!d || !isNaN(a[0]) || isNaN(a[1])) {
console.log(errorMessage);
return path;
}
for (i = 0; i < elements; i++) {
prevCommand = command;
if (isNaN(a[i])) {
command = a[i].toUpperCase();
isRelative = command !== a[i];
} else {
i--;
}
x = +a[i + 1];
y = +a[i + 2];
if (isRelative) {
x += relativeX;
y += relativeY;
}
if (!i) {
startX = x;
startY = y;
}
if (command === "M") {
if (segment) {
if (segment.length < 8) {
path.length -= 1;
} else {
points += segment.length;
}
_segmentIsClosed(segment);
}
relativeX = startX = x;
relativeY = startY = y;
segment = [x, y];
path.push(segment);
i += 2;
command = "L";
} else if (command === "C") {
if (!segment) {
segment = [0, 0];
}
if (!isRelative) {
relativeX = relativeY = 0;
}
segment.push(x, y, relativeX + a[i + 3] * 1, relativeY + a[i + 4] * 1, relativeX += a[i + 5] * 1, relativeY += a[i + 6] * 1);
i += 6;
} else if (command === "S") {
difX = relativeX;
difY = relativeY;
if (prevCommand === "C" || prevCommand === "S") {
difX += relativeX - segment[segment.length - 4];
difY += relativeY - segment[segment.length - 3];
}
if (!isRelative) {
relativeX = relativeY = 0;
}
segment.push(difX, difY, x, y, relativeX += a[i + 3] * 1, relativeY += a[i + 4] * 1);
i += 4;
} else if (command === "Q") {
difX = relativeX + (x - relativeX) * twoThirds;
difY = relativeY + (y - relativeY) * twoThirds;
if (!isRelative) {
relativeX = relativeY = 0;
}
relativeX += a[i + 3] * 1;
relativeY += a[i + 4] * 1;
segment.push(difX, difY, relativeX + (x - relativeX) * twoThirds, relativeY + (y - relativeY) * twoThirds, relativeX, relativeY);
i += 4;
} else if (command === "T") {
difX = relativeX - segment[segment.length - 4];
difY = relativeY - segment[segment.length - 3];
segment.push(relativeX + difX, relativeY + difY, x + (relativeX + difX * 1.5 - x) * twoThirds, y + (relativeY + difY * 1.5 - y) * twoThirds, relativeX = x, relativeY = y);
i += 2;
} else if (command === "H") {
line(relativeX, relativeY, relativeX = x, relativeY);
i += 1;
} else if (command === "V") {
line(relativeX, relativeY, relativeX, relativeY = x + (isRelative ? relativeY - relativeX : 0));
i += 1;
} else if (command === "L" || command === "Z") {
if (command === "Z") {
x = startX;
y = startY;
segment.closed = true;
}
if (command === "L" || _abs(relativeX - x) > 0.5 || _abs(relativeY - y) > 0.5) {
line(relativeX, relativeY, x, y);
if (command === "L") {
i += 2;
}
}
relativeX = x;
relativeY = y;
} else if (command === "A") {
flag1 = a[i + 4];
flag2 = a[i + 5];
difX = a[i + 6];
difY = a[i + 7];
j = 7;
if (flag1.length > 1) {
if (flag1.length < 3) {
difY = difX;
difX = flag2;
j--;
} else {
difY = flag2;
difX = flag1.substr(2);
j -= 2;
}
flag2 = flag1.charAt(1);
flag1 = flag1.charAt(0);
}
beziers = arcToSegment(relativeX, relativeY, +a[i + 1], +a[i + 2], +a[i + 3], +flag1, +flag2, (isRelative ? relativeX : 0) + difX * 1, (isRelative ? relativeY : 0) + difY * 1);
i += j;
if (beziers) {
for (j = 0; j < beziers.length; j++) {
segment.push(beziers[j]);
}
}
relativeX = segment[segment.length - 2];
relativeY = segment[segment.length - 1];
} else {
console.log(errorMessage);
}
}
i = segment.length;
if (i < 6) {
path.pop();
i = 0;
} else {
_segmentIsClosed(segment);
}
path.totalPoints = points + i;
return path;
}
function rawPathToString(rawPath) {
if (_isNumber(rawPath[0])) {
rawPath = [rawPath];
}
var result = "",
l = rawPath.length,
sl,
s,
i,
segment;
for (s = 0; s < l; s++) {
segment = rawPath[s];
result += "M" + _round(segment[0]) + "," + _round(segment[1]) + " C";
sl = segment.length;
for (i = 2; i < sl; i++) {
result += _round(segment[i++]) + "," + _round(segment[i++]) + " " + _round(segment[i++]) + "," + _round(segment[i++]) + " " + _round(segment[i++]) + "," + _round(segment[i]) + " ";
}
if (segment.closed) {
result += "z";
}
}
return result;
}
/*!
* CustomEase 3.14.2
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var gsap,
_coreInitted,
_getGSAP = function _getGSAP() {
return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap;
},
_initCore = function _initCore() {
gsap = _getGSAP();
if (gsap) {
gsap.registerEase("_CE", CustomEase.create);
_coreInitted = 1;
} else {
console.warn("Please gsap.registerPlugin(CustomEase)");
}
},
_bigNum = 1e20,
_round$1 = function _round(value) {
return ~~(value * 1000 + (value < 0 ? -.5 : .5)) / 1000;
},
_numExp = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/gi,
_needsParsingExp = /[cLlsSaAhHvVtTqQ]/g,
_findMinimum = function _findMinimum(values) {
var l = values.length,
min = _bigNum,
i;
for (i = 1; i < l; i += 6) {
+values[i] < min && (min = +values[i]);
}
return min;
},
_normalize = function _normalize(values, height, originY) {
if (!originY && originY !== 0) {
originY = Math.max(+values[values.length - 1], +values[1]);
}
var tx = +values[0] * -1,
ty = -originY,
l = values.length,
sx = 1 / (+values[l - 2] + tx),
sy = -height || (Math.abs(+values[l - 1] - +values[1]) < 0.01 * (+values[l - 2] - +values[0]) ? _findMinimum(values) + ty : +values[l - 1] + ty),
i;
if (sy) {
sy = 1 / sy;
} else {
sy = -sx;
}
for (i = 0; i < l; i += 2) {
values[i] = (+values[i] + tx) * sx;
values[i + 1] = (+values[i + 1] + ty) * sy;
}
},
_bezierToPoints = function _bezierToPoints(x1, y1, x2, y2, x3, y3, x4, y4, threshold, points, index) {
var x12 = (x1 + x2) / 2,
y12 = (y1 + y2) / 2,
x23 = (x2 + x3) / 2,
y23 = (y2 + y3) / 2,
x34 = (x3 + x4) / 2,
y34 = (y3 + y4) / 2,
x123 = (x12 + x23) / 2,
y123 = (y12 + y23) / 2,
x234 = (x23 + x34) / 2,
y234 = (y23 + y34) / 2,
x1234 = (x123 + x234) / 2,
y1234 = (y123 + y234) / 2,
dx = x4 - x1,
dy = y4 - y1,
d2 = Math.abs((x2 - x4) * dy - (y2 - y4) * dx),
d3 = Math.abs((x3 - x4) * dy - (y3 - y4) * dx),
length;
if (!points) {
points = [{
x: x1,
y: y1
}, {
x: x4,
y: y4
}];
index = 1;
}
points.splice(index || points.length - 1, 0, {
x: x1234,
y: y1234
});
if ((d2 + d3) * (d2 + d3) > threshold * (dx * dx + dy * dy)) {
length = points.length;
_bezierToPoints(x1, y1, x12, y12, x123, y123, x1234, y1234, threshold, points, index);
_bezierToPoints(x1234, y1234, x234, y234, x34, y34, x4, y4, threshold, points, index + 1 + (points.length - length));
}
return points;
};
var CustomEase = function () {
function CustomEase(id, data, config) {
_coreInitted || _initCore();
this.id = id;
this.setData(data, config);
}
var _proto = CustomEase.prototype;
_proto.setData = function setData(data, config) {
config = config || {};
data = data || "0,0,1,1";
var values = data.match(_numExp),
closest = 1,
points = [],
lookup = [],
precision = config.precision || 1,
fast = precision <= 1,
l,
a1,
a2,
i,
inc,
j,
point,
prevPoint,
p;
this.data = data;
if (_needsParsingExp.test(data) || ~data.indexOf("M") && data.indexOf("C") < 0) {
values = stringToRawPath(data)[0];
}
l = values.length;
if (l === 4) {
values.unshift(0, 0);
values.push(1, 1);
l = 8;
} else if ((l - 2) % 6) {
throw "Invalid CustomEase";
}
if (+values[0] !== 0 || +values[l - 2] !== 1) {
_normalize(values, config.height, config.originY);
}
this.segment = values;
for (i = 2; i < l; i += 6) {
a1 = {
x: +values[i - 2],
y: +values[i - 1]
};
a2 = {
x: +values[i + 4],
y: +values[i + 5]
};
points.push(a1, a2);
_bezierToPoints(a1.x, a1.y, +values[i], +values[i + 1], +values[i + 2], +values[i + 3], a2.x, a2.y, 1 / (precision * 200000), points, points.length - 1);
}
l = points.length;
for (i = 0; i < l; i++) {
point = points[i];
prevPoint = points[i - 1] || point;
if ((point.x > prevPoint.x || prevPoint.y !== point.y && prevPoint.x === point.x || point === prevPoint) && point.x <= 1) {
prevPoint.cx = point.x - prevPoint.x;
prevPoint.cy = point.y - prevPoint.y;
prevPoint.n = point;
prevPoint.nx = point.x;
if (fast && i > 1 && Math.abs(prevPoint.cy / prevPoint.cx - points[i - 2].cy / points[i - 2].cx) > 2) {
fast = 0;
}
if (prevPoint.cx < closest) {
if (!prevPoint.cx) {
prevPoint.cx = 0.001;
if (i === l - 1) {
prevPoint.x -= 0.001;
closest = Math.min(closest, 0.001);
fast = 0;
}
} else {
closest = prevPoint.cx;
}
}
} else {
points.splice(i--, 1);
l--;
}
}
l = 1 / closest + 1 | 0;
inc = 1 / l;
j = 0;
point = points[0];
if (fast) {
for (i = 0; i < l; i++) {
p = i * inc;
if (point.nx < p) {
point = points[++j];
}
a1 = point.y + (p - point.x) / point.cx * point.cy;
lookup[i] = {
x: p,
cx: inc,
y: a1,
cy: 0,
nx: 9
};
if (i) {
lookup[i - 1].cy = a1 - lookup[i - 1].y;
}
}
j = points[points.length - 1];
lookup[l - 1].cy = j.y - a1;
lookup[l - 1].cx = j.x - lookup[lookup.length - 1].x;
} else {
for (i = 0; i < l; i++) {
if (point.nx < i * inc) {
point = points[++j];
}
lookup[i] = point;
}
if (j < points.length - 1) {
lookup[i - 1] = points[points.length - 2];
}
}
this.ease = function (p) {
var point = lookup[p * l | 0] || lookup[l - 1];
if (point.nx < p) {
point = point.n;
}
return point.y + (p - point.x) / point.cx * point.cy;
};
this.ease.custom = this;
this.id && gsap && gsap.registerEase(this.id, this.ease);
return this;
};
_proto.getSVGData = function getSVGData(config) {
return CustomEase.getSVGData(this, config);
};
CustomEase.create = function create(id, data, config) {
return new CustomEase(id, data, config).ease;
};
CustomEase.register = function register(core) {
gsap = core;
_initCore();
};
CustomEase.get = function get(id) {
return gsap.parseEase(id);
};
CustomEase.getSVGData = function getSVGData(ease, config) {
config = config || {};
var width = config.width || 100,
height = config.height || 100,
x = config.x || 0,
y = (config.y || 0) + height,
e = gsap.utils.toArray(config.path)[0],
a,
slope,
i,
inc,
tx,
ty,
precision,
threshold,
prevX,
prevY;
if (config.invert) {
height = -height;
y = 0;
}
if (typeof ease === "string") {
ease = gsap.parseEase(ease);
}
if (ease.custom) {
ease = ease.custom;
}
if (ease instanceof CustomEase) {
a = rawPathToString(transformRawPath([ease.segment.slice(0)], width, 0, 0, -height, x, y));
} else {
a = [x, y];
precision = Math.max(5, (config.precision || 1) * 200);
inc = 1 / precision;
precision += 2;
threshold = 5 / precision;
prevX = _round$1(x + inc * width);
prevY = _round$1(y + ease(inc) * -height);
slope = (prevY - y) / (prevX - x);
for (i = 2; i < precision; i++) {
tx = _round$1(x + i * inc * width);
ty = _round$1(y + ease(i * inc) * -height);
if (Math.abs((ty - prevY) / (tx - prevX) - slope) > threshold || i === precision - 1) {
a.push(prevX, prevY);
slope = (ty - prevY) / (tx - prevX);
}
prevX = tx;
prevY = ty;
}
a = "M" + a.join(",");
}
e && e.setAttribute("d", a);
return a;
};
return CustomEase;
}();
CustomEase.version = "3.14.2";
CustomEase.headless = true;
_getGSAP() && gsap.registerPlugin(CustomEase);
exports.CustomEase = CustomEase;
exports.default = CustomEase;
Object.defineProperty(exports, '__esModule', { value: true });
})));
================================================
FILE: dist/CustomWiggle.js
================================================
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
/*!
* CustomWiggle 3.14.2
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var gsap,
_coreInitted,
createCustomEase,
_getGSAP = function _getGSAP() {
return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap;
},
_eases = {
easeOut: "M0,1,C0.7,1,0.6,0,1,0",
easeInOut: "M0,0,C0.1,0,0.24,1,0.444,1,0.644,1,0.6,0,1,0",
anticipate: "M0,0,C0,0.222,0.024,0.386,0,0.4,0.18,0.455,0.65,0.646,0.7,0.67,0.9,0.76,1,0.846,1,1",
uniform: "M0,0,C0,0.95,0,1,0,1,0,1,1,1,1,1,1,1,1,0,1,0"
},
_linearEase = function _linearEase(p) {
return p;
},
_initCore = function _initCore(required) {
if (!_coreInitted) {
gsap = _getGSAP();
createCustomEase = gsap && gsap.parseEase("_CE");
if (createCustomEase) {
for (var p in _eases) {
_eases[p] = createCustomEase("", _eases[p]);
}
_coreInitted = 1;
_create("wiggle").config = function (vars) {
return typeof vars === "object" ? _create("", vars) : _create("wiggle(" + vars + ")", {
wiggles: +vars
});
};
} else {
required && console.warn("Please gsap.registerPlugin(CustomEase, CustomWiggle)");
}
}
},
_parseEase = function _parseEase(ease, invertNonCustomEases) {
if (typeof ease !== "function") {
ease = gsap.parseEase(ease) || createCustomEase("", ease);
}
return ease.custom || !invertNonCustomEases ? ease : function (p) {
return 1 - ease(p);
};
},
_create = function _create(id, vars) {
if (!_coreInitted) {
_initCore(1);
}
vars = vars || {};
var wiggles = (vars.wiggles || 10) | 0,
inc = 1 / wiggles,
x = inc / 2,
anticipate = vars.type === "anticipate",
yEase = _eases[vars.type] || _eases.easeOut,
xEase = _linearEase,
rnd = 1000,
nextX,
nextY,
angle,
handleX,
handleY,
easedX,
y,
path,
i;
{
if (anticipate) {
xEase = yEase;
yEase = _eases.easeOut;
}
if (vars.timingEase) {
xEase = _parseEase(vars.timingEase);
}
if (vars.amplitudeEase) {
yEase = _parseEase(vars.amplitudeEase, true);
}
easedX = xEase(x);
y = anticipate ? -yEase(x) : yEase(x);
path = [0, 0, easedX / 4, 0, easedX / 2, y, easedX, y];
if (vars.type === "random") {
path.length = 4;
nextX = xEase(inc);
nextY = Math.random() * 2 - 1;
for (i = 2; i < wiggles; i++) {
x = nextX;
y = nextY;
nextX = xEase(inc * i);
nextY = Math.random() * 2 - 1;
angle = Math.atan2(nextY - path[path.length - 3], nextX - path[path.length - 4]);
handleX = Math.cos(angle) * inc;
handleY = Math.sin(angle) * inc;
path.push(x - handleX, y - handleY, x, y, x + handleX, y + handleY);
}
path.push(nextX, 0, 1, 0);
} else {
for (i = 1; i < wiggles; i++) {
path.push(xEase(x + inc / 2), y);
x += inc;
y = (y > 0 ? -1 : 1) * yEase(i * inc);
easedX = xEase(x);
path.push(xEase(x - inc / 2), y, easedX, y);
}
path.push(xEase(x + inc / 4), y, xEase(x + inc / 4), 0, 1, 0);
}
i = path.length;
while (--i > -1) {
path[i] = ~~(path[i] * rnd) / rnd;
}
path[2] = "C" + path[2];
return createCustomEase(id, "M" + path.join(","));
}
};
var CustomWiggle = function () {
function CustomWiggle(id, vars) {
this.ease = _create(id, vars);
}
CustomWiggle.create = function create(id, vars) {
return _create(id, vars);
};
CustomWiggle.register = function register(core) {
gsap = core;
_initCore();
};
return CustomWiggle;
}();
_getGSAP() && gsap.registerPlugin(CustomWiggle);
CustomWiggle.version = "3.14.2";
exports.CustomWiggle = CustomWiggle;
exports.default = CustomWiggle;
Object.defineProperty(exports, '__esModule', { value: true });
})));
================================================
FILE: dist/Draggable.js
================================================
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
var _doc,
_win,
_docElement,
_body,
_divContainer,
_svgContainer,
_identityMatrix,
_gEl,
_transformProp = "transform",
_transformOriginProp = _transformProp + "Origin",
_hasOffsetBug,
_setDoc = function _setDoc(element) {
var doc = element.ownerDocument || element;
if (!(_transformProp in element.style) && "msTransform" in element.style) {
_transformProp = "msTransform";
_transformOriginProp = _transformProp + "Origin";
}
while (doc.parentNode && (doc = doc.parentNode)) {}
_win = window;
_identityMatrix = new Matrix2D();
if (doc) {
_doc = doc;
_docElement = doc.documentElement;
_body = doc.body;
_gEl = _doc.createElementNS("http://www.w3.org/2000/svg", "g");
_gEl.style.transform = "none";
var d1 = doc.createElement("div"),
d2 = doc.createElement("div"),
root = doc && (doc.body || doc.firstElementChild);
if (root && root.appendChild) {
root.appendChild(d1);
d1.appendChild(d2);
d1.style.position = "static";
d1.style.transform = "translate3d(0,0,1px)";
_hasOffsetBug = d2.offsetParent !== d1;
root.removeChild(d1);
}
}
return doc;
},
_forceNonZeroScale = function _forceNonZeroScale(e) {
var a, cache;
while (e && e !== _body) {
cache = e._gsap;
cache && cache.uncache && cache.get(e, "x");
if (cache && !cache.scaleX && !cache.scaleY && cache.renderTransform) {
cache.scaleX = cache.scaleY = 1e-4;
cache.renderTransform(1, cache);
a ? a.push(cache) : a = [cache];
}
e = e.parentNode;
}
return a;
},
_svgTemps = [],
_divTemps = [],
_getDocScrollTop = function _getDocScrollTop() {
return _win.pageYOffset || _doc.scrollTop || _docElement.scrollTop || _body.scrollTop || 0;
},
_getDocScrollLeft = function _getDocScrollLeft() {
return _win.pageXOffset || _doc.scrollLeft || _docElement.scrollLeft || _body.scrollLeft || 0;
},
_svgOwner = function _svgOwner(element) {
return element.ownerSVGElement || ((element.tagName + "").toLowerCase() === "svg" ? element : null);
},
_isFixed = function _isFixed(element) {
if (_win.getComputedStyle(element).position === "fixed") {
return true;
}
element = element.parentNode;
if (element && element.nodeType === 1) {
return _isFixed(element);
}
},
_createSibling = function _createSibling(element, i) {
if (element.parentNode && (_doc || _setDoc(element))) {
var svg = _svgOwner(element),
ns = svg ? svg.getAttribute("xmlns") || "http://www.w3.org/2000/svg" : "http://www.w3.org/1999/xhtml",
type = svg ? i ? "rect" : "g" : "div",
x = i !== 2 ? 0 : 100,
y = i === 3 ? 100 : 0,
css = {
position: "absolute",
display: "block",
pointerEvents: "none",
margin: "0",
padding: "0"
},
e = _doc.createElementNS ? _doc.createElementNS(ns.replace(/^https/, "http"), type) : _doc.createElement(type);
if (i) {
if (!svg) {
if (!_divContainer) {
_divContainer = _createSibling(element);
Object.assign(_divContainer.style, css);
}
Object.assign(e.style, css, {
width: "0.1px",
height: "0.1px",
top: y + "px",
left: x + "px"
});
_divContainer.appendChild(e);
} else {
_svgContainer || (_svgContainer = _createSibling(element));
e.setAttribute("width", 0.01);
e.setAttribute("height", 0.01);
e.setAttribute("transform", "translate(" + x + "," + y + ")");
e.setAttribute("fill", "transparent");
_svgContainer.appendChild(e);
}
}
return e;
}
throw "Need document and parent.";
},
_consolidate = function _consolidate(m) {
var c = new Matrix2D(),
i = 0;
for (; i < m.numberOfItems; i++) {
c.multiply(m.getItem(i).matrix);
}
return c;
},
_getCTM = function _getCTM(svg) {
var m = svg.getCTM(),
transform;
if (!m) {
transform = svg.style[_transformProp];
svg.style[_transformProp] = "none";
svg.appendChild(_gEl);
m = _gEl.getCTM();
svg.removeChild(_gEl);
transform ? svg.style[_transformProp] = transform : svg.style.removeProperty(_transformProp.replace(/([A-Z])/g, "-$1").toLowerCase());
}
return m || _identityMatrix.clone();
},
_placeSiblings = function _placeSiblings(element, adjustGOffset) {
var svg = _svgOwner(element),
isRootSVG = element === svg,
siblings = svg ? _svgTemps : _divTemps,
parent = element.parentNode,
appendToEl = parent && !svg && parent.shadowRoot && parent.shadowRoot.appendChild ? parent.shadowRoot : parent,
container,
m,
b,
x,
y,
cs;
if (element === _win) {
return element;
}
siblings.length || siblings.push(_createSibling(element, 1), _createSibling(element, 2), _createSibling(element, 3));
container = svg ? _svgContainer : _divContainer;
if (svg) {
if (isRootSVG) {
b = _getCTM(element);
x = -b.e / b.a;
y = -b.f / b.d;
m = _identityMatrix;
} else if (element.getBBox) {
b = element.getBBox();
m = element.transform ? element.transform.baseVal : {};
m = !m.numberOfItems ? _identityMatrix : m.numberOfItems > 1 ? _consolidate(m) : m.getItem(0).matrix;
x = m.a * b.x + m.c * b.y;
y = m.b * b.x + m.d * b.y;
} else {
m = new Matrix2D();
x = y = 0;
}
if (adjustGOffset && element.tagName.toLowerCase() === "g") {
x = y = 0;
}
(isRootSVG || !element.getBoundingClientRect().width ? svg : parent).appendChild(container);
container.setAttribute("transform", "matrix(" + m.a + "," + m.b + "," + m.c + "," + m.d + "," + (m.e + x) + "," + (m.f + y) + ")");
} else {
x = y = 0;
if (_hasOffsetBug) {
m = element.offsetParent;
b = element;
while (b && (b = b.parentNode) && b !== m && b.parentNode) {
if ((_win.getComputedStyle(b)[_transformProp] + "").length > 4) {
x = b.offsetLeft;
y = b.offsetTop;
b = 0;
}
}
}
cs = _win.getComputedStyle(element);
if (cs.position !== "absolute" && cs.position !== "fixed") {
m = element.offsetParent;
while (parent && parent !== m) {
x += parent.scrollLeft || 0;
y += parent.scrollTop || 0;
parent = parent.parentNode;
}
}
b = container.style;
b.top = element.offsetTop - y + "px";
b.left = element.offsetLeft - x + "px";
b[_transformProp] = cs[_transformProp];
b[_transformOriginProp] = cs[_transformOriginProp];
b.position = cs.position === "fixed" ? "fixed" : "absolute";
appendToEl.appendChild(container);
}
return container;
},
_setMatrix = function _setMatrix(m, a, b, c, d, e, f) {
m.a = a;
m.b = b;
m.c = c;
m.d = d;
m.e = e;
m.f = f;
return m;
};
var Matrix2D = function () {
function Matrix2D(a, b, c, d, e, f) {
if (a === void 0) {
a = 1;
}
if (b === void 0) {
b = 0;
}
if (c === void 0) {
c = 0;
}
if (d === void 0) {
d = 1;
}
if (e === void 0) {
e = 0;
}
if (f === void 0) {
f = 0;
}
_setMatrix(this, a, b, c, d, e, f);
}
var _proto = Matrix2D.prototype;
_proto.inverse = function inverse() {
var a = this.a,
b = this.b,
c = this.c,
d = this.d,
e = this.e,
f = this.f,
determinant = a * d - b * c || 1e-10;
return _setMatrix(this, d / determinant, -b / determinant, -c / determinant, a / determinant, (c * f - d * e) / determinant, -(a * f - b * e) / determinant);
};
_proto.multiply = function multiply(matrix) {
var a = this.a,
b = this.b,
c = this.c,
d = this.d,
e = this.e,
f = this.f,
a2 = matrix.a,
b2 = matrix.c,
c2 = matrix.b,
d2 = matrix.d,
e2 = matrix.e,
f2 = matrix.f;
return _setMatrix(this, a2 * a + c2 * c, a2 * b + c2 * d, b2 * a + d2 * c, b2 * b + d2 * d, e + e2 * a + f2 * c, f + e2 * b + f2 * d);
};
_proto.clone = function clone() {
return new Matrix2D(this.a, this.b, this.c, this.d, this.e, this.f);
};
_proto.equals = function equals(matrix) {
var a = this.a,
b = this.b,
c = this.c,
d = this.d,
e = this.e,
f = this.f;
return a === matrix.a && b === matrix.b && c === matrix.c && d === matrix.d && e === matrix.e && f === matrix.f;
};
_proto.apply = function apply(point, decoratee) {
if (decoratee === void 0) {
decoratee = {};
}
var x = point.x,
y = point.y,
a = this.a,
b = this.b,
c = this.c,
d = this.d,
e = this.e,
f = this.f;
decoratee.x = x * a + y * c + e || 0;
decoratee.y = x * b + y * d + f || 0;
return decoratee;
};
return Matrix2D;
}();
function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollInFixed) {
if (!element || !element.parentNode || (_doc || _setDoc(element)).documentElement === element) {
return new Matrix2D();
}
var zeroScales = _forceNonZeroScale(element),
svg = _svgOwner(element),
temps = svg ? _svgTemps : _divTemps,
container = _placeSiblings(element, adjustGOffset),
b1 = temps[0].getBoundingClientRect(),
b2 = temps[1].getBoundingClientRect(),
b3 = temps[2].getBoundingClientRect(),
parent = container.parentNode,
isFixed = !includeScrollInFixed && _isFixed(element),
m = new Matrix2D((b2.left - b1.left) / 100, (b2.top - b1.top) / 100, (b3.left - b1.left) / 100, (b3.top - b1.top) / 100, b1.left + (isFixed ? 0 : _getDocScrollLeft()), b1.top + (isFixed ? 0 : _getDocScrollTop()));
parent.removeChild(container);
if (zeroScales) {
b1 = zeroScales.length;
while (b1--) {
b2 = zeroScales[b1];
b2.scaleX = b2.scaleY = 0;
b2.renderTransform(1, b2);
}
}
return inverse ? m.inverse() : m;
}
var gsap,
_win$1,
_doc$1,
_docElement$1,
_body$1,
_tempDiv,
_placeholderDiv,
_coreInitted,
_checkPrefix,
_toArray,
_supportsPassive,
_isTouchDevice,
_touchEventLookup,
_isMultiTouching,
_isAndroid,
InertiaPlugin,
_defaultCursor,
_supportsPointer,
_context,
_getStyleSaver,
_dragCount = 0,
_windowExists = function _windowExists() {
return typeof window !== "undefined";
},
_getGSAP = function _getGSAP() {
return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap;
},
_isFunction = function _isFunction(value) {
return typeof value === "function";
},
_isObject = function _isObject(value) {
return typeof value === "object";
},
_isUndefined = function _isUndefined(value) {
return typeof value === "undefined";
},
_emptyFunc = function _emptyFunc() {
return false;
},
_transformProp$1 = "transform",
_transformOriginProp$1 = "transformOrigin",
_round = function _round(value) {
return Math.round(value * 10000) / 10000;
},
_isArray = Array.isArray,
_createElement = function _createElement(type, ns) {
var e = _doc$1.createElementNS ? _doc$1.createElementNS((ns || "http://www.w3.org/1999/xhtml").replace(/^https/, "http"), type) : _doc$1.createElement(type);
return e.style ? e : _doc$1.createElement(type);
},
_RAD2DEG = 180 / Math.PI,
_bigNum = 1e20,
_identityMatrix$1 = new Matrix2D(),
_getTime = Date.now || function () {
return new Date().getTime();
},
_renderQueue = [],
_lookup = {},
_lookupCount = 0,
_clickableTagExp = /^(?:a|input|textarea|button|select)$/i,
_lastDragTime = 0,
_temp1 = {},
_windowProxy = {},
_copy = function _copy(obj, factor) {
var copy = {},
p;
for (p in obj) {
copy[p] = factor ? obj[p] * factor : obj[p];
}
return copy;
},
_extend = function _extend(obj, defaults) {
for (var p in defaults) {
if (!(p in obj)) {
obj[p] = defaults[p];
}
}
return obj;
},
_setTouchActionForAllDescendants = function _setTouchActionForAllDescendants(elements, value) {
var i = elements.length,
children;
while (i--) {
value ? elements[i].style.touchAction = value : elements[i].style.removeProperty("touch-action");
children = elements[i].children;
children && children.length && _setTouchActionForAllDescendants(children, value);
}
},
_renderQueueTick = function _renderQueueTick() {
return _renderQueue.forEach(function (func) {
return func();
});
},
_addToRenderQueue = function _addToRenderQueue(func) {
_renderQueue.push(func);
if (_renderQueue.length === 1) {
gsap.ticker.add(_renderQueueTick);
}
},
_renderQueueTimeout = function _renderQueueTimeout() {
return !_renderQueue.length && gsap.ticker.remove(_renderQueueTick);
},
_removeFromRenderQueue = function _removeFromRenderQueue(func) {
var i = _renderQueue.length;
while (i--) {
if (_renderQueue[i] === func) {
_renderQueue.splice(i, 1);
}
}
gsap.to(_renderQueueTimeout, {
overwrite: true,
delay: 15,
duration: 0,
onComplete: _renderQueueTimeout,
data: "_draggable"
});
},
_setDefaults = function _setDefaults(obj, defaults) {
for (var p in defaults) {
if (!(p in obj)) {
obj[p] = defaults[p];
}
}
return obj;
},
_addListener = function _addListener(element, type, func, capture) {
if (element.addEventListener) {
var touchType = _touchEventLookup[type];
capture = capture || (_supportsPassive ? {
passive: false
} : null);
element.addEventListener(touchType || type, func, capture);
touchType && type !== touchType && element.addEventListener(type, func, capture);
}
},
_removeListener = function _removeListener(element, type, func, capture) {
if (element.removeEventListener) {
var touchType = _touchEventLookup[type];
element.removeEventListener(touchType || type, func, capture);
touchType && type !== touchType && element.removeEventListener(type, func, capture);
}
},
_preventDefault = function _preventDefault(event) {
event.preventDefault && event.preventDefault();
event.preventManipulation && event.preventManipulation();
},
_hasTouchID = function _hasTouchID(list, ID) {
var i = list.length;
while (i--) {
if (list[i].identifier === ID) {
return true;
}
}
},
_onMultiTouchDocumentEnd = function _onMultiTouchDocumentEnd(event) {
_isMultiTouching = event.touches && _dragCount < event.touches.length;
_removeListener(event.target, "touchend", _onMultiTouchDocumentEnd);
},
_onMultiTouchDocument = function _onMultiTouchDocument(event) {
_isMultiTouching = event.touches && _dragCount < event.touches.length;
_addListener(event.target, "touchend", _onMultiTouchDocumentEnd);
},
_getDocScrollTop$1 = function _getDocScrollTop(doc) {
return _win$1.pageYOffset || doc.scrollTop || doc.documentElement.scrollTop || doc.body.scrollTop || 0;
},
_getDocScrollLeft$1 = function _getDocScrollLeft(doc) {
return _win$1.pageXOffset || doc.scrollLeft || doc.documentElement.scrollLeft || doc.body.scrollLeft || 0;
},
_addScrollListener = function _addScrollListener(e, callback) {
_addListener(e, "scroll", callback);
if (!_isRoot(e.parentNode)) {
_addScrollListener(e.parentNode, callback);
}
},
_removeScrollListener = function _removeScrollListener(e, callback) {
_removeListener(e, "scroll", callback);
if (!_isRoot(e.parentNode)) {
_removeScrollListener(e.parentNode, callback);
}
},
_isRoot = function _isRoot(e) {
return !!(!e || e === _docElement$1 || e.nodeType === 9 || e === _doc$1.body || e === _win$1 || !e.nodeType || !e.parentNode);
},
_getMaxScroll = function _getMaxScroll(element, axis) {
var dim = axis === "x" ? "Width" : "Height",
scroll = "scroll" + dim,
client = "client" + dim;
return Math.max(0, _isRoot(element) ? Math.max(_docElement$1[scroll], _body$1[scroll]) - (_win$1["inner" + dim] || _docElement$1[client] || _body$1[client]) : element[scroll] - element[client]);
},
_recordMaxScrolls = function _recordMaxScrolls(e, skipCurrent) {
var x = _getMaxScroll(e, "x"),
y = _getMaxScroll(e, "y");
if (_isRoot(e)) {
e = _windowProxy;
} else {
_recordMaxScrolls(e.parentNode, skipCurrent);
}
e._gsMaxScrollX = x;
e._gsMaxScrollY = y;
if (!skipCurrent) {
e._gsScrollX = e.scrollLeft || 0;
e._gsScrollY = e.scrollTop || 0;
}
},
_setStyle = function _setStyle(element, property, value) {
var style = element.style;
if (!style) {
return;
}
if (_isUndefined(style[property])) {
property = _checkPrefix(property, element) || property;
}
if (value == null) {
style.removeProperty && style.removeProperty(property.replace(/([A-Z])/g, "-$1").toLowerCase());
} else {
style[property] = value;
}
},
_getComputedStyle = function _getComputedStyle(element) {
return _win$1.getComputedStyle(element instanceof Element ? element : element.host || (element.parentNode || {}).host || element);
},
_tempRect = {},
_parseRect = function _parseRect(e) {
if (e === _win$1) {
_tempRect.left = _tempRect.top = 0;
_tempRect.width = _tempRect.right = _docElement$1.clientWidth || e.innerWidth || _body$1.clientWidth || 0;
_tempRect.height = _tempRect.bottom = (e.innerHeight || 0) - 20 < _docElement$1.clientHeight ? _docElement$1.clientHeight : e.innerHeight || _body$1.clientHeight || 0;
return _tempRect;
}
var doc = e.ownerDocument || _doc$1,
r = !_isUndefined(e.pageX) ? {
left: e.pageX - _getDocScrollLeft$1(doc),
top: e.pageY - _getDocScrollTop$1(doc),
right: e.pageX - _getDocScrollLeft$1(doc) + 1,
bottom: e.pageY - _getDocScrollTop$1(doc) + 1
} : !e.nodeType && !_isUndefined(e.left) && !_isUndefined(e.top) ? e : _toArray(e)[0].getBoundingClientRect();
if (_isUndefined(r.right) && !_isUndefined(r.width)) {
r.right = r.left + r.width;
r.bottom = r.top + r.height;
} else if (_isUndefined(r.width)) {
r = {
width: r.right - r.left,
height: r.bottom - r.top,
right: r.right,
left: r.left,
bottom: r.bottom,
top: r.top
};
}
return r;
},
_dispatchEvent = function _dispatchEvent(target, type, callbackName) {
var vars = target.vars,
callback = vars[callbackName],
listeners = target._listeners[type],
result;
if (_isFunction(callback)) {
result = callback.apply(vars.callbackScope || target, vars[callbackName + "Params"] || [target.pointerEvent]);
}
if (listeners && target.dispatchEvent(type) === false) {
result = false;
}
return result;
},
_getBounds = function _getBounds(target, context) {
var e = _toArray(target)[0],
top,
left,
offset;
if (!e.nodeType && e !== _win$1) {
if (!_isUndefined(target.left)) {
offset = {
x: 0,
y: 0
};
return {
left: target.left - offset.x,
top: target.top - offset.y,
width: target.width,
height: target.height
};
}
left = target.min || target.minX || target.minRotation || 0;
top = target.min || target.minY || 0;
return {
left: left,
top: top,
width: (target.max || target.maxX || target.maxRotation || 0) - left,
height: (target.max || target.maxY || 0) - top
};
}
return _getElementBounds(e, context);
},
_point1 = {},
_getElementBounds = function _getElementBounds(element, context) {
context = _toArray(context)[0];
var isSVG = element.getBBox && element.ownerSVGElement,
doc = element.ownerDocument || _doc$1,
left,
right,
top,
bottom,
matrix,
p1,
p2,
p3,
p4,
bbox,
width,
height,
cs;
if (element === _win$1) {
top = _getDocScrollTop$1(doc);
left = _getDocScrollLeft$1(doc);
right = left + (doc.documentElement.clientWidth || element.innerWidth || doc.body.clientWidth || 0);
bottom = top + ((element.innerHeight || 0) - 20 < doc.documentElement.clientHeight ? doc.documentElement.clientHeight : element.innerHeight || doc.body.clientHeight || 0);
} else if (context === _win$1 || _isUndefined(context)) {
return element.getBoundingClientRect();
} else {
left = top = 0;
if (isSVG) {
bbox = element.getBBox();
width = bbox.width;
height = bbox.height;
} else {
if (element.viewBox && (bbox = element.viewBox.baseVal)) {
left = bbox.x || 0;
top = bbox.y || 0;
width = bbox.width;
height = bbox.height;
}
if (!width) {
cs = _getComputedStyle(element);
bbox = cs.boxSizing === "border-box";
width = (parseFloat(cs.width) || element.clientWidth || 0) + (bbox ? 0 : parseFloat(cs.borderLeftWidth) + parseFloat(cs.borderRightWidth));
height = (parseFloat(cs.height) || element.clientHeight || 0) + (bbox ? 0 : parseFloat(cs.borderTopWidth) + parseFloat(cs.borderBottomWidth));
}
}
right = width;
bottom = height;
}
if (element === context) {
return {
left: left,
top: top,
width: right - left,
height: bottom - top
};
}
matrix = getGlobalMatrix(context, true).multiply(getGlobalMatrix(element));
p1 = matrix.apply({
x: left,
y: top
});
p2 = matrix.apply({
x: right,
y: top
});
p3 = matrix.apply({
x: right,
y: bottom
});
p4 = matrix.apply({
x: left,
y: bottom
});
left = Math.min(p1.x, p2.x, p3.x, p4.x);
top = Math.min(p1.y, p2.y, p3.y, p4.y);
return {
left: left,
top: top,
width: Math.max(p1.x, p2.x, p3.x, p4.x) - left,
height: Math.max(p1.y, p2.y, p3.y, p4.y) - top
};
},
_parseInertia = function _parseInertia(draggable, snap, max, min, factor, forceZeroVelocity) {
var vars = {},
a,
i,
l;
if (snap) {
if (factor !== 1 && snap instanceof Array) {
vars.end = a = [];
l = snap.length;
if (_isObject(snap[0])) {
for (i = 0; i < l; i++) {
a[i] = _copy(snap[i], factor);
}
} else {
for (i = 0; i < l; i++) {
a[i] = snap[i] * factor;
}
}
max += 1.1;
min -= 1.1;
} else if (_isFunction(snap)) {
vars.end = function (value) {
var result = snap.call(draggable, value),
copy,
p;
if (factor !== 1) {
if (_isObject(result)) {
copy = {};
for (p in result) {
copy[p] = result[p] * factor;
}
result = copy;
} else {
result *= factor;
}
}
return result;
};
} else {
vars.end = snap;
}
}
if (max || max === 0) {
vars.max = max;
}
if (min || min === 0) {
vars.min = min;
}
if (forceZeroVelocity) {
vars.velocity = 0;
}
return vars;
},
_isClickable = function _isClickable(element) {
var data;
return !element || !element.getAttribute || element === _body$1 ? false : (data = element.getAttribute("data-clickable")) === "true" || data !== "false" && (_clickableTagExp.test(element.nodeName + "") || element.getAttribute("contentEditable") === "true") ? true : _isClickable(element.parentNode);
},
_setSelectable = function _setSelectable(elements, selectable) {
var i = elements.length,
e;
while (i--) {
e = elements[i];
e.ondragstart = e.onselectstart = selectable ? null : _emptyFunc;
gsap.set(e, {
lazy: true,
userSelect: selectable ? "text" : "none"
});
}
},
_isFixed$1 = function _isFixed(element) {
if (_getComputedStyle(element).position === "fixed") {
return true;
}
element = element.parentNode;
if (element && element.nodeType === 1) {
return _isFixed(element);
}
},
_supports3D,
_addPaddingBR,
ScrollProxy = function ScrollProxy(element, vars) {
element = gsap.utils.toArray(element)[0];
vars = vars || {};
var content = document.createElement("div"),
style = content.style,
node = element.firstChild,
offsetTop = 0,
offsetLeft = 0,
prevTop = element.scrollTop,
prevLeft = element.scrollLeft,
scrollWidth = element.scrollWidth,
scrollHeight = element.scrollHeight,
extraPadRight = 0,
maxLeft = 0,
maxTop = 0,
elementWidth,
elementHeight,
contentHeight,
nextNode,
transformStart,
transformEnd;
if (_supports3D && vars.force3D !== false) {
transformStart = "translate3d(";
transformEnd = "px,0px)";
} else if (_transformProp$1) {
transformStart = "translate(";
transformEnd = "px)";
}
this.scrollTop = function (value, force) {
if (!arguments.length) {
return -this.top();
}
this.top(-value, force);
};
this.scrollLeft = function (value, force) {
if (!arguments.length) {
return -this.left();
}
this.left(-value, force);
};
this.left = function (value, force) {
if (!arguments.length) {
return -(element.scrollLeft + offsetLeft);
}
var dif = element.scrollLeft - prevLeft,
oldOffset = offsetLeft;
if ((dif > 2 || dif < -2) && !force) {
prevLeft = element.scrollLeft;
gsap.killTweensOf(this, {
left: 1,
scrollLeft: 1
});
this.left(-prevLeft);
if (vars.onKill) {
vars.onKill();
}
return;
}
value = -value;
if (value < 0) {
offsetLeft = value - 0.5 | 0;
value = 0;
} else if (value > maxLeft) {
offsetLeft = value - maxLeft | 0;
value = maxLeft;
} else {
offsetLeft = 0;
}
if (offsetLeft || oldOffset) {
if (!this._skip) {
style[_transformProp$1] = transformStart + -offsetLeft + "px," + -offsetTop + transformEnd;
}
if (offsetLeft + extraPadRight >= 0) {
style.paddingRight = offsetLeft + extraPadRight + "px";
}
}
element.scrollLeft = value | 0;
prevLeft = element.scrollLeft;
};
this.top = function (value, force) {
if (!arguments.length) {
return -(element.scrollTop + offsetTop);
}
var dif = element.scrollTop - prevTop,
oldOffset = offsetTop;
if ((dif > 2 || dif < -2) && !force) {
prevTop = element.scrollTop;
gsap.killTweensOf(this, {
top: 1,
scrollTop: 1
});
this.top(-prevTop);
if (vars.onKill) {
vars.onKill();
}
return;
}
value = -value;
if (value < 0) {
offsetTop = value - 0.5 | 0;
value = 0;
} else if (value > maxTop) {
offsetTop = value - maxTop | 0;
value = maxTop;
} else {
offsetTop = 0;
}
if (offsetTop || oldOffset) {
if (!this._skip) {
style[_transformProp$1] = transformStart + -offsetLeft + "px," + -offsetTop + transformEnd;
}
}
element.scrollTop = value | 0;
prevTop = element.scrollTop;
};
this.maxScrollTop = function () {
return maxTop;
};
this.maxScrollLeft = function () {
return maxLeft;
};
this.disable = function () {
node = content.firstChild;
while (node) {
nextNode = node.nextSibling;
element.appendChild(node);
node = nextNode;
}
if (element === content.parentNode) {
element.removeChild(content);
}
};
this.enable = function () {
node = element.firstChild;
if (node === content) {
return;
}
while (node) {
nextNode = node.nextSibling;
content.appendChild(node);
node = nextNode;
}
element.appendChild(content);
this.calibrate();
};
this.calibrate = function (force) {
var widthMatches = element.clientWidth === elementWidth,
cs,
x,
y;
prevTop = element.scrollTop;
prevLeft = element.scrollLeft;
if (widthMatches && element.clientHeight === elementHeight && content.offsetHeight === contentHeight && scrollWidth === element.scrollWidth && scrollHeight === element.scrollHeight && !force) {
return;
}
if (offsetTop || offsetLeft) {
x = this.left();
y = this.top();
this.left(-element.scrollLeft);
this.top(-element.scrollTop);
}
cs = _getComputedStyle(element);
if (!widthMatches || force) {
style.display = "block";
style.width = "auto";
style.paddingRight = "0px";
extraPadRight = Math.max(0, element.scrollWidth - element.clientWidth);
if (extraPadRight) {
extraPadRight += parseFloat(cs.paddingLeft) + (_addPaddingBR ? parseFloat(cs.paddingRight) : 0);
}
}
style.display = "inline-block";
style.position = "relative";
style.overflow = "visible";
style.verticalAlign = "top";
style.boxSizing = "content-box";
style.width = "100%";
style.paddingRight = extraPadRight + "px";
if (_addPaddingBR) {
style.paddingBottom = cs.paddingBottom;
}
elementWidth = element.clientWidth;
elementHeight = element.clientHeight;
scrollWidth = element.scrollWidth;
scrollHeight = element.scrollHeight;
maxLeft = element.scrollWidth - elementWidth;
maxTop = element.scrollHeight - elementHeight;
contentHeight = content.offsetHeight;
style.display = "block";
if (x || y) {
this.left(x);
this.top(y);
}
};
this.content = content;
this.element = element;
this._skip = false;
this.enable();
},
_initCore = function _initCore(required) {
if (_windowExists() && document.body) {
var nav = window && window.navigator;
_win$1 = window;
_doc$1 = document;
_docElement$1 = _doc$1.documentElement;
_body$1 = _doc$1.body;
_tempDiv = _createElement("div");
_supportsPointer = !!window.PointerEvent;
_placeholderDiv = _createElement("div");
_placeholderDiv.style.cssText = "visibility:hidden;height:1px;top:-1px;pointer-events:none;position:relative;clear:both;cursor:grab";
_defaultCursor = _placeholderDiv.style.cursor === "grab" ? "grab" : "move";
_isAndroid = nav && nav.userAgent.toLowerCase().indexOf("android") !== -1;
_isTouchDevice = "ontouchstart" in _docElement$1 && "orientation" in _win$1 || nav && (nav.MaxTouchPoints > 0 || nav.msMaxTouchPoints > 0);
_addPaddingBR = function () {
var div = _createElement("div"),
child = _createElement("div"),
childStyle = child.style,
parent = _body$1,
val;
childStyle.display = "inline-block";
childStyle.position = "relative";
div.style.cssText = "width:90px;height:40px;padding:10px;overflow:auto;visibility:hidden";
div.appendChild(child);
parent.appendChild(div);
val = child.offsetHeight + 18 > div.scrollHeight;
parent.removeChild(div);
return val;
}();
_touchEventLookup = function (types) {
var standard = types.split(","),
converted = ("onpointerdown" in _tempDiv ? "pointerdown,pointermove,pointerup,pointercancel" : "onmspointerdown" in _tempDiv ? "MSPointerDown,MSPointerMove,MSPointerUp,MSPointerCancel" : types).split(","),
obj = {},
i = 4;
while (--i > -1) {
obj[standard[i]] = converted[i];
obj[converted[i]] = standard[i];
}
try {
_docElement$1.addEventListener("test", null, Object.defineProperty({}, "passive", {
get: function get() {
_supportsPassive = 1;
}
}));
} catch (e) {}
return obj;
}("touchstart,touchmove,touchend,touchcancel");
_addListener(_doc$1, "touchcancel", _emptyFunc);
_addListener(_win$1, "touchmove", _emptyFunc);
_body$1 && _body$1.addEventListener("touchstart", _emptyFunc);
_addListener(_doc$1, "contextmenu", function () {
for (var p in _lookup) {
if (_lookup[p].isPressed) {
_lookup[p].endDrag();
}
}
});
gsap = _coreInitted = _getGSAP();
}
if (gsap) {
InertiaPlugin = gsap.plugins.inertia;
_context = gsap.core.context || function () {};
_checkPrefix = gsap.utils.checkPrefix;
_transformProp$1 = _checkPrefix(_transformProp$1);
_transformOriginProp$1 = _checkPrefix(_transformOriginProp$1);
_toArray = gsap.utils.toArray;
_getStyleSaver = gsap.core.getStyleSaver;
_supports3D = !!_checkPrefix("perspective");
} else if (required) {
console.warn("Please gsap.registerPlugin(Draggable)");
}
};
var EventDispatcher = function () {
function EventDispatcher(target) {
this._listeners = {};
this.target = target || this;
}
var _proto = EventDispatcher.prototype;
_proto.addEventListener = function addEventListener(type, callback) {
var list = this._listeners[type] || (this._listeners[type] = []);
if (!~list.indexOf(callback)) {
list.push(callback);
}
};
_proto.removeEventListener = function removeEventListener(type, callback) {
var list = this._listeners[type],
i = list && list.indexOf(callback);
i >= 0 && list.splice(i, 1);
};
_proto.dispatchEvent = function dispatchEvent(type) {
var _this = this;
var result;
(this._listeners[type] || []).forEach(function (callback) {
return callback.call(_this, {
type: type,
target: _this.target
}) === false && (result = false);
});
return result;
};
return EventDispatcher;
}();
var Draggable = function (_EventDispatcher) {
_inheritsLoose(Draggable, _EventDispatcher);
function Draggable(target, vars) {
var _this2;
_this2 = _EventDispatcher.call(this) || this;
_coreInitted || _initCore(1);
target = _toArray(target)[0];
_this2.styles = _getStyleSaver && _getStyleSaver(target, "transform,left,top");
if (!InertiaPlugin) {
InertiaPlugin = gsap.plugins.inertia;
}
_this2.vars = vars = _copy(vars || {});
_this2.target = target;
_this2.x = _this2.y = _this2.rotation = 0;
_this2.dragResistance = parseFloat(vars.dragResistance) || 0;
_this2.edgeResistance = isNaN(vars.edgeResistance) ? 1 : parseFloat(vars.edgeResistance) || 0;
_this2.lockAxis = vars.lockAxis;
_this2.autoScroll = vars.autoScroll || 0;
_this2.lockedAxis = null;
_this2.allowEventDefault = !!vars.allowEventDefault;
gsap.getProperty(target, "x");
var type = (vars.type || "x,y").toLowerCase(),
xyMode = ~type.indexOf("x") || ~type.indexOf("y"),
rotationMode = type.indexOf("rotation") !== -1,
xProp = rotationMode ? "rotation" : xyMode ? "x" : "left",
yProp = xyMode ? "y" : "top",
allowX = !!(~type.indexOf("x") || ~type.indexOf("left") || type === "scroll"),
allowY = !!(~type.indexOf("y") || ~type.indexOf("top") || type === "scroll"),
minimumMovement = vars.minimumMovement || 2,
self = _assertThisInitialized(_this2),
triggers = _toArray(vars.trigger || vars.handle || target),
killProps = {},
dragEndTime = 0,
checkAutoScrollBounds = false,
autoScrollMarginTop = vars.autoScrollMarginTop || 40,
autoScrollMarginRight = vars.autoScrollMarginRight || 40,
autoScrollMarginBottom = vars.autoScrollMarginBottom || 40,
autoScrollMarginLeft = vars.autoScrollMarginLeft || 40,
isClickable = vars.clickableTest || _isClickable,
clickTime = 0,
gsCache = target._gsap || gsap.core.getCache(target),
isFixed = _isFixed$1(target),
getPropAsNum = function getPropAsNum(property, unit) {
return parseFloat(gsCache.get(target, property, unit));
},
ownerDoc = target.ownerDocument || _doc$1,
enabled,
scrollProxy,
startPointerX,
startPointerY,
startElementX,
startElementY,
hasBounds,
hasDragCallback,
hasMoveCallback,
maxX,
minX,
maxY,
minY,
touch,
touchID,
rotationOrigin,
dirty,
old,
snapX,
snapY,
snapXY,
isClicking,
touchEventTarget,
matrix,
interrupted,
allowNativeTouchScrolling,
touchDragAxis,
isDispatching,
clickDispatch,
trustedClickDispatch,
isPreventingDefault,
innerMatrix,
dragged,
onContextMenu = function onContextMenu(e) {
_preventDefault(e);
e.stopImmediatePropagation && e.stopImmediatePropagation();
return false;
},
render = function render(suppressEvents) {
if (self.autoScroll && self.isDragging && (checkAutoScrollBounds || dirty)) {
var e = target,
autoScrollFactor = self.autoScroll * 15,
parent,
isRoot,
rect,
pointerX,
pointerY,
changeX,
changeY,
gap;
checkAutoScrollBounds = false;
_windowProxy.scrollTop = _win$1.pageYOffset != null ? _win$1.pageYOffset : ownerDoc.documentElement.scrollTop != null ? ownerDoc.documentElement.scrollTop : ownerDoc.body.scrollTop;
_windowProxy.scrollLeft = _win$1.pageXOffset != null ? _win$1.pageXOffset : ownerDoc.documentElement.scrollLeft != null ? ownerDoc.documentElement.scrollLeft : ownerDoc.body.scrollLeft;
pointerX = self.pointerX - _windowProxy.scrollLeft;
pointerY = self.pointerY - _windowProxy.scrollTop;
while (e && !isRoot) {
isRoot = _isRoot(e.parentNode);
parent = isRoot ? _windowProxy : e.parentNode;
rect = isRoot ? {
bottom: Math.max(_docElement$1.clientHeight, _win$1.innerHeight || 0),
right: Math.max(_docElement$1.clientWidth, _win$1.innerWidth || 0),
left: 0,
top: 0
} : parent.getBoundingClientRect();
changeX = changeY = 0;
if (allowY) {
gap = parent._gsMaxScrollY - parent.scrollTop;
if (gap < 0) {
changeY = gap;
} else if (pointerY > rect.bottom - autoScrollMarginBottom && gap) {
checkAutoScrollBounds = true;
changeY = Math.min(gap, autoScrollFactor * (1 - Math.max(0, rect.bottom - pointerY) / autoScrollMarginBottom) | 0);
} else if (pointerY < rect.top + autoScrollMarginTop && parent.scrollTop) {
checkAutoScrollBounds = true;
changeY = -Math.min(parent.scrollTop, autoScrollFactor * (1 - Math.max(0, pointerY - rect.top) / autoScrollMarginTop) | 0);
}
if (changeY) {
parent.scrollTop += changeY;
}
}
if (allowX) {
gap = parent._gsMaxScrollX - parent.scrollLeft;
if (gap < 0) {
changeX = gap;
} else if (pointerX > rect.right - autoScrollMarginRight && gap) {
checkAutoScrollBounds = true;
changeX = Math.min(gap, autoScrollFactor * (1 - Math.max(0, rect.right - pointerX) / autoScrollMarginRight) | 0);
} else if (pointerX < rect.left + autoScrollMarginLeft && parent.scrollLeft) {
checkAutoScrollBounds = true;
changeX = -Math.min(parent.scrollLeft, autoScrollFactor * (1 - Math.max(0, pointerX - rect.left) / autoScrollMarginLeft) | 0);
}
if (changeX) {
parent.scrollLeft += changeX;
}
}
if (isRoot && (changeX || changeY)) {
_win$1.scrollTo(parent.scrollLeft, parent.scrollTop);
setPointerPosition(self.pointerX + changeX, self.pointerY + changeY);
}
e = parent;
}
}
if (dirty) {
var x = self.x,
y = self.y;
if (rotationMode) {
self.deltaX = x - parseFloat(gsCache.rotation);
self.rotation = x;
gsCache.rotation = x + "deg";
gsCache.renderTransform(1, gsCache);
} else {
if (scrollProxy) {
if (allowY) {
self.deltaY = y - scrollProxy.top();
scrollProxy.top(y);
}
if (allowX) {
self.deltaX = x - scrollProxy.left();
scrollProxy.left(x);
}
} else if (xyMode) {
if (allowY) {
self.deltaY = y - parseFloat(gsCache.y);
gsCache.y = y + "px";
}
if (allowX) {
self.deltaX = x - parseFloat(gsCache.x);
gsCache.x = x + "px";
}
gsCache.renderTransform(1, gsCache);
} else {
if (allowY) {
self.deltaY = y - parseFloat(target.style.top || 0);
target.style.top = y + "px";
}
if (allowX) {
self.deltaX = x - parseFloat(target.style.left || 0);
target.style.left = x + "px";
}
}
}
if (hasDragCallback && !suppressEvents && !isDispatching) {
isDispatching = true;
if (_dispatchEvent(self, "drag", "onDrag") === false) {
if (allowX) {
self.x -= self.deltaX;
}
if (allowY) {
self.y -= self.deltaY;
}
render(true);
}
isDispatching = false;
}
}
dirty = false;
},
syncXY = function syncXY(skipOnUpdate, skipSnap) {
var x = self.x,
y = self.y,
snappedValue,
cs;
if (!target._gsap) {
gsCache = gsap.core.getCache(target);
}
gsCache.uncache && gsap.getProperty(target, "x");
if (xyMode) {
self.x = parseFloat(gsCache.x);
self.y = parseFloat(gsCache.y);
} else if (rotationMode) {
self.x = self.rotation = _round(parseFloat(gsCache.rotation));
} else if (scrollProxy) {
self.y = scrollProxy.top();
self.x = scrollProxy.left();
} else {
self.y = parseFloat(target.style.top || (cs = _getComputedStyle(target)) && cs.top) || 0;
self.x = parseFloat(target.style.left || (cs || {}).left) || 0;
}
if ((snapX || snapY || snapXY) && !skipSnap && (self.isDragging || self.isThrowing)) {
if (snapXY) {
_temp1.x = self.x;
_temp1.y = self.y;
snappedValue = snapXY(_temp1);
if (snappedValue.x !== self.x) {
self.x = snappedValue.x;
dirty = true;
}
if (snappedValue.y !== self.y) {
self.y = snappedValue.y;
dirty = true;
}
}
if (snapX) {
snappedValue = snapX(self.x);
if (snappedValue !== self.x) {
self.x = snappedValue;
if (rotationMode) {
self.rotation = snappedValue;
}
dirty = true;
}
}
if (snapY) {
snappedValue = snapY(self.y);
if (snappedValue !== self.y) {
self.y = snappedValue;
}
dirty = true;
}
}
dirty && render(true);
if (!skipOnUpdate) {
self.deltaX = self.x - x;
self.deltaY = self.y - y;
_dispatchEvent(self, "throwupdate", "onThrowUpdate");
}
},
buildSnapFunc = function buildSnapFunc(snap, min, max, factor) {
if (min == null) {
min = -_bigNum;
}
if (max == null) {
max = _bigNum;
}
if (_isFunction(snap)) {
return function (n) {
var edgeTolerance = !self.isPressed ? 1 : 1 - self.edgeResistance;
return snap.call(self, (n > max ? max + (n - max) * edgeTolerance : n < min ? min + (n - min) * edgeTolerance : n) * factor) * factor;
};
}
if (_isArray(snap)) {
return function (n) {
var i = snap.length,
closest = 0,
absDif = _bigNum,
val,
dif;
while (--i > -1) {
val = snap[i];
dif = val - n;
if (dif < 0) {
dif = -dif;
}
if (dif < absDif && val >= min && val <= max) {
closest = i;
absDif = dif;
}
}
return snap[closest];
};
}
return isNaN(snap) ? function (n) {
return n;
} : function () {
return snap * factor;
};
},
buildPointSnapFunc = function buildPointSnapFunc(snap, minX, maxX, minY, maxY, radius, factor) {
radius = radius && radius < _bigNum ? radius * radius : _bigNum;
if (_isFunction(snap)) {
return function (point) {
var edgeTolerance = !self.isPressed ? 1 : 1 - self.edgeResistance,
x = point.x,
y = point.y,
result,
dx,
dy;
point.x = x = x > maxX ? maxX + (x - maxX) * edgeTolerance : x < minX ? minX + (x - minX) * edgeTolerance : x;
point.y = y = y > maxY ? maxY + (y - maxY) * edgeTolerance : y < minY ? minY + (y - minY) * edgeTolerance : y;
result = snap.call(self, point);
if (result !== point) {
point.x = result.x;
point.y = result.y;
}
if (factor !== 1) {
point.x *= factor;
point.y *= factor;
}
if (radius < _bigNum) {
dx = point.x - x;
dy = point.y - y;
if (dx * dx + dy * dy > radius) {
point.x = x;
point.y = y;
}
}
return point;
};
}
if (_isArray(snap)) {
return function (p) {
var i = snap.length,
closest = 0,
minDist = _bigNum,
x,
y,
point,
dist;
while (--i > -1) {
point = snap[i];
x = point.x - p.x;
y = point.y - p.y;
dist = x * x + y * y;
if (dist < minDist) {
closest = i;
minDist = dist;
}
}
return minDist <= radius ? snap[closest] : p;
};
}
return function (n) {
return n;
};
},
calculateBounds = function calculateBounds() {
var bounds, targetBounds, snap, snapIsRaw;
hasBounds = false;
if (scrollProxy) {
scrollProxy.calibrate();
self.minX = minX = -scrollProxy.maxScrollLeft();
self.minY = minY = -scrollProxy.maxScrollTop();
self.maxX = maxX = self.maxY = maxY = 0;
hasBounds = true;
} else if (!!vars.bounds) {
bounds = _getBounds(vars.bounds, target.parentNode);
if (rotationMode) {
self.minX = minX = bounds.left;
self.maxX = maxX = bounds.left + bounds.width;
self.minY = minY = self.maxY = maxY = 0;
} else if (!_isUndefined(vars.bounds.maxX) || !_isUndefined(vars.bounds.maxY)) {
bounds = vars.bounds;
self.minX = minX = bounds.minX;
self.minY = minY = bounds.minY;
self.maxX = maxX = bounds.maxX;
self.maxY = maxY = bounds.maxY;
} else {
targetBounds = _getBounds(target, target.parentNode);
self.minX = minX = Math.round(getPropAsNum(xProp, "px") + bounds.left - targetBounds.left);
self.minY = minY = Math.round(getPropAsNum(yProp, "px") + bounds.top - targetBounds.top);
self.maxX = maxX = Math.round(minX + (bounds.width - targetBounds.width));
self.maxY = maxY = Math.round(minY + (bounds.height - targetBounds.height));
}
if (minX > maxX) {
self.minX = maxX;
self.maxX = maxX = minX;
minX = self.minX;
}
if (minY > maxY) {
self.minY = maxY;
self.maxY = maxY = minY;
minY = self.minY;
}
if (rotationMode) {
self.minRotation = minX;
self.maxRotation = maxX;
}
hasBounds = true;
}
if (vars.liveSnap) {
snap = vars.liveSnap === true ? vars.snap || {} : vars.liveSnap;
snapIsRaw = _isArray(snap) || _isFunction(snap);
if (rotationMode) {
snapX = buildSnapFunc(snapIsRaw ? snap : snap.rotation, minX, maxX, 1);
snapY = null;
} else {
if (snap.points) {
snapXY = buildPointSnapFunc(snapIsRaw ? snap : snap.points, minX, maxX, minY, maxY, snap.radius, scrollProxy ? -1 : 1);
} else {
if (allowX) {
snapX = buildSnapFunc(snapIsRaw ? snap : snap.x || snap.left || snap.scrollLeft, minX, maxX, scrollProxy ? -1 : 1);
}
if (allowY) {
snapY = buildSnapFunc(snapIsRaw ? snap : snap.y || snap.top || snap.scrollTop, minY, maxY, scrollProxy ? -1 : 1);
}
}
}
}
},
onThrowComplete = function onThrowComplete() {
self.isThrowing = false;
_dispatchEvent(self, "throwcomplete", "onThrowComplete");
},
onThrowInterrupt = function onThrowInterrupt() {
self.isThrowing = false;
},
animate = function animate(inertia, forceZeroVelocity) {
var snap, snapIsRaw, tween, overshootTolerance;
if (inertia && InertiaPlugin) {
if (inertia === true) {
snap = vars.snap || vars.liveSnap || {};
snapIsRaw = _isArray(snap) || _isFunction(snap);
inertia = {
resistance: (vars.throwResistance || vars.resistance || 1000) / (rotationMode ? 10 : 1)
};
if (rotationMode) {
inertia.rotation = _parseInertia(self, snapIsRaw ? snap : snap.rotation, maxX, minX, 1, forceZeroVelocity);
} else {
if (allowX) {
inertia[xProp] = _parseInertia(self, snapIsRaw ? snap : snap.points || snap.x || snap.left, maxX, minX, scrollProxy ? -1 : 1, forceZeroVelocity || self.lockedAxis === "x");
}
if (allowY) {
inertia[yProp] = _parseInertia(self, snapIsRaw ? snap : snap.points || snap.y || snap.top, maxY, minY, scrollProxy ? -1 : 1, forceZeroVelocity || self.lockedAxis === "y");
}
if (snap.points || _isArray(snap) && _isObject(snap[0])) {
inertia.linkedProps = xProp + "," + yProp;
inertia.radius = snap.radius;
}
}
}
self.isThrowing = true;
overshootTolerance = !isNaN(vars.overshootTolerance) ? vars.overshootTolerance : vars.edgeResistance === 1 ? 0 : 1 - self.edgeResistance + 0.2;
if (!inertia.duration) {
inertia.duration = {
max: Math.max(vars.minDuration || 0, "maxDuration" in vars ? vars.maxDuration : 2),
min: !isNaN(vars.minDuration) ? vars.minDuration : overshootTolerance === 0 || _isObject(inertia) && inertia.resistance > 1000 ? 0 : 0.5,
overshoot: overshootTolerance
};
}
self.tween = tween = gsap.to(scrollProxy || target, {
inertia: inertia,
data: "_draggable",
inherit: false,
onComplete: onThrowComplete,
onInterrupt: onThrowInterrupt,
onUpdate: vars.fastMode ? _dispatchEvent : syncXY,
onUpdateParams: vars.fastMode ? [self, "onthrowupdate", "onThrowUpdate"] : snap && snap.radius ? [false, true] : []
});
if (!vars.fastMode) {
if (scrollProxy) {
scrollProxy._skip = true;
}
tween.render(1e9, true, true);
syncXY(true, true);
self.endX = self.x;
self.endY = self.y;
if (rotationMode) {
self.endRotation = self.x;
}
tween.play(0);
syncXY(true, true);
if (scrollProxy) {
scrollProxy._skip = false;
}
}
} else if (hasBounds) {
self.applyBounds();
}
},
updateMatrix = function updateMatrix(shiftStart) {
var start = matrix,
p;
matrix = getGlobalMatrix(target.parentNode, true);
if (shiftStart && self.isPressed && !matrix.equals(start || new Matrix2D())) {
p = start.inverse().apply({
x: startPointerX,
y: startPointerY
});
matrix.apply(p, p);
startPointerX = p.x;
startPointerY = p.y;
}
if (matrix.equals(_identityMatrix$1)) {
matrix = null;
}
},
recordStartPositions = function recordStartPositions() {
var edgeTolerance = 1 - self.edgeResistance,
offsetX = isFixed ? _getDocScrollLeft$1(ownerDoc) : 0,
offsetY = isFixed ? _getDocScrollTop$1(ownerDoc) : 0,
parsedOrigin,
x,
y;
if (xyMode) {
gsCache.x = getPropAsNum(xProp, "px") + "px";
gsCache.y = getPropAsNum(yProp, "px") + "px";
gsCache.renderTransform();
}
updateMatrix(false);
_point1.x = self.pointerX - offsetX;
_point1.y = self.pointerY - offsetY;
matrix && matrix.apply(_point1, _point1);
startPointerX = _point1.x;
startPointerY = _point1.y;
if (dirty) {
setPointerPosition(self.pointerX, self.pointerY);
render(true);
}
innerMatrix = getGlobalMatrix(target);
if (scrollProxy) {
calculateBounds();
startElementY = scrollProxy.top();
startElementX = scrollProxy.left();
} else {
if (isTweening()) {
syncXY(true, true);
calculateBounds();
} else {
self.applyBounds();
}
if (rotationMode) {
parsedOrigin = target.ownerSVGElement ? [gsCache.xOrigin - target.getBBox().x, gsCache.yOrigin - target.getBBox().y] : (_getComputedStyle(target)[_transformOriginProp$1] || "0 0").split(" ");
rotationOrigin = self.rotationOrigin = getGlobalMatrix(target).apply({
x: parseFloat(parsedOrigin[0]) || 0,
y: parseFloat(parsedOrigin[1]) || 0
});
syncXY(true, true);
x = self.pointerX - rotationOrigin.x - offsetX;
y = rotationOrigin.y - self.pointerY + offsetY;
startElementX = self.x;
startElementY = self.y = Math.atan2(y, x) * _RAD2DEG;
} else {
startElementY = getPropAsNum(yProp, "px");
startElementX = getPropAsNum(xProp, "px");
}
}
if (hasBounds && edgeTolerance) {
if (startElementX > maxX) {
startElementX = maxX + (startElementX - maxX) / edgeTolerance;
} else if (startElementX < minX) {
startElementX = minX - (minX - startElementX) / edgeTolerance;
}
if (!rotationMode) {
if (startElementY > maxY) {
startElementY = maxY + (startElementY - maxY) / edgeTolerance;
} else if (startElementY < minY) {
startElementY = minY - (minY - startElementY) / edgeTolerance;
}
}
}
self.startX = startElementX = _round(startElementX);
self.startY = startElementY = _round(startElementY);
},
isTweening = function isTweening() {
return self.tween && self.tween.isActive();
},
removePlaceholder = function removePlaceholder() {
if (_placeholderDiv.parentNode && !isTweening() && !self.isDragging) {
_placeholderDiv.parentNode.removeChild(_placeholderDiv);
}
},
onPress = function onPress(e, force) {
var i;
if (!enabled || self.isPressed || !e || (e.type === "mousedown" || e.type === "pointerdown") && !force && _getTime() - clickTime < 30 && _touchEventLookup[self.pointerEvent.type]) {
isPreventingDefault && e && enabled && _preventDefault(e);
return;
}
interrupted = isTweening();
dragged = false;
self.pointerEvent = e;
if (_touchEventLookup[e.type]) {
touchEventTarget = ~e.type.indexOf("touch") ? e.currentTarget || e.target : ownerDoc;
_addListener(touchEventTarget, "touchend", onRelease);
_addListener(touchEventTarget, "touchmove", onMove);
_addListener(touchEventTarget, "touchcancel", onRelease);
_addListener(ownerDoc, "touchstart", _onMultiTouchDocument);
} else {
touchEventTarget = null;
_addListener(ownerDoc, "mousemove", onMove);
}
touchDragAxis = null;
if (!_supportsPointer || !touchEventTarget) {
_addListener(ownerDoc, "mouseup", onRelease);
e && e.target && _addListener(e.target, "mouseup", onRelease);
}
isClicking = isClickable.call(self, e.target) && vars.dragClickables === false && !force;
if (isClicking) {
_addListener(e.target, "change", onRelease);
_dispatchEvent(self, "pressInit", "onPressInit");
_dispatchEvent(self, "press", "onPress");
_setSelectable(triggers, true);
isPreventingDefault = false;
return;
}
allowNativeTouchScrolling = !touchEventTarget || allowX === allowY || self.vars.allowNativeTouchScrolling === false || self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2) ? false : allowX ? "y" : "x";
isPreventingDefault = !allowNativeTouchScrolling && !self.allowEventDefault;
if (isPreventingDefault) {
_preventDefault(e);
_addListener(_win$1, "touchforcechange", _preventDefault);
}
if (e.changedTouches) {
e = touch = e.changedTouches[0];
touchID = e.identifier;
} else if (e.pointerId) {
touchID = e.pointerId;
} else {
touch = touchID = null;
}
_dragCount++;
_addToRenderQueue(render);
startPointerY = self.pointerY = e.pageY;
startPointerX = self.pointerX = e.pageX;
_dispatchEvent(self, "pressInit", "onPressInit");
if (allowNativeTouchScrolling || self.autoScroll) {
_recordMaxScrolls(target.parentNode);
}
if (target.parentNode && self.autoScroll && !scrollProxy && !rotationMode && target.parentNode._gsMaxScrollX && !_placeholderDiv.parentNode && !target.getBBox) {
_placeholderDiv.style.width = target.parentNode.scrollWidth + "px";
target.parentNode.appendChild(_placeholderDiv);
}
recordStartPositions();
self.tween && self.tween.kill();
self.isThrowing = false;
gsap.killTweensOf(scrollProxy || target, killProps, true);
scrollProxy && gsap.killTweensOf(target, {
scrollTo: 1
}, true);
self.tween = self.lockedAxis = null;
if (vars.zIndexBoost || !rotationMode && !scrollProxy && vars.zIndexBoost !== false) {
target.style.zIndex = Draggable.zIndex++;
}
self.isPressed = true;
hasDragCallback = !!(vars.onDrag || self._listeners.drag);
hasMoveCallback = !!(vars.onMove || self._listeners.move);
if (vars.cursor !== false || vars.activeCursor) {
i = triggers.length;
while (--i > -1) {
gsap.set(triggers[i], {
cursor: vars.activeCursor || vars.cursor || (_defaultCursor === "grab" ? "grabbing" : _defaultCursor)
});
}
}
_dispatchEvent(self, "press", "onPress");
InertiaPlugin && InertiaPlugin.track(scrollProxy || target, xyMode ? "x,y" : rotationMode ? "rotation" : "top,left");
},
onMove = function onMove(e) {
var originalEvent = e,
touches,
pointerX,
pointerY,
i,
dx,
dy;
if (!enabled || _isMultiTouching || !self.isPressed || !e) {
isPreventingDefault && e && enabled && _preventDefault(e);
return;
}
self.pointerEvent = e;
touches = e.changedTouches;
if (touches) {
e = touches[0];
if (e !== touch && e.identifier !== touchID) {
i = touches.length;
while (--i > -1 && (e = touches[i]).identifier !== touchID && e.target !== target) {}
if (i < 0) {
return;
}
}
} else if (e.pointerId && touchID && e.pointerId !== touchID) {
return;
}
if (touchEventTarget && allowNativeTouchScrolling && !touchDragAxis) {
_point1.x = e.pageX - (isFixed ? _getDocScrollLeft$1(ownerDoc) : 0);
_point1.y = e.pageY - (isFixed ? _getDocScrollTop$1(ownerDoc) : 0);
matrix && matrix.apply(_point1, _point1);
pointerX = _point1.x;
pointerY = _point1.y;
dx = Math.abs(pointerX - startPointerX);
dy = Math.abs(pointerY - startPointerY);
if (dx !== dy && (dx > minimumMovement || dy > minimumMovement) || _isAndroid && allowNativeTouchScrolling === touchDragAxis) {
touchDragAxis = dx > dy && allowX ? "x" : "y";
if (allowNativeTouchScrolling && touchDragAxis !== allowNativeTouchScrolling) {
_addListener(_win$1, "touchforcechange", _preventDefault);
}
if (self.vars.lockAxisOnTouchScroll !== false && allowX && allowY) {
self.lockedAxis = touchDragAxis === "x" ? "y" : "x";
_isFunction(self.vars.onLockAxis) && self.vars.onLockAxis.call(self, originalEvent);
}
if (_isAndroid && allowNativeTouchScrolling === touchDragAxis) {
onRelease(originalEvent);
return;
}
}
}
if (!self.allowEventDefault && (!allowNativeTouchScrolling || touchDragAxis && allowNativeTouchScrolling !== touchDragAxis) && originalEvent.cancelable !== false) {
_preventDefault(originalEvent);
isPreventingDefault = true;
} else if (isPreventingDefault) {
isPreventingDefault = false;
}
if (self.autoScroll) {
checkAutoScrollBounds = true;
}
setPointerPosition(e.pageX, e.pageY, hasMoveCallback);
},
setPointerPosition = function setPointerPosition(pointerX, pointerY, invokeOnMove) {
var dragTolerance = 1 - self.dragResistance,
edgeTolerance = 1 - self.edgeResistance,
prevPointerX = self.pointerX,
prevPointerY = self.pointerY,
prevStartElementY = startElementY,
prevX = self.x,
prevY = self.y,
prevEndX = self.endX,
prevEndY = self.endY,
prevEndRotation = self.endRotation,
prevDirty = dirty,
xChange,
yChange,
x,
y,
dif,
temp;
self.pointerX = pointerX;
self.pointerY = pointerY;
if (isFixed) {
pointerX -= _getDocScrollLeft$1(ownerDoc);
pointerY -= _getDocScrollTop$1(ownerDoc);
}
if (rotationMode) {
y = _round(Math.atan2(rotationOrigin.y - pointerY, pointerX - rotationOrigin.x) * _RAD2DEG);
dif = self.y - y;
if (dif > 180) {
startElementY -= 360;
self.y = y;
} else if (dif < -180) {
startElementY += 360;
self.y = y;
}
if (matrix) {
temp = pointerX * matrix.a + pointerY * matrix.c + matrix.e;
pointerY = pointerX * matrix.b + pointerY * matrix.d + matrix.f;
pointerX = temp;
}
if (self.x !== startElementX || Math.max(Math.abs(startPointerX - pointerX), Math.abs(startPointerY - pointerY)) > minimumMovement) {
self.y = y;
x = _round(startElementX + (startElementY - y) * dragTolerance);
} else {
x = startElementX;
}
} else {
if (matrix) {
temp = pointerX * matrix.a + pointerY * matrix.c + matrix.e;
pointerY = pointerX * matrix.b + pointerY * matrix.d + matrix.f;
pointerX = temp;
}
yChange = pointerY - startPointerY;
xChange = pointerX - startPointerX;
if (yChange < minimumMovement && yChange > -minimumMovement) {
yChange = 0;
}
if (xChange < minimumMovement && xChange > -minimumMovement) {
xChange = 0;
}
if ((self.lockAxis || self.lockedAxis) && (xChange || yChange)) {
temp = self.lockedAxis;
if (!temp) {
self.lockedAxis = temp = allowX && Math.abs(xChange) > Math.abs(yChange) ? "y" : allowY ? "x" : null;
if (temp && _isFunction(self.vars.onLockAxis)) {
self.vars.onLockAxis.call(self, self.pointerEvent);
}
}
if (temp === "y") {
yChange = 0;
} else if (temp === "x") {
xChange = 0;
}
}
x = _round(startElementX + xChange * dragTolerance);
y = _round(startElementY + yChange * dragTolerance);
}
if ((snapX || snapY || snapXY) && (self.x !== x || self.y !== y && !rotationMode)) {
if (snapXY) {
_temp1.x = x;
_temp1.y = y;
temp = snapXY(_temp1);
x = _round(temp.x);
y = _round(temp.y);
}
if (snapX) {
x = _round(snapX(x));
}
if (snapY) {
y = _round(snapY(y));
}
}
if (hasBounds) {
if (x > maxX) {
x = maxX + Math.round((x - maxX) * edgeTolerance);
} else if (x < minX) {
x = minX + Math.round((x - minX) * edgeTolerance);
}
if (!rotationMode) {
if (y > maxY) {
y = Math.round(maxY + (y - maxY) * edgeTolerance);
} else if (y < minY) {
y = Math.round(minY + (y - minY) * edgeTolerance);
}
}
}
if (self.x !== x || self.y !== y && !rotationMode) {
if (rotationMode) {
self.endRotation = self.x = self.endX = _round(x);
dirty = true;
} else {
if (allowY) {
self.y = self.endY = y;
dirty = true;
}
if (allowX) {
self.x = self.endX = x;
dirty = true;
}
}
if (!invokeOnMove || _dispatchEvent(self, "move", "onMove") !== false) {
if (!self.isDragging && self.isPressed) {
self.isDragging = dragged = true;
_dispatchEvent(self, "dragstart", "onDragStart");
}
} else {
self.pointerX = prevPointerX;
self.pointerY = prevPointerY;
startElementY = prevStartElementY;
self.x = prevX;
self.y = prevY;
self.endX = prevEndX;
self.endY = prevEndY;
self.endRotation = prevEndRotation;
dirty = prevDirty;
}
}
},
onRelease = function onRelease(e, force) {
if (!enabled || !self.isPressed || e && touchID != null && !force && (e.pointerId && e.pointerId !== touchID && e.target !== target || e.changedTouches && !_hasTouchID(e.changedTouches, touchID))) {
isPreventingDefault && e && enabled && _preventDefault(e);
return;
}
self.isPressed = false;
var originalEvent = e,
wasDragging = self.isDragging,
isContextMenuRelease = self.vars.allowContextMenu && e && (e.ctrlKey || e.which > 2),
placeholderDelayedCall = gsap.delayedCall(0.001, removePlaceholder),
touches,
i,
syntheticEvent,
eventTarget,
syntheticClick;
if (touchEventTarget) {
_removeListener(touchEventTarget, "touchend", onRelease);
_removeListener(touchEventTarget, "touchmove", onMove);
_removeListener(touchEventTarget, "touchcancel", onRelease);
_removeListener(ownerDoc, "touchstart", _onMultiTouchDocument);
} else {
_removeListener(ownerDoc, "mousemove", onMove);
}
_removeListener(_win$1, "touchforcechange", _preventDefault);
if (!_supportsPointer || !touchEventTarget) {
_removeListener(ownerDoc, "mouseup", onRelease);
e && e.target && _removeListener(e.target, "mouseup", onRelease);
}
dirty = false;
if (wasDragging) {
dragEndTime = _lastDragTime = _getTime();
self.isDragging = false;
}
_removeFromRenderQueue(render);
if (isClicking && !isContextMenuRelease) {
if (e) {
_removeListener(e.target, "change", onRelease);
self.pointerEvent = originalEvent;
}
_setSelectable(triggers, false);
_dispatchEvent(self, "release", "onRelease");
_dispatchEvent(self, "click", "onClick");
isClicking = false;
return;
}
i = triggers.length;
while (--i > -1) {
_setStyle(triggers[i], "cursor", vars.cursor || (vars.cursor !== false ? _defaultCursor : null));
}
_dragCount--;
if (e) {
touches = e.changedTouches;
if (touches) {
e = touches[0];
if (e !== touch && e.identifier !== touchID) {
i = touches.length;
while (--i > -1 && (e = touches[i]).identifier !== touchID && e.target !== target) {}
if (i < 0 && !force) {
return;
}
}
}
self.pointerEvent = originalEvent;
self.pointerX = e.pageX;
self.pointerY = e.pageY;
}
if (isContextMenuRelease && originalEvent) {
_preventDefault(originalEvent);
isPreventingDefault = true;
_dispatchEvent(self, "release", "onRelease");
} else if (originalEvent && !wasDragging) {
isPreventingDefault = false;
if (interrupted && (vars.snap || vars.bounds)) {
animate(vars.inertia || vars.throwProps);
}
_dispatchEvent(self, "release", "onRelease");
if ((!_isAndroid || originalEvent.type !== "touchmove") && originalEvent.type.indexOf("cancel") === -1) {
_dispatchEvent(self, "click", "onClick");
if (_getTime() - clickTime < 300) {
_dispatchEvent(self, "doubleclick", "onDoubleClick");
}
eventTarget = originalEvent.target || target;
clickTime = _getTime();
syntheticClick = function syntheticClick() {
if (clickTime !== clickDispatch && self.enabled() && !self.isPressed && !originalEvent.defaultPrevented) {
if (eventTarget.click) {
eventTarget.click();
} else if (ownerDoc.createEvent) {
syntheticEvent = ownerDoc.createEvent("MouseEvents");
syntheticEvent.initMouseEvent("click", true, true, _win$1, 1, self.pointerEvent.screenX, self.pointerEvent.screenY, self.pointerX, self.pointerY, false, false, false, false, 0, null);
eventTarget.dispatchEvent(syntheticEvent);
}
}
};
if (!_isAndroid && !originalEvent.defaultPrevented) {
gsap.delayedCall(0.05, syntheticClick);
}
}
} else {
animate(vars.inertia || vars.throwProps);
if (!self.allowEventDefault && originalEvent && (vars.dragClickables !== false || !isClickable.call(self, originalEvent.target)) && wasDragging && (!allowNativeTouchScrolling || touchDragAxis && allowNativeTouchScrolling === touchDragAxis) && originalEvent.cancelable !== false) {
isPreventingDefault = true;
_preventDefault(originalEvent);
} else {
isPreventingDefault = false;
}
_dispatchEvent(self, "release", "onRelease");
}
isTweening() && placeholderDelayedCall.duration(self.tween.duration());
wasDragging && _dispatchEvent(self, "dragend", "onDragEnd");
return true;
},
updateScroll = function updateScroll(e) {
if (e && self.isDragging && !scrollProxy) {
var parent = e.target || target.parentNode,
deltaX = parent.scrollLeft - parent._gsScrollX,
deltaY = parent.scrollTop - parent._gsScrollY;
if (deltaX || deltaY) {
if (matrix) {
startPointerX -= deltaX * matrix.a + deltaY * matrix.c;
startPointerY -= deltaY * matrix.d + deltaX * matrix.b;
} else {
startPointerX -= deltaX;
startPointerY -= deltaY;
}
parent._gsScrollX += deltaX;
parent._gsScrollY += deltaY;
setPointerPosition(self.pointerX, self.pointerY);
}
}
},
onClick = function onClick(e) {
var time = _getTime(),
recentlyClicked = time - clickTime < 100,
recentlyDragged = time - dragEndTime < 50,
alreadyDispatched = recentlyClicked && clickDispatch === clickTime,
defaultPrevented = self.pointerEvent && self.pointerEvent.defaultPrevented,
alreadyDispatchedTrusted = recentlyClicked && trustedClickDispatch === clickTime,
trusted = e.isTrusted || e.isTrusted == null && recentlyClicked && alreadyDispatched;
if ((alreadyDispatched || recentlyDragged && self.vars.suppressClickOnDrag !== false) && e.stopImmediatePropagation) {
e.stopImmediatePropagation();
}
if (recentlyClicked && !(self.pointerEvent && self.pointerEvent.defaultPrevented) && (!alreadyDispatched || trusted && !alreadyDispatchedTrusted)) {
if (trusted && alreadyDispatched) {
trustedClickDispatch = clickTime;
}
clickDispatch = clickTime;
return;
}
if (self.isPressed || recentlyDragged || recentlyClicked) {
if (!trusted || !e.detail || !recentlyClicked || defaultPrevented) {
_preventDefault(e);
}
}
if (!recentlyClicked && !recentlyDragged && !dragged) {
e && e.target && (self.pointerEvent = e);
_dispatchEvent(self, "click", "onClick");
}
},
localizePoint = function localizePoint(p) {
return matrix ? {
x: p.x * matrix.a + p.y * matrix.c + matrix.e,
y: p.x * matrix.b + p.y * matrix.d + matrix.f
} : {
x: p.x,
y: p.y
};
};
old = Draggable.get(target);
old && old.kill();
_this2.startDrag = function (event, align) {
var r1, r2, p1, p2;
onPress(event || self.pointerEvent, true);
if (align && !self.hitTest(event || self.pointerEvent)) {
r1 = _parseRect(event || self.pointerEvent);
r2 = _parseRect(target);
p1 = localizePoint({
x: r1.left + r1.width / 2,
y: r1.top + r1.height / 2
});
p2 = localizePoint({
x: r2.left + r2.width / 2,
y: r2.top + r2.height / 2
});
startPointerX -= p1.x - p2.x;
startPointerY -= p1.y - p2.y;
}
if (!self.isDragging) {
self.isDragging = dragged = true;
_dispatchEvent(self, "dragstart", "onDragStart");
}
};
_this2.drag = onMove;
_this2.endDrag = function (e) {
return onRelease(e || self.pointerEvent, true);
};
_this2.timeSinceDrag = function () {
return self.isDragging ? 0 : (_getTime() - dragEndTime) / 1000;
};
_this2.timeSinceClick = function () {
return (_getTime() - clickTime) / 1000;
};
_this2.hitTest = function (target, threshold) {
return Draggable.hitTest(self.target, target, threshold);
};
_this2.getDirection = function (from, diagonalThreshold) {
var mode = from === "velocity" && InertiaPlugin ? from : _isObject(from) && !rotationMode ? "element" : "start",
xChange,
yChange,
ratio,
direction,
r1,
r2;
if (mode === "element") {
r1 = _parseRect(self.target);
r2 = _parseRect(from);
}
xChange = mode === "start" ? self.x - startElementX : mode === "velocity" ? InertiaPlugin.getVelocity(target, xProp) : r1.left + r1.width / 2 - (r2.left + r2.width / 2);
if (rotationMode) {
return xChange < 0 ? "counter-clockwise" : "clockwise";
} else {
diagonalThreshold = diagonalThreshold || 2;
yChange = mode === "start" ? self.y - startElementY : mode === "velocity" ? InertiaPlugin.getVelocity(target, yProp) : r1.top + r1.height / 2 - (r2.top + r2.height / 2);
ratio = Math.abs(xChange / yChange);
direction = ratio < 1 / diagonalThreshold ? "" : xChange < 0 ? "left" : "right";
if (ratio < diagonalThreshold) {
if (direction !== "") {
direction += "-";
}
direction += yChange < 0 ? "up" : "down";
}
}
return direction;
};
_this2.applyBounds = function (newBounds, sticky) {
var x, y, forceZeroVelocity, e, parent, isRoot;
if (newBounds && vars.bounds !== newBounds) {
vars.bounds = newBounds;
return self.update(true, sticky);
}
syncXY(true);
calculateBounds();
if (hasBounds && !isTweening()) {
x = self.x;
y = self.y;
if (x > maxX) {
x = maxX;
} else if (x < minX) {
x = minX;
}
if (y > maxY) {
y = maxY;
} else if (y < minY) {
y = minY;
}
if (self.x !== x || self.y !== y) {
forceZeroVelocity = true;
self.x = self.endX = x;
if (rotationMode) {
self.endRotation = x;
} else {
self.y = self.endY = y;
}
dirty = true;
render(true);
if (self.autoScroll && !self.isDragging) {
_recordMaxScrolls(target.parentNode);
e = target;
_windowProxy.scrollTop = _win$1.pageYOffset != null ? _win$1.pageYOffset : ownerDoc.documentElement.scrollTop != null ? ownerDoc.documentElement.scrollTop : ownerDoc.body.scrollTop;
_windowProxy.scrollLeft = _win$1.pageXOffset != null ? _win$1.pageXOffset : ownerDoc.documentElement.scrollLeft != null ? ownerDoc.documentElement.scrollLeft : ownerDoc.body.scrollLeft;
while (e && !isRoot) {
isRoot = _isRoot(e.parentNode);
parent = isRoot ? _windowProxy : e.parentNode;
if (allowY && parent.scrollTop > parent._gsMaxScrollY) {
parent.scrollTop = parent._gsMaxScrollY;
}
if (allowX && parent.scrollLeft > parent._gsMaxScrollX) {
parent.scrollLeft = parent._gsMaxScrollX;
}
e = parent;
}
}
}
if (self.isThrowing && (forceZeroVelocity || self.endX > maxX || self.endX < minX || self.endY > maxY || self.endY < minY)) {
animate(vars.inertia || vars.throwProps, forceZeroVelocity);
}
}
return self;
};
_this2.update = function (applyBounds, sticky, ignoreExternalChanges) {
if (sticky && self.isPressed) {
if (rotationMode) {
self.x = self.y = _round(parseFloat(gsCache.rotation));
} else {
var m = getGlobalMatrix(target),
p = innerMatrix.apply({
x: self.x - startElementX,
y: self.y - startElementY
}),
m2 = getGlobalMatrix(target.parentNode, true);
m2.apply({
x: m.e - p.x,
y: m.f - p.y
}, p);
self.x = _round(self.x - (p.x - m2.e));
self.y = _round(self.y - (p.y - m2.f));
}
render(true);
recordStartPositions();
}
var x = self.x,
y = self.y;
updateMatrix(!sticky);
if (applyBounds) {
self.applyBounds();
} else {
dirty && ignoreExternalChanges && render(true);
syncXY(true);
}
if (sticky) {
setPointerPosition(self.pointerX, self.pointerY);
dirty && render(true);
}
if (self.isPressed && !sticky && (allowX && Math.abs(x - self.x) > 0.01 || allowY && Math.abs(y - self.y) > 0.01 && !rotationMode)) {
recordStartPositions();
}
if (self.autoScroll) {
_recordMaxScrolls(target.parentNode, self.isDragging);
checkAutoScrollBounds = self.isDragging;
render(true);
_removeScrollListener(target, updateScroll);
_addScrollListener(target, updateScroll);
}
return self;
};
_this2.enable = function (type) {
var setVars = {
lazy: true
},
id,
i,
trigger;
if (vars.cursor !== false) {
setVars.cursor = vars.cursor || _defaultCursor;
}
if (gsap.utils.checkPrefix("touchCallout")) {
setVars.touchCallout = "none";
}
if (type !== "soft") {
_setTouchActionForAllDescendants(triggers, allowX === allowY ? "none" : vars.allowNativeTouchScrolling && target.scrollHeight === target.clientHeight === (target.scrollWidth === target.clientHeight) || vars.allowEventDefault ? "manipulation" : allowX ? "pan-y" : "pan-x");
i = triggers.length;
while (--i > -1) {
trigger = triggers[i];
_supportsPointer || _addListener(trigger, "mousedown", onPress);
_addListener(trigger, "touchstart", onPress);
_addListener(trigger, "click", onClick, true);
gsap.set(trigger, setVars);
if (trigger.getBBox && trigger.ownerSVGElement && allowX !== allowY) {
gsap.set(trigger.ownerSVGElement, {
touchAction: vars.allowNativeTouchScrolling || vars.allowEventDefault ? "manipulation" : allowX ? "pan-y" : "pan-x"
});
}
vars.allowContextMenu || _addListener(trigger, "contextmenu", onContextMenu);
}
_setSelectable(triggers, false);
}
_addScrollListener(target, updateScroll);
enabled = true;
if (InertiaPlugin && type !== "soft") {
InertiaPlugin.track(scrollProxy || target, xyMode ? "x,y" : rotationMode ? "rotation" : "top,left");
}
target._gsDragID = id = target._gsDragID || "d" + _lookupCount++;
_lookup[id] = self;
if (scrollProxy) {
scrollProxy.enable();
scrollProxy.element._gsDragID = id;
}
(vars.bounds || rotationMode) && recordStartPositions();
vars.bounds && self.applyBounds();
return self;
};
_this2.disable = function (type) {
var dragging = self.isDragging,
i = triggers.length,
trigger;
while (--i > -1) {
_setStyle(triggers[i], "cursor", null);
}
if (type !== "soft") {
_setTouchActionForAllDescendants(triggers, null);
i = triggers.length;
while (--i > -1) {
trigger = triggers[i];
_setStyle(trigger, "touchCallout", null);
_removeListener(trigger, "mousedown", onPress);
_removeListener(trigger, "touchstart", onPress);
_removeListener(trigger, "click", onClick, true);
_removeListener(trigger, "contextmenu", onContextMenu);
}
_setSelectable(triggers, true);
if (touchEventTarget) {
_removeListener(touchEventTarget, "touchcancel", onRelease);
_removeListener(touchEventTarget, "touchend", onRelease);
_removeListener(touchEventTarget, "touchmove", onMove);
}
_removeListener(ownerDoc, "mouseup", onRelease);
_removeListener(ownerDoc, "mousemove", onMove);
}
_removeScrollListener(target, updateScroll);
enabled = false;
if (InertiaPlugin && type !== "soft") {
InertiaPlugin.untrack(scrollProxy || target, xyMode ? "x,y" : rotationMode ? "rotation" : "top,left");
self.tween && self.tween.kill();
}
scrollProxy && scrollProxy.disable();
_removeFromRenderQueue(render);
self.isDragging = self.isPressed = isClicking = false;
dragging && _dispatchEvent(self, "dragend", "onDragEnd");
return self;
};
_this2.enabled = function (value, type) {
return arguments.length ? value ? self.enable(type) : self.disable(type) : enabled;
};
_this2.kill = function () {
self.isThrowing = false;
self.tween && self.tween.kill();
self.disable();
gsap.set(triggers, {
clearProps: "userSelect"
});
delete _lookup[target._gsDragID];
return self;
};
_this2.revert = function () {
this.kill();
this.styles && this.styles.revert();
};
if (~type.indexOf("scroll")) {
scrollProxy = _this2.scrollProxy = new ScrollProxy(target, _extend({
onKill: function onKill() {
self.isPressed && onRelease(null);
}
}, vars));
target.style.overflowY = allowY && !_isTouchDevice ? "auto" : "hidden";
target.style.overflowX = allowX && !_isTouchDevice ? "auto" : "hidden";
target = scrollProxy.content;
}
if (rotationMode) {
killProps.rotation = 1;
} else {
if (allowX) {
killProps[xProp] = 1;
}
if (allowY) {
killProps[yProp] = 1;
}
}
gsCache.force3D = "force3D" in vars ? vars.force3D : true;
_context(_assertThisInitialized(_this2));
_this2.enable();
return _this2;
}
Draggable.register = function register(core) {
gsap = core;
_initCore();
};
Draggable.create = function create(targets, vars) {
_coreInitted || _initCore(true);
return _toArray(targets).map(function (target) {
return new Draggable(target, vars);
});
};
Draggable.get = function get(target) {
return _lookup[(_toArray(target)[0] || {})._gsDragID];
};
Draggable.timeSinceDrag = function timeSinceDrag() {
return (_getTime() - _lastDragTime) / 1000;
};
Draggable.hitTest = function hitTest(obj1, obj2, threshold) {
if (obj1 === obj2) {
return false;
}
var r1 = _parseRect(obj1),
r2 = _parseRect(obj2),
top = r1.top,
left = r1.left,
right = r1.right,
bottom = r1.bottom,
width = r1.width,
height = r1.height,
isOutside = r2.left > right || r2.right < left || r2.top > bottom || r2.bottom < top,
overlap,
area,
isRatio;
if (isOutside || !threshold) {
return !isOutside;
}
isRatio = (threshold + "").indexOf("%") !== -1;
threshold = parseFloat(threshold) || 0;
overlap = {
left: Math.max(left, r2.left),
top: Math.max(top, r2.top)
};
overlap.width = Math.min(right, r2.right) - overlap.left;
overlap.height = Math.min(bottom, r2.bottom) - overlap.top;
if (overlap.width < 0 || overlap.height < 0) {
return false;
}
if (isRatio) {
threshold *= 0.01;
area = overlap.width * overlap.height;
return area >= width * height * threshold || area >= r2.width * r2.height * threshold;
}
return overlap.width > threshold && overlap.height > threshold;
};
return Draggable;
}(EventDispatcher);
_setDefaults(Draggable.prototype, {
pointerX: 0,
pointerY: 0,
startX: 0,
startY: 0,
deltaX: 0,
deltaY: 0,
isDragging: false,
isPressed: false
});
Draggable.zIndex = 1000;
Draggable.version = "3.14.2";
_getGSAP() && gsap.registerPlugin(Draggable);
exports.Draggable = Draggable;
exports.default = Draggable;
if (typeof(window) === 'undefined' || window !== exports) {Object.defineProperty(exports, '__esModule', { value: true });} else {delete window.default;}
})));
================================================
FILE: dist/DrawSVGPlugin.js
================================================
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
/*!
* DrawSVGPlugin 3.14.2
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var gsap,
_toArray,
_win,
_isEdge,
_coreInitted,
_warned,
_getStyleSaver,
_reverting,
_windowExists = function _windowExists() {
return typeof window !== "undefined";
},
_getGSAP = function _getGSAP() {
return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap;
},
_numExp = /[-+=\.]*\d+[\.e\-\+]*\d*[e\-\+]*\d*/gi,
_types = {
rect: ["width", "height"],
circle: ["r", "r"],
ellipse: ["rx", "ry"],
line: ["x2", "y2"]
},
_round = function _round(value) {
return Math.round(value * 10000) / 10000;
},
_parseNum = function _parseNum(value) {
return parseFloat(value) || 0;
},
_parseSingleVal = function _parseSingleVal(value, length) {
var num = _parseNum(value);
return ~value.indexOf("%") ? num / 100 * length : num;
},
_getAttributeAsNumber = function _getAttributeAsNumber(target, attr) {
return _parseNum(target.getAttribute(attr));
},
_sqrt = Math.sqrt,
_getDistance = function _getDistance(x1, y1, x2, y2, scaleX, scaleY) {
return _sqrt(Math.pow((_parseNum(x2) - _parseNum(x1)) * scaleX, 2) + Math.pow((_parseNum(y2) - _parseNum(y1)) * scaleY, 2));
},
_warn = function _warn(message) {
return console.warn(message);
},
_hasNonScalingStroke = function _hasNonScalingStroke(target) {
return target.getAttribute("vector-effect") === "non-scaling-stroke";
},
_bonusValidated = 1,
_parse = function _parse(value, length, defaultStart) {
var i = value.indexOf(" "),
s,
e;
if (i < 0) {
s = defaultStart !== undefined ? defaultStart + "" : value;
e = value;
} else {
s = value.substr(0, i);
e = value.substr(i + 1);
}
s = _parseSingleVal(s, length);
e = _parseSingleVal(e, length);
return s > e ? [e, s] : [s, e];
},
_getLength = function _getLength(target) {
target = _toArray(target)[0];
if (!target) {
return 0;
}
var type = target.tagName.toLowerCase(),
style = target.style,
scaleX = 1,
scaleY = 1,
length,
bbox,
points,
prevPoint,
i,
rx,
ry;
if (_hasNonScalingStroke(target)) {
scaleY = target.getScreenCTM();
scaleX = _sqrt(scaleY.a * scaleY.a + scaleY.b * scaleY.b);
scaleY = _sqrt(scaleY.d * scaleY.d + scaleY.c * scaleY.c);
}
try {
bbox = target.getBBox();
} catch (e) {
_warn("Some browsers won't measure invisible elements (like display:none or masks inside defs).");
}
var _ref = bbox || {
x: 0,
y: 0,
width: 0,
height: 0
},
x = _ref.x,
y = _ref.y,
width = _ref.width,
height = _ref.height;
if ((!bbox || !width && !height) && _types[type]) {
width = _getAttributeAsNumber(target, _types[type][0]);
height = _getAttributeAsNumber(target, _types[type][1]);
if (type !== "rect" && type !== "line") {
width *= 2;
height *= 2;
}
if (type === "line") {
x = _getAttributeAsNumber(target, "x1");
y = _getAttributeAsNumber(target, "y1");
width = Math.abs(width - x);
height = Math.abs(height - y);
}
}
if (type === "path") {
prevPoint = style.strokeDasharray;
style.strokeDasharray = "none";
length = target.getTotalLength() || 0;
_round(scaleX) !== _round(scaleY) && !_warned && (_warned = 1) && _warn("Warning: <path> length cannot be measured when vector-effect is non-scaling-stroke and the element isn't proportionally scaled.");
length *= (scaleX + scaleY) / 2;
style.strokeDasharray = prevPoint;
} else if (type === "rect") {
length = width * 2 * scaleX + height * 2 * scaleY;
} else if (type === "line") {
length = _getDistance(x, y, x + width, y + height, scaleX, scaleY);
} else if (type === "polyline" || type === "polygon") {
points = target.getAttribute("points").match(_numExp) || [];
type === "polygon" && points.push(points[0], points[1]);
length = 0;
for (i = 2; i < points.length; i += 2) {
length += _getDistance(points[i - 2], points[i - 1], points[i], points[i + 1], scaleX, scaleY) || 0;
}
} else if (type === "circle" || type === "ellipse") {
rx = width / 2 * scaleX;
ry = height / 2 * scaleY;
length = Math.PI * (3 * (rx + ry) - _sqrt((3 * rx + ry) * (rx + 3 * ry)));
}
return length || 0;
},
_getPosition = function _getPosition(target, length) {
target = _toArray(target)[0];
if (!target) {
return [0, 0];
}
length || (length = _getLength(target) + 1);
var cs = _win.getComputedStyle(target),
dash = cs.strokeDasharray || "",
offset = _parseNum(cs.strokeDashoffset),
i = dash.indexOf(",");
i < 0 && (i = dash.indexOf(" "));
dash = i < 0 ? length : _parseNum(dash.substr(0, i));
dash > length && (dash = length);
return [-offset || 0, dash - offset || 0];
},
_initCore = function _initCore() {
if (_windowExists()) {
_win = window;
_coreInitted = gsap = _getGSAP();
_toArray = gsap.utils.toArray;
_getStyleSaver = gsap.core.getStyleSaver;
_reverting = gsap.core.reverting || function () {};
_isEdge = ((_win.navigator || {}).userAgent || "").indexOf("Edge") !== -1;
}
};
var DrawSVGPlugin = {
version: "3.14.2",
name: "drawSVG",
register: function register(core) {
gsap = core;
_initCore();
},
init: function init(target, value, tween, index, targets) {
if (!target.getBBox) {
return false;
}
_coreInitted || _initCore();
var length = _getLength(target),
start,
end,
cs;
this.styles = _getStyleSaver && _getStyleSaver(target, "strokeDashoffset,strokeDasharray,strokeMiterlimit");
this.tween = tween;
this._style = target.style;
this._target = target;
if (value + "" === "true") {
value = "0 100%";
} else if (!value) {
value = "0 0";
} else if ((value + "").indexOf(" ") === -1) {
value = "0 " + value;
}
start = _getPosition(target, length);
end = _parse(value, length, start[0]);
this._length = _round(length);
this._dash = _round(start[1] - start[0]);
this._offset = _round(-start[0]);
this._dashPT = this.add(this, "_dash", this._dash, _round(end[1] - end[0]), 0, 0, 0, 0, 0, 1);
this._offsetPT = this.add(this, "_offset", this._offset, _round(-end[0]), 0, 0, 0, 0, 0, 1);
if (_isEdge) {
cs = _win.getComputedStyle(target);
if (cs.strokeLinecap !== cs.strokeLinejoin) {
end = _parseNum(cs.strokeMiterlimit);
this.add(target.style, "strokeMiterlimit", end, end + 0.01);
}
}
this._live = _hasNonScalingStroke(target) || ~(value + "").indexOf("live");
this._nowrap = ~(value + "").indexOf("nowrap");
this._props.push("drawSVG");
return _bonusValidated;
},
render: function render(ratio, data) {
if (data.tween._time || !_reverting()) {
var pt = data._pt,
style = data._style,
length,
lengthRatio,
dash,
offset;
if (pt) {
if (data._live) {
length = _getLength(data._target);
if (length !== data._length) {
lengthRatio = length / data._length;
data._length = length;
if (data._offsetPT) {
data._offsetPT.s *= lengthRatio;
data._offsetPT.c *= lengthRatio;
}
if (data._dashPT) {
data._dashPT.s *= lengthRatio;
data._dashPT.c *= lengthRatio;
} else {
data._dash *= lengthRatio;
}
}
}
while (pt) {
pt.r(ratio, pt.d);
pt = pt._next;
}
dash = data._dash || ratio && ratio !== 1 && 0.0001 || 0;
length = data._length - dash + 0.1;
offset = data._offset;
dash && offset && dash + Math.abs(offset % data._length) > data._length - 0.05 && (offset += offset < 0 ? 0.005 : -0.005) && (length += 0.005);
style.strokeDashoffset = dash ? offset : offset + 0.001;
style.strokeDasharray = length < 0.1 ? "none" : dash ? dash + "px," + (data._nowrap ? 999999 : length) + "px" : "0px, 999999px";
}
} else {
data.styles.revert();
}
},
getLength: _getLength,
getPosition: _getPosition
};
_getGSAP() && gsap.registerPlugin(DrawSVGPlugin);
exports.DrawSVGPlugin = DrawSVGPlugin;
exports.default = DrawSVGPlugin;
Object.defineProperty(exports, '__esModule', { value: true });
})));
================================================
FILE: dist/EasePack.js
================================================
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
/*!
* EasePack 3.14.2
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var gsap,
_registerEase,
_getGSAP = function _getGSAP() {
return gsap || typeof window !== "undefined" && (gsap = window.gsap) && gsap.registerPlugin && gsap;
},
_boolean = function _boolean(value, defaultValue) {
return !!(typeof value === "undefined" ? defaultValue : value && !~(value + "").indexOf("false"));
},
_initCore = function _initCore(core) {
gsap = core || _getGSAP();
if (gsap) {
_registerEase = gsap.registerEase;
var eases = gsap.parseEase(),
createConfig = function createConfig(ease) {
return function (ratio) {
var y = 0.5 + ratio / 2;
ease.config = function (p) {
return ease(2 * (1 - p) * p * y + p * p);
};
};
},
p;
for (p in eases) {
if (!eases[p].config) {
createConfig(eases[p]);
}
}
_registerEase("slow", SlowMo);
_registerEase("expoScale", ExpoScaleEase);
_registerEase("rough", RoughEase);
for (p in EasePack) {
p !== "version" && gsap.core.globals(p, EasePack[p]);
}
}
},
_createSlowMo = function _createSlowMo(linearRatio, power, yoyoMode) {
linearRatio = Math.min(1, linearRatio || 0.7);
var pow = linearRatio < 1 ? power || power === 0 ? power : 0.7 : 0,
p1 = (1 - linearRatio) / 2,
p3 = p1 + linearRatio,
calcEnd = _boolean(yoyoMode);
return function (p) {
var r = p + (0.5 - p) * pow;
return p < p1 ? calcEnd ? 1 - (p = 1 - p / p1) * p : r - (p = 1 - p / p1) * p * p * p * r : p > p3 ? calcEnd ? p === 1 ? 0 : 1 - (p = (p - p3) / p1) * p : r + (p - r) * (p = (p - p3) / p1) * p * p * p : calcEnd ? 1 : r;
};
},
_createExpoScale = function _createExpoScale(start, end, ease) {
var p1 = Math.log(end / start),
p2 = end - start;
ease && (ease = gsap.parseEase(ease));
return function (p) {
return (start * Math.exp(p1 * (ease ? ease(p) : p)) - start) / p2;
};
},
EasePoint = function EasePoint(time, value, next) {
this.t = time;
this.v = value;
if (next) {
this.next = next;
next.prev = this;
this.c = next.v - value;
this.gap = next.t - time;
}
},
_createRoughEase = function _createRoughEase(vars) {
if (typeof vars !== "object") {
vars = {
points: +vars || 20
};
}
var taper = vars.taper || "none",
a = [],
cnt = 0,
points = (+vars.points || 20) | 0,
i = points,
randomize = _boolean(vars.randomize, true),
clamp = _boolean(vars.clamp),
template = gsap ? gsap.parseEase(vars.template) : 0,
strength = (+vars.strength || 1) * 0.4,
x,
y,
bump,
invX,
obj,
pnt,
recent;
while (--i > -1) {
x = randomize ? Math.random() : 1 / points * i;
y = template ? template(x) : x;
if (taper === "none") {
bump = strength;
} else if (taper === "out") {
invX = 1 - x;
bump = invX * invX * strength;
} else if (taper === "in") {
bump = x * x * strength;
} else if (x < 0.5) {
invX = x * 2;
bump = invX * invX * 0.5 * strength;
} else {
invX = (1 - x) * 2;
bump = invX * invX * 0.5 * strength;
}
if (randomize) {
y += Math.random() * bump - bump * 0.5;
} else if (i % 2) {
y += bump * 0.5;
} else {
y -= bump * 0.5;
}
if (clamp) {
if (y > 1) {
y = 1;
} else if (y < 0) {
y = 0;
}
}
a[cnt++] = {
x: x,
y: y
};
}
a.sort(function (a, b) {
return a.x - b.x;
});
pnt = new EasePoint(1, 1, null);
i = points;
while (i--) {
obj = a[i];
pnt = new EasePoint(obj.x, obj.y, pnt);
}
recent = new EasePoint(0, 0, pnt.t ? pnt : pnt.next);
return function (p) {
var pnt = recent;
if (p > pnt.t) {
while (pnt.next && p >= pnt.t) {
pnt = pnt.next;
}
pnt = pnt.prev;
} else {
while (pnt.prev && p <= pnt.t) {
pnt = pnt.prev;
}
}
recent = pnt;
return pnt.v + (p - pnt.t) / pnt.gap * pnt.c;
};
};
var SlowMo = _createSlowMo(0.7);
SlowMo.ease = SlowMo;
SlowMo.config = _createSlowMo;
var ExpoScaleEase = _createExpoScale(1, 2);
ExpoScaleEase.config = _createExpoScale;
var RoughEase = _createRoughEase();
RoughEase.ease = RoughEase;
RoughEase.config = _createRoughEase;
var EasePack = {
SlowMo: SlowMo,
RoughEase: RoughEase,
ExpoScaleEase: ExpoScaleEase
};
for (var p in EasePack) {
EasePack[p].register = _initCore;
EasePack[p].version = "3.14.2";
}
_getGSAP() && gsap.registerPlugin(SlowMo);
exports.EasePack = EasePack;
exports.ExpoScaleEase = ExpoScaleEase;
exports.RoughEase = RoughEase;
exports.SlowMo = SlowMo;
exports.default = EasePack;
Object.defineProperty(exports, '__esModule', { value: true });
})));
================================================
FILE: dist/EaselPlugin.js
================================================
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
/*!
* EaselPlugin 3.14.2
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var gsap,
_coreInitted,
_win,
_createJS,
_ColorFilter,
_ColorMatrixFilter,
_colorProps = "redMultiplier,greenMultiplier,blueMultiplier,alphaMultiplier,redOffset,greenOffset,blueOffset,alphaOffset".split(","),
_windowExists = function _windowExists() {
return typeof window !== "undefined";
},
_getGSAP = function _getGSAP() {
return gsap || _windowExists() && (gsap = window.gsap) && gsap.registerPlugin && gsap;
},
_getCreateJS = function _getCreateJS() {
return _createJS || _win && _win.createjs || _win || {};
},
_warn = function _warn(message) {
return console.warn(message);
},
_cache = function _cache(target) {
var b = target.getBounds && target.getBounds();
if (!b) {
b = target.nominalBounds || {
x: 0,
y: 0,
width: 100,
height: 100
};
target.setBounds && target.setBounds(b.x, b.y, b.width, b.height);
}
target.cache && target.cache(b.x, b.y, b.width, b.height);
_warn("EaselPlugin: for filters to display in EaselJS, you must call the object's cache() method first. GSAP attempted to use the target's getBounds() for the cache but that may not be completely accurate. " + target);
},
_parseColorFilter = function _parseColorFilter(target, v, plugin) {
if (!_ColorFilter) {
_ColorFilter = _getCreateJS().ColorFilter;
if (!_ColorFilter) {
_warn("EaselPlugin error: The EaselJS ColorFilter JavaScript file wasn't loaded.");
}
}
var filters = target.filters || [],
i = filters.length,
c,
s,
e,
a,
p,
pt;
while (i--) {
if (filters[i] instanceof _ColorFilter) {
s = filters[i];
break;
}
}
if (!s) {
s = new _ColorFilter();
filters.push(s);
target.filters = filters;
}
e = s.clone();
if (v.tint != null) {
c = gsap.utils.splitColor(v.tint);
a = v.tintAmount != null ? +v.tintAmount : 1;
e.redOffset = +c[0] * a;
e.greenOffset = +c[1] * a;
e.blueOffset = +c[2] * a;
e.redMultiplier = e.greenMultiplier = e.blueMultiplier = 1 - a;
} else {
for (p in v) {
if (p !== "exposure") if (p !== "brightness") {
e[p] = +v[p];
}
}
}
if (v.exposure != null) {
e.redOffset = e.greenOffset = e.blueOffset = 255 * (+v.exposure - 1);
e.redMultiplier = e.greenMultiplier = e.blueMultiplier = 1;
} else if (v.brightness != null) {
a = +v.brightness - 1;
e.redOffset = e.greenOffset = e.blueOffset = a > 0 ? a * 255 : 0;
e.redMultiplier = e.greenMultiplier = e.blueMultiplier = 1 - Math.abs(a);
}
i = 8;
while (i--) {
p = _colorProps[i];
if (s[p] !== e[p]) {
pt = plugin.add(s, p, s[p], e[p], 0, 0, 0, 0, 0, 1);
if (pt) {
pt.op = "easel_colorFilter";
}
}
}
plugin._props.push("easel_colorFilter");
if (!target.cacheID) {
_cache(target);
}
},
_idMatrix = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0],
_lumR = 0.212671,
_lumG = 0.715160,
_lumB = 0.072169,
_applyMatrix = function _applyMatrix(m, m2) {
if (!(m instanceof Array) || !(m2 instanceof Array)) {
return m2;
}
var temp = [],
i = 0,
z = 0,
y,
x;
for (y = 0; y < 4; y++) {
for (x = 0; x < 5; x++) {
z = x === 4 ? m[i + 4] : 0;
temp[i + x] = m[i] * m2[x] + m[i + 1] * m2[x + 5] + m[i + 2] * m2[x + 10] + m[i + 3] * m2[x + 15] + z;
}
i += 5;
}
return temp;
},
_setSaturation = function _setSaturation(m, n) {
if (isNaN(n)) {
return m;
}
var inv = 1 - n,
r = inv * _lumR,
g = inv * _lumG,
b = inv * _lumB;
return _applyMatrix([r + n, g, b, 0, 0, r, g + n, b, 0, 0, r, g, b + n, 0, 0, 0, 0, 0, 1, 0], m);
},
_colorize = function _colorize(m, color, amount) {
if (isNaN(amount)) {
amount = 1;
}
var c = gsap.utils.splitColor(color),
r = c[0] / 255,
g = c[1] / 255,
b = c[2] / 255,
inv = 1 - amount;
return _applyMatrix([inv + amount * r * _lumR, amount * r * _lumG, amount * r * _lumB, 0, 0, amount * g * _lumR, inv + amount * g * _lumG, amount * g * _lumB, 0, 0, amount * b * _lumR, amount * b * _lumG, inv + amount * b * _lumB, 0, 0, 0, 0, 0, 1, 0], m);
},
_setHue = function _setHue(m, n) {
if (isNaN(n)) {
return m;
}
n *= Math.PI / 180;
var c = Math.cos(n),
s = Math.sin(n);
return _applyMatrix([_lumR + c * (1 - _lumR) + s * -_lumR, _lumG + c * -_lumG + s * -_lumG, _lumB + c * -_lumB + s * (1 - _lumB), 0, 0, _lumR + c * -_lumR + s * 0.143, _lumG + c * (1 - _lumG) + s * 0.14, _lumB + c * -_lumB + s * -0.283, 0, 0, _lumR + c * -_lumR + s * -(1 - _lumR), _lumG + c * -_lumG + s * _lumG, _lumB + c * (1 - _lumB) + s * _lumB, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], m);
},
_setContrast = function _setContrast(m, n) {
if (isNaN(n)) {
return m;
}
n += 0.01;
return _applyMatrix([n, 0, 0, 0, 128 * (1 - n), 0, n, 0, 0, 128 * (1 - n), 0, 0, n, 0, 128 * (1 - n), 0, 0, 0, 1, 0], m);
},
_parseColorMatrixFilter = function _parseColorMatrixFilter(target, v, plugin) {
if (!_ColorMatrixFilter) {
_ColorMatrixFilter = _getCreateJS().ColorMatrixFilter;
if (!_ColorMatrixFilter) {
_warn("EaselPlugin: The EaselJS ColorMatrixFilter JavaScript file wasn't loaded.");
}
}
var filters = target.filters || [],
i = filters.length,
matrix,
startMatrix,
s,
pg;
while (--i > -1) {
if (filters[i] instanceof _ColorMatrixFilter) {
s = filters[i];
break;
}
}
if (!s) {
s = new _ColorMatrixFilter(_idMatrix.slice());
filters.push(s);
target.filters = filters;
}
startMatrix = s.matrix;
matrix = _idMatrix.slice();
if (v.colorize != null) {
matrix = _colorize(matrix, v.colorize, Number(v.colorizeAmount));
}
if (v.contrast != null) {
matrix = _setContrast(matrix, Number(v.contrast));
}
if (v.hue != null) {
matrix = _setHue(matrix, Number(v.hue));
}
if (v.saturation != null) {
matrix = _setSaturation(matrix, Number(v.saturation));
}
i = matrix.length;
while (--i > -1) {
if (matrix[i] !== startMatrix[i]) {
pg = plugin.add(startMatrix, i, startMatrix[i], matrix[i], 0, 0, 0, 0, 0, 1);
if (pg) {
pg.op = "easel_colorMatrixFilter";
}
}
}
plugin._props.push("easel_colorMatrixFilter");
if (!target.cacheID) {
_cache();
}
plugin._matrix = startMatrix;
},
_initCore = function _initCore(core) {
gsap = core || _getGSAP();
if (_windowExists()) {
_win = window;
}
if (gsap) {
_coreInitted = 1;
}
};
var EaselPlugin = {
version: "3.14.2",
name: "easel",
init: function init(target, value, tween, index, targets) {
if (!_coreInitted) {
_initCore();
if (!gsap) {
_warn("Please gsap.registerPlugin(EaselPlugin)");
}
}
this.target = target;
var p, pt, tint, colorMatrix, end, labels, i;
for (p in value) {
end = value[p];
if (p === "colorFilter" || p === "tint" || p === "tintAmount" || p === "exposure" || p === "brightness") {
if (!tint) {
_parseColorFilter(target, value.colorFilter || value, this);
tint = true;
}
} else if (p === "saturation" || p === "contrast" || p === "hue" || p === "colorize" || p === "colorizeAmount") {
if (!colorMatrix) {
_parseColorMatrixFilter(target, value.colorMatrixFilter || value, this);
colorMatrix = true;
}
} else if (p === "frame") {
if (typeof end === "string" && end.charAt(1) !== "=" && (labels = target.labels)) {
for (i = 0; i < labels.length; i++) {
if (labels[i].label === end) {
end = labels[i].position;
}
}
}
pt = this.add(target, "gotoAndStop", target.currentFrame, end, index, targets, Math.round, 0, 0, 1);
if (pt) {
pt.op = p;
}
} else if (target[p] != null) {
this.add(target, p, "get", end);
}
}
},
render: function render(ratio, data) {
var pt = data._pt;
while (pt) {
pt.r(ratio, pt.d);
pt = pt._next;
}
if (data.target.cacheID) {
data.target.updateCache();
}
},
register: _initCore
};
EaselPlugin.registerCreateJS = function (createjs) {
_createJS = createjs;
};
_getGSAP() && gsap.registerPlugin(EaselPlugin);
exports.EaselPlugin = EaselPlugin;
exports.default = EaselPlugin;
Object.defineProperty(exports, '__esModule', { value: true });
})));
================================================
FILE: dist/Flip.js
================================================
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.window = global.window || {}));
}(this, (function (exports) { 'use strict';
var _doc,
_win,
_docElement,
_body,
_divContainer,
_svgContainer,
_identityMatrix,
_gEl,
_transformProp = "transform",
_transformOriginProp = _transformProp + "Origin",
_hasOffsetBug,
_setDoc = function _setDoc(element) {
var doc = element.ownerDocument || element;
if (!(_transformProp in element.style) && "msTransform" in element.style) {
_transformProp = "msTransform";
_transformOriginProp = _transformProp + "Origin";
}
while (doc.parentNode && (doc = doc.parentNode)) {}
_win = window;
_identityMatrix = new Matrix2D();
if (doc) {
_doc = doc;
_docElement = doc.documentElement;
_body = doc.body;
_gEl = _doc.createElementNS("http://www.w3.org/2000/svg", "g");
_gEl.style.transform = "none";
var d1 = doc.createElement("div"),
d2 = doc.createElement("div"),
root = doc && (doc.body || doc.firstElementChild);
if (root && root.appendChild) {
root.appendChild(d1);
d1.appendChild(d2);
d1.style.position = "static";
d1.style.transform = "translate3d(0,0,1px)";
_hasOffsetBug = d2.offsetParent !== d1;
root.removeChild(d1);
}
}
return doc;
},
_forceNonZeroScale = function _forceNonZeroScale(e) {
var a, cache;
while (e && e !== _body) {
cache = e._gsap;
cache && cache.uncache && cache.get(e, "x");
if (cache && !cache.scaleX && !cache.scaleY && cache.renderTransform) {
cache.scaleX = cache.scaleY = 1e-4;
cache.renderTransform(1, cache);
a ? a.push(cache) : a = [cache];
}
e = e.parentNode;
}
return a;
},
_svgTemps = [],
_divTemps = [],
_getDocScrollTop = function _getDocScrollTop() {
return _win.pageYOffset || _doc.scrollTop || _docElement.scrollTop || _body.scrollTop || 0;
},
_getDocScrollLeft = function _getDocScrollLeft() {
return _win.pageXOffset || _doc.scrollLeft || _docElement.scrollLeft || _body.scrollLeft || 0;
},
_svgOwner = function _svgOwner(element) {
return element.ownerSVGElement || ((element.tagName + "").toLowerCase() === "svg" ? element : null);
},
_isFixed = function _isFixed(element) {
if (_win.getComputedStyle(element).position === "fixed") {
return true;
}
element = element.parentNode;
if (element && element.nodeType === 1) {
return _isFixed(element);
}
},
_createSibling = function _createSibling(element, i) {
if (element.parentNode && (_doc || _setDoc(element))) {
var svg = _svgOwner(element),
ns = svg ? svg.getAttribute("xmlns") || "http://www.w3.org/2000/svg" : "http://www.w3.org/1999/xhtml",
type = svg ? i ? "rect" : "g" : "div",
x = i !== 2 ? 0 : 100,
y = i === 3 ? 100 : 0,
css = {
position: "absolute",
display: "block",
pointerEvents: "none",
margin: "0",
padding: "0"
},
e = _doc.createElementNS ? _doc.createElementNS(ns.replace(/^https/, "http"), type) : _doc.createElement(type);
if (i) {
if (!svg) {
if (!_divContainer) {
_divContainer = _createSibling(element);
Object.assign(_divContainer.style, css);
}
Object.assign(e.style, css, {
width: "0.1px",
height: "0.1px",
top: y + "px",
left: x + "px"
});
_divContainer.appendChild(e);
} else {
_svgContainer || (_svgContainer = _createSibling(element));
e.setAttribute("width", 0.01);
e.setAttribute("height", 0.01);
e.setAttribute("transform", "translate(" + x + "," + y + ")");
e.setAttribute("fill", "transparent");
_svgContainer.appendChild(e);
}
}
return e;
}
throw "Need document and parent.";
},
_consolidate = function _consolidate(m) {
var c = new Matrix2D(),
i = 0;
for (; i < m.numberOfItems; i++) {
c.multiply(m.getItem(i).matrix);
}
return c;
},
_getCTM = function _getCTM(svg) {
var m = svg.getCTM(),
transform;
if (!m) {
transform = svg.style[_transformProp];
svg.style[_transformProp] = "none";
svg.appendChild(_gEl);
m = _gEl.getCTM();
svg.removeChild(_gEl);
transform ? svg.style[_transformProp] = transform : svg.style.removeProperty(_transformProp.replace(/([A-Z])/g, "-$1").toLowerCase());
}
return m || _identityMatrix.clone();
},
_placeSiblings = function _placeSiblings(element, adjustGOffset) {
var svg = _svgOwner(element),
isRootSVG = element === svg,
siblings = svg ? _svgTemps : _divTemps,
parent = element.parentNode,
appendToEl = parent && !svg && parent.shadowRoot && parent.shadowRoot.appendChild ? parent.shadowRoot : parent,
container,
m,
b,
x,
y,
cs;
if (element === _win) {
return element;
}
siblings.length || siblings.push(_createSibling(element, 1), _createSibling(element, 2), _createSibling(element, 3));
container = svg ? _svgContainer : _divContainer;
if (svg) {
if (isRootSVG) {
b = _getCTM(element);
x = -b.e / b.a;
y = -b.f / b.d;
m = _identityMatrix;
} else if (element.getBBox) {
b = element.getBBox();
m = element.transform ? element.transform.baseVal : {};
m = !m.numberOfItems ? _identityMatrix : m.numberOfItems > 1 ? _consolidate(m) : m.getItem(0).matrix;
x = m.a * b.x + m.c * b.y;
y = m.b * b.x + m.d * b.y;
} else {
m = new Matrix2D();
x = y = 0;
}
if (adjustGOffset && element.tagName.toLowerCase() === "g") {
x = y = 0;
}
(isRootSVG || !element.getBoundingClientRect().width ? svg : parent).appendChild(container);
container.setAttribute("transform", "matrix(" + m.a + "," + m.b + "," + m.c + "," + m.d + "," + (m.e + x) + "," + (m.f + y) + ")");
} else {
x = y = 0;
if (_hasOffsetBug) {
m = element.offsetParent;
b = element;
while (b && (b = b.parentNode) && b !== m && b.parentNode) {
if ((_win.getComputedStyle(b)[_transformProp] + "").length > 4) {
x = b.offsetLeft;
y = b.offsetTop;
b = 0;
}
}
}
cs = _win.getComputedStyle(element);
if (cs.position !== "absolute" && cs.position !== "fixed") {
m = element.offsetParent;
while (parent && parent !== m) {
x += parent.scrollLeft || 0;
y += parent.scrollTop || 0;
parent = parent.parentNode;
}
}
b = container.style;
b.top = element.offsetTop - y + "px";
b.left = element.offsetLeft - x + "px";
b[_transformProp] = cs[_transformProp];
b[_transformOriginProp] = cs[_transformOriginProp];
b.position = cs.position === "fixed" ? "fixed" : "absolute";
appendToEl.appendChild(container);
}
return container;
},
_setMatrix = function _setMatrix(m, a, b, c, d, e, f) {
m.a = a;
m.b = b;
m.c = c;
m.d = d;
m.e = e;
m.f = f;
return m;
};
var Matrix2D = function () {
function Matrix2D(a, b, c, d, e, f) {
if (a === void 0) {
a = 1;
}
if (b === void 0) {
b = 0;
}
if (c === void 0) {
c = 0;
}
if (d === void 0) {
d = 1;
}
if (e === void 0) {
e = 0;
}
if (f === void 0) {
f = 0;
}
_setMatrix(this, a, b, c, d, e, f);
}
var _proto = Matrix2D.prototype;
_proto.inverse = function inverse() {
var a = this.a,
b = this.b,
c = this.c,
d = this.d,
e = this.e,
f = this.f,
determinant = a * d - b * c || 1e-10;
return _setMatrix(this, d / determinant, -b / determinant, -c / determinant, a / determinant, (c * f - d * e) / determinant, -(a * f - b * e) / determinant);
};
_proto.multiply = function multiply(matrix) {
var a = this.a,
b = this.b,
c = this.c,
d = this.d,
e = this.e,
f = this.f,
a2 = matrix.a,
b2 = matrix.c,
c2 = matrix.b,
d2 = matrix.d,
e2 = matrix.e,
f2 = matrix.f;
return _setMatrix(this, a2 * a + c2 * c, a2 * b + c2 * d, b2 * a + d2 * c, b2 * b + d2 * d, e + e2 * a + f2 * c, f + e2 * b + f2 * d);
};
_proto.clone = function clone() {
return new Matrix2D(this.a, this.b, this.c, this.d, this.e, this.f);
};
_proto.equals = function equals(matrix) {
var a = this.a,
b = this.b,
c = this.c,
d = this.d,
e = this.e,
f = this.f;
return a === matrix.a && b === matrix.b && c === matrix.c && d === matrix.d && e === matrix.e && f === matrix.f;
};
_proto.apply = function apply(point, decoratee) {
if (decoratee === void 0) {
decoratee = {};
}
var x = point.x,
y = point.y,
a = this.a,
b = this.b,
c = this.c,
d = this.d,
e = this.e,
f = this.f;
decoratee.x = x * a + y * c + e || 0;
decoratee.y = x * b + y * d + f || 0;
return decoratee;
};
return Matrix2D;
}();
function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollInFixed) {
if (!element || !element.parentNode || (_doc || _setDoc(element)).documentElement === element) {
return new Matrix2D();
}
var zeroScales = _forceNonZeroScale(element),
svg = _svgOwner(element),
temps = svg ? _svgTemps : _divTemps,
container = _placeSiblings(element, adjustGOffset),
b1 = temps[0].getBoundingClientRect(),
b2 = temps[1].getBoundingClientRect(),
b3 = temps[2].getBoundingClientRect(),
parent = container.parentNode,
isFixed = !includeScrollInFixed && _isFixed(element),
m = new Matrix2D((b2.left - b1.left) / 100, (b2.top - b1.top) / 100, (b3.left - b1.left) / 100, (b3.top - b1.top) / 100, b1.left + (isFixed ? 0 : _getDocScrollLeft()), b1.top + (isFixed ? 0 : _getDocScrollTop()));
parent.removeChild(container);
if (zeroScales) {
b1 = zeroScales.length;
while (b1--) {
b2 = zeroScales[b1];
b2.scaleX = b2.scaleY = 0;
b2.renderTransform(1, b2);
}
}
return inverse ? m.inverse() : m;
}
/*!
* Flip 3.14.2
* https://gsap.com
*
* @license Copyright 2008-2025, GreenSock. All rights reserved.
* Subject to the terms at https://gsap.com/standard-license
* @author: Jack Doyle, jack@greensock.com
*/
var _id = 1,
_toArray,
gsap,
_batch,
_batchAction,
_body$1,
_closestTenth,
_getStyleSaver,
_forEachBatch = function _forEachBatch(batch, name) {
return batch.actions.forEach(function (a) {
return a.vars[name] && a.vars[name](a);
});
},
_batchLookup = {},
_RAD2DEG = 180 / Math.PI,
_DEG2RAD = Math.PI / 180,
_emptyObj = {},
_dashedNameLookup = {},
_memoizedRemoveProps = {},
_listToArray = function _listToArray(list) {
return typeof list === "string" ? list.split(" ").join("").split(",") : list;
},
_callbacks = _listToArray("onStart,onUpdate,onComplete,onReverseComplete,onInterrupt"),
_removeProps = _listToArray("transform,transformOrigin,width,height,position,top,left,opacity,zIndex,maxWidth,maxHeight,minWidth,minHeight"),
_getEl = function _getEl(target) {
return _toArray(target)[0] || console.warn("Element not found:", target);
},
_round = function _round(value) {
return Math.round(value * 10000) / 10000 || 0;
},
_toggleClass = function _toggleClass(targets, className, action) {
return targets.forEach(function (el) {
return el.classList[action](className);
});
},
_reserved = {
zIndex: 1,
kill: 1,
simple: 1,
spin: 1,
clearProps: 1,
targets: 1,
toggleClass: 1,
onComplete: 1,
onUpdate: 1,
onInterrupt: 1,
onStart: 1,
delay: 1,
repeat: 1,
repeatDelay: 1,
yoyo: 1,
scale: 1,
fade: 1,
absolute: 1,
props: 1,
onEnter: 1,
onLeave: 1,
custom: 1,
paused: 1,
nested: 1,
prune: 1,
absoluteOnLeave: 1
},
_fitReserved = {
zIndex: 1,
simple: 1,
clearProps: 1,
scale: 1,
absolute: 1,
fitChild: 1,
getVars: 1,
props: 1
},
_camelToDashed = function _camelToDashed(p) {
return p.replace(/([A-Z])/g, "-$1").toLowerCase();
},
_copy = function _copy(obj, exclude) {
var result = {},
p;
for (p in obj) {
exclude[p] || (result[p] = obj[p]);
}
return result;
},
_memoizedProps = {},
_memoizeProps = function _memoizeProps(props) {
var p = _memoizedProps[props] = _listToArray(props);
_memoizedRemoveProps[props] = p.concat(_removeProps);
return p;
},
_getInverseGlobalMatrix = function _getInverseGlobalMatrix(el) {
var cache = el._gsap || gsap.core.getCache(el);
if (cache.gmCache === gsap.ticker.frame) {
return cache.gMatrix;
}
cache.gmCache = gsap.ticker.frame;
return cache.gMatrix = getGlobalMatrix(el, true, false, true);
},
_getDOMDepth = function _getDOMDepth(el, invert, level) {
if (level === void 0) {
level = 0;
}
var parent = el.parentNode,
inc = 1000 * Math.pow(10, level) * (invert ? -1 : 1),
l = invert ? -inc * 900 : 0;
while (el) {
l += inc;
el = el.previousSibling;
}
return parent ? l + _getDOMDepth(parent, invert, level + 1) : l;
},
_orderByDOMDepth = function _orderByDOMDepth(comps, invert, isElStates) {
comps.forEach(function (comp) {
return comp.d = _getDOMDepth(isElStates ? comp.element : comp.t, invert);
});
comps.sort(function (c1, c2) {
return c1.d - c2.d;
});
return comps;
},
_recordInlineStyles = function _recordInlineStyles(elState, props) {
var style = elState.element.style,
a = elState.css = elState.css || [],
i = props.length,
p,
v;
while (i--) {
p = props[i];
v = style[p] || style.getPropertyValue(p);
a.push(v ? p : _dashedNameLookup[p] || (_dashedNameLookup[p] = _camelToDashed(p)), v);
}
return style;
},
_applyInlineStyles = function _applyInlineStyles(state) {
var css = state.css,
style = state.element.style,
i = 0;
state.cache.uncache = 1;
for (; i < css.length; i += 2) {
css[i + 1] ? style[css[i]] = css[i + 1] : style.removeProperty(css[i]);
}
if (!css[css.indexOf("transform") + 1] && style.translate) {
style.removeProperty("translate");
style.removeProperty("scale");
style.removeProperty("rotate");
}
},
_setFinalStates = function _setFinalStates(comps, onlyTransforms) {
comps.forEach(function (c) {
return c.a.cache.uncache = 1;
});
onlyTransforms || comps.finalStates.forEach(_applyInlineStyles);
},
_absoluteProps = "paddingTop,paddingRight,paddingBottom,paddingLeft,gridArea,transition".split(","),
_makeAbsolute = function _makeAbsolute(elState, fallbackNode, ignoreBatch) {
var element = elState.element,
width = elState.width,
height = elState.height,
uncache = elState.uncache,
getProp = elState.getProp,
style = element.style,
i = 4,
result,
displayIsNone,
cs;
typeof fallbackNode !== "object" && (fallbackNode = elState);
if (_batch && ignoreBatch !== 1) {
_batch._abs.push({
t: element,
b: elState,
a: elState,
sd: 0
});
_batch._final.push(function () {
return (elState.cache.uncache = 1) && _applyInlineStyles(elState);
});
return element;
}
displayIsNone = getProp("display") === "none";
if (!elState.isVisible || displayIsNone) {
displayIsNone && (_recordInlineStyles(elState, ["display"]).display = fallbackNode.display);
elState.matrix = fallbackNode.matrix;
elState.width = width = elState.width || fallbackNode.width;
elState.height = height = elState.height || fallbackNode.height;
}
_recordInlineStyles(elState, _absoluteProps);
cs = window.getComputedStyle(element);
while (i--) {
style[_absoluteProps[i]] = cs[_absoluteProps[i]];
}
style.gridArea = "1 / 1 / 1 / 1";
style.transition = "none";
style.position = "absolute";
style.width = width + "px";
style.height = height + "px";
style.top || (style.top = "0px");
style.left || (style.left = "0px");
if (uncache) {
result = new ElementState(element);
} else {
result = _copy(elState, _emptyObj);
result.position = "absolute";
if (elState.simple) {
var bounds = element.getBoundingClientRect();
result.matrix = new Matrix2D(1, 0, 0, 1, bounds.left + _getDocScrollLeft(), bounds.top + _getDocScrollTop());
} else {
result.matrix = getGlobalMatrix(element, false, false, true);
}
}
result = _fit(result, elState, true);
elState.x = _closestTenth(result.x, 0.01);
elState.y = _closestTenth(result.y, 0.01);
return element;
},
_filterComps = function _filterComps(comps, targets) {
if (targets !== true) {
targets = _toArray(targets);
comps = comps.filter(function (c) {
if (targets.indexOf((c.sd < 0 ? c.b : c.a).element) !== -1) {
return true;
} else {
c.t._gsap.renderTransform(1);
if (c.b.isVisible) {
c.t.style.width = c.b.width + "px";
c.t.style.height = c.b.height + "px";
}
}
});
}
return comps;
},
_makeCompsAbsolute = function _makeCompsAbsolute(comps) {
return _orderByDOMDepth(comps, true).forEach(function (c) {
return (c.a.isVisible || c.b.isVisible) && _makeAbsolute(c.sd < 0 ? c.b : c.a, c.b, 1);
});
},
_findElStateInState = function _findElStateInState(state, other) {
return other && state.idLookup[_parseElementState(other).id] || state.elementStates[0];
},
_parseElementState = function _parseElementState(elOrNode, props, simple, other) {
return elOrNode instanceof ElementState ? elOrNode : elOrNode instanceof FlipState ? _findElStateInState(elOrNode, other) : new ElementState(typeof elOrNode === "string" ? _getEl(elOrNode) || console.warn(elOrNode + " not found") : elOrNode, props, simple);
},
_recordProps = function _recordProps(elState, props) {
var getProp = gsap.getProperty(elState.element, null, "native"),
obj = elState.props = {},
i = props.length;
while (i--) {
obj[props[i]] = (getProp(props[i]) + "").trim();
}
obj.zIndex && (obj.zIndex = parseFloat(obj.zIndex) || 0);
return elState;
},
_applyProps = function _applyProps(element, props) {
var style = element.style || element,
p;
for (p in props) {
style[p] = props[p];
}
},
_getID = function _getID(el) {
var id = el.getAttribute("data-flip-id");
id || el.setAttribute("data-flip-id", id = "auto-" + _id++);
return id;
},
_elementsFromElementStates = function _elementsFromElementStates(elStates) {
return elStates.map(function (elState) {
return elState.element;
});
},
_handleCallback = function _handleCallback(callback, elStates, tl) {
return callback && elStates.length && tl.add(callback(_elementsFromElementStates(elStates), tl, new FlipState(elStates, 0, true)), 0);
},
_fit = function _fit(fromState, toState, scale, applyProps, fitChild, vars) {
var element = fromState.element,
cache = fromState.cache,
parent = fromState.parent,
x = fromState.x,
y = fromState.y,
width = toState.width,
height = toState.height,
scaleX = toState.scaleX,
scaleY = toState.scaleY,
rotation = toState.rotation,
bounds = toState.bounds,
styles = vars && _getStyleSaver && _getStyleSaver(element, "transform,width,height"),
dimensionState = fromState,
_toState$matrix = toState.matrix,
e = _toState$matrix.e,
f = _toState$matrix.f,
deep = fromState.bounds.width !== bounds.width || fromState.bounds.height !== bounds.height || fromState.scaleX !== scaleX || fromState.scaleY !== scaleY || fromState.rotation !== rotation,
simple = !deep && fromState.simple && toState.simple && !fitChild,
skewX,
fromPoint,
toPoint,
getProp,
parentMatrix,
matrix,
bbox;
if (simple || !parent) {
scaleX = scaleY = 1;
rotation = skewX = 0;
} else {
parentMatrix = _getInverseGlobalMatrix(parent);
matrix = parentMatrix.clone().multiply(toState.ctm ? toState.matrix.clone().multiply(toState.ctm) : toState.matrix);
rotation = _round(Math.atan2(matrix.b, matrix.a) * _RAD2DEG);
skewX = _round(Math.atan2(matrix.c, matrix.d) * _RAD2DEG + rotation) % 360;
scaleX = Math.sqrt(Math.pow(matrix.a, 2) + Math.pow(matrix.b, 2));
scaleY = Math.sqrt(Math.pow(matrix.c, 2) + Math.pow(matrix.d, 2)) * Math.cos(skewX * _DEG2RAD);
if (fitChild) {
fitChild = _toArray(fitChild)[0];
getProp = gsap.getProperty(fitChild);
bbox = fitChild.getBBox && typeof fitChild.getBBox === "function" && fitChild.getBBox();
dimensionState = {
scaleX: getProp("scaleX"),
scaleY: getProp("scaleY"),
width: bbox ? bbox.width : Math.ceil(parseFloat(getProp("width", "px"))),
height: bbox ? bbox.height : parseFloat(getProp("height", "px"))
};
}
cache.rotation = rotation + "deg";
cache.skewX = skewX + "deg";
}
if (scale) {
scaleX *= width === dimensionState.width || !dimensionState.width ? 1 : width / dimensionState.width;
scaleY *= height === dimensionState.height || !dimensionState.height ? 1 : height / dimensionState.height;
cache.scaleX = scaleX;
cache.scaleY = scaleY;
} else {
width = _closestTenth(width * scaleX / dimensionState.scaleX, 0);
height = _closestTenth(height * scaleY / dimensionState.scaleY, 0);
element.style.width = width + "px";
element.style.height = height + "px";
}
applyProps && _applyProps(element, toState.props);
if (simple || !parent) {
x += e - fromState.matrix.e;
y += f - fromState.matrix.f;
} else if (deep || parent !== toState.parent) {
cache.x = x + "px";
cache.y = y + "px";
cache.renderTransform(1, cache);
matrix = getGlobalMatrix(fitChild || element, false, false, true);
fromPoint = parentMatrix.apply({
x: matrix.e,
y: matrix.f
});
toPoint = parentMatrix.apply({
x: e,
y: f
});
x += toPoint.x - fromPoint.x;
y += toPoint.y - fromPoint.y;
} else {
parentMatrix.e = parentMatrix.f = 0;
toPoint = parentMatrix.apply({
x: e - fromState.matrix.e,
y: f - fromState.matrix.f
});
x += toPoint.x;
y += toPoint.y;
}
x = _closestTenth(x, 0.02);
y = _closestTenth(y, 0.02);
if (vars && !(vars instanceof ElementState)) {
styles && styles.revert();
} else {
cache.x = x + "px";
cache.y = y + "px";
cache.renderTransform(1, cache);
}
if (vars) {
vars.x = x;
vars.y = y;
vars.rotation = rotation;
vars.skewX = skewX;
if (scale) {
vars.scaleX = scaleX;
vars.scaleY = scaleY;
} else {
vars.width = width;
vars.height = height;
}
}
return vars || cache;
},
_parseState = function _parseState(targetsOrState, vars) {
return targetsOrState instanceof FlipState ? targetsOrState : new FlipState(targetsOrState, vars);
},
_getChangingElState = function _getChangingElState(toState, fromState, id) {
var to1 = toState.idLookup[id],
to2 = toState.alt[id];
return to2.isVisible && (!(fromState.getElementState(to2.element) || to2).isVisible || !to1.isVisible) ? to2 : to1;
},
_bodyMetrics = [],
_bodyProps = "width,height,overflowX,overflowY".split(","),
_bodyLocked,
_lockBodyScroll = function _lockBodyScroll(lock) {
if (lock !== _bodyLocked) {
var s = _body$1.style,
w = _body$1.clientWidth === window.outerWidth,
h = _body$1.clientHeight === window.outerHeight,
i = 4;
if (lock && (w || h)) {
while (i--) {
_bodyMetrics[i] = s[_bodyProps[i]];
}
if (w) {
s.width = _body$1.clientWidth + "px";
s.overflowY = "hidden";
}
if (h) {
s.height = _body$1.clientHeight + "px";
s.overflowX = "hidden";
}
_bodyLocked = lock;
} else if (_bodyLocked) {
while (i--) {
_bodyMetrics[i] ? s[_bodyProps[i]] = _bodyMetrics[i] : s.removeProperty(_camelToDashed(_bodyProps[i]));
}
_bodyLocked = lock;
}
}
},
_revertTempStyles = function _revertTempStyles(temps, stateIndex) {
for (var i = 0; i < temps.length; i += 3) {
gsap.set(temps[i], {
clearProps: true
});
temps[i].setAttribute("style", temps[i + stateIndex]);
temps[i]._gsap.gmCache = -1;
}
},
_fromTo = function _fromTo(fromState, toState, vars, relative) {
fromState instanceof FlipState && toState instanceof FlipState || console.warn("Not a valid state object.");
vars = vars || {};
var _vars = vars,
clearProps = _vars.clearProps,
onEnter = _vars.onEnter,
onLeave = _vars.onLeave,
absolute = _vars.absolute,
absoluteOnLeave = _vars.absoluteOnLeave,
custom = _vars.custom,
delay = _vars.delay,
paused = _vars.paused,
repeat = _vars.repeat,
repeatDelay = _vars.repeatDelay,
yoyo = _vars.yoyo,
toggleClass = _vars.toggleClass,
nested = _vars.nested,
_zIndex = _vars.zIndex,
scale = _vars.scale,
fade = _vars.fade,
stagger = _vars.stagger,
spin = _vars.spin,
prune = _vars.prune,
props = ("props" in vars ? vars : fromState).props,
tweenVars = _copy(vars, _reserved),
animation = gsap.timeline({
delay: delay,
paused: paused,
repeat: repeat,
repeatDelay: repeatDelay,
yoyo: yoyo,
data: "isFlip"
}),
remainingProps = tweenVars,
entering = [],
leaving = [],
comps = [],
swapOutTargets = [],
spinNum = spin === true ? 1 : spin || 0,
spinFunc = typeof spin === "function" ? spin : function () {
return spinNum;
},
interrupted = fromState.interrupted || toState.interrupted,
addFunc = animation[relative !== 1 ? "to" : "from"],
v,
p,
endTime,
i,
el,
comp,
state,
targets,
finalStates,
fromNode,
toNode,
run,
a,
b;
for (p in toState.idLookup) {
toNode = !toState.alt[p] ? toState.idLookup[p] : _getChangingElState(toState, fromState, p);
el = toNode.element;
fromNode = fromState.idLookup[p];
fromState.alt[p] && el === fromNode.element && (fromState.alt[p].isVisible || !toNode.isVisible) && (fromNode = fromState.alt[p]);
if (fromNode) {
comp = {
t: el,
b: fromNode,
a: toNode,
sd: fromNode.element === el ? 0 : toNode.isVisible ? 1 : -1
};
comps.push(comp);
if (comp.sd) {
if (comp.sd < 0) {
comp.b = toNode;
comp.a = fromNode;
}
interrupted && _recordInlineStyles(comp.b, props ? _memoizedRemoveProps[props] : _removeProps);
fade && comps.push(comp.swap = {
t: fromNode.element,
b: comp.b,
a: comp.a,
sd: -comp.sd,
swap: comp
});
}
el._flip = fromNode.element._flip = _batch ? _batch.timeline : animation;
} else if (toNode.isVisible) {
comps.push({
t: el,
b: _copy(toNode, {
isVisible: 1
}),
a: toNode,
sd: 0,
entering: 1
});
el._flip = _batch ? _batch.timeline : animation;
}
}
props && (_memoizedProps[props] || _memoizeProps(props)).forEach(function (p) {
return tweenVars[p] = function (i) {
return comps[i].a.props[p];
};
});
comps.finalStates = finalStates = [];
run = function run() {
_orderByDOMDepth(comps);
_lockBodyScroll(true);
var recordedStyles = [];
for (i = 0; i < comps.length; i++) {
comp = comps[i];
a = comp.a;
b = comp.b;
if (prune && !a.isDifferent(b) && !comp.entering) {
comps.splice(i--, 1);
} else {
el = comp.t;
if (nested && !(comp.sd < 0) && i) {
a = comp.a = a.clone({
matrix: getGlobalMatrix(el, false, false, true)
});
}
if (b.isVisible && a.isVisible) {
if (comp.sd < 0) {
nested && _revertTempStyles(recordedStyles, 1);
state = new ElementState(el, props, fromState.simple);
_fit(state, a, scale, 0, 0, state);
state.matrix = getGlobalMatrix(el, false, false, true);
state.bounds = el.getBoundingClientRect();
state.css = comp.b.css;
comp.a = a = state;
fade && (el.style.opacity = interrupted ? b.opacity : a.opacity);
stagger && swapOutTargets.push(el);
if (nested) {
_revertTempStyles(recordedStyles, 2);
recordedStyles.push(el, el.getAttribute("style"));
}
} else if (comp.sd > 0 && fade) {
el.style.opacity = interrupted ? a.opacity - b.opacity : "0";
}
_fit(a, b, scale, props);
nested && comp.sd < 0 && recordedStyles.push(el.getAttribute("style"));
} else if (b.isVisible !== a.isVisible) {
if (!b.isVisible) {
a.isVisible && entering.push(a);
comps.splice(i--, 1);
} else if (!a.isVisible) {
b.css = a.css;
leaving.push(b);
comps.splice(i--, 1);
absolute && nested && _fit(a, b, scale, props);
}
}
if (!scale) {
el.style.maxWidth = Math.max(a.width, b.width) + "px";
el.style.maxHeight = Math.max(a.height, b.height) + "px";
el.style.minWidth = Math.min(a.width, b.width) + "px";
el.style.minHeight = Math.min(a.height, b.height) + "px";
}
nested && toggleClass && el.classList.add(toggleClass);
}
finalStates.push(a);
}
var classTargets;
if (toggleClass) {
classTargets = finalStates.map(function (s) {
return s.element;
});
nested && classTargets.forEach(function (e) {
return e.classList.remove(toggleClass);
});
}
_lockBodyScroll(false);
if (scale) {
tweenVars.scaleX = function (i) {
return comps[i].a.scaleX;
};
tweenVars.scaleY = function (i) {
return comps[i].a.scaleY;
};
} else {
tweenVars.width = function (i) {
return comps[i].a.width + "px";
};
tweenVars.height = function (i) {
return comps[i].a.height + "px";
};
tweenVars.autoRound = vars.autoRound || false;
}
tweenVars.x = function (i) {
return comps[i].a.x + "px";
};
tweenVars.y = function (i) {
return comps[i].a.y + "px";
};
tweenVars.rotation = function (i) {
return comps[i].a.rotation + (spin ? spinFunc(i, targets[i], targets) * 360 : 0);
};
tweenVars.skewX = function (i) {
return comps[i].a.skewX;
};
targets = comps.map(function (c) {
return c.t;
});
if (_zIndex || _zIndex === 0) {
tweenVars.modifiers = {
zIndex: function zIndex() {
return _zIndex;
}
};
tweenVars.zIndex = _zIndex;
tweenVars.immediateRender = vars.immediateRender !== false;
}
fade && (tweenVars.opacity = function (i) {
return comps[i].sd < 0 ? 0 : comps[i].sd > 0 ? comps[i].a.opacity : "+=0";
});
if (swapOutTargets.length) {
stagger = gsap.utils.distribute(stagger);
var dummyArray = targets.slice(swapOutTargets.length);
tweenVars.stagger = function (i, el) {
return stagger(~swapOutTargets.indexOf(el) ? targets.indexOf(comps[i].swap.t) : i, el, dummyArray);
};
}
_callbacks.forEach(function (name) {
return vars[name] && animation.eventCallback(name, vars[name], vars[name + "Params"]);
});
if (custom && targets.length) {
remainingProps = _copy(tweenVars, _reserved);
if ("scale" in custom) {
custom.scaleX = custom.scaleY = custom.scale;
delete custom.scale;
}
for (p in custom) {
v = _copy(custom[p], _fitReserved);
v[p] = tweenVars[p];
!("duration" in v) && "duration" in tweenVars && (v.duration = tweenVars.duration);
v.stagger = tweenVars.stagger;
addFunc.call(animation, targets, v, 0);
delete remainingProps[p];
}
}
if (targets.length || leaving.length || entering.length) {
toggleClass && animation.add(function () {
return _toggleClass(classTargets, toggleClass, animation._zTime < 0 ? "remove" : "add");
}, 0) && !paused && _toggleClass(classTargets, toggleClass, "add");
targets.length && addFunc.call(animation, targets, remainingProps, 0);
}
_handleCallback(onEnter, entering, animation);
_handleCallback(onLeave, leaving, animation);
var batchTl = _batch && _batch.timeline;
if (batchTl) {
batchTl.add(animation, 0);
_batch._final.push(function () {
return _setFinalStates(comps, !clearProps);
});
}
endTime = animation.duration();
animation.call(function () {
var forward = animation.time() >= endTime;
forward && !batchTl && _setFinalStates(comps, !clearProps);
toggleClass && _toggleClass(classTargets, toggleClass, forward ? "remove" : "add");
});
};
absoluteOnLeave && (absolute = comps.filter(function (comp) {
return !comp.sd && !comp.a.isVisible && comp.b.isVisible;
}).map(function (comp) {
return comp.a.element;
}));
if (_batch) {
var _batch$_abs;
absolute && (_batch$_abs = _batch._abs).push.apply(_batch$_abs, _filterComps(comps, absolute));
_batch._run.push(run);
} else {
absolute && _makeCompsAbsolute(_filterComps(comps, absolute));
run();
}
var anim = _batch ? _batch.timeline : animation;
anim.revert = function () {
return _killFlip(anim, 1, 1);
};
return anim;
},
_interrupt = function _interrupt(tl) {
tl.vars.onInterrupt && tl.vars.onInterrupt.apply(tl, tl.vars.onInterruptParams || []);
tl.getChildren(true, false, true).forEach(_interrupt);
},
_killFlip = function _killFlip(tl, action, force) {
if (tl && tl.progress() < 1 && (!tl.paused() || force)) {
if (action) {
_interrupt(tl);
action < 2 && tl.progress(1);
tl.kill();
}
return true;
}
},
_createLookup = function _createLookup(state) {
var lookup = state.idLookup = {},
alt = state.alt = {},
elStates = state.elementStates,
i = elStates.length,
elState;
while (i--) {
elState = elStates[i];
lookup[elState.id] ? alt[elState.id] = elState : lookup[elState.id] = elState;
}
};
var FlipState = function () {
function FlipState(targets, vars, targetsAreElementStates) {
this.props = vars && vars.props;
this.simple = !!(vars && vars.simple);
if (targetsAreElementStates) {
this.targets = _elementsFromElementStates(targets);
this.elementStates = targets;
_createLookup(this);
} else {
this.targets = _toArray(targets);
var soft = vars && (vars.kill === false || vars.batch && !vars.kill);
_batch && !soft && _batch._kill.push(this);
this.update(soft || !!_batch);
}
}
var _proto = FlipState.prototype;
_proto.update = function update(soft) {
var _this = this;
this.elementStates = this.targets.map(function (el) {
return new ElementState(el, _this.props, _this.simple);
});
_createLookup(this);
this.interrupt(soft);
this.recordInlineStyles();
return this;
};
_proto.clear = function clear() {
this.targets.length = this.elementStates.length = 0;
_createLookup(this);
return this;
};
_proto.fit = function fit(state, scale, nested) {
var elStatesInOrder = _orderByDOMDepth(this.elementStates.slice(0), false, true),
toElStates = (state || this).idLookup,
i = 0,
fromNode,
toNode;
for (; i < elStatesInOrder.length; i++) {
fromNode = elStatesInOrder[i];
nested && (fromNode.matrix = getGlobalMatrix(fromNode.element, false, false, true));
toNode = toElStates[fromNode.id];
toNode && _fit(fromNode, toNode, scale, true, 0, fromNode);
fromNode.matrix = getGlobalMatrix(fromNode.element, false, false, true);
}
return this;
};
_proto.getProperty = function getProperty(element, property) {
var es = this.getElementState(element) || _emptyObj;
return (property in es ? es : es.props || _emptyObj)[property];
};
_proto.add = function add(state) {
var i = state.targets.length,
lookup = this.idLookup,
alt = this.alt,
index,
es,
es2;
while (i--) {
es = state.elementStates[i];
es2 = lookup[es.id];
if (es2 && (es.element === es2.element || alt[es.id] && alt[es.id].element === es.element)) {
index = this.elementStates.indexOf(es.element === es2.element ? es2 : alt[es.id]);
this.targets.splice(index, 1, state.targets[i]);
this.elementStates.splice(index, 1, es);
} else {
this.targets.push(state.targets[i]);
this.elementStates.push(es);
}
}
state.interrupted && (this.interrupted = true);
state.simple || (this.simple = false);
_createLookup(this);
return this;
};
_proto.compare = function compare(state) {
var l1 = state.idLookup,
l2 = this.idLookup,
unchanged = [],
changed = [],
enter = [],
leave = [],
targets = [],
a1 = state.alt,
a2 = this.alt,
place = function place(s1, s2, el) {
return (s1.isVisible !== s2.isVisible ? s1.isVisible ? enter : leave : s1.isVisible ? changed : unchanged).push(el) && targets.push(el);
},
placeIfDoesNotExist = function placeIfDoesNotExist(s1, s2, el) {
return targets.indexOf(el) < 0 && place(s1, s2, el);
},
s1,
s2,
p,
el,
s1Alt,
s2Alt,
c1,
c2;
for (p in l1) {
s1Alt = a1[p];
s2Alt = a2[p];
s1 = !s1Alt ? l1[p] : _getChangingElState(state, this, p);
el = s1.element;
s2 = l2[p];
if (s2Alt) {
c2 = s2.isVisible || !s2Alt.isVisible && el === s2.element ? s2 : s2Alt;
c1 = s1Alt && !s1.isVisible && !s1Alt.isVisible && c2.element === s1Alt.element ? s1Alt : s1;
if (c1.isVisible && c2.isVisible && c1.element !== c2.element) {
(c1.isDifferent(c2) ? changed : unchanged).push(c1.element, c2.element);
targets.push(c1.element, c2.element);
} else {
place(c1, c2, c1.element);
}
s1Alt && c1.element === s1Alt.element && (s1Alt = l1[p]);
placeIfDoesNotExist(c1.element !== s2.element && s1Alt ? s1Alt : c1, s2, s2.element);
placeIfDoesNotExist(s1Alt && s1Alt.element === s2Alt.element ? s1Alt : c1, s2Alt, s2Alt.element);
s1Alt && placeIfDoesNotExist(s1Alt, s2Alt.element === s1Alt.element ? s2Alt : s2, s1Alt.element);
} else {
!s2 ? enter.push(el) : !s2.isDifferent(s1) ? unchanged.push(el) : place(s1, s2, el);
s1Alt && placeIfDoesNotExist(s1Alt, s2, s1Alt.element);
}
}
for (p in l2) {
if (!l1[p]) {
leave.push(l2[p].element);
a2[p] && leave.push(a2[p].element);
}
}
return {
changed: changed,
unchanged: unchanged,
enter: enter,
leave: leave
};
};
_proto.recordInlineStyles = function recordInlineStyles() {
var props = _memoizedRemoveProps[this.props] || _removeProps,
i = this.elementStates.length;
while (i--) {
_recordInlineStyles(this.elementStates[i], props);
}
};
_proto.interrupt = function interrupt(soft) {
var _this2 = this;
var timelines = [];
this.targets.forEach(function (t) {
var tl = t._flip,
foundInProgress = _killFlip(tl, soft ? 0 : 1);
soft && foundInProgress && timelines.indexOf(tl) < 0 && tl.add(function () {
return _this2.updateVisibility();
});
foundInProgress && timelines.push(tl);
});
!soft && timelines.length && this.updateVisibility();
this.interrupted || (this.interrupted = !!timelines.length);
};
_proto.updateVisibility = function updateVisibility() {
this.elementStates.forEach(function (es) {
var b = es.element.getBoundingClientRect();
es.isVisible = !!(b.width || b.height || b.top || b.left);
es.uncache = 1;
});
};
_proto.getElementState = function getElementState(element) {
return this.elementStates[this.targets.indexOf(_getEl(element))];
};
_proto.makeAbsolute = function makeAbsolute() {
return _orderByDOMDepth(this.elementStates.slice(0), true, true).map(_makeAbsolute);
};
return FlipState;
}();
var ElementState = function () {
function ElementState(element, props, simple) {
if (element instanceof ElementState) {
Object.assign(this, element, props || {});
} else {
this.element = element;
this.update(props, simple);
}
}
var _proto2 = ElementState.prototype;
_proto2.isDifferent = function isDifferent(state) {
var b1 = this.bounds,
b2 = state.bounds;
return b1.top !== b2.top || b1.left !== b2.left || b1.width !== b2.width || b1.height !== b2.height || !this.matrix.equals(state.matrix) || this.opacity !== state.opacity || this.props && state.props && JSON.stringify(this.props) !== JSON.stringify(state.props);
};
_proto2.clone = function clone(overrides) {
return new ElementState(this, overrides);
};
_proto2.update = function update(props, simple) {
var self = this,
element = self.element,
getProp = gsap.getProperty(element),
cache = gsap.core.getCache(element),
bounds = element.getBoundingClientRect(),
bbox = element.getBBox && typeof element.getBBox === "function" && element.nodeName.toLowerCase() !== "svg" && element.getBBox(),
m = simple ? new Matrix2D(1, 0, 0, 1, bounds.left + _getDocScrol
gitextract_1zvquy92/
├── .gitignore
├── README.md
├── SECURITY.md
├── dist/
│ ├── CSSRulePlugin.js
│ ├── CustomBounce.js
│ ├── CustomEase.js
│ ├── CustomWiggle.js
│ ├── Draggable.js
│ ├── DrawSVGPlugin.js
│ ├── EasePack.js
│ ├── EaselPlugin.js
│ ├── Flip.js
│ ├── GSDevTools.js
│ ├── InertiaPlugin.js
│ ├── MorphSVGPlugin.js
│ ├── MotionPathHelper.js
│ ├── MotionPathPlugin.js
│ ├── Observer.js
│ ├── Physics2DPlugin.js
│ ├── PhysicsPropsPlugin.js
│ ├── PixiPlugin.js
│ ├── ScrambleTextPlugin.js
│ ├── ScrollSmoother.js
│ ├── ScrollToPlugin.js
│ ├── ScrollTrigger.js
│ ├── SplitText.js
│ ├── TextPlugin.js
│ ├── all.js
│ └── gsap.js
├── esm/
│ ├── CSSPlugin.js
│ ├── CSSRulePlugin.js
│ ├── CustomBounce.js
│ ├── CustomEase.js
│ ├── CustomWiggle.js
│ ├── Draggable.js
│ ├── DrawSVGPlugin.js
│ ├── EasePack.js
│ ├── EaselPlugin.js
│ ├── Flip.js
│ ├── GSDevTools.js
│ ├── InertiaPlugin.js
│ ├── MorphSVGPlugin.js
│ ├── MotionPathHelper.js
│ ├── MotionPathPlugin.js
│ ├── Observer.js
│ ├── Physics2DPlugin.js
│ ├── PhysicsPropsPlugin.js
│ ├── PixiPlugin.js
│ ├── ScrambleTextPlugin.js
│ ├── ScrollSmoother.js
│ ├── ScrollToPlugin.js
│ ├── ScrollTrigger.js
│ ├── SplitText.js
│ ├── TextPlugin.js
│ ├── all.js
│ ├── gsap-core.js
│ ├── index.js
│ └── utils/
│ ├── PathEditor.js
│ ├── VelocityTracker.js
│ ├── matrix.js
│ ├── paths.js
│ └── strings.js
├── package.json
├── src/
│ ├── CSSPlugin.js
│ ├── CSSRulePlugin.js
│ ├── CustomBounce.js
│ ├── CustomEase.js
│ ├── CustomWiggle.js
│ ├── Draggable.js
│ ├── DrawSVGPlugin.js
│ ├── EasePack.js
│ ├── EaselPlugin.js
│ ├── Flip.js
│ ├── GSDevTools.js
│ ├── InertiaPlugin.js
│ ├── MorphSVGPlugin.js
│ ├── MotionPathHelper.js
│ ├── MotionPathPlugin.js
│ ├── Observer.js
│ ├── Physics2DPlugin.js
│ ├── PhysicsPropsPlugin.js
│ ├── PixiPlugin.js
│ ├── ScrambleTextPlugin.js
│ ├── ScrollSmoother.js
│ ├── ScrollToPlugin.js
│ ├── ScrollTrigger.js
│ ├── SplitText.js
│ ├── SplitText.ts
│ ├── TextPlugin.js
│ ├── all.js
│ ├── gsap-core.js
│ ├── index.js
│ └── utils/
│ ├── PathEditor.js
│ ├── VelocityTracker.js
│ ├── matrix.js
│ ├── paths.js
│ └── strings.js
└── types/
├── animation.d.ts
├── css-plugin.d.ts
├── css-rule-plugin.d.ts
├── custom-bounce.d.ts
├── custom-ease.d.ts
├── custom-wiggle.d.ts
├── draggable.d.ts
├── draw-svg-plugin.d.ts
├── ease.d.ts
├── easel-plugin.d.ts
├── flip.d.ts
├── gs-dev-tools.d.ts
├── gsap-core.d.ts
├── gsap-plugins.d.ts
├── gsap-utils.d.ts
├── index.d.ts
├── inertia-plugin.d.ts
├── morph-svg-plugin.d.ts
├── motion-path-helper.d.ts
├── motion-path-plugin.d.ts
├── observer.d.ts
├── physics-2d-plugin.d.ts
├── physics-props-plugin.d.ts
├── pixi-plugin.d.ts
├── scramble-text-plugin.d.ts
├── scroll-smoother.d.ts
├── scroll-to-plugin.d.ts
├── scroll-trigger.d.ts
├── split-text.d.ts
├── text-plugin.d.ts
├── timeline.d.ts
├── tween.d.ts
└── utils/
└── velocity-tracker.d.ts
SYMBOL INDEX (928 symbols across 99 files)
FILE: dist/CustomBounce.js
function CustomBounce (line 144) | function CustomBounce(id, vars) {
FILE: dist/CustomEase.js
function transformRawPath (line 24) | function transformRawPath(rawPath, a, b, c, d, tx, ty) {
function arcToSegment (line 48) | function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFl...
function stringToRawPath (line 139) | function stringToRawPath(d) {
function rawPathToString (line 333) | function rawPathToString(rawPath) {
function CustomEase (line 473) | function CustomEase(id, data, config) {
FILE: dist/CustomWiggle.js
function CustomWiggle (line 143) | function CustomWiggle(id, vars) {
FILE: dist/Draggable.js
function _inheritsLoose (line 7) | function _inheritsLoose(subClass, superClass) {
function _assertThisInitialized (line 13) | function _assertThisInitialized(self) {
function Matrix2D (line 272) | function Matrix2D(a, b, c, d, e, f) {
function getGlobalMatrix (line 363) | function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollI...
function EventDispatcher (line 1227) | function EventDispatcher(target) {
function Draggable (line 1267) | function Draggable(target, vars) {
FILE: dist/Flip.js
function Matrix2D (line 258) | function Matrix2D(a, b, c, d, e, f) {
function getGlobalMatrix (line 349) | function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollI...
function FlipState (line 1235) | function FlipState(targets, vars, targetsAreElementStates) {
function ElementState (line 1444) | function ElementState(element, props, simple) {
function FlipAction (line 1503) | function FlipAction(vars, batch) {
function FlipBatch (line 1530) | function FlipBatch(id) {
function Flip (line 1740) | function Flip() {}
FILE: dist/GSDevTools.js
function _inheritsLoose (line 7) | function _inheritsLoose(subClass, superClass) {
function _assertThisInitialized (line 13) | function _assertThisInitialized(self) {
function Matrix2D (line 272) | function Matrix2D(a, b, c, d, e, f) {
function getGlobalMatrix (line 363) | function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollI...
function EventDispatcher (line 1227) | function EventDispatcher(target) {
function Draggable (line 1267) | function Draggable(target, vars) {
FILE: dist/InertiaPlugin.js
function VelocityTracker (line 82) | function VelocityTracker(target, property) {
FILE: dist/MorphSVGPlugin.js
function _extends (line 7) | function _extends() {
function getRawPath (line 64) | function getRawPath(value) {
function reverseSegment (line 80) | function reverseSegment(segment) {
function convertToPath (line 129) | function convertToPath(element, swap) {
function measureSegment (line 222) | function measureSegment(segment, startIndex, bezierQty) {
function cacheRawPathMeasurements (line 322) | function cacheRawPathMeasurements(rawPath, resolution) {
function arcToSegment (line 336) | function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFl...
function stringToRawPath (line 427) | function stringToRawPath(d) {
function segmentToDistributedPoints (line 621) | function segmentToDistributedPoints(segment, totalPoints) {
function pointsToSegment (line 702) | function pointsToSegment(points, curviness) {
function rawPathToString (line 794) | function rawPathToString(rawPath) {
FILE: dist/MotionPathHelper.js
function copyRawPath (line 40) | function copyRawPath(rawPath) {
function subdivideSegment (line 50) | function subdivideSegment(segment, i, t) {
function transformRawPath (line 77) | function transformRawPath(rawPath, a, b, c, d, tx, ty) {
function arcToSegment (line 101) | function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFl...
function stringToRawPath (line 192) | function stringToRawPath(d) {
function bezierToPoints (line 386) | function bezierToPoints(x1, y1, x2, y2, x3, y3, x4, y4, threshold, point...
function pointsToSegment (line 420) | function pointsToSegment(points, curviness) {
function pointToSegDist (line 513) | function pointToSegDist(x, y, x1, y1, x2, y2) {
function simplifyStep (line 533) | function simplifyStep(points, first, last, tolerance, simplified) {
function simplifyPoints (line 559) | function simplifyPoints(points, tolerance) {
function getClosestProgressOnBezier (line 594) | function getClosestProgressOnBezier(iterations, px, py, start, end, slic...
function getClosestData (line 625) | function getClosestData(rawPath, x, y, slices) {
function rawPathToString (line 654) | function rawPathToString(rawPath) {
function Matrix2D (line 934) | function Matrix2D(a, b, c, d, e, f) {
function getGlobalMatrix (line 1025) | function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollI...
function DraggableSVG (line 1581) | function DraggableSVG(target, vars) {
function Anchor (line 1713) | function Anchor(editor, rawPath, j, i, vars) {
function PathEditor (line 1788) | function PathEditor(target, vars) {
function MotionPathHelper (line 2969) | function MotionPathHelper(targetOrTween, vars) {
FILE: dist/MotionPathPlugin.js
function getRawPath (line 102) | function getRawPath(value) {
function copyRawPath (line 118) | function copyRawPath(rawPath) {
function reverseSegment (line 128) | function reverseSegment(segment) {
function convertToPath (line 177) | function convertToPath(element, swap) {
function getRotationAtBezierT (line 270) | function getRotationAtBezierT(segment, i, t) {
function sliceRawPath (line 288) | function sliceRawPath(rawPath, start, end) {
function measureSegment (line 399) | function measureSegment(segment, startIndex, bezierQty) {
function cacheRawPathMeasurements (line 499) | function cacheRawPathMeasurements(rawPath, resolution) {
function subdivideSegment (line 512) | function subdivideSegment(segment, i, t) {
function getProgressData (line 540) | function getProgressData(rawPath, progress, decoratee, pushToNextIfAtEnd) {
function getPositionOnPath (line 614) | function getPositionOnPath(rawPath, progress, includeAngle, point) {
function transformRawPath (line 670) | function transformRawPath(rawPath, a, b, c, d, tx, ty) {
function arcToSegment (line 694) | function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFl...
function stringToRawPath (line 785) | function stringToRawPath(d) {
function flatPointsToSegment (line 979) | function flatPointsToSegment(points, curviness) {
function pointsToSegment (line 995) | function pointsToSegment(points, curviness) {
function rawPathToString (line 1087) | function rawPathToString(rawPath) {
function Matrix2D (line 1367) | function Matrix2D(a, b, c, d, e, f) {
function getGlobalMatrix (line 1458) | function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollI...
FILE: dist/Observer.js
function _defineProperties (line 7) | function _defineProperties(target, props) {
function _createClass (line 17) | function _createClass(Constructor, protoProps, staticProps) {
function Observer (line 253) | function Observer(vars) {
FILE: dist/ScrambleTextPlugin.js
function getText (line 9) | function getText(e) {
function emojiSafeSplit (line 27) | function emojiSafeSplit(text, delimiter, trim, preserveSpaces, unescaped...
function CharSet (line 67) | function CharSet(chars) {
FILE: dist/ScrollSmoother.js
function _defineProperties (line 7) | function _defineProperties(target, props) {
function _createClass (line 17) | function _createClass(Constructor, protoProps, staticProps) {
function ScrollSmoother (line 95) | function ScrollSmoother(vars) {
FILE: dist/ScrollTrigger.js
function _defineProperties (line 7) | function _defineProperties(target, props) {
function _createClass (line 17) | function _createClass(Constructor, protoProps, staticProps) {
function Observer (line 253) | function Observer(vars) {
function ScrollTrigger (line 1581) | function ScrollTrigger(vars, animation) {
FILE: dist/SplitText.js
method constructor (line 172) | constructor(elements, config) {
method split (line 206) | split(config) {
method kill (line 300) | kill() {
method revert (line 305) | revert() {
method create (line 321) | static create(elements, config) {
method register (line 324) | static register(core) {
FILE: dist/TextPlugin.js
function getText (line 9) | function getText(e) {
function splitInnerHTML (line 27) | function splitInnerHTML(element, delimiter, trim, preserveSpaces, unesca...
function emojiSafeSplit (line 60) | function emojiSafeSplit(text, delimiter, trim, preserveSpaces, unescaped...
FILE: dist/all.js
function _defineProperties (line 7) | function _defineProperties(target, props) {
function _createClass (line 17) | function _createClass(Constructor, protoProps, staticProps) {
function _extends (line 23) | function _extends() {
function _inheritsLoose (line 41) | function _inheritsLoose(subClass, superClass) {
function _assertThisInitialized (line 47) | function _assertThisInitialized(self) {
function _unsupportedIterableToArray (line 55) | function _unsupportedIterableToArray(o, minLen) {
function _arrayLikeToArray (line 64) | function _arrayLikeToArray(arr, len) {
function _createForOfIteratorHelperLoose (line 72) | function _createForOfIteratorHelperLoose(o) {
function Animation (line 1604) | function Animation(vars) {
function Timeline (line 1951) | function Timeline(vars, position) {
function Tween (line 3020) | function Tween(targets, vars, position, skipInherit) {
function PropTween (line 3603) | function PropTween(next, target, prop, start, change, renderer, data, se...
function Context (line 3702) | function Context(func, scope) {
function MatchMedia (line 3837) | function MatchMedia(scope) {
function getRawPath (line 5780) | function getRawPath(value) {
function copyRawPath (line 5796) | function copyRawPath(rawPath) {
function reverseSegment (line 5806) | function reverseSegment(segment) {
function convertToPath (line 5855) | function convertToPath(element, swap) {
function getRotationAtBezierT (line 5948) | function getRotationAtBezierT(segment, i, t) {
function sliceRawPath (line 5966) | function sliceRawPath(rawPath, start, end) {
function measureSegment (line 6077) | function measureSegment(segment, startIndex, bezierQty) {
function cacheRawPathMeasurements (line 6177) | function cacheRawPathMeasurements(rawPath, resolution) {
function subdivideSegment (line 6190) | function subdivideSegment(segment, i, t) {
function getProgressData (line 6218) | function getProgressData(rawPath, progress, decoratee, pushToNextIfAtEnd) {
function getPositionOnPath (line 6292) | function getPositionOnPath(rawPath, progress, includeAngle, point) {
function transformRawPath (line 6348) | function transformRawPath(rawPath, a, b, c, d, tx, ty) {
function arcToSegment (line 6372) | function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFl...
function stringToRawPath (line 6463) | function stringToRawPath(d) {
function bezierToPoints (line 6657) | function bezierToPoints(x1, y1, x2, y2, x3, y3, x4, y4, threshold, point...
function flatPointsToSegment (line 6691) | function flatPointsToSegment(points, curviness) {
function segmentToDistributedPoints (line 6707) | function segmentToDistributedPoints(segment, totalPoints) {
function pointsToSegment (line 6788) | function pointsToSegment(points, curviness) {
function pointToSegDist (line 6881) | function pointToSegDist(x, y, x1, y1, x2, y2) {
function simplifyStep (line 6901) | function simplifyStep(points, first, last, tolerance, simplified) {
function simplifyPoints (line 6927) | function simplifyPoints(points, tolerance) {
function getClosestProgressOnBezier (line 6962) | function getClosestProgressOnBezier(iterations, px, py, start, end, slic...
function getClosestData (line 6993) | function getClosestData(rawPath, x, y, slices) {
function rawPathToString (line 7022) | function rawPathToString(rawPath) {
function CustomEase (line 7162) | function CustomEase(id, data, config) {
function Matrix2D (line 7656) | function Matrix2D(a, b, c, d, e, f) {
function getGlobalMatrix (line 7747) | function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollI...
function EventDispatcher (line 8611) | function EventDispatcher(target) {
function Draggable (line 8651) | function Draggable(target, vars) {
function FlipState (line 11893) | function FlipState(targets, vars, targetsAreElementStates) {
function ElementState (line 12102) | function ElementState(element, props, simple) {
function FlipAction (line 12161) | function FlipAction(vars, batch) {
function FlipBatch (line 12188) | function FlipBatch(id) {
function Flip (line 12398) | function Flip() {}
function Observer (line 13100) | function Observer(vars) {
function ScrollTrigger (line 15163) | function ScrollTrigger(vars, animation) {
function getText (line 16850) | function getText(e) {
function splitInnerHTML (line 16868) | function splitInnerHTML(element, delimiter, trim, preserveSpaces, unesca...
function emojiSafeSplit (line 16901) | function emojiSafeSplit(text, delimiter, trim, preserveSpaces, unescaped...
function CharSet (line 17708) | function CharSet(chars) {
function CustomBounce (line 18080) | function CustomBounce(id, vars) {
function CustomWiggle (line 18235) | function CustomWiggle(id, vars) {
function VelocityTracker (line 19804) | function VelocityTracker(target, property) {
function DraggableSVG (line 22038) | function DraggableSVG(target, vars) {
function Anchor (line 22170) | function Anchor(editor, rawPath, j, i, vars) {
function PathEditor (line 22245) | function PathEditor(target, vars) {
function MotionPathHelper (line 23426) | function MotionPathHelper(targetOrTween, vars) {
function ScrollSmoother (line 23719) | function ScrollSmoother(vars) {
function _SplitText (line 24888) | function _SplitText(elements, config) {
FILE: dist/gsap.js
function _inheritsLoose (line 7) | function _inheritsLoose(subClass, superClass) {
function _assertThisInitialized (line 13) | function _assertThisInitialized(self) {
function Animation (line 1533) | function Animation(vars) {
function Timeline (line 1880) | function Timeline(vars, position) {
function Tween (line 2949) | function Tween(targets, vars, position, skipInherit) {
function PropTween (line 3532) | function PropTween(next, target, prop, start, change, renderer, data, se...
function Context (line 3631) | function Context(func, scope) {
function MatchMedia (line 3766) | function MatchMedia(scope) {
FILE: esm/CustomBounce.js
function CustomBounce (line 147) | function CustomBounce(id, vars) {
FILE: esm/CustomEase.js
function CustomEase (line 122) | function CustomEase(id, data, config) {
FILE: esm/CustomWiggle.js
function CustomWiggle (line 143) | function CustomWiggle(id, vars) {
FILE: esm/Draggable.js
function _assertThisInitialized (line 1) | function _assertThisInitialized(self) { if (self === void 0) { throw new...
function _inheritsLoose (line 3) | function _inheritsLoose(subClass, superClass) { subClass.prototype = Obj...
function EventDispatcher (line 878) | function EventDispatcher(target) {
function Draggable (line 918) | function Draggable(target, vars) {
FILE: esm/Flip.js
function FlipState (line 909) | function FlipState(targets, vars, targetsAreElementStates) {
function ElementState (line 1123) | function ElementState(element, props, simple) {
function FlipAction (line 1186) | function FlipAction(vars, batch) {
function FlipBatch (line 1213) | function FlipBatch(id) {
function Flip (line 1424) | function Flip() {}
FILE: esm/MorphSVGPlugin.js
function _extends (line 1) | function _extends() { _extends = Object.assign || function (target) { fo...
FILE: esm/MotionPathHelper.js
function MotionPathHelper (line 157) | function MotionPathHelper(targetOrTween, vars) {
FILE: esm/Observer.js
function _defineProperties (line 1) | function _defineProperties(target, props) { for (var i = 0; i < props.le...
function _createClass (line 3) | function _createClass(Constructor, protoProps, staticProps) { if (protoP...
function Observer (line 246) | function Observer(vars) {
FILE: esm/ScrambleTextPlugin.js
function CharSet (line 14) | function CharSet(chars) {
FILE: esm/ScrollSmoother.js
function _defineProperties (line 1) | function _defineProperties(target, props) { for (var i = 0; i < props.le...
function _createClass (line 3) | function _createClass(Constructor, protoProps, staticProps) { if (protoP...
function ScrollSmoother (line 86) | function ScrollSmoother(vars) {
FILE: esm/ScrollTrigger.js
function ScrollTrigger (line 922) | function ScrollTrigger(vars, animation) {
FILE: esm/SplitText.js
method constructor (line 166) | constructor(elements, config) {
method split (line 200) | split(config) {
method kill (line 294) | kill() {
method revert (line 299) | revert() {
method create (line 315) | static create(elements, config) {
method register (line 318) | static register(core) {
FILE: esm/gsap-core.js
function _assertThisInitialized (line 1) | function _assertThisInitialized(self) { if (self === void 0) { throw new...
function _inheritsLoose (line 3) | function _inheritsLoose(subClass, superClass) { subClass.prototype = Obj...
function Animation (line 1636) | function Animation(vars) {
function Timeline (line 2021) | function Timeline(vars, position) {
function Tween (line 3182) | function Tween(targets, vars, position, skipInherit) {
function PropTween (line 3816) | function PropTween(next, target, prop, start, change, renderer, data, se...
function Context (line 3918) | function Context(func, scope) {
function MatchMedia (line 4069) | function MatchMedia(scope) {
FILE: esm/utils/PathEditor.js
function DraggableSVG (line 566) | function DraggableSVG(target, vars) {
function Anchor (line 699) | function Anchor(editor, rawPath, j, i, vars) {
function PathEditor (line 774) | function PathEditor(target, vars) {
FILE: esm/utils/VelocityTracker.js
function VelocityTracker (line 88) | function VelocityTracker(target, property) {
FILE: esm/utils/matrix.js
function Matrix2D (line 300) | function Matrix2D(a, b, c, d, e, f) {
function getGlobalMatrix (line 398) | function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollI...
FILE: esm/utils/paths.js
function getRawPath (line 120) | function getRawPath(value) {
function copyRawPath (line 138) | function copyRawPath(rawPath) {
function reverseSegment (line 148) | function reverseSegment(segment) {
function convertToPath (line 198) | function convertToPath(element, swap) {
function getRotationAtProgress (line 292) | function getRotationAtProgress(rawPath, progress) {
function getRotationAtBezierT (line 297) | function getRotationAtBezierT(segment, i, t) {
function sliceRawPath (line 315) | function sliceRawPath(rawPath, start, end) {
function measureSegment (line 429) | function measureSegment(segment, startIndex, bezierQty) {
function cacheRawPathMeasurements (line 531) | function cacheRawPathMeasurements(rawPath, resolution) {
function subdivideSegment (line 547) | function subdivideSegment(segment, i, t) {
function getProgressData (line 580) | function getProgressData(rawPath, progress, decoratee, pushToNextIfAtEnd) {
function getPositionOnPath (line 656) | function getPositionOnPath(rawPath, progress, includeAngle, point) {
function transformRawPath (line 714) | function transformRawPath(rawPath, a, b, c, d, tx, ty) {
function arcToSegment (line 738) | function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFl...
function stringToRawPath (line 832) | function stringToRawPath(d) {
function bezierToPoints (line 1036) | function bezierToPoints(x1, y1, x2, y2, x3, y3, x4, y4, threshold, point...
function flatPointsToSegment (line 1086) | function flatPointsToSegment(points, curviness) {
function segmentToDistributedPoints (line 1103) | function segmentToDistributedPoints(segment, totalPoints) {
function pointsToSegment (line 1189) | function pointsToSegment(points, curviness) {
function pointToSegDist (line 1291) | function pointToSegDist(x, y, x1, y1, x2, y2) {
function simplifyStep (line 1311) | function simplifyStep(points, first, last, tolerance, simplified) {
function simplifyPoints (line 1338) | function simplifyPoints(points, tolerance) {
function getClosestProgressOnBezier (line 1373) | function getClosestProgressOnBezier(iterations, px, py, start, end, slic...
function getClosestData (line 1404) | function getClosestData(rawPath, x, y, slices) {
function subdivideSegmentNear (line 1435) | function subdivideSegmentNear(x, y, segment, slices, iterations) {
function rawPathToString (line 1468) | function rawPathToString(rawPath) {
FILE: esm/utils/strings.js
function getText (line 13) | function getText(e) {
function splitInnerHTML (line 31) | function splitInnerHTML(element, delimiter, trim, preserveSpaces, unesca...
function emojiSafeSplit (line 78) | function emojiSafeSplit(text, delimiter, trim, preserveSpaces, unescaped...
FILE: src/CSSPlugin.js
method clearProps (line 430) | clearProps(plugin, target, property, endValue, tween) {
method targetTest (line 970) | targetTest(target) {
method init (line 973) | init(target, vars, tween, index, targets) {
method render (line 1133) | render(ratio, data) {
method getSetter (line 1146) | getSetter(target, property, plugin) { //returns a setter function that a...
FILE: src/CSSRulePlugin.js
method init (line 41) | init(target, value, tween, index, targets) {
method render (line 51) | render(ratio, data) {
method getRule (line 65) | getRule(selector) {
FILE: src/CustomBounce.js
class CustomBounce (line 129) | class CustomBounce {
method constructor (line 131) | constructor(id, vars) {
method create (line 135) | static create(id, vars) {
method register (line 139) | static register(core) {
FILE: src/CustomEase.js
class CustomEase (line 91) | class CustomEase {
method constructor (line 93) | constructor(id, data, config) {
method setData (line 99) | setData(data, config) {
method getSVGData (line 208) | getSVGData(config) {
method create (line 212) | static create(id, data, config) {
method register (line 216) | static register(core) {
method get (line 221) | static get(id) {
method getSVGData (line 225) | static getSVGData(ease, config) {
FILE: src/CustomWiggle.js
class CustomWiggle (line 104) | class CustomWiggle {
method constructor (line 106) | constructor(id, vars) {
method create (line 110) | static create(id, vars) {
method register (line 114) | static register(core) {
FILE: src/Draggable.js
class EventDispatcher (line 612) | class EventDispatcher {
method constructor (line 614) | constructor(target) {
method addEventListener (line 619) | addEventListener(type, callback) {
method removeEventListener (line 626) | removeEventListener(type, callback) {
method dispatchEvent (line 632) | dispatchEvent(type) {
class Draggable (line 647) | class Draggable extends EventDispatcher {
method constructor (line 649) | constructor(target, vars) {
method register (line 1896) | static register(core) {
method create (line 1901) | static create(targets, vars) {
method get (line 1906) | static get(target) {
method timeSinceDrag (line 1910) | static timeSinceDrag() {
method hitTest (line 1914) | static hitTest(obj1, obj2, threshold) {
FILE: src/DrawSVGPlugin.js
method register (line 136) | register(core) {
method init (line 140) | init(target, value, tween, index, targets) {
method render (line 177) | render(ratio, data) {
FILE: src/EaselPlugin.js
method init (line 219) | init(target, value, tween, index, targets) {
method render (line 262) | render(ratio, data) {
FILE: src/Flip.js
class FlipState (line 553) | class FlipState {
method constructor (line 555) | constructor(targets, vars, targetsAreElementStates) {
method update (line 570) | update(soft) {
method clear (line 578) | clear() {
method fit (line 584) | fit(state, scale, nested) {
method getProperty (line 599) | getProperty(element, property) {
method add (line 604) | add(state) {
method compare (line 627) | compare(state) {
method recordInlineStyles (line 674) | recordInlineStyles() {
method interrupt (line 682) | interrupt(soft) { // soft = DON'T force in-progress flip animations to...
method updateVisibility (line 694) | updateVisibility() {
method getElementState (line 702) | getElementState(element) {
method makeAbsolute (line 706) | makeAbsolute() {
class ElementState (line 714) | class ElementState {
method constructor (line 716) | constructor(element, props, simple) {
method isDifferent (line 725) | isDifferent(state) {
method clone (line 731) | clone(overrides) {
method update (line 735) | update(props, simple) {
class FlipAction (line 771) | class FlipAction {
method constructor (line 772) | constructor(vars, batch) {
method getStateById (line 779) | getStateById(id) {
method kill (line 788) | kill() {
class FlipBatch (line 793) | class FlipBatch {
method constructor (line 794) | constructor(id) {
method add (line 806) | add(config) {
method remove (line 816) | remove(action) {
method getState (line 822) | getState(merge) {
method animate (line 842) | animate() {
method loadState (line 882) | loadState(done) {
method setState (line 903) | setState() {
method killConflicts (line 908) | killConflicts(soft) {
method run (line 914) | run(skipGetState, merge) {
method clear (line 927) | clear(stateOnly) {
method getStateById (line 932) | getStateById(id) {
method kill (line 944) | kill() {
class Flip (line 952) | class Flip {
method getState (line 954) | static getState(targets, vars) {
method from (line 961) | static from(state, vars) {
method to (line 967) | static to(state, vars) {
method fromTo (line 971) | static fromTo(fromState, toState, vars) {
method fit (line 975) | static fit(fromEl, toEl, vars) {
method makeAbsolute (line 999) | static makeAbsolute(targetsOrStates, vars) {
method batch (line 1003) | static batch(id) {
method killFlipsOf (line 1008) | static killFlipsOf(targets, complete) {
method isFlipping (line 1012) | static isFlipping(target) {
method getByTarget (line 1017) | static getByTarget(target) {
method getElementState (line 1021) | static getElementState(target, props) {
method convertCoordinates (line 1025) | static convertCoordinates(fromElement, toElement, point) {
method register (line 1031) | static register(core) {
FILE: src/InertiaPlugin.js
method register (line 233) | register(core) {
method init (line 237) | init(target, vars, tween, index, targets) {
method render (line 314) | render(ratio, data) {
FILE: src/MorphSVGPlugin.js
method register (line 621) | register(core, Plugin) {
method init (line 626) | init(target, value, tween, index, targets) {
method render (line 762) | render(ratio, data) {
method kill (line 836) | kill(property) {
method normalizeStrings (line 843) | normalizeStrings(shape1, shape2, {shapeIndex, map}) {
FILE: src/MotionPathHelper.js
class MotionPathHelper (line 107) | class MotionPathHelper {
method constructor (line 109) | constructor(targetOrTween, vars = {}) {
method getString (line 247) | getString() {
FILE: src/MotionPathPlugin.js
method register (line 159) | register(core, Plugin, propTween) {
method init (line 167) | init(target, vars, tween) {
method render (line 216) | render(ratio, data) {
method getLength (line 238) | getLength(path) {
method convertCoordinates (line 251) | convertCoordinates(fromElement, toElement, point) {
method getRelativePosition (line 256) | getRelativePosition(fromElement, toElement, fromOrigin, toOrigin) {
method arrayToRawPath (line 260) | arrayToRawPath(value, vars) {
FILE: src/Observer.js
class Observer (line 147) | class Observer {
method constructor (line 148) | constructor(vars) {
method init (line 152) | init(vars) {
method velocityX (line 422) | get velocityX() {
method velocityY (line 425) | get velocityY() {
FILE: src/Physics2DPlugin.js
class PhysicsProp (line 26) | class PhysicsProp {
method constructor (line 28) | constructor(target, p, velocity, acceleration, stepsPerTimeUnit) {
method init (line 52) | init(target, value, tween) {
method render (line 79) | render(ratio, data) {
method kill (line 131) | kill(property) {
FILE: src/PhysicsPropsPlugin.js
class PhysicsProp (line 25) | class PhysicsProp {
method constructor (line 27) | constructor(target, p, velocity, acceleration, friction, stepsPerTimeU...
method init (line 52) | init(target, value, tween) {
method render (line 72) | render(ratio, data) {
method kill (line 129) | kill(property) {
FILE: src/PixiPlugin.js
method register (line 272) | register(core, Plugin, propTween) {
method registerPIXI (line 279) | registerPIXI(pixi) {
method init (line 282) | init(target, values, tween, index, targets) {
FILE: src/ScrambleTextPlugin.js
class CharSet (line 13) | class CharSet {
method constructor (line 14) | constructor(chars) {
method grow (line 22) | grow(newLength) { //if we encounter a tween that has more than 80 char...
method register (line 57) | register(core, Plugin, propTween) {
method init (line 61) | init(target, value, tween, index, targets) {
method render (line 106) | render(ratio, data) {
FILE: src/ScrollSmoother.js
class ScrollSmoother (line 45) | class ScrollSmoother {
method constructor (line 47) | constructor(vars) {
method progress (line 639) | get progress() {
method register (line 644) | static register(core) {
FILE: src/ScrollToPlugin.js
method register (line 81) | register(core) {
method init (line 85) | init(target, value, tween, index, targets) {
method render (line 119) | render(ratio, data) {
method kill (line 170) | kill(property) {
FILE: src/ScrollTrigger.js
class ScrollTrigger (line 597) | class ScrollTrigger {
method constructor (line 599) | constructor(vars, animation) {
method init (line 605) | init(vars, animation) {
method register (line 1298) | static register(core) {
method defaults (line 1307) | static defaults(config) {
method disable (line 1316) | static disable(reset, kill) {
method enable (line 1334) | static enable() {
method config (line 1431) | static config(vars) {
method scrollerProxy (line 1442) | static scrollerProxy(target, vars) {
method clearMatchMedia (line 1454) | static clearMatchMedia(query) {
method isInViewport (line 1458) | static isInViewport(element, ratio, horizontal) {
method positionInViewport (line 1464) | static positionInViewport(element, referencePoint, horizontal) {
method killAll (line 1472) | static killAll(allowListeners) {
FILE: src/SplitText.js
method constructor (line 166) | constructor(elements, config) {
method split (line 200) | split(config) {
method kill (line 294) | kill() {
method revert (line 299) | revert() {
method create (line 315) | static create(elements, config) {
method register (line 318) | static register(core) {
FILE: src/SplitText.ts
type SplitTextTarget (line 12) | type SplitTextTarget = string | NodeList | Node | Node[];
type BoundingRect (line 13) | type BoundingRect = {
type WordDelimiterConfig (line 21) | interface WordDelimiterConfig {
type SplitTextConfig (line 26) | interface SplitTextConfig {
type PrepareTextFunction (line 49) | type PrepareTextFunction = (text: string, element: Element) => string;
type LineWrapperFunction (line 50) | type LineWrapperFunction = (startIndex: number, endIndex: number) => void;
type ContextFunction (line 51) | type ContextFunction = (obj?: SplitText) => object | void;
type WrapFunction (line 54) | type WrapFunction = {
type SplitTextOriginal (line 60) | interface SplitTextOriginal {
class SplitText (line 300) | class SplitText {
method constructor (line 317) | constructor(elements: SplitTextTarget, config: SplitTextConfig) {
method split (line 351) | split(config: SplitTextConfig) {
method kill (line 477) | kill() {
method revert (line 483) | revert() {
method create (line 499) | static create(elements: SplitTextTarget, config: SplitTextConfig) {
method register (line 503) | static register(core: any) {
FILE: src/TextPlugin.js
method init (line 20) | init(target, value, tween) {
method render (line 86) | render(ratio, data) {
FILE: src/gsap-core.js
method tick (line 921) | tick() {
method deltaRatio (line 924) | deltaRatio(fps) {
method wake (line 927) | wake() {
method sleep (line 944) | sleep() {
method lagSmoothing (line 949) | lagSmoothing(threshold, adjustedLag) {
method fps (line 953) | fps(fps) {
method add (line 957) | add(callback, once, prioritize) {
method remove (line 964) | remove(callback, i) {
method config (line 1103) | config(steps = 1, immediateStart) {
class GSCache (line 1134) | class GSCache {
method constructor (line 1136) | constructor(target, harness) {
class Animation (line 1167) | class Animation {
method constructor (line 1169) | constructor(vars) {
method delay (line 1186) | delay(value) {
method duration (line 1195) | duration(value) {
method totalDuration (line 1199) | totalDuration(value) {
method totalTime (line 1207) | totalTime(totalTime, suppressEvents) {
method time (line 1238) | time(value, suppressEvents) {
method totalProgress (line 1242) | totalProgress(value, suppressEvents) {
method progress (line 1246) | progress(value, suppressEvents) {
method iteration (line 1250) | iteration(value, suppressEvents) {
method timeScale (line 1266) | timeScale(value, suppressEvents) {
method paused (line 1286) | paused(value) {
method startTime (line 1307) | startTime(value) {
method endTime (line 1317) | endTime(includeRepeats) {
method rawTime (line 1321) | rawTime(wrapRepeats) {
method revert (line 1326) | revert(config = _revertConfig) {
method globalTime (line 1338) | globalTime(rawTime) {
method repeat (line 1348) | repeat(value) {
method repeatDelay (line 1356) | repeatDelay(value) {
method yoyo (line 1366) | yoyo(value) {
method seek (line 1374) | seek(position, suppressEvents) {
method restart (line 1378) | restart(includeDelay, suppressEvents) {
method play (line 1384) | play(from, suppressEvents) {
method reverse (line 1389) | reverse(from, suppressEvents) {
method pause (line 1394) | pause(atTime, suppressEvents) {
method resume (line 1399) | resume() {
method reversed (line 1403) | reversed(value) {
method invalidate (line 1411) | invalidate() {
method isActive (line 1417) | isActive() {
method eventCallback (line 1424) | eventCallback(type, callback, params) {
method then (line 1439) | then(onFulfilled) {
method kill (line 1460) | kill() {
class Timeline (line 1491) | class Timeline extends Animation {
method constructor (line 1493) | constructor(vars = {}, position) {
method to (line 1505) | to(targets, vars, position) {
method from (line 1510) | from(targets, vars, position) {
method fromTo (line 1515) | fromTo(targets, fromVars, toVars, position) {
method set (line 1520) | set(targets, vars, position) {
method call (line 1529) | call(callback, params, position) {
method staggerTo (line 1534) | staggerTo(targets, duration, vars, stagger, position, onCompleteAll, o...
method staggerFrom (line 1544) | staggerFrom(targets, duration, vars, stagger, position, onCompleteAll,...
method staggerFromTo (line 1550) | staggerFromTo(targets, duration, fromVars, toVars, stagger, position, ...
method render (line 1556) | render(totalTime, suppressEvents, force) {
method add (line 1723) | add(child, position) {
method getChildren (line 1742) | getChildren(nested = true, tweens = true, timelines = true, ignoreBefo...
method getById (line 1759) | getById(id) {
method remove (line 1769) | remove(child) {
method totalTime (line 1783) | totalTime(totalTime, suppressEvents) {
method addLabel (line 1796) | addLabel(label, position) {
method removeLabel (line 1801) | removeLabel(label) {
method addPause (line 1806) | addPause(position, callback, params) {
method removePause (line 1813) | removePause(position) {
method killTweensOf (line 1824) | killTweensOf(targets, props, onlyActive) {
method getTweensOf (line 1833) | getTweensOf(targets, onlyActive) {
method tweenTo (line 1859) | tweenTo(position, vars) {
method tweenFromTo (line 1885) | tweenFromTo(fromPosition, toPosition, vars) {
method recent (line 1889) | recent() {
method nextLabel (line 1893) | nextLabel(afterTime = this._time) {
method previousLabel (line 1897) | previousLabel(beforeTime = this._time) {
method currentLabel (line 1901) | currentLabel(value) {
method shiftChildren (line 1905) | shiftChildren(amount, adjustLabels, ignoreBeforeTime = 0) {
method invalidate (line 1927) | invalidate(soft) {
method clear (line 1937) | clear(includeLabels = true) {
method totalDuration (line 1950) | totalDuration(value) {
method updateRoot (line 1990) | static updateRoot(time) {
class Tween (line 2344) | class Tween extends Animation {
method constructor (line 2346) | constructor(targets, vars, position, skipInherit) {
method render (line 2443) | render(totalTime, suppressEvents, force) {
method targets (line 2554) | targets() {
method invalidate (line 2558) | invalidate(soft) { // "soft" gives us a way to clear out everything EX...
method resetTo (line 2566) | resetTo(property, value, start, startIsRelative, skipRecursion) {
method kill (line 2590) | kill(targets, vars = "all") {
method to (line 2651) | static to(targets, vars) {
method from (line 2655) | static from(targets, vars) {
method delayedCall (line 2659) | static delayedCall(delay, callback, params, scope) {
method fromTo (line 2663) | static fromTo(targets, fromVars, toVars) {
method set (line 2667) | static set(targets, vars) {
method killTweensOf (line 2673) | static killTweensOf(targets, props, onlyActive) {
class PropTween (line 2800) | class PropTween {
method constructor (line 2802) | constructor(next, target, prop, start, change, renderer, data, setter,...
method modifier (line 2817) | modifier(func, tween, target) {
class Context (line 2883) | class Context {
method constructor (line 2884) | constructor(func, scope) {
method add (line 2892) | add(name, func, scope) {
method ignore (line 2921) | ignore(func) {
method getTweens (line 2927) | getTweens() {
method clear (line 2932) | clear() {
method kill (line 2935) | kill(revert, matchMedia) {
method revert (line 2980) | revert(config) {
class MatchMedia (line 2988) | class MatchMedia {
method constructor (line 2989) | constructor(scope) {
method add (line 2994) | add(conditions, func, scope) {
method revert (line 3027) | revert(config) {
method kill (line 3030) | kill(revert) {
method registerPlugin (line 3043) | registerPlugin(...args) {
method timeline (line 3046) | timeline(vars) {
method getTweensOf (line 3049) | getTweensOf(targets, onlyActive) {
method getProperty (line 3052) | getProperty(target, property, unit, uncache) {
method quickSetter (line 3059) | quickSetter(target, property, unit) {
method quickTo (line 3084) | quickTo(target, property, vars) {
method isTweening (line 3090) | isTweening(targets) {
method defaults (line 3093) | defaults(value) {
method config (line 3097) | config(value) {
method registerEffect (line 3100) | registerEffect({name, effect, plugins, defaults, extendTimeline}) {
method registerEase (line 3109) | registerEase(name, ease) {
method parseEase (line 3112) | parseEase(ease, defaultEase) {
method getById (line 3115) | getById(id) {
method exportRoot (line 3118) | exportRoot(vars = {}, includeDelayedCalls) {
method addEventListener (line 3149) | addEventListener(type, callback) {
method removeEventListener (line 3153) | removeEventListener(type, callback) {
method init (line 3206) | init(target, vars, tween) {
method init (line 3230) | init(target, vars, tween, index, targets) {
method render (line 3241) | render(ratio, data) {
method init (line 3251) | init(target, value) {
FILE: src/utils/PathEditor.js
class DraggableSVG (line 408) | class DraggableSVG {
method constructor (line 410) | constructor(target, vars) {
method setPointerPosition (line 431) | setPointerPosition(pointerX, pointerY) {
method enabled (line 468) | enabled(enabled) {
method endDrag (line 501) | endDrag(e) {
class Anchor (line 511) | class Anchor {
method constructor (line 513) | constructor(editor, rawPath, j, i, vars) {
method onPress (line 522) | onPress() {
method onClick (line 526) | onClick() {
method onDrag (line 530) | onDrag() {
method onDragEnd (line 535) | onDragEnd() {
method onRelease (line 539) | onRelease() {
method update (line 543) | update(rawPath, j, i) {
class PathEditor (line 569) | class PathEditor {
method constructor (line 571) | constructor(target, vars) {
method _onRelease (line 618) | _onRelease(e) {
method init (line 628) | init() {
method _saveState (line 671) | _saveState() {
method _onClickSelectionPath (line 675) | _onClickSelectionPath(e) {
method _onClickHandle1 (line 715) | _onClickHandle1() {
method _onClickHandle2 (line 725) | _onClickHandle2() {
method _onDragEndAnchor (line 734) | _onDragEndAnchor(e) {
method isSelected (line 739) | isSelected() {
method select (line 743) | select(allAnchors) {
method deselect (line 760) | deselect() {
method _onDragPath (line 770) | _onDragPath(e) {
method _onPressAnchor (line 776) | _onPressAnchor(anchor) {
method _deleteSelectedAnchors (line 792) | _deleteSelectedAnchors() {
method _onClickAnchor (line 825) | _onClickAnchor(anchor) {
method _updateAnchors (line 886) | _updateAnchors() {
method _onPressAlt (line 921) | _onPressAlt() {
method _onReleaseAlt (line 933) | _onReleaseAlt() {
method _onPressHandle1 (line 949) | _onPressHandle1() {
method _onPressHandle2 (line 956) | _onPressHandle2() {
method _onReleaseHandle (line 963) | _onReleaseHandle(e) {
method _onDragHandle1 (line 968) | _onDragHandle1() {
method _onDragHandle2 (line 997) | _onDragHandle2() {
method _onDragAnchor (line 1026) | _onDragAnchor(anchor, changeX, changeY) {
method enabled (line 1058) | enabled(enabled) {
method update (line 1086) | update(readPath) {
method getRawPath (line 1131) | getRawPath(applyTransforms, offsetX, offsetY) {
method getString (line 1139) | getString(applyTransforms, offsetX, offsetY) {
method getNormalizedSVG (line 1147) | getNormalizedSVG(height, originY, shorten, onEaseError) {
method kill (line 1199) | kill() {
method revert (line 1204) | revert() {
FILE: src/utils/VelocityTracker.js
class PropTracker (line 49) | class PropTracker {
method constructor (line 51) | constructor(target, property, type, next) {
class VelocityTracker (line 66) | class VelocityTracker {
method constructor (line 68) | constructor(target, property) {
method register (line 76) | static register(core) {
method get (line 81) | get(property, skipRecentTick) {
method getAll (line 96) | getAll() {
method isTracking (line 106) | isTracking(property) {
method add (line 110) | add(property, type) {
method remove (line 124) | remove(property) {
method kill (line 143) | kill(shallow) {
method track (line 152) | static track(targets, properties, types) {
method untrack (line 171) | static untrack(targets, properties) {
method isTracking (line 181) | static isTracking(target, property) {
method getVelocity (line 186) | static getVelocity(target, property) {
FILE: src/utils/matrix.js
class Matrix2D (line 224) | class Matrix2D {
method constructor (line 225) | constructor(a=1, b=0, c=0, d=1, e=0, f=0) {
method inverse (line 229) | inverse() {
method multiply (line 243) | multiply(matrix) {
method clone (line 260) | clone() {
method equals (line 264) | equals(matrix) {
method apply (line 269) | apply(point, decoratee={}) {
function getGlobalMatrix (line 286) | function getGlobalMatrix(element, inverse, adjustGOffset, includeScrollI...
FILE: src/utils/paths.js
function getRawPath (line 94) | function getRawPath(value) {
function copyRawPath (line 110) | function copyRawPath(rawPath) {
function reverseSegment (line 119) | function reverseSegment(segment) {
function convertToPath (line 164) | function convertToPath(element, swap) {
function getRotationAtProgress (line 231) | function getRotationAtProgress(rawPath, progress) {
function getRotationAtBezierT (line 236) | function getRotationAtBezierT(segment, i, t) {
function sliceRawPath (line 254) | function sliceRawPath(rawPath, start, end) {
function measureSegment (line 343) | function measureSegment(segment, startIndex, bezierQty) {
function cacheRawPathMeasurements (line 414) | function cacheRawPathMeasurements(rawPath, resolution) {
function subdivideSegment (line 427) | function subdivideSegment(segment, i, t) {
function getProgressData (line 466) | function getProgressData(rawPath, progress, decoratee, pushToNextIfAtEnd) {
function getPositionOnPath (line 524) | function getPositionOnPath(rawPath, progress, includeAngle, point) {
function transformRawPath (line 566) | function transformRawPath(rawPath, a, b, c, d, tx, ty) {
function arcToSegment (line 586) | function arcToSegment(lastX, lastY, rx, ry, angle, largeArcFlag, sweepFl...
function stringToRawPath (line 666) | function stringToRawPath(d) {
function bezierToPoints (line 839) | function bezierToPoints(x1, y1, x2, y2, x3, y3, x4, y4, threshold, point...
function flatPointsToSegment (line 886) | function flatPointsToSegment(points, curviness=1) {
function segmentToDistributedPoints (line 905) | function segmentToDistributedPoints(segment, totalPoints) {
function pointsToSegment (line 966) | function pointsToSegment(points, curviness) {
function pointToSegDist (line 1043) | function pointToSegDist(x, y, x1, y1, x2, y2) {
function simplifyStep (line 1060) | function simplifyStep(points, first, last, tolerance, simplified) {
function simplifyPoints (line 1082) | function simplifyPoints(points, tolerance) {
function getClosestProgressOnBezier (line 1108) | function getClosestProgressOnBezier(iterations, px, py, start, end, slic...
function getClosestData (line 1130) | function getClosestData(rawPath, x, y, slices) { //returns an object wit...
function subdivideSegmentNear (line 1150) | function subdivideSegmentNear(x, y, segment, slices, iterations) {
function rawPathToString (line 1179) | function rawPathToString(rawPath) {
FILE: src/utils/strings.js
function getText (line 15) | function getText(e) {
function splitInnerHTML (line 32) | function splitInnerHTML(element, delimiter, trim, preserveSpaces, unesca...
function emojiSafeSplit (line 71) | function emojiSafeSplit(text, delimiter, trim, preserveSpaces, unescaped...
FILE: types/animation.d.ts
type Omit (line 4) | type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof T, K>>;
class Animation (line 6) | class Animation {
FILE: types/css-plugin.d.ts
type CSSProperties (line 4) | interface CSSProperties {
type CSSProperties (line 34) | interface CSSProperties {
type CSSVars (line 525) | interface CSSVars extends Partial<CSSProperties> { }
type TweenVars (line 527) | interface TweenVars extends CSSVars {
type GSCache (line 532) | interface GSCache {
type CSSPlugin (line 539) | interface CSSPlugin extends Plugin {}
type CSSPluginClass (line 541) | interface CSSPluginClass extends CSSPlugin {
type Element (line 549) | interface Element {
FILE: types/css-rule-plugin.d.ts
type TweenVars (line 3) | interface TweenVars {
type CSSRulePlugin (line 10) | interface CSSRulePlugin extends Plugin {
type CSSRulePluginClass (line 28) | interface CSSRulePluginClass extends CSSRulePlugin {
FILE: types/custom-bounce.d.ts
type CustomBounceVars (line 1) | interface CustomBounceVars {
type EaseFunction (line 8) | interface EaseFunction {
class CustomBounce (line 12) | class CustomBounce {
class _CustomBounce (line 22) | class _CustomBounce extends CustomBounce {}
FILE: types/custom-ease.d.ts
type CustomEaseConfig (line 1) | interface CustomEaseConfig {
type EaseFunction (line 12) | interface EaseFunction {
class CustomEase (line 17) | class CustomEase {
class _CustomEase (line 35) | class _CustomEase extends CustomEase {}
FILE: types/custom-wiggle.d.ts
type CustomWiggleVars (line 1) | interface CustomWiggleVars {
type EaseFunction (line 8) | interface EaseFunction {
class CustomWiggle (line 12) | class CustomWiggle {
class _CustomWiggle (line 22) | class _CustomWiggle extends CustomWiggle {}
FILE: types/draggable.d.ts
class Draggable (line 1) | class Draggable {
type CallbackType (line 289) | type CallbackType =
type Direction (line 300) | type Direction =
type DraggableType (line 310) | type DraggableType =
type SnapValue (line 324) | type SnapValue = number[] | ((value: number) => number);
type TestObject (line 325) | type TestObject = gsap.DOMTarget | Event | Rectangle;
type BoundsMinMax (line 327) | interface BoundsMinMax {
type BoundsRectangle (line 334) | interface BoundsRectangle {
type BoundsRotation (line 341) | interface BoundsRotation {
type Rectangle (line 346) | interface Rectangle {
type SnapObject (line 353) | interface SnapObject {
type Vars (line 363) | interface Vars {
class _Draggable (line 417) | class _Draggable extends Draggable {}
FILE: types/draw-svg-plugin.d.ts
type DrawSVGTarget (line 3) | type DrawSVGTarget = string | SVGPrimitive | SVGPathElement;
type TweenVars (line 5) | interface TweenVars {
type DrawSVGPlugin (line 12) | interface DrawSVGPlugin extends Plugin {
type DrawSVGPluginClass (line 43) | interface DrawSVGPluginClass extends DrawSVGPlugin {
FILE: types/ease.d.ts
type EaseFunction (line 3) | interface EaseFunction {
type Ease (line 7) | interface Ease {
type BackConfig (line 13) | interface BackConfig extends EaseFunction {
type Back (line 17) | interface Back {
type EasePack (line 23) | interface EasePack {
type ElasticConfig (line 29) | interface ElasticConfig extends EaseFunction {
type Elastic (line 33) | interface Elastic {
type ExpoScaleEase (line 39) | interface ExpoScaleEase {
type Linear (line 43) | interface Linear extends Ease {
type RoughEaseVars (line 47) | interface RoughEaseVars {
type RoughEaseEase (line 56) | interface RoughEaseEase extends EaseFunction {
type RoughEaseConfig (line 60) | interface RoughEaseConfig extends EaseFunction {
type RoughEase (line 64) | interface RoughEase extends EaseFunction {
type SlowMoEase (line 69) | interface SlowMoEase extends EaseFunction {
type SlowMoConfig (line 73) | interface SlowMoConfig extends EaseFunction {
type SlowMo (line 77) | interface SlowMo extends EaseFunction {
type SteppedEase (line 82) | interface SteppedEase {
FILE: types/easel-plugin.d.ts
type Vars (line 2) | interface Vars {
type TweenVars (line 9) | interface TweenVars {
type EaselPlugin (line 16) | interface EaselPlugin extends Plugin {
type EaselPluginClass (line 20) | interface EaselPluginClass extends EaselPlugin {
FILE: types/flip.d.ts
class Flip (line 1) | class Flip {
type OverrideProps (line 205) | type OverrideProps<M, N> = { [P in keyof M]: P extends keyof N ? N[P] : ...
type EnterOrLeaveCallback (line 207) | type EnterOrLeaveCallback = (elements: Element[]) => any;
type SpinFunction (line 208) | type SpinFunction = (index: number, element: Element, targets: Element[]...
type LoadStateFunction (line 209) | type LoadStateFunction = (load: Function) => any;
type BatchActionFunction (line 210) | type BatchActionFunction = (self: FlipBatchAction) => any;
type TweenVarOverrides (line 212) | interface TweenVarOverrides {
type AnimationVars (line 216) | interface AnimationVars extends OverrideProps<gsap.TweenVars, TweenVarOv...
type FlipStateVars (line 222) | interface FlipStateVars {
type StateCompare (line 227) | interface StateCompare {
type FromToVars (line 234) | interface FromToVars extends AnimationVars {
type FitReturnVars (line 247) | interface FitReturnVars {
type FitVars (line 258) | interface FitVars extends AnimationVars {
type BatchActionConfig (line 263) | interface BatchActionConfig {
class ElementState (line 275) | class ElementState {
class FlipState (line 300) | class FlipState {
class FlipBatchAction (line 321) | class FlipBatchAction {
class FlipBatch (line 348) | class FlipBatch {
type ElementState (line 461) | type ElementState = any;
type EnterOrLeaveCallback (line 467) | type EnterOrLeaveCallback = Flip.EnterOrLeaveCallback;
type FitVars (line 473) | type FitVars = Flip.FitVars;
type FitReturnVars (line 479) | type FitReturnVars = Flip.FitReturnVars;
type Flip (line 485) | type Flip = any;
type FlipState (line 491) | type FlipState = any;
type FlipStateVars (line 497) | type FlipStateVars = Flip.FlipStateVars;
type FlipToFromVars (line 503) | type FlipToFromVars = Flip.FromToVars;
type SpinFunction (line 509) | type SpinFunction = Flip.SpinFunction;
class _Flip (line 513) | class _Flip extends Flip { }
FILE: types/gs-dev-tools.d.ts
class GSDevTools (line 1) | class GSDevTools {
type Vars (line 47) | interface Vars {
class _GSDevTools (line 68) | class _GSDevTools extends GSDevTools {}
FILE: types/gsap-core.d.ts
type RegisterablePlugins (line 3) | type RegisterablePlugins =
type DOMTarget (line 24) | type DOMTarget = Element | string | null | Window | ArrayLike<Element | ...
type TweenTarget (line 25) | type TweenTarget = string | object | null;
type Callback (line 27) | type Callback = (...args: any[]) => void | null;
type ContextSafeFunc (line 28) | type ContextSafeFunc = (func: Function) => Function;
type ContextFunc (line 29) | type ContextFunc = (context: Context, contextSafe?: ContextSafeFunc) => ...
type CallbackType (line 30) | type CallbackType = "onComplete" | "onInterrupt" | "onRepeat" | "onRever...
type TickerCallback (line 31) | type TickerCallback = (time: number, deltaTime: number, frame: number, e...
type Point2D (line 33) | type Point2D = { x: number, y: number };
type Position (line 34) | type Position = number | string;
type FunctionBasedValue (line 36) | type FunctionBasedValue<T> = (index: number, target: any, targets: any[]...
type ArrayValue (line 37) | type ArrayValue = any[] | FunctionBasedValue<any[]>;
type BooleanValue (line 38) | type BooleanValue = boolean | FunctionBasedValue<boolean>;
type NumberValue (line 39) | type NumberValue = number | FunctionBasedValue<number>;
type StringValue (line 40) | type StringValue = string | FunctionBasedValue<string>;
type ElementValue (line 41) | type ElementValue = Element | FunctionBasedValue<Element>;
type TweenValue (line 42) | type TweenValue = NumberValue | StringValue;
type QuickToFunc (line 43) | type QuickToFunc = {
type SVGPathValue (line 48) | type SVGPathValue = string | SVGPathElement;
type SVGPathTarget (line 49) | type SVGPathTarget = SVGPathValue | ArrayLike<SVGPathValue>;
type SVGPrimitive (line 50) | type SVGPrimitive = SVGCircleElement | SVGRectElement | SVGEllipseElemen...
type Conditions (line 52) | interface Conditions {
type Context (line 55) | interface Context {
type MatchMedia (line 69) | interface MatchMedia {
type AnimationVars (line 76) | interface AnimationVars extends CallbackVars {
type CallbackVars (line 89) | interface CallbackVars {
type EaseMap (line 103) | interface EaseMap {
type EffectsMap (line 107) | interface EffectsMap {
type GSAPConfig (line 111) | interface GSAPConfig {
type GSAPUnits (line 122) | type GSAPUnits = {
type StaggerVars (line 146) | interface StaggerVars extends CallbackVars, utils.DistributeConfig {
type Ticker (line 154) | interface Ticker {
type TimelineVars (line 167) | interface TimelineVars extends AnimationVars {
type EaseString (line 174) | type EaseString = "none"
type TweenVars (line 186) | interface TweenVars extends AnimationVars {
class TweenLite (line 633) | class TweenLite extends gsap.core.Tween {}
class TweenMax (line 639) | class TweenMax extends gsap.core.Tween {}
class TimelineLite (line 645) | class TimelineLite extends gsap.core.Timeline {}
class TimelineMax (line 651) | class TimelineMax extends gsap.core.Timeline {}
class TweenLite (line 662) | class TweenLite extends gsap.core.Tween {}
class TweenMax (line 668) | class TweenMax extends gsap.core.Tween {}
class TimelineLite (line 674) | class TimelineLite extends gsap.core.Timeline {}
class TimelineMax (line 680) | class TimelineMax extends gsap.core.Timeline {}
FILE: types/gsap-plugins.d.ts
type PluginInit (line 3) | type PluginInit = (
type PluginRender (line 12) | type PluginRender = (this: PropTween, progress: number, data: PluginScop...
type PluginKill (line 13) | type PluginKill = (this: PluginScope) => void;
type PluginAliases (line 15) | interface PluginAliases {
type PropTween (line 20) | interface PropTween {
type PluginScope (line 29) | interface PluginScope {
type PluginStatic (line 40) | interface PluginStatic {
type Plugin (line 49) | interface Plugin extends Partial<PluginStatic> {
type AttrVars (line 56) | interface AttrVars {
type ModifiersVars (line 60) | interface ModifiersVars {
type SnapVars (line 64) | interface SnapVars {
type TweenVars (line 68) | interface TweenVars {
type AttrPlugin (line 77) | interface AttrPlugin extends Plugin {}
type ModifiersPlugin (line 78) | interface ModifiersPlugin extends Plugin {}
type SnapPlugin (line 79) | interface SnapPlugin extends Plugin {}
type AttrPluginClass (line 81) | interface AttrPluginClass extends AttrPlugin {
type ModifiersPluginClass (line 86) | interface ModifiersPluginClass extends ModifiersPlugin {
type SnapPluginClass (line 91) | interface SnapPluginClass extends SnapPlugin {
type RawPath (line 101) | type RawPath = number[][];
type Matrix2D (line 102) | type Matrix2D = { a: number, b: number, c: number, d: number, e: number,...
FILE: types/gsap-utils.d.ts
type DistributeConfig (line 3) | interface DistributeConfig {
type SnapNumberConfig (line 13) | interface SnapNumberConfig {
type SnapPoint2DConfig (line 19) | interface SnapPoint2DConfig {
type SelectorFunc (line 24) | interface SelectorFunc {
FILE: types/index.d.ts
type GSAPDraggableVars (line 43) | type GSAPDraggableVars = Draggable.Vars;
type GSAPAnimation (line 44) | type GSAPAnimation = gsap.core.Animation;
type GSAPCallback (line 45) | type GSAPCallback = gsap.Callback;
type GSAPDistributeConfig (line 46) | type GSAPDistributeConfig = gsap.utils.DistributeConfig;
type GSAPPlugin (line 47) | type GSAPPlugin = gsap.Plugin;
type GSAPPluginScope (line 48) | type GSAPPluginScope = gsap.PluginScope;
type GSAPPluginStatic (line 49) | type GSAPPluginStatic = gsap.PluginStatic;
type GSAPStaggerVars (line 50) | type GSAPStaggerVars = gsap.StaggerVars;
type GSAPTickerCallback (line 51) | type GSAPTickerCallback = gsap.TickerCallback;
type GSAPTimeline (line 52) | type GSAPTimeline = gsap.core.Timeline;
type GSAPTimelineVars (line 53) | type GSAPTimelineVars = gsap.TimelineVars;
type GSAPTween (line 54) | type GSAPTween = gsap.core.Tween;
type GSAPTweenTarget (line 55) | type GSAPTweenTarget = gsap.TweenTarget;
type GSAPTweenVars (line 56) | type GSAPTweenVars = gsap.TweenVars;
type GSAP (line 58) | type GSAP = typeof gsap;
FILE: types/inertia-plugin.d.ts
type InertiaEndFunction (line 3) | type InertiaEndFunction<T> = (value: T) => T;
type InertiaDuration (line 5) | interface InertiaDuration {
type InertiaLinkedProps (line 11) | interface InertiaLinkedProps {
type InertiaObject (line 15) | interface InertiaObject {
type InertiaVars (line 23) | type InertiaVars = {
type TweenVars (line 31) | interface TweenVars {
type InertiaPlugin (line 38) | interface InertiaPlugin extends Plugin, VelocityTrackerStatic {
type InertiaPluginClass (line 58) | interface InertiaPluginClass extends InertiaPlugin {
FILE: types/morph-svg-plugin.d.ts
type TweenVars (line 3) | interface TweenVars {
type MorphSVGPlugin (line 10) | interface MorphSVGPlugin extends Plugin {
type NormalizeVars (line 90) | interface NormalizeVars {
type MorphSVGPluginClass (line 95) | interface MorphSVGPluginClass extends MorphSVGPlugin {
type MorphSVGVars (line 100) | interface MorphSVGVars {
FILE: types/motion-path-helper.d.ts
class MotionPathHelper (line 1) | class MotionPathHelper {
type Vars (line 53) | interface Vars {
type EditPathVars (line 66) | interface EditPathVars {
class _MotionPathHelper (line 82) | class _MotionPathHelper extends MotionPathHelper {}
FILE: types/motion-path-plugin.d.ts
type PathObject (line 3) | interface PathObject {
type TweenVars (line 7) | interface TweenVars {
type ArrayToRawPathObject (line 14) | interface ArrayToRawPathObject {
type getRelativePositionObject (line 22) | interface getRelativePositionObject extends gsap.Point2D {
type MotionPathPlugin (line 26) | interface MotionPathPlugin extends Plugin {
type MotionPathPluginClass (line 247) | interface MotionPathPluginClass extends MotionPathPlugin {
type NumFunc (line 257) | type NumFunc = (i: number, target: object | Element) => number;
type Vars (line 258) | interface Vars {
FILE: types/observer.d.ts
class Observer (line 1) | class Observer {
type ObserverCallback (line 146) | type ObserverCallback = (self: Observer) => any;
type IgnoreCheckCallback (line 147) | type IgnoreCheckCallback = (event: Event, isTouchOrPointer: boolean) => ...
type ObserverVars (line 149) | interface ObserverVars {
class _Observer (line 193) | class _Observer extends Observer { }
FILE: types/physics-2d-plugin.d.ts
type Vars (line 2) | interface Vars {
type TweenVars (line 16) | interface TweenVars {
type Physics2DPlugin (line 22) | interface Physics2DPlugin extends Plugin {
type Physics2DPluginClass (line 26) | interface Physics2DPluginClass extends Physics2DPlugin {
FILE: types/physics-props-plugin.d.ts
type Vars (line 2) | interface Vars {
type Values (line 6) | interface Values {
type TweenVars (line 15) | interface TweenVars {
type PhysicsPropsPlugin (line 21) | interface PhysicsPropsPlugin extends Plugin {
type PhysicsPropsPluginClass (line 25) | interface PhysicsPropsPluginClass extends PhysicsPropsPlugin {
FILE: types/pixi-plugin.d.ts
type PixiMatrix (line 2) | interface PixiMatrix {
type Vars (line 12) | interface Vars {
type TweenVars (line 68) | interface TweenVars {
type PixiPlugin (line 75) | interface PixiPlugin extends Plugin {
type PixiPluginClass (line 92) | interface PixiPluginClass extends PixiPlugin {
FILE: types/scramble-text-plugin.d.ts
type Vars (line 2) | interface Vars {
type TweenVars (line 17) | interface TweenVars {
type ScrambleTextPlugin (line 23) | interface ScrambleTextPlugin extends Plugin {
type ScrambleTextPluginClass (line 27) | interface ScrambleTextPluginClass extends ScrambleTextPlugin {
FILE: types/scroll-smoother.d.ts
class ScrollSmoother (line 1) | class ScrollSmoother {
type Callback (line 333) | type Callback = (self: ScrollSmoother) => any;
type EventCallback (line 334) | type EventCallback = (self: ScrollSmoother, event: Event) => any;
type EffectFunc (line 335) | type EffectFunc = (index: number, element: Element) => number | string;
type EffectsVars (line 337) | interface EffectsVars {
type Vars (line 347) | interface Vars {
class _ScrollSmoother (line 370) | class _ScrollSmoother extends ScrollSmoother { }
FILE: types/scroll-to-plugin.d.ts
class ScrollToPlugin (line 1) | class ScrollToPlugin {
type Vars (line 53) | interface Vars {
type ConfigVars (line 62) | interface ConfigVars {
type TweenVars (line 70) | interface TweenVars {
class _ScrollToPlugin (line 76) | class _ScrollToPlugin extends ScrollToPlugin { }
FILE: types/scroll-trigger.d.ts
type AnimationVars (line 3) | interface AnimationVars {
class ScrollTrigger (line 8) | class ScrollTrigger {
type RectObj (line 673) | interface RectObj {
type MatchMediaObject (line 680) | interface MatchMediaObject {
type Callback (line 684) | type Callback = (self: ScrollTrigger) => any;
type BatchCallback (line 685) | type BatchCallback = (targets: Element[], triggers: ScrollTrigger[]) => ...
type NumFunc (line 686) | type NumFunc = () => number;
type SnapFunc (line 687) | type SnapFunc = (value: number, self?: ScrollTrigger) => number;
type SnapDirectionalFunc (line 688) | type SnapDirectionalFunc = (value: number, direction?: number, threshold...
type GetterSetterNumFunc (line 689) | type GetterSetterNumFunc = (value?: number) => number | void;
type GetterRectFunc (line 690) | type GetterRectFunc = () => RectObj;
type StartEndFunc (line 691) | type StartEndFunc = (self: ScrollTrigger) => string | number;
type ScrollFunc (line 692) | type ScrollFunc = (position: number) => void;
type MarkersVars (line 694) | interface MarkersVars {
type ToggleClassVars (line 702) | interface ToggleClassVars {
type SnapVars (line 707) | interface SnapVars {
type RangeObject (line 719) | interface RangeObject {
type Vars (line 724) | interface Vars {
type StaticVars (line 764) | interface StaticVars extends Vars {
type BatchVars (line 768) | interface BatchVars {
type ConfigVars (line 795) | interface ConfigVars {
type ScrollerProxyVars (line 802) | interface ScrollerProxyVars {
type NormalizeVars (line 812) | interface NormalizeVars extends Observer.ObserverVars {
type ScrollerProxyVars (line 827) | type ScrollerProxyVars = ScrollTrigger.ScrollerProxyVars;
type ScrollTrigger (line 833) | type ScrollTrigger = any;
type ScrollTriggerBatchVars (line 839) | type ScrollTriggerBatchVars = ScrollTrigger.BatchVars;
type ScrollTriggerConfigVars (line 845) | type ScrollTriggerConfigVars = ScrollTrigger.ConfigVars;
class ScrollTriggerInstance (line 851) | class ScrollTriggerInstance extends ScrollTrigger {}
type ScrollTriggerInstanceVars (line 857) | type ScrollTriggerInstanceVars = ScrollTrigger.Vars;
class ScrollTriggerStatic (line 863) | class ScrollTriggerStatic extends ScrollTrigger {}
type ScrollTriggerStaticVars (line 869) | type ScrollTriggerStaticVars = ScrollTrigger.StaticVars;
type SnapVars (line 875) | type SnapVars = ScrollTrigger.SnapVars;
type ToggleClassVars (line 881) | type ToggleClassVars = ScrollTrigger.ToggleClassVars;
class _ScrollTrigger (line 885) | class _ScrollTrigger extends ScrollTrigger { }
FILE: types/split-text.d.ts
class SplitText (line 1) | class SplitText {
type SplitTextTarget (line 68) | type SplitTextTarget = string | NodeList | Node | Node[];
type PrepareTextFunction (line 69) | type PrepareTextFunction = (text: string, element: Element) => string;
type WordDelimiterConfig (line 70) | interface WordDelimiterConfig {
type Vars (line 74) | interface Vars {
class _SplitText (line 99) | class _SplitText extends SplitText {}
FILE: types/text-plugin.d.ts
type Vars (line 2) | interface Vars {
type TweenVars (line 17) | interface TweenVars {
type TextPlugin (line 23) | interface TextPlugin extends Plugin {
type TextPluginClass (line 27) | interface TextPluginClass extends TextPlugin {
FILE: types/timeline.d.ts
type TimelineChild (line 3) | type TimelineChild = string | Animation | Callback | Array<string | Anim...
type Labels (line 5) | interface Labels {
class Timeline (line 9) | class Timeline extends Animation {
FILE: types/tween.d.ts
class Tween (line 3) | class Tween extends Animation {
FILE: types/utils/velocity-tracker.d.ts
type VelocityType (line 3) | type VelocityType = "num" | "deg" | "rad";
type VelocityMap (line 5) | interface VelocityMap {
type VelocityTrackerInstance (line 9) | interface VelocityTrackerInstance {
type VelocityTrackerStatic (line 18) | interface VelocityTrackerStatic {
type VelocityTracker (line 26) | interface VelocityTracker extends VelocityTrackerStatic {
Condensed preview — 130 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (4,112K chars).
[
{
"path": ".gitignore",
"chars": 260,
"preview": ".DS_Store\n.AppleDouble\n.LSOverride\nIcon\n\n# Thumbnails\n._*\n\n# Files that might appear on external disk\n.Spotlight-V100\n.T"
},
{
"path": "README.md",
"chars": 6196,
"preview": "# GSAP (GreenSock Animation Platform)\n\n[](https://gsap."
},
{
"path": "SECURITY.md",
"chars": 274,
"preview": "# Security Policy\n\nPlease report (suspected) security vulnerabilities to\n**[info@greensock.com](mailto:info@greensock.co"
},
{
"path": "dist/CSSRulePlugin.js",
"chars": 3318,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/CustomBounce.js",
"chars": 4461,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/CustomEase.js",
"chars": 18658,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/CustomWiggle.js",
"chars": 4504,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/Draggable.js",
"chars": 93156,
"preview": "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n type"
},
{
"path": "dist/DrawSVGPlugin.js",
"chars": 9253,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/EasePack.js",
"chars": 5491,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/EaselPlugin.js",
"chars": 9383,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/Flip.js",
"chars": 54494,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/GSDevTools.js",
"chars": 146501,
"preview": "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n type"
},
{
"path": "dist/InertiaPlugin.js",
"chars": 19772,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/MorphSVGPlugin.js",
"chars": 55989,
"preview": "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n type"
},
{
"path": "dist/MotionPathHelper.js",
"chars": 90914,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/MotionPathPlugin.js",
"chars": 51882,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/Observer.js",
"chars": 24123,
"preview": "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n type"
},
{
"path": "dist/Physics2DPlugin.js",
"chars": 4771,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/PhysicsPropsPlugin.js",
"chars": 4503,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/PixiPlugin.js",
"chars": 15281,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/ScrambleTextPlugin.js",
"chars": 16690,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/ScrollSmoother.js",
"chars": 32406,
"preview": "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n type"
},
{
"path": "dist/ScrollToPlugin.js",
"chars": 8428,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/ScrollTrigger.js",
"chars": 114924,
"preview": "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n type"
},
{
"path": "dist/SplitText.js",
"chars": 18170,
"preview": "/*!\n * SplitText 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2025, GreenSock. All rights reserved. Subject to th"
},
{
"path": "dist/TextPlugin.js",
"chars": 14356,
"preview": "(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n\ttypeof"
},
{
"path": "dist/all.js",
"chars": 807880,
"preview": "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n type"
},
{
"path": "dist/gsap.js",
"chars": 179749,
"preview": "(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :\n type"
},
{
"path": "esm/CSSPlugin.js",
"chars": 65156,
"preview": "/*!\n * CSSPlugin 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to the"
},
{
"path": "esm/CSSRulePlugin.js",
"chars": 3469,
"preview": "/*!\n * CSSRulePlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * S"
},
{
"path": "esm/CustomBounce.js",
"chars": 4372,
"preview": "/*!\n * CustomBounce 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Su"
},
{
"path": "esm/CustomEase.js",
"chars": 11367,
"preview": "/*!\n * CustomEase 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subj"
},
{
"path": "esm/CustomWiggle.js",
"chars": 4567,
"preview": "/*!\n * CustomWiggle 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Su"
},
{
"path": "esm/Draggable.js",
"chars": 101074,
"preview": "function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - "
},
{
"path": "esm/DrawSVGPlugin.js",
"chars": 10715,
"preview": "/*!\n * DrawSVGPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * S"
},
{
"path": "esm/EasePack.js",
"chars": 5247,
"preview": "/*!\n * EasePack 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subjec"
},
{
"path": "esm/EaselPlugin.js",
"chars": 8713,
"preview": "/*!\n * EaselPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Sub"
},
{
"path": "esm/Flip.js",
"chars": 49106,
"preview": "/*!\n * Flip 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to"
},
{
"path": "esm/GSDevTools.js",
"chars": 62465,
"preview": "/*!\n * GSDevTools 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subj"
},
{
"path": "esm/InertiaPlugin.js",
"chars": 16191,
"preview": "/*!\n * InertiaPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * S"
},
{
"path": "esm/MorphSVGPlugin.js",
"chars": 38174,
"preview": "function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var s"
},
{
"path": "esm/MotionPathHelper.js",
"chars": 11817,
"preview": "/*!\n * MotionPathHelper 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n "
},
{
"path": "esm/MotionPathPlugin.js",
"chars": 12485,
"preview": "/*!\n * MotionPathPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n "
},
{
"path": "esm/Observer.js",
"chars": 26083,
"preview": "function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descript"
},
{
"path": "esm/Physics2DPlugin.js",
"chars": 4950,
"preview": "/*!\n * Physics2DPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n *"
},
{
"path": "esm/PhysicsPropsPlugin.js",
"chars": 4825,
"preview": "/*!\n * PhysicsPropsPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved."
},
{
"path": "esm/PixiPlugin.js",
"chars": 15319,
"preview": "/*!\n * PixiPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subj"
},
{
"path": "esm/ScrambleTextPlugin.js",
"chars": 8392,
"preview": "/*!\n * ScrambleTextPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved."
},
{
"path": "esm/ScrollSmoother.js",
"chars": 40957,
"preview": "function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descript"
},
{
"path": "esm/ScrollToPlugin.js",
"chars": 9111,
"preview": "/*!\n * ScrollToPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * "
},
{
"path": "esm/ScrollTrigger.js",
"chars": 112055,
"preview": "/*!\n * ScrollTrigger 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * S"
},
{
"path": "esm/SplitText.js",
"chars": 17308,
"preview": "/*!\n * SplitText 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2025, GreenSock. All rights reserved. Subject to th"
},
{
"path": "esm/TextPlugin.js",
"chars": 4660,
"preview": "/*!\n * TextPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subj"
},
{
"path": "esm/all.js",
"chars": 1503,
"preview": "import gsap from \"./gsap-core.js\";\nimport CSSPlugin from \"./CSSPlugin.js\";\nvar gsapWithCSS = gsap.registerPlugin(CSSPlug"
},
{
"path": "esm/gsap-core.js",
"chars": 172157,
"preview": "function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - "
},
{
"path": "esm/index.js",
"chars": 664,
"preview": "import { gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, Stepped"
},
{
"path": "esm/utils/PathEditor.js",
"chars": 54966,
"preview": "/*!\n * PathEditor 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to th"
},
{
"path": "esm/utils/VelocityTracker.js",
"chars": 6555,
"preview": "/*!\n * VelocityTracker: 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject"
},
{
"path": "esm/utils/matrix.js",
"chars": 15372,
"preview": "/*!\n * matrix 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to the te"
},
{
"path": "esm/utils/paths.js",
"chars": 53069,
"preview": "/*!\n * paths 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to the ter"
},
{
"path": "esm/utils/strings.js",
"chars": 10428,
"preview": "/*!\n * strings: 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to the "
},
{
"path": "package.json",
"chars": 2255,
"preview": "{\n \"name\": \"gsap\",\n \"version\": \"3.14.2\",\n \"description\": \"GSAP is a robust JavaScript toolset that turns develo"
},
{
"path": "src/CSSPlugin.js",
"chars": 59818,
"preview": "/*!\n * CSSPlugin 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to the"
},
{
"path": "src/CSSRulePlugin.js",
"chars": 3055,
"preview": "/*!\n * CSSRulePlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * S"
},
{
"path": "src/CustomBounce.js",
"chars": 3939,
"preview": "/*!\n * CustomBounce 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Su"
},
{
"path": "src/CustomEase.js",
"chars": 9988,
"preview": "/*!\n * CustomEase 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subj"
},
{
"path": "src/CustomWiggle.js",
"chars": 4043,
"preview": "/*!\n * CustomWiggle 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Su"
},
{
"path": "src/Draggable.js",
"chars": 90405,
"preview": "/*!\n * Draggable 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subje"
},
{
"path": "src/DrawSVGPlugin.js",
"chars": 9629,
"preview": "/*!\n * DrawSVGPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * S"
},
{
"path": "src/EasePack.js",
"chars": 4711,
"preview": "/*!\n * EasePack 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subjec"
},
{
"path": "src/EaselPlugin.js",
"chars": 7948,
"preview": "/*!\n * EaselPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Sub"
},
{
"path": "src/Flip.js",
"chars": 41015,
"preview": "/*!\n * Flip 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to"
},
{
"path": "src/GSDevTools.js",
"chars": 58359,
"preview": "/*!\n * GSDevTools 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subj"
},
{
"path": "src/InertiaPlugin.js",
"chars": 14341,
"preview": "/*!\n * InertiaPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * S"
},
{
"path": "src/MorphSVGPlugin.js",
"chars": 34159,
"preview": "/*!\n * MorphSVGPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * "
},
{
"path": "src/MotionPathHelper.js",
"chars": 10212,
"preview": "/*!\n * MotionPathHelper 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n "
},
{
"path": "src/MotionPathPlugin.js",
"chars": 10890,
"preview": "/*!\n * MotionPathPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n "
},
{
"path": "src/Observer.js",
"chars": 21681,
"preview": "/*!\n * Observer 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subjec"
},
{
"path": "src/Physics2DPlugin.js",
"chars": 4293,
"preview": "/*!\n * Physics2DPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n *"
},
{
"path": "src/PhysicsPropsPlugin.js",
"chars": 4113,
"preview": "/*!\n * PhysicsPropsPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved."
},
{
"path": "src/PixiPlugin.js",
"chars": 13745,
"preview": "/*!\n * PixiPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subj"
},
{
"path": "src/ScrambleTextPlugin.js",
"chars": 7182,
"preview": "/*!\n * ScrambleTextPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved."
},
{
"path": "src/ScrollSmoother.js",
"chars": 34904,
"preview": "/*!\n * ScrollSmoother 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * "
},
{
"path": "src/ScrollToPlugin.js",
"chars": 8113,
"preview": "/*!\n * ScrollToPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * "
},
{
"path": "src/ScrollTrigger.js",
"chars": 99836,
"preview": "/*!\n * ScrollTrigger 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * S"
},
{
"path": "src/SplitText.js",
"chars": 17308,
"preview": "/*!\n * SplitText 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2025, GreenSock. All rights reserved. Subject to th"
},
{
"path": "src/SplitText.ts",
"chars": 24911,
"preview": "/*!\n * SplitText 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subje"
},
{
"path": "src/TextPlugin.js",
"chars": 3936,
"preview": "/*!\n * TextPlugin 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subj"
},
{
"path": "src/all.js",
"chars": 1505,
"preview": "import gsap from \"./gsap-core.js\";\nimport CSSPlugin from \"./CSSPlugin.js\";\nconst gsapWithCSS = gsap.registerPlugin(CSSPl"
},
{
"path": "src/gsap-core.js",
"chars": 151371,
"preview": "/*!\n * GSAP 3.14.2\n * https://gsap.com\n *\n * @license Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to"
},
{
"path": "src/index.js",
"chars": 690,
"preview": "import { gsap, Power0, Power1, Power2, Power3, Power4, Linear, Quad, Cubic, Quart, Quint, Strong, Elastic, Back, Stepped"
},
{
"path": "src/utils/PathEditor.js",
"chars": 48399,
"preview": "/*!\n * PathEditor 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to th"
},
{
"path": "src/utils/VelocityTracker.js",
"chars": 5518,
"preview": "/*!\n * VelocityTracker: 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject"
},
{
"path": "src/utils/matrix.js",
"chars": 13713,
"preview": "/*!\n * matrix 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to the te"
},
{
"path": "src/utils/paths.js",
"chars": 49315,
"preview": "/*!\n * paths 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to the ter"
},
{
"path": "src/utils/strings.js",
"chars": 10263,
"preview": "/*!\n * strings: 3.14.2\n * https://gsap.com\n *\n * Copyright 2008-2025, GreenSock. All rights reserved.\n * Subject to the "
},
{
"path": "types/animation.d.ts",
"chars": 18223,
"preview": "declare namespace gsap.core {\n\n // Added to TypeScript 3.5\n type Omit<T, K extends keyof any> = Pick<T, Exclude<keyof "
},
{
"path": "types/css-plugin.d.ts",
"chars": 16896,
"preview": "declare namespace gsap {\n\n // GSAP specific\n interface CSSProperties {\n [key: string]: any;\n alpha: TweenValue;\n"
},
{
"path": "types/css-rule-plugin.d.ts",
"chars": 1983,
"preview": "declare namespace gsap {\n\n interface TweenVars {\n cssRule?: object; // TODO make more specific\n }\n}\n\ndeclare namesp"
},
{
"path": "types/custom-bounce.d.ts",
"chars": 948,
"preview": "interface CustomBounceVars {\n strength?: number;\n endAtStart?: boolean;\n squash?: number;\n squashID?: string"
},
{
"path": "types/custom-ease.d.ts",
"chars": 1377,
"preview": "interface CustomEaseConfig {\n precision?: number;\n height?: number;\n originY?: number;\n width?: number;\n x?: number"
},
{
"path": "types/custom-wiggle.d.ts",
"chars": 1003,
"preview": "interface CustomWiggleVars {\n type?: \"uniform\" | \"random\" | \"anticipate\" | \"easeOut\" | \"easeInOut\";\n wiggles?: number;"
},
{
"path": "types/draggable.d.ts",
"chars": 12410,
"preview": "declare class Draggable {\n\n static version: string;\n static zIndex: number;\n\n readonly autoScroll: number;\n readonly"
},
{
"path": "types/draw-svg-plugin.d.ts",
"chars": 2336,
"preview": "declare namespace gsap {\n\n type DrawSVGTarget = string | SVGPrimitive | SVGPathElement;\n\n interface TweenVars {\n dr"
},
{
"path": "types/ease.d.ts",
"chars": 4269,
"preview": "declare namespace gsap {\n\n interface EaseFunction {\n (progress: number): number;\n }\n \n interface Ease {\n easeI"
},
{
"path": "types/easel-plugin.d.ts",
"chars": 1461,
"preview": "declare namespace EaselPlugin {\n interface Vars {\n [key: string]: any;\n }\n}\n\ndeclare namespace gsap {\n\n interface "
},
{
"path": "types/flip.d.ts",
"chars": 14909,
"preview": "declare class Flip {\n\n static readonly version: string;\n\n /**\n * Gets the FlipBatch associated with the provided id "
},
{
"path": "types/gs-dev-tools.d.ts",
"chars": 2504,
"preview": "declare class GSDevTools {\n\n constructor(target: gsap.DOMTarget, vars?: GSDevTools.Vars);\n\n /**\n * Create a GSDevToo"
},
{
"path": "types/gsap-core.d.ts",
"chars": 20242,
"preview": "declare namespace gsap {\n\n type RegisterablePlugins = \n | Ease\n | EasePack\n | ExpoScaleEase\n | Plugin\n |"
},
{
"path": "types/gsap-plugins.d.ts",
"chars": 2678,
"preview": "declare namespace gsap {\n\n type PluginInit = (\n this: PluginScope,\n target: object,\n endValue: any,\n tween:"
},
{
"path": "types/gsap-utils.d.ts",
"chars": 17238,
"preview": "declare namespace gsap.utils {\n\n interface DistributeConfig {\n amount?: number;\n axis?: \"x\" | \"y\";\n base?: num"
},
{
"path": "types/index.d.ts",
"chars": 3820,
"preview": "// Type definitions for gsap 3\n// Project: https://gsap.com/\n// Definitions by: Jack Doyle <https://github.com/jackdoyle"
},
{
"path": "types/inertia-plugin.d.ts",
"chars": 2779,
"preview": "declare namespace gsap {\n\n type InertiaEndFunction<T> = (value: T) => T;\n\n interface InertiaDuration {\n min?: numbe"
},
{
"path": "types/morph-svg-plugin.d.ts",
"chars": 4551,
"preview": "declare namespace gsap {\n\n interface TweenVars {\n morphSVG?: SVGPathValue | gsap.plugins.MorphSVGVars;\n }\n}\n\ndeclar"
},
{
"path": "types/motion-path-helper.d.ts",
"chars": 3263,
"preview": "declare class MotionPathHelper {\n\n constructor(target: gsap.DOMTarget, vars?: MotionPathHelper.Vars);\n\n /**\n * Kills"
},
{
"path": "types/motion-path-plugin.d.ts",
"chars": 10329,
"preview": "declare namespace gsap {\n\n interface PathObject {\n [propName: string]: number | string;\n }\n\n interface TweenVars {"
},
{
"path": "types/observer.d.ts",
"chars": 5403,
"preview": "declare class Observer {\n static readonly isTouch: number;\n static readonly eventTypes: string[];\n static readonly ve"
},
{
"path": "types/physics-2d-plugin.d.ts",
"chars": 1834,
"preview": "declare namespace Physics2DPlugin {\n interface Vars {\n acceleration?: gsap.TweenValue;\n accelerationAngle?: gsap."
},
{
"path": "types/physics-props-plugin.d.ts",
"chars": 1860,
"preview": "declare namespace PhysicsPropsPlugin {\n interface Vars {\n [key: string]: Values;\n }\n\n interface Values {\n accel"
},
{
"path": "types/pixi-plugin.d.ts",
"chars": 3385,
"preview": "declare namespace PixiPlugin {\n interface PixiMatrix {\n a: number;\n b: number;\n c: number;\n d: number;\n "
},
{
"path": "types/scramble-text-plugin.d.ts",
"chars": 1924,
"preview": "declare namespace ScrambleTextPlugin {\n interface Vars {\n text: string;\n chars?: string;\n speed?: number;\n "
},
{
"path": "types/scroll-smoother.d.ts",
"chars": 11828,
"preview": "declare class ScrollSmoother {\n\n static readonly version: string;\n\n readonly scrollTrigger: ScrollTrigger;\n readonly "
},
{
"path": "types/scroll-to-plugin.d.ts",
"chars": 2792,
"preview": "declare class ScrollToPlugin {\n\n /**\n * Configure ScrollToPlugin\n *\n * ```js\n * ScrollToPlugin.config({\n * "
},
{
"path": "types/scroll-trigger.d.ts",
"chars": 27225,
"preview": "declare namespace gsap {\n\n interface AnimationVars {\n scrollTrigger?: gsap.DOMTarget | ScrollTrigger.Vars;\n }\n}\n\nde"
},
{
"path": "types/split-text.d.ts",
"chars": 3158,
"preview": "declare class SplitText {\n readonly chars: Element[];\n readonly lines: Element[];\n readonly words: Element[];\n reado"
},
{
"path": "types/text-plugin.d.ts",
"chars": 1613,
"preview": "declare namespace TextPlugin {\n interface Vars {\n value: string;\n type?: string;\n rtl?: boolean;\n speed?: n"
},
{
"path": "types/timeline.d.ts",
"chars": 17005,
"preview": "declare namespace gsap.core {\n\n type TimelineChild = string | Animation | Callback | Array<string | Animation | Callbac"
},
{
"path": "types/tween.d.ts",
"chars": 7717,
"preview": "declare namespace gsap.core {\n\n class Tween extends Animation {\n \n data: any;\n vars: TweenVars;\n ratio: num"
},
{
"path": "types/utils/velocity-tracker.d.ts",
"chars": 1785,
"preview": "declare namespace gsap {\n\n type VelocityType = \"num\" | \"deg\" | \"rad\";\n\n interface VelocityMap {\n [key: string]: num"
}
]
About this extraction
This page contains the full source code of the greensock/GSAP GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 130 files (3.7 MB), approximately 979.3k tokens, and a symbol index with 928 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.