-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
velocity.es5.js.map
1 lines (1 loc) · 276 KB
/
velocity.es5.js.map
1
{"version":3,"file":"velocity.es5.js","sources":["src/types.ts","src/utility.ts","src/Velocity/actions/actions.ts","src/constants.ts","src/Velocity/easing/easings.ts","src/Velocity/easing/bezier.ts","src/Velocity/easing/spring_rk4.ts","src/Velocity/easing/step.ts","src/Velocity/options.ts","src/Velocity/defaults.ts","src/Velocity/normalizations/normalizationsObject.ts","src/Velocity/data.ts","src/Velocity/state.ts","src/Velocity/queue.ts","src/Velocity/sequencesObject.ts","src/Velocity/complete.ts","src/Velocity/normalizations/normalizations.ts","src/Velocity/css/setPropertyValue.ts","src/Velocity/css/removeNestedCalc.ts","src/Velocity/camelCase.ts","src/Velocity/css/fixColors.ts","src/Velocity/css/augmentDimension.ts","src/Velocity/css/getPropertyValue.ts","src/Velocity/tweens.ts","src/Velocity/tick.ts","src/Velocity/actions/finish.ts","src/Velocity/actions/option.ts","src/Velocity/actions/pauseResume.ts","src/Velocity/actions/property.ts","src/Velocity/actions/reverse.ts","src/Velocity/actions/stop.ts","src/Velocity/actions/style.ts","src/Velocity/actions/tween.ts","src/Velocity/css/colors.ts","src/Velocity/easing/back.ts","src/Velocity/easing/bounce.ts","src/Velocity/easing/elastic.ts","src/Velocity/easing/string.ts","src/Velocity/normalizations/dimensions.ts","src/Velocity/normalizations/display.ts","src/Velocity/normalizations/scroll.ts","src/Velocity/normalizations/style.ts","src/Velocity/normalizations/svg/attributes.ts","src/Velocity/normalizations/svg/dimensions.ts","src/Velocity/normalizations/tween.ts","version.ts","src/velocity.ts","src/Velocity/sequences.ts","src/velocityFn.ts","src/Velocity/patch.ts","src/velocity.ts"],"sourcesContent":["/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Runtime type checking methods.\n */\n\n// Typedefs\nimport {HTMLorSVGElement, VelocityResult} from \"./../velocity.d\";\n\n/**\n * Check if a variable is a boolean.\n */\nexport function isBoolean(variable: any): variable is boolean {\n\treturn variable === true || variable === false;\n}\n\n/**\n * Check if a variable is an empty object.\n */\nexport function isEmptyObject(variable: {}): variable is {} {\n\tfor (const name in variable) {\n\t\tif (variable.hasOwnProperty(name)) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\treturn true;\n}\n\n/**\n * Check if a variable is a function.\n */\nexport function isFunction(variable: any): variable is Function { // tslint:disable-line:ban-types\n\treturn Object.prototype.toString.call(variable) === \"[object Function]\";\n}\n\n/**\n * Check if a variable is an HTMLElement or SVGElement.\n */\nexport function isNode(variable: any): variable is HTMLorSVGElement {\n\treturn !!(variable && (variable as Element).nodeType);\n}\n\n/**\n * Check if a variable is a number.\n */\nexport function isNumber(variable: any): variable is number {\n\treturn typeof variable === \"number\";\n}\n\n/**\n * Faster way to parse a string/number as a number https://jsperf.com/number-vs-parseint-vs-plus/3\n */\nexport function isNumberWhenParsed(variable: any): variable is number {\n\treturn !isNaN(Number(variable));\n}\n\n/**\n * Check if a variable is a plain object (and not an instance).\n */\nexport function isPlainObject(variable: any): variable is {} {\n\tif (!variable || typeof variable !== \"object\" || (variable as Element).nodeType || Object.prototype.toString.call(variable) !== \"[object Object]\") {\n\t\treturn false;\n\t}\n\tconst proto = Object.getPrototypeOf(variable) as object;\n\n\treturn !proto || (proto.hasOwnProperty(\"constructor\") && proto.constructor === Object);\n}\n\n/**\n * Check if a variable is an SVGElement.\n */\nexport function isSVG(variable: any): variable is SVGElement {\n\treturn SVGElement && variable instanceof SVGElement;\n}\n\n/**\n * Check if a variable is a string.\n */\nexport function isString(variable: any): variable is string {\n\treturn typeof variable === \"string\";\n}\n\n/**\n * Check if a variable is the result of calling Velocity.\n */\nexport function isVelocityResult(variable: any): variable is VelocityResult {\n\treturn variable && isNumber((variable as VelocityResult).length) && isFunction((variable as VelocityResult).velocity);\n}\n\n/**\n * Check if a variable is an array-like wrapped jQuery, Zepto or similar, where\n * each indexed value is a Node.\n */\n\nexport function isWrapped(variable: any): variable is HTMLorSVGElement[] {\n\treturn variable\n\t\t&& variable !== window\n\t\t&& isNumber((variable as HTMLorSVGElement[]).length)\n\t\t&& !isString(variable)\n\t\t&& !isFunction(variable)\n\t\t&& !isNode(variable)\n\t\t&& ((variable as HTMLorSVGElement[]).length === 0 || isNode(variable[0]));\n}\n\n/**\n * Check is a property is an enumerable member of an object.\n */\nexport function propertyIsEnumerable(obj: object, property: string): boolean {\n\treturn Object.prototype.propertyIsEnumerable.call(obj, property);\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {HTMLorSVGElement} from \"./../velocity.d\";\n\n// Project\nimport {isNode} from \"./types\";\n\n/**\n * Add a single className to an Element.\n */\nexport function addClass(element: HTMLorSVGElement, className: string): void {\n\tif (element instanceof Element) {\n\t\tif (element.classList) {\n\t\t\telement.classList.add(className);\n\t\t} else {\n\t\t\tremoveClass(element, className);\n\t\t\t(element as any).className += (element.className.length ? \" \" : \"\") + className;\n\t\t}\n\t}\n}\n\n/**\n * Clone an array, works for array-like too.\n */\nexport function cloneArray<T = any>(arrayLike: T[] | ArrayLike<T>): T[] {\n\treturn Array.prototype.slice.call(arrayLike, 0);\n}\n\n/**\n * The <strong><code>defineProperty()</code></strong> function provides a\n * shortcut to defining a property that cannot be accidentally iterated across.\n */\nexport function defineProperty(proto: any, name: string, value: any, readonly?: boolean) {\n\tif (proto) {\n\t\tObject.defineProperty(proto, name, {\n\t\t\tconfigurable: !readonly,\n\t\t\twritable: !readonly,\n\t\t\tvalue,\n\t\t});\n\t}\n}\n\n/**\n * When there are multiple locations for a value pass them all in, then get the\n * first value that is valid.\n */\nexport function getValue<T>(...args: T[]): T {\n\tfor (const arg of args) {\n\t\tif (arg !== undefined && arg === arg) {\n\t\t\treturn arg;\n\t\t}\n\t}\n}\n\n/**\n * Shim to get the current milliseconds - on anything except old IE it'll use\n * Date.now() and save creating an object. If that doesn't exist then it'll\n * create one that gets GC.\n */\nexport const now = Date.now ? Date.now : () => {\n\treturn (new Date()).getTime();\n};\n\n/**\n * Remove a single className from an Element.\n */\nexport function removeClass(element: HTMLorSVGElement, className: string): void {\n\tif (element instanceof Element) {\n\t\tif (element.classList) {\n\t\t\telement.classList.remove(className);\n\t\t} else {\n\t\t\t// TODO: Need some jsperf tests on performance - can we get rid of the regex and maybe use split / array manipulation?\n\t\t\t(element as any).className = element.className.replace(new RegExp(`(^|\\\\s)${className}(\\\\s|$)`, \"gi\"), \" \");\n\t\t}\n\t}\n}\n\n/**\n * Convert an element or array-like element list into an array if needed.\n */\nexport function sanitizeElements(elements: HTMLorSVGElement | HTMLorSVGElement[]): HTMLorSVGElement[] {\n\treturn isNode(elements)\n\t\t? [elements] as HTMLorSVGElement[]\n\t\t: elements as HTMLorSVGElement[];\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Actions that can be performed by passing a string instead of a propertiesMap.\n */\n\n// Typedefs\nimport {VelocityActionFn} from \"../../../velocity.d\";\n\n// Project\nimport {isFunction, isString, propertyIsEnumerable} from \"../../types\";\nimport {defineProperty} from \"../../utility\";\n\n// Constants\nexport const Actions: {[name: string]: VelocityActionFn} = {};\n\n/**\n * Used to register an action. This should never be called by users\n * directly, instead it should be called via an action:<br/>\n * <code>Velocity(\"registerAction\", \"name\", VelocityActionFn);</code>\n */\nexport function registerAction(args?: [string, VelocityActionFn], internal?: boolean) {\n\tconst name: string = args[0],\n\t\tcallback = args[1];\n\n\tif (!isString(name)) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'registerAction' name to an invalid value:`, name);\n\t} else if (!isFunction(callback)) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'registerAction' callback to an invalid value:`, name, callback);\n\t} else if (Actions[name] && !propertyIsEnumerable(Actions, name)) {\n\t\tconsole.warn(`VelocityJS: Trying to override internal 'registerAction' callback`, name);\n\t} else if (internal === true) {\n\t\tdefineProperty(Actions, name, callback);\n\t} else {\n\t\tActions[name] = callback;\n\t}\n}\n\nregisterAction([\"registerAction\", registerAction as any], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Constants and defaults. These values should never change without a MINOR\n * version bump.\n */\n\n/**\n * Without this it will only un-prefix properties that have a valid \"normal\"\n * version.\n */\nexport const ALL_VENDOR_PREFIXES = true;\n\nexport const DURATION_FAST = 200;\nexport const DURATION_NORMAL = 400;\nexport const DURATION_SLOW = 600;\n\nexport const FUZZY_MS_PER_SECOND = 980;\n\nexport const DEFAULT_CACHE = true;\nexport const DEFAULT_DELAY = 0;\nexport const DEFAULT_DURATION = DURATION_NORMAL;\nexport const DEFAULT_EASING = \"swing\";\nexport const DEFAULT_FPSLIMIT = 60;\nexport const DEFAULT_LOOP = 0;\nexport const DEFAULT_PROMISE = true;\nexport const DEFAULT_PROMISE_REJECT_EMPTY = true;\nexport const DEFAULT_QUEUE = \"\";\nexport const DEFAULT_REPEAT = 0;\nexport const DEFAULT_SPEED = 1;\nexport const DEFAULT_SYNC = true;\n\nexport const CLASSNAME = \"velocity-animating\";\n\nexport const Duration = {\n\tfast: DURATION_FAST,\n\tnormal: DURATION_NORMAL,\n\tslow: DURATION_SLOW,\n};\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {VelocityEasingFn} from \"../../../velocity.d\";\n\n// Project\nimport {isFunction, isString} from \"../../types\";\nimport {registerAction} from \"../actions/actions\";\n\n// Constants\nexport const Easings: {[name: string]: VelocityEasingFn} = {};\n\n/**\n * Used to register a easing. This should never be called by users\n * directly, instead it should be called via an action:<br/>\n * <code>Velocity(\"registerEasing\", \"name\", VelocityEasingFn);</code>\n */\nexport function registerEasing(args?: [string, VelocityEasingFn]) {\n\tconst name: string = args[0],\n\t\tcallback = args[1];\n\n\tif (!isString(name)) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'registerEasing' name to an invalid value:`, name);\n\t} else if (!isFunction(callback)) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'registerEasing' callback to an invalid value:`, name, callback);\n\t} else if (Easings[name]) {\n\t\tconsole.warn(`VelocityJS: Trying to override 'registerEasing' callback`, name);\n\t} else {\n\t\tEasings[name] = callback;\n\t}\n}\n\nregisterAction([\"registerEasing\", registerEasing], true);\n\n/**\n * Linear easing, used for sequence parts that don't have an actual easing\n * function.\n */\nexport function linearEasing(percentComplete, startValue, endValue, property) {\n\treturn startValue + percentComplete * (endValue - startValue);\n}\n\n/**\n * Swing is the default for jQuery and Velocity.\n */\nexport function swingEasing(percentComplete, startValue, endValue) {\n\treturn startValue + (0.5 - Math.cos(percentComplete * Math.PI) / 2) * (endValue - startValue);\n}\n\n/**\n * A less exaggerated version of easeInOutElastic.\n */\nexport function springEasing(percentComplete, startValue, endValue) {\n\treturn startValue + (1 - (Math.cos(percentComplete * 4.5 * Math.PI) * Math.exp(-percentComplete * 6))) * (endValue - startValue);\n}\n\nregisterEasing([\"linear\", linearEasing]);\nregisterEasing([\"swing\", swingEasing]);\nregisterEasing([\"spring\", springEasing]);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License\n */\n\n// Typedefs\nimport { VelocityEasingFn } from \"../../../velocity.d\";\n\n// Project\nimport { registerEasing } from \"./easings\";\n\n/**\n * Fix to a range of <code>0 <= num <= 1</code>.\n */\nfunction fixRange(num: number) {\n\treturn Math.min(Math.max(num, 0), 1);\n}\n\nfunction A(aA1, aA2) {\n\treturn 1 - 3 * aA2 + 3 * aA1;\n}\n\nfunction B(aA1, aA2) {\n\treturn 3 * aA2 - 6 * aA1;\n}\n\nfunction C(aA1) {\n\treturn 3 * aA1;\n}\n\nfunction calcBezier(aT, aA1, aA2) {\n\treturn ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\n}\n\nfunction getSlope(aT, aA1, aA2) {\n\treturn 3 * A(aA1, aA2) * aT * aT + 2 * B(aA1, aA2) * aT + C(aA1);\n}\n\nexport function generateBezier(...args: [number, number, number, number]): VelocityEasingFn {\n\tconst NEWTON_ITERATIONS = 4,\n\t\tNEWTON_MIN_SLOPE = 0.001,\n\t\tSUBDIVISION_PRECISION = 0.0000001,\n\t\tSUBDIVISION_MAX_ITERATIONS = 10,\n\t\tkSplineTableSize = 11,\n\t\tkSampleStepSize = 1 / (kSplineTableSize - 1),\n\t\tfloat32ArraySupported = \"Float32Array\" in window;\n\n\t/* Must contain four args. */\n\tif (args.length !== 4) {\n\t\treturn;\n\t}\n\n\t/* Args must be numbers. */\n\tfor (let i = 0; i < 4; ++i) {\n\t\tif (typeof args[i] !== \"number\" || isNaN(args[i]) || !isFinite(args[i])) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\t/* X values must be in the [0, 1] range. */\n\tconst mX1 = fixRange(args[0]);\n\tconst mY1 = args[1];\n\tconst mX2 = fixRange(args[2]);\n\tconst mY2 = args[3];\n\n\tconst mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\n\n\tfunction newtonRaphsonIterate(aX, aGuessT) {\n\t\tfor (let i = 0; i < NEWTON_ITERATIONS; ++i) {\n\t\t\tconst currentSlope = getSlope(aGuessT, mX1, mX2);\n\n\t\t\tif (currentSlope === 0) {\n\t\t\t\treturn aGuessT;\n\t\t\t}\n\n\t\t\tconst currentX = calcBezier(aGuessT, mX1, mX2) - aX;\n\t\t\taGuessT -= currentX / currentSlope;\n\t\t}\n\n\t\treturn aGuessT;\n\t}\n\n\tfunction calcSampleValues() {\n\t\tfor (let i = 0; i < kSplineTableSize; ++i) {\n\t\t\tmSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\n\t\t}\n\t}\n\n\tfunction binarySubdivide(aX, aA, aB) {\n\t\tlet currentX, currentT, i = 0;\n\n\t\tdo {\n\t\t\tcurrentT = aA + (aB - aA) / 2;\n\t\t\tcurrentX = calcBezier(currentT, mX1, mX2) - aX;\n\t\t\tif (currentX > 0) {\n\t\t\t\taB = currentT;\n\t\t\t} else {\n\t\t\t\taA = currentT;\n\t\t\t}\n\t\t} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\n\n\t\treturn currentT;\n\t}\n\n\tfunction getTForX(aX) {\n\t\tconst lastSample = kSplineTableSize - 1;\n\t\tlet intervalStart = 0,\n\t\t\tcurrentSample = 1;\n\n\t\tfor (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\n\t\t\tintervalStart += kSampleStepSize;\n\t\t}\n\n\t\t--currentSample;\n\n\t\tconst dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]),\n\t\t\tguessForT = intervalStart + dist * kSampleStepSize,\n\t\t\tinitialSlope = getSlope(guessForT, mX1, mX2);\n\n\t\tif (initialSlope >= NEWTON_MIN_SLOPE) {\n\t\t\treturn newtonRaphsonIterate(aX, guessForT);\n\t\t} else if (initialSlope === 0) {\n\t\t\treturn guessForT;\n\t\t} else {\n\t\t\treturn binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);\n\t\t}\n\t}\n\n\tlet precomputed = false;\n\n\tfunction precompute() {\n\t\tprecomputed = true;\n\t\tif (mX1 !== mY1 || mX2 !== mY2) {\n\t\t\tcalcSampleValues();\n\t\t}\n\t}\n\n\tconst str = `generateBezier(${[mX1, mY1, mX2, mY2]})`,\n\t\tf = (percentComplete: number, startValue: number, endValue: number, property?: string) => {\n\t\t\tif (!precomputed) {\n\t\t\t\tprecompute();\n\t\t\t}\n\t\t\tif (percentComplete === 0) {\n\t\t\t\treturn startValue;\n\t\t\t}\n\t\t\tif (percentComplete === 1) {\n\t\t\t\treturn endValue;\n\t\t\t}\n\t\t\tif (mX1 === mY1 && mX2 === mY2) {\n\t\t\t\treturn startValue + percentComplete * (endValue - startValue);\n\t\t\t}\n\n\t\t\treturn startValue + calcBezier(getTForX(percentComplete), mY1, mY2) * (endValue - startValue);\n\t\t};\n\n\t(f as any).getControlPoints = () => {\n\t\treturn [{ x: mX1, y: mY1 }, { x: mX2, y: mY2 }];\n\t};\n\tf.toString = () => {\n\t\treturn str;\n\t};\n\n\treturn f;\n}\n\n/* Common easings */\nconst easeIn = generateBezier(0.42, 0, 1, 1),\n\teaseOut = generateBezier(0, 0, 0.58, 1),\n\teaseInOut = generateBezier(0.42, 0, 0.58, 1);\n\nregisterEasing([\"ease\", generateBezier(0.25, 0.1, 0.25, 1)]);\nregisterEasing([\"easeIn\", easeIn]);\nregisterEasing([\"ease-in\", easeIn]);\nregisterEasing([\"easeOut\", easeOut]);\nregisterEasing([\"ease-out\", easeOut]);\nregisterEasing([\"easeInOut\", easeInOut]);\nregisterEasing([\"ease-in-out\", easeInOut]);\nregisterEasing([\"easeInSine\", generateBezier(0.47, 0, 0.745, 0.715)]);\nregisterEasing([\"easeOutSine\", generateBezier(0.39, 0.575, 0.565, 1)]);\nregisterEasing([\"easeInOutSine\", generateBezier(0.445, 0.05, 0.55, 0.95)]);\nregisterEasing([\"easeInQuad\", generateBezier(0.55, 0.085, 0.68, 0.53)]);\nregisterEasing([\"easeOutQuad\", generateBezier(0.25, 0.46, 0.45, 0.94)]);\nregisterEasing([\"easeInOutQuad\", generateBezier(0.455, 0.03, 0.515, 0.955)]);\nregisterEasing([\"easeInCubic\", generateBezier(0.55, 0.055, 0.675, 0.19)]);\nregisterEasing([\"easeOutCubic\", generateBezier(0.215, 0.61, 0.355, 1)]);\nregisterEasing([\"easeInOutCubic\", generateBezier(0.645, 0.045, 0.355, 1)]);\nregisterEasing([\"easeInQuart\", generateBezier(0.895, 0.03, 0.685, 0.22)]);\nregisterEasing([\"easeOutQuart\", generateBezier(0.165, 0.84, 0.44, 1)]);\nregisterEasing([\"easeInOutQuart\", generateBezier(0.77, 0, 0.175, 1)]);\nregisterEasing([\"easeInQuint\", generateBezier(0.755, 0.05, 0.855, 0.06)]);\nregisterEasing([\"easeOutQuint\", generateBezier(0.23, 1, 0.32, 1)]);\nregisterEasing([\"easeInOutQuint\", generateBezier(0.86, 0, 0.07, 1)]);\nregisterEasing([\"easeInExpo\", generateBezier(0.95, 0.05, 0.795, 0.035)]);\nregisterEasing([\"easeOutExpo\", generateBezier(0.19, 1, 0.22, 1)]);\nregisterEasing([\"easeInOutExpo\", generateBezier(1, 0, 0, 1)]);\nregisterEasing([\"easeInCirc\", generateBezier(0.6, 0.04, 0.98, 0.335)]);\nregisterEasing([\"easeOutCirc\", generateBezier(0.075, 0.82, 0.165, 1)]);\nregisterEasing([\"easeInOutCirc\", generateBezier(0.785, 0.135, 0.15, 0.86)]);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {VelocityEasingFn} from \"../../../velocity.d\";\n\ninterface springState {\n\tx: number;\n\tv: number;\n\ttension: number;\n\tfriction: number;\n}\n\ninterface springDelta {\n\tdx: number;\n\tdv: number;\n}\n\n/* Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */\n/* Given a tension, friction, and duration, a simulation at 60FPS will first run without a defined duration in order to calculate the full path. A second pass\n then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */\nfunction springAccelerationForState(state: springState) {\n\treturn (-state.tension * state.x) - (state.friction * state.v);\n}\n\nfunction springEvaluateStateWithDerivative(initialState: springState, dt: number, derivative: springDelta): springDelta {\n\tconst state = {\n\t\tx: initialState.x + derivative.dx * dt,\n\t\tv: initialState.v + derivative.dv * dt,\n\t\ttension: initialState.tension,\n\t\tfriction: initialState.friction,\n\t};\n\n\treturn {\n\t\tdx: state.v,\n\t\tdv: springAccelerationForState(state),\n\t};\n}\n\nfunction springIntegrateState(state: springState, dt: number) {\n\tconst a = {\n\t\tdx: state.v,\n\t\tdv: springAccelerationForState(state),\n\t},\n\t\tb = springEvaluateStateWithDerivative(state, dt * 0.5, a),\n\t\tc = springEvaluateStateWithDerivative(state, dt * 0.5, b),\n\t\td = springEvaluateStateWithDerivative(state, dt, c),\n\t\tdxdt = 1 / 6 * (a.dx + 2 * (b.dx + c.dx) + d.dx),\n\t\tdvdt = 1 / 6 * (a.dv + 2 * (b.dv + c.dv) + d.dv);\n\n\tstate.x = state.x + dxdt * dt;\n\tstate.v = state.v + dvdt * dt;\n\n\treturn state;\n}\n\nexport function generateSpringRK4(tension: number, friction: number): number;\nexport function generateSpringRK4(tension: number, friction: number, duration: number): VelocityEasingFn;\nexport function generateSpringRK4(tension: number, friction: number, duration?: number): any {\n\tconst initState: springState = {\n\t\tx: -1,\n\t\tv: 0,\n\t\ttension: parseFloat(tension as any) || 500,\n\t\tfriction: parseFloat(friction as any) || 20,\n\t},\n\t\tpath = [0],\n\t\ttolerance = 1 / 10000,\n\t\tDT = 16 / 1000,\n\t\thaveDuration = duration != null; // deliberate \"==\", as undefined == null != 0\n\tlet timeLapsed = 0,\n\t\tdt: number,\n\t\tlastState: springState;\n\n\t/* Calculate the actual time it takes for this animation to complete with the provided conditions. */\n\tif (haveDuration) {\n\t\t/* Run the simulation without a duration. */\n\t\ttimeLapsed = generateSpringRK4(initState.tension, initState.friction);\n\t\t/* Compute the adjusted time delta. */\n\t\tdt = (timeLapsed as number) / duration * DT;\n\t} else {\n\t\tdt = DT;\n\t}\n\n\twhile (true) {\n\t\t/* Next/step function .*/\n\t\tlastState = springIntegrateState(lastState || initState, dt);\n\t\t/* Store the position. */\n\t\tpath.push(1 + lastState.x);\n\t\ttimeLapsed += 16;\n\t\t/* If the change threshold is reached, break. */\n\t\tif (!(Math.abs(lastState.x) > tolerance && Math.abs(lastState.v) > tolerance)) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t/* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the\n\t computed path and returns a snapshot of the position according to a given percentComplete. */\n\treturn !haveDuration ? timeLapsed : (percentComplete: number, startValue: number, endValue: number) => {\n\t\tif (percentComplete === 0) {\n\t\t\treturn startValue;\n\t\t}\n\t\tif (percentComplete === 1) {\n\t\t\treturn endValue;\n\t\t}\n\n\t\treturn startValue + path[Math.floor(percentComplete * (path.length - 1))] * (endValue - startValue);\n\t};\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details\n *\n * Step easing generator.\n */\n\n// Typedefs\nimport {VelocityEasingFn} from \"../../../velocity.d\";\n\n// Constants\nconst cache: {[steps: number]: VelocityEasingFn} = {};\n\nexport function generateStep(steps): VelocityEasingFn {\n\tconst fn = cache[steps];\n\n\tif (fn) {\n\t\treturn fn;\n\t}\n\n\treturn cache[steps] = (percentComplete: number, startValue: number, endValue: number) => {\n\t\tif (percentComplete === 0) {\n\t\t\treturn startValue;\n\t\t}\n\t\tif (percentComplete === 1) {\n\t\t\treturn endValue;\n\t\t}\n\n\t\treturn startValue + Math.round(percentComplete * steps) * (1 / steps) * (endValue - startValue);\n\t};\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Validation functions used for various types of data that can be supplied.\n * All errors are reported in the non-minified version for development. If a\n * validation fails then it should return <code>undefined</code>.\n */\n\n// Typedefs\nimport {VelocityCallbackFn, VelocityEasingFn, VelocityEasingType, VelocityProgressFn} from \"../../velocity.d\";\n\n// Project\nimport {Duration} from \"../constants\";\nimport {isBoolean, isFunction, isNumber, isString} from \"../types\";\nimport {generateBezier} from \"./easing/bezier\";\nimport {Easings} from \"./easing/easings\";\nimport {generateSpringRK4} from \"./easing/spring_rk4\";\nimport {generateStep} from \"./easing/step\";\n\n/**\n * Parse a duration value and return an ms number. Optionally return a\n * default value if the number is not valid.\n */\nexport function parseDuration(duration: \"fast\" | \"normal\" | \"slow\" | number, def?: \"fast\" | \"normal\" | \"slow\" | number): number {\n\tif (isNumber(duration)) {\n\t\treturn duration;\n\t}\n\tif (isString(duration)) {\n\t\treturn Duration[duration.toLowerCase()]\n\t\t\t|| parseFloat(duration.replace(\"ms\", \"\")\n\t\t\t\t.replace(\"s\", \"000\"));\n\t}\n\n\treturn def == null ? undefined : parseDuration(def);\n}\n\n/**\n * Validate a <code>cache</code> option.\n */\nexport function validateCache(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'cache' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>begin</code> option.\n */\nexport function validateBegin(value: VelocityCallbackFn): VelocityCallbackFn {\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'begin' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>complete</code> option.\n */\nexport function validateComplete(value: VelocityCallbackFn, noError?: true): VelocityCallbackFn {\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'complete' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>delay</code> option.\n */\nexport function validateDelay(value: \"fast\" | \"normal\" | \"slow\" | number): number {\n\tconst parsed = parseDuration(value);\n\n\tif (!isNaN(parsed)) {\n\t\treturn parsed;\n\t}\n\tif (value != null) {\n\t\tconsole.error(`VelocityJS: Trying to set 'delay' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>duration</code> option.\n */\nexport function validateDuration(value: \"fast\" | \"normal\" | \"slow\" | number, noError?: true): number {\n\tconst parsed = parseDuration(value);\n\n\tif (!isNaN(parsed) && parsed >= 0) {\n\t\treturn parsed;\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.error(`VelocityJS: Trying to set 'duration' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>easing</code> option.\n */\nexport function validateEasing(value: VelocityEasingType, duration: number, noError?: true): VelocityEasingFn {\n\tif (isString(value)) {\n\t\t// Named easing\n\t\treturn Easings[value];\n\t}\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\t// TODO: We should only do these if the correct function exists - don't force loading.\n\tif (Array.isArray(value)) {\n\t\tif (value.length === 1) {\n\t\t\t// Steps\n\t\t\treturn generateStep(value[0]);\n\t\t}\n\t\tif (value.length === 2) {\n\t\t\t// springRK4 must be passed the animation's duration.\n\t\t\t// Note: If the springRK4 array contains non-numbers,\n\t\t\t// generateSpringRK4() returns an easing function generated with\n\t\t\t// default tension and friction values.\n\t\t\treturn generateSpringRK4(value[0], value[1], duration);\n\t\t}\n\t\tif (value.length === 4) {\n\t\t\t// Note: If the bezier array contains non-numbers, generateBezier()\n\t\t\t// returns undefined.\n\t\t\treturn generateBezier.apply(null, value) || false;\n\t\t}\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.error(`VelocityJS: Trying to set 'easing' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>fpsLimit</code> option.\n */\nexport function validateFpsLimit(value: number | false): number {\n\tif (value === false) {\n\t\treturn 0;\n\t} else {\n\t\tconst parsed = parseInt(value as any, 10);\n\n\t\tif (!isNaN(parsed) && parsed >= 0) {\n\t\t\treturn Math.min(parsed, 60);\n\t\t}\n\t}\n\tif (value != null) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'fpsLimit' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>loop</code> option.\n */\nexport function validateLoop(value: number | boolean): number | true {\n\tswitch (value) {\n\t\tcase false:\n\t\t\treturn 0;\n\n\t\tcase true:\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\tconst parsed = parseInt(value as any, 10);\n\n\t\t\tif (!isNaN(parsed) && parsed >= 0) {\n\t\t\t\treturn parsed;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'loop' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>progress</code> option.\n */\nexport function validateProgress(value: VelocityProgressFn): VelocityProgressFn {\n\tif (isFunction(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'progress' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>promise</code> option.\n */\nexport function validatePromise(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'promise' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>promiseRejectEmpty</code> option.\n */\nexport function validatePromiseRejectEmpty(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'promiseRejectEmpty' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>queue</code> option.\n */\nexport function validateQueue(value: string | false, noError?: true): string | false {\n\tif (value === false || isString(value)) {\n\t\treturn value;\n\t}\n\tif (value != null && !noError) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'queue' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>repeat</code> option.\n */\nexport function validateRepeat(value: number | boolean): number | true {\n\tswitch (value) {\n\t\tcase false:\n\t\t\treturn 0;\n\n\t\tcase true:\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\tconst parsed = parseInt(value as any, 10);\n\n\t\t\tif (!isNaN(parsed) && parsed >= 0) {\n\t\t\t\treturn parsed;\n\t\t\t}\n\t\t\tbreak;\n\t}\n\tif (value != null) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'repeat' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>speed</code> option.\n */\nexport function validateSpeed(value: number): number {\n\tif (isNumber(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.error(`VelocityJS: Trying to set 'speed' to an invalid value:`, value);\n\t}\n}\n\n/**\n * Validate a <code>sync</code> option.\n */\nexport function validateSync(value: boolean): boolean {\n\tif (isBoolean(value)) {\n\t\treturn value;\n\t}\n\tif (value != null) {\n\t\tconsole.error(`VelocityJS: Trying to set 'sync' to an invalid value:`, value);\n\t}\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Velocity option defaults, which can be overriden by the user.\n */\n\n// Typedefs\nimport {StrictVelocityOptions, VelocityCallbackFn, VelocityEasingFn} from \"../../velocity.d\";\n\n// Project\nimport {isBoolean} from \"../types\";\nimport {\n\tvalidateBegin, validateCache, validateComplete, validateDelay, validateDuration,\n\tvalidateEasing, validateFpsLimit, validateLoop, validatePromise, validatePromiseRejectEmpty,\n\tvalidateQueue, validateRepeat, validateSpeed, validateSync,\n} from \"./options\";\n\n// Constants\nimport {\n\tDEFAULT_CACHE, DEFAULT_DELAY, DEFAULT_DURATION, DEFAULT_EASING, DEFAULT_FPSLIMIT,\n\tDEFAULT_LOOP, DEFAULT_PROMISE, DEFAULT_PROMISE_REJECT_EMPTY, DEFAULT_QUEUE, DEFAULT_REPEAT,\n\tDEFAULT_SPEED, DEFAULT_SYNC, FUZZY_MS_PER_SECOND,\n} from \"../constants\";\n\n// NOTE: Add the variable here, then add the default state in \"reset\" below.\nlet cache: boolean,\n\tbegin: VelocityCallbackFn,\n\tcomplete: VelocityCallbackFn,\n\tdelay: number,\n\tduration: number,\n\teasing: VelocityEasingFn,\n\tfpsLimit: number,\n\tloop: number | true,\n\tmobileHA: boolean,\n\tminFrameTime: number,\n\tpromise: boolean,\n\tpromiseRejectEmpty: boolean,\n\tqueue: string | false,\n\trepeat: number | true,\n\tspeed: number,\n\tsync: boolean;\n\nexport abstract class defaults implements StrictVelocityOptions {\n\tstatic reset() {\n\t\tcache = DEFAULT_CACHE;\n\t\tbegin = undefined;\n\t\tcomplete = undefined;\n\t\tdelay = DEFAULT_DELAY;\n\t\tduration = DEFAULT_DURATION;\n\t\teasing = validateEasing(DEFAULT_EASING, DEFAULT_DURATION);\n\t\tfpsLimit = DEFAULT_FPSLIMIT;\n\t\tloop = DEFAULT_LOOP;\n\t\tminFrameTime = FUZZY_MS_PER_SECOND / DEFAULT_FPSLIMIT;\n\t\tpromise = DEFAULT_PROMISE;\n\t\tpromiseRejectEmpty = DEFAULT_PROMISE_REJECT_EMPTY;\n\t\tqueue = DEFAULT_QUEUE;\n\t\trepeat = DEFAULT_REPEAT;\n\t\tspeed = DEFAULT_SPEED;\n\t\tsync = DEFAULT_SYNC;\n\t}\n\n\tstatic get cache(): boolean {\n\t\treturn cache;\n\t}\n\n\tstatic set cache(value: boolean) {\n\t\tvalue = validateCache(value);\n\t\tif (value !== undefined) {\n\t\t\tcache = value;\n\t\t}\n\t}\n\n\tstatic get begin(): VelocityCallbackFn {\n\t\treturn begin;\n\t}\n\tstatic set begin(value: VelocityCallbackFn) {\n\t\tvalue = validateBegin(value);\n\t\tif (value !== undefined) {\n\t\t\tbegin = value;\n\t\t}\n\t}\n\n\tstatic get complete(): VelocityCallbackFn {\n\t\treturn complete;\n\t}\n\n\tstatic set complete(value: VelocityCallbackFn) {\n\t\tvalue = validateComplete(value);\n\t\tif (value !== undefined) {\n\t\t\tcomplete = value;\n\t\t}\n\t}\n\n\tstatic get delay(): number {\n\t\treturn delay;\n\t}\n\tstatic set delay(value: number) {\n\t\tvalue = validateDelay(value);\n\t\tif (value !== undefined) {\n\t\t\tdelay = value;\n\t\t}\n\t}\n\n\tstatic get duration(): number {\n\t\treturn duration;\n\t}\n\tstatic set duration(value: number) {\n\t\tvalue = validateDuration(value);\n\t\tif (value !== undefined) {\n\t\t\tduration = value;\n\t\t}\n\t}\n\n\tstatic get easing(): VelocityEasingFn {\n\t\treturn easing;\n\t}\n\tstatic set easing(value: VelocityEasingFn) {\n\t\tvalue = validateEasing(value, duration);\n\t\tif (value !== undefined) {\n\t\t\teasing = value;\n\t\t}\n\t}\n\n\tstatic get fpsLimit(): number | false {\n\t\treturn fpsLimit;\n\t}\n\tstatic set fpsLimit(value: number | false) {\n\t\tvalue = validateFpsLimit(value);\n\t\tif (value !== undefined) {\n\t\t\tfpsLimit = value;\n\t\t\tminFrameTime = FUZZY_MS_PER_SECOND / value;\n\t\t}\n\t}\n\n\tstatic get loop(): number | true {\n\t\treturn loop;\n\t}\n\tstatic set loop(value: number | true) {\n\t\tvalue = validateLoop(value);\n\t\tif (value !== undefined) {\n\t\t\tloop = value;\n\t\t}\n\t}\n\n\tstatic get mobileHA(): boolean {\n\t\treturn mobileHA;\n\t}\n\tstatic set mobileHA(value: boolean) {\n\t\tif (isBoolean(value)) {\n\t\t\tmobileHA = value;\n\t\t}\n\t}\n\n\tstatic get minFrameTime(): number | false {\n\t\treturn minFrameTime;\n\t}\n\n\tstatic get promise(): boolean {\n\t\treturn promise;\n\t}\n\tstatic set promise(value: boolean) {\n\t\tvalue = validatePromise(value);\n\t\tif (value !== undefined) {\n\t\t\tpromise = value;\n\t\t}\n\t}\n\n\tstatic get promiseRejectEmpty(): boolean {\n\t\treturn promiseRejectEmpty;\n\t}\n\tstatic set promiseRejectEmpty(value: boolean) {\n\t\tvalue = validatePromiseRejectEmpty(value);\n\t\tif (value !== undefined) {\n\t\t\tpromiseRejectEmpty = value;\n\t\t}\n\t}\n\n\tstatic get queue(): string | false {\n\t\treturn queue;\n\t}\n\tstatic set queue(value: string | false) {\n\t\tvalue = validateQueue(value);\n\t\tif (value !== undefined) {\n\t\t\tqueue = value;\n\t\t}\n\t}\n\n\tstatic get repeat(): number | true {\n\t\treturn repeat;\n\t}\n\tstatic set repeat(value: number | true) {\n\t\tvalue = validateRepeat(value);\n\t\tif (value !== undefined) {\n\t\t\trepeat = value;\n\t\t}\n\t}\n\n\tstatic get repeatAgain(): number | true {\n\t\treturn repeat;\n\t}\n\n\tstatic get speed(): number {\n\t\treturn speed;\n\t}\n\tstatic set speed(value: number) {\n\t\tvalue = validateSpeed(value);\n\t\tif (value !== undefined) {\n\t\t\tspeed = value;\n\t\t}\n\t}\n\tstatic get sync(): boolean {\n\t\treturn sync;\n\t}\n\tstatic set sync(value: boolean) {\n\t\tvalue = validateSync(value);\n\t\tif (value !== undefined) {\n\t\t\tsync = value;\n\t\t}\n\t}\n}\n\nObject.freeze(defaults);\n\n// Reset to our default values, currently everything is undefined.\ndefaults.reset();\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Normalisations are used when getting or setting a (normally css compound\n * properties) value that can have a different order in different browsers.\n *\n * It can also be used to extend and create specific properties that otherwise\n * don't exist (such as for scrolling, or inner/outer dimensions).\n */\n\n// Typedefs\nimport {VelocityNormalizationsFn} from \"../../../velocity.d\";\n\n/**\n * The highest type index for finding the best normalization for a property.\n */\nexport let MaxType: number = -1;\n\n/**\n * Unlike \"actions\", normalizations can always be replaced by users.\n */\nexport const Normalizations: {[name: string]: VelocityNormalizationsFn}[] = [];\n\n/**\n * Store a cross-reference to units to be added to specific normalization\n * functions if the user supplies a unit-less number.\n *\n * This is pretty much confined to adding \"px\" to several css properties.\n */\nexport const NormalizationUnits: {[unit: string]: VelocityNormalizationsFn[]} = {};\n\n/**\n * Any normalisations that should never be cached are listed here.\n * Faster than an array - https://jsperf.com/array-includes-and-find-methods-vs-set-has\n */\nexport const NoCacheNormalizations = new Set<string>();\n\n/**\n * Used to define a constructor.\n */\nexport interface ClassConstructor {\n\tnew(): object;\n}\n\n/**\n * An array of classes used for the per-class normalizations. This\n * translates into a bitwise enum for quick cross-reference, and so that\n * the element doesn't need multiple <code>instanceof</code> calls every\n * frame.\n */\nexport const constructors: (ClassConstructor | string)[] = [];\n\n/**\n * A cache of the various constructors we've found and mapping to their real\n * name - saves expensive lookups.\n */\nexport const constructorCache = new Map<ClassConstructor, ClassConstructor | string>();\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {ElementData, HTMLorSVGElement} from \"../../velocity.d\";\n\n// Project\nimport {isString} from \"../types\";\nimport {constructors} from \"./normalizations/normalizationsObject\";\n\n// Constants\nconst dataName = \"velocityData\";\n\n/**\n * Get (and create) the internal data store for an element.\n */\nexport function Data(element: HTMLorSVGElement): ElementData {\n\t// Use a string member so Uglify doesn't mangle it.\n\tconst data = element[dataName];\n\n\tif (data) {\n\t\treturn data;\n\t}\n\tconst window = element.ownerDocument.defaultView;\n\tlet types = 0;\n\n\tfor (let index = 0; index < constructors.length; index++) {\n\t\tconst constructor = constructors[index];\n\n\t\tif (isString(constructor)) {\n\t\t\tif (element instanceof window[constructor]) {\n\t\t\t\ttypes |= 1 << index; // tslint:disable-line:no-bitwise\n\t\t\t}\n\t\t} else if (element instanceof constructor) {\n\t\t\ttypes |= 1 << index; // tslint:disable-line:no-bitwise\n\t\t}\n\t}\n\t// Use an intermediate object so it errors on incorrect data.\n\tconst newData: ElementData = {\n\t\ttypes,\n\t\tcount: 0,\n\t\tcomputedStyle: null,\n\t\tcache: {} as any,\n\t\tqueueList: {},\n\t\tlastAnimationList: {},\n\t\tlastFinishList: {},\n\t\twindow,\n\t};\n\n\tObject.defineProperty(element, dataName, {\n\t\tvalue: newData,\n\t});\n\n\treturn newData;\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {VelocityState} from \"../../velocity.d\";\n\n// Constants\nimport {CLASSNAME} from \"../constants\";\n\nconst isClient = window && window === window.window,\n\twindowScrollAnchor = isClient && window.pageYOffset !== undefined;\n\nexport const State: VelocityState = {\n\tisClient,\n\tisMobile: isClient && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),\n\tisGingerbread: isClient && /Android 2\\.3\\.[3-7]/i.test(navigator.userAgent),\n\tprefixElement: isClient && document.createElement(\"div\"),\n\twindowScrollAnchor,\n\tscrollAnchor: windowScrollAnchor ? window : (!isClient || document.documentElement || document.body.parentNode || document.body),\n\tscrollPropertyLeft: windowScrollAnchor ? \"pageXOffset\" : \"scrollLeft\",\n\tscrollPropertyTop: windowScrollAnchor ? \"pageYOffset\" : \"scrollTop\",\n\tclassName: CLASSNAME,\n\tisTicking: false,\n\tfirst: undefined,\n\tlast: undefined,\n\tfirstNew: undefined,\n};\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * AnimationCall queue\n */\n\n// Typedefs\nimport {AnimationCall, HTMLorSVGElement} from \"../../velocity.d\";\n\n// Project\nimport {isString} from \"../types\";\nimport {addClass} from \"../utility\";\nimport {Data} from \"./data\";\nimport {State} from \"./state\";\n\n/**\n * Simple queue management. Un-named queue is directly within the element data,\n * named queue is within an object within it.\n */\nfunction animate(animation: AnimationCall) {\n\tconst prev = State.last;\n\n\tanimation._prev = prev;\n\tanimation._next = undefined;\n\tif (prev) {\n\t\tprev._next = animation;\n\t} else {\n\t\tState.first = animation;\n\t}\n\tState.last = animation;\n\tif (!State.firstNew) {\n\t\tState.firstNew = animation;\n\t}\n\tconst element = animation.element,\n\t\tdata = Data(element);\n\n\tif (!data.count++) {\n\n\t\t////////////////////////\n\t\t// Feature: Classname //\n\t\t////////////////////////\n\n\t\taddClass(element, State.className);\n\t}\n}\n\n/**\n * Add an item to an animation queue.\n */\nexport function queue(element: HTMLorSVGElement, animation: AnimationCall, queueName: string | false): void {\n\tconst data = Data(element);\n\n\tif (queueName !== false) {\n\t\t// Store the last animation added so we can use it for the\n\t\t// beginning of the next one.\n\t\tdata.lastAnimationList[queueName] = animation;\n\t}\n\tif (queueName === false) {\n\t\tanimate(animation);\n\t} else {\n\t\tif (!isString(queueName)) {\n\t\t\tqueueName = \"\";\n\t\t}\n\t\tlet last = data.queueList[queueName];\n\n\t\tif (!last) {\n\t\t\tif (last === null) {\n\t\t\t\tdata.queueList[queueName] = animation;\n\t\t\t} else {\n\t\t\t\tdata.queueList[queueName] = null;\n\t\t\t\tanimate(animation);\n\t\t\t}\n\t\t} else {\n\t\t\twhile (last._next) {\n\t\t\t\tlast = last._next;\n\t\t\t}\n\t\t\tlast._next = animation;\n\t\t\tanimation._prev = last;\n\t\t}\n\t}\n}\n\n/**\n * Start the next animation on this element's queue (named or default).\n *\n * @returns the next animation that is starting.\n */\nexport function dequeue(element: HTMLorSVGElement, queueName?: string | boolean, skip?: boolean): AnimationCall {\n\tif (queueName !== false) {\n\t\tif (!isString(queueName)) {\n\t\t\tqueueName = \"\";\n\t\t}\n\t\tconst data = Data(element),\n\t\t\tanimation = data.queueList[queueName];\n\n\t\tif (animation) {\n\t\t\tdata.queueList[queueName] = animation._next || null;\n\t\t\tif (!skip) {\n\t\t\t\tanimate(animation);\n\t\t\t}\n\t\t} else if (animation === null) {\n\t\t\tdelete data.queueList[queueName];\n\t\t}\n\n\t\treturn animation;\n\t}\n}\n\n/**\n * Remove an animation from the active animation list. If it has a queue set\n * then remember it as the last animation for that queue, and free the one\n * that was previously there. If the animation list is completely empty then\n * mark us as finished.\n */\nexport function freeAnimationCall(animation: AnimationCall): void {\n\tconst next = animation._next,\n\t\tprev = animation._prev,\n\t\tqueueName = animation.queue == null ? animation.options.queue : animation.queue;\n\n\tif (State.firstNew === animation) {\n\t\tState.firstNew = next;\n\t}\n\tif (State.first === animation) {\n\t\tState.first = next;\n\t} else if (prev) {\n\t\tprev._next = next;\n\t}\n\tif (State.last === animation) {\n\t\tState.last = prev;\n\t} else if (next) {\n\t\tnext._prev = prev;\n\t}\n\tif (queueName) {\n\t\tconst data = Data(animation.element);\n\n\t\tif (data) {\n\t\t\tanimation._next = animation._prev = undefined;\n\t\t}\n\t}\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {SequenceList} from \"../../velocity.d\";\n\nexport const SequencesObject: {[name: string]: SequenceList} = {};\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Call Completion\n */\n\n// Typedefs\nimport {AnimationCall, AnimationFlags} from \"../../velocity.d\";\n\n// Project\nimport {getValue, removeClass} from \"../utility\";\nimport {Data} from \"./data\";\nimport {defaults} from \"./defaults\";\nimport {dequeue, freeAnimationCall} from \"./queue\";\nimport {State} from \"./state\";\n\n/**\n * Call the complete method of an animation in a separate function so it can\n * benefit from JIT compiling while still having a try/catch block.\n */\nfunction callComplete(activeCall: AnimationCall) {\n\tconst callback = activeCall.complete || activeCall.options.complete;\n\n\tif (callback) {\n\t\ttry {\n\t\t\tconst elements = activeCall.elements;\n\n\t\t\tcallback.call(elements, elements, activeCall);\n\t\t} catch (error) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthrow error;\n\t\t\t}, 1);\n\t\t}\n\t}\n}\n\n/**\n * Complete an animation. This might involve restarting (for loop or repeat\n * options). Once it is finished we also check for any callbacks or Promises\n * that need updating.\n */\nexport function completeCall(activeCall: AnimationCall) {\n\t// TODO: Check if it's not been completed already\n\tconst options = activeCall.options,\n\t\tqueue = getValue(activeCall.queue, options.queue),\n\t\tisLoop = getValue(activeCall.loop, options.loop, defaults.loop),\n\t\tisRepeat = getValue(activeCall.repeat, options.repeat, defaults.repeat),\n\t\tisStopped = activeCall._flags & AnimationFlags.STOPPED; // tslint:disable-line:no-bitwise\n\n\tif (!isStopped && (isLoop || isRepeat)) {\n\n\t\t////////////////////\n\t\t// Option: Loop //\n\t\t// Option: Repeat //\n\t\t////////////////////\n\n\t\tif (isRepeat && isRepeat !== true) {\n\t\t\tactiveCall.repeat = isRepeat - 1;\n\t\t} else if (isLoop && isLoop !== true) {\n\t\t\tactiveCall.loop = isLoop - 1;\n\t\t\tactiveCall.repeat = getValue(activeCall.repeatAgain, options.repeatAgain, defaults.repeatAgain);\n\t\t}\n\t\tif (isLoop) {\n\t\t\tactiveCall._flags ^= AnimationFlags.REVERSE; // tslint:disable-line:no-bitwise\n\t\t}\n\t\tif (queue !== false) {\n\t\t\t// Can't be called when stopped so no need for an extra check.\n\t\t\tData(activeCall.element).lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\n\t\t}\n\t\tactiveCall.timeStart = activeCall.ellapsedTime = activeCall.percentComplete = 0;\n\t\tactiveCall._flags &= ~AnimationFlags.STARTED; // tslint:disable-line:no-bitwise\n\t} else {\n\t\tconst element = activeCall.element,\n\t\t\tdata = Data(element);\n\n\t\tif (!--data.count && !isStopped) {\n\n\t\t\t////////////////////////\n\t\t\t// Feature: Classname //\n\t\t\t////////////////////////\n\n\t\t\tremoveClass(element, State.className);\n\t\t}\n\n\t\t//////////////////////\n\t\t// Option: Complete //\n\t\t//////////////////////\n\n\t\t// If this is the last animation in this list then we can check for\n\t\t// and complete calls or Promises.\n\t\t// TODO: When deleting an element we need to adjust these values.\n\t\tif (options && ++options._completed === options._total) {\n\t\t\tif (!isStopped && options.complete) {\n\t\t\t\t// We don't call the complete if the animation is stopped,\n\t\t\t\t// and we clear the key to prevent it being called again.\n\t\t\t\tcallComplete(activeCall);\n\t\t\t\toptions.complete = null;\n\t\t\t}\n\t\t\tconst resolver = options._resolver;\n\n\t\t\tif (resolver) {\n\t\t\t\t// Fulfil the Promise\n\t\t\t\tresolver(activeCall.elements as any);\n\t\t\t\tdelete options._resolver;\n\t\t\t}\n\t\t}\n\n\t\t///////////////////\n\t\t// Option: Queue //\n\t\t///////////////////\n\n\t\tif (queue !== false) {\n\t\t\t// We only do clever things with queues...\n\t\t\tif (!isStopped) {\n\t\t\t\t// If we're not stopping an animation, we need to remember\n\t\t\t\t// what time it finished so that the next animation in\n\t\t\t\t// sequence gets the correct start time.\n\t\t\t\tdata.lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\n\t\t\t}\n\t\t\t// Start the next animation in sequence, or delete the queue if\n\t\t\t// this was the last one.\n\t\t\tdequeue(element, queue);\n\t\t}\n\t\t// Cleanup any pointers, and remember the last animation etc.\n\t\tfreeAnimationCall(activeCall);\n\t}\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Normalisations are used when getting or setting a (normally css compound\n * properties) value that can have a different order in different browsers.\n *\n * It can also be used to extend and create specific properties that otherwise\n * don't exist (such as for scrolling, or inner/outer dimensions).\n */\n\n// Typedefs\nimport { HTMLorSVGElement, VelocityNormalizationsFn } from \"../../../velocity.d\";\n\n// Project\nimport { isFunction, isString } from \"../../types\";\nimport { registerAction } from \"../actions/actions\";\nimport { Data } from \"../data\";\nimport { ClassConstructor, constructorCache, constructors, NoCacheNormalizations, Normalizations, NormalizationUnits } from \"./normalizationsObject\";\n\n/**\n * Used to register a normalization. This should never be called by users\n * directly, instead it should be called via an action:<br/>\n * <code>Velocity(\"registerNormalization\", \"Element\", \"name\", VelocityNormalizationsFn[, false]);</code>\n *\n * The second argument is the class of the animatable object. If this is passed\n * as a class name (ie, `\"Element\"` -> `window[\"Element\"]`) then this will work\n * cross-iframe. If passed as an actual class (ie `Element`) then it will\n * attempt to find the class on the window and use that name instead. If it\n * can't find it then it will use the class passed, which allows for custom\n * animation targets, but will not work cross-iframe boundary.\n *\n * The fourth argument can be an explicit <code>false</code>, which prevents\n * the property from being cached. Please note that this can be dangerous\n * for performance!\n */\nexport function registerNormalization(\n\targs?: [ClassConstructor | string, string, VelocityNormalizationsFn]\n\t\t| [ClassConstructor | string, string, VelocityNormalizationsFn, boolean]\n\t\t| [ClassConstructor | string, string, VelocityNormalizationsFn, string]\n\t\t| [ClassConstructor | string, string, VelocityNormalizationsFn, string, boolean]) {\n\tconst constructor = args[0],\n\t\tname: string = args[1],\n\t\tcallback = args[2];\n\n\tif ((isString(constructor) && !(window[constructor] instanceof Object))\n\t\t|| (!isString(constructor) && !(constructor instanceof Object))) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'registerNormalization' constructor to an invalid value:`, constructor);\n\t} else if (!isString(name)) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'registerNormalization' name to an invalid value:`, name);\n\t} else if (!isFunction(callback)) {\n\t\tconsole.warn(`VelocityJS: Trying to set 'registerNormalization' callback to an invalid value:`, name, callback);\n\t} else {\n\t\tlet index = constructors.indexOf(constructor),\n\t\t\tnextArg = 3;\n\n\t\tif (index < 0 && !isString(constructor)) {\n\t\t\tif (constructorCache.has(constructor)) {\n\t\t\t\tindex = constructors.indexOf(constructorCache.get(constructor));\n\t\t\t} else {\n\t\t\t\tfor (const property in window) {\n\t\t\t\t\tif ((window[property] as any) === constructor) {\n\t\t\t\t\t\tindex = constructors.indexOf(property);\n\t\t\t\t\t\tif (index < 0) {\n\t\t\t\t\t\t\tindex = constructors.push(property) - 1;\n\t\t\t\t\t\t\tNormalizations[index] = {};\n\t\t\t\t\t\t\tconstructorCache.set(constructor, property);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (index < 0) {\n\t\t\tindex = constructors.push(constructor) - 1;\n\t\t\tNormalizations[index] = {};\n\t\t}\n\t\tNormalizations[index][name] = callback;\n\t\tif (isString(args[nextArg])) {\n\t\t\tconst unit = args[nextArg++] as string;\n\t\t\tlet units = NormalizationUnits[unit];\n\n\t\t\tif (!units) {\n\t\t\t\tunits = NormalizationUnits[unit] = [];\n\t\t\t}\n\t\t\tunits.push(callback);\n\t\t}\n\t\tif (args[nextArg] === false) {\n\t\t\tNoCacheNormalizations.add(name);\n\t\t}\n\t}\n}\n\n/**\n * Used to check if a normalisation exists on a specific class.\n */\nexport function hasNormalization(args?: [ClassConstructor | string, string]): boolean {\n\tconst constructor = args[0],\n\t\tname: string = args[1];\n\tlet index = constructors.indexOf(constructor);\n\n\tif (index < 0 && !isString(constructor)) {\n\t\tif (constructorCache.has(constructor)) {\n\t\t\tindex = constructors.indexOf(constructorCache.get(constructor));\n\t\t} else {\n\t\t\tfor (const property in window) {\n\t\t\t\tif ((window[property] as any) === constructor) {\n\t\t\t\t\tindex = constructors.indexOf(property);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn index >= 0 && Normalizations[index].hasOwnProperty(name);\n}\n\n/**\n * Get the unit to add to a unitless number based on the normalization used.\n */\nexport function getNormalizationUnit(fn: VelocityNormalizationsFn) {\n\tfor (const unit in NormalizationUnits) {\n\t\tif (NormalizationUnits[unit].includes(fn)) {\n\t\t\treturn unit;\n\t\t}\n\t}\n\n\treturn \"\";\n}\n\n/**\n * Get the normalization for an element and propertyName combination. This\n * value should be cached at asking time, as it may change if the user adds\n * more normalizations.\n */\nexport function getNormalization(element: HTMLorSVGElement, propertyName: string) {\n\tconst data = Data(element);\n\tlet fn: VelocityNormalizationsFn;\n\n\tfor (let index = constructors.length - 1, types = data.types; !fn && index >= 0; index--) {\n\t\tif (types & (1 << index)) { // tslint:disable-line:no-bitwise\n\t\t\tfn = Normalizations[index][propertyName];\n\t\t}\n\t}\n\n\treturn fn;\n}\n\nregisterAction([\"registerNormalization\", registerNormalization]);\nregisterAction([\"hasNormalization\", hasNormalization]);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {HTMLorSVGElement, VelocityNormalizationsFn} from \"../../../velocity.d\";\n\n// Project\nimport Velocity from \"../../velocity\";\nimport {Data} from \"../data\";\nimport {getNormalization} from \"../normalizations/normalizations\";\nimport {NoCacheNormalizations} from \"../normalizations/normalizationsObject\";\n\n/**\n * The singular setPropertyValue, which routes the logic for all\n * normalizations.\n */\nexport function setPropertyValue(element: HTMLorSVGElement, propertyName: string, propertyValue: any, fn?: VelocityNormalizationsFn) {\n\tconst noCache = NoCacheNormalizations.has(propertyName),\n\t\tdata = !noCache && Data(element);\n\n\tif (noCache || (data && data.cache[propertyName] !== propertyValue)) {\n\t\t// By setting it to undefined we force a true \"get\" later\n\t\tif (!noCache) {\n\t\t\tdata.cache[propertyName] = propertyValue || undefined;\n\t\t}\n\t\tfn = fn || getNormalization(element, propertyName);\n\t\tif (fn) {\n\t\t\tfn(element, propertyValue);\n\t\t}\n\t\tif (Velocity.debug >= 2) {\n\t\t\tconsole.info(`Set \"${propertyName}\": \"${propertyValue}\"`, element);\n\t\t}\n\t}\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n/**\n * Remove nested `calc(0px + *)` or `calc(* + (0px + *))` correctly.\n */\nexport function removeNestedCalc(value: string): string {\n\tif (value.indexOf(\"calc(\") >= 0) {\n\t\tconst tokens = value.split(/([\\(\\)])/);\n\t\tlet depth = 0;\n\n\t\tfor (let i = 0; i < tokens.length; i++) {\n\t\t\tconst token = tokens[i];\n\n\t\t\tswitch (token) {\n\t\t\t\tcase \"(\":\n\t\t\t\t\tdepth++;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \")\":\n\t\t\t\t\tdepth--;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\tif (depth && token[0] === \"0\") {\n\t\t\t\t\t\ttokens[i] = token.replace(/^0[a-z%]+ \\+ /, \"\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn tokens.join(\"\")\n\t\t\t.replace(/(?:calc)?\\(([0-9\\.]+[a-z%]+)\\)/g, \"$1\");\n\t}\n\n\treturn value;\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n/**\n * Cache every camelCase match to avoid repeating lookups.\n */\nconst cache: {[property: string]: string} = {};\n\n/**\n * Camelcase a property name into its JavaScript notation (e.g.\n * \"background-color\" ==> \"backgroundColor\"). Camelcasing is used to\n * normalize property names between and across calls.\n */\nexport function camelCase(property: string): string {\n\tconst fixed = cache[property];\n\n\tif (fixed) {\n\t\treturn fixed;\n\t}\n\n\treturn cache[property] = property.replace(/-([a-z])/g, ($: string, letter: string) => letter.toUpperCase());\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Constants\nconst rxColor6 = /#([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})/gi,\n\trxColor3 = /#([a-f\\d])([a-f\\d])([a-f\\d])/gi,\n\trxColorName = /(rgba?\\(\\s*)?(\\b[a-z]+\\b)/g,\n\trxRGB = /rgb(a?)\\(([^\\)]+)\\)/gi,\n\trxSpaces = /\\s+/g;\n\n/**\n * This is the list of color names -> rgb values. The object is in here so\n * that the actual name conversion can be in a separate file and not\n * included for custom builds.\n */\nexport const ColorNames: {[name: string]: string} = {};\n\n/**\n * Convert a hex list to an rgba value. Designed to be used in replace.\n */\nfunction makeRGBA(ignore: any, r: string, g: string, b: string): string {\n\treturn `rgba(${parseInt(r, 16)},${parseInt(g, 16)},${parseInt(b, 16)},1)`;\n}\n\n/**\n * Replace any css colour name with its rgba() value. It is possible to use\n * the name within an \"rgba(blue, 0.4)\" string this way.\n */\nexport function fixColors(str: string): string {\n\treturn str\n\t\t.replace(rxColor6, makeRGBA)\n\t\t.replace(rxColor3, ($0, r, g, b) => {\n\t\t\treturn makeRGBA($0, r + r, g + g, b + b);\n\t\t})\n\t\t.replace(rxColorName, ($0, $1, $2) => {\n\t\t\tif (ColorNames[$2]) {\n\t\t\t\treturn ($1 ? $1 : \"rgba(\") + ColorNames[$2] + ($1 ? \"\" : \",1)\");\n\t\t\t}\n\n\t\t\treturn $0;\n\t\t})\n\t\t.replace(rxRGB, ($0, $1, $2: string) => {\n\t\t\treturn `rgba(${$2.replace(rxSpaces, \"\") + ($1 ? \"\" : \",1\")})`;\n\t\t});\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {HTMLorSVGElement} from \"../../../velocity.d\";\n\n// Project\nimport {getPropertyValue} from \"./getPropertyValue\";\n\n/**\n * Figure out the dimensions for this width / height based on the\n * potential borders and whether we care about them.\n */\nexport function augmentDimension(element: HTMLorSVGElement, name: \"width\" | \"height\", wantInner: boolean): number {\n\tconst isBorderBox = getPropertyValue(element, \"boxSizing\")\n\t\t.toString()\n\t\t.toLowerCase() === \"border-box\";\n\n\tif (isBorderBox === wantInner) {\n\t\t// in box-sizing mode, the CSS width / height accessors already\n\t\t// give the outerWidth / outerHeight.\n\t\tconst sides = name === \"width\" ? [\"Left\", \"Right\"] : [\"Top\", \"Bottom\"],\n\t\t\tfields = [`padding${sides[0]}`, `padding${sides[1]}`, `border${sides[0]}Width`, `border${sides[1]}Width`];\n\t\tlet augment = 0;\n\n\t\tfor (const field of fields) {\n\t\t\tconst value = parseFloat(getPropertyValue(element, field));\n\n\t\t\tif (!isNaN(value)) {\n\t\t\t\taugment += value;\n\t\t\t}\n\t\t}\n\n\t\treturn wantInner ? -augment : augment;\n\t}\n\n\treturn 0;\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {HTMLorSVGElement, VelocityNormalizationsFn} from \"../../../velocity.d\";\n\n// Project\nimport Velocity from \"../../velocity\";\nimport {Data} from \"../data\";\nimport {getNormalization} from \"../normalizations/normalizations\";\nimport {NoCacheNormalizations} from \"../normalizations/normalizationsObject\";\nimport {augmentDimension} from \"./augmentDimension\";\nimport {setPropertyValue} from \"./setPropertyValue\";\n\n/**\n * Get the width or height of an element, pulled out as it can be used when the\n * in two locations so don't want to repeat it.\n */\nfunction getWidthHeight(element: HTMLorSVGElement, property: \"width\" | \"height\"): string {\n\treturn (element.getBoundingClientRect()[property] + augmentDimension(element, property, true)) + \"px\";\n}\n\n// TODO: This is still a complete mess\nexport function computePropertyValue(element: HTMLorSVGElement, property: string): string {\n\tconst data = Data(element),\n\t\t// If computedStyle is cached, use it. If not then get the correct one\n\t\t// for the element to support cross-iframe boundaries.\n\t\tcomputedStyle = data.computedStyle ? data.computedStyle : data.window.getComputedStyle(element, null);\n\tlet computedValue: string | number = 0;\n\n\tif (!data.computedStyle) {\n\t\tdata.computedStyle = computedStyle;\n\t}\n\tif (computedStyle[\"display\"] === \"none\") {\n\t\tswitch (property) {\n\t\t\tcase \"width\":\n\t\t\tcase \"height\":\n\t\t\t\t// Browsers do not return height and width values for elements\n\t\t\t\t// that are set to display:\"none\". Thus, we temporarily toggle\n\t\t\t\t// display to the element type's default value.\n\t\t\t\tsetPropertyValue(element, \"display\", \"auto\");\n\t\t\t\tcomputedValue = getWidthHeight(element, property);\n\t\t\t\tsetPropertyValue(element, \"display\", \"none\");\n\n\t\t\t\treturn String(computedValue);\n\t\t}\n\t}\n\n\t/* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\n\t Also, in all browsers, when border colors aren't all the same, a compound value is returned that Velocity isn't setup to parse.\n\t So, as a polyfill for querying individual border side colors, we just return the top border's color and animate all borders from that value. */\n\t/* TODO: There is a borderColor normalisation in legacy/ - figure out where this is needed... */\n\n\tcomputedValue = computedStyle[property];\n\t/* Fall back to the property's style value (if defined) when computedValue returns nothing,\n\t which can happen when the element hasn't been painted. */\n\tif (!computedValue) {\n\t\tcomputedValue = element.style[property];\n\t}\n\t/* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\n\t defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\n\t effect as being set to 0, so no conversion is necessary.) */\n\t/* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\n\t property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\n\t to its *containing* (not parent) element, which is the nearest \"position:relative\" ancestor or the viewport (and always the viewport in the case of \"position:fixed\"). */\n\tif (computedValue === \"auto\") {\n\t\tswitch (property) {\n\t\t\tcase \"width\":\n\t\t\tcase \"height\":\n\t\t\t\tcomputedValue = getWidthHeight(element, property);\n\t\t\t\tbreak;\n\n\t\t\tcase \"top\":\n\t\t\tcase \"left\":\n\t\t\t\tconst topLeft = true;\n\t\t\tcase \"right\":\n\t\t\tcase \"bottom\":\n\t\t\t\tconst position = getPropertyValue(element, \"position\");\n\n\t\t\t\tif (position === \"fixed\" || (topLeft && position === \"absolute\")) {\n\t\t\t\t\t// Note: this has no pixel unit on its returned values,\n\t\t\t\t\t// we re-add it here to conform with\n\t\t\t\t\t// computePropertyValue's behavior.\n\t\t\t\t\tcomputedValue = element.getBoundingClientRect[property] + \"px\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t// Deliberate fallthrough!\n\t\t\tdefault:\n\t\t\t\tcomputedValue = \"0px\";\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn computedValue ? String(computedValue) : \"\";\n}\n\n/**\n * Get a property value. This will grab via the cache if it exists, then\n * via any normalisations.\n */\nexport function getPropertyValue(element: HTMLorSVGElement, propertyName: string, fn?: VelocityNormalizationsFn, skipCache?: boolean): string {\n\tconst data = Data(element);\n\tlet propertyValue: string;\n\n\tif (NoCacheNormalizations.has(propertyName)) {\n\t\tskipCache = true;\n\t}\n\tif (!skipCache && data && data.cache[propertyName] != null) {\n\t\tpropertyValue = data.cache[propertyName];\n\t} else {\n\t\tfn = fn || getNormalization(element, propertyName);\n\t\tif (fn) {\n\t\t\tpropertyValue = fn(element);\n\t\t\tif (data) {\n\t\t\t\tdata.cache[propertyName] = propertyValue;\n\t\t\t}\n\t\t}\n\t}\n\tif (Velocity.debug >= 2) {\n\t\tconsole.info(`Get \"${propertyName}\": \"${propertyValue}\"`, element);\n\t}\n\n\treturn propertyValue;\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Tweens\n */\n\n// Typedefs\nimport {\n\tAnimationCall, AnimationFlags, HTMLorSVGElement, Properties, Sequence,\n\tVelocityProperty, VelocityPropertyFn, VelocityPropertyValueFn, VelocityResult, VelocityTween,\n} from \"../../velocity.d\";\n\n// Project\nimport {isFunction, isNumber, isString} from \"../types\";\nimport {cloneArray, getValue} from \"../utility\";\nimport Velocity from \"../velocity\";\nimport {camelCase} from \"./camelCase\";\nimport {fixColors} from \"./css/fixColors\";\nimport {getPropertyValue} from \"./css/getPropertyValue\";\nimport {Data} from \"./data\";\nimport {defaults} from \"./defaults\";\nimport {Easings} from \"./easing/easings\";\nimport {getNormalization, getNormalizationUnit} from \"./normalizations/normalizations\";\nimport {validateEasing} from \"./options\";\nimport {State} from \"./state\";\n\n// Constants\nconst rxHex = /^#([A-f\\d]{3}){1,2}$/i,\n\tcommands: {\n\t\t[type: string]: (\n\t\t\tvalue: any,\n\t\t\telement: HTMLorSVGElement,\n\t\t\telements: VelocityResult,\n\t\t\telementArrayIndex: number,\n\t\t\tpropertyName: string,\n\t\t\ttween: VelocityTween) => string;\n\t} = {\n\t\tfunction: (value, element, elements, elementArrayIndex, propertyName, tween) => {\n\t\t\treturn (value as any as VelocityPropertyValueFn).call(element, elementArrayIndex, elements.length, propertyName);\n\t\t},\n\t\tnumber: (value, element, elements, elementArrayIndex, propertyName, tween) => {\n\t\t\treturn String(value) + getNormalizationUnit(tween.fn);\n\t\t},\n\t\tstring: (value, element, elements, elementArrayIndex, propertyName, tween) => {\n\t\t\treturn fixColors(value);\n\t\t},\n\t\tundefined: (value, element, elements, elementArrayIndex, propertyName, tween) => {\n\t\t\treturn fixColors(getPropertyValue(element, propertyName, tween.fn) || \"\");\n\t\t},\n\t};\n\n/**\n * Expand a VelocityProperty argument into a valid sparse Tween array. This\n * pre-allocates the array as it is then the correct size and slightly\n * faster to access.\n */\nexport function expandProperties(animation: AnimationCall, properties: Properties<VelocityProperty>) {\n\tconst tweens = animation.tweens = Object.create(null),\n\t\telements = animation.elements,\n\t\telement = animation.element,\n\t\telementArrayIndex = elements.indexOf(element as any),\n\t\tdata = Data(element),\n\t\tqueue = getValue(animation.queue, animation.options.queue),\n\t\tduration = getValue(animation.options.duration, defaults.duration);\n\n\tfor (const property in properties) {\n\t\tif (properties.hasOwnProperty(property)) {\n\t\t\tconst propertyName = camelCase(property),\n\t\t\t\tfn = getNormalization(element, propertyName);\n\t\t\tlet valueData = properties[property];\n\n\t\t\tif (!fn && propertyName !== \"tween\") {\n\t\t\t\tif (Velocity.debug) {\n\t\t\t\t\tconsole.log(`Skipping \"${property}\" due to a lack of browser support.`);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (valueData == null) {\n\t\t\t\tif (Velocity.debug) {\n\t\t\t\t\tconsole.log(`Skipping \"${property}\" due to no value supplied.`);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst tween: VelocityTween = tweens[propertyName] = {} as any;\n\t\t\tlet endValue: string,\n\t\t\t\tstartValue: string;\n\n\t\t\ttween.fn = fn;\n\t\t\tif (isFunction(valueData)) {\n\t\t\t\t// If we have a function as the main argument then resolve\n\t\t\t\t// it first, in case it returns an array that needs to be\n\t\t\t\t// split.\n\t\t\t\tvalueData = (valueData as VelocityPropertyFn).call(element, elementArrayIndex, elements.length, elements);\n\t\t\t}\n\t\t\tif (Array.isArray(valueData)) {\n\t\t\t\t// valueData is an array in the form of\n\t\t\t\t// [ endValue, [, easing] [, startValue] ]\n\t\t\t\tconst arr1 = valueData[1],\n\t\t\t\t\tarr2 = valueData[2];\n\n\t\t\t\tendValue = valueData[0] as any;\n\t\t\t\tif ((isString(arr1) && (/^[\\d-]/.test(arr1) || rxHex.test(arr1))) || isFunction(arr1) || isNumber(arr1)) {\n\t\t\t\t\tstartValue = arr1 as any;\n\t\t\t\t} else if ((isString(arr1) && Easings[arr1]) || Array.isArray(arr1)) {\n\t\t\t\t\ttween.easing = validateEasing(arr1, duration);\n\t\t\t\t\tstartValue = arr2 as any;\n\t\t\t\t} else {\n\t\t\t\t\tstartValue = arr1 || arr2 as any;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tendValue = valueData as any;\n\t\t\t}\n\t\t\ttween.end = commands[typeof endValue](endValue, element, elements, elementArrayIndex, propertyName, tween) as any;\n\t\t\tif (startValue != null || (queue === false || data.queueList[queue] === undefined)) {\n\t\t\t\ttween.start = commands[typeof startValue](startValue, element, elements, elementArrayIndex, propertyName, tween) as any;\n\t\t\t\texplodeTween(propertyName, tween, duration);\n\t\t\t}\n\t\t}\n\t}\n}\n\n// TODO: Needs a better match for \"translate3d\" etc - a number must be preceded by some form of break...\nconst rxToken = /((?:[+\\-*/]=)?(?:[+-]?\\d*\\.\\d+|[+-]?\\d+)[a-z%]*|(?:.(?!$|[+-]?\\d|[+\\-*/]=[+-]?\\d))+.|.)/g,\n\trxNumber = /^([+\\-*/]=)?([+-]?\\d*\\.\\d+|[+-]?\\d+)(.*)$/;\n\n/**\n * Find a pattern between multiple strings, return a VelocitySequence with\n * the pattern and the tokenised values.\n *\n * If number then animate.\n * If a string then must match.\n * If units then convert between them by wrapping in a calc().\n * - If already in a calc then nest another layer.\n * If in an rgba() then the first three numbers are rounded.\n */\nexport function findPattern(parts: ReadonlyArray<string>, propertyName: string): Sequence {\n\tconst partsLength = parts.length,\n\t\ttokens: string[][] = [],\n\t\tindexes: number[] = [];\n\tlet numbers: boolean;\n\n\t// First tokenise the strings - these have all values, we will pull\n\t// numbers later.\n\tfor (let part = 0; part < partsLength; part++) {\n\t\tif (isString(parts[part])) {\n\t\t\tif (parts[part] === \"\") {\n\t\t\t\ttokens[part] = [\"\"];\n\t\t\t} else {\n\t\t\t\ttokens[part] = cloneArray(parts[part].match(rxToken));\n\t\t\t}\n\t\t\tindexes[part] = 0;\n\t\t\t// If it matches more than one thing then we've got a number.\n\t\t\tnumbers = numbers || tokens[part].length > 1;\n\t\t\t//console.log(`tokens:`, parts[part], tokens[part])\n\t\t} else {\n\t\t\t// We have an incomplete lineup, it will get tried again later...\n\t\t\treturn;\n\t\t}\n\t}\n\tconst sequence: Sequence = [] as any,\n\t\tpattern = (sequence.pattern = []) as (string | boolean)[],\n\t\taddString = (text: string) => {\n\t\t\tif (isString(pattern[pattern.length - 1])) {\n\t\t\t\tpattern[pattern.length - 1] += text;\n\t\t\t} else if (text) {\n\t\t\t\tpattern.push(text);\n\t\t\t\tfor (let part = 0; part < partsLength; part++) {\n\t\t\t\t\t(sequence[part] as any[]).push(null);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\treturnStringType = () => {\n\t\t\tif (numbers || pattern.length > 1) {\n\t\t\t\t//console.error(`Velocity: Trying to pattern match mis-matched strings \"${propertyName}\":`, parts);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst isDisplay = propertyName === \"display\",\n\t\t\t\tisVisibility = propertyName === \"visibility\";\n\n\t\t\tfor (let part = 0; part < partsLength; part++) {\n\t\t\t\tconst value = parts[part];\n\n\t\t\t\tsequence[part][0] = value;\n\t\t\t\t// Don't care about duration...\n\t\t\t\tsequence[part].easing = validateEasing((isDisplay && value === \"none\") || (isVisibility && value === \"hidden\") || (!isDisplay && !isVisibility) ? \"at-end\" : \"at-start\", 400);\n\t\t\t}\n\t\t\tpattern[0] = false;\n\n\t\t\treturn sequence;\n\t\t};\n\tlet more = true;\n\n\tfor (let part = 0; part < partsLength; part++) {\n\t\tsequence[part] = [];\n\t}\n\twhile (more) {\n\t\tconst bits: ([number, string] | [number, string, boolean])[] = [],\n\t\t\tunits: string[] = [];\n\t\tlet text: string,\n\t\t\tisUnitless = false,\n\t\t\thasNumbers = false;\n\n\t\tfor (let part = 0; part < partsLength; part++) {\n\t\t\tconst index = indexes[part]++,\n\t\t\t\ttoken = tokens[part][index];\n\n\t\t\tif (token) {\n\t\t\t\tconst num = token.match(rxNumber); // [ignore, change, number, unit]\n\n\t\t\t\tif (num) {\n\t\t\t\t\t// It's a number, possibly with a += change and unit.\n\t\t\t\t\tif (text) {\n\t\t\t\t\t\treturn returnStringType();\n\t\t\t\t\t}\n\t\t\t\t\tconst digits = parseFloat(num[2]),\n\t\t\t\t\t\tunit = num[3],\n\t\t\t\t\t\tchange = num[1] ? num[1][0] + unit : undefined,\n\t\t\t\t\t\tchangeOrUnit = change || unit;\n\n\t\t\t\t\tif (digits && !units.includes(changeOrUnit)) {\n\t\t\t\t\t\t// Will be an empty string at the least.\n\t\t\t\t\t\tunits.push(changeOrUnit);\n\t\t\t\t\t}\n\t\t\t\t\tif (!unit) {\n\t\t\t\t\t\tif (digits) {\n\t\t\t\t\t\t\thasNumbers = true;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tisUnitless = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbits[part] = change ? [digits, changeOrUnit, true] : [digits, changeOrUnit];\n\t\t\t\t} else if (bits.length) {\n\t\t\t\t\treturn returnStringType();\n\t\t\t\t} else {\n\t\t\t\t\t// It's a string.\n\t\t\t\t\tif (!text) {\n\t\t\t\t\t\ttext = token;\n\t\t\t\t\t} else if (text !== token) {\n\t\t\t\t\t\treturn returnStringType();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (!part) {\n\t\t\t\tfor (; part < partsLength; part++) {\n\t\t\t\t\tconst index2 = indexes[part]++;\n\n\t\t\t\t\tif (tokens[part][index2]) {\n\t\t\t\t\t\treturn returnStringType();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// IMPORTANT: This is the exit point.\n\t\t\t\tmore = false;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// Different\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif (text) {\n\t\t\taddString(text);\n\t\t} else if (units.length) {\n\t\t\tif (units.length === 2 && isUnitless && !hasNumbers) {\n\t\t\t\t// If we only have two units, and one is empty, and it's only empty on \"0\", then treat us as having one unit\n\t\t\t\tunits.splice(units[0] ? 1 : 0, 1);\n\t\t\t}\n\t\t\tif (units.length === 1) {\n\t\t\t\t// All the same units, so append number then unit.\n\t\t\t\tconst unit = units[0],\n\t\t\t\t\tfirstLetter = unit[0];\n\n\t\t\t\tswitch (firstLetter) {\n\t\t\t\t\tcase \"+\":\n\t\t\t\t\tcase \"-\":\n\t\t\t\t\tcase \"*\":\n\t\t\t\t\tcase \"/\":\n\t\t\t\t\t\tif (propertyName) {\n\t\t\t\t\t\t\tconsole.error(`Velocity: The first property must not contain a relative function \"${propertyName}\":`, parts);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tpattern.push(false);\n\t\t\t\tfor (let part = 0; part < partsLength; part++) {\n\t\t\t\t\t(sequence[part] as any[]).push(bits[part][0]);\n\t\t\t\t}\n\t\t\t\taddString(unit);\n\t\t\t} else {\n\t\t\t\t// Multiple units, so must be inside a calc.\n\t\t\t\taddString(\"calc(\");\n\t\t\t\tconst patternCalc = pattern.length - 1; // Store the beginning of our calc.\n\n\t\t\t\tfor (let i = 0; i < units.length; i++) {\n\t\t\t\t\tconst unit = units[i],\n\t\t\t\t\t\tfirstLetter = unit[0],\n\t\t\t\t\t\tisComplex = firstLetter === \"*\" || firstLetter === \"/\",\n\t\t\t\t\t\tisMaths = isComplex || firstLetter === \"+\" || firstLetter === \"-\";\n\n\t\t\t\t\tif (isComplex) {\n\t\t\t\t\t\t// TODO: Not sure this should be done automatically!\n\t\t\t\t\t\tpattern[patternCalc] += \"(\";\n\t\t\t\t\t\taddString(\")\");\n\t\t\t\t\t}\n\t\t\t\t\tif (i) {\n\t\t\t\t\t\taddString(` ${isMaths ? firstLetter : \"+\"} `);\n\t\t\t\t\t}\n\t\t\t\t\tpattern.push(false);\n\t\t\t\t\tfor (let part = 0; part < partsLength; part++) {\n\t\t\t\t\t\tconst bit = bits[part],\n\t\t\t\t\t\t\tvalue = bit[1] === unit\n\t\t\t\t\t\t\t\t? bit[0]\n\t\t\t\t\t\t\t\t: bit.length === 3\n\t\t\t\t\t\t\t\t\t? sequence[part - 1][sequence[part - 1].length - 1]\n\t\t\t\t\t\t\t\t\t: isComplex ? 1 : 0;\n\n\t\t\t\t\t\t(sequence[part] as any[]).push(value);\n\t\t\t\t\t}\n\t\t\t\t\taddString(isMaths ? unit.substring(1) : unit);\n\t\t\t\t}\n\t\t\t\taddString(\")\");\n\t\t\t}\n\t\t}\n\t}\n\t// We've got here, so a valid sequence - now check and fix RGB rounding\n\t// and calc() nesting...\n\t// TODO: Nested calc(a + calc(b + c)) -> calc(a + (b + c))\n\tfor (let i = 0, inRGB = 0; i < pattern.length; i++) {\n\t\tconst text = pattern[i];\n\n\t\tif (isString(text)) {\n\t\t\tif (inRGB && (text as string).indexOf(\",\") >= 0) {\n\t\t\t\tinRGB++;\n\t\t\t} else if ((text as string).indexOf(\"rgb\") >= 0) {\n\t\t\t\tinRGB = 1;\n\t\t\t}\n\t\t} else if (inRGB) {\n\t\t\tif (inRGB < 4) {\n\t\t\t\tpattern[i] = true;\n\t\t\t} else {\n\t\t\t\tinRGB = 0;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn sequence;\n}\n\n/**\n * Convert a string-based tween with start and end strings, into a pattern\n * based tween with arrays.\n */\nfunction explodeTween(propertyName: string, tween: VelocityTween, duration: number, starting?: boolean) {\n\tconst startValue: string = tween.start,\n\t\tendValue: string = tween.end;\n\n\tif (!isString(endValue) || !isString(startValue)) {\n\t\treturn;\n\t}\n\tlet sequence: Sequence = findPattern([startValue, endValue], propertyName);\n\n\tif (!sequence && starting) {\n\t\t// This little piece will take a startValue, split out the\n\t\t// various numbers in it, then copy the endValue into the\n\t\t// startValue while replacing the numbers in it to match the\n\t\t// original start numbers as a repeating sequence.\n\t\t// Finally this function will run again with the new\n\t\t// startValue and a now matching pattern.\n\t\tconst startNumbers = startValue.match(/\\d\\.?\\d*/g) || [\"0\"],\n\t\t\tcount = startNumbers.length;\n\t\tlet index = 0;\n\n\t\tsequence = findPattern([endValue.replace(/\\d+\\.?\\d*/g, () => {\n\t\t\treturn startNumbers[index++ % count];\n\t\t}), endValue], propertyName);\n\t}\n\tif (sequence) {\n\t\tif (Velocity.debug) {\n\t\t\tconsole.log(`Velocity: Sequence found:`, sequence);\n\t\t}\n\t\tsequence[0].percent = 0;\n\t\tsequence[1].percent = 1;\n\t\ttween.sequence = sequence;\n\t\tswitch (tween.easing) {\n\t\t\tcase Easings[\"at-start\"]:\n\t\t\tcase Easings[\"during\"]:\n\t\t\tcase Easings[\"at-end\"]:\n\t\t\t\tsequence[0].easing = sequence[1].easing = tween.easing;\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\n/**\n * Expand all queued animations that haven't gone yet\n *\n * This will automatically expand the properties map for any recently added\n * animations so that the start and end values are correct.\n */\nexport function validateTweens(activeCall: AnimationCall) {\n\t// This might be called on an already-ready animation\n\tif (State.firstNew === activeCall) {\n\t\tState.firstNew = activeCall._next;\n\t}\n\t// Check if we're actually already ready\n\tif (activeCall._flags & AnimationFlags.EXPANDED) { // tslint:disable-line:no-bitwise\n\t\treturn;\n\t}\n\tconst element = activeCall.element,\n\t\ttweens = activeCall.tweens,\n\t\tduration = getValue(activeCall.options.duration, defaults.duration);\n\n\t// tslint:disable-next-line:forin\n\tfor (const propertyName in tweens) {\n\t\tconst tween = tweens[propertyName];\n\n\t\tif (tween.start == null) {\n\t\t\t// Get the start value as it's not been passed in\n\t\t\tconst startValue = getPropertyValue(activeCall.element, propertyName);\n\n\t\t\tif (isString(startValue)) {\n\t\t\t\ttween.start = fixColors(startValue) as any;\n\t\t\t\texplodeTween(propertyName, tween, duration, true);\n\t\t\t} else if (!Array.isArray(startValue)) {\n\t\t\t\tconsole.warn(`bad type`, tween, propertyName, startValue);\n\t\t\t}\n\t\t}\n\t\tif (Velocity.debug) {\n\t\t\tconsole.log(`tweensContainer \"${propertyName}\": ${JSON.stringify(tween)}`, element);\n\t\t}\n\t}\n\tactiveCall._flags |= AnimationFlags.EXPANDED; // tslint:disable-line:no-bitwise\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Tick\n */\n\n// Typedefs\nimport {AnimationCall, AnimationFlags, TweenStep} from \"../../velocity.d\";\n\n// Project\nimport {now} from \"../utility\";\nimport Velocity from \"../velocity\";\nimport {completeCall} from \"./complete\";\nimport {removeNestedCalc} from \"./css/removeNestedCalc\";\nimport {setPropertyValue} from \"./css/setPropertyValue\";\nimport {Data} from \"./data\";\nimport {defaults} from \"./defaults\";\nimport {linearEasing} from \"./easing/easings\";\nimport {freeAnimationCall} from \"./queue\";\nimport {State} from \"./state\";\nimport {validateTweens} from \"./tweens\";\n\n/**\n * Call the begin method of an animation in a separate function so it can\n * benefit from JIT compiling while still having a try/catch block.\n */\nexport function beginCall(activeCall: AnimationCall) {\n\tconst callback = activeCall.begin || activeCall.options.begin;\n\n\tif (callback) {\n\t\ttry {\n\t\t\tconst elements = activeCall.elements;\n\n\t\t\tcallback.call(elements, elements, activeCall);\n\t\t} catch (error) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthrow error;\n\t\t\t}, 1);\n\t\t}\n\t}\n}\n\n/**\n * Call the progress method of an animation in a separate function so it can\n * benefit from JIT compiling while still having a try/catch block.\n */\nfunction progressCall(activeCall: AnimationCall) {\n\tconst callback = activeCall.progress || activeCall.options.progress;\n\n\tif (callback) {\n\t\ttry {\n\t\t\tconst elements = activeCall.elements,\n\t\t\t\tpercentComplete = activeCall.percentComplete,\n\t\t\t\toptions = activeCall.options,\n\t\t\t\ttweenValue = activeCall.tween;\n\n\t\t\tcallback.call(elements,\n\t\t\t\telements,\n\t\t\t\tpercentComplete,\n\t\t\t\tMath.max(0, activeCall.timeStart + (activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaults.duration) - lastTick),\n\t\t\t\ttweenValue !== undefined ? tweenValue : String(percentComplete * 100),\n\t\t\t\tactiveCall);\n\t\t} catch (error) {\n\t\t\tsetTimeout(() => {\n\t\t\t\tthrow error;\n\t\t\t}, 1);\n\t\t}\n\t}\n}\n\n/**\n * Call callbacks, potentially run async with the main animation thread.\n */\nfunction asyncCallbacks() {\n\tfor (const activeCall of progressed) {\n\t\tprogressCall(activeCall);\n\t}\n\tprogressed.clear();\n\tfor (const activeCall of completed) {\n\t\tcompleteCall(activeCall);\n\t}\n\tcompleted.clear();\n}\n\n/**************\n Timing\n **************/\n\nconst FRAME_TIME = 1000 / 60,\n\t/**\n\t * Animations with a Complete callback.\n\t */\n\tcompleted = new Set<AnimationCall>(),\n\t/**\n\t * Animations with a Progress callback.\n\t */\n\tprogressed = new Set<AnimationCall>(),\n\t/**\n\t * Shim for window.performance in case it doesn't exist\n\t */\n\tperformance = (() => {\n\t\tconst perf = window.performance || {} as Performance;\n\n\t\tif (typeof perf.now !== \"function\") {\n\t\t\tconst nowOffset = perf.timing && perf.timing.navigationStart ? perf.timing.navigationStart : now();\n\n\t\t\tperf.now = () => {\n\t\t\t\treturn now() - nowOffset;\n\t\t\t};\n\t\t}\n\n\t\treturn perf;\n\t})(),\n\t/**\n\t * Proxy function for when rAF is not available.\n\t *\n\t * This should hopefully never be used as the browsers often throttle\n\t * this to less than one frame per second in the background, making it\n\t * completely unusable.\n\t */\n\trAFProxy = (callback: FrameRequestCallback) => {\n\t\treturn setTimeout(callback, Math.max(0, FRAME_TIME - (performance.now() - lastTick)));\n\t},\n\t/**\n\t * Either requestAnimationFrame, or a shim for it.\n\t */\n\trAFShim = window.requestAnimationFrame || rAFProxy;\n\n/**\n * Set if we are currently inside a tick() to prevent double-calling.\n */\nlet ticking: boolean,\n\t/**\n\t * A background WebWorker that sends us framerate messages when we're in\n\t * the background. Without this we cannot maintain frame accuracy.\n\t */\n\tworker: Worker;\n\n/**\n * The time that the last animation frame ran at. Set from tick(), and used\n * for missing rAF (ie, when not in focus etc).\n */\nexport let lastTick: number = 0;\n\n/**\n * WebWorker background function.\n *\n * When we're in the background this will send us a msg every tick, when in\n * the foreground it won't.\n *\n * When running in the background the browser reduces allowed CPU etc, so\n * we raun at 30fps instead of 60fps.\n */\nfunction workerFn(this: Worker) {\n\tlet interval: any;\n\n\tthis.onmessage = (e) => {\n\t\tswitch (e.data) {\n\t\t\tcase true:\n\t\t\t\tif (!interval) {\n\t\t\t\t\tinterval = setInterval(() => {\n\t\t\t\t\t\tthis.postMessage(true);\n\t\t\t\t\t}, 1000 / 30);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase false:\n\t\t\t\tif (interval) {\n\t\t\t\t\tclearInterval(interval);\n\t\t\t\t\tinterval = 0;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tthis.postMessage(e.data);\n\t\t\t\tbreak;\n\t\t}\n\t};\n}\n\ntry {\n\t// Create the worker - this might not be supported, hence the try/catch.\n\tworker = new Worker(URL.createObjectURL(new Blob([`(${workerFn})()`])));\n\t// Whenever the worker sends a message we tick()\n\tworker.onmessage = (e: MessageEvent) => {\n\t\tif (e.data === true) {\n\t\t\ttick();\n\t\t} else {\n\t\t\tasyncCallbacks();\n\t\t}\n\t};\n\t// And watch for going to the background to start the WebWorker running.\n\tif (!State.isMobile && document.hidden !== undefined) {\n\t\tdocument.addEventListener(\"visibilitychange\", () => {\n\t\t\tworker.postMessage(State.isTicking && document.hidden);\n\t\t});\n\t}\n} catch (e) {\n\t/*\n\t * WebWorkers are not supported in this format. This can happen in IE10\n\t * where it can't create one from a blob this way. We fallback, but make\n\t * no guarantees towards accuracy in this case.\n\t */\n}\n\n/**\n * Called on every tick, preferably through rAF. This is reponsible for\n * initialising any new animations, then starting any that need starting.\n * Finally it will expand any tweens and set the properties relating to\n * them. If there are any callbacks relating to the animations then they\n * will attempt to call at the end (with the exception of \"begin\").\n */\nexport function tick(timestamp?: number | boolean) {\n\tif (ticking) {\n\t\t// Should never happen - but if we've swapped back from hidden to\n\t\t// visibile then we want to make sure\n\t\treturn;\n\t}\n\tticking = true;\n\t/* An empty timestamp argument indicates that this is the first tick occurence since ticking was turned on.\n\t We leverage this metadata to fully ignore the first tick pass since RAF's initial pass is fired whenever\n\t the browser's next tick sync time occurs, which results in the first elements subjected to Velocity\n\t calls being animated out of sync with any elements animated immediately thereafter. In short, we ignore\n\t the first RAF tick pass so that elements being immediately consecutively animated -- instead of simultaneously animated\n\t by the same Velocity call -- are properly batched into the same initial RAF tick and consequently remain in sync thereafter. */\n\tif (timestamp !== false) {\n\t\tconst timeCurrent = performance.now(),\n\t\t\tdeltaTime = lastTick ? timeCurrent - lastTick : FRAME_TIME,\n\t\t\tdefaultSpeed = defaults.speed,\n\t\t\tdefaultEasing = defaults.easing,\n\t\t\tdefaultDuration = defaults.duration;\n\t\tlet activeCall: AnimationCall,\n\t\t\tnextCall: AnimationCall;\n\n\t\tif (deltaTime >= defaults.minFrameTime || !lastTick) {\n\t\t\tlastTick = timeCurrent;\n\n\t\t\t/********************\n\t\t\t Call Iteration\n\t\t\t ********************/\n\n\t\t\t// Expand any tweens that might need it.\n\t\t\twhile (State.firstNew) {\n\t\t\t\tvalidateTweens(State.firstNew);\n\t\t\t}\n\t\t\t// Iterate through each active call.\n\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = activeCall._next) {\n\t\t\t\tconst element = activeCall.element,\n\t\t\t\t\tdata = Data(element);\n\n\t\t\t\t// Check to see if this element has been deleted midway\n\t\t\t\t// through the animation. If it's gone then end this\n\t\t\t\t// animation.\n\t\t\t\tif (!element.parentNode || !data) {\n\t\t\t\t\t// TODO: Remove safely - decrease count, delete data, remove from arrays\n\t\t\t\t\tfreeAnimationCall(activeCall);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Don't bother getting until we can use these.\n\t\t\t\tconst options = activeCall.options,\n\t\t\t\t\tflags = activeCall._flags;\n\t\t\t\tlet timeStart = activeCall.timeStart;\n\n\t\t\t\t// If this is the first time that this call has been\n\t\t\t\t// processed by tick() then we assign timeStart now so that\n\t\t\t\t// it's value is as close to the real animation start time\n\t\t\t\t// as possible.\n\t\t\t\tif (!timeStart) {\n\t\t\t\t\tconst queue = activeCall.queue != null ? activeCall.queue : options.queue;\n\n\t\t\t\t\ttimeStart = timeCurrent - deltaTime;\n\t\t\t\t\tif (queue !== false) {\n\t\t\t\t\t\ttimeStart = Math.max(timeStart, data.lastFinishList[queue] || 0);\n\t\t\t\t\t}\n\t\t\t\t\tactiveCall.timeStart = timeStart;\n\t\t\t\t}\n\t\t\t\t// If this animation is paused then skip processing unless\n\t\t\t\t// it has been set to resume.\n\t\t\t\tif (flags & AnimationFlags.PAUSED) { // tslint:disable-line:no-bitwise\n\t\t\t\t\t// Update the time start to accomodate the paused\n\t\t\t\t\t// completion amount.\n\t\t\t\t\tactiveCall.timeStart += deltaTime;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t// Check if this animation is ready - if it's synced then it\n\t\t\t\t// needs to wait for all other animations in the sync\n\t\t\t\tif (!(flags & AnimationFlags.READY)) { // tslint:disable-line:no-bitwise\n\t\t\t\t\tactiveCall._flags |= AnimationFlags.READY; // tslint:disable-line:no-bitwise\n\t\t\t\t\toptions._ready++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Need to split the loop, as ready sync animations must all get\n\t\t\t// the same start time.\n\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = nextCall) {\n\t\t\t\tconst flags = activeCall._flags;\n\n\t\t\t\tnextCall = activeCall._next;\n\t\t\t\tif (!(flags & AnimationFlags.READY) || (flags & AnimationFlags.PAUSED)) { // tslint:disable-line:no-bitwise\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst options = activeCall.options;\n\n\t\t\t\tif ((flags & AnimationFlags.SYNC) && options._ready < options._total) { // tslint:disable-line:no-bitwise\n\t\t\t\t\tactiveCall.timeStart += deltaTime;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tconst speed = activeCall.speed != null ? activeCall.speed : options.speed != null ? options.speed : defaultSpeed;\n\t\t\t\tlet timeStart = activeCall.timeStart;\n\n\t\t\t\t// Don't bother getting until we can use these.\n\t\t\t\tif (!(flags & AnimationFlags.STARTED)) { // tslint:disable-line:no-bitwise\n\t\t\t\t\tconst delay = activeCall.delay != null ? activeCall.delay : options.delay;\n\n\t\t\t\t\t// Make sure anything we've delayed doesn't start\n\t\t\t\t\t// animating yet, there might still be an active delay\n\t\t\t\t\t// after something has been un-paused\n\t\t\t\t\tif (delay) {\n\t\t\t\t\t\tif (timeStart + (delay / speed) > timeCurrent) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tactiveCall.timeStart = timeStart += delay / (delay > 0 ? speed : 1);\n\t\t\t\t\t}\n\t\t\t\t\tactiveCall._flags |= AnimationFlags.STARTED; // tslint:disable-line:no-bitwise\n\t\t\t\t\t// The begin callback is fired once per call, not once\n\t\t\t\t\t// per element, and is passed the full raw DOM element\n\t\t\t\t\t// set as both its context and its first argument.\n\t\t\t\t\tif (options._started++ === 0) {\n\t\t\t\t\t\toptions._first = activeCall;\n\t\t\t\t\t\tif (options.begin) {\n\t\t\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\n\t\t\t\t\t\t\tbeginCall(activeCall);\n\t\t\t\t\t\t\t// Only called once, even if reversed or repeated\n\t\t\t\t\t\t\toptions.begin = undefined;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (speed !== 1) {\n\t\t\t\t\t// On the first frame we may have a shorter delta\n\t\t\t\t\t// const delta = Math.min(deltaTime, timeCurrent - timeStart);\n\t\t\t\t\tactiveCall.timeStart = timeStart += Math.min(deltaTime, timeCurrent - timeStart) * (1 - speed);\n\t\t\t\t}\n\t\t\t\tconst activeEasing = activeCall.easing != null ? activeCall.easing : options.easing != null ? options.easing : defaultEasing,\n\t\t\t\t\tmillisecondsEllapsed = activeCall.ellapsedTime = timeCurrent - timeStart,\n\t\t\t\t\tduration = activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaultDuration,\n\t\t\t\t\tpercentComplete = activeCall.percentComplete = Velocity.mock ? 1 : Math.min(millisecondsEllapsed / duration, 1),\n\t\t\t\t\ttweens = activeCall.tweens,\n\t\t\t\t\treverse = flags & AnimationFlags.REVERSE; // tslint:disable-line:no-bitwise\n\n\t\t\t\tif (activeCall.progress || (options._first === activeCall && options.progress)) {\n\t\t\t\t\tprogressed.add(activeCall);\n\t\t\t\t}\n\t\t\t\tif (percentComplete === 1) {\n\t\t\t\t\tcompleted.add(activeCall);\n\t\t\t\t}\n\t\t\t\t// tslint:disable-next-line:forin\n\t\t\t\tfor (const property in tweens) {\n\t\t\t\t\t// For every element, iterate through each property.\n\t\t\t\t\tconst tween = tweens[property],\n\t\t\t\t\t\tsequence = tween.sequence,\n\t\t\t\t\t\tpattern = sequence.pattern;\n\t\t\t\t\tlet currentValue = \"\",\n\t\t\t\t\t\ti = 0;\n\n\t\t\t\t\tif (pattern) {\n\t\t\t\t\t\tconst easingComplete = (tween.easing || activeEasing)(percentComplete, 0, 1, property);\n\t\t\t\t\t\tlet best = 0;\n\n\t\t\t\t\t\tfor (let j = 0; j < sequence.length - 1; j++) {\n\t\t\t\t\t\t\tif (sequence[j].percent < easingComplete) {\n\t\t\t\t\t\t\t\tbest = j;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst tweenFrom: TweenStep = sequence[best],\n\t\t\t\t\t\t\ttweenTo: TweenStep = sequence[best + 1] || tweenFrom,\n\t\t\t\t\t\t\trawPercent = (percentComplete - tweenFrom.percent) / (tweenTo.percent - tweenFrom.percent),\n\t\t\t\t\t\t\ttweenPercent = reverse ? 1 - rawPercent : rawPercent,\n\t\t\t\t\t\t\teasing = tweenTo.easing || activeEasing || linearEasing;\n\n\t\t\t\t\t\tfor (; i < pattern.length; i++) {\n\t\t\t\t\t\t\tconst startValue = tweenFrom[i];\n\n\t\t\t\t\t\t\tif (startValue == null) {\n\t\t\t\t\t\t\t\tcurrentValue += pattern[i];\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tconst endValue = tweenTo[i];\n\n\t\t\t\t\t\t\t\tif (startValue === endValue) {\n\t\t\t\t\t\t\t\t\tcurrentValue += startValue;\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// All easings must deal with numbers except for our internal ones.\n\t\t\t\t\t\t\t\t\tconst result = easing(tweenPercent, startValue as number, endValue as number, property);\n\n\t\t\t\t\t\t\t\t\tcurrentValue += pattern[i] !== true ? result : Math.round(result);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (property !== \"tween\") {\n\t\t\t\t\t\t\tif (percentComplete === 1) {\n\t\t\t\t\t\t\t\tcurrentValue = removeNestedCalc(currentValue);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// TODO: To solve an IE<=8 positioning bug, the unit type must be dropped when setting a property value of 0 - add normalisations to legacy\n\t\t\t\t\t\t\tsetPropertyValue(activeCall.element, property, currentValue, tween.fn);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// Skip the fake 'tween' property as that is only\n\t\t\t\t\t\t\t// passed into the progress callback.\n\t\t\t\t\t\t\tactiveCall.tween = currentValue;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconsole.warn(`VelocityJS: Missing pattern:`, property, JSON.stringify(tween[property]));\n\t\t\t\t\t\tdelete tweens[property];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (progressed.size || completed.size) {\n\t\t\t\tif (!document.hidden) {\n\t\t\t\t\tasyncCallbacks();\n\t\t\t\t} else if (worker) {\n\t\t\t\t\tworker.postMessage(\"\");\n\t\t\t\t} else {\n\t\t\t\t\tsetTimeout(asyncCallbacks, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tif (State.first) {\n\t\tState.isTicking = true;\n\t\tif (!document.hidden) {\n\t\t\trAFShim(tick);\n\t\t} else if (!worker) {\n\t\t\trAFProxy(tick);\n\t\t} else if (timestamp === false) {\n\t\t\t// Make sure we turn on the messages.\n\t\t\tworker.postMessage(true);\n\t\t}\n\t} else {\n\t\tState.isTicking = false;\n\t\tlastTick = 0;\n\t\tif (document.hidden && worker) {\n\t\t\t// Make sure we turn off the messages.\n\t\t\tworker.postMessage(false);\n\t\t}\n\t}\n\tticking = false;\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Finish all animation.\n */\n\n// Typedefs\nimport {AnimationCall, AnimationFlags, VelocityPromise, VelocityResult} from \"../../../velocity.d\";\n\n// Project\nimport {isVelocityResult} from \"../../types\";\nimport {getValue} from \"../../utility\";\nimport {completeCall} from \"../complete\";\nimport {setPropertyValue} from \"../css/setPropertyValue\";\nimport {defaults} from \"../defaults\";\nimport {validateQueue} from \"../options\";\nimport {State} from \"../state\";\nimport {beginCall} from \"../tick\";\nimport {validateTweens} from \"../tweens\";\nimport {registerAction} from \"./actions\";\n\n/**\n * Check if an animation should be finished, and if so we set the tweens to\n * the final value for it, then call complete.\n */\nfunction checkAnimationShouldBeFinished(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\n\tvalidateTweens(animation);\n\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\n\t\tif (!(animation._flags & AnimationFlags.STARTED)) { // tslint:disable-line:no-bitwise\n\t\t\t// Copied from tick.ts - ensure that the animation is completely\n\t\t\t// valid and run begin() before complete().\n\t\t\tconst options = animation.options;\n\n\t\t\t// The begin callback is fired once per call, not once per\n\t\t\t// element, and is passed the full raw DOM element set as both\n\t\t\t// its context and its first argument.\n\t\t\tif (options._started++ === 0) {\n\t\t\t\toptions._first = animation;\n\t\t\t\tif (options.begin) {\n\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\n\t\t\t\t\tbeginCall(animation);\n\t\t\t\t\t// Only called once, even if reversed or repeated\n\t\t\t\t\toptions.begin = undefined;\n\t\t\t\t}\n\t\t\t}\n\t\t\tanimation._flags |= AnimationFlags.STARTED; // tslint:disable-line:no-bitwise\n\t\t}\n\t\t// tslint:disable-next-line:forin\n\t\tfor (const property in animation.tweens) {\n\t\t\tconst tween = animation.tweens[property],\n\t\t\t\tsequence = tween.sequence,\n\t\t\t\tpattern = sequence.pattern;\n\t\t\tlet currentValue = \"\",\n\t\t\t\ti = 0;\n\n\t\t\tif (pattern) {\n\t\t\t\tconst endValues = sequence[sequence.length - 1];\n\n\t\t\t\tfor (; i < pattern.length; i++) {\n\t\t\t\t\tconst endValue = endValues[i];\n\n\t\t\t\t\tcurrentValue += endValue == null ? pattern[i] : endValue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetPropertyValue(animation.element, property, currentValue, tween.fn);\n\t\t}\n\t\tcompleteCall(animation);\n\t}\n}\n\n/**\n * When the finish action is triggered, the elements' currently active call is\n * immediately finished. When an element is finished, the next item in its\n * animation queue is immediately triggered. If passed via a chained call\n * then this will only target the animations in that call, and not the\n * elements linked to it.\n *\n * A queue name may be passed in to specify that only animations on the\n * named queue are finished. The default queue is named \"\". In addition the\n * value of `false` is allowed for the queue name.\n *\n * An final argument may be passed in to clear an element's remaining queued\n * calls. This may only be the value `true`.\n */\nfunction finish(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise): void {\n\tconst queueName: string | false = validateQueue(args[0], true),\n\t\tdefaultQueue: false | string = defaults.queue,\n\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\n\n\tif (isVelocityResult(elements) && elements.velocity.animations) {\n\t\tfor (const animation of elements.velocity.animations) {\n\t\t\tcheckAnimationShouldBeFinished(animation, queueName, defaultQueue);\n\t\t}\n\t} else {\n\t\twhile (State.firstNew) {\n\t\t\tvalidateTweens(State.firstNew);\n\t\t}\n\t\tfor (let activeCall = State.first, nextCall: AnimationCall; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\n\t\t\tnextCall = activeCall._next;\n\t\t\tif (!elements || elements.includes(activeCall.element)) {\n\t\t\t\tcheckAnimationShouldBeFinished(activeCall, queueName, defaultQueue);\n\t\t\t}\n\t\t}\n\t}\n\tif (promiseHandler) {\n\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\n\t\t\telements.then(promiseHandler._resolver);\n\t\t} else {\n\t\t\tpromiseHandler._resolver(elements);\n\t\t}\n\t}\n}\n\nregisterAction([\"finish\", finish], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Get or set a value from one or more running animations.\n */\n\nimport {AnimationCall, AnimationFlags, VelocityPromise, VelocityResult} from \"../../../velocity.d\";\n\nimport {isVelocityResult} from \"../../types\";\nimport {getValue} from \"../../utility\";\nimport {defaults} from \"../defaults\";\nimport {\n\tvalidateBegin, validateCache, validateComplete, validateDelay, validateDuration,\n\tvalidateFpsLimit, validateLoop, validateQueue, validateRepeat,\n} from \"../options\";\nimport {State} from \"../state\";\nimport {lastTick} from \"../tick\";\nimport {registerAction} from \"./actions\";\n\n/**\n * Used to map getters for the various AnimationFlags.\n */\nconst animationFlags: {[key: string]: number} = {\n\tisExpanded: AnimationFlags.EXPANDED,\n\tisReady: AnimationFlags.READY,\n\tisStarted: AnimationFlags.STARTED,\n\tisStopped: AnimationFlags.STOPPED,\n\tisPaused: AnimationFlags.PAUSED,\n\tisSync: AnimationFlags.SYNC,\n\tisReverse: AnimationFlags.REVERSE,\n};\n\n/**\n * Get or set an option or running AnimationCall data value. If there is no\n * value passed then it will get, otherwise we will set.\n *\n * NOTE: When using \"get\" this will not touch the Promise as it is never\n * returned to the user.\n */\nfunction option(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\n\tconst key = args[0],\n\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\n\t\tqueueName = queue === \"false\" ? false : validateQueue(queue, true);\n\tlet animations: AnimationCall[],\n\t\tvalue = args[1];\n\n\tif (!key) {\n\t\tconsole.warn(`VelocityJS: Cannot access a non-existant key!`);\n\n\t\treturn null;\n\t}\n\t// If we're chaining the return value from Velocity then we are only\n\t// interested in the values related to that call\n\tif (isVelocityResult(elements) && elements.velocity.animations) {\n\t\tanimations = elements.velocity.animations;\n\t} else {\n\t\tanimations = [];\n\n\t\tfor (let activeCall = State.first; activeCall; activeCall = activeCall._next) {\n\t\t\tif (elements.indexOf(activeCall.element) >= 0 && getValue(activeCall.queue, activeCall.options.queue) === queueName) {\n\t\t\t\tanimations.push(activeCall);\n\t\t\t}\n\t\t}\n\t\t// If we're dealing with multiple elements that are pointing at a\n\t\t// single running animation, then instead treat them as a single\n\t\t// animation.\n\t\tif (elements.length > 1 && animations.length > 1) {\n\t\t\tlet i = 1,\n\t\t\t\toptions = animations[0].options;\n\n\t\t\twhile (i < animations.length) {\n\t\t\t\tif (animations[i++].options !== options) {\n\t\t\t\t\toptions = null;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// TODO: this needs to check that they're actually a sync:true animation to merge the results, otherwise the individual values may be different\n\t\t\tif (options) {\n\t\t\t\tanimations = [animations[0]];\n\t\t\t}\n\t\t}\n\t}\n\t// GET\n\tif (value === undefined) {\n\t\tconst result = [],\n\t\t\tflag = animationFlags[key];\n\n\t\tfor (const animation of animations) {\n\t\t\tif (flag === undefined) {\n\t\t\t\t// A normal key to get.\n\t\t\t\tresult.push(getValue(animation[key], animation.options[key]));\n\t\t\t} else {\n\t\t\t\t// A flag that we're checking against.\n\t\t\t\tresult.push((animation._flags & flag) === 0); // tslint:disable-line:no-bitwise\n\t\t\t}\n\t\t}\n\t\tif (elements.length === 1 && animations.length === 1) {\n\t\t\t// If only a single animation is found and we're only targetting a\n\t\t\t// single element, then return the value directly\n\t\t\treturn result[0];\n\t\t}\n\n\t\treturn result;\n\t}\n\t// SET\n\tlet isPercentComplete: boolean;\n\n\tswitch (key) {\n\t\tcase \"cache\":\n\t\t\tvalue = validateCache(value);\n\t\t\tbreak;\n\t\tcase \"begin\":\n\t\t\tvalue = validateBegin(value);\n\t\t\tbreak;\n\t\tcase \"complete\":\n\t\t\tvalue = validateComplete(value);\n\t\t\tbreak;\n\t\tcase \"delay\":\n\t\t\tvalue = validateDelay(value);\n\t\t\tbreak;\n\t\tcase \"duration\":\n\t\t\tvalue = validateDuration(value);\n\t\t\tbreak;\n\t\tcase \"fpsLimit\":\n\t\t\tvalue = validateFpsLimit(value);\n\t\t\tbreak;\n\t\tcase \"loop\":\n\t\t\tvalue = validateLoop(value);\n\t\t\tbreak;\n\t\tcase \"percentComplete\":\n\t\t\tisPercentComplete = true;\n\t\t\tvalue = parseFloat(value);\n\t\t\tbreak;\n\t\tcase \"repeat\":\n\t\tcase \"repeatAgain\":\n\t\t\tvalue = validateRepeat(value);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tif (key[0] !== \"_\") {\n\t\t\t\tconst num = parseFloat(value);\n\n\t\t\t\tif (value === String(num)) {\n\t\t\t\t\tvalue = num;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t// deliberate fallthrough\n\t\tcase \"queue\":\n\t\tcase \"promise\":\n\t\tcase \"promiseRejectEmpty\":\n\t\tcase \"easing\":\n\t\tcase \"started\":\n\t\t\tconsole.warn(`VelocityJS: Trying to set a read-only key:`, key);\n\n\t\t\treturn;\n\t}\n\tif (value === undefined || value !== value) {\n\t\tconsole.warn(`VelocityJS: Trying to set an invalid value:${key}=${value} (${args[1]})`);\n\n\t\treturn null;\n\t}\n\tfor (const animation of animations) {\n\t\tif (isPercentComplete) {\n\t\t\tanimation.timeStart = lastTick - (getValue(animation.duration, animation.options.duration, defaults.duration) * value);\n\t\t} else {\n\t\t\tanimation[key] = value;\n\t\t}\n\t}\n\tif (promiseHandler) {\n\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\n\t\t\telements.then(promiseHandler._resolver);\n\t\t} else {\n\t\t\tpromiseHandler._resolver(elements);\n\t\t}\n\t}\n}\n\nregisterAction([\"option\", option], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Pause and resume animation.\n */\n\n// Typedefs\nimport {AnimationCall, AnimationFlags, VelocityPromise, VelocityResult} from \"../../../velocity.d\";\n\n// Project\nimport {isVelocityResult} from \"../../types\";\nimport {getValue} from \"../../utility\";\nimport {defaults} from \"../defaults\";\nimport {validateQueue} from \"../options\";\nimport {State} from \"../state\";\nimport {registerAction} from \"./actions\";\n\n/**\n * Check if an animation should be paused / resumed.\n */\nfunction checkAnimation(animation: AnimationCall, queueName: false | string, defaultQueue: false | string, isPaused: boolean) {\n\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\n\t\tif (isPaused) {\n\t\t\tanimation._flags |= AnimationFlags.PAUSED; // tslint:disable-line:no-bitwise\n\t\t} else {\n\t\t\tanimation._flags &= ~AnimationFlags.PAUSED; // tslint:disable-line:no-bitwise\n\t\t}\n\t}\n}\n\n/**\n * Pause and Resume are call-wide (not on a per element basis). Thus, calling pause or resume on a\n * single element will cause any calls that contain tweens for that element to be paused/resumed\n * as well.\n */\nfunction pauseResume(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string) {\n\tconst isPaused = action.indexOf(\"pause\") === 0,\n\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\n\t\tqueueName = queue === \"false\" ? false : validateQueue(args[0]),\n\t\tdefaultQueue = defaults.queue;\n\n\tif (isVelocityResult(elements) && elements.velocity.animations) {\n\t\tfor (const animation of elements.velocity.animations) {\n\t\t\tcheckAnimation(animation, queueName, defaultQueue, isPaused);\n\t\t}\n\t} else {\n\t\tlet activeCall: AnimationCall = State.first;\n\n\t\twhile (activeCall) {\n\t\t\tif (!elements || elements.includes(activeCall.element)) {\n\t\t\t\tcheckAnimation(activeCall, queueName, defaultQueue, isPaused);\n\t\t\t}\n\t\t\tactiveCall = activeCall._next;\n\t\t}\n\t}\n\tif (promiseHandler) {\n\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\n\t\t\telements.then(promiseHandler._resolver);\n\t\t} else {\n\t\t\tpromiseHandler._resolver(elements);\n\t\t}\n\t}\n}\n\nregisterAction([\"pause\", pauseResume], true);\nregisterAction([\"resume\", pauseResume], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Get or set a property from one or more elements.\n */\n\n// Typedefs\nimport {VelocityPromise, VelocityResult} from \"../../../velocity.d\";\n\n// Project\nimport {isNumber, isPlainObject, isString, isVelocityResult} from \"../../types\";\nimport {fixColors} from \"../css/fixColors\";\nimport {getPropertyValue} from \"../css/getPropertyValue\";\nimport {setPropertyValue} from \"../css/setPropertyValue\";\nimport {registerAction} from \"./actions\";\n\n/**\n * Get or set a style of Nomralised property value on one or more elements.\n * If there is no value passed then it will get, otherwise we will set.\n *\n * NOTE: When using \"get\" this will not touch the Promise as it is never\n * returned to the user.\n *\n * This can fail to set, and will reject the Promise if it does so.\n *\n * Velocity(elements, \"style\", \"property\", \"value\") => elements;\n * Velocity(elements, \"style\", {\"property\": \"value\", ...}) => elements;\n * Velocity(element, \"style\", \"property\") => \"value\";\n * Velocity(elements, \"style\", \"property\") => [\"value\", ...];\n */\nexport function propertyAction(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\n\tconst property = args[0],\n\t\tvalue = args[1];\n\n\tif (!property) {\n\t\tconsole.warn(`VelocityJS: Cannot access a non-existant property!`);\n\n\t\treturn null;\n\t}\n\t// GET\n\tif (value === undefined && !isPlainObject(property)) {\n\t\tif (Array.isArray(property)) {\n\t\t\tif (elements.length === 1) {\n\t\t\t\tconst result = {};\n\n\t\t\t\tfor (const prop of property) {\n\t\t\t\t\tresult[prop] = fixColors(getPropertyValue(elements[0], prop));\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t} else {\n\t\t\t\tconst result = [];\n\n\t\t\t\tfor (const element of elements) {\n\t\t\t\t\tconst res = {};\n\n\t\t\t\t\tfor (const prop of property) {\n\t\t\t\t\t\tres[prop] = fixColors(getPropertyValue(element, prop));\n\t\t\t\t\t}\n\n\t\t\t\t\tresult.push(res);\n\t\t\t\t}\n\n\t\t\t\treturn result;\n\t\t\t}\n\t\t} else {\n\t\t\t// If only a single animation is found and we're only targetting a\n\t\t\t// single element, then return the value directly\n\t\t\tif (elements.length === 1) {\n\t\t\t\treturn fixColors(getPropertyValue(elements[0], property));\n\t\t\t}\n\t\t\tconst result = [];\n\n\t\t\tfor (const element of elements) {\n\t\t\t\tresult.push(fixColors(getPropertyValue(element, property)));\n\t\t\t}\n\n\t\t\treturn result;\n\t\t}\n\t}\n\t// SET\n\tconst error: string[] = [];\n\n\tif (isPlainObject(property)) {\n\t\tfor (const propertyName in property) {\n\t\t\tif (property.hasOwnProperty(propertyName)) {\n\t\t\t\tfor (const element of elements) {\n\t\t\t\t\tconst propertyValue = property[propertyName];\n\n\t\t\t\t\tif (isString(propertyValue) || isNumber(propertyValue)) {\n\t\t\t\t\t\tsetPropertyValue(element, propertyName, property[propertyName]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\terror.push(`Cannot set a property \"${propertyName}\" to an unknown type: ${typeof propertyValue}`);\n\t\t\t\t\t\tconsole.warn(`VelocityJS: Cannot set a property \"${propertyName}\" to an unknown type:`, propertyValue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else if (isString(value) || isNumber(value)) {\n\t\tfor (const element of elements) {\n\t\t\tsetPropertyValue(element, property, String(value));\n\t\t}\n\t} else {\n\t\terror.push(`Cannot set a property \"${property}\" to an unknown type: ${typeof value}`);\n\t\tconsole.warn(`VelocityJS: Cannot set a property \"${property}\" to an unknown type:`, value);\n\t}\n\tif (promiseHandler) {\n\t\tif (error.length) {\n\t\t\tpromiseHandler._rejecter(error.join(\", \"));\n\t\t} else if (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\n\t\t\telements.then(promiseHandler._resolver);\n\t\t} else {\n\t\t\tpromiseHandler._resolver(elements);\n\t\t}\n\t}\n}\n\nregisterAction([\"property\", propertyAction], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Actions that can be performed by passing a string instead of a propertiesMap.\n */\n\n// Typedefs\nimport {HTMLorSVGElement, VelocityPromise, VelocityResult} from \"../../../velocity.d\";\n\n// Project\nimport {registerAction} from \"./actions\";\n\nregisterAction([\"reverse\", (args?: any[], elements?: HTMLorSVGElement[] | VelocityResult, promiseHandler?: VelocityPromise, action?: string) => {\n\t// NOTE: Code needs to split out before here - but this is needed to prevent it being overridden\n\tthrow new SyntaxError(\"VelocityJS: The 'reverse' action is built in and private.\");\n}], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Stop animation.\n */\n\n// Typedefs\nimport {AnimationCall, AnimationFlags, VelocityPromise, VelocityResult} from \"../../../velocity.d\";\n\n// Project\nimport {isVelocityResult} from \"../../types\";\nimport {getValue} from \"../../utility\";\nimport {completeCall} from \"../complete\";\nimport {defaults} from \"../defaults\";\nimport {validateQueue} from \"../options\";\nimport {State} from \"../state\";\nimport {validateTweens} from \"../tweens\";\nimport {registerAction} from \"./actions\";\n\n/**\n * Check if an animation should be stopped, and if so then set the STOPPED\n * flag on it, then call complete.\n */\nfunction checkAnimationShouldBeStopped(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\n\tvalidateTweens(animation);\n\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\n\t\tanimation._flags |= AnimationFlags.STOPPED; // tslint:disable-line:no-bitwise\n\t\tcompleteCall(animation);\n\t}\n}\n\n/**\n * When the stop action is triggered, the elements' currently active call is\n * immediately stopped. When an element is stopped, the next item in its\n * animation queue is immediately triggered. If passed via a chained call\n * then this will only target the animations in that call, and not the\n * elements linked to it.\n *\n * A queue name may be passed in to specify that only animations on the\n * named queue are stopped. The default queue is named \"\". In addition the\n * value of `false` is allowed for the queue name.\n *\n * An final argument may be passed in to clear an element's remaining queued\n * calls. This may only be the value `true`.\n *\n * Note: The stop command runs prior to Velocity's Queueing phase since its\n * behavior is intended to take effect *immediately*, regardless of the\n * element's current queue state.\n */\nfunction stop(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise, action?: string): void {\n\tconst queueName: string | false = validateQueue(args[0], true),\n\t\tdefaultQueue: false | string = defaults.queue,\n\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\n\n\tif (isVelocityResult(elements) && elements.velocity.animations) {\n\t\tfor (const animation of elements.velocity.animations) {\n\t\t\tcheckAnimationShouldBeStopped(animation, queueName, defaultQueue);\n\t\t}\n\t} else {\n\t\twhile (State.firstNew) {\n\t\t\tvalidateTweens(State.firstNew);\n\t\t}\n\t\tfor (let activeCall = State.first, nextCall: AnimationCall; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\n\t\t\tnextCall = activeCall._next;\n\t\t\tif (!elements || elements.includes(activeCall.element)) {\n\t\t\t\tcheckAnimationShouldBeStopped(activeCall, queueName, defaultQueue);\n\t\t\t}\n\t\t}\n\t}\n\tif (promiseHandler) {\n\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\n\t\t\telements.then(promiseHandler._resolver);\n\t\t} else {\n\t\t\tpromiseHandler._resolver(elements);\n\t\t}\n\t}\n}\n\nregisterAction([\"stop\", stop], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Get or set a property from one or more elements.\n */\n\n// Project\nimport {registerAction} from \"./actions\";\nimport {propertyAction} from \"./property\";\n\nregisterAction([\"style\", propertyAction], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Get or set a property from one or more elements.\n */\n\n// Typedefs\nimport {\n\tAnimationCall, HTMLorSVGElement, Properties, Sequence, SequenceList,\n\tTweenStep, VelocityEasingType, VelocityPromise, VelocityProperty, VelocityResult,\n} from \"../../../velocity.d\";\n\n// Project\nimport {isNumber, isPlainObject, isString} from \"../../types\";\nimport {getValue} from \"../../utility\";\nimport {defaults} from \"../defaults\";\nimport {linearEasing} from \"../easing/easings\";\nimport {validateEasing} from \"../options\";\nimport {expandSequence} from \"../sequences\";\nimport {SequencesObject} from \"../sequencesObject\";\nimport {expandProperties} from \"../tweens\";\nimport {registerAction} from \"./actions\";\n\n// Constants\nimport {DEFAULT_DURATION} from \"../../constants\";\n\n/**\n *\n */\nfunction tweenAction(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\n\tlet requireForcefeeding: boolean;\n\n\tif (!elements) {\n\t\tif (!args.length) {\n\t\t\tconsole.info(`Velocity(<element>, \\\"tween\\\", percentComplete, property, end | [end, <easing>, <start>], <easing>) => value\nVelocity(<element>, \\\"tween\\\", percentComplete, {property: end | [end, <easing>, <start>], ...}, <easing>) => {property: value, ...}`);\n\n\t\t\treturn null;\n\t\t}\n\t\telements = [document.body];\n\t\trequireForcefeeding = true;\n\t} else if (elements.length !== 1) {\n\t\t// TODO: Allow more than a single element to return an array of results\n\t\tthrow new Error(\"VelocityJS: Cannot tween more than one element!\");\n\t}\n\tconst percentComplete: number = args[0],\n\t\tfakeAnimation = {\n\t\t\telements,\n\t\t\telement: elements[0],\n\t\t\tqueue: false,\n\t\t\toptions: {\n\t\t\t\tduration: 1000,\n\t\t\t},\n\t\t\ttweens: null as {[property: string]: Sequence},\n\t\t} as any as AnimationCall,\n\t\tresult: {[property: string]: string} = {};\n\tlet properties: Properties<string> = args[1],\n\t\tsingleResult: boolean,\n\t\tmaybeSequence: SequenceList,\n\t\teasing: VelocityEasingType = args[2],\n\t\tcount = 0;\n\n\tif (isString(args[1])) {\n\t\tif (SequencesObject && SequencesObject[args[1]]) {\n\t\t\tmaybeSequence = SequencesObject[args[1]];\n\t\t\tproperties = {};\n\t\t\teasing = args[2];\n\t\t} else {\n\t\t\tsingleResult = true;\n\t\t\tproperties = {\n\t\t\t\t[args[1]]: args[2],\n\t\t\t};\n\t\t\teasing = args[3];\n\t\t}\n\t} else if (Array.isArray(args[1])) {\n\t\tsingleResult = true;\n\t\tproperties = {\n\t\t\ttween: args[1],\n\t\t} as any;\n\t\teasing = args[2];\n\t}\n\tif (!isNumber(percentComplete) || percentComplete < 0 || percentComplete > 1) {\n\t\tthrow new Error(\"VelocityJS: Must tween a percentage from 0 to 1!\");\n\t}\n\tif (!isPlainObject(properties)) {\n\t\tthrow new Error(\"VelocityJS: Cannot tween an invalid property!\");\n\t}\n\tif (requireForcefeeding) {\n\t\tfor (const property in properties) {\n\t\t\tif (properties.hasOwnProperty(property) && (!Array.isArray(properties[property]) || properties[property].length < 2)) {\n\t\t\t\tthrow new Error(\"VelocityJS: When not supplying an element you must force-feed values: \" + property);\n\t\t\t}\n\t\t}\n\t}\n\tconst activeEasing = validateEasing(getValue(easing, defaults.easing), DEFAULT_DURATION);\n\n\tif (maybeSequence) {\n\t\texpandSequence(fakeAnimation, maybeSequence);\n\t} else {\n\t\texpandProperties(fakeAnimation as AnimationCall, properties);\n\t}\n\t// tslint:disable-next-line:forin\n\tfor (const property in fakeAnimation.tweens) {\n\t\t// For every element, iterate through each property.\n\t\tconst propertyTween = fakeAnimation.tweens[property],\n\t\t\tsequence = propertyTween.sequence,\n\t\t\tpattern = sequence.pattern;\n\t\tlet currentValue = \"\",\n\t\t\ti = 0;\n\n\t\tcount++;\n\t\tif (pattern) {\n\t\t\tconst easingComplete = (propertyTween.easing || activeEasing)(percentComplete, 0, 1, property);\n\t\t\tlet best = 0;\n\n\t\t\tfor (let j = 0; j < sequence.length - 1; j++) {\n\t\t\t\tif (sequence[j].percent < easingComplete) {\n\t\t\t\t\tbest = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst tweenFrom: TweenStep = sequence[best],\n\t\t\t\ttweenTo: TweenStep = sequence[best + 1] || tweenFrom,\n\t\t\t\ttweenPercent = (percentComplete - tweenFrom.percent) / (tweenTo.percent - tweenFrom.percent),\n\t\t\t\ttweenEasing = tweenTo.easing || linearEasing;\n\n\t\t\tfor (; i < pattern.length; i++) {\n\t\t\t\tconst startValue = tweenFrom[i];\n\n\t\t\t\tif (startValue == null) {\n\t\t\t\t\tcurrentValue += pattern[i];\n\t\t\t\t} else {\n\t\t\t\t\tconst endValue = tweenTo[i];\n\n\t\t\t\t\tif (startValue === endValue) {\n\t\t\t\t\t\tcurrentValue += startValue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// All easings must deal with numbers except for our internal ones.\n\t\t\t\t\t\tconst value = tweenEasing(tweenPercent, startValue as number, endValue as number, property);\n\n\t\t\t\t\t\tcurrentValue += pattern[i] === true ? Math.round(value) : value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tresult[property] = currentValue;\n\t\t}\n\t}\n\n\tif (singleResult && count === 1) {\n\t\tfor (const property in result) {\n\t\t\tif (result.hasOwnProperty(property)) {\n\t\t\t\treturn result[property];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn result;\n}\n\nregisterAction([\"tween\", tweenAction], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Project\nimport {ColorNames} from \"./fixColors\";\n\n/**\n * Converting from hex as it makes for a smaller file.\n */\nconst colorValues = {\n\taliceblue: 0xF0F8FF,\n\tantiquewhite: 0xFAEBD7,\n\taqua: 0x00FFFF,\n\taquamarine: 0x7FFFD4,\n\tazure: 0xF0FFFF,\n\tbeige: 0xF5F5DC,\n\tbisque: 0xFFE4C4,\n\tblack: 0x000000,\n\tblanchedalmond: 0xFFEBCD,\n\tblue: 0x0000FF,\n\tblueviolet: 0x8A2BE2,\n\tbrown: 0xA52A2A,\n\tburlywood: 0xDEB887,\n\tcadetblue: 0x5F9EA0,\n\tchartreuse: 0x7FFF00,\n\tchocolate: 0xD2691E,\n\tcoral: 0xFF7F50,\n\tcornflowerblue: 0x6495ED,\n\tcornsilk: 0xFFF8DC,\n\tcrimson: 0xDC143C,\n\tcyan: 0x00FFFF,\n\tdarkblue: 0x00008B,\n\tdarkcyan: 0x008B8B,\n\tdarkgoldenrod: 0xB8860B,\n\tdarkgray: 0xA9A9A9,\n\tdarkgrey: 0xA9A9A9,\n\tdarkgreen: 0x006400,\n\tdarkkhaki: 0xBDB76B,\n\tdarkmagenta: 0x8B008B,\n\tdarkolivegreen: 0x556B2F,\n\tdarkorange: 0xFF8C00,\n\tdarkorchid: 0x9932CC,\n\tdarkred: 0x8B0000,\n\tdarksalmon: 0xE9967A,\n\tdarkseagreen: 0x8FBC8F,\n\tdarkslateblue: 0x483D8B,\n\tdarkslategray: 0x2F4F4F,\n\tdarkslategrey: 0x2F4F4F,\n\tdarkturquoise: 0x00CED1,\n\tdarkviolet: 0x9400D3,\n\tdeeppink: 0xFF1493,\n\tdeepskyblue: 0x00BFFF,\n\tdimgray: 0x696969,\n\tdimgrey: 0x696969,\n\tdodgerblue: 0x1E90FF,\n\tfirebrick: 0xB22222,\n\tfloralwhite: 0xFFFAF0,\n\tforestgreen: 0x228B22,\n\tfuchsia: 0xFF00FF,\n\tgainsboro: 0xDCDCDC,\n\tghostwhite: 0xF8F8FF,\n\tgold: 0xFFD700,\n\tgoldenrod: 0xDAA520,\n\tgray: 0x808080,\n\tgrey: 0x808080,\n\tgreen: 0x008000,\n\tgreenyellow: 0xADFF2F,\n\thoneydew: 0xF0FFF0,\n\thotpink: 0xFF69B4,\n\tindianred: 0xCD5C5C,\n\tindigo: 0x4B0082,\n\tivory: 0xFFFFF0,\n\tkhaki: 0xF0E68C,\n\tlavender: 0xE6E6FA,\n\tlavenderblush: 0xFFF0F5,\n\tlawngreen: 0x7CFC00,\n\tlemonchiffon: 0xFFFACD,\n\tlightblue: 0xADD8E6,\n\tlightcoral: 0xF08080,\n\tlightcyan: 0xE0FFFF,\n\tlightgoldenrodyellow: 0xFAFAD2,\n\tlightgray: 0xD3D3D3,\n\tlightgrey: 0xD3D3D3,\n\tlightgreen: 0x90EE90,\n\tlightpink: 0xFFB6C1,\n\tlightsalmon: 0xFFA07A,\n\tlightseagreen: 0x20B2AA,\n\tlightskyblue: 0x87CEFA,\n\tlightslategray: 0x778899,\n\tlightslategrey: 0x778899,\n\tlightsteelblue: 0xB0C4DE,\n\tlightyellow: 0xFFFFE0,\n\tlime: 0x00FF00,\n\tlimegreen: 0x32CD32,\n\tlinen: 0xFAF0E6,\n\tmagenta: 0xFF00FF,\n\tmaroon: 0x800000,\n\tmediumaquamarine: 0x66CDAA,\n\tmediumblue: 0x0000CD,\n\tmediumorchid: 0xBA55D3,\n\tmediumpurple: 0x9370DB,\n\tmediumseagreen: 0x3CB371,\n\tmediumslateblue: 0x7B68EE,\n\tmediumspringgreen: 0x00FA9A,\n\tmediumturquoise: 0x48D1CC,\n\tmediumvioletred: 0xC71585,\n\tmidnightblue: 0x191970,\n\tmintcream: 0xF5FFFA,\n\tmistyrose: 0xFFE4E1,\n\tmoccasin: 0xFFE4B5,\n\tnavajowhite: 0xFFDEAD,\n\tnavy: 0x000080,\n\toldlace: 0xFDF5E6,\n\tolive: 0x808000,\n\tolivedrab: 0x6B8E23,\n\torange: 0xFFA500,\n\torangered: 0xFF4500,\n\torchid: 0xDA70D6,\n\tpalegoldenrod: 0xEEE8AA,\n\tpalegreen: 0x98FB98,\n\tpaleturquoise: 0xAFEEEE,\n\tpalevioletred: 0xDB7093,\n\tpapayawhip: 0xFFEFD5,\n\tpeachpuff: 0xFFDAB9,\n\tperu: 0xCD853F,\n\tpink: 0xFFC0CB,\n\tplum: 0xDDA0DD,\n\tpowderblue: 0xB0E0E6,\n\tpurple: 0x800080,\n\trebeccapurple: 0x663399,\n\tred: 0xFF0000,\n\trosybrown: 0xBC8F8F,\n\troyalblue: 0x4169E1,\n\tsaddlebrown: 0x8B4513,\n\tsalmon: 0xFA8072,\n\tsandybrown: 0xF4A460,\n\tseagreen: 0x2E8B57,\n\tseashell: 0xFFF5EE,\n\tsienna: 0xA0522D,\n\tsilver: 0xC0C0C0,\n\tskyblue: 0x87CEEB,\n\tslateblue: 0x6A5ACD,\n\tslategray: 0x708090,\n\tslategrey: 0x708090,\n\tsnow: 0xFFFAFA,\n\tspringgreen: 0x00FF7F,\n\tsteelblue: 0x4682B4,\n\ttan: 0xD2B48C,\n\tteal: 0x008080,\n\tthistle: 0xD8BFD8,\n\ttomato: 0xFF6347,\n\tturquoise: 0x40E0D0,\n\tviolet: 0xEE82EE,\n\twheat: 0xF5DEB3,\n\twhite: 0xFFFFFF,\n\twhitesmoke: 0xF5F5F5,\n\tyellow: 0xFFFF00,\n\tyellowgreen: 0x9ACD32,\n};\n\nfor (const name in colorValues) {\n\tif (colorValues.hasOwnProperty(name)) {\n\t\tconst color = colorValues[name];\n\n\t\tColorNames[name] = `${Math.floor(color / 65536)},${Math.floor(color / 256 % 256)},${(color % 256)}`;\n\t}\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Back easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\n */\n\n// Project\nimport {registerEasing} from \"./easings\";\n\nexport function registerBackIn(name: string, amount: number) {\n\tregisterEasing([name, (percentComplete: number, startValue: number, endValue: number): number => {\n\t\tif (percentComplete === 0) {\n\t\t\treturn startValue;\n\t\t}\n\t\tif (percentComplete === 1) {\n\t\t\treturn endValue;\n\t\t}\n\n\t\treturn Math.pow(percentComplete, 2) * ((amount + 1) * percentComplete - amount) * (endValue - startValue);\n\t}]);\n}\n\nexport function registerBackOut(name: string, amount: number) {\n\tregisterEasing([name, (percentComplete: number, startValue: number, endValue: number): number => {\n\t\tif (percentComplete === 0) {\n\t\t\treturn startValue;\n\t\t}\n\t\tif (percentComplete === 1) {\n\t\t\treturn endValue;\n\t\t}\n\n\t\treturn (Math.pow(--percentComplete, 2) * ((amount + 1) * percentComplete + amount) + 1) * (endValue - startValue);\n\t}]);\n}\n\nexport function registerBackInOut(name: string, amount: number) {\n\tamount *= 1.525;\n\tregisterEasing([name, (percentComplete: number, startValue: number, endValue: number): number => {\n\t\tif (percentComplete === 0) {\n\t\t\treturn startValue;\n\t\t}\n\t\tif (percentComplete === 1) {\n\t\t\treturn endValue;\n\t\t}\n\t\tpercentComplete *= 2;\n\n\t\treturn (percentComplete < 1\n\t\t\t? (Math.pow(percentComplete, 2) * ((amount + 1) * percentComplete - amount))\n\t\t\t: (Math.pow(percentComplete - 2, 2) * ((amount + 1) * (percentComplete - 2) + amount) + 2)\n\t\t) * 0.5 * (endValue - startValue);\n\t}]);\n}\n\nregisterBackIn(\"easeInBack\", 1.7);\nregisterBackOut(\"easeOutBack\", 1.7);\nregisterBackInOut(\"easeInOutBack\", 1.7);\n\n// TODO: Expose these as actions to register custom easings?\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Bounce easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\n */\n\n// Project\nimport {registerEasing} from \"./easings\";\n\nfunction easeOutBouncePercent(percentComplete: number): number {\n\tif (percentComplete < 1 / 2.75) {\n\t\treturn (7.5625 * percentComplete * percentComplete);\n\t}\n\tif (percentComplete < 2 / 2.75) {\n\t\treturn (7.5625 * (percentComplete -= 1.5 / 2.75) * percentComplete + 0.75);\n\t}\n\tif (percentComplete < 2.5 / 2.75) {\n\t\treturn (7.5625 * (percentComplete -= 2.25 / 2.75) * percentComplete + 0.9375);\n\t}\n\n\treturn (7.5625 * (percentComplete -= 2.625 / 2.75) * percentComplete + 0.984375);\n}\n\nfunction easeInBouncePercent(percentComplete: number): number {\n\treturn 1 - easeOutBouncePercent(1 - percentComplete);\n}\n\nexport function easeInBounce(percentComplete: number, startValue: number, endValue: number): number {\n\tif (percentComplete === 0) {\n\t\treturn startValue;\n\t}\n\tif (percentComplete === 1) {\n\t\treturn endValue;\n\t}\n\n\treturn easeInBouncePercent(percentComplete) * (endValue - startValue);\n}\n\nexport function easeOutBounce(percentComplete: number, startValue: number, endValue: number): number {\n\tif (percentComplete === 0) {\n\t\treturn startValue;\n\t}\n\tif (percentComplete === 1) {\n\t\treturn endValue;\n\t}\n\n\treturn easeOutBouncePercent(percentComplete) * (endValue - startValue);\n}\n\nexport function easeInOutBounce(percentComplete: number, startValue: number, endValue: number): number {\n\tif (percentComplete === 0) {\n\t\treturn startValue;\n\t}\n\tif (percentComplete === 1) {\n\t\treturn endValue;\n\t}\n\n\treturn (percentComplete < 0.5\n\t\t? easeInBouncePercent(percentComplete * 2) * 0.5\n\t\t: easeOutBouncePercent(percentComplete * 2 - 1) * 0.5 + 0.5\n\t) * (endValue - startValue);\n}\n\nregisterEasing([\"easeInBounce\", easeInBounce]);\nregisterEasing([\"easeOutBounce\", easeOutBounce]);\nregisterEasing([\"easeInOutBounce\", easeInOutBounce]);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Elastic easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\n */\n\n// Project\nimport {registerEasing} from \"./easings\";\n\n// Constants\nconst PI2 = Math.PI * 2;\n\nexport function registerElasticIn(name: string, amplitude: number, period: number) {\n\tregisterEasing([name, (percentComplete: number, startValue: number, endValue: number): number => {\n\t\tif (percentComplete === 0) {\n\t\t\treturn startValue;\n\t\t}\n\t\tif (percentComplete === 1) {\n\t\t\treturn endValue;\n\t\t}\n\n\t\treturn -(amplitude * Math.pow(2, 10 * (percentComplete -= 1)) * Math.sin((percentComplete - (period / PI2 * Math.asin(1 / amplitude))) * PI2 / period)) * (endValue - startValue);\n\t}]);\n}\n\nexport function registerElasticOut(name: string, amplitude: number, period: number) {\n\tregisterEasing([name, (percentComplete: number, startValue: number, endValue: number): number => {\n\t\tif (percentComplete === 0) {\n\t\t\treturn startValue;\n\t\t}\n\t\tif (percentComplete === 1) {\n\t\t\treturn endValue;\n\t\t}\n\n\t\treturn (amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - (period / PI2 * Math.asin(1 / amplitude))) * PI2 / period) + 1) * (endValue - startValue);\n\t}]);\n}\n\nexport function registerElasticInOut(name: string, amplitude: number, period: number) {\n\tregisterEasing([name, (percentComplete: number, startValue: number, endValue: number): number => {\n\t\tif (percentComplete === 0) {\n\t\t\treturn startValue;\n\t\t}\n\t\tif (percentComplete === 1) {\n\t\t\treturn endValue;\n\t\t}\n\t\tconst s = period / PI2 * Math.asin(1 / amplitude);\n\n\t\tpercentComplete = percentComplete * 2 - 1;\n\n\t\treturn (percentComplete < 0\n\t\t\t? -0.5 * (amplitude * Math.pow(2, 10 * percentComplete) * Math.sin((percentComplete - s) * PI2 / period))\n\t\t\t: amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - s) * PI2 / period) * 0.5 + 1\n\t\t) * (endValue - startValue);\n\t}]);\n}\n\nregisterElasticIn(\"easeInElastic\", 1, 0.3);\nregisterElasticOut(\"easeOutElastic\", 1, 0.3);\nregisterElasticInOut(\"easeInOutElastic\", 1, 0.3 * 1.5);\n\n// TODO: Expose these as actions to register custom easings?\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Easings to act on strings, either set at the start or at the end depending on\n * need.\n */\n\n// Project\nimport {registerEasing} from \"./easings\";\n\n/**\n * Easing function that sets to the specified value immediately after the\n * animation starts.\n */\nexport function atStart(percentComplete: number, startValue: any, endValue: any): any {\n\treturn percentComplete === 0\n\t\t? startValue\n\t\t: endValue;\n}\n\n/**\n * Easing function that sets to the specified value while the animation is\n * running.\n */\nexport function during(percentComplete: number, startValue: any, endValue: any): any {\n\treturn percentComplete === 0 || percentComplete === 1\n\t\t? startValue\n\t\t: endValue;\n}\n\n/**\n * Easing function that sets to the specified value when the animation ends.\n */\nexport function atEnd(percentComplete: number, startValue: any, endValue: any): any {\n\treturn percentComplete === 1\n\t\t? endValue\n\t\t: startValue;\n}\n\nregisterEasing([\"at-start\", atStart]);\nregisterEasing([\"during\", during]);\nregisterEasing([\"at-end\", atEnd]);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {HTMLorSVGElement, VelocityNormalizationsFn} from \"../../../velocity.d\";\n\n// Project\nimport {augmentDimension} from \"../css/augmentDimension\";\nimport {setPropertyValue} from \"../css/setPropertyValue\";\nimport {registerNormalization} from \"./normalizations\";\n\n/**\n * Get/set the inner/outer dimension.\n */\nfunction getDimension(name: \"width\" | \"height\", wantInner: boolean) {\n\treturn ((element: HTMLorSVGElement, propertyValue?: string): string | void => {\n\t\tif (propertyValue === undefined) {\n\t\t\treturn augmentDimension(element, name, wantInner) + \"px\";\n\t\t}\n\t\tsetPropertyValue(element, name, (parseFloat(propertyValue) - augmentDimension(element, name, wantInner)) + \"px\");\n\t}) as VelocityNormalizationsFn;\n}\n\nregisterNormalization([\"Element\", \"innerWidth\", getDimension(\"width\", true)]);\nregisterNormalization([\"Element\", \"innerHeight\", getDimension(\"height\", true)]);\nregisterNormalization([\"Element\", \"outerWidth\", getDimension(\"width\", false)]);\nregisterNormalization([\"Element\", \"outerHeight\", getDimension(\"height\", false)]);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {HTMLorSVGElement} from \"../../../velocity.d\";\n\n// Project\nimport {computePropertyValue} from \"../css/getPropertyValue\";\nimport {Data} from \"../data\";\nimport {registerNormalization} from \"./normalizations\";\n\n// Constants\nexport const inlineRx = /^(b|big|i|small|tt|abbr|acronym|cite|code|dfn|em|kbd|strong|samp|let|a|bdo|br|img|map|object|q|script|span|sub|sup|button|input|label|select|textarea)$/i,\n\tlistItemRx = /^(li)$/i,\n\ttableRowRx = /^(tr)$/i,\n\ttableRx = /^(table)$/i,\n\ttableRowGroupRx = /^(tbody)$/i;\n\n/**\n * Display has an extra value of \"auto\" that works out the correct value\n * based on the type of element.\n */\nfunction display(element: HTMLorSVGElement): string;\nfunction display(element: HTMLorSVGElement, propertyValue: string): void;\nfunction display(element: HTMLorSVGElement, propertyValue?: string): string | void {\n\tconst style = element.style;\n\n\tif (propertyValue === undefined) {\n\t\treturn computePropertyValue(element, \"display\");\n\t}\n\tif (propertyValue === \"auto\") {\n\t\tconst nodeName = element && element.nodeName,\n\t\t\tdata = Data(element);\n\n\t\tif (inlineRx.test(nodeName)) {\n\t\t\tpropertyValue = \"inline\";\n\t\t} else if (listItemRx.test(nodeName)) {\n\t\t\tpropertyValue = \"list-item\";\n\t\t} else if (tableRowRx.test(nodeName)) {\n\t\t\tpropertyValue = \"table-row\";\n\t\t} else if (tableRx.test(nodeName)) {\n\t\t\tpropertyValue = \"table\";\n\t\t} else if (tableRowGroupRx.test(nodeName)) {\n\t\t\tpropertyValue = \"table-row-group\";\n\t\t} else {\n\t\t\t// Default to \"block\" when no match is found.\n\t\t\tpropertyValue = \"block\";\n\t\t}\n\t\t// IMPORTANT: We need to do this as getPropertyValue bypasses the\n\t\t// Normalisation when it exists in the cache.\n\t\tdata.cache[\"display\"] = propertyValue;\n\t}\n\tstyle.display = propertyValue;\n}\n\nregisterNormalization([\"Element\", \"display\", display]);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {HTMLorSVGElement, VelocityNormalizationsFn} from \"../../../velocity.d\";\n\n// Project\nimport {getPropertyValue} from \"../css/getPropertyValue\";\nimport {registerNormalization} from \"./normalizations\";\n\n/**\n * Get the scrollWidth of an element.\n */\nfunction clientWidth(element: HTMLorSVGElement): string;\nfunction clientWidth(element: HTMLorSVGElement, propertyValue: string): void;\nfunction clientWidth(element: HTMLorSVGElement, propertyValue?: string): string | void {\n\tif (propertyValue == null) {\n\t\treturn element.clientWidth + \"px\";\n\t}\n}\n\n/**\n * Get the scrollWidth of an element.\n */\nfunction scrollWidth(element: HTMLorSVGElement): string;\nfunction scrollWidth(element: HTMLorSVGElement, propertyValue: string): void;\nfunction scrollWidth(element: HTMLorSVGElement, propertyValue?: string): string | void {\n\tif (propertyValue == null) {\n\t\treturn element.scrollWidth + \"px\";\n\t}\n}\n\n/**\n * Get the scrollHeight of an element.\n */\nfunction clientHeight(element: HTMLorSVGElement): string;\nfunction clientHeight(element: HTMLorSVGElement, propertyValue: string): void;\nfunction clientHeight(element: HTMLorSVGElement, propertyValue?: string): string | void {\n\tif (propertyValue == null) {\n\t\treturn element.clientHeight + \"px\";\n\t}\n}\n\n/**\n * Get the scrollHeight of an element.\n */\nfunction scrollHeight(element: HTMLorSVGElement): string;\nfunction scrollHeight(element: HTMLorSVGElement, propertyValue: string): void;\nfunction scrollHeight(element: HTMLorSVGElement, propertyValue?: string): string | void {\n\tif (propertyValue == null) {\n\t\treturn element.scrollHeight + \"px\";\n\t}\n}\n\n/**\n * Scroll an element.\n */\nfunction scroll(direction: \"Height\", end: \"Top\"): VelocityNormalizationsFn;\nfunction scroll(direction: \"Width\", end: \"Left\"): VelocityNormalizationsFn;\nfunction scroll(direction: \"Height\" | \"Width\", end: \"Top\" | \"Left\"): VelocityNormalizationsFn {\n\treturn ((element: HTMLorSVGElement, propertyValue?: string): string | void => {\n\t\tif (propertyValue == null) {\n\t\t\t// Make sure we have these values cached.\n\t\t\tgetPropertyValue(element, \"client\" + direction, null, true);\n\t\t\tgetPropertyValue(element, \"scroll\" + direction, null, true);\n\n\t\t\treturn element[\"scroll\" + end] + \"px\";\n\t\t}\n\t\tconst value = parseFloat(propertyValue),\n\t\t\tunit = propertyValue.replace(String(value), \"\");\n\n\t\tswitch (unit) {\n\t\t\tcase \"\":\n\t\t\tcase \"px\":\n\t\t\t\telement[\"scroll\" + end] = value;\n\t\t\t\tbreak;\n\n\t\t\tcase \"%\":\n\t\t\t\tconst client = parseFloat(getPropertyValue(element, \"client\" + direction)),\n\t\t\t\t\tscrollValue = parseFloat(getPropertyValue(element, \"scroll\" + direction));\n\n\t\t\t\telement[\"scroll\" + end] = Math.max(0, scrollValue - client) * value / 100;\n\t\t\t\tbreak;\n\t\t}\n\t}) as VelocityNormalizationsFn;\n}\n\nregisterNormalization([\"HTMLElement\", \"scroll\", scroll(\"Height\", \"Top\"), false]);\nregisterNormalization([\"HTMLElement\", \"scrollTop\", scroll(\"Height\", \"Top\"), false]);\nregisterNormalization([\"HTMLElement\", \"scrollLeft\", scroll(\"Width\", \"Left\"), false]);\nregisterNormalization([\"HTMLElement\", \"scrollWidth\", scrollWidth]);\nregisterNormalization([\"HTMLElement\", \"clientWidth\", clientWidth]);\nregisterNormalization([\"HTMLElement\", \"scrollHeight\", scrollHeight]);\nregisterNormalization([\"HTMLElement\", \"clientHeight\", clientHeight]);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * This handles all CSS style properties. With browser prefixed properties it\n * will register a version that handles setting (and getting) both the prefixed\n * and non-prefixed version.\n */\n\n// Typedefs\nimport {HTMLorSVGElement, VelocityNormalizationsFn} from \"../../../velocity.d\";\n\n// Project\nimport {ALL_VENDOR_PREFIXES} from \"../../constants\";\nimport {isString} from \"../../types\";\nimport {computePropertyValue} from \"../css/getPropertyValue\";\nimport {State} from \"../state\";\nimport {hasNormalization, registerNormalization} from \"./normalizations\";\n\n/**\n * An RegExp pattern for the following list of css words using\n * http://kemio.com.ar/tools/lst-trie-re.php to generate:\n *\n * blockSize\n * borderBottomLeftRadius\n * borderBottomRightRadius\n * borderBottomWidth\n * borderImageOutset\n * borderImageWidth\n * borderLeftWidth\n * borderRadius\n * borderRightWidth\n * borderSpacing\n * borderTopLeftRadius\n * borderTopRightRadius\n * borderTopWidth\n * borderWidth\n * bottom\n * columnGap\n * columnRuleWidth\n * columnWidth\n * flexBasis\n * fontSize\n * gridColumnGap\n * gridGap\n * gridRowGap\n * height\n * inlineSize\n * left\n * letterSpacing\n * margin\n * marginBottom\n * marginLeft\n * marginRight\n * marginTop\n * maxBlockSize\n * maxHeight\n * maxInlineSize\n * maxWidth\n * minBlockSize\n * minHeight\n * minInlineSize\n * minWidth\n * objectPosition\n * outlineOffset\n * outlineWidth\n * padding\n * paddingBottom\n * paddingLeft\n * paddingRight\n * paddingTop\n * perspective\n * right\n * shapeMargin\n * strokeDashoffset\n * strokeWidth\n * textIndent\n * top\n * transformOrigin\n * width\n * wordSpacing\n */\n// tslint:disable-next-line:max-line-length\nconst rxAddPx = /^(b(lockSize|o(rder(Bottom(LeftRadius|RightRadius|Width)|Image(Outset|Width)|LeftWidth|R(adius|ightWidth)|Spacing|Top(LeftRadius|RightRadius|Width)|Width)|ttom))|column(Gap|RuleWidth|Width)|f(lexBasis|ontSize)|grid(ColumnGap|Gap|RowGap)|height|inlineSize|le(ft|tterSpacing)|m(a(rgin(Bottom|Left|Right|Top)|x(BlockSize|Height|InlineSize|Width))|in(BlockSize|Height|InlineSize|Width))|o(bjectPosition|utline(Offset|Width))|p(adding(Bottom|Left|Right|Top)|erspective)|right|s(hapeMargin|troke(Dashoffset|Width))|t(extIndent|op|ransformOrigin)|w(idth|ordSpacing))$/;\n\n/**\n * Return a Normalisation that can be used to set / get a prefixed style\n * property.\n */\nfunction getSetPrefixed(propertyName: string, unprefixed: string) {\n\treturn ((element: HTMLorSVGElement, propertyValue?: string): string | void => {\n\t\tif (propertyValue === undefined) {\n\t\t\treturn computePropertyValue(element, propertyName) || computePropertyValue(element, unprefixed);\n\t\t}\n\t\telement.style[propertyName] = element.style[unprefixed] = propertyValue;\n\t}) as VelocityNormalizationsFn;\n}\n\n/**\n * Return a Normalisation that can be used to set / get a style property.\n */\nfunction getSetStyle(propertyName: string) {\n\treturn ((element: HTMLorSVGElement, propertyValue?: string): string | void => {\n\t\tif (propertyValue === undefined) {\n\t\t\treturn computePropertyValue(element, propertyName);\n\t\t}\n\t\telement.style[propertyName] = propertyValue;\n\t}) as VelocityNormalizationsFn;\n}\n\n/**\n * Vendor prefixes. Chrome / Safari, Firefox, IE / Edge, Opera.\n */\nconst rxVendors = /^(webkit|moz|ms|o)[A-Z]/,\n\tprefixElement = State.prefixElement;\n\nif (prefixElement) {\n\tfor (const propertyName in prefixElement.style) {\n\t\tif (rxVendors.test(propertyName)) {\n\t\t\tconst unprefixed = propertyName.replace(/^[a-z]+([A-Z])/, ($, letter: string) => letter.toLowerCase());\n\n\t\t\tif (ALL_VENDOR_PREFIXES || isString(prefixElement.style[unprefixed])) {\n\t\t\t\tconst addUnit = rxAddPx.test(unprefixed) ? \"px\" : undefined;\n\n\t\t\t\tregisterNormalization([\"Element\", unprefixed, getSetPrefixed(propertyName, unprefixed), addUnit]);\n\t\t\t}\n\t\t} else if (!hasNormalization([\"Element\", propertyName])) {\n\t\t\tconst addUnit = rxAddPx.test(propertyName) ? \"px\" : undefined;\n\n\t\t\tregisterNormalization([\"Element\", propertyName, getSetStyle(propertyName), addUnit]);\n\t\t}\n\t}\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {VelocityNormalizationsFn} from \"../../../../velocity.d\";\n\n// Project\nimport {isFunction, isString} from \"../../../types\";\nimport {registerNormalization} from \"../normalizations\";\n\n/**\n * Get/set an attribute.\n */\nfunction getAttribute(name: string) {\n\treturn ((element: Element, propertyValue?: string): string | void => {\n\t\tif (propertyValue === undefined) {\n\t\t\treturn element.getAttribute(name);\n\t\t}\n\t\telement.setAttribute(name, propertyValue);\n\t}) as VelocityNormalizationsFn;\n}\n\nconst base = document.createElement(\"div\"),\n\trxSubtype = /^SVG(.*)Element$/,\n\trxElement = /Element$/;\n\nObject.getOwnPropertyNames(window)\n\t.forEach((property) => {\n\t\tconst subtype = rxSubtype.exec(property);\n\n\t\tif (subtype && subtype[1] !== \"SVG\") { // Don't do SVGSVGElement.\n\t\t\ttry {\n\t\t\t\tconst element = subtype[1] ? document.createElementNS(\"http://www.w3.org/2000/svg\", (subtype[1] || \"svg\").toLowerCase()) : document.createElement(\"svg\");\n\n\t\t\t\t// tslint:disable-next-line:forin\n\t\t\t\tfor (const attribute in element) {\n\t\t\t\t\t// Although this isn't a tween without prototypes, we do\n\t\t\t\t\t// want to get hold of all attributes and not just own ones.\n\t\t\t\t\tconst value = element[attribute];\n\n\t\t\t\t\tif (isString(attribute)\n\t\t\t\t\t\t&& !(attribute[0] === \"o\" && attribute[1] === \"n\")\n\t\t\t\t\t\t&& attribute !== attribute.toUpperCase()\n\t\t\t\t\t\t&& !rxElement.test(attribute)\n\t\t\t\t\t\t&& !(attribute in base)\n\t\t\t\t\t\t&& !isFunction(value)) {\n\t\t\t\t\t\t// TODO: Should this all be set on the generic SVGElement, it would save space and time, but not as powerful\n\t\t\t\t\t\tregisterNormalization([property, attribute, getAttribute(attribute)]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\tconsole.error(`VelocityJS: Error when trying to identify SVG attributes on ${property}.`, e);\n\t\t\t}\n\t\t}\n\t});\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {HTMLorSVGElement, VelocityNormalizationsFn} from \"../../../../velocity.d\";\n\n// Project\nimport {registerNormalization} from \"../normalizations\";\n\n/**\n * Get/set the width or height.\n */\nfunction getDimension(name: string) {\n\treturn ((element: HTMLorSVGElement, propertyValue?: string): string | void => {\n\t\tif (propertyValue === undefined) {\n\t\t\t// Firefox throws an error if .getBBox() is called on an SVG that isn't attached to the DOM.\n\t\t\ttry {\n\t\t\t\treturn (element as SVGGraphicsElement).getBBox()[name] + \"px\";\n\t\t\t} catch (e) {\n\t\t\t\treturn \"0px\";\n\t\t\t}\n\t\t}\n\t\telement.setAttribute(name, propertyValue);\n\t}) as VelocityNormalizationsFn;\n}\n\nregisterNormalization([\"SVGElement\", \"width\", getDimension(\"width\")]);\nregisterNormalization([\"SVGElement\", \"height\", getDimension(\"height\")]);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {HTMLorSVGElement} from \"../../../velocity.d\";\n\n// Project\nimport {registerNormalization} from \"./normalizations\";\n\n/**\n * A fake normalization used to allow the \"tween\" property easy access.\n */\nfunction getSetTween(element: HTMLorSVGElement, propertyValue?: string) {\n\tif (propertyValue === undefined) {\n\t\treturn \"\";\n\t}\n}\n\nregisterNormalization([\"Element\", \"tween\", getSetTween]);\n","/*\n * velocity-animate (C) 2014-2017 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Automatically generated\nexport const VERSION = \"2.0.6\";\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Extended Velocity members.\n */\n\n// Typedefs\nimport {\n\tSequenceList, StrictVelocityOptions, Velocity as VelocityPublic,\n\tVelocityActionFn, VelocityEasingFn, VelocityState,\n} from \"./../velocity.d\";\n\n// Project\nimport { defineProperty } from \"./utility\";\nimport { Actions as ActionsObject } from \"./Velocity/actions/actions\";\nimport { defaults as DefaultObject } from \"./Velocity/defaults\";\nimport { Easings as EasingsObject } from \"./Velocity/easing/easings\";\nimport { patch as patchFn } from \"./Velocity/patch\";\nimport { SequencesObject } from \"./Velocity/sequencesObject\";\nimport { State as StateObject } from \"./Velocity/state\";\nimport { Velocity as VelocityFn } from \"./velocityFn\";\n\n// Build the entire library, even optional bits.\nimport \"./Velocity/_all\";\n\n// Constants\nimport { VERSION } from \"../version\";\nconst Velocity: VelocityPublic = VelocityFn as any;\n\n/**\n * These parts of Velocity absolutely must be included, even if they're unused!\n */\nnamespace VelocityStatic {\n\t/**\n\t * Actions cannot be replaced if they are internal (hasOwnProperty is false\n\t * but they still exist). Otherwise they can be replaced by users.\n\t *\n\t * All external method calls should be using actions rather than sub-calls\n\t * of Velocity itself.\n\t */\n\texport const Actions: { [name: string]: VelocityActionFn } = ActionsObject;\n\n\t/**\n\t * Our known easing functions.\n\t */\n\texport const Easings: { [name: string]: VelocityEasingFn } = EasingsObject;\n\n\t/**\n\t * The currently registered sequences.\n\t */\n\texport const Sequences: { [name: string]: SequenceList } = SequencesObject;\n\n\t/**\n\t * Current internal state of Velocity.\n\t */\n\texport const State: VelocityState = StateObject; // tslint:disable-line:no-shadowed-variable\n\n\t/**\n\t * Velocity option defaults, which can be overriden by the user.\n\t */\n\texport const defaults: StrictVelocityOptions & { reset?: () => void } = DefaultObject as any;\n\n\t/**\n\t * Used to patch any object to allow Velocity chaining. In order to chain an\n\t * object must either be treatable as an array - with a <code>.length</code>\n\t * property, and each member a Node, or a Node directly.\n\t *\n\t * By default Velocity will try to patch <code>window</code>,\n\t * <code>jQuery</code>, <code>Zepto</code>, and several classes that return\n\t * Nodes or lists of Nodes.\n\t */\n\texport const patch = patchFn;\n\n\t/**\n\t * Set to true, 1 or 2 (most verbose) to output debug info to console.\n\t */\n\texport let debug: boolean | 1 | 2 = false;\n\n\t/**\n\t * In mock mode, all animations are forced to complete immediately upon the\n\t * next rAF tick. If there are further animations queued then they will each\n\t * take one single frame in turn. Loops and repeats will be disabled while\n\t * <code>mock = true</code>.\n\t */\n\texport let mock: boolean = false;\n\n\t/**\n\t * Save our version number somewhere visible.\n\t */\n\texport const version = VERSION;\n\n\t/**\n\t * Added as a fallback for \"import {Velocity} from 'velocity-animate';\".\n\t */\n\texport const Velocity: VelocityPublic = VelocityFn as any; // tslint:disable-line:no-shadowed-variable\n}\n\n/* IE detection. Gist: https://gist.github.com/julianshapiro/9098609 */\nconst IE = (() => {\n\tinterface IEDocument extends Document {\n\t\tdocumentMode: any; // IE\n\t}\n\n\tif ((document as IEDocument).documentMode) {\n\t\treturn (document as IEDocument).documentMode;\n\t} else {\n\t\tfor (let i = 7; i > 4; i--) {\n\t\t\tlet div = document.createElement(\"div\");\n\n\t\t\tdiv.innerHTML = `<!${\"--\"}[if IE ${i}]><span></span><![endif]-->`;\n\t\t\tif (div.getElementsByTagName(\"span\").length) {\n\t\t\t\tdiv = null;\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined;\n})();\n\n/******************\n Unsupported\n ******************/\n\nif (IE <= 8) {\n\tthrow new Error(\"VelocityJS cannot run on Internet Explorer 8 or earlier\");\n}\n\n/******************\n Frameworks\n ******************/\n\nif (window) {\n\t/*\n\t * Both jQuery and Zepto allow their $.fn object to be extended to allow\n\t * wrapped elements to be subjected to plugin calls. If either framework is\n\t * loaded, register a \"velocity\" extension pointing to Velocity's core\n\t * animate() method. Velocity also registers itself onto a global container\n\t * (window.jQuery || window.Zepto || window) so that certain features are\n\t * accessible beyond just a per-element scope. Accordingly, Velocity can\n\t * both act on wrapped DOM elements and stand alone for targeting raw DOM\n\t * elements.\n\t */\n\tconst jQuery: { fn: any } = (window as any).jQuery,\n\t\tZepto: { fn: any } = (window as any).Zepto;\n\n\tpatchFn(window, true);\n\tpatchFn(Element && Element.prototype);\n\tpatchFn(NodeList && NodeList.prototype);\n\tpatchFn(HTMLCollection && HTMLCollection.prototype);\n\n\tpatchFn(jQuery, true);\n\tpatchFn(jQuery && jQuery.fn);\n\n\tpatchFn(Zepto, true);\n\tpatchFn(Zepto && Zepto.fn);\n}\n\n// Make sure that the values within Velocity are read-only and upatchable.\nfor (const property in VelocityStatic) {\n\tif (VelocityStatic.hasOwnProperty(property)) {\n\t\tswitch (typeof property) {\n\t\t\tcase \"number\":\n\t\t\tcase \"boolean\":\n\t\t\t\tdefineProperty(Velocity, property, {\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn VelocityStatic[property];\n\t\t\t\t\t},\n\t\t\t\t\tset(value) {\n\t\t\t\t\t\t(VelocityStatic[property] as any) = value;\n\t\t\t\t\t},\n\t\t\t\t}, true);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tdefineProperty(Velocity, property, VelocityStatic[property], true);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nObject.freeze(Velocity);\n\nexport default Velocity; // tslint:disable-line:no-default-export\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Typedefs\nimport {AnimationCall, SequenceList, VelocitySequence, VelocityTween} from \"../../velocity.d\";\n\n// Project\nimport {isNumber, isPlainObject, isString} from \"../types\";\nimport Velocity from \"../velocity\";\nimport {registerAction} from \"./actions/actions\";\nimport {camelCase} from \"./camelCase\";\nimport {getNormalization} from \"./normalizations/normalizations\";\nimport {validateDuration, validateEasing} from \"./options\";\nimport {SequencesObject} from \"./sequencesObject\";\nimport {findPattern} from \"./tweens\";\n\n// Constants\nimport {DEFAULT_DURATION} from \"../constants\";\n\nconst rxPercents = /(\\d*\\.\\d+|\\d+\\.?|from|to)/g;\n\nexport function expandSequence(animation: AnimationCall, sequence: SequenceList) {\n\tconst tweens = animation.tweens = Object.create(null),\n\t\telement = animation.element;\n\n\tfor (const propertyName in sequence.tweens) {\n\t\tif (sequence.tweens.hasOwnProperty(propertyName)) {\n\t\t\tconst fn = getNormalization(element, propertyName);\n\n\t\t\tif (!fn && propertyName !== \"tween\") {\n\t\t\t\tif (Velocity.debug) {\n\t\t\t\t\tconsole.log(`Skipping [${propertyName}] due to a lack of browser support.`);\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\ttweens[propertyName] = {\n\t\t\t\tfn,\n\t\t\t\tsequence: sequence.tweens[propertyName],\n\t\t\t} as VelocityTween;\n\t\t}\n\t}\n}\n\n/**\n * Used to register a sequence. This should never be called by users\n * directly, instead it should be called via an action:<br/>\n * <code>Velocity(\"registerSequence\", \"\"name\", VelocitySequence);</code>\n */\nexport function registerSequence(args?: [string, VelocitySequence] | [{[name: string]: VelocitySequence}]) {\n\tif (isPlainObject(args[0])) {\n\t\tfor (const name in (args[0] as {[name: string]: VelocitySequence})) {\n\t\t\tif (args[0].hasOwnProperty(name)) {\n\t\t\t\tregisterSequence([name, args[0][name]]);\n\t\t\t}\n\t\t}\n\t} else if (isString(args[0])) {\n\t\tconst name = args[0] as string,\n\t\t\tsequence = args[1] as VelocitySequence;\n\n\t\tif (!isString(name)) {\n\t\t\tconsole.warn(`VelocityJS: Trying to set 'registerSequence' name to an invalid value:`, name);\n\t\t} else if (!isPlainObject(sequence)) {\n\t\t\tconsole.warn(`VelocityJS: Trying to set 'registerSequence' sequence to an invalid value:`, name, sequence);\n\t\t} else {\n\t\t\tif (SequencesObject[name]) {\n\t\t\t\tconsole.warn(`VelocityJS: Replacing named sequence:`, name);\n\t\t\t}\n\t\t\tconst percents: {[key: string]: string[]} = {},\n\t\t\t\tsteps: string[] = new Array(100),\n\t\t\t\tproperties: string[] = [],\n\t\t\t\tpercentages: string[] = [],\n\t\t\t\tsequenceList: SequenceList = SequencesObject[name] = {} as any,\n\t\t\t\tduration = validateDuration((sequence as any).duration);\n\n\t\t\tsequenceList.tweens = {};\n\t\t\tif (isNumber(duration)) {\n\t\t\t\tsequenceList.duration = duration;\n\t\t\t}\n\t\t\tfor (const part in sequence) {\n\t\t\t\tif (sequence.hasOwnProperty(part)) {\n\t\t\t\t\tconst keys = String(part)\n\t\t\t\t\t\t.match(rxPercents);\n\n\t\t\t\t\tif (keys) {\n\t\t\t\t\t\tpercentages.push(part);\n\t\t\t\t\t\tfor (const key of keys) {\n\t\t\t\t\t\t\tconst percent = key === \"from\"\n\t\t\t\t\t\t\t\t? 0\n\t\t\t\t\t\t\t\t: key === \"to\"\n\t\t\t\t\t\t\t\t\t? 100\n\t\t\t\t\t\t\t\t\t: parseFloat(key);\n\n\t\t\t\t\t\t\tif (percent < 0 || percent > 100) {\n\t\t\t\t\t\t\t\tconsole.warn(`VelocityJS: Trying to use an invalid value as a percentage (0 <= n <= 100):`, name, percent);\n\t\t\t\t\t\t\t} else if (isNaN(percent)) {\n\t\t\t\t\t\t\t\tconsole.warn(`VelocityJS: Trying to use an invalid number as a percentage:`, name, part, key);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tif (!percents[String(percent)]) {\n\t\t\t\t\t\t\t\t\tpercents[String(percent)] = [];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tpercents[String(percent)].push(part);\n\t\t\t\t\t\t\t\tfor (const property in sequence[part]) {\n\t\t\t\t\t\t\t\t\tif (!properties.includes(property)) {\n\t\t\t\t\t\t\t\t\t\tproperties.push(property);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst orderedPercents = Object.keys(percents)\n\t\t\t\t.sort((a, b) => {\n\t\t\t\t\tconst a1 = parseFloat(a),\n\t\t\t\t\t\tb1 = parseFloat(b);\n\n\t\t\t\t\treturn a1 > b1 ? 1 : a1 < b1 ? -1 : 0;\n\t\t\t\t});\n\n\t\t\torderedPercents.forEach((key) => {\n\t\t\t\tsteps.push.apply(percents[key]);\n\t\t\t});\n\t\t\tfor (const property of properties) {\n\t\t\t\tconst parts: string[] = [],\n\t\t\t\t\tpropertyName = camelCase(property);\n\n\t\t\t\tfor (const key of orderedPercents) {\n\t\t\t\t\tfor (const value of percents[key]) {\n\t\t\t\t\t\tconst stepProperties = sequence[value];\n\n\t\t\t\t\t\tif (stepProperties[propertyName]) {\n\t\t\t\t\t\t\tparts.push(isString(stepProperties[propertyName])\n\t\t\t\t\t\t\t\t? stepProperties[propertyName]\n\t\t\t\t\t\t\t\t: stepProperties[propertyName][0]);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (parts.length) {\n\t\t\t\t\tconst realSequence = findPattern(parts, propertyName);\n\t\t\t\t\tlet index = 0;\n\n\t\t\t\t\tif (realSequence) {\n\t\t\t\t\t\tfor (const key of orderedPercents) {\n\t\t\t\t\t\t\tfor (const value of percents[key]) {\n\t\t\t\t\t\t\t\tconst originalProperty = sequence[value][propertyName];\n\n\t\t\t\t\t\t\t\tif (originalProperty) {\n\t\t\t\t\t\t\t\t\tif (Array.isArray(originalProperty) && originalProperty.length > 1 && (isString(originalProperty[1]) || Array.isArray(originalProperty[1]))) {\n\t\t\t\t\t\t\t\t\t\trealSequence[index].easing = validateEasing(originalProperty[1], sequenceList.duration || DEFAULT_DURATION);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\trealSequence[index++].percent = parseFloat(key) / 100;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsequenceList.tweens[propertyName] = realSequence;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\nregisterAction([\"registerSequence\", registerSequence], true);\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Core \"Velocity\" function.\n */\n\n// Typedefs\nimport {\n\tAnimationCall, AnimationFlags, HTMLorSVGElement, Properties, StrictVelocityOptions,\n\tVelocityElements, VelocityObjectArgs, VelocityOptionFn, VelocityOptions, VelocityPromise,\n\tVelocityProperty, VelocityResult,\n} from \"./../velocity.d\";\n\n// Project\nimport { isBoolean, isFunction, isNode, isNumber, isPlainObject, isString, isVelocityResult, isWrapped } from \"./types\";\nimport { cloneArray, defineProperty, getValue } from \"./utility\";\nimport { Data } from \"./Velocity/data\";\nimport {\n\tvalidateBegin, validateComplete, validateDelay, validateDuration, validateEasing,\n\tvalidateLoop, validateProgress, validateQueue, validateRepeat, validateSpeed, validateSync,\n} from \"./Velocity/options\";\nimport { patch as patchFn } from \"./Velocity/patch\";\nimport { queue } from \"./Velocity/queue\";\nimport { expandSequence } from \"./Velocity/sequences\";\nimport { tick } from \"./Velocity/tick\";\nimport { expandProperties } from \"./Velocity/tweens\";\n\nimport { Actions as ActionsObject } from \"./Velocity/actions/actions\";\nimport { defaults as DefaultObject } from \"./Velocity/defaults\";\nimport { SequencesObject } from \"./Velocity/sequencesObject\";\nimport { State as StateObject } from \"./Velocity/state\";\n\nlet globalPromise: PromiseConstructor;\n\ntry {\n\tglobalPromise = Promise;\n} catch {/**/ }\n\nconst noPromiseOption = \", if that is deliberate then pass `promiseRejectEmpty:false` as an option\";\n\n/**\n * Patch a VelocityResult with a Promise.\n */\nfunction patchPromise(promiseObject: Promise<any>, result: VelocityResult) {\n\tdefineProperty(result, \"promise\", promiseObject);\n\tdefineProperty(result, \"then\", promiseObject.then.bind(promiseObject));\n\tdefineProperty(result, \"catch\", promiseObject.catch.bind(promiseObject));\n\tif ((promiseObject as any).finally) {\n\t\t// Semi-standard\n\t\tdefineProperty(result, \"finally\", (promiseObject as any).finally.bind(promiseObject));\n\t}\n}\n\n/* tslint:disable:max-line-length */\n/**\n * The main Velocity function. Acts as a gateway to everything else.\n */\nexport function Velocity(options: VelocityObjectArgs): VelocityResult;\nexport function Velocity(elements: VelocityElements, propertyMap: string | Properties<VelocityProperty>, options?: VelocityOptions): VelocityResult;\nexport function Velocity(elements: VelocityElements, propertyMap: string | Properties<VelocityProperty>, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\nexport function Velocity(elements: VelocityElements, propertyMap: string | Properties<VelocityProperty>, complete?: () => void): VelocityResult;\nexport function Velocity(elements: VelocityElements, propertyMap: string | Properties<VelocityProperty>, easing?: string | number[], complete?: () => void): VelocityResult;\nexport function Velocity(elements: VelocityElements, propertyMap: string | Properties<VelocityProperty>, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\nexport function Velocity(this: VelocityElements, propertyMap: string | Properties<VelocityProperty>, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\nexport function Velocity(this: VelocityElements, propertyMap: string | Properties<VelocityProperty>, complete?: () => void): VelocityResult;\nexport function Velocity(this: VelocityElements, propertyMap: string | Properties<VelocityProperty>, easing?: string | number[], complete?: () => void): VelocityResult;\nexport function Velocity(this: VelocityElements, propertyMap: string | Properties<VelocityProperty>, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\n/* tslint:enable:max-line-length */\nexport function Velocity(this: VelocityElements | void, ...args: any[]): VelocityResult {\n\tconst\n\t\t/**\n\t\t * A shortcut to the default options.\n\t\t */\n\t\tdefaults = DefaultObject,\n\t\t/**\n\t\t * Cache of the first argument - this is used often enough to be saved.\n\t\t */\n\t\targs0 = args[0] as VelocityObjectArgs,\n\t\t/**\n\t\t * To allow for expressive CoffeeScript code, Velocity supports an\n\t\t * alternative syntax in which \"elements\" (or \"e\"), \"properties\" (or\n\t\t * \"p\"), and \"options\" (or \"o\") objects are defined on a container\n\t\t * object that's passed in as Velocity's sole argument.\n\t\t *\n\t\t * Note: Some browsers automatically populate arguments with a\n\t\t * \"properties\" object. We detect it by checking for its default\n\t\t * \"names\" property.\n\t\t */\n\t\t// TODO: Confirm which browsers - if <=IE8 the we can drop completely\n\t\tsyntacticSugar = isPlainObject(args0) && (args0.p || ((isPlainObject(args0.properties) && !(args0.properties as any).names) || isString(args0.properties)));\n\tlet\n\t\t/**\n\t\t * When Velocity is called via the utility function (Velocity()),\n\t\t * elements are explicitly passed in as the first parameter. Thus,\n\t\t * argument positioning varies.\n\t\t */\n\t\targumentIndex: number = 0,\n\t\t/**\n\t\t * The list of elements, extended with Promise and Velocity.\n\t\t */\n\t\telements: VelocityResult,\n\t\t/**\n\t\t * The properties being animated. This can be a string, in which case it\n\t\t * is either a function for these elements, or it is a \"named\" animation\n\t\t * sequence to use instead. Named sequences start with either \"callout.\"\n\t\t * or \"transition.\". When used as a callout the values will be reset\n\t\t * after finishing. When used as a transtition then there is no special\n\t\t * handling after finishing.\n\t\t */\n\t\tpropertiesMap: string | Properties<VelocityProperty>,\n\t\t/**\n\t\t * Options supplied, this will be mapped and validated into\n\t\t * <code>options</code>.\n\t\t */\n\t\toptionsMap: VelocityOptions,\n\t\t/**\n\t\t * If called via a chain then this contains the <b>last</b> calls\n\t\t * animations. If this does not have a value then any access to the\n\t\t * element's animations needs to be to the currently-running ones.\n\t\t */\n\t\tanimations: AnimationCall[],\n\t\t/**\n\t\t * The promise that is returned.\n\t\t */\n\t\tpromise: Promise<VelocityResult>,\n\t\t// Used when the animation is finished\n\t\tresolver: (value?: VelocityResult) => void,\n\t\t// Used when there was an issue with one or more of the Velocity arguments\n\t\trejecter: (reason: any) => void;\n\n\t//console.log(`Velocity`, args)\n\t// First get the elements, and the animations connected to the last call if\n\t// this is chained.\n\t// TODO: Clean this up a bit\n\t// TODO: Throw error if the chain is called with elements as the first argument. isVelocityResult(this) && ( (isNode(arg0) || isWrapped(arg0)) && arg0 == this)\n\tif (isNode(this)) {\n\t\t// This is from a chain such as document.getElementById(\"\").velocity(...)\n\t\telements = [this as HTMLorSVGElement] as VelocityResult;\n\t} else if (isWrapped(this)) {\n\t\t// This might be a chain from something else, but if chained from a\n\t\t// previous Velocity() call then grab the animations it's related to.\n\t\telements = cloneArray(this as HTMLorSVGElement[]) as VelocityResult;\n\t\tif (isVelocityResult(this)) {\n\t\t\tanimations = (this as VelocityResult).velocity.animations;\n\t\t}\n\t} else if (syntacticSugar) {\n\t\telements = cloneArray(args0.elements || args0.e) as VelocityResult;\n\t\targumentIndex++;\n\t} else if (isNode(args0)) {\n\t\telements = cloneArray([args0]) as VelocityResult;\n\t\targumentIndex++;\n\t} else if (isWrapped(args0)) {\n\t\telements = cloneArray(args0) as VelocityResult;\n\t\targumentIndex++;\n\t}\n\t// Allow elements to be chained.\n\tif (elements) {\n\t\tdefineProperty(elements, \"velocity\", Velocity.bind(elements));\n\t\tif (animations) {\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\n\t\t}\n\t}\n\t// Next get the propertiesMap and options.\n\tif (syntacticSugar) {\n\t\tpropertiesMap = getValue(args0.properties, args0.p);\n\t} else {\n\t\t// TODO: Should be possible to call Velocity(\"pauseAll\") - currently not possible\n\t\tpropertiesMap = args[argumentIndex++] as string | Properties<VelocityProperty>;\n\t}\n\t// Get any options map passed in as arguments first, expand any direct\n\t// options if possible.\n\tconst isReverse = propertiesMap === \"reverse\",\n\t\tisAction = !isReverse && isString(propertiesMap),\n\t\tmaybeSequence = isAction && SequencesObject[propertiesMap as string],\n\t\topts = syntacticSugar ? getValue(args0.options, args0.o) : args[argumentIndex];\n\n\tif (isPlainObject(opts)) {\n\t\toptionsMap = opts;\n\t}\n\t// Create the promise if supported and wanted.\n\tif (globalPromise && getValue(optionsMap && optionsMap.promise, defaults.promise)) {\n\t\tpromise = new globalPromise((resolve, reject) => {\n\t\t\trejecter = reject;\n\t\t\t// IMPORTANT:\n\t\t\t// If a resolver tries to run on a Promise then it will wait until\n\t\t\t// that Promise resolves - but in this case we're running on our own\n\t\t\t// Promise, so need to make sure it's not seen as one. Removing\n\t\t\t// these values for the duration of the resolve.\n\t\t\t// Due to being an async call, they should be back to \"normal\"\n\t\t\t// before the <code>.then()</code> function gets called.\n\t\t\tresolver = (result: VelocityResult) => {\n\t\t\t\tif (isVelocityResult(result) && result.promise) {\n\t\t\t\t\tdelete result.then;\n\t\t\t\t\tdelete result.catch;\n\t\t\t\t\tdelete (result as any).finally;\n\t\t\t\t\tresolve(result);\n\t\t\t\t\tpatchPromise(result.promise, result);\n\t\t\t\t} else {\n\t\t\t\t\tresolve(result);\n\t\t\t\t}\n\t\t\t};\n\t\t});\n\t\tif (elements) {\n\t\t\tpatchPromise(promise, elements);\n\t\t}\n\t}\n\tif (promise) {\n\t\tconst optionPromiseRejectEmpty = optionsMap && optionsMap.promiseRejectEmpty,\n\t\t\tpromiseRejectEmpty: boolean = getValue(optionPromiseRejectEmpty, defaults.promiseRejectEmpty);\n\n\t\tif (!elements && !isAction) {\n\t\t\tif (promiseRejectEmpty) {\n\t\t\t\trejecter(`Velocity: No elements supplied${isBoolean(optionPromiseRejectEmpty) ? \"\" : noPromiseOption}. Aborting.`);\n\t\t\t} else {\n\t\t\t\tresolver();\n\t\t\t}\n\t\t} else if (!propertiesMap) {\n\t\t\tif (promiseRejectEmpty) {\n\t\t\t\trejecter(`Velocity: No properties supplied${isBoolean(optionPromiseRejectEmpty) ? \"\" : noPromiseOption}. Aborting.`);\n\t\t\t} else {\n\t\t\t\tresolver();\n\t\t\t}\n\t\t}\n\t}\n\tif ((!elements && !isAction) || !propertiesMap) {\n\t\treturn promise as any;\n\t}\n\n\t// NOTE: Can't use isAction here due to type inference - there are callbacks\n\t// between so the type isn't considered safe.\n\tif (isAction) {\n\t\tconst actionArgs: any[] = [],\n\t\t\tpromiseHandler: VelocityPromise = promise && {\n\t\t\t\t_promise: promise,\n\t\t\t\t_resolver: resolver,\n\t\t\t\t_rejecter: rejecter,\n\t\t\t};\n\n\t\twhile (argumentIndex < args.length) {\n\t\t\tactionArgs.push(args[argumentIndex++]);\n\t\t}\n\n\t\t// Velocity's behavior is categorized into \"actions\". If a string is\n\t\t// passed in instead of a propertiesMap then that will call a function\n\t\t// to do something special to the animation linked.\n\t\t// There is one special case - \"reverse\" - which is handled differently,\n\t\t// by being stored on the animation and then expanded when the animation\n\t\t// starts.\n\t\tconst action = (propertiesMap as string).replace(/\\..*$/, \"\"),\n\t\t\tcallback = ActionsObject[action];\n\n\t\tif (callback) {\n\t\t\tconst result = callback(actionArgs, elements, promiseHandler, propertiesMap as string);\n\n\t\t\tif (result !== undefined) {\n\t\t\t\treturn result;\n\t\t\t}\n\n\t\t\treturn elements || promise as any;\n\t\t} else if (!maybeSequence) {\n\t\t\tconsole.error(`VelocityJS: First argument (${propertiesMap}) was not a property map, a known action, or a registered redirect. Aborting.`);\n\n\t\t\treturn;\n\t\t}\n\t}\n\tlet hasValidDuration: boolean;\n\n\tif (isPlainObject(propertiesMap) || isReverse || maybeSequence) {\n\t\t/**\n\t\t * The options for this set of animations.\n\t\t */\n\t\tconst options: StrictVelocityOptions = {};\n\t\tlet isSync = defaults.sync;\n\n\t\t// Private options first - set as non-enumerable, and starting with an\n\t\t// underscore so we can filter them out.\n\t\tif (promise) {\n\t\t\tdefineProperty(options, \"_promise\", promise);\n\t\t\tdefineProperty(options, \"_rejecter\", rejecter);\n\t\t\tdefineProperty(options, \"_resolver\", resolver);\n\t\t}\n\t\tdefineProperty(options, \"_ready\", 0);\n\t\tdefineProperty(options, \"_started\", 0);\n\t\tdefineProperty(options, \"_completed\", 0);\n\t\tdefineProperty(options, \"_total\", 0);\n\n\t\t// Now check the optionsMap\n\t\tif (isPlainObject(optionsMap)) {\n\t\t\tconst validDuration = validateDuration(optionsMap.duration);\n\n\t\t\thasValidDuration = validDuration !== undefined;\n\t\t\toptions.duration = getValue(validDuration, defaults.duration);\n\t\t\toptions.delay = getValue(validateDelay(optionsMap.delay), defaults.delay);\n\t\t\t// Need the extra fallback here in case it supplies an invalid\n\t\t\t// easing that we need to overrride with the default.\n\t\t\toptions.easing = validateEasing(getValue(optionsMap.easing, defaults.easing), options.duration) || validateEasing(defaults.easing, options.duration);\n\t\t\toptions.loop = getValue(validateLoop(optionsMap.loop), defaults.loop);\n\t\t\toptions.repeat = options.repeatAgain = getValue(validateRepeat(optionsMap.repeat), defaults.repeat);\n\t\t\tif (optionsMap.speed != null) {\n\t\t\t\toptions.speed = getValue(validateSpeed(optionsMap.speed), 1);\n\t\t\t}\n\t\t\tif (isBoolean(optionsMap.promise)) {\n\t\t\t\toptions.promise = optionsMap.promise;\n\t\t\t}\n\t\t\toptions.queue = getValue(validateQueue(optionsMap.queue), defaults.queue);\n\t\t\tif (optionsMap.mobileHA && !StateObject.isGingerbread) {\n\t\t\t\t/* When set to true, and if this is a mobile device, mobileHA automatically enables hardware acceleration (via a null transform hack)\n\t\t\t\t on animating elements. HA is removed from the element at the completion of its animation. */\n\t\t\t\t/* Note: Android Gingerbread doesn't support HA. If a null transform hack (mobileHA) is in fact set, it will prevent other tranform subproperties from taking effect. */\n\t\t\t\t/* Note: You can read more about the use of mobileHA in Velocity's documentation: velocity-animate/#mobileHA. */\n\t\t\t\toptions.mobileHA = true;\n\t\t\t}\n\t\t\tif (optionsMap.drag === true) {\n\t\t\t\toptions.drag = true;\n\t\t\t}\n\t\t\tif (isNumber(optionsMap.stagger) || isFunction(optionsMap.stagger)) {\n\t\t\t\toptions.stagger = optionsMap.stagger;\n\t\t\t}\n\t\t\tif (!isReverse) {\n\t\t\t\tif (optionsMap[\"display\"] != null) {\n\t\t\t\t\t(propertiesMap as Properties<VelocityProperty>).display = optionsMap[\"display\"] as string;\n\t\t\t\t\tconsole.error(`Deprecated \"options.display\" used, this is now a property:`, optionsMap[\"display\"]);\n\t\t\t\t}\n\t\t\t\tif (optionsMap[\"visibility\"] != null) {\n\t\t\t\t\t(propertiesMap as Properties<VelocityProperty>).visibility = optionsMap[\"visibility\"] as string;\n\t\t\t\t\tconsole.error(`Deprecated \"options.visibility\" used, this is now a property:`, optionsMap[\"visibility\"]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// TODO: Allow functional options for different options per element\n\t\t\tconst optionsBegin = validateBegin(optionsMap.begin),\n\t\t\t\toptionsComplete = validateComplete(optionsMap.complete),\n\t\t\t\toptionsProgress = validateProgress(optionsMap.progress),\n\t\t\t\toptionsSync = validateSync(optionsMap.sync);\n\n\t\t\tif (optionsBegin != null) {\n\t\t\t\toptions.begin = optionsBegin;\n\t\t\t}\n\t\t\tif (optionsComplete != null) {\n\t\t\t\toptions.complete = optionsComplete;\n\t\t\t}\n\t\t\tif (optionsProgress != null) {\n\t\t\t\toptions.progress = optionsProgress;\n\t\t\t}\n\t\t\tif (optionsSync != null) {\n\t\t\t\tisSync = optionsSync;\n\t\t\t}\n\t\t} else if (!syntacticSugar) {\n\t\t\t// Expand any direct options if possible.\n\t\t\tlet offset = 0;\n\n\t\t\toptions.duration = validateDuration(args[argumentIndex], true);\n\t\t\tif (options.duration === undefined) {\n\t\t\t\toptions.duration = defaults.duration;\n\t\t\t} else {\n\t\t\t\thasValidDuration = true;\n\t\t\t\toffset++;\n\t\t\t}\n\t\t\tif (!isFunction(args[argumentIndex + offset])) {\n\t\t\t\t// Despite coming before Complete, we can't pass a fn easing\n\t\t\t\tconst easing = validateEasing(args[argumentIndex + offset], getValue(options && validateDuration(options.duration), defaults.duration) as number, true);\n\n\t\t\t\tif (easing !== undefined) {\n\t\t\t\t\toffset++;\n\t\t\t\t\toptions.easing = easing;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst complete = validateComplete(args[argumentIndex + offset], true);\n\n\t\t\tif (complete !== undefined) {\n\t\t\t\toptions.complete = complete;\n\t\t\t}\n\t\t\toptions.delay = defaults.delay;\n\t\t\toptions.loop = defaults.loop;\n\t\t\toptions.repeat = options.repeatAgain = defaults.repeat;\n\t\t}\n\n\t\tif (isReverse && options.queue === false) {\n\t\t\tthrow new Error(\"VelocityJS: Cannot reverse a queue:false animation.\");\n\t\t}\n\n\t\tif (!hasValidDuration && maybeSequence && maybeSequence.duration) {\n\t\t\toptions.duration = maybeSequence.duration;\n\t\t}\n\n\t\t// When a set of elements is targeted by a Velocity call, the set is\n\t\t// broken up and each element has the current Velocity call individually\n\t\t// queued onto it. In this way, each element's existing queue is\n\t\t// respected; some elements may already be animating and accordingly\n\t\t// should not have this current Velocity call triggered immediately\n\t\t// unless the sync:true option is used.\n\n\t\tconst rootAnimation: AnimationCall = {\n\t\t\toptions,\n\t\t\telements,\n\t\t\t_prev: undefined,\n\t\t\t_next: undefined,\n\t\t\t_flags: isSync ? AnimationFlags.SYNC : 0,\n\t\t\tpercentComplete: 0,\n\t\t\tellapsedTime: 0,\n\t\t\ttimeStart: 0,\n\t\t};\n\n\t\tanimations = [];\n\t\tfor (let index = 0; index < elements.length; index++) {\n\t\t\tconst element = elements[index];\n\t\t\tlet flags = 0;\n\n\t\t\tif (isNode(element)) { // TODO: This needs to check for valid animation targets, not just Elements\n\t\t\t\tif (isReverse) {\n\t\t\t\t\tconst lastAnimation = Data(element).lastAnimationList[options.queue as string];\n\n\t\t\t\t\tpropertiesMap = lastAnimation && lastAnimation.tweens as any;\n\t\t\t\t\tif (!propertiesMap) {\n\t\t\t\t\t\tconsole.error(`VelocityJS: Attempting to reverse an animation on an element with no previous animation:`, element);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tflags |= AnimationFlags.REVERSE & ~(lastAnimation._flags & AnimationFlags.REVERSE); // tslint:disable-line:no-bitwise\n\t\t\t\t}\n\t\t\t\tconst animation: AnimationCall = {\n\t\t\t\t\t...rootAnimation,\n\t\t\t\t\telement,\n\t\t\t\t\t_flags: rootAnimation._flags | flags, // tslint:disable-line:no-bitwise\n\t\t\t\t};\n\n\t\t\t\toptions._total++;\n\t\t\t\tanimations.push(animation);\n\t\t\t\tif (options.stagger) {\n\t\t\t\t\tif (isFunction(options.stagger)) {\n\t\t\t\t\t\tconst num = optionCallback(options.stagger, element, index, elements.length, elements, \"stagger\");\n\n\t\t\t\t\t\tif (isNumber(num)) {\n\t\t\t\t\t\t\tanimation.delay = options.delay + num;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tanimation.delay = options.delay + (options.stagger * index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (options.drag) {\n\t\t\t\t\tanimation.duration = options.duration - (options.duration * Math.max(1 - (index + 1) / elements.length, 0.75));\n\t\t\t\t}\n\t\t\t\tif (maybeSequence) {\n\t\t\t\t\texpandSequence(animation, maybeSequence);\n\t\t\t\t} else if (isReverse) {\n\t\t\t\t\t// In this case we're using the previous animation, so\n\t\t\t\t\t// it will be expanded correctly when that one runs.\n\t\t\t\t\tanimation.tweens = propertiesMap as any;\n\t\t\t\t} else {\n\t\t\t\t\tanimation.tweens = Object.create(null);\n\t\t\t\t\texpandProperties(animation, propertiesMap);\n\t\t\t\t}\n\t\t\t\tqueue(element, animation, options.queue);\n\t\t\t}\n\t\t}\n\t\tif (StateObject.isTicking === false) {\n\t\t\t// If the animation tick isn't running, start it. (Velocity shuts it\n\t\t\t// off when there are no active calls to process.)\n\t\t\ttick(false);\n\t\t}\n\t\tif (animations) {\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\n\t\t}\n\t}\n\t/***************\n\t Chaining\n\t ***************/\n\n\t/* Return the elements back to the call chain, with wrapped elements taking precedence in case Velocity was called via the $.fn. extension. */\n\treturn elements || promise as any;\n}\n\n/**\n * Call an option callback in a try/catch block and report an error if needed.\n */\nfunction optionCallback<T>(fn: VelocityOptionFn<T>, element: HTMLorSVGElement, index: number, length: number, elements: HTMLorSVGElement[], option: string): T {\n\ttry {\n\t\treturn fn.call(element, index, length, elements, option);\n\t} catch (e) {\n\t\tconsole.error(`VelocityJS: Exception when calling '${option}' callback:`, e);\n\t}\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n */\n\n// Project\nimport {defineProperty} from \"../utility\";\nimport {Velocity} from \"../velocityFn\";\n\n/**\n * Used to patch any object to allow Velocity chaining. In order to chain an\n * object must either be treatable as an array - with a <code>.length</code>\n * property, and each member a Node, or a Node directly.\n *\n * By default Velocity will try to patch <code>window</code>,\n * <code>jQuery</code>, <code>Zepto</code>, and several classes that return\n * Nodes or lists of Nodes.\n */\nexport function patch(proto: any, global?: boolean) {\n\ttry {\n\t\tdefineProperty(proto, (global ? \"V\" : \"v\") + \"elocity\", Velocity);\n\t} catch (e) {\n\t\tconsole.warn(`VelocityJS: Error when trying to add prototype.`, e);\n\t}\n}\n","/*\n * velocity-animate (C) 2014-2018 Julian Shapiro.\n *\n * Licensed under the MIT license. See LICENSE file in the project root for details.\n *\n * Extended Velocity members.\n */\n\n// Typedefs\nimport {\n\tSequenceList, StrictVelocityOptions, Velocity as VelocityPublic,\n\tVelocityActionFn, VelocityEasingFn, VelocityState,\n} from \"./../velocity.d\";\n\n// Project\nimport { defineProperty } from \"./utility\";\nimport { Actions as ActionsObject } from \"./Velocity/actions/actions\";\nimport { defaults as DefaultObject } from \"./Velocity/defaults\";\nimport { Easings as EasingsObject } from \"./Velocity/easing/easings\";\nimport { patch as patchFn } from \"./Velocity/patch\";\nimport { SequencesObject } from \"./Velocity/sequencesObject\";\nimport { State as StateObject } from \"./Velocity/state\";\nimport { Velocity as VelocityFn } from \"./velocityFn\";\n\n// Build the entire library, even optional bits.\nimport \"./Velocity/_all\";\n\n// Constants\nimport { VERSION } from \"../version\";\nconst Velocity: VelocityPublic = VelocityFn as any;\n\n/**\n * These parts of Velocity absolutely must be included, even if they're unused!\n */\nnamespace VelocityStatic {\n\t/**\n\t * Actions cannot be replaced if they are internal (hasOwnProperty is false\n\t * but they still exist). Otherwise they can be replaced by users.\n\t *\n\t * All external method calls should be using actions rather than sub-calls\n\t * of Velocity itself.\n\t */\n\texport const Actions: { [name: string]: VelocityActionFn } = ActionsObject;\n\n\t/**\n\t * Our known easing functions.\n\t */\n\texport const Easings: { [name: string]: VelocityEasingFn } = EasingsObject;\n\n\t/**\n\t * The currently registered sequences.\n\t */\n\texport const Sequences: { [name: string]: SequenceList } = SequencesObject;\n\n\t/**\n\t * Current internal state of Velocity.\n\t */\n\texport const State: VelocityState = StateObject; // tslint:disable-line:no-shadowed-variable\n\n\t/**\n\t * Velocity option defaults, which can be overriden by the user.\n\t */\n\texport const defaults: StrictVelocityOptions & { reset?: () => void } = DefaultObject as any;\n\n\t/**\n\t * Used to patch any object to allow Velocity chaining. In order to chain an\n\t * object must either be treatable as an array - with a <code>.length</code>\n\t * property, and each member a Node, or a Node directly.\n\t *\n\t * By default Velocity will try to patch <code>window</code>,\n\t * <code>jQuery</code>, <code>Zepto</code>, and several classes that return\n\t * Nodes or lists of Nodes.\n\t */\n\texport const patch = patchFn;\n\n\t/**\n\t * Set to true, 1 or 2 (most verbose) to output debug info to console.\n\t */\n\texport let debug: boolean | 1 | 2 = false;\n\n\t/**\n\t * In mock mode, all animations are forced to complete immediately upon the\n\t * next rAF tick. If there are further animations queued then they will each\n\t * take one single frame in turn. Loops and repeats will be disabled while\n\t * <code>mock = true</code>.\n\t */\n\texport let mock: boolean = false;\n\n\t/**\n\t * Save our version number somewhere visible.\n\t */\n\texport const version = VERSION;\n\n\t/**\n\t * Added as a fallback for \"import {Velocity} from 'velocity-animate';\".\n\t */\n\texport const Velocity: VelocityPublic = VelocityFn as any; // tslint:disable-line:no-shadowed-variable\n}\n\n/* IE detection. Gist: https://gist.github.com/julianshapiro/9098609 */\nconst IE = (() => {\n\tinterface IEDocument extends Document {\n\t\tdocumentMode: any; // IE\n\t}\n\n\tif ((document as IEDocument).documentMode) {\n\t\treturn (document as IEDocument).documentMode;\n\t} else {\n\t\tfor (let i = 7; i > 4; i--) {\n\t\t\tlet div = document.createElement(\"div\");\n\n\t\t\tdiv.innerHTML = `<!${\"--\"}[if IE ${i}]><span></span><![endif]-->`;\n\t\t\tif (div.getElementsByTagName(\"span\").length) {\n\t\t\t\tdiv = null;\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn undefined;\n})();\n\n/******************\n Unsupported\n ******************/\n\nif (IE <= 8) {\n\tthrow new Error(\"VelocityJS cannot run on Internet Explorer 8 or earlier\");\n}\n\n/******************\n Frameworks\n ******************/\n\nif (window) {\n\t/*\n\t * Both jQuery and Zepto allow their $.fn object to be extended to allow\n\t * wrapped elements to be subjected to plugin calls. If either framework is\n\t * loaded, register a \"velocity\" extension pointing to Velocity's core\n\t * animate() method. Velocity also registers itself onto a global container\n\t * (window.jQuery || window.Zepto || window) so that certain features are\n\t * accessible beyond just a per-element scope. Accordingly, Velocity can\n\t * both act on wrapped DOM elements and stand alone for targeting raw DOM\n\t * elements.\n\t */\n\tconst jQuery: { fn: any } = (window as any).jQuery,\n\t\tZepto: { fn: any } = (window as any).Zepto;\n\n\tpatchFn(window, true);\n\tpatchFn(Element && Element.prototype);\n\tpatchFn(NodeList && NodeList.prototype);\n\tpatchFn(HTMLCollection && HTMLCollection.prototype);\n\n\tpatchFn(jQuery, true);\n\tpatchFn(jQuery && jQuery.fn);\n\n\tpatchFn(Zepto, true);\n\tpatchFn(Zepto && Zepto.fn);\n}\n\n// Make sure that the values within Velocity are read-only and upatchable.\nfor (const property in VelocityStatic) {\n\tif (VelocityStatic.hasOwnProperty(property)) {\n\t\tswitch (typeof property) {\n\t\t\tcase \"number\":\n\t\t\tcase \"boolean\":\n\t\t\t\tdefineProperty(Velocity, property, {\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn VelocityStatic[property];\n\t\t\t\t\t},\n\t\t\t\t\tset(value) {\n\t\t\t\t\t\t(VelocityStatic[property] as any) = value;\n\t\t\t\t\t},\n\t\t\t\t}, true);\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tdefineProperty(Velocity, property, VelocityStatic[property], true);\n\t\t\t\tbreak;\n\t\t}\n\t}\n}\n\nObject.freeze(Velocity);\n\nexport default Velocity; // tslint:disable-line:no-default-export\n"],"names":["isBoolean","variable","isFunction","Object","prototype","toString","call","isNode","nodeType","isNumber","isPlainObject","proto","getPrototypeOf","hasOwnProperty","constructor","isString","isVelocityResult","length","velocity","isWrapped","window","propertyIsEnumerable","obj","property","addClass","element","className","Element","classList","add","cloneArray","arrayLike","Array","slice","defineProperty","name","value","readonly","getValue","args","arg","undefined","now","Date","getTime","removeClass","remove","replace","RegExp","Actions","registerAction","internal","callback","warn","DURATION_FAST","DURATION_NORMAL","DURATION_SLOW","FUZZY_MS_PER_SECOND","DEFAULT_CACHE","DEFAULT_DELAY","DEFAULT_DURATION","DEFAULT_EASING","DEFAULT_FPSLIMIT","DEFAULT_LOOP","DEFAULT_PROMISE","DEFAULT_PROMISE_REJECT_EMPTY","DEFAULT_QUEUE","DEFAULT_REPEAT","DEFAULT_SPEED","DEFAULT_SYNC","CLASSNAME","Duration","Easings","registerEasing","linearEasing","percentComplete","startValue","endValue","swingEasing","Math","cos","PI","springEasing","exp","fixRange","num","min","max","A","aA1","aA2","B","C","calcBezier","aT","getSlope","generateBezier","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","i","isNaN","isFinite","mX1","mY1","mX2","mY2","mSampleValues","Float32Array","newtonRaphsonIterate","aX","aGuessT","currentSlope","currentX","calcSampleValues","binarySubdivide","aA","aB","currentT","abs","getTForX","lastSample","intervalStart","currentSample","dist","guessForT","initialSlope","precomputed","precompute","str","f","getControlPoints","x","y","easeIn","easeOut","easeInOut","springAccelerationForState","state","tension","friction","v","springEvaluateStateWithDerivative","initialState","dt","derivative","dx","dv","springIntegrateState","a","b","c","d","dxdt","dvdt","generateSpringRK4","duration","initState","parseFloat","path","tolerance","DT","haveDuration","timeLapsed","lastState","push","floor","cache","generateStep","steps","fn","round","parseDuration","def","toLowerCase","validateCache","validateBegin","validateComplete","noError","validateDelay","parsed","error","validateDuration","validateEasing","isArray","apply","validateFpsLimit","parseInt","validateLoop","validateProgress","validatePromise","validatePromiseRejectEmpty","validateQueue","validateRepeat","validateSpeed","validateSync","begin","complete","delay","easing","fpsLimit","loop","mobileHA","minFrameTime","promise","promiseRejectEmpty","queue","repeat","speed","sync","defaults","freeze","reset","Normalizations","NormalizationUnits","NoCacheNormalizations","Set","constructors","constructorCache","Map","dataName","Data","data","ownerDocument","defaultView","types","index","newData","isClient","windowScrollAnchor","pageYOffset","State","test","navigator","userAgent","document","createElement","documentElement","body","parentNode","animate","animation","prev","last","_prev","_next","first","firstNew","count","queueName","lastAnimationList","queueList","dequeue","skip","freeAnimationCall","next","options","SequencesObject","callComplete","activeCall","elements","completeCall","isLoop","isRepeat","isStopped","_flags","repeatAgain","lastFinishList","timeStart","ellapsedTime","_completed","_total","resolver","_resolver","registerNormalization","indexOf","nextArg","has","get","set","unit","units","hasNormalization","getNormalizationUnit","includes","getNormalization","propertyName","setPropertyValue","propertyValue","noCache","Velocity","debug","info","removeNestedCalc","tokens","split","depth","token","join","camelCase","fixed","$","letter","toUpperCase","rxColor6","rxColor3","rxColorName","rxRGB","rxSpaces","ColorNames","makeRGBA","ignore","r","g","fixColors","$0","$1","$2","augmentDimension","wantInner","isBorderBox","getPropertyValue","sides","fields","augment","field","getWidthHeight","getBoundingClientRect","computePropertyValue","computedStyle","getComputedStyle","computedValue","String","style","position","topLeft","skipCache","rxHex","commands","elementArrayIndex","tween","expandProperties","properties","tweens","create","valueData","log","arr1","arr2","end","start","rxToken","rxNumber","findPattern","parts","partsLength","indexes","numbers","part","match","sequence","pattern","addString","text","returnStringType","isDisplay","isVisibility","more","bits","isUnitless","hasNumbers","digits","change","changeOrUnit","index2","splice","firstLetter","patternCalc","isComplex","isMaths","bit","substring","inRGB","explodeTween","starting","startNumbers","percent","validateTweens","JSON","stringify","beginCall","progressCall","progress","tweenValue","lastTick","asyncCallbacks","progressed","clear","completed","FRAME_TIME","performance","perf","nowOffset","timing","navigationStart","rAFProxy","setTimeout","rAFShim","requestAnimationFrame","ticking","worker","workerFn","interval","onmessage","e","setInterval","postMessage","Worker","URL","createObjectURL","Blob","isMobile","hidden","addEventListener","isTicking","tick","timestamp","timeCurrent","deltaTime","defaultSpeed","defaultEasing","defaultDuration","nextCall","flags","_ready","_started","_first","activeEasing","millisecondsEllapsed","mock","reverse","currentValue","easingComplete","best","j","tweenFrom","tweenTo","rawPercent","tweenPercent","result","size","checkAnimationShouldBeFinished","defaultQueue","endValues","finish","promiseHandler","finishAll","animations","then","animationFlags","isReady","isStarted","isPaused","isSync","isReverse","option","action","key","flag","isPercentComplete","checkAnimation","pauseResume","propertyAction","prop","res","_rejecter","SyntaxError","checkAnimationShouldBeStopped","stop","tweenAction","requireForcefeeding","Error","fakeAnimation","singleResult","maybeSequence","propertyTween","tweenEasing","colorValues","color","registerBackIn","amount","pow","registerBackOut","registerBackInOut","easeOutBouncePercent","easeInBouncePercent","easeInBounce","easeOutBounce","easeInOutBounce","PI2","registerElasticIn","amplitude","period","sin","asin","registerElasticOut","registerElasticInOut","s","atStart","during","atEnd","getDimension","inlineRx","listItemRx","tableRowRx","tableRx","tableRowGroupRx","display","nodeName","clientWidth","scrollWidth","clientHeight","scrollHeight","scroll","direction","client","scrollValue","rxAddPx","getSetPrefixed","unprefixed","getSetStyle","rxVendors","prefixElement","addUnit","getAttribute","setAttribute","base","rxSubtype","rxElement","getOwnPropertyNames","forEach","subtype","exec","createElementNS","attribute","getBBox","getSetTween","VERSION","VelocityFn","VelocityStatic","ActionsObject","EasingsObject","StateObject","DefaultObject","patchFn","IE","documentMode","div","innerHTML","getElementsByTagName","jQuery","Zepto","NodeList","HTMLCollection","rxPercents","expandSequence","registerSequence","percents","percentages","keys","orderedPercents","sort","a1","b1","stepProperties","realSequence","originalProperty","sequenceList","globalPromise","Promise","_a","noPromiseOption","patchPromise","promiseObject","bind","catch","finally","args0","p","names","syntacticSugar","argumentIndex","propertiesMap","isAction","opts","o","optionsMap","resolve","reject","optionPromiseRejectEmpty","actionArgs","rejecter","hasValidDuration","validDuration","isGingerbread","drag","stagger","visibility","optionsBegin","optionsComplete","optionsProgress","optionsSync","offset","rootAnimation","lastAnimation","optionCallback","patch","global"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA;;;SAGgBA,UAAUC;WAClBA,aAAa,IAAb,IAAqBA,aAAa,KAAzC;;AAGD;;;SAgBgBC,WAAWD;WACnBE,OAAOC,SAAP,CAAiBC,QAAjB,CAA0BC,IAA1B,CAA+BL,QAA/B,MAA6C,mBAApD;;;;;SAMeM,OAAON;WACf,CAA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