@chouriodev/custom-agent-sales-chatbot
Version:
VentaBot24 - Asistente de ventas inteligente 24/7 para e-commerce. Reduce mensajes de WhatsApp y aumenta conversiones con IA especializada para PyMEs venezolanas.
1,176 lines • 762 kB
JavaScript
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
import require$$1, { useRef, useLayoutEffect, useEffect, memo, useState, useCallback } from "react";
import require$$2 from "react-dom";
var jsxRuntime = { exports: {} };
var reactJsxRuntime_production = {};
/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var hasRequiredReactJsxRuntime_production;
function requireReactJsxRuntime_production() {
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
hasRequiredReactJsxRuntime_production = 1;
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
function jsxProd(type, config4, maybeKey) {
var key = null;
void 0 !== maybeKey && (key = "" + maybeKey);
void 0 !== config4.key && (key = "" + config4.key);
if ("key" in config4) {
maybeKey = {};
for (var propName in config4)
"key" !== propName && (maybeKey[propName] = config4[propName]);
} else maybeKey = config4;
config4 = maybeKey.ref;
return {
$$typeof: REACT_ELEMENT_TYPE,
type,
key,
ref: void 0 !== config4 ? config4 : null,
props: maybeKey
};
}
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
reactJsxRuntime_production.jsx = jsxProd;
reactJsxRuntime_production.jsxs = jsxProd;
return reactJsxRuntime_production;
}
var hasRequiredJsxRuntime;
function requireJsxRuntime() {
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
hasRequiredJsxRuntime = 1;
{
jsxRuntime.exports = requireReactJsxRuntime_production();
}
return jsxRuntime.exports;
}
var jsxRuntimeExports = requireJsxRuntime();
function r(e) {
var t, f, n = "";
if ("string" == typeof e || "number" == typeof e) n += e;
else if ("object" == typeof e) if (Array.isArray(e)) {
var o = e.length;
for (t = 0; t < o; t++) e[t] && (f = r(e[t])) && (n && (n += " "), n += f);
} else for (f in e) e[f] && (n && (n += " "), n += f);
return n;
}
function clsx() {
for (var e, t, f = 0, n = "", o = arguments.length; f < o; f++) (e = arguments[f]) && (t = r(e)) && (n && (n += " "), n += t);
return n;
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
}
/*!
* GSAP 3.13.0
* 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 _config = {
autoSleep: 120,
force3D: "auto",
nullTargetWarn: 1,
units: {
lineHeight: ""
}
}, _defaults$1 = {
duration: 0.5,
overwrite: false,
delay: 0
}, _suppressOverwrites, _reverting$1, _context, _bigNum$1 = 1e8, _tinyNum = 1 / _bigNum$1, _2PI = Math.PI * 2, _HALF_PI = _2PI / 4, _gsID = 0, _sqrt = Math.sqrt, _cos = Math.cos, _sin = Math.sin, _isString = function _isString2(value) {
return typeof value === "string";
}, _isFunction = function _isFunction2(value) {
return typeof value === "function";
}, _isNumber = function _isNumber2(value) {
return typeof value === "number";
}, _isUndefined = function _isUndefined2(value) {
return typeof value === "undefined";
}, _isObject = function _isObject2(value) {
return typeof value === "object";
}, _isNotFalse = function _isNotFalse2(value) {
return value !== false;
}, _windowExists$1 = function _windowExists() {
return typeof window !== "undefined";
}, _isFuncOrString = function _isFuncOrString2(value) {
return _isFunction(value) || _isString(value);
}, _isTypedArray = typeof ArrayBuffer === "function" && ArrayBuffer.isView || function() {
}, _isArray = Array.isArray, _strictNumExp = /(?:-?\.?\d|\.)+/gi, _numExp = /[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g, _numWithUnitExp = /[-+=.]*\d+[.e-]*\d*[a-z%]*/g, _complexStringNumExp = /[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi, _relExp = /[+-]=-?[.\d]+/, _delimitedValueExp = /[^,'"\[\]\s]+/gi, _unitExp = /^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i, _globalTimeline, _win$1, _coreInitted, _doc$1, _globals = {}, _installScope = {}, _coreReady, _install = function _install2(scope) {
return (_installScope = _merge(scope, _globals)) && gsap;
}, _missingPlugin = function _missingPlugin2(property, value) {
return console.warn("Invalid property", property, "set to", value, "Missing plugin? gsap.registerPlugin()");
}, _warn = function _warn2(message, suppress) {
return !suppress && console.warn(message);
}, _addGlobal = function _addGlobal2(name, obj) {
return name && (_globals[name] = obj) && _installScope && (_installScope[name] = obj) || _globals;
}, _emptyFunc = function _emptyFunc2() {
return 0;
}, _startAtRevertConfig = {
suppressEvents: true,
isStart: true,
kill: false
}, _revertConfigNoKill = {
suppressEvents: true,
kill: false
}, _revertConfig = {
suppressEvents: true
}, _reservedProps = {}, _lazyTweens = [], _lazyLookup = {}, _lastRenderedFrame, _plugins = {}, _effects = {}, _nextGCFrame = 30, _harnessPlugins = [], _callbackNames = "", _harness = function _harness2(targets) {
var target = targets[0], harnessPlugin, i;
_isObject(target) || _isFunction(target) || (targets = [targets]);
if (!(harnessPlugin = (target._gsap || {}).harness)) {
i = _harnessPlugins.length;
while (i-- && !_harnessPlugins[i].targetTest(target)) {
}
harnessPlugin = _harnessPlugins[i];
}
i = targets.length;
while (i--) {
targets[i] && (targets[i]._gsap || (targets[i]._gsap = new GSCache(targets[i], harnessPlugin))) || targets.splice(i, 1);
}
return targets;
}, _getCache = function _getCache2(target) {
return target._gsap || _harness(toArray$1(target))[0]._gsap;
}, _getProperty = function _getProperty2(target, property, v) {
return (v = target[property]) && _isFunction(v) ? target[property]() : _isUndefined(v) && target.getAttribute && target.getAttribute(property) || v;
}, _forEachName = function _forEachName2(names, func) {
return (names = names.split(",")).forEach(func) || names;
}, _round = function _round2(value) {
return Math.round(value * 1e5) / 1e5 || 0;
}, _roundPrecise = function _roundPrecise2(value) {
return Math.round(value * 1e7) / 1e7 || 0;
}, _parseRelative = function _parseRelative2(start, value) {
var operator = value.charAt(0), end = parseFloat(value.substr(2));
start = parseFloat(start);
return operator === "+" ? start + end : operator === "-" ? start - end : operator === "*" ? start * end : start / end;
}, _arrayContainsAny = function _arrayContainsAny2(toSearch, toFind) {
var l = toFind.length, i = 0;
for (; toSearch.indexOf(toFind[i]) < 0 && ++i < l; ) {
}
return i < l;
}, _lazyRender = function _lazyRender2() {
var l = _lazyTweens.length, a = _lazyTweens.slice(0), i, tween;
_lazyLookup = {};
_lazyTweens.length = 0;
for (i = 0; i < l; i++) {
tween = a[i];
tween && tween._lazy && (tween.render(tween._lazy[0], tween._lazy[1], true)._lazy = 0);
}
}, _isRevertWorthy = function _isRevertWorthy2(animation) {
return !!(animation._initted || animation._startAt || animation.add);
}, _lazySafeRender = function _lazySafeRender2(animation, time, suppressEvents, force) {
_lazyTweens.length && !_reverting$1 && _lazyRender();
animation.render(time, suppressEvents, !!(_reverting$1 && time < 0 && _isRevertWorthy(animation)));
_lazyTweens.length && !_reverting$1 && _lazyRender();
}, _numericIfPossible = function _numericIfPossible2(value) {
var n = parseFloat(value);
return (n || n === 0) && (value + "").match(_delimitedValueExp).length < 2 ? n : _isString(value) ? value.trim() : value;
}, _passThrough = function _passThrough2(p) {
return p;
}, _setDefaults = function _setDefaults2(obj, defaults3) {
for (var p in defaults3) {
p in obj || (obj[p] = defaults3[p]);
}
return obj;
}, _setKeyframeDefaults = function _setKeyframeDefaults2(excludeDuration) {
return function(obj, defaults3) {
for (var p in defaults3) {
p in obj || p === "duration" && excludeDuration || p === "ease" || (obj[p] = defaults3[p]);
}
};
}, _merge = function _merge2(base, toMerge) {
for (var p in toMerge) {
base[p] = toMerge[p];
}
return base;
}, _mergeDeep = function _mergeDeep2(base, toMerge) {
for (var p in toMerge) {
p !== "__proto__" && p !== "constructor" && p !== "prototype" && (base[p] = _isObject(toMerge[p]) ? _mergeDeep2(base[p] || (base[p] = {}), toMerge[p]) : toMerge[p]);
}
return base;
}, _copyExcluding = function _copyExcluding2(obj, excluding) {
var copy = {}, p;
for (p in obj) {
p in excluding || (copy[p] = obj[p]);
}
return copy;
}, _inheritDefaults = function _inheritDefaults2(vars) {
var parent = vars.parent || _globalTimeline, func = vars.keyframes ? _setKeyframeDefaults(_isArray(vars.keyframes)) : _setDefaults;
if (_isNotFalse(vars.inherit)) {
while (parent) {
func(vars, parent.vars.defaults);
parent = parent.parent || parent._dp;
}
}
return vars;
}, _arraysMatch = function _arraysMatch2(a1, a2) {
var i = a1.length, match = i === a2.length;
while (match && i-- && a1[i] === a2[i]) {
}
return i < 0;
}, _addLinkedListItem = function _addLinkedListItem2(parent, child, firstProp, lastProp, sortBy) {
var prev = parent[lastProp], t;
if (sortBy) {
t = child[sortBy];
while (prev && prev[sortBy] > t) {
prev = prev._prev;
}
}
if (prev) {
child._next = prev._next;
prev._next = child;
} else {
child._next = parent[firstProp];
parent[firstProp] = child;
}
if (child._next) {
child._next._prev = child;
} else {
parent[lastProp] = child;
}
child._prev = prev;
child.parent = child._dp = parent;
return child;
}, _removeLinkedListItem = function _removeLinkedListItem2(parent, child, firstProp, lastProp) {
if (firstProp === void 0) {
firstProp = "_first";
}
if (lastProp === void 0) {
lastProp = "_last";
}
var prev = child._prev, next = child._next;
if (prev) {
prev._next = next;
} else if (parent[firstProp] === child) {
parent[firstProp] = next;
}
if (next) {
next._prev = prev;
} else if (parent[lastProp] === child) {
parent[lastProp] = prev;
}
child._next = child._prev = child.parent = null;
}, _removeFromParent = function _removeFromParent2(child, onlyIfParentHasAutoRemove) {
child.parent && (!onlyIfParentHasAutoRemove || child.parent.autoRemoveChildren) && child.parent.remove && child.parent.remove(child);
child._act = 0;
}, _uncache = function _uncache2(animation, child) {
if (animation && (!child || child._end > animation._dur || child._start < 0)) {
var a = animation;
while (a) {
a._dirty = 1;
a = a.parent;
}
}
return animation;
}, _recacheAncestors = function _recacheAncestors2(animation) {
var parent = animation.parent;
while (parent && parent.parent) {
parent._dirty = 1;
parent.totalDuration();
parent = parent.parent;
}
return animation;
}, _rewindStartAt = function _rewindStartAt2(tween, totalTime, suppressEvents, force) {
return tween._startAt && (_reverting$1 ? tween._startAt.revert(_revertConfigNoKill) : tween.vars.immediateRender && !tween.vars.autoRevert || tween._startAt.render(totalTime, true, force));
}, _hasNoPausedAncestors = function _hasNoPausedAncestors2(animation) {
return !animation || animation._ts && _hasNoPausedAncestors2(animation.parent);
}, _elapsedCycleDuration = function _elapsedCycleDuration2(animation) {
return animation._repeat ? _animationCycle(animation._tTime, animation = animation.duration() + animation._rDelay) * animation : 0;
}, _animationCycle = function _animationCycle2(tTime, cycleDuration) {
var whole = Math.floor(tTime = _roundPrecise(tTime / cycleDuration));
return tTime && whole === tTime ? whole - 1 : whole;
}, _parentToChildTotalTime = function _parentToChildTotalTime2(parentTime, child) {
return (parentTime - child._start) * child._ts + (child._ts >= 0 ? 0 : child._dirty ? child.totalDuration() : child._tDur);
}, _setEnd = function _setEnd2(animation) {
return animation._end = _roundPrecise(animation._start + (animation._tDur / Math.abs(animation._ts || animation._rts || _tinyNum) || 0));
}, _alignPlayhead = function _alignPlayhead2(animation, totalTime) {
var parent = animation._dp;
if (parent && parent.smoothChildTiming && animation._ts) {
animation._start = _roundPrecise(parent._time - (animation._ts > 0 ? totalTime / animation._ts : ((animation._dirty ? animation.totalDuration() : animation._tDur) - totalTime) / -animation._ts));
_setEnd(animation);
parent._dirty || _uncache(parent, animation);
}
return animation;
}, _postAddChecks = function _postAddChecks2(timeline2, child) {
var t;
if (child._time || !child._dur && child._initted || child._start < timeline2._time && (child._dur || !child.add)) {
t = _parentToChildTotalTime(timeline2.rawTime(), child);
if (!child._dur || _clamp(0, child.totalDuration(), t) - child._tTime > _tinyNum) {
child.render(t, true);
}
}
if (_uncache(timeline2, child)._dp && timeline2._initted && timeline2._time >= timeline2._dur && timeline2._ts) {
if (timeline2._dur < timeline2.duration()) {
t = timeline2;
while (t._dp) {
t.rawTime() >= 0 && t.totalTime(t._tTime);
t = t._dp;
}
}
timeline2._zTime = -_tinyNum;
}
}, _addToTimeline = function _addToTimeline2(timeline2, child, position, skipChecks) {
child.parent && _removeFromParent(child);
child._start = _roundPrecise((_isNumber(position) ? position : position || timeline2 !== _globalTimeline ? _parsePosition(timeline2, position, child) : timeline2._time) + child._delay);
child._end = _roundPrecise(child._start + (child.totalDuration() / Math.abs(child.timeScale()) || 0));
_addLinkedListItem(timeline2, child, "_first", "_last", timeline2._sort ? "_start" : 0);
_isFromOrFromStart(child) || (timeline2._recent = child);
skipChecks || _postAddChecks(timeline2, child);
timeline2._ts < 0 && _alignPlayhead(timeline2, timeline2._tTime);
return timeline2;
}, _scrollTrigger = function _scrollTrigger2(animation, trigger) {
return (_globals.ScrollTrigger || _missingPlugin("scrollTrigger", trigger)) && _globals.ScrollTrigger.create(trigger, animation);
}, _attemptInitTween = function _attemptInitTween2(tween, time, force, suppressEvents, tTime) {
_initTween(tween, time, tTime);
if (!tween._initted) {
return 1;
}
if (!force && tween._pt && !_reverting$1 && (tween._dur && tween.vars.lazy !== false || !tween._dur && tween.vars.lazy) && _lastRenderedFrame !== _ticker.frame) {
_lazyTweens.push(tween);
tween._lazy = [tTime, suppressEvents];
return 1;
}
}, _parentPlayheadIsBeforeStart = function _parentPlayheadIsBeforeStart2(_ref) {
var parent = _ref.parent;
return parent && parent._ts && parent._initted && !parent._lock && (parent.rawTime() < 0 || _parentPlayheadIsBeforeStart2(parent));
}, _isFromOrFromStart = function _isFromOrFromStart2(_ref2) {
var data = _ref2.data;
return data === "isFromStart" || data === "isStart";
}, _renderZeroDurationTween = function _renderZeroDurationTween2(tween, totalTime, suppressEvents, force) {
var prevRatio = tween.ratio, ratio = totalTime < 0 || !totalTime && (!tween._start && _parentPlayheadIsBeforeStart(tween) && !(!tween._initted && _isFromOrFromStart(tween)) || (tween._ts < 0 || tween._dp._ts < 0) && !_isFromOrFromStart(tween)) ? 0 : 1, repeatDelay = tween._rDelay, tTime = 0, pt, iteration, prevIteration;
if (repeatDelay && tween._repeat) {
tTime = _clamp(0, tween._tDur, totalTime);
iteration = _animationCycle(tTime, repeatDelay);
tween._yoyo && iteration & 1 && (ratio = 1 - ratio);
if (iteration !== _animationCycle(tween._tTime, repeatDelay)) {
prevRatio = 1 - ratio;
tween.vars.repeatRefresh && tween._initted && tween.invalidate();
}
}
if (ratio !== prevRatio || _reverting$1 || force || tween._zTime === _tinyNum || !totalTime && tween._zTime) {
if (!tween._initted && _attemptInitTween(tween, totalTime, force, suppressEvents, tTime)) {
return;
}
prevIteration = tween._zTime;
tween._zTime = totalTime || (suppressEvents ? _tinyNum : 0);
suppressEvents || (suppressEvents = totalTime && !prevIteration);
tween.ratio = ratio;
tween._from && (ratio = 1 - ratio);
tween._time = 0;
tween._tTime = tTime;
pt = tween._pt;
while (pt) {
pt.r(ratio, pt.d);
pt = pt._next;
}
totalTime < 0 && _rewindStartAt(tween, totalTime, suppressEvents, true);
tween._onUpdate && !suppressEvents && _callback(tween, "onUpdate");
tTime && tween._repeat && !suppressEvents && tween.parent && _callback(tween, "onRepeat");
if ((totalTime >= tween._tDur || totalTime < 0) && tween.ratio === ratio) {
ratio && _removeFromParent(tween, 1);
if (!suppressEvents && !_reverting$1) {
_callback(tween, ratio ? "onComplete" : "onReverseComplete", true);
tween._prom && tween._prom();
}
}
} else if (!tween._zTime) {
tween._zTime = totalTime;
}
}, _findNextPauseTween = function _findNextPauseTween2(animation, prevTime, time) {
var child;
if (time > prevTime) {
child = animation._first;
while (child && child._start <= time) {
if (child.data === "isPause" && child._start > prevTime) {
return child;
}
child = child._next;
}
} else {
child = animation._last;
while (child && child._start >= time) {
if (child.data === "isPause" && child._start < prevTime) {
return child;
}
child = child._prev;
}
}
}, _setDuration = function _setDuration2(animation, duration, skipUncache, leavePlayhead) {
var repeat = animation._repeat, dur = _roundPrecise(duration) || 0, totalProgress = animation._tTime / animation._tDur;
totalProgress && !leavePlayhead && (animation._time *= dur / animation._dur);
animation._dur = dur;
animation._tDur = !repeat ? dur : repeat < 0 ? 1e10 : _roundPrecise(dur * (repeat + 1) + animation._rDelay * repeat);
totalProgress > 0 && !leavePlayhead && _alignPlayhead(animation, animation._tTime = animation._tDur * totalProgress);
animation.parent && _setEnd(animation);
skipUncache || _uncache(animation.parent, animation);
return animation;
}, _onUpdateTotalDuration = function _onUpdateTotalDuration2(animation) {
return animation instanceof Timeline ? _uncache(animation) : _setDuration(animation, animation._dur);
}, _zeroPosition = {
_start: 0,
endTime: _emptyFunc,
totalDuration: _emptyFunc
}, _parsePosition = function _parsePosition2(animation, position, percentAnimation) {
var labels = animation.labels, recent = animation._recent || _zeroPosition, clippedDuration = animation.duration() >= _bigNum$1 ? recent.endTime(false) : animation._dur, i, offset, isPercent;
if (_isString(position) && (isNaN(position) || position in labels)) {
offset = position.charAt(0);
isPercent = position.substr(-1) === "%";
i = position.indexOf("=");
if (offset === "<" || offset === ">") {
i >= 0 && (position = position.replace(/=/, ""));
return (offset === "<" ? recent._start : recent.endTime(recent._repeat >= 0)) + (parseFloat(position.substr(1)) || 0) * (isPercent ? (i < 0 ? recent : percentAnimation).totalDuration() / 100 : 1);
}
if (i < 0) {
position in labels || (labels[position] = clippedDuration);
return labels[position];
}
offset = parseFloat(position.charAt(i - 1) + position.substr(i + 1));
if (isPercent && percentAnimation) {
offset = offset / 100 * (_isArray(percentAnimation) ? percentAnimation[0] : percentAnimation).totalDuration();
}
return i > 1 ? _parsePosition2(animation, position.substr(0, i - 1), percentAnimation) + offset : clippedDuration + offset;
}
return position == null ? clippedDuration : +position;
}, _createTweenType = function _createTweenType2(type, params, timeline2) {
var isLegacy = _isNumber(params[1]), varsIndex = (isLegacy ? 2 : 1) + (type < 2 ? 0 : 1), vars = params[varsIndex], irVars, parent;
isLegacy && (vars.duration = params[1]);
vars.parent = timeline2;
if (type) {
irVars = vars;
parent = timeline2;
while (parent && !("immediateRender" in irVars)) {
irVars = parent.vars.defaults || {};
parent = _isNotFalse(parent.vars.inherit) && parent.parent;
}
vars.immediateRender = _isNotFalse(irVars.immediateRender);
type < 2 ? vars.runBackwards = 1 : vars.startAt = params[varsIndex - 1];
}
return new Tween(params[0], vars, params[varsIndex + 1]);
}, _conditionalReturn = function _conditionalReturn2(value, func) {
return value || value === 0 ? func(value) : func;
}, _clamp = function _clamp2(min, max, value) {
return value < min ? min : value > max ? max : value;
}, getUnit = function getUnit2(value, v) {
return !_isString(value) || !(v = _unitExp.exec(value)) ? "" : v[1];
}, clamp = function clamp2(min, max, value) {
return _conditionalReturn(value, function(v) {
return _clamp(min, max, v);
});
}, _slice = [].slice, _isArrayLike = function _isArrayLike2(value, nonEmpty) {
return value && _isObject(value) && "length" in value && (!nonEmpty && !value.length || value.length - 1 in value && _isObject(value[0])) && !value.nodeType && value !== _win$1;
}, _flatten = function _flatten2(ar, leaveStrings, accumulator) {
if (accumulator === void 0) {
accumulator = [];
}
return ar.forEach(function(value) {
var _accumulator;
return _isString(value) && !leaveStrings || _isArrayLike(value, 1) ? (_accumulator = accumulator).push.apply(_accumulator, toArray$1(value)) : accumulator.push(value);
}) || accumulator;
}, toArray$1 = function toArray(value, scope, leaveStrings) {
return _context && !scope && _context.selector ? _context.selector(value) : _isString(value) && !leaveStrings && (_coreInitted || !_wake()) ? _slice.call((scope || _doc$1).querySelectorAll(value), 0) : _isArray(value) ? _flatten(value, leaveStrings) : _isArrayLike(value) ? _slice.call(value, 0) : value ? [value] : [];
}, selector = function selector2(value) {
value = toArray$1(value)[0] || _warn("Invalid scope") || {};
return function(v) {
var el = value.current || value.nativeElement || value;
return toArray$1(v, el.querySelectorAll ? el : el === value ? _warn("Invalid scope") || _doc$1.createElement("div") : value);
};
}, shuffle = function shuffle2(a) {
return a.sort(function() {
return 0.5 - Math.random();
});
}, distribute = function distribute2(v) {
if (_isFunction(v)) {
return v;
}
var vars = _isObject(v) ? v : {
each: v
}, ease = _parseEase(vars.ease), from = vars.from || 0, base = parseFloat(vars.base) || 0, cache2 = {}, isDecimal = from > 0 && from < 1, ratios = isNaN(from) || isDecimal, axis = vars.axis, ratioX = from, ratioY = from;
if (_isString(from)) {
ratioX = ratioY = {
center: 0.5,
edges: 0.5,
end: 1
}[from] || 0;
} else if (!isDecimal && ratios) {
ratioX = from[0];
ratioY = from[1];
}
return function(i, target, a) {
var l = (a || vars).length, distances = cache2[l], originX, originY, x, y, d, j, max, min, wrapAt;
if (!distances) {
wrapAt = vars.grid === "auto" ? 0 : (vars.grid || [1, _bigNum$1])[1];
if (!wrapAt) {
max = -_bigNum$1;
while (max < (max = a[wrapAt++].getBoundingClientRect().left) && wrapAt < l) {
}
wrapAt < l && wrapAt--;
}
distances = cache2[l] = [];
originX = ratios ? Math.min(wrapAt, l) * ratioX - 0.5 : from % wrapAt;
originY = wrapAt === _bigNum$1 ? 0 : ratios ? l * ratioY / wrapAt - 0.5 : from / wrapAt | 0;
max = 0;
min = _bigNum$1;
for (j = 0; j < l; j++) {
x = j % wrapAt - originX;
y = originY - (j / wrapAt | 0);
distances[j] = d = !axis ? _sqrt(x * x + y * y) : Math.abs(axis === "y" ? y : x);
d > max && (max = d);
d < min && (min = d);
}
from === "random" && shuffle(distances);
distances.max = max - min;
distances.min = min;
distances.v = l = (parseFloat(vars.amount) || parseFloat(vars.each) * (wrapAt > l ? l - 1 : !axis ? Math.max(wrapAt, l / wrapAt) : axis === "y" ? l / wrapAt : wrapAt) || 0) * (from === "edges" ? -1 : 1);
distances.b = l < 0 ? base - l : base;
distances.u = getUnit(vars.amount || vars.each) || 0;
ease = ease && l < 0 ? _invertEase(ease) : ease;
}
l = (distances[i] - distances.min) / distances.max || 0;
return _roundPrecise(distances.b + (ease ? ease(l) : l) * distances.v) + distances.u;
};
}, _roundModifier = function _roundModifier2(v) {
var p = Math.pow(10, ((v + "").split(".")[1] || "").length);
return function(raw) {
var n = _roundPrecise(Math.round(parseFloat(raw) / v) * v * p);
return (n - n % 1) / p + (_isNumber(raw) ? 0 : getUnit(raw));
};
}, snap = function snap2(snapTo, value) {
var isArray2 = _isArray(snapTo), radius, is2D;
if (!isArray2 && _isObject(snapTo)) {
radius = isArray2 = snapTo.radius || _bigNum$1;
if (snapTo.values) {
snapTo = toArray$1(snapTo.values);
if (is2D = !_isNumber(snapTo[0])) {
radius *= radius;
}
} else {
snapTo = _roundModifier(snapTo.increment);
}
}
return _conditionalReturn(value, !isArray2 ? _roundModifier(snapTo) : _isFunction(snapTo) ? function(raw) {
is2D = snapTo(raw);
return Math.abs(is2D - raw) <= radius ? is2D : raw;
} : function(raw) {
var x = parseFloat(is2D ? raw.x : raw), y = parseFloat(is2D ? raw.y : 0), min = _bigNum$1, closest = 0, i = snapTo.length, dx, dy;
while (i--) {
if (is2D) {
dx = snapTo[i].x - x;
dy = snapTo[i].y - y;
dx = dx * dx + dy * dy;
} else {
dx = Math.abs(snapTo[i] - x);
}
if (dx < min) {
min = dx;
closest = i;
}
}
closest = !radius || min <= radius ? snapTo[closest] : raw;
return is2D || closest === raw || _isNumber(raw) ? closest : closest + getUnit(raw);
});
}, random = function random2(min, max, roundingIncrement, returnFunction) {
return _conditionalReturn(_isArray(min) ? !max : roundingIncrement === true ? !!(roundingIncrement = 0) : !returnFunction, function() {
return _isArray(min) ? min[~~(Math.random() * min.length)] : (roundingIncrement = roundingIncrement || 1e-5) && (returnFunction = roundingIncrement < 1 ? Math.pow(10, (roundingIncrement + "").length - 2) : 1) && Math.floor(Math.round((min - roundingIncrement / 2 + Math.random() * (max - min + roundingIncrement * 0.99)) / roundingIncrement) * roundingIncrement * returnFunction) / returnFunction;
});
}, pipe = function pipe2() {
for (var _len = arguments.length, functions = new Array(_len), _key = 0; _key < _len; _key++) {
functions[_key] = arguments[_key];
}
return function(value) {
return functions.reduce(function(v, f) {
return f(v);
}, value);
};
}, unitize = function unitize2(func, unit) {
return function(value) {
return func(parseFloat(value)) + (unit || getUnit(value));
};
}, normalize = function normalize2(min, max, value) {
return mapRange(min, max, 0, 1, value);
}, _wrapArray = function _wrapArray2(a, wrapper, value) {
return _conditionalReturn(value, function(index) {
return a[~~wrapper(index)];
});
}, wrap = function wrap2(min, max, value) {
var range = max - min;
return _isArray(min) ? _wrapArray(min, wrap2(0, min.length), max) : _conditionalReturn(value, function(value2) {
return (range + (value2 - min) % range) % range + min;
});
}, wrapYoyo = function wrapYoyo2(min, max, value) {
var range = max - min, total = range * 2;
return _isArray(min) ? _wrapArray(min, wrapYoyo2(0, min.length - 1), max) : _conditionalReturn(value, function(value2) {
value2 = (total + (value2 - min) % total) % total || 0;
return min + (value2 > range ? total - value2 : value2);
});
}, _replaceRandom = function _replaceRandom2(value) {
var prev = 0, s = "", i, nums, end, isArray2;
while (~(i = value.indexOf("random(", prev))) {
end = value.indexOf(")", i);
isArray2 = value.charAt(i + 7) === "[";
nums = value.substr(i + 7, end - i - 7).match(isArray2 ? _delimitedValueExp : _strictNumExp);
s += value.substr(prev, i - prev) + random(isArray2 ? nums : +nums[0], isArray2 ? 0 : +nums[1], +nums[2] || 1e-5);
prev = end + 1;
}
return s + value.substr(prev, value.length - prev);
}, mapRange = function mapRange2(inMin, inMax, outMin, outMax, value) {
var inRange = inMax - inMin, outRange = outMax - outMin;
return _conditionalReturn(value, function(value2) {
return outMin + ((value2 - inMin) / inRange * outRange || 0);
});
}, interpolate = function interpolate2(start, end, progress, mutate) {
var func = isNaN(start + end) ? 0 : function(p2) {
return (1 - p2) * start + p2 * end;
};
if (!func) {
var isString2 = _isString(start), master = {}, p, i, interpolators, l, il;
progress === true && (mutate = 1) && (progress = null);
if (isString2) {
start = {
p: start
};
end = {
p: end
};
} else if (_isArray(start) && !_isArray(end)) {
interpolators = [];
l = start.length;
il = l - 2;
for (i = 1; i < l; i++) {
interpolators.push(interpolate2(start[i - 1], start[i]));
}
l--;
func = function func2(p2) {
p2 *= l;
var i2 = Math.min(il, ~~p2);
return interpolators[i2](p2 - i2);
};
progress = end;
} else if (!mutate) {
start = _merge(_isArray(start) ? [] : {}, start);
}
if (!interpolators) {
for (p in end) {
_addPropTween.call(master, start, p, "get", end[p]);
}
func = function func2(p2) {
return _renderPropTweens(p2, master) || (isString2 ? start.p : start);
};
}
}
return _conditionalReturn(progress, func);
}, _getLabelInDirection = function _getLabelInDirection2(timeline2, fromTime, backward) {
var labels = timeline2.labels, min = _bigNum$1, p, distance, label;
for (p in labels) {
distance = labels[p] - fromTime;
if (distance < 0 === !!backward && distance && min > (distance = Math.abs(distance))) {
label = p;
min = distance;
}
}
return label;
}, _callback = function _callback2(animation, type, executeLazyFirst) {
var v = animation.vars, callback = v[type], prevContext = _context, context3 = animation._ctx, params, scope, result;
if (!callback) {
return;
}
params = v[type + "Params"];
scope = v.callbackScope || animation;
executeLazyFirst && _lazyTweens.length && _lazyRender();
context3 && (_context = context3);
result = params ? callback.apply(scope, params) : callback.call(scope);
_context = prevContext;
return result;
}, _interrupt = function _interrupt2(animation) {
_removeFromParent(animation);
animation.scrollTrigger && animation.scrollTrigger.kill(!!_reverting$1);
animation.progress() < 1 && _callback(animation, "onInterrupt");
return animation;
}, _quickTween, _registerPluginQueue = [], _createPlugin = function _createPlugin2(config4) {
if (!config4) return;
config4 = !config4.name && config4["default"] || config4;
if (_windowExists$1() || config4.headless) {
var name = config4.name, isFunc = _isFunction(config4), Plugin = name && !isFunc && config4.init ? function() {
this._props = [];
} : config4, instanceDefaults = {
init: _emptyFunc,
render: _renderPropTweens,
add: _addPropTween,
kill: _killPropTweensOf,
modifier: _addPluginModifier,
rawVars: 0
}, statics = {
targetTest: 0,
get: 0,
getSetter: _getSetter,
aliases: {},
register: 0
};
_wake();
if (config4 !== Plugin) {
if (_plugins[name]) {
return;
}
_setDefaults(Plugin, _setDefaults(_copyExcluding(config4, instanceDefaults), statics));
_merge(Plugin.prototype, _merge(instanceDefaults, _copyExcluding(config4, statics)));
_plugins[Plugin.prop = name] = Plugin;
if (config4.targetTest) {
_harnessPlugins.push(Plugin);
_reservedProps[name] = 1;
}
name = (name === "css" ? "CSS" : name.charAt(0).toUpperCase() + name.substr(1)) + "Plugin";
}
_addGlobal(name, Plugin);
config4.register && config4.register(gsap, Plugin, PropTween);
} else {
_registerPluginQueue.push(config4);
}
}, _255 = 255, _colorLookup = {
aqua: [0, _255, _255],
lime: [0, _255, 0],
silver: [192, 192, 192],
black: [0, 0, 0],
maroon: [128, 0, 0],
teal: [0, 128, 128],
blue: [0, 0, _255],
navy: [0, 0, 128],
white: [_255, _255, _255],
olive: [128, 128, 0],
yellow: [_255, _255, 0],
orange: [_255, 165, 0],
gray: [128, 128, 128],
purple: [128, 0, 128],
green: [0, 128, 0],
red: [_255, 0, 0],
pink: [_255, 192, 203],
cyan: [0, _255, _255],
transparent: [_255, _255, _255, 0]
}, _hue = function _hue2(h, m1, m2) {
h += h < 0 ? 1 : h > 1 ? -1 : 0;
return (h * 6 < 1 ? m1 + (m2 - m1) * h * 6 : h < 0.5 ? m2 : h * 3 < 2 ? m1 + (m2 - m1) * (2 / 3 - h) * 6 : m1) * _255 + 0.5 | 0;
}, splitColor = function splitColor2(v, toHSL, forceAlpha) {
var a = !v ? _colorLookup.black : _isNumber(v) ? [v >> 16, v >> 8 & _255, v & _255] : 0, r2, g, b, h, s, l, max, min, d, wasHSL;
if (!a) {
if (v.substr(-1) === ",") {
v = v.substr(0, v.length - 1);
}
if (_colorLookup[v]) {
a = _colorLookup[v];
} else if (v.charAt(0) === "#") {
if (v.length < 6) {
r2 = v.charAt(1);
g = v.charAt(2);
b = v.charAt(3);
v = "#" + r2 + r2 + g + g + b + b + (v.length === 5 ? v.charAt(4) + v.charAt(4) : "");
}
if (v.length === 9) {
a = parseInt(v.substr(1, 6), 16);
return [a >> 16, a >> 8 & _255, a & _255, parseInt(v.substr(7), 16) / 255];
}
v = parseInt(v.substr(1), 16);
a = [v >> 16, v >> 8 & _255, v & _255];
} else if (v.substr(0, 3) === "hsl") {
a = wasHSL = v.match(_strictNumExp);
if (!toHSL) {
h = +a[0] % 360 / 360;
s = +a[1] / 100;
l = +a[2] / 100;
g = l <= 0.5 ? l * (s + 1) : l + s - l * s;
r2 = l * 2 - g;
a.length > 3 && (a[3] *= 1);
a[0] = _hue(h + 1 / 3, r2, g);
a[1] = _hue(h, r2, g);
a[2] = _hue(h - 1 / 3, r2, g);
} else if (~v.indexOf("=")) {
a = v.match(_numExp);
forceAlpha && a.length < 4 && (a[3] = 1);
return a;
}
} else {
a = v.match(_strictNumExp) || _colorLookup.transparent;
}
a = a.map(Number);
}
if (toHSL && !wasHSL) {
r2 = a[0] / _255;
g = a[1] / _255;
b = a[2] / _255;
max = Math.max(r2, g, b);
min = Math.min(r2, g, b);
l = (max + min) / 2;
if (max === min) {
h = s = 0;
} else {
d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
h = max === r2 ? (g - b) / d + (g < b ? 6 : 0) : max === g ? (b - r2) / d + 2 : (r2 - g) / d + 4;
h *= 60;
}
a[0] = ~~(h + 0.5);
a[1] = ~~(s * 100 + 0.5);
a[2] = ~~(l * 100 + 0.5);
}
forceAlpha && a.length < 4 && (a[3] = 1);
return a;
}, _colorOrderData = function _colorOrderData2(v) {
var values = [], c = [], i = -1;
v.split(_colorExp).forEach(function(v2) {
var a = v2.match(_numWithUnitExp) || [];
values.push.apply(values, a);
c.push(i += a.length + 1);
});
values.c = c;
return values;
}, _formatColors = function _formatColors2(s, toHSL, orderMatchData) {
var result = "", colors = (s + result).match(_colorExp), type = toHSL ? "hsla(" : "rgba(", i = 0, c, shell, d, l;
if (!colors) {
return s;
}
colors = colors.map(function(color) {
return (color = splitColor(color, toHSL, 1)) && type + (toHSL ? color[0] + "," + color[1] + "%," + color[2] + "%," + color[3] : color.join(",")) + ")";
});
if (orderMatchData) {
d = _colorOrderData(s);
c = orderMatchData.c;
if (c.join(result) !== d.c.join(result)) {
shell = s.replace(_colorExp, "1").split(_numWithUnitExp);
l = shell.length - 1;
for (; i < l; i++) {
result += shell[i] + (~c.indexOf(i) ? colors.shift() || type + "0,0,0,0)" : (d.length ? d : colors.length ? colors : orderMatchData).shift());
}
}
}
if (!shell) {
shell = s.split(_colorExp);
l = shell.length - 1;
for (; i < l; i++) {
result += shell[i] + colors[i];
}
}
return result + shell[l];
}, _colorExp = function() {
var s = "(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b", p;
for (p in _colorLookup) {
s += "|" + p + "\\b";
}
return new RegExp(s + ")", "gi");
}(), _hslExp = /hsl[a]?\(/, _colorStringFilter = function _colorStringFilter2(a) {
var combined = a.join(" "), toHSL;
_colorExp.lastIndex = 0;
if (_colorExp.test(combined)) {
toHSL = _hslExp.test(combined);
a[1] = _formatColors(a[1], toHSL);
a[0] = _formatColors(a[0], toHSL, _colorOrderData(a[1]));
return true;
}
}, _tickerActive, _ticker = function() {
var _getTime = Date.now, _lagThreshold = 500, _adjustedLag = 33, _startTime = _getTime(), _lastUpdate = _startTime, _gap = 1e3 / 240, _nextTime = _gap, _listeners2 = [], _id, _req, _raf, _self, _delta, _i, _tick = function _tick2(v) {
var elapsed = _getTime() - _lastUpdate, manual = v === true, overlap, dispatch, time, frame;
(elapsed > _lagThreshold || elapsed < 0) && (_startTime += elapsed - _adjustedLag);
_lastUpdate += elapsed;
time = _lastUpdate - _startTime;
overlap = time - _nextTime;
if (overlap > 0 || manual) {
frame = ++_self.frame;
_delta = time - _self.time * 1e3;
_self.time = time = time / 1e3;
_nextTime += overlap + (overlap >= _gap ? 4 : _gap - overlap);
dispatch = 1;
}
manual || (_id = _req(_tick2));
if (dispatch) {
for (_i = 0; _i < _listeners2.length; _i++) {
_listeners2[_i](time, _delta, frame, v);
}
}
};
_self = {
time: 0,
frame: 0,
tick: function tick() {
_tick(true);
},
deltaRatio: function deltaRatio(fps) {
return _delta / (1e3 / (fps || 60));
},
wake: function wake() {
if (_coreReady) {
if (!_coreInitted && _windowExists$1()) {
_win$1 = _coreInitted = window;
_doc$1 = _win$1.document || {};
_globals.gsap = gsap;
(_win$1.gsapVersions || (_win$1.gsapVersions = [])).push(gsap.version);
_install(_installScope || _win$1.GreenSockGlobals || !_win$1.gsap && _win$1 || {});
_registerPluginQueue.forEach(_createPlugin);
}
_raf = typeof requestAnimationFrame !== "undefined" && requestAnimationFrame;
_id && _self.sleep();
_req = _raf || function(f) {
return setTimeout(f, _nextTime - _self.time * 1e3 + 1 | 0);
};
_tickerActive = 1;
_tick(2);
}
},
sleep: function sleep() {
(_raf ? cancelAnimationFrame : clearTimeout)(_id);
_tickerActive = 0;
_req = _emptyFunc;
},
lagSmoothing: function lagSmoothing(threshold, adjustedLag) {
_lagThreshold = threshold || Infinity;
_adjustedLag = Math.min(adjustedLag || 33, _lagThreshold);
},
fps: function fps(_fps) {
_gap = 1e3 / (_fps || 240);
_nextTime = _self.time * 1e3 + _gap;
},
add: function add(callback, once, prioritize) {
var func = once ? function(t, d, f, v) {
callback(t, d, f, v);
_self.remove(func);
} : callback;
_self.remove(callback);
_listeners2[prioritize ? "unshift" : "push"](func);
_wake();
return func;
},
remove: function remove2(callback, i) {
~(i = _listeners2.indexOf(callback)) && _listeners2.splice(i, 1) && _i >= i && _i--;
},
_listeners: _listeners2
};
return _self;
}(), _wake = function _wake2() {
return !_tickerActive && _ticker.wake();
}, _easeMap = {}, _customEaseExp = /^[\d.\-M][\d.\-,\s]/, _quotesExp = /["']/g, _parseObjectInString = function _parseObjectInString2(value) {
var obj = {}, split2 = value.substr(1, value.length - 3).split(":"), key = split2[0], i = 1, l = split2.length, index, val, parsedVal;
for (; i < l; i++) {
val = split2[i];
index = i !== l - 1 ? val.lastIndexOf(",") : val.length;
parsedVal = val.substr(0, index);
obj[key] = isNaN(parsedVal) ? parsedVal.replace(_quotesExp, "").trim() : +parsedVal;
key = val.substr(index + 1).trim();
}
return obj;
}, _valueInParentheses = function _valueInParentheses2(value) {
var open = value.indexOf("(") + 1, close = value.indexOf(")"), nested = value.indexOf("(", open);
return value.substring(open, ~nested && nested < close ? value.indexOf(")", close + 1) : close);
}, _configEaseFromString = function _configEaseFromString2(name) {
var split2 = (name + "").split("("), ease = _easeMap[split2[0]];
return ease && split2.length > 1 && ease.config ? ease.config.apply(null, ~name.indexOf("{") ? [_parseObjectInString(split2[1])] : _valueInParentheses(name).split(",").map(_numericIfPossible)) : _easeMap._CE && _customEaseExp.test(name) ? _easeMap._CE("", name) : ease;
}, _invertEase = function _invertEase2(ease) {
return function(p) {
return 1 - ease(1 - p);
};
}, _propagateYoyoEase = function _propagateYoyoEase2(timeline2, isYoyo) {
var child = timeline2._first, ease;
while (child) {
if (child instanceof Timeline) {
_propagateYoyoEase2(child, isYoyo);
} else if (child.vars.yoyoEase && (!child._yoyo || !child._repeat) && child._yoyo !== isYoyo) {
if (child.timeline) {
_propagateYoyoEase2(child.timeline, isYoyo);
} else {
ease = child._ease;
child._ease = child._yEase;
child._yEase = ease;
child._yoyo = isYoyo;
}
}
child = child._next;
}
}, _parseEase = function _parseEase2(ease, defaultEase) {
return !ease ? defaultEase : (_isFunction(ease) ? ease : _easeMap[ease] || _configEaseFromString(ease)) || defaultEase;
}, _insertEase = function _insertEase2(names, easeIn, easeOut, easeInOut) {
if (easeOut === void 0) {
easeOut = function easeOut2(p) {
return 1 - easeIn(1 - p);
};
}
if (easeInOut === void 0) {
easeInOut = function easeInOut2(p) {
return p < 0.5 ? easeIn(p * 2) / 2 : 1 - easeIn((1 - p) * 2) / 2;
};
}
var ease = {
easeIn,
easeOut,
easeInOut
}, lowercaseName;
_forEachName(names, function(name) {
_easeMap[name] = _globals[name] = ease;
_easeMap[lowercaseName = name.toLowerCase()] = easeOut;
for (var p in ease) {
_easeMap[lowercaseName + (p === "easeIn" ? ".in" : p === "easeOut" ? ".out" : ".inOut")] = _easeMap[name + "." + p] = ease[p];
}
});
return ease;
}, _easeInOutFromOut = function _easeInOutFromOut2(easeOut) {
return function(p) {
return p < 0.5 ? (1 - easeOut(1 - p * 2)) / 2 : 0.5 + easeOut((p - 0.5) * 2) / 2;
};
}, _configElastic = function _configElastic2(type, amplitude, period) {
var p1 = amplitude >= 1 ? amplitude : 1, p2 = (period || (type ? 0.3 : 0.45)) / (amplitude < 1 ? amplitude : 1), p3 = p2 / _2PI * (Math.asin(1 / p1) || 0), easeOut = function easeOut2(p) {
return p === 1 ? 1 : p1 * Math.pow(2, -10 * p) * _sin((p - p3) * p2) + 1;
}, ease = type === "out" ? easeOut : type === "in" ? function(p) {
return 1 - easeOut(1 - p);
} : _easeInOutFromOut(easeOut);
p2 = _2PI / p2;
ease.config = function(amplitude2, period2) {
return _configElastic2(type, amplitude2, period2);
};
return ease;
}, _configBack = function _configBack2(type, overshoot) {
if (overshoot === void 0) {
overshoot = 1.70158;
}
var easeOut = function easeOut2(p) {
return p ? --p * p * ((overshoot + 1) * p + overshoot) + 1 : 0;
}, ease = type === "out" ? easeOut : type === "in" ? function(p) {
return 1 - easeOut(1 - p);
} : _easeInOutFromOut(easeOut);
ease.config = function(overshoot2) {
return _configBack2(type, overshoot2);
};
return ease;
};
_forEachName("Linear,Quad,Cubic,Quart,Quint,Strong", function(name, i) {
var power = i < 5 ? i + 1 : i;
_insertEase(name + ",Power" + (power - 1), i ? function(p) {
return Math.pow(p, power);
} : function(p) {
return p;
}, function(p) {
return 1 - Math.pow(1 - p, power);
}, function(p) {
return p < 0.5 ? Math.pow(p * 2, power) / 2 : 1 - Math.pow((1 - p) * 2, power) / 2;
});
});
_easeMap.Linear.easeNone = _easeMap.none = _easeMap.Linear.easeIn;
_insertEase("Elastic", _configElastic("in"), _configElastic("out"), _configElastic());
(function(n, c) {
var n1 = 1 / c, n2 = 2 * n1, n3 = 2.5 * n1, easeOut = function easeOut2(p) {
return p < n1 ? n * p * p : p < n2 ? n * Math.pow(p - 1.5 / c, 2) + 0.75 : p < n3 ? n * (p -= 2.25 / c) * p + 0.9375 : n * Math.pow(p - 2.625 / c, 2) + 0.984375;
};
_insertEase("Bounce", function(p) {
return 1 - easeOut(1 - p);
}, easeOut);
})(7.5625, 2.75);
_insertEase("Expo", function(p) {
return Math.pow(2, 10 * (p - 1)) * p + p * p * p * p * p * p * (1 - p);
});
_insertEase("Circ", function(p) {
return -(_sqrt(1 - p * p) - 1);
});
_insertEase("Sine", function(p) {
return p === 1 ? 1 : -_cos(p * _HALF_PI) + 1;
});
_insertEase("Back", _configBack("in"), _configBack("out"), _configBack());
_easeMap.SteppedEase = _easeMap.steps = _globals.SteppedEase = {
config: function config(steps, immediateStart) {
if (steps === void 0) {
steps = 1;
}
var p1 = 1 / steps, p2 = steps + (immediateStart ? 0 : 1), p3 = immediateStart ? 1 : 0, max = 1 - _tinyNum;
return function(p) {
return ((p2 * _clamp(0, max, p) | 0) + p3) * p1;
};
}
};
_defaults$1.ease = _easeMap["quad.out"];
_forEachName("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt", function(name) {
return _callbackNames += name + "," + name + "Params,";
});
var GSCache = function GSCache2(target, harness) {
this.id = _gsID++;
target._gsap = this;
this.target = target;
this.harness = harness;
this.get = harness ? harness.get : _getProperty;
this.set = harness ? harness.getSetter : _getSetter;
};
var Animation = /* @__PURE__ */ function() {
function Animation2(vars) {
this.vars = vars;
this._delay = +vars.delay || 0;
if (this._repeat = vars.repeat === Infinity ? -2 : vars.repeat || 0) {
this._rDelay = vars.repeatDelay || 0;
this._yoyo = !!vars.yoyo || !!vars.yoyoEase;
}
this._ts = 1;
_setDuration(this, +vars.duration, 1, 1);
this.data = vars.data;
if (_context) {
this._ctx = _context;
_context.data.push(this);
}
_tickerActive || _ticker.wake();
}
var _proto = Animation2.prototype;
_proto.delay = function delay(value) {
if (value || value === 0) {
this.parent && this.parent.smoothChildTiming && this.startTime(this._start + value - this._delay);
this._delay = value;
return this;
}
return this._delay;
};
_proto.duration = function duration(value) {
return arguments.length ? this.totalDuration(this._repeat > 0 ? value + (value + this._rDelay) * this._repeat : value) : this.totalDuration() && this._dur;
};
_proto.totalDuration = function totalDuration(value) {
if (!arguments.length) {
return this._tDur;
}
this._dirty = 0;
return _setDuration(this, this._repeat < 0 ? value : (value - this._repeat * this._rDelay) / (this._repeat + 1));
};
_proto.totalTime = function totalTime(_totalTime, suppressEvents) {
_wake();
if (!arguments.length) {
return this._tTime;
}
var parent = this._dp;
if (parent && parent.smoothChildTiming && this._ts) {
_alignPlayhead(this, _totalTime);
!parent._dp || parent.parent || _postAddChecks(parent, this);
while (parent && parent.parent) {
if (parent.parent._time !== parent._start + (parent._ts >= 0 ? parent._tTime / parent._ts : (parent.totalDuration() - parent._tTime) / -parent._ts)) {
parent.totalTime(parent._tTime, true);
}
parent = parent.parent;
}
if (!this.parent && this._dp.autoRemoveChildren && (this._ts > 0 && _totalTime < this._tDur || this._ts < 0 && _totalTime > 0 || !this._tDur && !_totalTime)) {
_addToTimeline(this._dp, this, this._start - this._delay);
}
}
if (this._tTime !== _totalTime || !this._dur && !suppressEvents || this._initted && Math.abs(this._zTime) === _tinyNum || !_totalTime && !this._initted && (this.add || this._ptLookup)) {
this._ts || (this._pTime = _totalTime);
_lazySafeRender(this, _totalTime, suppressEvents);
}
return this;
};
_proto.time = function time(value, suppressEvents) {
return arguments.length ? this.totalTime(Math.min(this.totalDuration(), value + _elapsedCycleDuration(this)) % (this._dur + this._rDelay) || (value ? this._dur : 0), suppressEvents) : this._time;
};
_proto.totalProgress = function totalProgress(value, suppressEvents) {
return arguments.length ? this.totalTime(this.totalDuration() * value, suppressEvents) : this.totalDuration() ? Math.min(1, this._tTime / this._tDur) : this.rawTime() >= 0 && this._initted ? 1 : 0;
};
_proto.progress = function progress(value, suppressEvents) {
return arguments.length ? th