diff --git a/V2_CHANGES.md b/V2_CHANGES.md index 090490ac..2fe38fae 100644 --- a/V2_CHANGES.md +++ b/V2_CHANGES.md @@ -1,22 +1,23 @@ # Major Changes in Velocity V2 -* Transforms - Use these directly within CSS, don't try the old shortcuts as they don't exist. +* APIs for extending Velocity - see the various register* commands in the wiki. +* Chaining - Chaining is awesome, use it. Chained commands are designed to operate on the chained animation, not on the elements within it. * Colors - All web colors are supported internally. -* SVG - All SVG attributes are supported internally, though they must be placed on the correct type of element. +* Delay - You can pass a negative number to start inside the animation rather than just having a delay before it. +* Display - This is a property, no longer an option. * Loop - This no longer copies the animation call, it calls it multiple times. +* Per-element - Animations are now copied per-element, and not one a one-animation-per-array basis as in other libraries (and old Velocity v1). * Repeat - This is almost identical to loop, but only runs one way. -* Chaining - Chaining is awesome, use it. Chained commands are designed to operate on the chained animation, not on the elements within it. +* RequireJS - The namespace is now "velocity-animate" for consistency with the NPMjs project name. +* Reverse - Now reverses the last animation at time of adding, not when playing. +* Scroll - It is now a property, though it's preferred to use scrollTop and scrollLeft. (Working, but not happy with internal code - the API will not change again.) +* Speed - You can control the speed of the animation playback. * Styles - Use `element.velocity("style", "propertyName"[, value])`, the old .Hook has gone. -* Per-element - Animations are now copied per-element, and not one a one-animation-per-array basis as in other libraries (and old Velocity v1). +* SVG - All SVG attributes are supported internally, though they must be placed on the correct type of element. * Sync - You can now de-sync animations so they start immediately per-element, rather than waiting for all to be ready. -* Speed - You can control the speed of the animation playback. -* Delay - You can pass a negative number to start inside the animation rather than just having a delay before it. -* There are APIs for extending Velocity - see the various register* commands. -* Display - This is a property, no longer an option. +* Transforms - Use these directly within CSS, don't try the old shortcuts as they don't exist. * Visibility - This is a property, no longer an option. -* Reverse - Now reverses the last animation at time of adding, not when playing. # Currently disabled / not updated: * UI-Pack -* Scroll (working, but not happy with interface - it's a property if people want to play, alias of scrollTop, there's also scrollLeft) diff --git a/src/Velocity/actions/actions.ts b/src/Velocity/actions/actions.ts index d53415bf..399c60e3 100644 --- a/src/Velocity/actions/actions.ts +++ b/src/Velocity/actions/actions.ts @@ -14,7 +14,7 @@ namespace VelocityStatic { * All external method calls should be using actions rather than sub-calls * of Velocity itself. */ - export const Actions: {[name: string]: VelocityActionFn} = Object.create(null); + export const Actions: {[name: string]: VelocityActionFn} = createEmptyObject(); /** * Used to register an action. This should never be called by users diff --git a/src/Velocity/css/camelCase.ts b/src/Velocity/css/camelCase.ts index e12f9d7b..51d04df1 100644 --- a/src/Velocity/css/camelCase.ts +++ b/src/Velocity/css/camelCase.ts @@ -9,7 +9,7 @@ namespace VelocityStatic.CSS { /** * Cache every camelCase match to avoid repeating lookups. */ - const cache: {[property: string]: string} = Object.create(null); + const cache: {[property: string]: string} = createEmptyObject(); /** * Camelcase a property name into its JavaScript notation (e.g. diff --git a/src/Velocity/css/fixColors.ts b/src/Velocity/css/fixColors.ts index eca983e5..66653b25 100644 --- a/src/Velocity/css/fixColors.ts +++ b/src/Velocity/css/fixColors.ts @@ -10,7 +10,7 @@ namespace VelocityStatic.CSS { * that the actual name conversion can be in a separate file and not * included for custom builds. */ - export const ColorNames: {[name: string]: string} = Object.create(null); + export const ColorNames: {[name: string]: string} = createEmptyObject(); /** * Convert a hex list to an rgba value. Designed to be used in replace. diff --git a/src/Velocity/data.ts b/src/Velocity/data.ts index ec225bbd..9c52e200 100644 --- a/src/Velocity/data.ts +++ b/src/Velocity/data.ts @@ -30,10 +30,10 @@ function Data(element: HTMLorSVGElement): ElementData { types: types, count: 0, computedStyle: null, - cache: Object.create(null), - queueList: Object.create(null), - lastAnimationList: Object.create(null), - lastFinishList: Object.create(null) + cache: createEmptyObject(), + queueList: createEmptyObject(), + lastAnimationList: createEmptyObject(), + lastFinishList: createEmptyObject() }; Object.defineProperty(element, "velocityData", { value: newData diff --git a/src/Velocity/easing/easings.ts b/src/Velocity/easing/easings.ts index c593f6fa..02d664cf 100644 --- a/src/Velocity/easing/easings.ts +++ b/src/Velocity/easing/easings.ts @@ -11,7 +11,7 @@ interface VelocityEasingsType { } namespace VelocityStatic.Easing { - export const Easings: {[name: string]: VelocityEasingFn} = Object.create(null); + export const Easings: {[name: string]: VelocityEasingFn} = createEmptyObject(); /** * Used to register a easing. This should never be called by users diff --git a/src/Velocity/normalizations/normalizations.ts b/src/Velocity/normalizations/normalizations.ts index e257793e..eda46730 100644 --- a/src/Velocity/normalizations/normalizations.ts +++ b/src/Velocity/normalizations/normalizations.ts @@ -23,6 +23,14 @@ namespace VelocityStatic { */ export const Normalizations: {[name: string]: VelocityNormalizationsFn}[] = []; + /** + * Store a cross-reference to units to be added to specific normalization + * functions if the user supplies a unit-less number. + * + * This is pretty much confined to adding "px" to several css properties. + */ + export const NormalizationUnits: {[unit: string]: VelocityNormalizationsFn[]} = createEmptyObject(); + /** * Any normalisations that should never be cached are listed here. * Faster than an array - https://jsperf.com/array-includes-and-find-methods-vs-set-has @@ -55,7 +63,7 @@ namespace VelocityStatic { * * @private */ - export function registerNormalization(args?: [ClassConstructor, string, VelocityNormalizationsFn] | [ClassConstructor, string, VelocityNormalizationsFn, boolean]) { + export function registerNormalization(args?: [ClassConstructor, string, VelocityNormalizationsFn] | [ClassConstructor, string, VelocityNormalizationsFn, boolean] | [ClassConstructor, string, VelocityNormalizationsFn, string] | [ClassConstructor, string, VelocityNormalizationsFn, string, boolean]) { const constructor = args[0], name: string = args[1], callback = args[2]; @@ -67,14 +75,24 @@ namespace VelocityStatic { } else if (!isFunction(callback)) { console.warn("VelocityJS: Trying to set 'registerNormalization' callback to an invalid value:", name, callback); } else { - let index = constructors.indexOf(constructor); + let index = constructors.indexOf(constructor), + nextArg = 3; if (index < 0) { MaxType = index = constructors.push(constructor) - 1; - Normalizations[index] = Object.create(null); + Normalizations[index] = createEmptyObject(); } Normalizations[index][name] = callback; - if (args[3] === false) { + if (isString(args[nextArg])) { + let unit = args[nextArg++] as string, + units = NormalizationUnits[unit]; + + if (!units) { + units = NormalizationUnits[unit] = []; + } + units.push(callback); + } + if (args[nextArg] === false) { NoCacheNormalizations.add(name); } } @@ -91,6 +109,23 @@ namespace VelocityStatic { return !!Normalizations[index][name]; } + /** + * Get the unit to add to a unitless number based on the normalization used. + */ + export function getNormalizationUnit(fn: VelocityNormalizationsFn) { + for (let unit in NormalizationUnits) { + if (_inArray(NormalizationUnits[unit], fn)) { + return unit; + } + } + return ""; + } + + /** + * Get the normalization for an element and propertyName combination. This + * value should be cached at asking time, as it may change if the user adds + * more normalizations. + */ export function getNormalization(element: HTMLorSVGElement, propertyName: string) { const data = Data(element); let fn: VelocityNormalizationsFn; diff --git a/src/Velocity/normalizations/style.ts b/src/Velocity/normalizations/style.ts index 9e52d47d..539737c8 100644 --- a/src/Velocity/normalizations/style.ts +++ b/src/Velocity/normalizations/style.ts @@ -10,6 +10,70 @@ */ namespace VelocityStatic { + /** + * An RegExp pattern for the following list of css words using + * http://kemio.com.ar/tools/lst-trie-re.php to generate: + * + * blockSize + * borderBottomLeftRadius + * borderBottomRightRadius + * borderBottomWidth + * borderImageOutset + * borderImageWidth + * borderLeftWidth + * borderRadius + * borderRightWidth + * borderSpacing + * borderTopLeftRadius + * borderTopRightRadius + * borderTopWidth + * borderWidth + * bottom + * columnGap + * columnRuleWidth + * columnWidth + * flexBasis + * fontSize + * gridColumnGap + * gridGap + * gridRowGap + * height + * inlineSize + * left + * letterSpacing + * margin + * marginBottom + * marginLeft + * marginRight + * marginTop + * maxBlockSize + * maxHeight + * maxInlineSize + * maxWidth + * minBlockSize + * minHeight + * minInlineSize + * minWidth + * objectPosition + * outlineOffset + * outlineWidth + * padding + * paddingBottom + * paddingLeft + * paddingRight + * paddingTop + * perspective + * right + * shapeMargin + * strokeDashoffset + * strokeWidth + * textIndent + * top + * transformOrigin + * width + * wordSpacing + */ + const 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))$/; /** * Return a Normalisation that can be used to set / get a prefixed style @@ -36,8 +100,10 @@ namespace VelocityStatic { } as VelocityNormalizationsFn; } + /** + * Vendor prefixes. Chrome / Safari, Firefox, IE / Edge, Opera. + */ const rxVendors = /^(webkit|moz|ms|o)[A-Z]/, - rxUnit = /^\d+([a-z]+)/, prefixElement = State.prefixElement; for (const propertyName in prefixElement.style) { @@ -45,10 +111,14 @@ namespace VelocityStatic { let unprefixed = propertyName.replace(/^[a-z]+([A-Z])/, ($, letter: string) => letter.toLowerCase()); if (ALL_VENDOR_PREFIXES || isString(prefixElement.style[unprefixed])) { - registerNormalization([Element, unprefixed, getSetPrefixed(propertyName, unprefixed)]); + let addUnit = rxAddPx.test(unprefixed) ? "px" : undefined; + + registerNormalization([Element, unprefixed, getSetPrefixed(propertyName, unprefixed), addUnit]); } } else if (!hasNormalization([Element, propertyName])) { - registerNormalization([Element, propertyName, getSetStyle(propertyName)]); + let addUnit = rxAddPx.test(propertyName) ? "px" : undefined; + + registerNormalization([Element, propertyName, getSetStyle(propertyName), addUnit]); } } } diff --git a/src/Velocity/runsequence.ts b/src/Velocity/runsequence.ts index a65312d8..f1d20021 100644 --- a/src/Velocity/runsequence.ts +++ b/src/Velocity/runsequence.ts @@ -6,6 +6,38 @@ * Sequence Running */ +/** + * Perform a deep copy of an object - also copies children so they're not + * going to be affected by changing original. + */ +function _deepCopyObject(target: T, ...sources: U[]): T & U { + if (target == null) { // TypeError if undefined or null + throw new TypeError("Cannot convert undefined or null to object"); + } + const to = Object(target), + hasOwnProperty = Object.prototype.hasOwnProperty; + let source: any; + + while ((source = sources.shift())) { + if (source != null) { + for (const key in source) { + if (hasOwnProperty.call(source, key)) { + const value = source[key]; + + if (Array.isArray(value)) { + _deepCopyObject(to[key] = [], value); + } else if (isPlainObject(value)) { + _deepCopyObject(to[key] = {}, value); + } else { + to[key] = value; + } + } + } + } + } + return to; +} + namespace VelocityStatic { /* Note: Sequence calls must use Velocity's single-object arguments syntax. */ export function RunSequence(originalSequence): void { diff --git a/src/Velocity/tweens.ts b/src/Velocity/tweens.ts index 31ac16af..bc17f2a7 100644 --- a/src/Velocity/tweens.ts +++ b/src/Velocity/tweens.ts @@ -14,7 +14,7 @@ namespace VelocityStatic { return (value as any as VelocityPropertyValueFn).call(element, elementArrayIndex, elements.length); }) commands.set("number", function(value, element, elements, elementArrayIndex, propertyName, tween) { - return value + (element instanceof HTMLElement ? getUnitType(propertyName) : ""); + return value + getNormalizationUnit(tween.fn); }); commands.set("string", function(value, element, elements, elementArrayIndex, propertyName, tween) { return CSS.fixColors(value); @@ -23,46 +23,13 @@ namespace VelocityStatic { return CSS.fixColors(CSS.getPropertyValue(element, propertyName, tween.fn) || ""); }); - /** - * Properties that take no default numeric suffix. - */ - const unitless = [ - "borderImageSlice", - "columnCount", - "counterIncrement", - "counterReset", - "flex", - "flexGrow", - "flexShrink", - "floodOpacity", - "fontSizeAdjust", - "fontWeight", - "lineHeight", - "opacity", - "order", - "orphans", - "shapeImageThreshold", - "tabSize", - "widows", - "zIndex" - ]; - - /** - * Retrieve a property's default unit type. Used for assigning a unit - * type when one is not supplied by the user. These are only valid for - * HTMLElement style properties. - */ - function getUnitType(property: string): string { - return _inArray(unitless, property) ? "" : "px"; - } - /** * Expand a VelocityProperty argument into a valid sparse Tween array. This * pre-allocates the array as it is then the correct size and slightly * faster to access. */ export function expandProperties(animation: AnimationCall, properties: VelocityProperties) { - const tweens = animation.tweens = Object.create(null), + const tweens = animation.tweens = createEmptyObject(), elements = animation.elements, element = animation.element, elementArrayIndex = elements.indexOf(element), @@ -87,7 +54,7 @@ namespace VelocityStatic { } continue; } - const tween: VelocityTween = tweens[propertyName] = Object.create(null) as any; + const tween: VelocityTween = tweens[propertyName] = createEmptyObject() as any; let endValue: string, startValue: string; diff --git a/src/core.ts b/src/core.ts index 97aa5787..20ea9bf4 100644 --- a/src/core.ts +++ b/src/core.ts @@ -360,7 +360,7 @@ function VelocityFn(this: VelocityElements | void, ...__args: any[]): VelocityRe } flags |= AnimationFlags.REVERSE & ~(lastAnimation._flags & AnimationFlags.REVERSE); } - const tweens = Object.create(null), + const tweens = createEmptyObject(), animation: AnimationCall = Object.assign({ element: element, tweens: tweens diff --git a/src/utility.ts b/src/utility.ts index a9514a1b..7f8f2fd4 100644 --- a/src/utility.ts +++ b/src/utility.ts @@ -4,6 +4,13 @@ * Licensed under the MIT license. See LICENSE file in the project root for details. */ +/** + * Creates an empty object without any prototype chain. + */ +function createEmptyObject() { + return Object.create(null); +} + /** * The defineProperty() function provides a * shortcut to defining a property that cannot be accidentally iterated across. @@ -18,38 +25,6 @@ function defineProperty(proto: any, name: string, value: Function | any) { } } -/** - * Perform a deep copy of an object - also copies children so they're not - * going to be affected by changing original. - */ -function _deepCopyObject(target: T, ...sources: U[]): T & U { - if (target == null) { // TypeError if undefined or null - throw new TypeError("Cannot convert undefined or null to object"); - } - const to = Object(target), - hasOwnProperty = Object.prototype.hasOwnProperty; - let source: any; - - while ((source = sources.shift())) { - if (source != null) { - for (const key in source) { - if (hasOwnProperty.call(source, key)) { - const value = source[key]; - - if (Array.isArray(value)) { - _deepCopyObject(to[key] = [], value); - } else if (isPlainObject(value)) { - _deepCopyObject(to[key] = {}, value); - } else { - to[key] = value; - } - } - } - } - } - return to; -} - /** * Shim to get the current milliseconds - on anything except old IE it'll use * Date.now() and save creating an object. If that doesn't exist then it'll diff --git a/velocity.js b/velocity.js index 462ce1ef..48d59a1a 100644 --- a/velocity.js +++ b/velocity.js @@ -1,9 +1,7 @@ /*! VelocityJS.org (2.0.1) (C) 2014 Julian Shapiro. MIT @license: en.wikipedia.org/wiki/MIT_License */ (function(root, factory) { if (typeof define === 'function' && define.amd) { - define('Velocity', [], function() { - return (root['Velocity'] = factory()); - }); + define('velocity-animate', [], factory); } else if (typeof module === 'object' && module.exports) { module.exports = factory(); } else { @@ -150,6 +148,12 @@ function isEmptyObject(variable) { * * Licensed under the MIT license. See LICENSE file in the project root for details. */ +/** + * Creates an empty object without any prototype chain. + */ function createEmptyObject() { + return Object.create(null); +} + /** * The defineProperty() function provides a * shortcut to defining a property that cannot be accidentally iterated across. @@ -163,38 +167,6 @@ function isEmptyObject(variable) { } } -/** - * Perform a deep copy of an object - also copies children so they're not - * going to be affected by changing original. - */ function _deepCopyObject(target) { - var sources = []; - for (var _i = 1; _i < arguments.length; _i++) { - sources[_i - 1] = arguments[_i]; - } - if (target == null) { - throw new TypeError("Cannot convert undefined or null to object"); - } - var to = Object(target), hasOwnProperty = Object.prototype.hasOwnProperty; - var source; - while (source = sources.shift()) { - if (source != null) { - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - var value = source[key]; - if (Array.isArray(value)) { - _deepCopyObject(to[key] = [], value); - } else if (isPlainObject(value)) { - _deepCopyObject(to[key] = {}, value); - } else { - to[key] = value; - } - } - } - } - } - return to; -} - /** * Shim to get the current milliseconds - on anything except old IE it'll use * Date.now() and save creating an object. If that doesn't exist then it'll @@ -279,7 +251,7 @@ function getValue(args) { * All external method calls should be using actions rather than sub-calls * of Velocity itself. */ - VelocityStatic.Actions = Object.create(null); + VelocityStatic.Actions = createEmptyObject(); /** * Used to register an action. This should never be called by users * directly, instead it should be called via an action:
@@ -1024,7 +996,7 @@ var VelocityStatic; /** * Cache every camelCase match to avoid repeating lookups. */ - var cache = Object.create(null); + var cache = createEmptyObject(); /** * Camelcase a property name into its JavaScript notation (e.g. * "background-color" ==> "backgroundColor"). Camelcasing is used to @@ -1056,7 +1028,7 @@ var VelocityStatic; * that the actual name conversion can be in a separate file and not * included for custom builds. */ - CSS.ColorNames = Object.create(null); + CSS.ColorNames = createEmptyObject(); /** * Convert a hex list to an rgba value. Designed to be used in replace. */ function makeRGBA(ignore, r, g, b) { @@ -1446,7 +1418,7 @@ var VelocityStatic; (function(VelocityStatic) { var Easing; (function(Easing) { - Easing.Easings = Object.create(null); + Easing.Easings = createEmptyObject(); /** * Used to register a easing. This should never be called by users * directly, instead it should be called via an action:
@@ -1981,6 +1953,12 @@ var VelocityStatic; /** * Unlike "actions", normalizations can always be replaced by users. */ VelocityStatic.Normalizations = []; + /** + * Store a cross-reference to units to be added to specific normalization + * functions if the user supplies a unit-less number. + * + * This is pretty much confined to adding "px" to several css properties. + */ VelocityStatic.NormalizationUnits = createEmptyObject(); /** * Any normalisations that should never be cached are listed here. * Faster than an array - https://jsperf.com/array-includes-and-find-methods-vs-set-has @@ -2010,13 +1988,20 @@ var VelocityStatic; } else if (!isFunction(callback)) { console.warn("VelocityJS: Trying to set 'registerNormalization' callback to an invalid value:", name, callback); } else { - var index = VelocityStatic.constructors.indexOf(constructor); + var index = VelocityStatic.constructors.indexOf(constructor), nextArg = 3; if (index < 0) { VelocityStatic.MaxType = index = VelocityStatic.constructors.push(constructor) - 1; - VelocityStatic.Normalizations[index] = Object.create(null); + VelocityStatic.Normalizations[index] = createEmptyObject(); } VelocityStatic.Normalizations[index][name] = callback; - if (args[3] === false) { + if (isString(args[nextArg])) { + var unit = args[nextArg++], units = VelocityStatic.NormalizationUnits[unit]; + if (!units) { + units = VelocityStatic.NormalizationUnits[unit] = []; + } + units.push(callback); + } + if (args[nextArg] === false) { VelocityStatic.NoCacheNormalizations.add(name); } } @@ -2030,7 +2015,22 @@ var VelocityStatic; return !!VelocityStatic.Normalizations[index][name]; } VelocityStatic.hasNormalization = hasNormalization; - function getNormalization(element, propertyName) { + /** + * Get the unit to add to a unitless number based on the normalization used. + */ function getNormalizationUnit(fn) { + for (var unit in VelocityStatic.NormalizationUnits) { + if (_inArray(VelocityStatic.NormalizationUnits[unit], fn)) { + return unit; + } + } + return ""; + } + VelocityStatic.getNormalizationUnit = getNormalizationUnit; + /** + * Get the normalization for an element and propertyName combination. This + * value should be cached at asking time, as it may change if the user adds + * more normalizations. + */ function getNormalization(element, propertyName) { var data = Data(element); var fn; for (var index = VelocityStatic.MaxType, types = data.types; !fn && index >= 0; index--) { @@ -2278,11 +2278,74 @@ var VelocityStatic; */ var VelocityStatic; (function(VelocityStatic) { + /** + * An RegExp pattern for the following list of css words using + * http://kemio.com.ar/tools/lst-trie-re.php to generate: + * + * blockSize + * borderBottomLeftRadius + * borderBottomRightRadius + * borderBottomWidth + * borderImageOutset + * borderImageWidth + * borderLeftWidth + * borderRadius + * borderRightWidth + * borderSpacing + * borderTopLeftRadius + * borderTopRightRadius + * borderTopWidth + * borderWidth + * bottom + * columnGap + * columnRuleWidth + * columnWidth + * flexBasis + * fontSize + * gridColumnGap + * gridGap + * gridRowGap + * height + * inlineSize + * left + * letterSpacing + * margin + * marginBottom + * marginLeft + * marginRight + * marginTop + * maxBlockSize + * maxHeight + * maxInlineSize + * maxWidth + * minBlockSize + * minHeight + * minInlineSize + * minWidth + * objectPosition + * outlineOffset + * outlineWidth + * padding + * paddingBottom + * paddingLeft + * paddingRight + * paddingTop + * perspective + * right + * shapeMargin + * strokeDashoffset + * strokeWidth + * textIndent + * top + * transformOrigin + * width + * wordSpacing + */ + var 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))$/; /** * Return a Normalisation that can be used to set / get a prefixed style * property. - */ - function getSetPrefixed(propertyName, unprefixed) { + */ function getSetPrefixed(propertyName, unprefixed) { return function(element, propertyValue) { if (propertyValue === undefined) { return VelocityStatic.CSS.computePropertyValue(element, propertyName) || VelocityStatic.CSS.computePropertyValue(element, unprefixed); @@ -2300,17 +2363,21 @@ var VelocityStatic; element.style[propertyName] = propertyValue; }; } - var rxVendors = /^(webkit|moz|ms|o)[A-Z]/, rxUnit = /^\d+([a-z]+)/, prefixElement = VelocityStatic.State.prefixElement; + /** + * Vendor prefixes. Chrome / Safari, Firefox, IE / Edge, Opera. + */ var rxVendors = /^(webkit|moz|ms|o)[A-Z]/, prefixElement = VelocityStatic.State.prefixElement; for (var propertyName in prefixElement.style) { if (rxVendors.test(propertyName)) { var unprefixed = propertyName.replace(/^[a-z]+([A-Z])/, function($, letter) { return letter.toLowerCase(); }); if (ALL_VENDOR_PREFIXES || isString(prefixElement.style[unprefixed])) { - VelocityStatic.registerNormalization([ Element, unprefixed, getSetPrefixed(propertyName, unprefixed) ]); + var addUnit = rxAddPx.test(unprefixed) ? "px" : undefined; + VelocityStatic.registerNormalization([ Element, unprefixed, getSetPrefixed(propertyName, unprefixed), addUnit ]); } } else if (!VelocityStatic.hasNormalization([ Element, propertyName ])) { - VelocityStatic.registerNormalization([ Element, propertyName, getSetStyle(propertyName) ]); + var addUnit = rxAddPx.test(propertyName) ? "px" : undefined; + VelocityStatic.registerNormalization([ Element, propertyName, getSetStyle(propertyName), addUnit ]); } } })(VelocityStatic || (VelocityStatic = {})); @@ -2460,10 +2527,10 @@ function Data(element) { types: types, count: 0, computedStyle: null, - cache: Object.create(null), - queueList: Object.create(null), - lastAnimationList: Object.create(null), - lastFinishList: Object.create(null) + cache: createEmptyObject(), + queueList: createEmptyObject(), + lastAnimationList: createEmptyObject(), + lastFinishList: createEmptyObject() }; Object.defineProperty(element, "velocityData", { value: newData @@ -3132,6 +3199,39 @@ var VelocityStatic; * * Sequence Running */ +/** + * Perform a deep copy of an object - also copies children so they're not + * going to be affected by changing original. + */ +function _deepCopyObject(target) { + var sources = []; + for (var _i = 1; _i < arguments.length; _i++) { + sources[_i - 1] = arguments[_i]; + } + if (target == null) { + throw new TypeError("Cannot convert undefined or null to object"); + } + var to = Object(target), hasOwnProperty = Object.prototype.hasOwnProperty; + var source; + while (source = sources.shift()) { + if (source != null) { + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + var value = source[key]; + if (Array.isArray(value)) { + _deepCopyObject(to[key] = [], value); + } else if (isPlainObject(value)) { + _deepCopyObject(to[key] = {}, value); + } else { + to[key] = value; + } + } + } + } + } + return to; +} + var VelocityStatic; (function(VelocityStatic) { @@ -3491,7 +3591,7 @@ var VelocityStatic; return value.call(element, elementArrayIndex, elements.length); }); commands.set("number", function(value, element, elements, elementArrayIndex, propertyName, tween) { - return value + (element instanceof HTMLElement ? getUnitType(propertyName) : ""); + return value + VelocityStatic.getNormalizationUnit(tween.fn); }); commands.set("string", function(value, element, elements, elementArrayIndex, propertyName, tween) { return VelocityStatic.CSS.fixColors(value); @@ -3499,22 +3599,12 @@ var VelocityStatic; commands.set("undefined", function(value, element, elements, elementArrayIndex, propertyName, tween) { return VelocityStatic.CSS.fixColors(VelocityStatic.CSS.getPropertyValue(element, propertyName, tween.fn) || ""); }); - /** - * Properties that take no default numeric suffix. - */ var unitless = [ "borderImageSlice", "columnCount", "counterIncrement", "counterReset", "flex", "flexGrow", "flexShrink", "floodOpacity", "fontSizeAdjust", "fontWeight", "lineHeight", "opacity", "order", "orphans", "shapeImageThreshold", "tabSize", "widows", "zIndex" ]; - /** - * Retrieve a property's default unit type. Used for assigning a unit - * type when one is not supplied by the user. These are only valid for - * HTMLElement style properties. - */ function getUnitType(property) { - return _inArray(unitless, property) ? "" : "px"; - } /** * Expand a VelocityProperty argument into a valid sparse Tween array. This * pre-allocates the array as it is then the correct size and slightly * faster to access. */ function expandProperties(animation, properties) { - var tweens = animation.tweens = Object.create(null), elements = animation.elements, element = animation.element, elementArrayIndex = elements.indexOf(element), data = Data(element), queue = getValue(animation.queue, animation.options.queue), duration = getValue(animation.options.duration, VelocityStatic.defaults.duration); + var tweens = animation.tweens = createEmptyObject(), elements = animation.elements, element = animation.element, elementArrayIndex = elements.indexOf(element), data = Data(element), queue = getValue(animation.queue, animation.options.queue), duration = getValue(animation.options.duration, VelocityStatic.defaults.duration); for (var property in properties) { var propertyName = VelocityStatic.CSS.camelCase(property); var valueData = properties[property], fn = VelocityStatic.getNormalization(element, propertyName); @@ -3530,7 +3620,7 @@ var VelocityStatic; } continue; } - var tween_4 = tweens[propertyName] = Object.create(null); + var tween_4 = tweens[propertyName] = createEmptyObject(); var endValue = void 0, startValue = void 0; tween_4.fn = fn; if (isFunction(valueData)) { @@ -4391,7 +4481,7 @@ function VelocityFn() { } flags |= 64 /* REVERSE */ & ~(lastAnimation._flags & 64 /* REVERSE */); } - var tweens = Object.create(null), animation = Object.assign({ + var tweens = createEmptyObject(), animation = Object.assign({ element: element, tweens: tweens }, rootAnimation); diff --git a/velocity.js.map b/velocity.js.map index 19cd928c..9f6e1839 100644 --- a/velocity.js.map +++ b/velocity.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/constants.ts","../src/types.ts","../src/utility.ts","../src/Velocity/actions/actions.ts","../src/Velocity/actions/defaultAction.ts","../src/Velocity/actions/finish.ts","../src/Velocity/actions/option.ts","../src/Velocity/actions/pauseResume.ts","../src/Velocity/actions/reverse.ts","../src/Velocity/actions/stop.ts","../src/Velocity/actions/style.ts","../src/Velocity/actions/tween.ts","../src/Velocity/state.ts","../src/Velocity/css/camelCase.ts","../src/Velocity/css/fixColors.ts","../src/Velocity/css/colors.ts","../src/Velocity/css/getPropertyValue.ts","../src/Velocity/css/getUnit.ts","../src/Velocity/css/setPropertyValue.ts","../src/Velocity/easing/easings.ts","../src/Velocity/easing/back.ts","../src/Velocity/easing/bezier.ts","../src/Velocity/easing/bounce.ts","../src/Velocity/easing/elastic.ts","../src/Velocity/easing/spring_rk4.ts","../src/Velocity/easing/step.ts","../src/Velocity/easing/string.ts","../src/Velocity/normalizations/normalizations.ts","../src/Velocity/normalizations/svg/attributes.ts","../src/Velocity/normalizations/svg/dimensions.ts","../src/Velocity/normalizations/dimensions.ts","../src/Velocity/normalizations/display.ts","../src/Velocity/normalizations/scroll.ts","../src/Velocity/normalizations/style.ts","../src/Velocity/normalizations/tween.ts","../src/Velocity/complete.ts","../src/Velocity/data.ts","../src/Velocity/debug.ts","../src/Velocity/defaults.ts","../src/Velocity/mock.ts","../src/Velocity/patch.ts","../src/Velocity/queue.ts","../src/Velocity/redirects.ts","../src/Velocity/registereffect.ts","../src/Velocity/runsequence.ts","../src/Velocity/tick.ts","../src/Velocity/timestamp.ts","../src/Velocity/tweens.ts","../src/Velocity/validate.ts","../src/Velocity/version.ts","../src/core.ts","../src/app.ts"],"names":["PUBLIC_MEMBERS","ALL_VENDOR_PREFIXES","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","TWEEN_NUMBER_REGEX","CLASSNAME","Duration","fast","normal","slow","isBoolean","variable","isNumber","isNumberWhenParsed","isNaN","Number","isString","isFunction","Object","prototype","toString","call","isNode","nodeType","isVelocityResult","length","velocity","propertyIsEnumerable","object","property","isWrapped","window","isSVG","SVGElement","isPlainObject","proto","getPrototypeOf","hasOwnProperty","constructor","isEmptyObject","name_1","defineProperty","name","value","configurable","writable","_deepCopyObject","target","sources","_i","arguments","TypeError","to","source","shift","key","Array","isArray","_now","Date","now","getTime","_inArray","array","i","sanitizeElements","elements","getValue","args","_args","_arg","undefined","addClass","element","className","Element","classList","add","removeClass","remove","replace","RegExp","VelocityStatic","Actions","create","registerAction","internal","callback","console","warn","defaultAction","promiseHandler","action","Redirects","options","opts_1","__assign","durationOriginal_1","parseFloat","duration","delayOriginal_1","delay","backwards","reverse","forEach","elementIndex","stagger","drag","test","Math","max","_resolver","abortError","_rejecter","Error","log","checkAnimationShouldBeFinished","animation","queueName","defaultQueue","validateTweens","queue","_flags","_started","_first","begin","callBegin","tweens","tween_1","pattern","currentValue","endValue","end","CSS","setPropertyValue","fn","completeCall","finish","validateQueue","defaults","finishAll","animations","activeCall","State","first","nextCall","firstNew","_next","then","animationFlags","isExpanded","isReady","isStarted","isStopped","isPaused","isSync","isReverse","option","indexOf","push","result","flag","isPercentComplete","validateCache","validateBegin","validateComplete","validateDelay","validateDuration","validateFpsLimit","validateLoop","validateRepeat","num","timeStart","lastTick","checkAnimation","pauseResume","SyntaxError","checkAnimationShouldBeStopped","stop","style","styleAction","fixColors","getPropertyValue","error","propertyName","value_1","String","tween","percentComplete","properties","easing","tweenAction","requireForcefeeding","info","document","body","fakeAnimation","singleResult","count","_a","activeEasing","validateEasing","expandProperties","tween_2","easing_1","startValue","start","result_1","round","isClient","isMobile","navigator","userAgent","isAndroid","isGingerbread","isChrome","chrome","isFirefox","prefixElement","createElement","windowScrollAnchor","pageYOffset","scrollAnchor","documentElement","parentNode","scrollPropertyLeft","scrollPropertyTop","isTicking","cache","camelCase","fixed","$","letter","toUpperCase","ColorNames","makeRGBA","ignore","r","g","b","parseInt","rxColor6","rxColor3","rxColorName","rxRGB","rxSpaces","str","$0","$1","$2","colorValues","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","name_2","color","floor","computePropertyValue","data","Data","computedStyle","getComputedStyle","computedValue","toggleDisplay","augmentDimension","topLeft","position","getBoundingClientRect","skipCache","propertyValue","NoCacheNormalizations","has","getNormalization","debug","Units","getUnit","units","unit","j","Easing","Easings","registerEasing","cos","PI","exp","registerBackIn","amount","pow","registerBackOut","registerBackInOut","fixRange","min","A","aA1","aA2","B","C","calcBezier","aT","getSlope","generateBezier","mX1","mY1","mX2","mY2","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","isFinite","mSampleValues","Float32Array","newtonRaphsonIterate","aX","aGuessT","currentSlope","currentX","calcSampleValues","binarySubdivide","aA","aB","currentT","abs","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","_precomputed","precompute","f","getControlPoints","x","y","easeIn","easeOut","easeInOut","easeOutBounce","easeInBounce","pi2","registerElasticIn","amplitude","period","sin","asin","registerElasticOut","registerElasticInOut","s","springAccelerationForState","state","tension","friction","v","springEvaluateStateWithDerivative","initialState","dt","derivative","dx","dv","springIntegrateState","a","c","d","dxdt","dvdt","generateSpringRK4","initState","path","time_lapsed","tolerance","DT","have_duration","last_state","generateStep","steps","MaxType","Normalizations","Set","constructors","registerNormalization","index","hasNormalization","types","getAttribute","setAttribute","base","rxSubtype","rxElement","getOwnPropertyNames","globals","subtype","exec","createElementNS","toLowerCase","attribute","e","getDimension","getBBox","wantInner","isBorderBox","sides","fields","augment","inlineRx","listItemRx","tableRowRx","tableRx","tableRowGroupRx","display","nodeName","clientWidth","scrollWidth","clientHeight","scrollHeight","scroll","direction","client","scroll_1","HTMLElement","getSetPrefixed","unprefixed","getSetStyle","rxVendors","rxUnit","getSetTween","callComplete","complete","setTimeout","isLoop","loop","isRepeat","repeat","repeatAgain","lastFinishList","ellapsedTime","_completed","_total","resolver","dequeue","freeAnimationCall","newData","queueList","lastAnimationList","_cache","_begin","_complete","_delay","_duration","_easing","_fpsLimit","_loop","_minFrameTime","_promise","_promiseRejectEmpty","_queue","_repeat","_speed","_sync","mobileHA","defineProperties","reset","enumerable","get","set","fpsLimit","minFrameTime","promise","validatePromise","promiseRejectEmpty","validatePromiseRejectEmpty","speed","validateSpeed","sync","validateSync","mock","patch","global","VelocityFn","animate","prev","last","_prev","skip","next","elementsIndex","elementsSize","opts","inlineValues","computedValues","height","marginTop","marginBottom","paddingTop","paddingBottom","isInline","overflow","promiseData","propertiesMap","opacity","this","animateParentHeight","totalDuration","totalHeightDelta","propertiesToSum","RegisterEffect","effectName","redirectOptions","finalElement","defaultDuration","callIndex","calls","durationPercentage","shareDuration","propertyMap","redirectDuration","callOptions","match","visibility","injectFinalCallbacks_1","resetProperty","resetValue","resetOptions","RunSequence","originalSequence","sequence","currentCall","currentCallOptions","o","nextCallOptions","timing","sequenceQueue","callbackOriginal_1","nextCallElements","callProgress","timeCurrent","tweenValue","progress","firstProgress","firstComplete","asyncCallbacks","_nextProgress","_nextComplete","FRAME_TIME","performance","perf","nowOffset_1","navigationStart","rAFProxy","rAFShim","requestAnimationFrame","ticker","hidden","addEventListener","updateTicker","event","tick","ticking","timestamp","deltaTime","defaultSpeed","defaultEasing","lastProgress","lastComplete","flags","queue_1","_ready","delta","millisecondsEllapsed","tween_3","JSON","stringify","rxHex","commands","Map","elementArrayIndex","getUnitType","unitless","valueData","tween_4","arr1","arr2","explodeTween","isForcefeed","runAgain","arrayStart","arrayEnd","indexStart","indexEnd","inCalc","inRGB","inRGBA","isStringValue","charStart","charEnd","tempStart","tempEnd","dotStart","dotEnd","unitStart","unitEnd","startNumbers_1","count_1","index_1","pop","tween_5","parseDuration","def","noError","parsed","apply","validateProgress","version","__args","_arguments","args0","syntacticSugar","p","names","argumentIndex","optionsMap","rejecter","assign","bind","isAction","Promise","_resolve","_reject","_then","catch","finally","optionsBegin","optionsComplete","optionsProgress","optionsSync","offset","rootAnimation","lastAnimation","IE","documentMode","div","innerHTML","getElementsByTagName","jQuery","Zepto","NodeList","HTMLCollection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;0RAUA;IAAMA,mBAAkB,WAAW,kBAAkB,SAAS,SAAS;;;;;GAKvE,KAAMC,sBAAsB;;AAE5B,IAAMC,gBAAgB;;AACtB,IAAMC,kBAAkB;;AACxB,IAAMC,gBAAgB;;AAEtB,IAAMC,sBAAsB;;AAE5B,IAAMC,gBAAgB;;AACtB,IAAMC,gBAAgB;;AACtB,IAAMC,mBAAmBL;;AACzB,IAAMM,iBAAiB;;AACvB,IAAMC,mBAAmB;;AACzB,IAAMC,eAAe;;AACrB,IAAMC,kBAAkB;;AACxB,IAAMC,+BAA+B;;AACrC,IAAMC,gBAAgB;;AACtB,IAAMC,iBAAiB;;AACvB,IAAMC,gBAAgB;;AACtB,IAAMC,eAAe;;AACrB,IAAMC,qBAAqB;;AAE3B,IAAMC,YAAY;;A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B;QACNzB,OAAOuB,eAAe0kB,YAAY5jB;YACjC4iB,YAAYjnB,eAAe4K,QAAQvG,QAAQ;YAC3C6iB,KAAK;gBACJ,OAAOlhB,eAAe3B;;;;;;;;;;;;;;;;;;;;GAjB1B,MAAK,IAAMA,OAAO2B,gBAAe;YAAtB3B","file":"velocity.js","sourceRoot":"src/","sourcesContent":["/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Constants and defaults. These values should never change without a MINOR\r\n * version bump.\r\n */\r\n\r\n//[\"completeCall\", \"CSS\", \"State\", \"getEasing\", \"Easings\", \"data\", \"debug\", \"defaults\", \"hook\", \"init\", \"mock\", \"pauseAll\", \"queue\", \"dequeue\", \"freeAnimationCall\", \"Redirects\", \"RegisterEffect\", \"resumeAll\", \"RunSequence\", \"lastTick\", \"tick\", \"timestamp\", \"expandTween\", \"version\"]\r\nconst PUBLIC_MEMBERS = [\"version\", \"RegisterEffect\", \"style\", \"patch\", \"timestamp\"];\r\n/**\r\n * Without this it will only un-prefix properties that have a valid \"normal\"\r\n * version.\r\n */\r\nconst ALL_VENDOR_PREFIXES = true;\r\n\r\nconst DURATION_FAST = 200;\r\nconst DURATION_NORMAL = 400;\r\nconst DURATION_SLOW = 600;\r\n\r\nconst FUZZY_MS_PER_SECOND = 980;\r\n\r\nconst DEFAULT_CACHE = true;\r\nconst DEFAULT_DELAY = 0;\r\nconst DEFAULT_DURATION = DURATION_NORMAL;\r\nconst DEFAULT_EASING = \"swing\";\r\nconst DEFAULT_FPSLIMIT = 60;\r\nconst DEFAULT_LOOP = 0;\r\nconst DEFAULT_PROMISE = true;\r\nconst DEFAULT_PROMISE_REJECT_EMPTY = true;\r\nconst DEFAULT_QUEUE = \"\";\r\nconst DEFAULT_REPEAT = 0;\r\nconst DEFAULT_SPEED = 1;\r\nconst DEFAULT_SYNC = true;\r\nconst TWEEN_NUMBER_REGEX = /[\\d\\.-]/;\r\n\r\nconst CLASSNAME = \"velocity-animating\";\r\n\r\nconst Duration = {\r\n\t\"fast\": DURATION_FAST,\r\n\t\"normal\": DURATION_NORMAL,\r\n\t\"slow\": DURATION_SLOW,\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Runtime type checking methods.\r\n */\r\n\r\nfunction isBoolean(variable): variable is boolean {\r\n\treturn variable === true || variable === false;\r\n}\r\n\r\nfunction isNumber(variable): variable is number {\r\n\treturn typeof variable === \"number\";\r\n}\r\n\r\n/**\r\n * Faster way to parse a string/number as a number https://jsperf.com/number-vs-parseint-vs-plus/3\r\n * @param variable The given string or number\r\n * @returns {variable is number} Returns boolean true if it is a number, false otherwise\r\n */\r\nfunction isNumberWhenParsed(variable: string | number): variable is number {\r\n\treturn !isNaN(Number(variable));\r\n}\r\n\r\nfunction isString(variable): variable is string {\r\n\treturn typeof variable === \"string\";\r\n}\r\n\r\nfunction isFunction(variable): variable is Function {\r\n\treturn Object.prototype.toString.call(variable) === \"[object Function]\";\r\n}\r\n\r\nfunction isNode(variable): variable is HTMLorSVGElement {\r\n\treturn !!(variable && variable.nodeType);\r\n}\r\n\r\nfunction isVelocityResult(variable): variable is VelocityResult {\r\n\treturn variable && isNumber(variable.length) && isFunction((variable as VelocityResult).velocity);\r\n}\r\n\r\nfunction propertyIsEnumerable(object: Object, property: string): boolean {\r\n\treturn Object.prototype.propertyIsEnumerable.call(object, property);\r\n}\r\n\r\n/* Determine if variable is an array-like wrapped jQuery, Zepto or similar element, or even a NodeList etc. */\r\n\r\n/* NOTE: HTMLFormElements also have a length. */\r\nfunction isWrapped(variable): variable is HTMLorSVGElement[] {\r\n\treturn variable\r\n\t\t&& variable !== window\r\n\t\t&& isNumber(variable.length)\r\n\t\t&& !isString(variable)\r\n\t\t&& !isFunction(variable)\r\n\t\t&& !isNode(variable)\r\n\t\t&& (variable.length === 0 || isNode(variable[0]));\r\n}\r\n\r\nfunction isSVG(variable): variable is SVGElement {\r\n\treturn SVGElement && variable instanceof SVGElement;\r\n}\r\n\r\nfunction isPlainObject(variable): variable is {} {\r\n\tif (!variable || typeof variable !== \"object\" || variable.nodeType || Object.prototype.toString.call(variable) !== \"[object Object]\") {\r\n\t\treturn false;\r\n\t}\r\n\tlet proto = Object.getPrototypeOf(variable) as Object;\r\n\r\n\treturn !proto || (proto.hasOwnProperty(\"constructor\") && proto.constructor === Object);\r\n}\r\n\r\nfunction isEmptyObject(variable): variable is {} {\r\n\tfor (let name in variable) {\r\n\t\tif (variable.hasOwnProperty(name)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\n/**\r\n * The defineProperty() function provides a\r\n * shortcut to defining a property that cannot be accidentally iterated across.\r\n */\r\nfunction defineProperty(proto: any, name: string, value: Function | any) {\r\n\tif (proto) {\r\n\t\tObject.defineProperty(proto, name, {\r\n\t\t\tconfigurable: true,\r\n\t\t\twritable: true,\r\n\t\t\tvalue: value\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Perform a deep copy of an object - also copies children so they're not\r\n * going to be affected by changing original.\r\n */\r\nfunction _deepCopyObject(target: T, ...sources: U[]): T & U {\r\n\tif (target == null) { // TypeError if undefined or null\r\n\t\tthrow new TypeError(\"Cannot convert undefined or null to object\");\r\n\t}\r\n\tconst to = Object(target),\r\n\t\thasOwnProperty = Object.prototype.hasOwnProperty;\r\n\tlet source: any;\r\n\r\n\twhile ((source = sources.shift())) {\r\n\t\tif (source != null) {\r\n\t\t\tfor (const key in source) {\r\n\t\t\t\tif (hasOwnProperty.call(source, key)) {\r\n\t\t\t\t\tconst value = source[key];\r\n\r\n\t\t\t\t\tif (Array.isArray(value)) {\r\n\t\t\t\t\t\t_deepCopyObject(to[key] = [], value);\r\n\t\t\t\t\t} else if (isPlainObject(value)) {\r\n\t\t\t\t\t\t_deepCopyObject(to[key] = {}, value);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tto[key] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn to;\r\n}\r\n\r\n/**\r\n * Shim to get the current milliseconds - on anything except old IE it'll use\r\n * Date.now() and save creating an object. If that doesn't exist then it'll\r\n * create one that gets GC.\r\n */\r\nconst _now = Date.now ? Date.now : function() {\r\n\treturn (new Date()).getTime();\r\n};\r\n\r\n/**\r\n * Check whether a value belongs to an array\r\n * https://jsperf.com/includes-vs-indexof-vs-while-loop/6\r\n * @param array The given array\r\n * @param value The given element to check if it is part of the array\r\n * @returns {boolean} True if it exists, false otherwise\r\n */\r\nfunction _inArray(array: T[], value: T): boolean {\r\n\tlet i = 0;\r\n\r\n\twhile (i < array.length) {\r\n\t\tif (array[i++] === value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\n/**\r\n * Convert an element or array-like element list into an array if needed.\r\n */\r\nfunction sanitizeElements(elements: HTMLorSVGElement | HTMLorSVGElement[]): HTMLorSVGElement[] {\r\n\tif (isNode(elements)) {\r\n\t\treturn [elements];\r\n\t}\r\n\treturn elements as HTMLorSVGElement[];\r\n}\r\n\r\n/**\r\n * When there are multiple locations for a value pass them all in, then get the\r\n * first value that is valid.\r\n */\r\nfunction getValue(...args: T[]): T;\r\nfunction getValue(args: any): T {\r\n\tfor (let i = 0, _args = arguments; i < _args.length; i++) {\r\n\t\tconst _arg = _args[i];\r\n\r\n\t\tif (_arg !== undefined && _arg === _arg) {\r\n\t\t\treturn _arg;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Add a single className to an Element.\r\n */\r\nfunction addClass(element: HTMLorSVGElement, className: string): void {\r\n\tif (element instanceof Element) {\r\n\t\tif (element.classList) {\r\n\t\t\telement.classList.add(className);\r\n\t\t} else {\r\n\t\t\tremoveClass(element, className);\r\n\t\t\telement.className += (element.className.length ? \" \" : \"\") + className;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Remove a single className from an Element.\r\n */\r\nfunction removeClass(element: HTMLorSVGElement, className: string): void {\r\n\tif (element instanceof Element) {\r\n\t\tif (element.classList) {\r\n\t\t\telement.classList.remove(className);\r\n\t\t} else {\r\n\t\t\t// TODO: Need some jsperf tests on performance - can we get rid of the regex and maybe use split / array manipulation?\r\n\t\t\telement.className = element.className.toString().replace(new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\", \"gi\"), \" \");\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Actions that can be performed by passing a string instead of a propertiesMap.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Actions cannot be replaced if they are internal (hasOwnProperty is false\r\n\t * but they still exist). Otherwise they can be replaced by users.\r\n\t * \r\n\t * All external method calls should be using actions rather than sub-calls\r\n\t * of Velocity itself.\r\n\t */\r\n\texport const Actions: {[name: string]: VelocityActionFn} = Object.create(null);\r\n\r\n\t/**\r\n\t * Used to register an action. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerAction\", \"name\", VelocityActionFn);\r\n\t * \r\n\t * @private\r\n\t */\r\n\texport function registerAction(args?: [string, VelocityActionFn], internal?: boolean) {\r\n\t\tconst name: string = args[0],\r\n\t\t\tcallback = args[1];\r\n\r\n\t\tif (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerAction' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerAction' callback to an invalid value:\", name, callback);\r\n\t\t} else if (Actions[name] && !propertyIsEnumerable(Actions, name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to override internal 'registerAction' callback\", name);\r\n\t\t} else if (internal === true) {\r\n\t\t\tdefineProperty(Actions, name, callback);\r\n\t\t} else {\r\n\t\t\tActions[name] = callback;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"registerAction\", registerAction as any], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Default action.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * When the stop action is triggered, the elements' currently active call is immediately stopped. The active call might have\r\n\t * been applied to multiple elements, in which case all of the call's elements will be stopped. When an element\r\n\t * is stopped, the next item in its animation queue is immediately triggered.\r\n\t * An additional argument may be passed in to clear an element's remaining queued calls. Either true (which defaults to the \"fx\" queue)\r\n\t * or a custom queue string can be passed in.\r\n\t * Note: The stop command runs prior to Velocity's Queueing phase since its behavior is intended to take effect *immediately*,\r\n\t * regardless of the element's current queue state.\r\n\t * \r\n\t * @param {HTMLorSVGElement[]} elements The collection of HTML or SVG elements\r\n\t * @param {StrictVelocityOptions} The strict Velocity options\r\n\t * @param {Promise} An optional promise if the user uses promises\r\n\t * @param {(value?: (HTMLorSVGElement[] | VelocityResult)) => void} resolver The resolve method of the promise\r\n\t */\r\n\tfunction defaultAction(args?: any[], elements?: HTMLorSVGElement[] | VelocityResult, promiseHandler?: VelocityPromise, action?: string): void {\r\n\t\t// TODO: default is wrong, should be runSequence based, and needs all arguments\r\n\t\tif (isString(action) && VelocityStatic.Redirects[action]) {\r\n\t\t\tconst options = isPlainObject(args[0]) ? args[0] as VelocityOptions : {},\r\n\t\t\t\topts = {...options},\r\n\t\t\t\tdurationOriginal = parseFloat(options.duration as any),\r\n\t\t\t\tdelayOriginal = parseFloat(options.delay as any) || 0;\r\n\r\n\t\t\t/* If the backwards option was passed in, reverse the element set so that elements animate from the last to the first. */\r\n\t\t\tif (opts.backwards === true) {\r\n\t\t\t\telements = elements.reverse();\r\n\t\t\t}\r\n\r\n\t\t\t/* Individually trigger the redirect for each element in the set to prevent users from having to handle iteration logic in their redirect. */\r\n\t\t\telements.forEach(function(element, elementIndex) {\r\n\r\n\t\t\t\t/* If the stagger option was passed in, successively delay each element by the stagger value (in ms). Retain the original delay value. */\r\n\t\t\t\tif (parseFloat(opts.stagger as string)) {\r\n\t\t\t\t\topts.delay = delayOriginal + (parseFloat(opts.stagger as string) * elementIndex);\r\n\t\t\t\t} else if (isFunction(opts.stagger)) {\r\n\t\t\t\t\topts.delay = delayOriginal + opts.stagger.call(element, elementIndex, elements.length);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If the drag option was passed in, successively increase/decrease (depending on the presense of opts.backwards)\r\n the duration of each element's animation, using floors to prevent producing very short durations. */\r\n\t\t\t\tif (opts.drag) {\r\n\t\t\t\t\t/* Default the duration of UI pack effects (callouts and transitions) to 1000ms instead of the usual default duration of 400ms. */\r\n\t\t\t\t\topts.duration = durationOriginal || (/^(callout|transition)/.test(action) ? 1000 : DEFAULT_DURATION);\r\n\r\n\t\t\t\t\t/* For each element, take the greater duration of: A) animation completion percentage relative to the original duration,\r\n B) 75% of the original duration, or C) a 200ms fallback (in case duration is already set to a low value).\r\n The end result is a baseline of 75% of the redirect's duration that increases/decreases as the end of the element set is approached. */\r\n\t\t\t\t\topts.duration = Math.max(opts.duration * (opts.backwards ? 1 - elementIndex / elements.length : (elementIndex + 1) / elements.length), opts.duration * 0.75, 200);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Pass in the call's opts object so that the redirect can optionally extend it. It defaults to an empty object instead of null to\r\n reduce the opts checking logic required inside the redirect. */\r\n\t\t\t\tVelocityStatic.Redirects[action].call(element, element, opts, elementIndex, elements.length, elements, promiseHandler && promiseHandler._resolver);\r\n\t\t\t});\r\n\r\n\t\t\t/* Since the animation logic resides within the redirect's own code, abort the remainder of this call.\r\n (The performance overhead up to this point is virtually non-existant.) */\r\n\t\t\t/* Note: The jQuery call chain is kept intact by returning the complete element set. */\r\n\t\t} else {\r\n\t\t\tconst abortError = \"Velocity: First argument (\" + action + \") was not a property map, a known action, or a registered redirect. Aborting.\";\r\n\r\n\t\t\tif (promiseHandler) {\r\n\t\t\t\tpromiseHandler._rejecter(new Error(abortError));\r\n\t\t\t} else if (window.console) {\r\n\t\t\t\tconsole.log(abortError);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"default\", defaultAction], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Finish all animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be finished, and if so we set the tweens to\r\n\t * the final value for it, then call complete.\r\n\t */\r\n\tfunction checkAnimationShouldBeFinished(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\r\n\t\tvalidateTweens(animation);\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tif (!(animation._flags & AnimationFlags.STARTED)) {\r\n\t\t\t\t// Copied from tick.ts - ensure that the animation is completely\r\n\t\t\t\t// valid and run begin() before complete().\r\n\t\t\t\tconst options = animation.options;\r\n\r\n\t\t\t\t// The begin callback is fired once per call, not once per\r\n\t\t\t\t// element, and is passed the full raw DOM element set as both\r\n\t\t\t\t// its context and its first argument.\r\n\t\t\t\tif (options._started++ === 0) {\r\n\t\t\t\t\toptions._first = animation;\r\n\t\t\t\t\tif (options.begin) {\r\n\t\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\t\t\t\tcallBegin(animation);\r\n\t\t\t\t\t\t// Only called once, even if reversed or repeated\r\n\t\t\t\t\t\toptions.begin = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tanimation._flags |= AnimationFlags.STARTED;\r\n\t\t\t}\r\n\t\t\tfor (const property in animation.tweens) {\r\n\t\t\t\tconst tween = animation.tweens[property],\r\n\t\t\t\t\tpattern = tween.pattern;\r\n\t\t\t\tlet currentValue = \"\",\r\n\t\t\t\t\ti = 0;\r\n\r\n\t\t\t\tif (pattern) {\r\n\t\t\t\t\tfor (; i < pattern.length; i++) {\r\n\t\t\t\t\t\tconst endValue = tween.end[i];\r\n\r\n\t\t\t\t\t\tcurrentValue += endValue == null ? pattern[i] : endValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tCSS.setPropertyValue(animation.element, property, currentValue, tween.fn);\r\n\t\t\t}\r\n\t\t\tcompleteCall(animation);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the finish action is triggered, the elements' currently active call is\r\n\t * immediately finished. When an element is finished, the next item in its\r\n\t * animation queue is immediately triggered. If passed via a chained call\r\n\t * then this will only target the animations in that call, and not the\r\n\t * elements linked to it.\r\n\t * \r\n\t * A queue name may be passed in to specify that only animations on the\r\n\t * named queue are finished. The default queue is named \"\". In addition the\r\n\t * value of `false` is allowed for the queue name.\r\n\t * \r\n\t * An final argument may be passed in to clear an element's remaining queued\r\n\t * calls. This may only be the value `true`.\r\n\t */\r\n\tfunction finish(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise): void {\r\n\t\tconst queueName: string | false = validateQueue(args[0], true),\r\n\t\t\tdefaultQueue: false | string = defaults.queue,\r\n\t\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimationShouldBeFinished(animations[i], queueName, defaultQueue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall = State.first,\r\n\t\t\t\tnextCall: AnimationCall;\r\n\r\n\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t}\r\n\t\t\tfor (activeCall = State.first; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\r\n\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimationShouldBeFinished(activeCall, queueName, defaultQueue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"finish\", finish], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a value from one or more running animations.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Used to map getters for the various AnimationFlags.\r\n\t */\r\n\tconst animationFlags: {[key: string]: number} = {\r\n\t\t\"isExpanded\": AnimationFlags.EXPANDED,\r\n\t\t\"isReady\": AnimationFlags.READY,\r\n\t\t\"isStarted\": AnimationFlags.STARTED,\r\n\t\t\"isStopped\": AnimationFlags.STOPPED,\r\n\t\t\"isPaused\": AnimationFlags.PAUSED,\r\n\t\t\"isSync\": AnimationFlags.SYNC,\r\n\t\t\"isReverse\": AnimationFlags.REVERSE\r\n\t};\r\n\r\n\t/**\r\n\t * Get or set an option or running AnimationCall data value. If there is no\r\n\t * value passed then it will get, otherwise we will set.\r\n\t * \r\n\t * NOTE: When using \"get\" this will not touch the Promise as it is never\r\n\t * returned to the user.\r\n\t */\r\n\tfunction option(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tconst key = args[0],\r\n\t\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\r\n\t\t\tqueueName = queue === \"false\" ? false : validateQueue(queue, true);\r\n\t\tlet animations: AnimationCall[],\r\n\t\t\tvalue = args[1];\r\n\r\n\t\tif (!key) {\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot access a non-existant key!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// If we're chaining the return value from Velocity then we are only\r\n\t\t// interested in the values related to that call\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tanimations = elements.velocity.animations;\r\n\t\t} else {\r\n\t\t\tanimations = [];\r\n\r\n\t\t\tfor (let activeCall = State.first; activeCall; activeCall = activeCall._next) {\r\n\t\t\t\tif (elements.indexOf(activeCall.element) >= 0 && getValue(activeCall.queue, activeCall.options.queue) === queueName) {\r\n\t\t\t\t\tanimations.push(activeCall);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If we're dealing with multiple elements that are pointing at a\r\n\t\t\t// single running animation, then instead treat them as a single\r\n\t\t\t// animation.\r\n\t\t\tif (elements.length > 1 && animations.length > 1) {\r\n\t\t\t\tlet i = 1,\r\n\t\t\t\t\toptions = animations[0].options;\r\n\r\n\t\t\t\twhile (i < animations.length) {\r\n\t\t\t\t\tif (animations[i++].options !== options) {\r\n\t\t\t\t\t\toptions = null;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\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\r\n\t\t\t\tif (options) {\r\n\t\t\t\t\tanimations = [animations[0]];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// GET\r\n\t\tif (value === undefined) {\r\n\t\t\tconst result = [],\r\n\t\t\t\tflag = animationFlags[key];\r\n\r\n\t\t\tfor (let i = 0; i < animations.length; i++) {\r\n\t\t\t\tif (flag === undefined) {\r\n\t\t\t\t\t// A normal key to get.\r\n\t\t\t\t\tresult.push(getValue(animations[i][key], animations[i].options[key]));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// A flag that we're checking against.\r\n\t\t\t\t\tresult.push((animations[i]._flags & flag) === 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (elements.length === 1 && animations.length === 1) {\r\n\t\t\t\t// If only a single animation is found and we're only targetting a\r\n\t\t\t\t// single element, then return the value directly\r\n\t\t\t\treturn result[0];\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t// SET\r\n\t\tlet isPercentComplete: boolean;\r\n\r\n\t\tswitch (key) {\r\n\t\t\tcase \"cache\":\r\n\t\t\t\tvalue = validateCache(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"begin\":\r\n\t\t\t\tvalue = validateBegin(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"complete\":\r\n\t\t\t\tvalue = validateComplete(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delay\":\r\n\t\t\t\tvalue = validateDelay(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"duration\":\r\n\t\t\t\tvalue = validateDuration(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"fpsLimit\":\r\n\t\t\t\tvalue = validateFpsLimit(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"loop\":\r\n\t\t\t\tvalue = validateLoop(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"percentComplete\":\r\n\t\t\t\tisPercentComplete = true;\r\n\t\t\t\tvalue = parseFloat(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"repeat\":\r\n\t\t\tcase \"repeatAgain\":\r\n\t\t\t\tvalue = validateRepeat(value);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif (key[0] !== \"_\") {\r\n\t\t\t\t\tconst num = parseFloat(value);\r\n\r\n\t\t\t\t\tif (value == num) {\r\n\t\t\t\t\t\tvalue = num;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t// deliberate fallthrough\r\n\t\t\tcase \"queue\":\r\n\t\t\tcase \"promise\":\r\n\t\t\tcase \"promiseRejectEmpty\":\r\n\t\t\tcase \"easing\":\r\n\t\t\tcase \"started\":\r\n\t\t\t\tconsole.warn(\"VelocityJS: Trying to set a read-only key:\", key);\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\tif (value === undefined || value !== value) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set an invalid value:\", key, \"=\", value, \"(\" + args[1] + \")\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor (let i = 0; i < animations.length; i++) {\r\n\t\t\tconst animation = animations[i];\r\n\r\n\t\t\tif (isPercentComplete) {\r\n\t\t\t\tanimation.timeStart = lastTick - (getValue(animation.duration, animation.options.duration, defaults.duration) * value);\r\n\t\t\t} else {\r\n\t\t\t\tanimation[key] = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"option\", option], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Pause and resume animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be paused / resumed.\r\n\t */\r\n\tfunction checkAnimation(animation: AnimationCall, queueName: false | string, defaultQueue: false | string, isPaused: boolean) {\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tif (isPaused) {\r\n\t\t\t\tanimation._flags |= AnimationFlags.PAUSED;\r\n\t\t\t} else {\r\n\t\t\t\tanimation._flags &= ~AnimationFlags.PAUSED;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Pause and Resume are call-wide (not on a per element basis). Thus, calling pause or resume on a\r\n\t * single element will cause any calls that contain tweens for that element to be paused/resumed\r\n\t * as well.\r\n\t */\r\n\tfunction pauseResume(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string) {\r\n\t\tconst isPaused = action.indexOf(\"pause\") === 0,\r\n\t\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\r\n\t\t\tqueueName = queue === \"false\" ? false : validateQueue(args[0]),\r\n\t\t\tdefaultQueue = defaults.queue;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimation(animations[i], queueName, defaultQueue, isPaused);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall: AnimationCall = State.first;\r\n\r\n\t\t\twhile (activeCall) {\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimation(activeCall, queueName, defaultQueue, isPaused);\r\n\t\t\t\t}\r\n\t\t\t\tactiveCall = activeCall._next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"pause\", pauseResume], true);\r\n\tregisterAction([\"resume\", pauseResume], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Actions that can be performed by passing a string instead of a propertiesMap.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\tregisterAction([\"reverse\", function(args?: any[], elements?: HTMLorSVGElement[] | VelocityResult, promiseHandler?: VelocityPromise, action?: string) {\r\n\t\t// TODO: Code needs to split out before here - but this is needed to prevent it being overridden\r\n\t\tthrow new SyntaxError(\"VelocityJS: The 'reverse' action is private.\");\r\n\t}], true)\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Stop animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be stopped, and if so then set the STOPPED\r\n\t * flag on it, then call complete.\r\n\t */\r\n\tfunction checkAnimationShouldBeStopped(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\r\n\t\tvalidateTweens(animation);\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tanimation._flags |= AnimationFlags.STOPPED;\r\n\t\t\tcompleteCall(animation);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the stop action is triggered, the elements' currently active call is\r\n\t * immediately stopped. When an element is stopped, the next item in its\r\n\t * animation queue is immediately triggered. If passed via a chained call\r\n\t * then this will only target the animations in that call, and not the\r\n\t * elements linked to it.\r\n\t * \r\n\t * A queue name may be passed in to specify that only animations on the\r\n\t * named queue are stopped. The default queue is named \"\". In addition the\r\n\t * value of `false` is allowed for the queue name.\r\n\t * \r\n\t * An final argument may be passed in to clear an element's remaining queued\r\n\t * calls. This may only be the value `true`.\r\n\t * \r\n\t * Note: The stop command runs prior to Velocity's Queueing phase since its\r\n\t * behavior is intended to take effect *immediately*, regardless of the\r\n\t * element's current queue state.\r\n\t */\r\n\tfunction stop(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise, action?: string): void {\r\n\t\tconst queueName: string | false = validateQueue(args[0], true),\r\n\t\t\tdefaultQueue: false | string = defaults.queue,\r\n\t\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimationShouldBeStopped(animations[i], queueName, defaultQueue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall = State.first,\r\n\t\t\t\tnextCall: AnimationCall;\r\n\r\n\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t}\r\n\t\t\tfor (activeCall = State.first; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\r\n\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimationShouldBeStopped(activeCall, queueName, defaultQueue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"stop\", stop], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a property from one or more elements.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Expose a style shortcut - can't be used with chaining, but might be of\r\n\t * use to people.\r\n\t */\r\n\texport function style(elements: VelocityResult, property: {[property: string]: string}): VelocityResult;\r\n\texport function style(elements: VelocityResult, property: string): string | string[];\r\n\texport function style(elements: VelocityResult, property: string, value: string): VelocityResult;\r\n\texport function style(elements: VelocityResult, property: string | {[property: string]: string}, value?: string) {\r\n\t\treturn styleAction([property, value], elements);\r\n\t}\r\n\r\n\t/**\r\n\t * Get or set a style of Nomralised property value on one or more elements.\r\n\t * If there is no value passed then it will get, otherwise we will set.\r\n\t * \r\n\t * NOTE: When using \"get\" this will not touch the Promise as it is never\r\n\t * returned to the user.\r\n\t * \r\n\t * This can fail to set, and will reject the Promise if it does so.\r\n\t * \r\n\t * Velocity(elements, \"style\", \"property\", \"value\") => elements;\r\n\t * Velocity(elements, \"style\", {\"property\": \"value\", ...}) => elements;\r\n\t * Velocity(element, \"style\", \"property\") => \"value\";\r\n\t * Velocity(elements, \"style\", \"property\") => [\"value\", ...];\r\n\t */\r\n\tfunction styleAction(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tconst property = args[0],\r\n\t\t\tvalue = args[1];\r\n\r\n\t\tif (!property) {\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot access a non-existant property!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// GET\r\n\t\tif (value === undefined && !isPlainObject(property)) {\r\n\t\t\t// If only a single animation is found and we're only targetting a\r\n\t\t\t// single element, then return the value directly\r\n\t\t\tif (elements.length === 1) {\r\n\t\t\t\treturn CSS.fixColors(CSS.getPropertyValue(elements[0], property));\r\n\t\t\t}\r\n\t\t\tconst result = [];\r\n\r\n\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\tresult.push(CSS.fixColors(CSS.getPropertyValue(elements[i], property)));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t// SET\r\n\t\tlet error: string;\r\n\r\n\t\tif (isPlainObject(property)) {\r\n\t\t\tfor (const propertyName in property) {\r\n\t\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\t\tconst value = property[propertyName];\r\n\r\n\t\t\t\t\tif (isString(value) || isNumber(value)) {\r\n\t\t\t\t\t\tCSS.setPropertyValue(elements[i], propertyName, property[propertyName]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\terror = (error ? error + \", \" : \"\") + \"Cannot set a property '\" + propertyName + \"' to an unknown type: \" + (typeof value);\r\n\t\t\t\t\t\tconsole.warn(\"VelocityJS: Cannot set a property '\" + propertyName + \"' to an unknown type:\", value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (isString(value) || isNumber(value)) {\r\n\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\tCSS.setPropertyValue(elements[i], property, String(value));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\terror = \"Cannot set a property '\" + property + \"' to an unknown type: \" + (typeof value);\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot set a property '\" + property + \"' to an unknown type:\", value);\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (error) {\r\n\t\t\t\tpromiseHandler._rejecter(error);\r\n\t\t\t} else if (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"style\", styleAction], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a property from one or more elements.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Expose a style shortcut - can't be used with chaining, but might be of\r\n\t * use to people.\r\n\t */\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, properties: VelocityProperties, easing?: VelocityEasingType);\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, propertyName: string, property: VelocityProperty, easing?: VelocityEasingType);\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, properties: VelocityProperties | string, property?: VelocityProperty | VelocityEasingType, easing?: VelocityEasingType) {\r\n\t\treturn tweenAction(arguments as any, elements);\r\n\t}\r\n\r\n\t/**\r\n\t * \r\n\t */\r\n\tfunction tweenAction(args?: any[], elements?: HTMLorSVGElement[], promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tlet requireForcefeeding: boolean;\r\n\r\n\t\tif (!elements) {\r\n\t\t\tif (!args.length) {\r\n\t\t\t\tconsole.info(\"Velocity(, \\\"tween\\\", percentComplete, property, end | [end, , ], ) => value\\n\"\r\n\t\t\t\t\t+ \"Velocity(, \\\"tween\\\", percentComplete, {property: end | [end, , ], ...}, ) => {property: value, ...}\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\telements = [document.body];\r\n\t\t\trequireForcefeeding = true;\r\n\t\t} else if (elements.length !== 1) {\r\n\t\t\t// TODO: Allow more than a single element to return an array of results\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot tween more than one element!\");\r\n\t\t}\r\n\t\tconst percentComplete: number = args[0],\r\n\t\t\tfakeAnimation = {\r\n\t\t\t\telements: elements,\r\n\t\t\t\telement: elements[0],\r\n\t\t\t\tqueue: false,\r\n\t\t\t\toptions: {\r\n\t\t\t\t\tduration: 1000\r\n\t\t\t\t},\r\n\t\t\t\ttweens: null as {[property: string]: VelocityTween}\r\n\t\t\t},\r\n\t\t\tresult: {[property: string]: string} = {};\r\n\t\tlet properties: VelocityProperties = args[1],\r\n\t\t\tsingleResult: boolean,\r\n\t\t\teasing: VelocityEasingType = args[2],\r\n\t\t\tcount = 0;\r\n\r\n\t\tif (isString(args[1])) {\r\n\t\t\tsingleResult = true;\r\n\t\t\tproperties = {\r\n\t\t\t\t[args[1]]: args[2]\r\n\t\t\t};\r\n\t\t\teasing = args[3];\r\n\t\t} else if (Array.isArray(args[1])) {\r\n\t\t\tsingleResult = true;\r\n\t\t\tproperties = {\r\n\t\t\t\t\"tween\": args[1]\r\n\t\t\t} as any;\r\n\t\t\teasing = args[2];\r\n\t\t}\r\n\t\tif (!isNumber(percentComplete) || percentComplete < 0 || percentComplete > 1) {\r\n\t\t\tthrow new Error(\"VelocityJS: Must tween a percentage from 0 to 1!\");\r\n\t\t}\r\n\t\tif (!isPlainObject(properties)) {\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot tween an invalid property!\");\r\n\t\t}\r\n\t\tif (requireForcefeeding) {\r\n\t\t\tfor (const property in properties) {\r\n\t\t\t\tif (properties.hasOwnProperty(property) && (!Array.isArray(properties[property]) || properties[property].length < 2)) {\r\n\t\t\t\t\tthrow new Error(\"VelocityJS: When not supplying an element you must force-feed values: \" + property);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst activeEasing = validateEasing(getValue(easing, defaults.easing), 1000);\r\n\r\n\t\texpandProperties(fakeAnimation as AnimationCall, properties);\r\n\t\tfor (const property in fakeAnimation.tweens) {\r\n\t\t\t// For every element, iterate through each property.\r\n\t\t\tconst tween = fakeAnimation.tweens[property],\r\n\t\t\t\teasing = tween.easing || activeEasing,\r\n\t\t\t\tpattern = tween.pattern;\r\n\t\t\tlet currentValue = \"\";\r\n\r\n\t\t\tcount++;\r\n\t\t\tif (pattern) {\r\n\t\t\t\tfor (let i = 0; i < pattern.length; i++) {\r\n\t\t\t\t\tconst startValue = tween.start[i];\r\n\r\n\t\t\t\t\tif (startValue == null) {\r\n\t\t\t\t\t\tcurrentValue += pattern[i];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst result = easing(percentComplete, startValue as number, tween.end[i] as number, property)\r\n\r\n\t\t\t\t\t\tcurrentValue += pattern[i] === true ? Math.round(result) : result;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresult[property] = currentValue;\r\n\t\t}\r\n\t\tif (singleResult && count === 1) {\r\n\t\t\tfor (const property in result) {\r\n\t\t\t\tif (result.hasOwnProperty(property)) {\r\n\t\t\t\t\treturn result[property];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tregisterAction([\"tween\", tweenAction], true);\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Container for page-wide Velocity state data.\r\n\t */\r\n\texport namespace State {\r\n\t\texport let\r\n\t\t\t/**\r\n\t\t\t * Detect if this is a NodeJS or web browser\r\n\t\t\t */\r\n\t\t\tisClient = window && window === window.window,\r\n\t\t\t/**\r\n\t\t\t * Detect mobile devices to determine if mobileHA should be turned\r\n\t\t\t * on.\r\n\t\t\t */\r\n\t\t\tisMobile = isClient && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * The mobileHA option's behavior changes on older Android devices\r\n\t\t\t * (Gingerbread, versions 2.3.3-2.3.7).\r\n\t\t\t */\r\n\t\t\tisAndroid = isClient && /Android/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * The mobileHA option's behavior changes on older Android devices\r\n\t\t\t * (Gingerbread, versions 2.3.3-2.3.7).\r\n\t\t\t */\r\n\t\t\tisGingerbread = isClient && /Android 2\\.3\\.[3-7]/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * Chrome browser\r\n\t\t\t */\r\n\t\t\tisChrome = isClient && (window as any).chrome,\r\n\t\t\t/**\r\n\t\t\t * Firefox browser\r\n\t\t\t */\r\n\t\t\tisFirefox = isClient && /Firefox/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * Create a cached element for re-use when checking for CSS property\r\n\t\t\t * prefixes.\r\n\t\t\t */\r\n\t\t\tprefixElement = isClient && document.createElement(\"div\"),\r\n\t\t\t/**\r\n\t\t\t * Retrieve the appropriate scroll anchor and property name for the\r\n\t\t\t * browser: https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY\r\n\t\t\t */\r\n\t\t\twindowScrollAnchor = isClient && window.pageYOffset !== undefined,\r\n\t\t\t/**\r\n\t\t\t * Cache the anchor used for animating window scrolling.\r\n\t\t\t */\r\n\t\t\tscrollAnchor = windowScrollAnchor ? window : (!isClient || document.documentElement || document.body.parentNode || document.body),\r\n\t\t\t/**\r\n\t\t\t * Cache the browser-specific property names associated with the\r\n\t\t\t * scroll anchor.\r\n\t\t\t */\r\n\t\t\tscrollPropertyLeft = windowScrollAnchor ? \"pageXOffset\" : \"scrollLeft\",\r\n\t\t\t/**\r\n\t\t\t * Cache the browser-specific property names associated with the\r\n\t\t\t * scroll anchor.\r\n\t\t\t */\r\n\t\t\tscrollPropertyTop = windowScrollAnchor ? \"pageYOffset\" : \"scrollTop\",\r\n\t\t\t/**\r\n\t\t\t * The className we add / remove when animating.\r\n\t\t\t */\r\n\t\t\tclassName = CLASSNAME,\r\n\t\t\t/**\r\n\t\t\t * Keep track of whether our RAF tick is running.\r\n\t\t\t */\r\n\t\t\tisTicking = false,\r\n\t\t\t/**\r\n\t\t\t * Container for every in-progress call to Velocity.\r\n\t\t\t */\r\n\t\t\tfirst: AnimationCall,\r\n\t\t\t/**\r\n\t\t\t * Container for every in-progress call to Velocity.\r\n\t\t\t */\r\n\t\t\tlast: AnimationCall,\r\n\t\t\t/**\r\n\t\t\t * First new animation - to shortcut starting them all up and push\r\n\t\t\t * any css reads to the start of the tick\r\n\t\t\t */\r\n\t\t\tfirstNew: AnimationCall\r\n\t};\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * Cache every camelCase match to avoid repeating lookups.\r\n\t */\r\n\tconst cache: {[property: string]: string} = Object.create(null);\r\n\r\n\t/**\r\n\t * Camelcase a property name into its JavaScript notation (e.g.\r\n\t * \"background-color\" ==> \"backgroundColor\"). Camelcasing is used to\r\n\t * normalize property names between and across calls.\r\n\t */\r\n\texport function camelCase(property: string): string {\r\n\t\tconst fixed = cache[property];\r\n\r\n\t\tif (fixed) {\r\n\t\t\treturn fixed;\r\n\t\t}\r\n\t\treturn cache[property] = property.replace(/-([a-z])/g, ($: string, letter: string) => letter.toUpperCase());\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * This is the list of color names -> rgb values. The object is in here so\r\n\t * that the actual name conversion can be in a separate file and not\r\n\t * included for custom builds.\r\n\t */\r\n\texport const ColorNames: {[name: string]: string} = Object.create(null);\r\n\r\n\t/**\r\n\t * Convert a hex list to an rgba value. Designed to be used in replace.\r\n\t */\r\n\tfunction makeRGBA(ignore: any, r: string, g: string, b: string): string {\r\n\t\treturn \"rgba(\" + parseInt(r, 16) + \",\" + parseInt(g, 16) + \",\" + parseInt(b, 16) + \",1)\";\r\n\t}\r\n\r\n\tconst rxColor6 = /#([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})/gi,\r\n\t\trxColor3 = /#([a-f\\d])([a-f\\d])([a-f\\d])/gi,\r\n\t\trxColorName = /(rgba?\\(\\s*)?(\\b[a-z]+\\b)/g,\r\n\t\trxRGB = /rgb(a?)\\(([^\\)]+)\\)/gi,\r\n\t\trxSpaces = /\\s+/g;\r\n\r\n\t/**\r\n\t * Replace any css colour name with its rgba() value. It is possible to use\r\n\t * the name within an \"rgba(blue, 0.4)\" string this way.\r\n\t */\r\n\texport function fixColors(str: string): string {\r\n\t\treturn str\r\n\t\t\t.replace(rxColor6, makeRGBA)\r\n\t\t\t.replace(rxColor3, function($0, r, g, b) {\r\n\t\t\t\treturn makeRGBA($0, r + r, g + g, b + b);\r\n\t\t\t})\r\n\t\t\t.replace(rxColorName, function($0, $1, $2) {\r\n\t\t\t\tif (ColorNames[$2]) {\r\n\t\t\t\t\treturn ($1 ? $1 : \"rgba(\") + ColorNames[$2] + ($1 ? \"\" : \",1)\");\r\n\t\t\t\t}\r\n\t\t\t\treturn $0;\r\n\t\t\t})\r\n\t\t\t.replace(rxRGB, function($0, $1, $2: string) {\r\n\t\t\t\treturn \"rgba(\" + $2.replace(rxSpaces, \"\") + ($1 ? \"\" : \",1\") + \")\";\r\n\t\t\t});\r\n\t}\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t// Converting from hex as it makes for a smaller file.\r\n\t// TODO: When build system changes to webpack, make this one optional.\r\n\tconst colorValues = {\r\n\t\t\"aliceblue\": 0xf0f8ff,\r\n\t\t\"antiquewhite\": 0xfaebd7,\r\n\t\t\"aqua\": 0x00ffff,\r\n\t\t\"aquamarine\": 0x7fffd4,\r\n\t\t\"azure\": 0xf0ffff,\r\n\t\t\"beige\": 0xf5f5dc,\r\n\t\t\"bisque\": 0xffe4c4,\r\n\t\t\"black\": 0x000000,\r\n\t\t\"blanchedalmond\": 0xffebcd,\r\n\t\t\"blue\": 0x0000ff,\r\n\t\t\"blueviolet\": 0x8a2be2,\r\n\t\t\"brown\": 0xa52a2a,\r\n\t\t\"burlywood\": 0xdeb887,\r\n\t\t\"cadetblue\": 0x5f9ea0,\r\n\t\t\"chartreuse\": 0x7fff00,\r\n\t\t\"chocolate\": 0xd2691e,\r\n\t\t\"coral\": 0xff7f50,\r\n\t\t\"cornflowerblue\": 0x6495ed,\r\n\t\t\"cornsilk\": 0xfff8dc,\r\n\t\t\"crimson\": 0xdc143c,\r\n\t\t\"cyan\": 0x00ffff,\r\n\t\t\"darkblue\": 0x00008b,\r\n\t\t\"darkcyan\": 0x008b8b,\r\n\t\t\"darkgoldenrod\": 0xb8860b,\r\n\t\t\"darkgray\": 0xa9a9a9,\r\n\t\t\"darkgrey\": 0xa9a9a9,\r\n\t\t\"darkgreen\": 0x006400,\r\n\t\t\"darkkhaki\": 0xbdb76b,\r\n\t\t\"darkmagenta\": 0x8b008b,\r\n\t\t\"darkolivegreen\": 0x556b2f,\r\n\t\t\"darkorange\": 0xff8c00,\r\n\t\t\"darkorchid\": 0x9932cc,\r\n\t\t\"darkred\": 0x8b0000,\r\n\t\t\"darksalmon\": 0xe9967a,\r\n\t\t\"darkseagreen\": 0x8fbc8f,\r\n\t\t\"darkslateblue\": 0x483d8b,\r\n\t\t\"darkslategray\": 0x2f4f4f,\r\n\t\t\"darkslategrey\": 0x2f4f4f,\r\n\t\t\"darkturquoise\": 0x00ced1,\r\n\t\t\"darkviolet\": 0x9400d3,\r\n\t\t\"deeppink\": 0xff1493,\r\n\t\t\"deepskyblue\": 0x00bfff,\r\n\t\t\"dimgray\": 0x696969,\r\n\t\t\"dimgrey\": 0x696969,\r\n\t\t\"dodgerblue\": 0x1e90ff,\r\n\t\t\"firebrick\": 0xb22222,\r\n\t\t\"floralwhite\": 0xfffaf0,\r\n\t\t\"forestgreen\": 0x228b22,\r\n\t\t\"fuchsia\": 0xff00ff,\r\n\t\t\"gainsboro\": 0xdcdcdc,\r\n\t\t\"ghostwhite\": 0xf8f8ff,\r\n\t\t\"gold\": 0xffd700,\r\n\t\t\"goldenrod\": 0xdaa520,\r\n\t\t\"gray\": 0x808080,\r\n\t\t\"grey\": 0x808080,\r\n\t\t\"green\": 0x008000,\r\n\t\t\"greenyellow\": 0xadff2f,\r\n\t\t\"honeydew\": 0xf0fff0,\r\n\t\t\"hotpink\": 0xff69b4,\r\n\t\t\"indianred\": 0xcd5c5c,\r\n\t\t\"indigo\": 0x4b0082,\r\n\t\t\"ivory\": 0xfffff0,\r\n\t\t\"khaki\": 0xf0e68c,\r\n\t\t\"lavender\": 0xe6e6fa,\r\n\t\t\"lavenderblush\": 0xfff0f5,\r\n\t\t\"lawngreen\": 0x7cfc00,\r\n\t\t\"lemonchiffon\": 0xfffacd,\r\n\t\t\"lightblue\": 0xadd8e6,\r\n\t\t\"lightcoral\": 0xf08080,\r\n\t\t\"lightcyan\": 0xe0ffff,\r\n\t\t\"lightgoldenrodyellow\": 0xfafad2,\r\n\t\t\"lightgray\": 0xd3d3d3,\r\n\t\t\"lightgrey\": 0xd3d3d3,\r\n\t\t\"lightgreen\": 0x90ee90,\r\n\t\t\"lightpink\": 0xffb6c1,\r\n\t\t\"lightsalmon\": 0xffa07a,\r\n\t\t\"lightseagreen\": 0x20b2aa,\r\n\t\t\"lightskyblue\": 0x87cefa,\r\n\t\t\"lightslategray\": 0x778899,\r\n\t\t\"lightslategrey\": 0x778899,\r\n\t\t\"lightsteelblue\": 0xb0c4de,\r\n\t\t\"lightyellow\": 0xffffe0,\r\n\t\t\"lime\": 0x00ff00,\r\n\t\t\"limegreen\": 0x32cd32,\r\n\t\t\"linen\": 0xfaf0e6,\r\n\t\t\"magenta\": 0xff00ff,\r\n\t\t\"maroon\": 0x800000,\r\n\t\t\"mediumaquamarine\": 0x66cdaa,\r\n\t\t\"mediumblue\": 0x0000cd,\r\n\t\t\"mediumorchid\": 0xba55d3,\r\n\t\t\"mediumpurple\": 0x9370db,\r\n\t\t\"mediumseagreen\": 0x3cb371,\r\n\t\t\"mediumslateblue\": 0x7b68ee,\r\n\t\t\"mediumspringgreen\": 0x00fa9a,\r\n\t\t\"mediumturquoise\": 0x48d1cc,\r\n\t\t\"mediumvioletred\": 0xc71585,\r\n\t\t\"midnightblue\": 0x191970,\r\n\t\t\"mintcream\": 0xf5fffa,\r\n\t\t\"mistyrose\": 0xffe4e1,\r\n\t\t\"moccasin\": 0xffe4b5,\r\n\t\t\"navajowhite\": 0xffdead,\r\n\t\t\"navy\": 0x000080,\r\n\t\t\"oldlace\": 0xfdf5e6,\r\n\t\t\"olive\": 0x808000,\r\n\t\t\"olivedrab\": 0x6b8e23,\r\n\t\t\"orange\": 0xffa500,\r\n\t\t\"orangered\": 0xff4500,\r\n\t\t\"orchid\": 0xda70d6,\r\n\t\t\"palegoldenrod\": 0xeee8aa,\r\n\t\t\"palegreen\": 0x98fb98,\r\n\t\t\"paleturquoise\": 0xafeeee,\r\n\t\t\"palevioletred\": 0xdb7093,\r\n\t\t\"papayawhip\": 0xffefd5,\r\n\t\t\"peachpuff\": 0xffdab9,\r\n\t\t\"peru\": 0xcd853f,\r\n\t\t\"pink\": 0xffc0cb,\r\n\t\t\"plum\": 0xdda0dd,\r\n\t\t\"powderblue\": 0xb0e0e6,\r\n\t\t\"purple\": 0x800080,\r\n\t\t\"rebeccapurple\": 0x663399,\r\n\t\t\"red\": 0xff0000,\r\n\t\t\"rosybrown\": 0xbc8f8f,\r\n\t\t\"royalblue\": 0x4169e1,\r\n\t\t\"saddlebrown\": 0x8b4513,\r\n\t\t\"salmon\": 0xfa8072,\r\n\t\t\"sandybrown\": 0xf4a460,\r\n\t\t\"seagreen\": 0x2e8b57,\r\n\t\t\"seashell\": 0xfff5ee,\r\n\t\t\"sienna\": 0xa0522d,\r\n\t\t\"silver\": 0xc0c0c0,\r\n\t\t\"skyblue\": 0x87ceeb,\r\n\t\t\"slateblue\": 0x6a5acd,\r\n\t\t\"slategray\": 0x708090,\r\n\t\t\"slategrey\": 0x708090,\r\n\t\t\"snow\": 0xfffafa,\r\n\t\t\"springgreen\": 0x00ff7f,\r\n\t\t\"steelblue\": 0x4682b4,\r\n\t\t\"tan\": 0xd2b48c,\r\n\t\t\"teal\": 0x008080,\r\n\t\t\"thistle\": 0xd8bfd8,\r\n\t\t\"tomato\": 0xff6347,\r\n\t\t\"turquoise\": 0x40e0d0,\r\n\t\t\"violet\": 0xee82ee,\r\n\t\t\"wheat\": 0xf5deb3,\r\n\t\t\"white\": 0xffffff,\r\n\t\t\"whitesmoke\": 0xf5f5f5,\r\n\t\t\"yellow\": 0xffff00,\r\n\t\t\"yellowgreen\": 0x9acd32\r\n\t};\r\n\r\n\tfor (let name in colorValues) {\r\n\t\tif (colorValues.hasOwnProperty(name)) {\r\n\t\t\tlet color = colorValues[name];\r\n\r\n\t\t\tColorNames[name] = Math.floor(color / 65536) + \",\" + Math.floor(color / 256 % 256) + \",\" + (color % 256);\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t// TODO: This is still a complete mess\r\n\texport function computePropertyValue(element: HTMLorSVGElement, property: string): string {\r\n\t\tconst data = Data(element),\r\n\t\t\t// If computedStyle is cached, use it.\r\n\t\t\tcomputedStyle = data && data.computedStyle ? data.computedStyle : window.getComputedStyle(element, null);\r\n\t\tlet computedValue: string | number = 0;\r\n\r\n\t\tif (data && !data.computedStyle) {\r\n\t\t\tdata.computedStyle = computedStyle;\r\n\t\t}\r\n\t\tif (property === \"width\" || property === \"height\") {\r\n\t\t\t// Browsers do not return height and width values for elements\r\n\t\t\t// that are set to display:\"none\". Thus, we temporarily toggle\r\n\t\t\t// display to the element type's default value.\r\n\t\t\tconst toggleDisplay: boolean = getPropertyValue(element, \"display\") === \"none\";\r\n\r\n\t\t\t// When box-sizing isn't set to border-box, height and width\r\n\t\t\t// style values are incorrectly computed when an element's\r\n\t\t\t// scrollbars are visible (which expands the element's\r\n\t\t\t// dimensions). Thus, we defer to the more accurate\r\n\t\t\t// offsetHeight/Width property, which includes the total\r\n\t\t\t// dimensions for interior, border, padding, and scrollbar. We\r\n\t\t\t// subtract border and padding to get the sum of interior +\r\n\t\t\t// scrollbar.\r\n\t\t\t// TODO: offsetHeight does not exist on SVGElement\r\n\t\t\tif (toggleDisplay) {\r\n\t\t\t\tsetPropertyValue(element, \"display\", \"auto\");\r\n\t\t\t}\r\n\t\t\tcomputedValue = augmentDimension(element, property, true);\r\n\t\t\tif (toggleDisplay) {\r\n\t\t\t\tsetPropertyValue(element, \"display\", \"none\");\r\n\t\t\t}\r\n\t\t\treturn String(computedValue);\r\n\t\t}\r\n\r\n\t\t/* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\r\n\t\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.\r\n\t\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. */\r\n\t\t/* TODO: There is a borderColor normalisation in legacy/ - figure out where this is needed... */\r\n\r\n\t\tcomputedValue = computedStyle[property];\r\n\t\t/* Fall back to the property's style value (if defined) when computedValue returns nothing,\r\n\t\t which can happen when the element hasn't been painted. */\r\n\t\tif (!computedValue) {\r\n\t\t\tcomputedValue = element.style[property];\r\n\t\t}\r\n\t\t/* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\r\n\t\t defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\r\n\t\t effect as being set to 0, so no conversion is necessary.) */\r\n\t\t/* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\r\n\t\t property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\r\n\t\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\"). */\r\n\t\tif (computedValue === \"auto\") {\r\n\t\t\tswitch (property) {\r\n\t\t\t\tcase \"top\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tlet topLeft = true;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\tconst position = getPropertyValue(element, \"position\"); /* GET */\r\n\r\n\t\t\t\t\tif (position === \"fixed\" || (topLeft && position === \"absolute\")) {\r\n\t\t\t\t\t\t// Note: this has no pixel unit on its returned values,\r\n\t\t\t\t\t\t// we re-add it here to conform with\r\n\t\t\t\t\t\t// computePropertyValue's behavior.\r\n\t\t\t\t\t\tcomputedValue = element.getBoundingClientRect[property] + \"px\"; /* GET */\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t// Deliberate fallthrough!\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcomputedValue = \"0px\";\r\n\t\t\t\t\tbreak\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn computedValue ? String(computedValue) : \"\";\r\n\t}\r\n\r\n\t/**\r\n\t * Get a property value. This will grab via the cache if it exists, then\r\n\t * via any normalisations.\r\n\t */\r\n\texport function getPropertyValue(element: HTMLorSVGElement, propertyName: string, fn?: VelocityNormalizationsFn, skipCache?: boolean): string {\r\n\t\tconst data = Data(element);\r\n\t\tlet propertyValue: string;\r\n\r\n\t\tif (NoCacheNormalizations.has(propertyName)) {\r\n\t\t\tskipCache = true;\r\n\t\t}\r\n\t\tif (!skipCache && data && data.cache[propertyName] != null) {\r\n\t\t\tpropertyValue = data.cache[propertyName];\r\n\t\t} else {\r\n\t\t\tfn = fn || getNormalization(element, propertyName);\r\n\t\t\tif (fn) {\r\n\t\t\t\tpropertyValue = fn(element);\r\n\t\t\t\tif (data) {\r\n\t\t\t\t\tdata.cache[propertyName] = propertyValue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (debug >= 2) {\r\n\t\t\tconsole.info(\"Get \" + propertyName + \": \" + propertyValue);\r\n\t\t}\r\n\t\treturn propertyValue;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * All possible units in CSS. Used to recognise units when parsing tweens.\r\n\t */\r\n\tconst Units = [\r\n\t\t\"%\", // relative\r\n\t\t\"em\", \"ex\", \"ch\", \"rem\", // font relative\r\n\t\t\"vw\", \"vh\", \"vmin\", \"vmax\", // viewport relative\r\n\t\t\"cm\", \"mm\", \"Q\", \"in\", \"pc\", \"pt\", \"px\", // absolute lengths\r\n\t\t\"deg\", \"grad\", \"rad\", \"turn\", // angles\r\n\t\t\"s\", \"ms\" // time\r\n\t];\r\n\r\n\t/**\r\n\t * Get the current unit for this property. Only used when parsing tweens\r\n\t * to check if the unit is changing between the start and end values.\r\n\t */\r\n\texport function getUnit(property: string, start?: number): string {\r\n\t\tstart = start || 0;\r\n\t\tif (property[start] && property[start] !== \" \") {\r\n\t\t\tfor (let i = 0, units = Units; i < units.length; i++) {\r\n\t\t\t\tconst unit = units[i];\r\n\t\t\t\tlet j = 0;\r\n\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif (j >= unit.length) {\r\n\t\t\t\t\t\treturn unit;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (unit[j] !== property[start + j]) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while (++j);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * The singular setPropertyValue, which routes the logic for all\r\n\t * normalizations.\r\n\t */\r\n\texport function setPropertyValue(element: HTMLorSVGElement, propertyName: string, propertyValue: any, fn?: VelocityNormalizationsFn) {\r\n\t\tconst data = Data(element);\r\n\r\n\t\tif (isString(propertyValue)\r\n\t\t\t&& propertyValue[0] === \"c\"\r\n\t\t\t&& propertyValue[1] === \"a\"\r\n\t\t\t&& propertyValue[2] === \"l\"\r\n\t\t\t&& propertyValue[3] === \"c\"\r\n\t\t\t&& propertyValue[4] === \"(\"\r\n\t\t\t&& propertyValue[5] === \"0\"\r\n\t\t\t&& propertyValue[5] === \" \") {\r\n\t\t\t// Make sure we un-calc unit changing values - try not to trigger\r\n\t\t\t// this code any more often than we have to since it's expensive\r\n\t\t\tpropertyValue = propertyValue.replace(/^calc\\(0[^\\d]* \\+ ([^\\(\\)]+)\\)$/, \"$1\");\r\n\t\t}\r\n\t\tif (data && data.cache[propertyName] !== propertyValue) {\r\n\t\t\t// By setting it to undefined we force a true \"get\" later\r\n\t\t\tdata.cache[propertyName] = propertyValue || undefined;\r\n\t\t\tfn = fn || getNormalization(element, propertyName);\r\n\t\t\tif (fn) {\r\n\t\t\t\tfn(element, propertyValue);\r\n\t\t\t}\r\n\t\t\tif (debug >= 2) {\r\n\t\t\t\tconsole.info(\"Set \" + propertyName + \": \" + propertyValue, element);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"linear\": true;\r\n\t\"swing\": true;\r\n\t\"spring\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\texport const Easings: {[name: string]: VelocityEasingFn} = Object.create(null);\r\n\r\n\t/**\r\n\t * Used to register a easing. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerEasing\", \"name\", VelocityEasingFn);\r\n\t *\r\n\t * @private\r\n\t */\r\n\texport function registerEasing(args?: [string, VelocityEasingFn]) {\r\n\t\tconst name: string = args[0],\r\n\t\t\tcallback = args[1];\r\n\r\n\t\tif (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerEasing' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerEasing' callback to an invalid value:\", name, callback);\r\n\t\t} else if (Easings[name]) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to override 'registerEasing' callback\", name);\r\n\t\t} else {\r\n\t\t\tEasings[name] = callback;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"registerEasing\", registerEasing], true);\r\n\r\n\t/* Basic (same as jQuery) easings. */\r\n\tregisterEasing([\"linear\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + percentComplete * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"swing\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + (0.5 - Math.cos(percentComplete * Math.PI) / 2) * (endValue - startValue);\r\n\t}]);\r\n\r\n\t/* Bonus \"spring\" easing, which is a less exaggerated version of easeInOutElastic. */\r\n\tregisterEasing([\"spring\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + (1 - (Math.cos(percentComplete * 4.5 * Math.PI) * Math.exp(-percentComplete * 6))) * (endValue - startValue);\r\n\t}]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Back easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"easeInBack\": true;\r\n\t\"easeOutBack\": true;\r\n\t\"easeInOutBack\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\texport function registerBackIn(name: string, amount: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn Math.pow(percentComplete, 2) * ((amount + 1) * percentComplete - amount) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerBackOut(name: string, amount: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn (Math.pow(--percentComplete, 2) * ((amount + 1) * percentComplete + amount) + 1) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerBackInOut(name: string, amount: number) {\r\n\t\tamount *= 1.525;\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn ((percentComplete *= 2) < 1\r\n\t\t\t\t? (Math.pow(percentComplete, 2) * ((amount + 1) * percentComplete - amount))\r\n\t\t\t\t: (Math.pow(percentComplete -= 2, 2) * ((amount + 1) * percentComplete + amount) + 2)\r\n\t\t\t) * 0.5 * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\tregisterBackIn(\"easeInBack\", 1.7);\r\n\tregisterBackOut(\"easeOutBack\", 1.7);\r\n\tregisterBackInOut(\"easeInOutBack\", 1.7);\r\n\r\n\t// TODO: Expose these as actions to register custom easings?\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"ease\": true;\r\n\t\"easeIn\": true;\r\n\t\"ease-in\": true;\r\n\t\"easeOut\": true;\r\n\t\"ease-out\": true;\r\n\t\"easeInOut\": true;\r\n\t\"ease-in-out\": true;\r\n\t\"easeInSine\": true;\r\n\t\"easeOutSine\": true;\r\n\t\"easeInOutSine\": true;\r\n\t\"easeInQuad\": true;\r\n\t\"easeOutQuad\": true;\r\n\t\"easeInOutQuad\": true;\r\n\t\"easeInCubic\": true;\r\n\t\"easeOutCubic\": true;\r\n\t\"easeInOutCubic\": true;\r\n\t\"easeInQuart\": true;\r\n\t\"easeOutQuart\": true;\r\n\t\"easeInOutQuart\": true;\r\n\t\"easeInQuint\": true;\r\n\t\"easeOutQuint\": true;\r\n\t\"easeInOutQuint\": true;\r\n\t\"easeInExpo\": true;\r\n\t\"easeOutExpo\": true;\r\n\t\"easeInOutExpo\": true;\r\n\t\"easeInCirc\": true;\r\n\t\"easeOutCirc\": true;\r\n\t\"easeInOutCirc\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\t/**\r\n\t * Fix to a range of 0 <= num <= 1.\r\n\t */\r\n\tfunction fixRange(num: number) {\r\n\t\treturn Math.min(Math.max(num, 0), 1);\r\n\t}\r\n\r\n\tfunction A(aA1, aA2) {\r\n\t\treturn 1.0 - 3.0 * aA2 + 3.0 * aA1;\r\n\t}\r\n\r\n\tfunction B(aA1, aA2) {\r\n\t\treturn 3.0 * aA2 - 6.0 * aA1;\r\n\t}\r\n\r\n\tfunction C(aA1) {\r\n\t\treturn 3.0 * aA1;\r\n\t}\r\n\r\n\tfunction calcBezier(aT, aA1, aA2) {\r\n\t\treturn ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\r\n\t}\r\n\r\n\tfunction getSlope(aT, aA1, aA2) {\r\n\t\treturn 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n\t}\r\n\r\n\texport function generateBezier(mX1: number, mY1: number, mX2: number, mY2: number): VelocityEasingFn {\r\n\t\tconst NEWTON_ITERATIONS = 4,\r\n\t\t\tNEWTON_MIN_SLOPE = 0.001,\r\n\t\t\tSUBDIVISION_PRECISION = 0.0000001,\r\n\t\t\tSUBDIVISION_MAX_ITERATIONS = 10,\r\n\t\t\tkSplineTableSize = 11,\r\n\t\t\tkSampleStepSize = 1.0 / (kSplineTableSize - 1.0),\r\n\t\t\tfloat32ArraySupported = \"Float32Array\" in window;\r\n\r\n\t\t/* Must contain four arguments. */\r\n\t\tif (arguments.length !== 4) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/* Arguments must be numbers. */\r\n\t\tfor (let i = 0; i < 4; ++i) {\r\n\t\t\tif (typeof arguments[i] !== \"number\" || isNaN(arguments[i]) || !isFinite(arguments[i])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* X values must be in the [0, 1] range. */\r\n\t\tmX1 = fixRange(mX1);\r\n\t\tmX2 = fixRange(mX2);\r\n\r\n\t\tconst mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\r\n\r\n\t\tfunction newtonRaphsonIterate(aX, aGuessT) {\r\n\t\t\tfor (let i = 0; i < NEWTON_ITERATIONS; ++i) {\r\n\t\t\t\tconst currentSlope = getSlope(aGuessT, mX1, mX2);\r\n\r\n\t\t\t\tif (currentSlope === 0.0) {\r\n\t\t\t\t\treturn aGuessT;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst currentX = calcBezier(aGuessT, mX1, mX2) - aX;\r\n\t\t\t\taGuessT -= currentX / currentSlope;\r\n\t\t\t}\r\n\r\n\t\t\treturn aGuessT;\r\n\t\t}\r\n\r\n\t\tfunction calcSampleValues() {\r\n\t\t\tfor (let i = 0; i < kSplineTableSize; ++i) {\r\n\t\t\t\tmSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction binarySubdivide(aX, aA, aB) {\r\n\t\t\tlet currentX, currentT, i = 0;\r\n\r\n\t\t\tdo {\r\n\t\t\t\tcurrentT = aA + (aB - aA) / 2.0;\r\n\t\t\t\tcurrentX = calcBezier(currentT, mX1, mX2) - aX;\r\n\t\t\t\tif (currentX > 0.0) {\r\n\t\t\t\t\taB = currentT;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taA = currentT;\r\n\t\t\t\t}\r\n\t\t\t} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\r\n\r\n\t\t\treturn currentT;\r\n\t\t}\r\n\r\n\t\tfunction getTForX(aX) {\r\n\t\t\tlet intervalStart = 0.0,\r\n\t\t\t\tcurrentSample = 1,\r\n\t\t\t\tlastSample = kSplineTableSize - 1;\r\n\r\n\t\t\tfor (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\r\n\t\t\t\tintervalStart += kSampleStepSize;\r\n\t\t\t}\r\n\r\n\t\t\t--currentSample;\r\n\r\n\t\t\tconst dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]),\r\n\t\t\t\tguessForT = intervalStart + dist * kSampleStepSize,\r\n\t\t\t\tinitialSlope = getSlope(guessForT, mX1, mX2);\r\n\r\n\t\t\tif (initialSlope >= NEWTON_MIN_SLOPE) {\r\n\t\t\t\treturn newtonRaphsonIterate(aX, guessForT);\r\n\t\t\t} else if (initialSlope === 0.0) {\r\n\t\t\t\treturn guessForT;\r\n\t\t\t} else {\r\n\t\t\t\treturn binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet _precomputed = false;\r\n\r\n\t\tfunction precompute() {\r\n\t\t\t_precomputed = true;\r\n\t\t\tif (mX1 !== mY1 || mX2 !== mY2) {\r\n\t\t\t\tcalcSampleValues();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst f = function(percentComplete: number, startValue: number, endValue: number, property?: string) {\r\n\t\t\tif (!_precomputed) {\r\n\t\t\t\tprecompute();\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\tif (mX1 === mY1 && mX2 === mY2) {\r\n\t\t\t\treturn startValue + percentComplete * (endValue - startValue);\r\n\t\t\t}\r\n\t\t\treturn startValue + calcBezier(getTForX(percentComplete), mY1, mY2) * (endValue - startValue);\r\n\t\t};\r\n\r\n\t\t(f as any).getControlPoints = function() {\r\n\t\t\treturn [{x: mX1, y: mY1}, {x: mX2, y: mY2}];\r\n\t\t};\r\n\r\n\t\tconst str = \"generateBezier(\" + [mX1, mY1, mX2, mY2] + \")\";\r\n\t\tf.toString = function() {\r\n\t\t\treturn str;\r\n\t\t};\r\n\r\n\t\treturn f;\r\n\t}\r\n\r\n\t/* Common easings */\r\n\tconst easeIn = generateBezier(0.42, 0.0, 1.00, 1.0),\r\n\t\teaseOut = generateBezier(0.00, 0.0, 0.58, 1.0),\r\n\t\teaseInOut = generateBezier(0.42, 0.0, 0.58, 1.0);\r\n\r\n\tregisterEasing([\"ease\", generateBezier(0.25, 0.1, 0.25, 1.0)]);\r\n\tregisterEasing([\"easeIn\", easeIn]);\r\n\tregisterEasing([\"ease-in\", easeIn]);\r\n\tregisterEasing([\"easeOut\", easeOut]);\r\n\tregisterEasing([\"ease-out\", easeOut]);\r\n\tregisterEasing([\"easeInOut\", easeInOut]);\r\n\tregisterEasing([\"ease-in-out\", easeInOut]);\r\n\tregisterEasing([\"easeInSine\", generateBezier(0.47, 0, 0.745, 0.715)]);\r\n\tregisterEasing([\"easeOutSine\", generateBezier(0.39, 0.575, 0.565, 1)]);\r\n\tregisterEasing([\"easeInOutSine\", generateBezier(0.445, 0.05, 0.55, 0.95)]);\r\n\tregisterEasing([\"easeInQuad\", generateBezier(0.55, 0.085, 0.68, 0.53)]);\r\n\tregisterEasing([\"easeOutQuad\", generateBezier(0.25, 0.46, 0.45, 0.94)]);\r\n\tregisterEasing([\"easeInOutQuad\", generateBezier(0.455, 0.03, 0.515, 0.955)]);\r\n\tregisterEasing([\"easeInCubic\", generateBezier(0.55, 0.055, 0.675, 0.19)]);\r\n\tregisterEasing([\"easeOutCubic\", generateBezier(0.215, 0.61, 0.355, 1)]);\r\n\tregisterEasing([\"easeInOutCubic\", generateBezier(0.645, 0.045, 0.355, 1)]);\r\n\tregisterEasing([\"easeInQuart\", generateBezier(0.895, 0.03, 0.685, 0.22)]);\r\n\tregisterEasing([\"easeOutQuart\", generateBezier(0.165, 0.84, 0.44, 1)]);\r\n\tregisterEasing([\"easeInOutQuart\", generateBezier(0.77, 0, 0.175, 1)]);\r\n\tregisterEasing([\"easeInQuint\", generateBezier(0.755, 0.05, 0.855, 0.06)]);\r\n\tregisterEasing([\"easeOutQuint\", generateBezier(0.23, 1, 0.32, 1)]);\r\n\tregisterEasing([\"easeInOutQuint\", generateBezier(0.86, 0, 0.07, 1)]);\r\n\tregisterEasing([\"easeInExpo\", generateBezier(0.95, 0.05, 0.795, 0.035)]);\r\n\tregisterEasing([\"easeOutExpo\", generateBezier(0.19, 1, 0.22, 1)]);\r\n\tregisterEasing([\"easeInOutExpo\", generateBezier(1, 0, 0, 1)]);\r\n\tregisterEasing([\"easeInCirc\", generateBezier(0.6, 0.04, 0.98, 0.335)]);\r\n\tregisterEasing([\"easeOutCirc\", generateBezier(0.075, 0.82, 0.165, 1)]);\r\n\tregisterEasing([\"easeInOutCirc\", generateBezier(0.785, 0.135, 0.15, 0.86)]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Bounce easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"easeInBounce\": true;\r\n\t\"easeOutBounce\": true;\r\n\t\"easeInOutBounce\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tfunction easeOutBounce(percentComplete: number): number {\r\n\t\tif (percentComplete < 1 / 2.75) {\r\n\t\t\treturn (7.5625 * percentComplete * percentComplete);\r\n\t\t}\r\n\t\tif (percentComplete < 2 / 2.75) {\r\n\t\t\treturn (7.5625 * (percentComplete -= 1.5 / 2.75) * percentComplete + 0.75);\r\n\t\t}\r\n\t\tif (percentComplete < 2.5 / 2.75) {\r\n\t\t\treturn (7.5625 * (percentComplete -= 2.25 / 2.75) * percentComplete + 0.9375);\r\n\t\t}\r\n\t\treturn (7.5625 * (percentComplete -= 2.625 / 2.75) * percentComplete + 0.984375);\r\n\t};\r\n\r\n\tfunction easeInBounce(percentComplete: number): number {\r\n\t\treturn 1 - easeOutBounce(1 - percentComplete);\r\n\t};\r\n\r\n\tregisterEasing([\"easeInBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn easeInBounce(percentComplete) * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"easeOutBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn easeOutBounce(percentComplete) * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"easeInOutBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn (percentComplete < 0.5\r\n\t\t\t? easeInBounce(percentComplete * 2) * .5\r\n\t\t\t: easeOutBounce(percentComplete * 2 - 1) * 0.5 + 0.5\r\n\t\t) * (endValue - startValue);\r\n\t}]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Elastic easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"easeInElastic\": true;\r\n\t\"easeOutElastic\": true;\r\n\t\"easeInOutElastic\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tconst pi2 = Math.PI * 2;\r\n\r\n\texport function registerElasticIn(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn -(amplitude * Math.pow(2, 10 * (percentComplete -= 1)) * Math.sin((percentComplete - (period / pi2 * Math.asin(1 / amplitude))) * pi2 / period)) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerElasticOut(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn (amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - (period / pi2 * Math.asin(1 / amplitude))) * pi2 / period) + 1) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerElasticInOut(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\tconst s = period / pi2 * Math.asin(1 / amplitude);\r\n\r\n\t\t\tpercentComplete = percentComplete * 2 - 1;\r\n\t\t\treturn (percentComplete < 0\r\n\t\t\t\t? -0.5 * (amplitude * Math.pow(2, 10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period))\r\n\t\t\t\t: amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period) * 0.5 + 1\r\n\t\t\t) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\tregisterElasticIn(\"easeInElastic\", 1, 0.3);\r\n\tregisterElasticOut(\"easeOutElastic\", 1, 0.3);\r\n\tregisterElasticInOut(\"easeInOutElastic\", 1, 0.3 * 1.5);\r\n\r\n\t// TODO: Expose these as actions to register custom easings?\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\r\n\tinterface springState {\r\n\t\tx: number;\r\n\t\tv: number;\r\n\t\ttension: number;\r\n\t\tfriction: number;\r\n\t};\r\n\r\n\tinterface springDelta {\r\n\t\tdx: number;\r\n\t\tdv: number;\r\n\t};\r\n\r\n\t/* Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */\r\n\t/* 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\r\n\t then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */\r\n\tfunction springAccelerationForState(state: springState) {\r\n\t\treturn (-state.tension * state.x) - (state.friction * state.v);\r\n\t}\r\n\r\n\tfunction springEvaluateStateWithDerivative(initialState: springState, dt: number, derivative: springDelta): springDelta {\r\n\t\tconst state = {\r\n\t\t\tx: initialState.x + derivative.dx * dt,\r\n\t\t\tv: initialState.v + derivative.dv * dt,\r\n\t\t\ttension: initialState.tension,\r\n\t\t\tfriction: initialState.friction\r\n\t\t};\r\n\r\n\t\treturn {\r\n\t\t\tdx: state.v,\r\n\t\t\tdv: springAccelerationForState(state)\r\n\t\t};\r\n\t}\r\n\r\n\tfunction springIntegrateState(state: springState, dt: number) {\r\n\t\tconst a = {\r\n\t\t\tdx: state.v,\r\n\t\t\tdv: springAccelerationForState(state)\r\n\t\t},\r\n\t\t\tb = springEvaluateStateWithDerivative(state, dt * 0.5, a),\r\n\t\t\tc = springEvaluateStateWithDerivative(state, dt * 0.5, b),\r\n\t\t\td = springEvaluateStateWithDerivative(state, dt, c),\r\n\t\t\tdxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx),\r\n\t\t\tdvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv);\r\n\r\n\t\tstate.x = state.x + dxdt * dt;\r\n\t\tstate.v = state.v + dvdt * dt;\r\n\r\n\t\treturn state;\r\n\t}\r\n\r\n\texport function generateSpringRK4(tension: number, friction: number): number;\r\n\texport function generateSpringRK4(tension: number, friction: number, duration: number): VelocityEasingFn;\r\n\texport function generateSpringRK4(tension: number, friction: number, duration?: number): any {\r\n\t\tlet initState: springState = {\r\n\t\t\tx: -1,\r\n\t\t\tv: 0,\r\n\t\t\ttension: parseFloat(tension as any) || 500,\r\n\t\t\tfriction: parseFloat(friction as any) || 20\r\n\t\t},\r\n\t\t\tpath = [0],\r\n\t\t\ttime_lapsed = 0,\r\n\t\t\ttolerance = 1 / 10000,\r\n\t\t\tDT = 16 / 1000,\r\n\t\t\thave_duration = duration != null, // deliberate \"==\", as undefined == null != 0\r\n\t\t\tdt: number,\r\n\t\t\tlast_state: springState;\r\n\r\n\t\t/* Calculate the actual time it takes for this animation to complete with the provided conditions. */\r\n\t\tif (have_duration) {\r\n\t\t\t/* Run the simulation without a duration. */\r\n\t\t\ttime_lapsed = generateSpringRK4(initState.tension, initState.friction);\r\n\t\t\t/* Compute the adjusted time delta. */\r\n\t\t\tdt = (time_lapsed as number) / duration * DT;\r\n\t\t} else {\r\n\t\t\tdt = DT;\r\n\t\t}\r\n\r\n\t\twhile (true) {\r\n\t\t\t/* Next/step function .*/\r\n\t\t\tlast_state = springIntegrateState(last_state || initState, dt);\r\n\t\t\t/* Store the position. */\r\n\t\t\tpath.push(1 + last_state.x);\r\n\t\t\ttime_lapsed += 16;\r\n\t\t\t/* If the change threshold is reached, break. */\r\n\t\t\tif (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the\r\n\t\t computed path and returns a snapshot of the position according to a given percentComplete. */\r\n\t\treturn !have_duration ? time_lapsed : function(percentComplete: number, startValue: number, endValue: number) {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn startValue + path[(percentComplete * (path.length - 1)) | 0] * (endValue - startValue);\r\n\t\t};\r\n\t};\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details\r\n * \r\n * Step easing generator.\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tconst cache: {[steps: number]: VelocityEasingFn} = {};\r\n\r\n\texport function generateStep(steps): VelocityEasingFn {\r\n\t\tconst fn = cache[steps];\r\n\r\n\t\tif (fn) {\r\n\t\t\treturn fn;\r\n\t\t}\r\n\t\treturn cache[steps] = function(percentComplete: number, startValue: number, endValue: number) {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn startValue + Math.round(percentComplete * steps) * (1 / steps) * (endValue - startValue);\r\n\t\t};\r\n\t}\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Easings to act on strings, either set at the start or at the end depending on\r\n * need.\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"at-start\": true;\r\n\t\"during\": true;\r\n\t\"at-end\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\t/**\r\n\t * Easing function that sets to the specified value immediately after the\r\n\t * animation starts.\r\n\t */\r\n\tregisterEasing([\"at-start\", function(percentComplete: number, startValue: any, endValue: any): any {\r\n\t\treturn percentComplete === 0\r\n\t\t\t? startValue\r\n\t\t\t: endValue;\r\n\t} as any]);\r\n\r\n\t/**\r\n\t * Easing function that sets to the specified value while the animation is\r\n\t * running.\r\n\t */\r\n\tregisterEasing([\"during\", function(percentComplete: number, startValue: any, endValue: any): any {\r\n\t\treturn percentComplete === 0 || percentComplete === 1\r\n\t\t\t? startValue\r\n\t\t\t: endValue;\r\n\t} as any]);\r\n\r\n\t/**\r\n\t * Easing function that sets to the specified value when the animation ends.\r\n\t */\r\n\tregisterEasing([\"at-end\", function(percentComplete: number, startValue: any, endValue: any): any {\r\n\t\treturn percentComplete === 1\r\n\t\t\t? endValue\r\n\t\t\t: startValue;\r\n\t} as any]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Normalisations are used when getting or setting a (normally css compound\r\n * properties) value that can have a different order in different browsers.\r\n * \r\n * It can also be used to extend and create specific properties that otherwise\r\n * don't exist (such as for scrolling, or inner/outer dimensions).\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * The highest type index for finding the best normalization for a property.\r\n\t */\r\n\texport let MaxType: number = -1;\r\n\r\n\t/**\r\n\t * Unlike \"actions\", normalizations can always be replaced by users.\r\n\t */\r\n\texport const Normalizations: {[name: string]: VelocityNormalizationsFn}[] = [];\r\n\r\n\t/**\r\n\t * Any normalisations that should never be cached are listed here.\r\n\t * Faster than an array - https://jsperf.com/array-includes-and-find-methods-vs-set-has\r\n\t */\r\n\texport const NoCacheNormalizations = new Set();\r\n\r\n\t/**\r\n\t * Used to define a constructor.\r\n\t */\r\n\tinterface ClassConstructor {\r\n\t\tnew(): Object;\r\n\t}\r\n\r\n\t/**\r\n\t * An array of classes used for the per-class normalizations. This\r\n\t * translates into a bitwise enum for quick cross-reference, and so that\r\n\t * the element doesn't need multiple instanceof calls every\r\n\t * frame.\r\n\t */\r\n\texport const constructors: ClassConstructor[] = [];\r\n\r\n\t/**\r\n\t * Used to register a normalization. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerNormalization\", Element, \"name\", VelocityNormalizationsFn[, false]);\r\n\t * \r\n\t * The fourth argument can be an explicit false, which prevents\r\n\t * the property from being cached. Please note that this can be dangerous\r\n\t * for performance!\r\n\t *\r\n\t * @private\r\n\t */\r\n\texport function registerNormalization(args?: [ClassConstructor, string, VelocityNormalizationsFn] | [ClassConstructor, string, VelocityNormalizationsFn, boolean]) {\r\n\t\tconst constructor = args[0],\r\n\t\t\tname: string = args[1],\r\n\t\t\tcallback = args[2];\r\n\r\n\t\tif (isString(constructor) || !(constructor instanceof Object)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' constructor to an invalid value:\", constructor);\r\n\t\t} else if (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' callback to an invalid value:\", name, callback);\r\n\t\t} else {\r\n\t\t\tlet index = constructors.indexOf(constructor);\r\n\r\n\t\t\tif (index < 0) {\r\n\t\t\t\tMaxType = index = constructors.push(constructor) - 1;\r\n\t\t\t\tNormalizations[index] = Object.create(null);\r\n\t\t\t}\r\n\t\t\tNormalizations[index][name] = callback;\r\n\t\t\tif (args[3] === false) {\r\n\t\t\t\tNoCacheNormalizations.add(name);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Used to check if a normalisation exists on a specific class.\r\n\t */\r\n\texport function hasNormalization(args?: [ClassConstructor, string]) {\r\n\t\tconst constructor = args[0],\r\n\t\t\tname: string = args[1];\r\n\t\tlet index = constructors.indexOf(constructor);\r\n\r\n\t\treturn !!Normalizations[index][name];\r\n\t}\r\n\r\n\texport function getNormalization(element: HTMLorSVGElement, propertyName: string) {\r\n\t\tconst data = Data(element);\r\n\t\tlet fn: VelocityNormalizationsFn;\r\n\r\n\t\tfor (let index = MaxType, types = data.types; !fn && index >= 0; index--) {\r\n\t\t\tif (types & (1 << index)) {\r\n\t\t\t\tfn = Normalizations[index][propertyName];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fn;\r\n\t}\r\n\r\n\tregisterAction([\"registerNormalization\", registerNormalization]);\r\n\tregisterAction([\"hasNormalization\", hasNormalization]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t/**\r\n\t * Get/set an attribute.\r\n\t */\r\n\tfunction getAttribute(name: string) {\r\n\t\treturn function(element: Element, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn element.getAttribute(name);\r\n\t\t\t}\r\n\t\t\telement.setAttribute(name, propertyValue);\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tconst base = document.createElement(\"div\"),\r\n\t\trxSubtype = /^SVG(.*)Element$/,\r\n\t\trxElement = /Element$/;\r\n\r\n\tObject.getOwnPropertyNames(window).forEach(function(globals) {\r\n\t\tconst subtype = rxSubtype.exec(globals);\r\n\r\n\t\tif (subtype && subtype[1] !== \"SVG\") { // Don't do SVGSVGElement.\r\n\t\t\ttry {\r\n\t\t\t\tconst element = subtype[1] ? document.createElementNS(\"http://www.w3.org/2000/svg\", (subtype[1] || \"svg\").toLowerCase()) : document.createElement(\"svg\"),\r\n\t\t\t\t\tconstructor = element.constructor;\r\n\r\n\t\t\t\tfor (let attribute in element) {\r\n\t\t\t\t\tconst value = element[attribute];\r\n\r\n\t\t\t\t\tif (isString(attribute)\r\n\t\t\t\t\t\t&& !(attribute[0] === \"o\" && attribute[1] === \"n\")\r\n\t\t\t\t\t\t&& attribute !== attribute.toUpperCase()\r\n\t\t\t\t\t\t&& !rxElement.test(attribute)\r\n\t\t\t\t\t\t&& !(attribute in base)\r\n\t\t\t\t\t\t&& !isFunction(value)) {\r\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\r\n\t\t\t\t\t\tregisterNormalization([constructor as any, attribute, getAttribute(attribute)]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tconsole.error(\"VelocityJS: Error when trying to identify SVG attributes on \" + globals + \".\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t/**\r\n\t * Get/set the width or height.\r\n\t */\r\n\tfunction getDimension(name: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\t// Firefox throws an error if .getBBox() is called on an SVG that isn't attached to the DOM.\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn (element as SVGGraphicsElement).getBBox()[name] + \"px\";\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn \"0px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telement.setAttribute(name, propertyValue);\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([SVGElement, \"width\", getDimension(\"width\")]);\r\n\tregisterNormalization([SVGElement, \"height\", getDimension(\"height\")]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Figure out the dimensions for this width / height based on the\r\n\t * potential borders and whether we care about them.\r\n\t */\r\n\texport function augmentDimension(element: HTMLorSVGElement, name: \"width\" | \"height\", wantInner: boolean): number {\r\n\t\tconst isBorderBox = CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() === \"border-box\";\r\n\r\n\t\tif (isBorderBox === wantInner) {\r\n\t\t\t// in box-sizing mode, the CSS width / height accessors already\r\n\t\t\t// give the outerWidth / outerHeight.\r\n\t\t\tconst sides = name === \"width\" ? [\"Left\", \"Right\"] : [\"Top\", \"Bottom\"],\r\n\t\t\t\tfields = [\"padding\" + sides[0], \"padding\" + sides[1], \"border\" + sides[0] + \"Width\", \"border\" + sides[1] + \"Width\"];\r\n\t\t\tlet i: number,\r\n\t\t\t\tvalue: number,\r\n\t\t\t\taugment = 0;\r\n\r\n\t\t\tfor (i = 0; i < fields.length; i++) {\r\n\t\t\t\tvalue = parseFloat(CSS.getPropertyValue(element, fields[i]) as string);\r\n\t\t\t\tif (!isNaN(value)) {\r\n\t\t\t\t\taugment += value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn wantInner ? -augment : augment;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Get/set the inner/outer dimension.\r\n\t */\r\n\tfunction getDimension(name: \"width\" | \"height\", wantInner: boolean) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn augmentDimension(element, name, wantInner) + \"px\";\r\n\t\t\t}\r\n\t\t\tCSS.setPropertyValue(element, name, (parseFloat(propertyValue) - augmentDimension(element, name, wantInner)) + \"px\");\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"innerWidth\", getDimension(\"width\", true)]);\r\n\tregisterNormalization([Element, \"innerHeight\", getDimension(\"height\", true)]);\r\n\tregisterNormalization([Element, \"outerWidth\", getDimension(\"width\", false)]);\r\n\tregisterNormalization([Element, \"outerHeight\", getDimension(\"height\", false)]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport 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,\r\n\t\tlistItemRx = /^(li)$/i,\r\n\t\ttableRowRx = /^(tr)$/i,\r\n\t\ttableRx = /^(table)$/i,\r\n\t\ttableRowGroupRx = /^(tbody)$/i;\r\n\r\n\t/**\r\n\t * Display has an extra value of \"auto\" that works out the correct value\r\n\t * based on the type of element.\r\n\t */\r\n\tfunction display(element: HTMLorSVGElement): string;\r\n\tfunction display(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction display(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tconst style = element.style;\r\n\r\n\t\tif (propertyValue === undefined) {\r\n\t\t\treturn CSS.computePropertyValue(element, \"display\");\r\n\t\t}\r\n\t\tif (propertyValue === \"auto\") {\r\n\t\t\tconst nodeName = element && element.nodeName,\r\n\t\t\t\tdata = Data(element);\r\n\r\n\t\t\tif (inlineRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"inline\";\r\n\t\t\t} else if (listItemRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"list-item\";\r\n\t\t\t} else if (tableRowRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table-row\";\r\n\t\t\t} else if (tableRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table\";\r\n\t\t\t} else if (tableRowGroupRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table-row-group\";\r\n\t\t\t} else {\r\n\t\t\t\t// Default to \"block\" when no match is found.\r\n\t\t\t\tpropertyValue = \"block\";\r\n\t\t\t}\r\n\t\t\t// IMPORTANT: We need to do this as getPropertyValue bypasses the\r\n\t\t\t// Normalisation when it exists in the cache.\r\n\t\t\tdata.cache[\"display\"] = propertyValue;\r\n\t\t}\r\n\t\tstyle.display = propertyValue;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"display\", display]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Get the scrollWidth of an element.\r\n\t */\r\n\tfunction clientWidth(element: HTMLorSVGElement): string;\r\n\tfunction clientWidth(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction clientWidth(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientWidth + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollWidth of an element.\r\n\t */\r\n\tfunction scrollWidth(element: HTMLorSVGElement): string;\r\n\tfunction scrollWidth(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction scrollWidth(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollWidth + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollHeight of an element.\r\n\t */\r\n\tfunction clientHeight(element: HTMLorSVGElement): string;\r\n\tfunction clientHeight(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction clientHeight(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientHeight + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollHeight of an element.\r\n\t */\r\n\tfunction scrollHeight(element: HTMLorSVGElement): string;\r\n\tfunction scrollHeight(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction scrollHeight(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollHeight + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Scroll an element.\r\n\t */\r\n\tfunction scroll(direction: \"Height\", end: \"Top\"): VelocityNormalizationsFn;\r\n\tfunction scroll(direction: \"Width\", end: \"Left\"): VelocityNormalizationsFn;\r\n\tfunction scroll(direction: \"Height\" | \"Width\", end: \"Top\" | \"Left\"): VelocityNormalizationsFn {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue == null) {\r\n\t\t\t\t// Make sure we have these values cached.\r\n\t\t\t\tCSS.getPropertyValue(element, \"client\" + direction, null, true);\r\n\t\t\t\tCSS.getPropertyValue(element, \"scroll\" + direction, null, true);\r\n\t\t\t\tCSS.getPropertyValue(element, \"scroll\" + end, null, true);\r\n\t\t\t\treturn element[\"scroll\" + end] + \"px\";\r\n\t\t\t}\r\n\t\t\t//\t\tconsole.log(\"setScrollTop\", propertyValue)\r\n\t\t\tconst value = parseFloat(propertyValue),\r\n\t\t\t\tunit = propertyValue.replace(String(value), \"\");\r\n\r\n\t\t\tswitch (unit) {\r\n\t\t\t\tcase \"\":\r\n\t\t\t\tcase \"px\":\r\n\t\t\t\t\telement[\"scroll\" + end] = value;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"%\":\r\n\t\t\t\t\tlet client = parseFloat(CSS.getPropertyValue(element, \"client\" + direction)),\r\n\t\t\t\t\t\tscroll = parseFloat(CSS.getPropertyValue(element, \"scroll\" + direction));\r\n\r\n\t\t\t\t\t//\t\t\t\tconsole.log(\"setScrollTop percent\", scrollHeight, clientHeight, value, Math.max(0, scrollHeight - clientHeight) * value / 100)\r\n\t\t\t\t\telement[\"scroll\" + end] = Math.max(0, scroll - client) * value / 100;\r\n\t\t\t}\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([HTMLElement, \"scroll\", scroll(\"Height\", \"Top\"), false]);\r\n\tregisterNormalization([HTMLElement, \"scrollTop\", scroll(\"Height\", \"Top\"), false]);\r\n\tregisterNormalization([HTMLElement, \"scrollLeft\", scroll(\"Width\", \"Left\"), false]);\r\n\tregisterNormalization([HTMLElement, \"scrollWidth\", scrollWidth]);\r\n\tregisterNormalization([HTMLElement, \"clientWidth\", clientWidth]);\r\n\tregisterNormalization([HTMLElement, \"scrollHeight\", scrollHeight]);\r\n\tregisterNormalization([HTMLElement, \"clientHeight\", clientHeight]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * This handles all CSS style properties. With browser prefixed properties it\r\n * will register a version that handles setting (and getting) both the prefixed\r\n * and non-prefixed version.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Return a Normalisation that can be used to set / get a prefixed style\r\n\t * property.\r\n\t */\r\n\tfunction getSetPrefixed(propertyName: string, unprefixed: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn CSS.computePropertyValue(element, propertyName) || CSS.computePropertyValue(element, unprefixed);\r\n\t\t\t}\r\n\t\t\telement.style[propertyName] = element.style[unprefixed] = propertyValue;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\t/**\r\n\t * Return a Normalisation that can be used to set / get a style property.\r\n\t */\r\n\tfunction getSetStyle(propertyName: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn CSS.computePropertyValue(element, propertyName);\r\n\t\t\t}\r\n\t\t\telement.style[propertyName] = propertyValue;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tconst rxVendors = /^(webkit|moz|ms|o)[A-Z]/,\r\n\t\trxUnit = /^\\d+([a-z]+)/,\r\n\t\tprefixElement = State.prefixElement;\r\n\r\n\tfor (const propertyName in prefixElement.style) {\r\n\t\tif (rxVendors.test(propertyName)) {\r\n\t\t\tlet unprefixed = propertyName.replace(/^[a-z]+([A-Z])/, ($, letter: string) => letter.toLowerCase());\r\n\r\n\t\t\tif (ALL_VENDOR_PREFIXES || isString(prefixElement.style[unprefixed])) {\r\n\t\t\t\tregisterNormalization([Element, unprefixed, getSetPrefixed(propertyName, unprefixed)]);\r\n\t\t\t}\r\n\t\t} else if (!hasNormalization([Element, propertyName])) {\r\n\t\t\tregisterNormalization([Element, propertyName, getSetStyle(propertyName)]);\r\n\t\t}\r\n\t}\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * A fake normalization used to allow the \"tween\" property easy access.\r\n\t */\r\n\tfunction getSetTween(element: HTMLorSVGElement, propertyValue?: string) {\r\n\t\tif (propertyValue === undefined) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"tween\", getSetTween]);\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Call Completion\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Call the complete method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\tfunction callComplete(activeCall: AnimationCall) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements;\r\n\r\n\t\t\t(activeCall.options.complete as VelocityCallback).call(elements, elements, activeCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Complete an animation. This might involve restarting (for loop or repeat\r\n\t * options). Once it is finished we also check for any callbacks or Promises\r\n\t * that need updating.\r\n\t */\r\n\texport function completeCall(activeCall: AnimationCall) {\r\n\t\t//\t\tconsole.log(\"complete\", activeCall)\r\n\t\t// TODO: Check if it's not been completed already\r\n\r\n\t\tconst options = activeCall.options,\r\n\t\t\tqueue = getValue(activeCall.queue, options.queue),\r\n\t\t\tisLoop = getValue(activeCall.loop, options.loop, defaults.loop),\r\n\t\t\tisRepeat = getValue(activeCall.repeat, options.repeat, defaults.repeat),\r\n\t\t\tisStopped = activeCall._flags & AnimationFlags.STOPPED;\r\n\r\n\t\tif (!isStopped && (isLoop || isRepeat)) {\r\n\r\n\t\t\t////////////////////\r\n\t\t\t// Option: Loop //\r\n\t\t\t// Option: Repeat //\r\n\t\t\t////////////////////\r\n\r\n\t\t\tif (isRepeat && isRepeat !== true) {\r\n\t\t\t\tactiveCall.repeat = isRepeat - 1;\r\n\t\t\t} else if (isLoop && isLoop !== true) {\r\n\t\t\t\tactiveCall.loop = isLoop - 1;\r\n\t\t\t\tactiveCall.repeat = getValue(activeCall.repeatAgain, options.repeatAgain, defaults.repeatAgain);\r\n\t\t\t}\r\n\t\t\tif (isLoop) {\r\n\t\t\t\tactiveCall._flags ^= AnimationFlags.REVERSE;\r\n\t\t\t}\r\n\t\t\tif (queue !== false) {\r\n\t\t\t\t// Can't be called when stopped so no need for an extra check.\r\n\t\t\t\tData(activeCall.element).lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\r\n\t\t\t}\r\n\t\t\tactiveCall.timeStart = activeCall.ellapsedTime = activeCall.percentComplete = 0;\r\n\t\t\tactiveCall._flags &= ~AnimationFlags.STARTED;\r\n\t\t} else {\r\n\t\t\tconst element = activeCall.element,\r\n\t\t\t\tdata = Data(element);\r\n\r\n\t\t\tif (!--data.count && !isStopped) {\r\n\r\n\t\t\t\t////////////////////////\r\n\t\t\t\t// Feature: Classname //\r\n\t\t\t\t////////////////////////\r\n\r\n\t\t\t\tremoveClass(element, State.className);\r\n\t\t\t}\r\n\r\n\t\t\t//////////////////////\r\n\t\t\t// Option: Complete //\r\n\t\t\t//////////////////////\r\n\r\n\t\t\t// If this is the last animation in this list then we can check for\r\n\t\t\t// and complete calls or Promises.\r\n\t\t\t// TODO: When deleting an element we need to adjust these values.\r\n\t\t\tif (options && ++options._completed === options._total) {\r\n\t\t\t\tif (!isStopped && options.complete) {\r\n\t\t\t\t\t// We don't call the complete if the animation is stopped,\r\n\t\t\t\t\t// and we clear the key to prevent it being called again.\r\n\t\t\t\t\tcallComplete(activeCall);\r\n\t\t\t\t\toptions.complete = null;\r\n\t\t\t\t}\r\n\t\t\t\tconst resolver = options._resolver;\r\n\r\n\t\t\t\tif (resolver) {\r\n\t\t\t\t\t// Fulfil the Promise\r\n\t\t\t\t\tresolver(activeCall.elements as any);\r\n\t\t\t\t\tdelete options._resolver;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t///////////////////\r\n\t\t\t// Option: Queue //\r\n\t\t\t///////////////////\r\n\r\n\t\t\tif (queue !== false) {\r\n\t\t\t\t// We only do clever things with queues...\r\n\t\t\t\tif (!isStopped) {\r\n\t\t\t\t\t// If we're not stopping an animation, we need to remember\r\n\t\t\t\t\t// what time it finished so that the next animation in\r\n\t\t\t\t\t// sequence gets the correct start time.\r\n\t\t\t\t\tdata.lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\r\n\t\t\t\t}\r\n\t\t\t\t// Start the next animation in sequence, or delete the queue if\r\n\t\t\t\t// this was the last one.\r\n\t\t\t\tdequeue(element, queue);\r\n\t\t\t}\r\n\t\t\t// Cleanup any pointers, and remember the last animation etc.\r\n\t\t\tfreeAnimationCall(activeCall);\r\n\t\t}\r\n\t}\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\ninterface Element {\r\n\tvelocityData: ElementData;\r\n}\r\n\r\n/**\r\n * Get (and create) the internal data store for an element.\r\n */\r\nfunction Data(element: HTMLorSVGElement): ElementData {\r\n\t// Use a string member so Uglify doesn't mangle it.\r\n\tconst data = element[\"velocityData\"];\r\n\r\n\tif (data) {\r\n\t\treturn data;\r\n\t}\r\n\tlet types = 0;\r\n\r\n\tfor (let index = 0, constructors = VelocityStatic.constructors; index < constructors.length; index++) {\r\n\t\tif (element instanceof constructors[index]) {\r\n\t\t\ttypes |= 1 << index;\r\n\t\t}\r\n\t}\r\n\t// Do it this way so it errors on incorrect data.\r\n\tlet newData: ElementData = {\r\n\t\ttypes: types,\r\n\t\tcount: 0,\r\n\t\tcomputedStyle: null,\r\n\t\tcache: Object.create(null),\r\n\t\tqueueList: Object.create(null),\r\n\t\tlastAnimationList: Object.create(null),\r\n\t\tlastFinishList: Object.create(null)\r\n\t};\r\n\tObject.defineProperty(element, \"velocityData\", {\r\n\t\tvalue: newData\r\n\t});\r\n\treturn newData;\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Set to true, 1 or 2 (most verbose) to output debug info to console.\r\n\t */\r\n\texport let debug: boolean | 1 | 2 = false;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Velocity option defaults, which can be overriden by the user.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t// NOTE: Add the variable here, then add the default state in \"reset\" below.\r\n\tlet _cache: boolean,\r\n\t\t_begin: VelocityCallback,\r\n\t\t_complete: VelocityCallback,\r\n\t\t_delay: number,\r\n\t\t_duration: number,\r\n\t\t_easing: VelocityEasingType,\r\n\t\t_fpsLimit: number,\r\n\t\t_loop: number | true,\r\n\t\t_minFrameTime: number,\r\n\t\t_promise: boolean,\r\n\t\t_promiseRejectEmpty: boolean,\r\n\t\t_queue: string | false,\r\n\t\t_repeat: number | true,\r\n\t\t_speed: number,\r\n\t\t_sync: boolean;\r\n\r\n\texport const defaults: StrictVelocityOptions & {reset?: () => void} = {\r\n\t\tmobileHA: true\r\n\t};\r\n\r\n\t// IMPORTANT: Make sure any new defaults get added to the actions/set.ts list\r\n\tObject.defineProperties(defaults, {\r\n\t\treset: {\r\n\t\t\tenumerable: true,\r\n\t\t\tvalue: function() {\r\n\t\t\t\t_cache = DEFAULT_CACHE;\r\n\t\t\t\t_begin = undefined;\r\n\t\t\t\t_complete = undefined;\r\n\t\t\t\t_delay = DEFAULT_DELAY;\r\n\t\t\t\t_duration = DEFAULT_DURATION;\r\n\t\t\t\t_easing = validateEasing(DEFAULT_EASING, DEFAULT_DURATION);\r\n\t\t\t\t_fpsLimit = DEFAULT_FPSLIMIT;\r\n\t\t\t\t_loop = DEFAULT_LOOP;\r\n\t\t\t\t_minFrameTime = FUZZY_MS_PER_SECOND / DEFAULT_FPSLIMIT;\r\n\t\t\t\t_promise = DEFAULT_PROMISE;\r\n\t\t\t\t_promiseRejectEmpty = DEFAULT_PROMISE_REJECT_EMPTY;\r\n\t\t\t\t_queue = DEFAULT_QUEUE;\r\n\t\t\t\t_repeat = DEFAULT_REPEAT;\r\n\t\t\t\t_speed = DEFAULT_SPEED;\r\n\t\t\t\t_sync = DEFAULT_SYNC;\r\n\t\t\t}\r\n\t\t},\r\n\t\tcache: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _cache;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validateCache(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_cache = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tbegin: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityCallback {\r\n\t\t\t\treturn _begin;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityCallback) {\r\n\t\t\t\tvalue = validateBegin(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_begin = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomplete: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityCallback {\r\n\t\t\t\treturn _complete;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityCallback) {\r\n\t\t\t\tvalue = validateComplete(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_complete = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tdelay: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): \"fast\" | \"normal\" | \"slow\" | number {\r\n\t\t\t\treturn _delay;\r\n\t\t\t},\r\n\t\t\tset: function(value: \"fast\" | \"normal\" | \"slow\" | number) {\r\n\t\t\t\tvalue = validateDelay(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_delay = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tduration: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): \"fast\" | \"normal\" | \"slow\" | number {\r\n\t\t\t\treturn _duration;\r\n\t\t\t},\r\n\t\t\tset: function(value: \"fast\" | \"normal\" | \"slow\" | number) {\r\n\t\t\t\tvalue = validateDuration(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_duration = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\teasing: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityEasingType {\r\n\t\t\t\treturn _easing;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityEasingType) {\r\n\t\t\t\tvalue = validateEasing(value, _duration);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_easing = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tfpsLimit: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | false {\r\n\t\t\t\treturn _fpsLimit;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | false) {\r\n\t\t\t\tvalue = validateFpsLimit(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_fpsLimit = value;\r\n\t\t\t\t\t_minFrameTime = FUZZY_MS_PER_SECOND / value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tloop: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | true {\r\n\t\t\t\treturn _loop;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | boolean) {\r\n\t\t\t\tvalue = validateLoop(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_loop = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tminFrameTime: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | false {\r\n\t\t\t\treturn _minFrameTime;\r\n\t\t\t}\r\n\t\t},\r\n\t\tpromise: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _promise;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validatePromise(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_promise = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tpromiseRejectEmpty: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _promiseRejectEmpty;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validatePromiseRejectEmpty(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_promiseRejectEmpty = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tqueue: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): string | false {\r\n\t\t\t\treturn _queue;\r\n\t\t\t},\r\n\t\t\tset: function(value: string | false) {\r\n\t\t\t\tvalue = validateQueue(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_queue = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepeat: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | true {\r\n\t\t\t\treturn _repeat;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | boolean) {\r\n\t\t\t\tvalue = validateRepeat(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_repeat = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tspeed: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number {\r\n\t\t\t\treturn _speed;\r\n\t\t\t},\r\n\t\t\tset: function(value: number) {\r\n\t\t\t\tvalue = validateSpeed(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_speed = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsync: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _sync;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validateSync(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_sync = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tdefaults.reset();\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Velocity-wide animation time remapping for testing purposes.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * In mock mode, all animations are forced to complete immediately upon the\r\n\t * next rAF tick. If there are further animations queued then they will each\r\n\t * take one single frame in turn. Loops and repeats will be disabled while\r\n\t * mock = true.\r\n\t */\r\n\texport let mock: boolean = false;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Used to patch any object to allow Velocity chaining. In order to chain an\r\n\t * object must either be treatable as an array - with a .length\r\n\t * property, and each member a Node, or a Node directly.\r\n\t * \r\n\t * By default Velocity will try to patch window,\r\n\t * jQuery, Zepto, and several classes that return\r\n\t * Nodes or lists of Nodes.\r\n\t * \r\n\t * @public\r\n\t */\r\n\texport function patch(proto: any, global?: boolean) {\r\n\t\ttry {\r\n\t\t\tdefineProperty(proto, (global ? \"V\" : \"v\") + \"elocity\", VelocityFn);\r\n\t\t} catch (e) {\r\n\t\t\tconsole.warn(\"VelocityJS: Error when trying to add prototype.\", e);\r\n\t\t}\r\n\t}\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * AnimationCall queue\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Simple queue management. Un-named queue is directly within the element data,\r\n\t * named queue is within an object within it.\r\n\t */\r\n\tfunction animate(animation: AnimationCall) {\r\n\t\tconst prev = State.last;\r\n\r\n\t\tanimation._prev = prev;\r\n\t\tanimation._next = undefined;\r\n\t\tif (prev) {\r\n\t\t\tprev._next = animation;\r\n\t\t} else {\r\n\t\t\tState.first = animation;\r\n\t\t}\r\n\t\tState.last = animation;\r\n\t\tif (!State.firstNew) {\r\n\t\t\tState.firstNew = animation;\r\n\t\t}\r\n\t\tconst element = animation.element,\r\n\t\t\tdata = Data(element);\r\n\r\n\t\tif (!data.count++) {\r\n\r\n\t\t\t////////////////////////\r\n\t\t\t// Feature: Classname //\r\n\t\t\t////////////////////////\r\n\r\n\t\t\taddClass(element, State.className);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Add an item to an animation queue.\r\n\t */\r\n\texport function queue(element: HTMLorSVGElement, animation: AnimationCall, queue: string | false): void {\r\n\t\tconst data = Data(element);\r\n\r\n\t\tif (queue !== false) {\r\n\t\t\t// Store the last animation added so we can use it for the\r\n\t\t\t// beginning of the next one.\r\n\t\t\tdata.lastAnimationList[queue] = animation;\r\n\t\t}\r\n\t\tif (queue === false) {\r\n\t\t\tanimate(animation);\r\n\t\t} else {\r\n\t\t\tif (!isString(queue)) {\r\n\t\t\t\tqueue = \"\";\r\n\t\t\t}\r\n\t\t\tlet last = data.queueList[queue];\r\n\r\n\t\t\tif (!last) {\r\n\t\t\t\tif (last === null) {\r\n\t\t\t\t\tdata.queueList[queue] = animation;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdata.queueList[queue] = null;\r\n\t\t\t\t\tanimate(animation);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile (last._next) {\r\n\t\t\t\t\tlast = last._next;\r\n\t\t\t\t}\r\n\t\t\t\tlast._next = animation;\r\n\t\t\t\tanimation._prev = last;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Start the next animation on this element's queue (named or default).\r\n\t *\r\n\t * @returns the next animation that is starting.\r\n\t */\r\n\texport function dequeue(element: HTMLorSVGElement, queue?: string | boolean, skip?: boolean): AnimationCall {\r\n\t\tif (queue !== false) {\r\n\t\t\tif (!isString(queue)) {\r\n\t\t\t\tqueue = \"\";\r\n\t\t\t}\r\n\t\t\tconst data = Data(element),\r\n\t\t\t\tanimation = data.queueList[queue];\r\n\r\n\t\t\tif (animation) {\r\n\t\t\t\tdata.queueList[queue] = animation._next || null;\r\n\t\t\t\tif (!skip) {\r\n\t\t\t\t\tanimate(animation);\r\n\t\t\t\t}\r\n\t\t\t} else if (animation === null) {\r\n\t\t\t\tdelete data.queueList[queue];\r\n\t\t\t}\r\n\t\t\treturn animation;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Remove an animation from the active animation list. If it has a queue set\r\n\t * then remember it as the last animation for that queue, and free the one\r\n\t * that was previously there. If the animation list is completely empty then\r\n\t * mark us as finished.\r\n\t */\r\n\texport function freeAnimationCall(animation: AnimationCall): void {\r\n\t\tconst next = animation._next,\r\n\t\t\tprev = animation._prev,\r\n\t\t\tqueue = animation.queue == null ? animation.options.queue : animation.queue;\r\n\r\n\t\tif (State.firstNew === animation) {\r\n\t\t\tState.firstNew = next;\r\n\t\t}\r\n\t\tif (State.first === animation) {\r\n\t\t\tState.first = next;\r\n\t\t} else if (prev) {\r\n\t\t\tprev._next = next;\r\n\t\t}\r\n\t\tif (State.last === animation) {\r\n\t\t\tState.last = prev;\r\n\t\t} else if (next) {\r\n\t\t\tnext._prev = prev;\r\n\t\t}\r\n\t\tif (queue) {\r\n\t\t\tconst data = Data(animation.element);\r\n\r\n\t\t\tif (data) {\r\n\t\t\t\tanimation._next = animation._prev = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/* Container for the user's custom animation redirects that are referenced by name in place of the properties map argument. */\r\n\texport let Redirects = {/* Manually registered by the user. */};\r\n\r\n\t/***********************\r\n\t Packaged Redirects\r\n\t ***********************/\r\n\r\n\t/* slideUp, slideDown */\r\n\t[\"Down\", \"Up\"].forEach(function(direction) {\r\n\t\tRedirects[\"slide\" + direction] = function(element: HTMLorSVGElement, options: VelocityOptions, elementsIndex: number, elementsSize, elements: HTMLorSVGElement[], resolver: (value?: HTMLorSVGElement[] | VelocityResult) => void) {\r\n\t\t\tlet opts = {...options},\r\n\t\t\t\tbegin = opts.begin,\r\n\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\tinlineValues = {},\r\n\t\t\t\tcomputedValues = {\r\n\t\t\t\t\theight: \"\",\r\n\t\t\t\t\tmarginTop: \"\",\r\n\t\t\t\t\tmarginBottom: \"\",\r\n\t\t\t\t\tpaddingTop: \"\",\r\n\t\t\t\t\tpaddingBottom: \"\"\r\n\t\t\t\t};\r\n\r\n\t\t\tif (opts.display === undefined) {\r\n\t\t\t\tlet isInline = inlineRx.test(element.nodeName.toLowerCase());\r\n\r\n\t\t\t\t/* Show the element before slideDown begins and hide the element after slideUp completes. */\r\n\t\t\t\t/* Note: Inline elements cannot have dimensions animated, so they're reverted to inline-block. */\r\n\t\t\t\topts.display = (direction === \"Down\" ? (isInline ? \"inline-block\" : \"block\") : \"none\");\r\n\t\t\t}\r\n\r\n\t\t\topts.begin = function() {\r\n\t\t\t\t/* If the user passed in a begin callback, fire it now. */\r\n\t\t\t\tif (elementsIndex === 0 && begin) {\r\n\t\t\t\t\tbegin.call(elements, elements);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Cache the elements' original vertical dimensional property values so that we can animate back to them. */\r\n\t\t\t\tfor (let property in computedValues) {\r\n\t\t\t\t\tif (!computedValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinlineValues[property] = element.style[property];\r\n\r\n\t\t\t\t\t/* For slideDown, use forcefeeding to animate all vertical properties from 0. For slideUp,\r\n\t\t\t\t\t use forcefeeding to start from computed values and animate down to 0. */\r\n\t\t\t\t\tlet propertyValue = CSS.getPropertyValue(element, property);\r\n\t\t\t\t\tcomputedValues[property] = (direction === \"Down\") ? [propertyValue, 0] : [0, propertyValue];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Force vertical overflow content to clip so that sliding works as expected. */\r\n\t\t\t\t(inlineValues as any).overflow = element.style.overflow;\r\n\t\t\t\telement.style.overflow = \"hidden\";\r\n\t\t\t};\r\n\r\n\t\t\topts.complete = function() {\r\n\t\t\t\t/* Reset element to its pre-slide inline values once its slide animation is complete. */\r\n\t\t\t\tfor (let property in inlineValues) {\r\n\t\t\t\t\tif (inlineValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\telement.style[property] = inlineValues[property];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If the user passed in a complete callback, fire it now. */\r\n\t\t\t\tif (elementsIndex === elementsSize - 1) {\r\n\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (resolver) {\r\n\t\t\t\t\t\tresolver(elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t(VelocityFn as any)(element, computedValues, opts);\r\n\t\t};\r\n\t});\r\n\r\n\t/* fadeIn, fadeOut */\r\n\t[\"In\", \"Out\"].forEach(function(direction) {\r\n\t\tRedirects[\"fade\" + direction] = function(element: HTMLorSVGElement, options: VelocityOptions, elementsIndex: number, elementsSize, elements: HTMLorSVGElement[], promiseData) {\r\n\t\t\tlet opts = {...options},\r\n\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\tpropertiesMap = {\r\n\t\t\t\t\topacity: (direction === \"In\") ? 1 : 0\r\n\t\t\t\t};\r\n\r\n\t\t\t/* Since redirects are triggered individually for each element in the animated set, avoid repeatedly triggering\r\n\t\t\t callbacks by firing them only when the final element has been reached. */\r\n\t\t\tif (elementsIndex !== 0) {\r\n\t\t\t\topts.begin = null;\r\n\t\t\t}\r\n\t\t\tif (elementsIndex !== elementsSize - 1) {\r\n\t\t\t\topts.complete = null;\r\n\t\t\t} else {\r\n\t\t\t\topts.complete = function() {\r\n\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (promiseData) {\r\n\t\t\t\t\t\tpromiseData.resolver(elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\t/* If a display was passed in, use it. Otherwise, default to \"none\" for fadeOut or the element-specific default for fadeIn. */\r\n\t\t\t/* Note: We allow users to pass in \"null\" to skip display setting altogether. */\r\n\t\t\tif (opts.display === undefined) {\r\n\t\t\t\topts.display = (direction === \"In\" ? \"auto\" : \"none\");\r\n\t\t\t}\r\n\r\n\t\t\t(VelocityFn as any)(this, propertiesMap, opts);\r\n\t\t};\r\n\t});\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Effect Registration\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/* Animate the expansion/contraction of the elements' parent's height for In/Out effects. */\r\n\tfunction animateParentHeight(elements: HTMLorSVGElement | HTMLorSVGElement[], direction, totalDuration, stagger) {\r\n\t\tlet totalHeightDelta = 0,\r\n\t\t\tparentNode: HTMLorSVGElement;\r\n\r\n\t\t/* Sum the total height (including padding and margin) of all targeted elements. */\r\n\t\t((elements as HTMLorSVGElement).nodeType ? [elements as HTMLorSVGElement] : elements as HTMLorSVGElement[]).forEach(function(element: HTMLorSVGElement, i) {\r\n\t\t\tif (stagger) {\r\n\t\t\t\t/* Increase the totalDuration by the successive delay amounts produced by the stagger option. */\r\n\t\t\t\ttotalDuration += i * stagger;\r\n\t\t\t}\r\n\r\n\t\t\tparentNode = element.parentNode as HTMLorSVGElement;\r\n\r\n\t\t\tlet propertiesToSum = [\"height\", \"paddingTop\", \"paddingBottom\", \"marginTop\", \"marginBottom\"];\r\n\r\n\t\t\t/* If box-sizing is border-box, the height already includes padding and margin */\r\n\t\t\tif (CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() === \"border-box\") {\r\n\t\t\t\tpropertiesToSum = [\"height\"];\r\n\t\t\t}\r\n\r\n\t\t\tpropertiesToSum.forEach(function(property) {\r\n\t\t\t\ttotalHeightDelta += parseFloat(CSS.getPropertyValue(element, property) as string);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t/* Animate the parent element's height adjustment (with a varying duration multiplier for aesthetic benefits). */\r\n\t\t// TODO: Get this typesafe again\r\n\t\t(VelocityFn as any)(\r\n\t\t\tparentNode,\r\n\t\t\t{height: (direction === \"In\" ? \"+\" : \"-\") + \"=\" + totalHeightDelta},\r\n\t\t\t{queue: false, easing: \"ease-in-out\", duration: totalDuration * (direction === \"In\" ? 0.6 : 1)}\r\n\t\t);\r\n\t}\r\n\r\n\t/* Note: RegisterUI is a legacy name. */\r\n\texport function RegisterEffect(effectName: string, properties): Velocity {\r\n\r\n\t\t/* Register a custom redirect for each effect. */\r\n\t\tRedirects[effectName] = function(element, redirectOptions, elementsIndex, elementsSize, elements, resolver: (value?: HTMLorSVGElement[] | VelocityResult) => void, loop) {\r\n\t\t\tlet finalElement = (elementsIndex === elementsSize - 1),\r\n\t\t\t\ttotalDuration = 0;\r\n\r\n\t\t\tloop = loop || properties.loop;\r\n\t\t\tif (typeof properties.defaultDuration === \"function\") {\r\n\t\t\t\tproperties.defaultDuration = properties.defaultDuration.call(elements, elements);\r\n\t\t\t} else {\r\n\t\t\t\tproperties.defaultDuration = parseFloat(properties.defaultDuration);\r\n\t\t\t}\r\n\r\n\t\t\t/* Get the total duration used, so we can share it out with everything that doesn't have a duration */\r\n\t\t\tfor (let callIndex = 0; callIndex < properties.calls.length; callIndex++) {\r\n\t\t\t\tlet durationPercentage = properties.calls[callIndex][1];\r\n\t\t\t\tif (typeof durationPercentage === \"number\") {\r\n\t\t\t\t\ttotalDuration += durationPercentage;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlet shareDuration = totalDuration >= 1 ? 0 : properties.calls.length ? (1 - totalDuration) / properties.calls.length : 1;\r\n\r\n\t\t\t/* Iterate through each effect's call array. */\r\n\t\t\tfor (let callIndex = 0; callIndex < properties.calls.length; callIndex++) {\r\n\t\t\t\tlet call = properties.calls[callIndex],\r\n\t\t\t\t\tpropertyMap = call[0],\r\n\t\t\t\t\tredirectDuration = 1000,\r\n\t\t\t\t\tdurationPercentage = call[1],\r\n\t\t\t\t\tcallOptions = call[2] || {},\r\n\t\t\t\t\topts: VelocityOptions = {};\r\n\r\n\t\t\t\tif (redirectOptions.duration !== undefined) {\r\n\t\t\t\t\tredirectDuration = redirectOptions.duration;\r\n\t\t\t\t} else if (properties.defaultDuration !== undefined) {\r\n\t\t\t\t\tredirectDuration = properties.defaultDuration;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Assign the whitelisted per-call options. */\r\n\t\t\t\topts.duration = redirectDuration * (typeof durationPercentage === \"number\" ? durationPercentage : shareDuration);\r\n\t\t\t\topts.queue = redirectOptions.queue || \"\";\r\n\t\t\t\topts.easing = callOptions.easing || \"ease\";\r\n\t\t\t\topts.delay = parseFloat(callOptions.delay) || 0;\r\n\t\t\t\topts.loop = !properties.loop && callOptions.loop;\r\n\t\t\t\topts.cache = callOptions.cache || true;\r\n\r\n\t\t\t\t/* Special processing for the first effect call. */\r\n\t\t\t\tif (callIndex === 0) {\r\n\t\t\t\t\t/* If a delay was passed into the redirect, combine it with the first call's delay. */\r\n\t\t\t\t\topts.delay += (parseFloat(redirectOptions.delay) || 0);\r\n\r\n\t\t\t\t\tif (elementsIndex === 0) {\r\n\t\t\t\t\t\topts.begin = function() {\r\n\t\t\t\t\t\t\t/* Only trigger a begin callback on the first effect call with the first element in the set. */\r\n\t\t\t\t\t\t\tif (redirectOptions.begin) {\r\n\t\t\t\t\t\t\t\tredirectOptions.begin.call(elements, elements);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tlet direction = effectName.match(/(In|Out)$/);\r\n\r\n\t\t\t\t\t\t\t/* Make \"in\" transitioning elements invisible immediately so that there's no FOUC between now\r\n\t\t\t\t\t\t\t and the first RAF tick. */\r\n\t\t\t\t\t\t\tif ((direction && direction[0] === \"In\") && propertyMap.opacity !== undefined) {\r\n\t\t\t\t\t\t\t\t(elements.nodeType ? [elements] : elements).forEach(function(element) {\r\n\t\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, \"opacity\", 0);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Only trigger animateParentHeight() if we're using an In/Out transition. */\r\n\t\t\t\t\t\t\tif (redirectOptions.animateParentHeight && direction) {\r\n\t\t\t\t\t\t\t\tanimateParentHeight(elements, direction[0], redirectDuration + (opts.delay as number), redirectOptions.stagger);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* If the user isn't overriding the display option, default to \"auto\" for \"In\"-suffixed transitions. */\r\n\t\t\t\t\t//\t\t\t\t\tif (redirectOptions.display !== null) {\r\n\t\t\t\t\t//\t\t\t\t\t\tif (redirectOptions.display !== undefined && redirectOptions.display !== \"none\") {\r\n\t\t\t\t\t//\t\t\t\t\t\t\topts.display = redirectOptions.display;\r\n\t\t\t\t\t//\t\t\t\t\t\t} else if (/In$/.test(effectName)) {\r\n\t\t\t\t\t//\t\t\t\t\t\t\t/* Inline elements cannot be subjected to transforms, so we switch them to inline-block. */\r\n\t\t\t\t\t//\t\t\t\t\t\t\tlet defaultDisplay = CSS.Values.getDisplayType(element);\r\n\t\t\t\t\t//\t\t\t\t\t\t\topts.display = (defaultDisplay === \"inline\") ? \"inline-block\" : defaultDisplay;\r\n\t\t\t\t\t//\t\t\t\t\t\t}\r\n\t\t\t\t\t//\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (redirectOptions.visibility && redirectOptions.visibility !== \"hidden\") {\r\n\t\t\t\t\t\topts.visibility = redirectOptions.visibility;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Special processing for the last effect call. */\r\n\t\t\t\tif (callIndex === properties.calls.length - 1) {\r\n\t\t\t\t\t/* Append promise resolving onto the user's redirect callback. */\r\n\t\t\t\t\tlet injectFinalCallbacks = function() {\r\n\t\t\t\t\t\tif ((redirectOptions.display === undefined || redirectOptions.display === \"none\") && /Out$/.test(effectName)) {\r\n\t\t\t\t\t\t\t(elements.nodeType ? [elements] : elements).forEach(function(element) {\r\n\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, \"display\", \"none\");\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (redirectOptions.complete) {\r\n\t\t\t\t\t\t\tredirectOptions.complete.call(elements, elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (resolver) {\r\n\t\t\t\t\t\t\tresolver(elements || element);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\topts.complete = function() {\r\n\t\t\t\t\t\tif (loop) {\r\n\t\t\t\t\t\t\tRedirects[effectName](element, redirectOptions, elementsIndex, elementsSize, elements, resolver, loop === true ? true : Math.max(0, loop - 1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (properties.reset) {\r\n\t\t\t\t\t\t\tfor (let resetProperty in properties.reset) {\r\n\t\t\t\t\t\t\t\tif (!properties.reset.hasOwnProperty(resetProperty)) {\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tlet resetValue = properties.reset[resetProperty];\r\n\r\n\t\t\t\t\t\t\t\t/* Format each non-array value in the reset property map to [ value, value ] so that changes apply\r\n\t\t\t\t\t\t\t\t immediately and DOM querying is avoided (via forcefeeding). */\r\n\t\t\t\t\t\t\t\t/* Note: Don't forcefeed hooks, otherwise their hook roots will be defaulted to their null values. */\r\n\t\t\t\t\t\t\t\t// TODO: Fix this\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tif (CSS.Hooks.registered[resetProperty] === undefined && (typeof resetValue === \"string\" || typeof resetValue === \"number\")) {\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tproperties.reset[resetProperty] = [properties.reset[resetProperty], properties.reset[resetProperty]];\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* So that the reset values are applied instantly upon the next rAF tick, use a zero duration and parallel queueing. */\r\n\t\t\t\t\t\t\tlet resetOptions: VelocityOptions = {duration: 0, queue: false};\r\n\r\n\t\t\t\t\t\t\t/* Since the reset option uses up the complete callback, we trigger the user's complete callback at the end of ours. */\r\n\t\t\t\t\t\t\tif (finalElement) {\r\n\t\t\t\t\t\t\t\tresetOptions.complete = injectFinalCallbacks;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tVelocityFn(element, properties.reset, resetOptions);\r\n\t\t\t\t\t\t\t/* Only trigger the user's complete callback on the last effect call with the last element in the set. */\r\n\t\t\t\t\t\t} else if (finalElement) {\r\n\t\t\t\t\t\t\tinjectFinalCallbacks();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif (redirectOptions.visibility === \"hidden\") {\r\n\t\t\t\t\t\topts.visibility = redirectOptions.visibility;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tVelocityFn(element, propertyMap, opts);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t/* Return the Velocity object so that RegisterUI calls can be chained. */\r\n\t\treturn VelocityFn as any;\r\n\t};\r\n};","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Sequence Running\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/* Note: Sequence calls must use Velocity's single-object arguments syntax. */\r\n\texport function RunSequence(originalSequence): void {\r\n\t\tlet sequence = _deepCopyObject([], originalSequence);\r\n\r\n\t\tif (sequence.length > 1) {\r\n\t\t\tsequence.reverse().forEach(function(currentCall, i) {\r\n\t\t\t\tlet nextCall = sequence[i + 1];\r\n\r\n\t\t\t\tif (nextCall) {\r\n\t\t\t\t\t/* Parallel sequence calls (indicated via sequenceQueue:false) are triggered\r\n\t\t\t\t\t in the previous call's begin callback. Otherwise, chained calls are normally triggered\r\n\t\t\t\t\t in the previous call's complete callback. */\r\n\t\t\t\t\tlet currentCallOptions = currentCall.o || currentCall.options,\r\n\t\t\t\t\t\tnextCallOptions = nextCall.o || nextCall.options;\r\n\r\n\t\t\t\t\tlet timing = (currentCallOptions && currentCallOptions.sequenceQueue === false) ? \"begin\" : \"complete\",\r\n\t\t\t\t\t\tcallbackOriginal = nextCallOptions && nextCallOptions[timing],\r\n\t\t\t\t\t\toptions = {};\r\n\r\n\t\t\t\t\toptions[timing] = function() {\r\n\t\t\t\t\t\tlet nextCallElements = nextCall.e || nextCall.elements;\r\n\t\t\t\t\t\tlet elements = nextCallElements.nodeType ? [nextCallElements] : nextCallElements;\r\n\r\n\t\t\t\t\t\tif (callbackOriginal) {\r\n\t\t\t\t\t\t\tcallbackOriginal.call(elements, elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tVelocityFn(currentCall);\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif (nextCall.o) {\r\n\t\t\t\t\t\tnextCall.o = {...nextCallOptions, ...options};\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnextCall.options = {...nextCallOptions, ...options};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tsequence.reverse();\r\n\t\t}\r\n\r\n\t\tVelocityFn(sequence[0]);\r\n\t};\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Tick\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Call the begin method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\texport function callBegin(activeCall: AnimationCall) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements;\r\n\r\n\t\t\t(activeCall.options.begin as VelocityCallback).call(elements, elements, activeCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Call the progress method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\tfunction callProgress(activeCall: AnimationCall, timeCurrent: number) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements,\r\n\t\t\t\tpercentComplete = activeCall.percentComplete,\r\n\t\t\t\toptions = activeCall.options,\r\n\t\t\t\ttweenValue = activeCall.tween;\r\n\r\n\t\t\t(activeCall.options.progress as VelocityProgress).call(elements,\r\n\t\t\t\telements,\r\n\t\t\t\tpercentComplete,\r\n\t\t\t\tMath.max(0, activeCall.timeStart + (activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaults.duration) - timeCurrent),\r\n\t\t\t\ttweenValue !== undefined ? tweenValue : String(percentComplete * 100),\r\n\t\t\t\tactiveCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tlet firstProgress: AnimationCall,\r\n\t\tfirstComplete: AnimationCall;\r\n\r\n\tfunction asyncCallbacks() {\r\n\t\tlet activeCall: AnimationCall,\r\n\t\t\tnextCall: AnimationCall;\r\n\t\t// Callbacks and complete that might read the DOM again.\r\n\r\n\t\t// Progress callback\r\n\t\tfor (activeCall = firstProgress; activeCall; activeCall = nextCall) {\r\n\t\t\tnextCall = activeCall._nextProgress;\r\n\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\tcallProgress(activeCall, lastTick);\r\n\t\t}\r\n\t\t// Complete animations, including complete callback or looping\r\n\t\tfor (activeCall = firstComplete; activeCall; activeCall = nextCall) {\r\n\t\t\tnextCall = activeCall._nextComplete;\r\n\t\t\t/* If this call has finished tweening, pass it to complete() to handle call cleanup. */\r\n\t\t\tcompleteCall(activeCall);\r\n\t\t}\r\n\t}\r\n\r\n\t/**************\r\n\t Timing\r\n\t **************/\r\n\r\n\tconst FRAME_TIME = 1000 / 60,\r\n\t\t/**\r\n\t\t* Shim for window.performance in case it doesn't exist\r\n\t\t*/\r\n\t\tperformance = (function() {\r\n\t\t\tconst perf = window.performance || {} as Performance;\r\n\r\n\t\t\tif (typeof perf.now !== \"function\") {\r\n\t\t\t\tconst nowOffset = perf.timing && perf.timing.navigationStart ? perf.timing.navigationStart : _now();\r\n\r\n\t\t\t\tperf.now = function() {\r\n\t\t\t\t\treturn _now() - nowOffset;\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\treturn perf;\r\n\t\t})(),\r\n\t\t/**\r\n\t\t * Proxy function for when rAF is not available - try to be as accurate\r\n\t\t * as possible with the setTimeout calls, however they are far less\r\n\t\t * accurate than rAF can be - so try not to use normally (unless the tab\r\n\t\t * is in the background).\r\n\t\t */\r\n\t\trAFProxy = function(callback: FrameRequestCallback) {\r\n\t\t\tconsole.log(\"rAFProxy\", Math.max(0, FRAME_TIME - (performance.now() - lastTick)), performance.now(), lastTick, FRAME_TIME)\r\n\t\t\treturn setTimeout(function() {\r\n\t\t\t\tcallback(performance.now());\r\n\t\t\t}, Math.max(0, FRAME_TIME - (performance.now() - lastTick)));\r\n\t\t},\r\n\t\t/* rAF shim. Gist: https://gist.github.com/julianshapiro/9497513 */\r\n\t\trAFShim = window.requestAnimationFrame || rAFProxy;\r\n\t/**\r\n\t * The ticker function being used, either rAF, or a function that\r\n\t * emulates it.\r\n\t */\r\n\tlet ticker: (callback: FrameRequestCallback) => number = document.hidden ? rAFProxy : rAFShim;\r\n\t/**\r\n\t * The time that the last animation frame ran at. Set from tick(), and used\r\n\t * for missing rAF (ie, when not in focus etc).\r\n\t */\r\n\texport let lastTick: number = 0;\r\n\r\n\t/* Inactive browser tabs pause rAF, which results in all active animations immediately sprinting to their completion states when the tab refocuses.\r\n\t To get around this, we dynamically switch rAF to setTimeout (which the browser *doesn't* pause) when the tab loses focus. We skip this for mobile\r\n\t devices to avoid wasting battery power on inactive tabs. */\r\n\t/* Note: Tab focus detection doesn't work on older versions of IE, but that's okay since they don't support rAF to begin with. */\r\n\tif (!State.isMobile && document.hidden !== undefined) {\r\n\t\tdocument.addEventListener(\"visibilitychange\", function updateTicker(event?: Event) {\r\n\t\t\tlet hidden = document.hidden;\r\n\r\n\t\t\tticker = hidden ? rAFProxy : rAFShim;\r\n\t\t\tif (event) {\r\n\t\t\t\tsetTimeout(tick, 2000);\r\n\t\t\t}\r\n\t\t\ttick();\r\n\t\t});\r\n\t}\r\n\r\n\tlet ticking: boolean;\r\n\r\n\t/**\r\n\t * Called on every tick, preferably through rAF. This is reponsible for\r\n\t * initialising any new animations, then starting any that need starting.\r\n\t * Finally it will expand any tweens and set the properties relating to\r\n\t * them. If there are any callbacks relating to the animations then they\r\n\t * will attempt to call at the end (with the exception of \"begin\").\r\n\t */\r\n\texport function tick(timestamp?: number | boolean) {\r\n\t\tif (ticking) {\r\n\t\t\t// Should never happen - but if we've swapped back from hidden to\r\n\t\t\t// visibile then we want to make sure\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tticking = true;\r\n\t\t/* An empty timestamp argument indicates that this is the first tick occurence since ticking was turned on.\r\n\t\t We leverage this metadata to fully ignore the first tick pass since RAF's initial pass is fired whenever\r\n\t\t the browser's next tick sync time occurs, which results in the first elements subjected to Velocity\r\n\t\t calls being animated out of sync with any elements animated immediately thereafter. In short, we ignore\r\n\t\t the first RAF tick pass so that elements being immediately consecutively animated -- instead of simultaneously animated\r\n\t\t by the same Velocity call -- are properly batched into the same initial RAF tick and consequently remain in sync thereafter. */\r\n\t\tif (timestamp) {\r\n\t\t\t/* We normally use RAF's high resolution timestamp but as it can be significantly offset when the browser is\r\n\t\t\t under high stress we give the option for choppiness over allowing the browser to drop huge chunks of frames.\r\n\t\t\t We use performance.now() and shim it if it doesn't exist for when the tab is hidden. */\r\n\t\t\tconst timeCurrent = timestamp && timestamp !== true ? timestamp : performance.now(),\r\n\t\t\t\tdeltaTime = lastTick ? timeCurrent - lastTick : FRAME_TIME,\r\n\t\t\t\tdefaultSpeed = defaults.speed,\r\n\t\t\t\tdefaultEasing = defaults.easing,\r\n\t\t\t\tdefaultDuration = defaults.duration;\r\n\t\t\tlet activeCall: AnimationCall,\r\n\t\t\t\tnextCall: AnimationCall,\r\n\t\t\t\tlastProgress: AnimationCall,\r\n\t\t\t\tlastComplete: AnimationCall;\r\n\r\n\t\t\tfirstProgress = null;\r\n\t\t\tfirstComplete = null;\r\n\t\t\tif (deltaTime >= defaults.minFrameTime || !lastTick) {\r\n\t\t\t\tlastTick = timeCurrent;\r\n\r\n\t\t\t\t/********************\r\n\t\t\t\t Call Iteration\r\n\t\t\t\t ********************/\r\n\r\n\t\t\t\t// Expand any tweens that might need it.\r\n\t\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t\t}\r\n\t\t\t\t// Iterate through each active call.\r\n\t\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = activeCall._next) {\r\n\t\t\t\t\tconst element = activeCall.element;\r\n\t\t\t\t\tlet data: ElementData;\r\n\r\n\t\t\t\t\t// Check to see if this element has been deleted midway\r\n\t\t\t\t\t// through the animation. If it's gone then end this\r\n\t\t\t\t\t// animation.\r\n\t\t\t\t\tif (!element.parentNode || !(data = Data(element))) {\r\n\t\t\t\t\t\t// TODO: Remove safely - decrease count, delete data, remove from arrays\r\n\t\t\t\t\t\tfreeAnimationCall(activeCall);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Don't bother getting until we can use these.\r\n\t\t\t\t\tconst options = activeCall.options,\r\n\t\t\t\t\t\tflags = activeCall._flags;\r\n\t\t\t\t\tlet timeStart = activeCall.timeStart;\r\n\r\n\t\t\t\t\t// If this is the first time that this call has been\r\n\t\t\t\t\t// processed by tick() then we assign timeStart now so that\r\n\t\t\t\t\t// it's value is as close to the real animation start time\r\n\t\t\t\t\t// as possible.\r\n\t\t\t\t\tif (!timeStart) {\r\n\t\t\t\t\t\tconst queue = activeCall.queue != null ? activeCall.queue : options.queue;\r\n\r\n\t\t\t\t\t\ttimeStart = timeCurrent - deltaTime;\r\n\t\t\t\t\t\tif (queue !== false) {\r\n\t\t\t\t\t\t\ttimeStart = Math.max(timeStart, data.lastFinishList[queue] || 0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactiveCall.timeStart = timeStart;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If this animation is paused then skip processing unless\r\n\t\t\t\t\t// it has been set to resume.\r\n\t\t\t\t\tif (flags & AnimationFlags.PAUSED) {\r\n\t\t\t\t\t\t// Update the time start to accomodate the paused\r\n\t\t\t\t\t\t// completion amount.\r\n\t\t\t\t\t\tactiveCall.timeStart += deltaTime;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Check if this animation is ready - if it's synced then it\r\n\t\t\t\t\t// needs to wait for all other animations in the sync\r\n\t\t\t\t\tif (!(flags & AnimationFlags.READY)) {\r\n\t\t\t\t\t\tactiveCall._flags |= AnimationFlags.READY;\r\n\t\t\t\t\t\toptions._ready++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Need to split the loop, as ready sync animations must all get\r\n\t\t\t\t// the same start time.\r\n\t\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = nextCall) {\r\n\t\t\t\t\tconst flags = activeCall._flags;\r\n\r\n\t\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\t\tif (!(flags & AnimationFlags.READY) || (flags & AnimationFlags.PAUSED)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst options = activeCall.options;\r\n\r\n\t\t\t\t\tif ((flags & AnimationFlags.SYNC) && options._ready < options._total) {\r\n\t\t\t\t\t\tactiveCall.timeStart += deltaTime;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst speed = activeCall.speed != null ? activeCall.speed : options.speed != null ? options.speed : defaultSpeed;\r\n\t\t\t\t\tlet timeStart = activeCall.timeStart;\r\n\r\n\t\t\t\t\t// Don't bother getting until we can use these.\r\n\t\t\t\t\tif (!(flags & AnimationFlags.STARTED)) {\r\n\t\t\t\t\t\tconst delay = activeCall.delay != null ? activeCall.delay : options.delay;\r\n\r\n\t\t\t\t\t\t// Make sure anything we've delayed doesn't start\r\n\t\t\t\t\t\t// animating yet, there might still be an active delay\r\n\t\t\t\t\t\t// after something has been un-paused\r\n\t\t\t\t\t\tif (delay) {\r\n\t\t\t\t\t\t\tif (timeStart + (delay / speed) > timeCurrent) {\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tactiveCall.timeStart = timeStart += delay / (delay > 0 ? speed : 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactiveCall._flags |= AnimationFlags.STARTED;\r\n\t\t\t\t\t\t// The begin callback is fired once per call, not once\r\n\t\t\t\t\t\t// per element, and is passed the full raw DOM element\r\n\t\t\t\t\t\t// set as both its context and its first argument.\r\n\t\t\t\t\t\tif (options._started++ === 0) {\r\n\t\t\t\t\t\t\toptions._first = activeCall;\r\n\t\t\t\t\t\t\tif (options.begin) {\r\n\t\t\t\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\t\t\t\t\t\tcallBegin(activeCall);\r\n\t\t\t\t\t\t\t\t// Only called once, even if reversed or repeated\r\n\t\t\t\t\t\t\t\toptions.begin = undefined;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (speed !== 1) {\r\n\t\t\t\t\t\t// On the first frame we may have a shorter delta\r\n\t\t\t\t\t\tconst delta = Math.min(deltaTime, timeCurrent - timeStart);\r\n\t\t\t\t\t\tactiveCall.timeStart = timeStart += delta * (1 - speed);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options._first === activeCall && options.progress) {\r\n\t\t\t\t\t\tactiveCall._nextProgress = undefined;\r\n\t\t\t\t\t\tif (lastProgress) {\r\n\t\t\t\t\t\t\tlastProgress._nextProgress = lastProgress = activeCall;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfirstProgress = lastProgress = activeCall;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tconst activeEasing = activeCall.easing != null ? activeCall.easing : options.easing != null ? options.easing : defaultEasing,\r\n\t\t\t\t\t\tmillisecondsEllapsed = activeCall.ellapsedTime = timeCurrent - timeStart,\r\n\t\t\t\t\t\tduration = activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaultDuration,\r\n\t\t\t\t\t\tpercentComplete = activeCall.percentComplete = mock ? 1 : Math.min(millisecondsEllapsed / duration, 1),\r\n\t\t\t\t\t\ttweens = activeCall.tweens,\r\n\t\t\t\t\t\treverse = flags & AnimationFlags.REVERSE;\r\n\r\n\t\t\t\t\tif (percentComplete === 1) {\r\n\t\t\t\t\t\tactiveCall._nextComplete = undefined;\r\n\t\t\t\t\t\tif (lastComplete) {\r\n\t\t\t\t\t\t\tlastComplete._nextComplete = lastComplete = activeCall;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfirstComplete = lastComplete = activeCall;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (const property in tweens) {\r\n\t\t\t\t\t\t// For every element, iterate through each property.\r\n\t\t\t\t\t\tconst tween = tweens[property],\r\n\t\t\t\t\t\t\teasing = tween.easing || activeEasing,\r\n\t\t\t\t\t\t\tpattern = tween.pattern;\r\n\t\t\t\t\t\tlet currentValue = \"\",\r\n\t\t\t\t\t\t\ti = 0;\r\n\r\n\t\t\t\t\t\tif (pattern) {\r\n\t\t\t\t\t\t\tfor (; i < pattern.length; i++) {\r\n\t\t\t\t\t\t\t\tconst startValue = tween.start[i];\r\n\r\n\t\t\t\t\t\t\t\tif (startValue == null) {\r\n\t\t\t\t\t\t\t\t\tcurrentValue += pattern[i];\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// All easings must deal with numbers except for\r\n\t\t\t\t\t\t\t\t\t// our internal ones\r\n\t\t\t\t\t\t\t\t\tconst result = easing(reverse ? 1 - percentComplete : percentComplete, startValue as number, tween.end[i] as number, property)\r\n\r\n\t\t\t\t\t\t\t\t\tcurrentValue += pattern[i] === true ? Math.round(result) : result;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (property !== \"tween\") {\r\n\t\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\r\n\t\t\t\t\t\t\t\tCSS.setPropertyValue(activeCall.element, property, currentValue, tween.fn);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// Skip the fake 'tween' property as that is only\r\n\t\t\t\t\t\t\t\t// passed into the progress callback.\r\n\t\t\t\t\t\t\t\tactiveCall.tween = currentValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.warn(\"VelocityJS: Missing pattern:\", property, JSON.stringify(tween[property]))\r\n\t\t\t\t\t\t\tdelete tweens[property];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (firstProgress || firstComplete) {\r\n\t\t\t\t\tsetTimeout(asyncCallbacks, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (State.first) {\r\n\t\t\tState.isTicking = true;\r\n\t\t\tticker(tick);\r\n\t\t} else {\r\n\t\t\tState.isTicking = false;\r\n\t\t\tlastTick = 0;\r\n\t\t}\r\n\t\tticking = false;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Use rAF high resolution timestamp when available.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport let timestamp: boolean = true;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Tweens\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\tconst rxHex = /^#([A-f\\d]{3}){1,2}$/i;\r\n\tlet commands = new Map string>();\r\n\r\n\tcommands.set(\"function\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn (value as any as VelocityPropertyValueFn).call(element, elementArrayIndex, elements.length);\r\n\t})\r\n\tcommands.set(\"number\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn value + (element instanceof HTMLElement ? getUnitType(propertyName) : \"\");\r\n\t});\r\n\tcommands.set(\"string\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn CSS.fixColors(value);\r\n\t});\r\n\tcommands.set(\"undefined\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn CSS.fixColors(CSS.getPropertyValue(element, propertyName, tween.fn) || \"\");\r\n\t});\r\n\r\n\t/**\r\n\t * Properties that take no default numeric suffix.\r\n\t */\r\n\tconst unitless = [\r\n\t\t\"borderImageSlice\",\r\n\t\t\"columnCount\",\r\n\t\t\"counterIncrement\",\r\n\t\t\"counterReset\",\r\n\t\t\"flex\",\r\n\t\t\"flexGrow\",\r\n\t\t\"flexShrink\",\r\n\t\t\"floodOpacity\",\r\n\t\t\"fontSizeAdjust\",\r\n\t\t\"fontWeight\",\r\n\t\t\"lineHeight\",\r\n\t\t\"opacity\",\r\n\t\t\"order\",\r\n\t\t\"orphans\",\r\n\t\t\"shapeImageThreshold\",\r\n\t\t\"tabSize\",\r\n\t\t\"widows\",\r\n\t\t\"zIndex\"\r\n\t];\r\n\r\n\t/**\r\n\t * Retrieve a property's default unit type. Used for assigning a unit\r\n\t * type when one is not supplied by the user. These are only valid for\r\n\t * HTMLElement style properties.\r\n\t */\r\n\tfunction getUnitType(property: string): string {\r\n\t\treturn _inArray(unitless, property) ? \"\" : \"px\";\r\n\t}\r\n\r\n\t/**\r\n\t * Expand a VelocityProperty argument into a valid sparse Tween array. This\r\n\t * pre-allocates the array as it is then the correct size and slightly\r\n\t * faster to access.\r\n\t */\r\n\texport function expandProperties(animation: AnimationCall, properties: VelocityProperties) {\r\n\t\tconst tweens = animation.tweens = Object.create(null),\r\n\t\t\telements = animation.elements,\r\n\t\t\telement = animation.element,\r\n\t\t\telementArrayIndex = elements.indexOf(element),\r\n\t\t\tdata = Data(element),\r\n\t\t\tqueue = getValue(animation.queue, animation.options.queue),\r\n\t\t\tduration = getValue(animation.options.duration, defaults.duration);\r\n\r\n\t\tfor (const property in properties) {\r\n\t\t\tconst propertyName = CSS.camelCase(property);\r\n\t\t\tlet valueData = properties[property],\r\n\t\t\t\tfn = getNormalization(element, propertyName);\r\n\r\n\t\t\tif (!fn && propertyName !== \"tween\") {\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Skipping [\" + property + \"] due to a lack of browser support.\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (valueData == null) {\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Skipping [\" + property + \"] due to no value supplied.\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tconst tween: VelocityTween = tweens[propertyName] = Object.create(null) as any;\r\n\t\t\tlet endValue: string,\r\n\t\t\t\tstartValue: string;\r\n\r\n\t\t\ttween.fn = fn;\r\n\t\t\tif (isFunction(valueData)) {\r\n\t\t\t\t// If we have a function as the main argument then resolve\r\n\t\t\t\t// it first, in case it returns an array that needs to be\r\n\t\t\t\t// split.\r\n\t\t\t\tvalueData = (valueData as VelocityPropertyFn).call(element, elementArrayIndex, elements.length, elements);\r\n\t\t\t}\r\n\t\t\tif (Array.isArray(valueData)) {\r\n\t\t\t\t// valueData is an array in the form of\r\n\t\t\t\t// [ endValue, [, easing] [, startValue] ]\r\n\t\t\t\tconst arr1 = valueData[1],\r\n\t\t\t\t\tarr2 = valueData[2];\r\n\r\n\t\t\t\tendValue = valueData[0] as any;\r\n\t\t\t\tif ((isString(arr1) && (/^[\\d-]/.test(arr1) || rxHex.test(arr1))) || isFunction(arr1) || isNumber(arr1)) {\r\n\t\t\t\t\tstartValue = arr1 as any;\r\n\t\t\t\t} else if ((isString(arr1) && Easing.Easings[arr1]) || Array.isArray(arr1)) {\r\n\t\t\t\t\ttween.easing = arr1 as any;\r\n\t\t\t\t\tstartValue = arr2 as any;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstartValue = arr1 || arr2 as any;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tendValue = valueData as any;\r\n\t\t\t}\r\n\t\t\ttween.end = commands.get(typeof endValue)(endValue, element, elements, elementArrayIndex, propertyName, tween) as any;\r\n\t\t\tif (startValue != null || (queue === false || data.queueList[queue] === undefined)) {\r\n\t\t\t\ttween.start = commands.get(typeof startValue)(startValue, element, elements, elementArrayIndex, propertyName, tween) as any;\r\n\t\t\t}\r\n\t\t\texplodeTween(propertyName, tween, duration, !!startValue);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Convert a string-based tween with start and end strings, into a pattern\r\n\t * based tween with arrays.\r\n\t */\r\n\tfunction explodeTween(propertyName: string, tween: VelocityTween, duration: number, isForcefeed?: boolean) {\r\n\t\tconst endValue: string = tween.end as any as string;\r\n\t\tlet startValue: string = tween.start as any as string;\r\n\r\n\t\tif (!isString(endValue) || !isString(startValue)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlet runAgain = false; // Can only be set once if the Start value doesn't match the End value and it's not forcefed\r\n\t\tdo {\r\n\t\t\trunAgain = false;\r\n\t\t\tconst arrayStart: (string | number)[] = tween.start = [null],\r\n\t\t\t\tarrayEnd: (string | number)[] = tween.end = [null],\r\n\t\t\t\tpattern: (string | boolean)[] = tween.pattern = [\"\"];\r\n\t\t\tlet easing = tween.easing as any,\r\n\t\t\t\tindexStart = 0, // index in startValue\r\n\t\t\t\tindexEnd = 0, // index in endValue\r\n\t\t\t\tinCalc = 0, // Keep track of being inside a \"calc()\" so we don't duplicate it\r\n\t\t\t\tinRGB = 0, // Keep track of being inside an RGB as we can't use fractional values\r\n\t\t\t\tinRGBA = 0, // Keep track of being inside an RGBA as we must pass fractional for the alpha channel\r\n\t\t\t\tisStringValue: boolean;\r\n\r\n\t\t\t// TODO: Relative Values\r\n\r\n\t\t\t/* Operator logic must be performed last since it requires unit-normalized start and end values. */\r\n\t\t\t/* Note: Relative *percent values* do not behave how most people think; while one would expect \"+=50%\"\r\n\t\t\t to increase the property 1.5x its current value, it in fact increases the percent units in absolute terms:\r\n\t\t\t 50 points is added on top of the current % value. */\r\n\t\t\t//\t\t\t\t\tswitch (operator as any as string) {\r\n\t\t\t//\t\t\t\t\t\tcase \"+\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue + endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"-\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue - endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"*\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue * endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"/\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue / endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\t\t\t\t\t}\r\n\r\n\t\t\t// TODO: Leading from a calc value\r\n\t\t\twhile (indexStart < startValue.length && indexEnd < endValue.length) {\r\n\t\t\t\tlet charStart = startValue[indexStart],\r\n\t\t\t\t\tcharEnd = endValue[indexEnd];\r\n\r\n\t\t\t\t// If they're both numbers, then parse them as a whole\r\n\t\t\t\tif (TWEEN_NUMBER_REGEX.test(charStart) && TWEEN_NUMBER_REGEX.test(charEnd)) {\r\n\t\t\t\t\tlet tempStart = charStart, // temporary character buffer\r\n\t\t\t\t\t\ttempEnd = charEnd, // temporary character buffer\r\n\t\t\t\t\t\tdotStart = \".\", // Make sure we can only ever match a single dot in a decimal\r\n\t\t\t\t\t\tdotEnd = \".\"; // Make sure we can only ever match a single dot in a decimal\r\n\r\n\t\t\t\t\twhile (++indexStart < startValue.length) {\r\n\t\t\t\t\t\tcharStart = startValue[indexStart];\r\n\t\t\t\t\t\tif (charStart === dotStart) {\r\n\t\t\t\t\t\t\tdotStart = \"..\"; // Can never match two characters\r\n\t\t\t\t\t\t} else if (!isNumberWhenParsed(charStart)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttempStart += charStart;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (++indexEnd < endValue.length) {\r\n\t\t\t\t\t\tcharEnd = endValue[indexEnd];\r\n\t\t\t\t\t\tif (charEnd === dotEnd) {\r\n\t\t\t\t\t\t\tdotEnd = \"..\"; // Can never match two characters\r\n\t\t\t\t\t\t} else if (!isNumberWhenParsed(charEnd)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttempEnd += charEnd;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet unitStart = CSS.getUnit(startValue, indexStart), // temporary unit type\r\n\t\t\t\t\t\tunitEnd = CSS.getUnit(endValue, indexEnd); // temporary unit type\r\n\r\n\t\t\t\t\tindexStart += unitStart.length;\r\n\t\t\t\t\tindexEnd += unitEnd.length;\r\n\t\t\t\t\tif (unitEnd.length === 0) {\r\n\t\t\t\t\t\t// This order as it's most common for the user supplied\r\n\t\t\t\t\t\t// value to be a number.\r\n\t\t\t\t\t\tunitEnd = unitStart;\r\n\t\t\t\t\t} else if (unitStart.length === 0) {\r\n\t\t\t\t\t\tunitStart = unitEnd;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (unitStart === unitEnd) {\r\n\t\t\t\t\t\t// Same units\r\n\t\t\t\t\t\tif (tempStart === tempEnd) {\r\n\t\t\t\t\t\t\t// Same numbers, so just copy over\r\n\t\t\t\t\t\t\tpattern[pattern.length - 1] += tempStart + unitStart;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpattern.push(inRGB ? true : false, unitStart);\r\n\t\t\t\t\t\t\tarrayStart.push(parseFloat(tempStart), null);\r\n\t\t\t\t\t\t\tarrayEnd.push(parseFloat(tempEnd), null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Different units, so put into a \"calc(from + to)\" and\r\n\t\t\t\t\t\t// animate each side to/from zero. setPropertyValue will\r\n\t\t\t\t\t\t// look out for the final \"calc(0 + \" prefix and remove\r\n\t\t\t\t\t\t// it from the value when it finds it.\r\n\t\t\t\t\t\tpattern[pattern.length - 1] += inCalc ? \"+ (\" : \"calc(\";\r\n\t\t\t\t\t\tpattern.push(false, unitStart + \" + \", false, unitEnd + \")\");\r\n\t\t\t\t\t\tarrayStart.push(parseFloat(tempStart) || 0, null, 0, null);\r\n\t\t\t\t\t\tarrayEnd.push(0, null, parseFloat(tempEnd) || 0, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (charStart === charEnd) {\r\n\t\t\t\t\tpattern[pattern.length - 1] += charStart;\r\n\t\t\t\t\tindexStart++;\r\n\t\t\t\t\tindexEnd++;\r\n\t\t\t\t\t// Keep track of being inside a calc()\r\n\t\t\t\t\tif (inCalc === 0 && charStart === \"c\"\r\n\t\t\t\t\t\t|| inCalc === 1 && charStart === \"a\"\r\n\t\t\t\t\t\t|| inCalc === 2 && charStart === \"l\"\r\n\t\t\t\t\t\t|| inCalc === 3 && charStart === \"c\"\r\n\t\t\t\t\t\t|| inCalc >= 4 && charStart === \"(\"\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tinCalc++;\r\n\t\t\t\t\t} else if ((inCalc && inCalc < 5)\r\n\t\t\t\t\t\t|| inCalc >= 4 && charStart === \")\" && --inCalc < 5) {\r\n\t\t\t\t\t\tinCalc = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Keep track of being inside an rgb() / rgba()\r\n\t\t\t\t\t// The opacity must not be rounded.\r\n\t\t\t\t\tif (inRGB === 0 && charStart === \"r\"\r\n\t\t\t\t\t\t|| inRGB === 1 && charStart === \"g\"\r\n\t\t\t\t\t\t|| inRGB === 2 && charStart === \"b\"\r\n\t\t\t\t\t\t|| inRGB === 3 && charStart === \"a\"\r\n\t\t\t\t\t\t|| inRGB >= 3 && charStart === \"(\"\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (inRGB === 3 && charStart === \"a\") {\r\n\t\t\t\t\t\t\tinRGBA = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tinRGB++;\r\n\t\t\t\t\t} else if (inRGBA && charStart === \",\") {\r\n\t\t\t\t\t\tif (++inRGBA > 3) {\r\n\t\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if ((inRGBA && inRGB < (inRGBA ? 5 : 4))\r\n\t\t\t\t\t\t|| inRGB >= (inRGBA ? 4 : 3) && charStart === \")\" && --inRGB < (inRGBA ? 5 : 4)) {\r\n\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (charStart || charEnd) {\r\n\t\t\t\t\t// Different letters, so we're going to push them into start\r\n\t\t\t\t\t// and end until the next word\r\n\t\t\t\t\tisStringValue = true;\r\n\t\t\t\t\tif (!isString(arrayStart[arrayStart.length - 1])) {\r\n\t\t\t\t\t\tif (pattern.length === 1 && !pattern[0]) {\r\n\t\t\t\t\t\t\tarrayStart[0] = arrayEnd[0] = \"\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpattern.push(\"\");\r\n\t\t\t\t\t\t\tarrayStart.push(\"\");\r\n\t\t\t\t\t\t\tarrayEnd.push(\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (indexStart < startValue.length) {\r\n\t\t\t\t\t\tcharStart = startValue[indexStart++];\r\n\t\t\t\t\t\tif (charStart === \" \" || TWEEN_NUMBER_REGEX.test(charStart)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarrayStart[arrayStart.length - 1] += charStart;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (indexEnd < endValue.length) {\r\n\t\t\t\t\t\tcharEnd = endValue[indexEnd++];\r\n\t\t\t\t\t\tif (charEnd === \" \" || TWEEN_NUMBER_REGEX.test(charEnd)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarrayEnd[arrayEnd.length - 1] += charEnd;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!isForcefeed && (indexStart === startValue.length) !== (indexEnd === endValue.length)) {\r\n\t\t\t\t\t// This little piece will take a startValue, split out the\r\n\t\t\t\t\t// various numbers in it, then copy the endValue into the\r\n\t\t\t\t\t// startValue while replacing the numbers in it to match the\r\n\t\t\t\t\t// original start numbers as a repeating sequence.\r\n\t\t\t\t\t// Finally this function will run again with the new\r\n\t\t\t\t\t// startValue and a now matching pattern.\r\n\t\t\t\t\tlet startNumbers = startValue.match(/\\d\\.?\\d*/g) || [\"0\"],\r\n\t\t\t\t\t\tcount = startNumbers.length,\r\n\t\t\t\t\t\tindex = 0;\r\n\r\n\t\t\t\t\tstartValue = endValue.replace(/\\d+\\.?\\d*/g, function() {\r\n\t\t\t\t\t\treturn startNumbers[index++ % count];\r\n\t\t\t\t\t});\r\n\t\t\t\t\trunAgain = isForcefeed = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!runAgain) {\r\n\t\t\t\t// TODO: These two would be slightly better to not add the array indices in the first place\r\n\t\t\t\tif (pattern[0] === \"\" && arrayEnd[0] == null) {\r\n\t\t\t\t\tpattern.shift();\r\n\t\t\t\t\tarrayStart.shift();\r\n\t\t\t\t\tarrayEnd.shift();\r\n\t\t\t\t}\r\n\t\t\t\tif (pattern[pattern.length] === \"\" && arrayEnd[arrayEnd.length] == null) {\r\n\t\t\t\t\tpattern.pop();\r\n\t\t\t\t\tarrayStart.pop();\r\n\t\t\t\t\tarrayEnd.pop();\r\n\t\t\t\t}\r\n\t\t\t\tif (indexStart < startValue.length || indexEnd < endValue.length) {\r\n\t\t\t\t\t// NOTE: We should never be able to reach this code unless a\r\n\t\t\t\t\t// bad forcefed value is supplied.\r\n\t\t\t\t\tconsole.error(\"Velocity: Trying to pattern match mis-matched strings \" + propertyName + \":[\\\"\" + endValue + \"\\\", \\\"\" + startValue + \"\\\"]\");\r\n\t\t\t\t}\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Velocity: Pattern found:\", pattern, \" -> \", arrayStart, arrayEnd, \"[\" + startValue + \",\" + endValue + \"]\");\r\n\t\t\t\t}\r\n\t\t\t\tif (propertyName === \"display\") {\r\n\t\t\t\t\tif (!/^(at-start|at-end|during)$/.test(easing)) {\r\n\t\t\t\t\t\teasing = endValue === \"none\" ? \"at-end\" : \"at-start\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (propertyName === \"visibility\") {\r\n\t\t\t\t\tif (!/^(at-start|at-end|during)$/.test(easing)) {\r\n\t\t\t\t\t\teasing = endValue === \"hidden\" ? \"at-end\" : \"at-start\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (isStringValue\r\n\t\t\t\t\t&& easing !== \"at-start\" && easing !== \"during\" && easing !== \"at-end\"\r\n\t\t\t\t\t&& easing !== Easing.Easings[\"at-Start\"] && easing !== Easing.Easings[\"during\"] && easing !== Easing.Easings[\"at-end\"]) {\r\n\t\t\t\t\tconsole.warn(\"Velocity: String easings must use one of 'at-start', 'during' or 'at-end': {\" + propertyName + \": [\\\"\" + endValue + \"\\\", \" + easing + \", \\\"\" + startValue + \"\\\"]}\");\r\n\t\t\t\t\teasing = \"at-start\";\r\n\t\t\t\t}\r\n\t\t\t\ttween.easing = validateEasing(easing, duration);\r\n\t\t\t}\r\n\t\t\t// This can only run a second time once - if going from automatic startValue to \"fixed\" pattern from endValue with startValue numbers\r\n\t\t} while (runAgain);\r\n\t}\r\n\r\n\t/**\r\n\t * Expand all queued animations that haven't gone yet\r\n\t *\r\n\t * This will automatically expand the properties map for any recently added\r\n\t * animations so that the start and end values are correct.\r\n\t */\r\n\texport function validateTweens(activeCall: AnimationCall) {\r\n\t\t// This might be called on an already-ready animation\r\n\t\tif (State.firstNew === activeCall) {\r\n\t\t\tState.firstNew = activeCall._next;\r\n\t\t}\r\n\t\t// Check if we're actually already ready\r\n\t\tif (activeCall._flags & AnimationFlags.EXPANDED) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet element = activeCall.element,\r\n\t\t\ttweens = activeCall.tweens,\r\n\t\t\tduration = getValue(activeCall.options.duration, defaults.duration);\r\n\r\n\t\tfor (const propertyName in tweens) {\r\n\t\t\tconst tween = tweens[propertyName];\r\n\r\n\t\t\tif (tween.start == null) {\r\n\t\t\t\t// Get the start value as it's not been passed in\r\n\t\t\t\tconst startValue = CSS.getPropertyValue(activeCall.element, propertyName);\r\n\r\n\t\t\t\tif (isString(startValue)) {\r\n\t\t\t\t\ttween.start = CSS.fixColors(startValue) as any;\r\n\t\t\t\t\texplodeTween(propertyName, tween, duration);\r\n\t\t\t\t} else if (!Array.isArray(startValue)) {\r\n\t\t\t\t\tconsole.warn(\"bad type\", tween, propertyName, startValue)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (debug) {\r\n\t\t\t\tconsole.log(\"tweensContainer (\" + propertyName + \"): \" + JSON.stringify(tween), element);\r\n\t\t\t}\r\n\t\t}\r\n\t\tactiveCall._flags |= AnimationFlags.EXPANDED;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Validation functions used for various types of data that can be supplied.\r\n * All errors are reported in the non-minified version for development. If a\r\n * validation fails then it should return undefined.\r\n */\r\n\r\n/**\r\n * Parse a duration value and return an ms number. Optionally return a\r\n * default value if the number is not valid.\r\n */\r\nfunction parseDuration(duration: \"fast\" | \"normal\" | \"slow\" | number, def?: \"fast\" | \"normal\" | \"slow\" | number): number {\r\n\tif (isNumber(duration)) {\r\n\t\treturn duration;\r\n\t}\r\n\tif (isString(duration)) {\r\n\t\treturn Duration[duration.toLowerCase()] || parseFloat(duration.replace(\"ms\", \"\").replace(\"s\", \"000\"));\r\n\t}\r\n\treturn def == null ? undefined : parseDuration(def);\r\n}\r\n\r\n/**\r\n * Validate a cache option.\r\n * @private\r\n */\r\nfunction validateCache(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'cache' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a begin option.\r\n * @private\r\n */\r\nfunction validateBegin(value: VelocityCallback): VelocityCallback {\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'begin' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a complete option.\r\n * @private\r\n */\r\nfunction validateComplete(value: VelocityCallback, noError?: true): VelocityCallback {\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'complete' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a delay option.\r\n * @private\r\n */\r\nfunction validateDelay(value: \"fast\" | \"normal\" | \"slow\" | number): number {\r\n\tconst parsed = parseDuration(value);\r\n\r\n\tif (!isNaN(parsed)) {\r\n\t\treturn parsed;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'delay' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a duration option.\r\n * @private\r\n */\r\nfunction validateDuration(value: \"fast\" | \"normal\" | \"slow\" | number, noError?: true): number {\r\n\tconst parsed = parseDuration(value);\r\n\r\n\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\treturn parsed;\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'duration' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a easing option.\r\n * @private\r\n */\r\nfunction validateEasing(value: VelocityEasingType, duration: number, noError?: true): VelocityEasingFn {\r\n\tconst Easing = VelocityStatic.Easing;\r\n\r\n\tif (isString(value)) {\r\n\t\t// Named easing\r\n\t\treturn Easing.Easings[value];\r\n\t}\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (Array.isArray(value)) {\r\n\t\tif (value.length === 1) {\r\n\t\t\t// Steps\r\n\t\t\treturn Easing.generateStep(value[0]);\r\n\t\t}\r\n\t\tif (value.length === 2) {\r\n\t\t\t// springRK4 must be passed the animation's duration.\r\n\t\t\t// Note: If the springRK4 array contains non-numbers,\r\n\t\t\t// generateSpringRK4() returns an easing function generated with\r\n\t\t\t// default tension and friction values.\r\n\t\t\treturn Easing.generateSpringRK4(value[0], value[1], duration);\r\n\t\t}\r\n\t\tif (value.length === 4) {\r\n\t\t\t// Note: If the bezier array contains non-numbers, generateBezier()\r\n\t\t\t// returns undefined.\r\n\t\t\treturn Easing.generateBezier.apply(null, value) || false;\r\n\t\t}\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'easing' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a fpsLimit option.\r\n * @private\r\n */\r\nfunction validateFpsLimit(value: number | false): number {\r\n\tif (value === false) {\r\n\t\treturn 0;\r\n\t} else {\r\n\t\tconst parsed = parseInt(value as any, 10);\r\n\r\n\t\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\t\treturn Math.min(parsed, 60);\r\n\t\t}\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'fpsLimit' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * Validate a loop option.\r\n * @private\r\n */\r\nfunction validateLoop(value: number | boolean): number | true {\r\n\tif (value === false) {\r\n\t\treturn 0;\r\n\t} else if (value === true) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\tconst parsed = parseInt(value as any, 10);\r\n\r\n\t\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\t\treturn parsed;\r\n\t\t}\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'loop' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a progress option.\r\n * @private\r\n */\r\nfunction validateProgress(value: VelocityProgress): VelocityProgress {\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'progress' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a promise option.\r\n * @private\r\n */\r\nfunction validatePromise(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promise' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a promiseRejectEmpty option.\r\n * @private\r\n */\r\nfunction validatePromiseRejectEmpty(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promiseRejectEmpty' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a queue option.\r\n * @private\r\n */\r\nfunction validateQueue(value: string | false, noError?: true): string | false {\r\n\tif (value === false || isString(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'queue' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a repeat option.\r\n * @private\r\n */\r\nfunction validateRepeat(value: number | boolean): number | true {\r\n\tif (value === false) {\r\n\t\treturn 0;\r\n\t} else if (value === true) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\tconst parsed = parseInt(value as any, 10);\r\n\r\n\t\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\t\treturn parsed;\r\n\t\t}\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'repeat' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a speed option.\r\n * @private\r\n */\r\nfunction validateSpeed(value: number): number {\r\n\tif (isNumber(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'speed' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a sync option.\r\n * @private\r\n */\r\nfunction validateSync(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'sync' to an invalid value:\", value);\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Velocity version (should grab from package.json during build).\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport let version = \"2.0.1\";\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Core \"Velocity\" function.\r\n */\r\n\r\ninterface Document {\r\n\tdocumentMode: any; // IE\r\n}\r\n\r\n/**\r\n * The main Velocity function. Acts as a gateway to everything else.\r\n */\r\nfunction VelocityFn(options: VelocityObjectArgs): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, options?: VelocityOptions): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements | void, ...__args: any[]): VelocityResult {\r\n\tconst\r\n\t\t/**\r\n\t\t * A shortcut to the default options.\r\n\t\t */\r\n\t\tdefaults = VelocityStatic.defaults,\r\n\t\t/**\r\n\t\t * Shortcut to arguments for file size.\r\n\t\t */\r\n\t\t_arguments = arguments,\r\n\t\t/**\r\n\t\t * Cache of the first argument - this is used often enough to be saved.\r\n\t\t */\r\n\t\targs0 = _arguments[0] as VelocityObjectArgs,\r\n\t\t/**\r\n\t\t * To allow for expressive CoffeeScript code, Velocity supports an\r\n\t\t * alternative syntax in which \"elements\" (or \"e\"), \"properties\" (or\r\n\t\t * \"p\"), and \"options\" (or \"o\") objects are defined on a container\r\n\t\t * object that's passed in as Velocity's sole argument.\r\n\t\t *\r\n\t\t * Note: Some browsers automatically populate arguments with a\r\n\t\t * \"properties\" object. We detect it by checking for its default\r\n\t\t * \"names\" property.\r\n\t\t */\r\n\t\t// TODO: Confirm which browsers - if <=IE8 the we can drop completely\r\n\t\tsyntacticSugar = isPlainObject(args0) && (args0.p || ((isPlainObject(args0.properties) && !(args0.properties as any).names) || isString(args0.properties)));\r\n\tlet\r\n\t\t/**\r\n\t\t * When Velocity is called via the utility function (Velocity()),\r\n\t\t * elements are explicitly passed in as the first parameter. Thus,\r\n\t\t * argument positioning varies.\r\n\t\t */\r\n\t\targumentIndex: number = 0,\r\n\t\t/**\r\n\t\t * The list of elements, extended with Promise and Velocity.\r\n\t\t */\r\n\t\telements: VelocityResult,\r\n\t\t/**\r\n\t\t * The properties being animated. This can be a string, in which case it\r\n\t\t * is either a function for these elements, or it is a \"named\" animation\r\n\t\t * sequence to use instead. Named sequences start with either \"callout.\"\r\n\t\t * or \"transition.\". When used as a callout the values will be reset\r\n\t\t * after finishing. When used as a transtition then there is no special\r\n\t\t * handling after finishing.\r\n\t\t */\r\n\t\tpropertiesMap: string | VelocityProperties,\r\n\t\t/**\r\n\t\t * Options supplied, this will be mapped and validated into\r\n\t\t * options.\r\n\t\t */\r\n\t\toptionsMap: VelocityOptions,\r\n\t\t/**\r\n\t\t * If called via a chain then this contains the last calls\r\n\t\t * animations. If this does not have a value then any access to the\r\n\t\t * element's animations needs to be to the currently-running ones.\r\n\t\t */\r\n\t\tanimations: AnimationCall[],\r\n\t\t/**\r\n\t\t * The promise that is returned.\r\n\t\t */\r\n\t\tpromise: Promise,\r\n\t\t// Used when the animation is finished\r\n\t\tresolver: (value?: VelocityResult) => void,\r\n\t\t// Used when there was an issue with one or more of the Velocity arguments\r\n\t\trejecter: (reason: any) => void;\r\n\r\n\t//console.log(\"Velocity\", _arguments)\r\n\t// First get the elements, and the animations connected to the last call if\r\n\t// this is chained.\r\n\t// TODO: Clean this up a bit\r\n\t// TODO: Throw error if the chain is called with elements as the first argument. isVelocityResult(this) && ( (isNode(arg0) || isWrapped(arg0)) && arg0 == this)\r\n\tif (isNode(this)) {\r\n\t\t// This is from a chain such as document.getElementById(\"\").velocity(...)\r\n\t\telements = [this as HTMLorSVGElement] as VelocityResult;\r\n\t} else if (isWrapped(this)) {\r\n\t\t// This might be a chain from something else, but if chained from a\r\n\t\t// previous Velocity() call then grab the animations it's related to.\r\n\t\telements = Object.assign([], this as HTMLorSVGElement[]) as VelocityResult;\r\n\t\tif (isVelocityResult(this)) {\r\n\t\t\tanimations = (this as VelocityResult).velocity.animations;\r\n\t\t}\r\n\t} else if (syntacticSugar) {\r\n\t\telements = Object.assign([], args0.elements || args0.e) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t} else if (isNode(args0)) {\r\n\t\telements = Object.assign([], [args0]) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t} else if (isWrapped(args0)) {\r\n\t\telements = Object.assign([], args0) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t}\r\n\t// Allow elements to be chained.\r\n\tif (elements) {\r\n\t\tdefineProperty(elements, \"velocity\", VelocityFn.bind(elements));\r\n\t\tif (animations) {\r\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\r\n\t\t}\r\n\t}\r\n\t// Next get the propertiesMap and options.\r\n\tif (syntacticSugar) {\r\n\t\tpropertiesMap = getValue(args0.properties, args0.p);\r\n\t} else {\r\n\t\t// TODO: Should be possible to call Velocity(\"pauseAll\") - currently not possible\r\n\t\tpropertiesMap = _arguments[argumentIndex++] as string | VelocityProperties;\r\n\t}\r\n\t// Get any options map passed in as arguments first, expand any direct\r\n\t// options if possible.\r\n\tconst isReverse = propertiesMap === \"reverse\",\r\n\t\tisAction = !isReverse && isString(propertiesMap),\r\n\t\topts = syntacticSugar ? getValue(args0.options, args0.o) : _arguments[argumentIndex];\r\n\r\n\tif (isPlainObject(opts)) {\r\n\t\toptionsMap = opts;\r\n\t}\r\n\t// Create the promise if supported and wanted.\r\n\tif (Promise && getValue(optionsMap && optionsMap.promise, defaults.promise)) {\r\n\t\tpromise = new Promise(function(_resolve, _reject) {\r\n\t\t\trejecter = _reject;\r\n\t\t\t// IMPORTANT:\r\n\t\t\t// If a resolver tries to run on a Promise then it will wait until\r\n\t\t\t// that Promise resolves - but in this case we're running on our own\r\n\t\t\t// Promise, so need to make sure it's not seen as one. Setting these\r\n\t\t\t// values to undefined for the duration of the resolve.\r\n\t\t\t// Due to being an async call, they should be back to \"normal\"\r\n\t\t\t// before the .then() function gets called.\r\n\t\t\tresolver = function(args: VelocityResult) {\r\n\t\t\t\tif (isVelocityResult(args)) {\r\n\t\t\t\t\tconst _then = args && args.then;\r\n\r\n\t\t\t\t\tif (_then) {\r\n\t\t\t\t\t\targs.then = undefined; // Preserving enumeration etc\r\n\t\t\t\t\t}\r\n\t\t\t\t\t_resolve(args);\r\n\t\t\t\t\tif (_then) {\r\n\t\t\t\t\t\targs.then = _then;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t_resolve(args);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t\tif (elements) {\r\n\t\t\tdefineProperty(elements, \"then\", promise.then.bind(promise));\r\n\t\t\tdefineProperty(elements, \"catch\", promise.catch.bind(promise));\r\n\t\t\tif ((promise as any).finally) {\r\n\t\t\t\t// Semi-standard\r\n\t\t\t\tdefineProperty(elements, \"finally\", (promise as any).finally.bind(promise));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tconst promiseRejectEmpty: boolean = getValue(optionsMap && optionsMap.promiseRejectEmpty, defaults.promiseRejectEmpty);\r\n\r\n\tif (promise) {\r\n\t\tif (!elements && !isAction) {\r\n\t\t\tif (promiseRejectEmpty) {\r\n\t\t\t\trejecter(\"Velocity: No elements supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\");\r\n\t\t\t} else {\r\n\t\t\t\tresolver();\r\n\t\t\t}\r\n\t\t} else if (!propertiesMap) {\r\n\t\t\tif (promiseRejectEmpty) {\r\n\t\t\t\trejecter(\"Velocity: No properties supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\");\r\n\t\t\t} else {\r\n\t\t\t\tresolver();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif ((!elements && !isAction) || !propertiesMap) {\r\n\t\treturn promise as any;\r\n\t}\r\n\r\n\t// NOTE: Can't use isAction here due to type inference - there are callbacks\r\n\t// between so the type isn't considered safe.\r\n\tif (isAction) {\r\n\t\tconst args: any[] = [],\r\n\t\t\tpromiseHandler: VelocityPromise = promise && {\r\n\t\t\t\t_promise: promise,\r\n\t\t\t\t_resolver: resolver,\r\n\t\t\t\t_rejecter: rejecter\r\n\t\t\t};\r\n\r\n\t\twhile (argumentIndex < _arguments.length) {\r\n\t\t\targs.push(_arguments[argumentIndex++]);\r\n\t\t}\r\n\r\n\t\t// Velocity's behavior is categorized into \"actions\". If a string is\r\n\t\t// passed in instead of a propertiesMap then that will call a function\r\n\t\t// to do something special to the animation linked.\r\n\t\t// There is one special case - \"reverse\" - which is handled differently,\r\n\t\t// by being stored on the animation and then expanded when the animation\r\n\t\t// starts.\r\n\t\tconst action = (propertiesMap as string).replace(/\\..*$/, \"\"),\r\n\t\t\tcallback = VelocityStatic.Actions[action] || VelocityStatic.Actions[\"default\"];\r\n\r\n\t\tif (callback) {\r\n\t\t\tconst result = callback(args, elements, promiseHandler, propertiesMap as string);\r\n\r\n\t\t\tif (result !== undefined) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"VelocityJS: Unknown action:\", propertiesMap);\r\n\t\t}\r\n\t} else if (isPlainObject(propertiesMap) || isReverse) {\r\n\t\t/**\r\n\t\t * The options for this set of animations.\r\n\t\t */\r\n\t\tconst options: StrictVelocityOptions = {};\r\n\t\tlet isSync = defaults.sync;\r\n\r\n\t\t// Private options first - set as non-enumerable, and starting with an\r\n\t\t// underscore so we can filter them out.\r\n\t\tif (promise) {\r\n\t\t\tdefineProperty(options, \"_promise\", promise);\r\n\t\t\tdefineProperty(options, \"_rejecter\", rejecter);\r\n\t\t\tdefineProperty(options, \"_resolver\", resolver);\r\n\t\t}\r\n\t\tdefineProperty(options, \"_ready\", 0);\r\n\t\tdefineProperty(options, \"_started\", 0);\r\n\t\tdefineProperty(options, \"_completed\", 0);\r\n\t\tdefineProperty(options, \"_total\", 0);\r\n\r\n\t\t// Now check the optionsMap\r\n\t\tif (isPlainObject(optionsMap)) {\r\n\t\t\toptions.duration = getValue(validateDuration(optionsMap.duration), defaults.duration);\r\n\t\t\toptions.delay = getValue(validateDelay(optionsMap.delay), defaults.delay);\r\n\t\t\t// Need the extra fallback here in case it supplies an invalid\r\n\t\t\t// easing that we need to overrride with the default.\r\n\t\t\toptions.easing = validateEasing(getValue(optionsMap.easing, defaults.easing), options.duration) || validateEasing(defaults.easing, options.duration);\r\n\t\t\toptions.loop = getValue(validateLoop(optionsMap.loop), defaults.loop);\r\n\t\t\toptions.repeat = options.repeatAgain = getValue(validateRepeat(optionsMap.repeat), defaults.repeat);\r\n\t\t\tif (optionsMap.speed != null) {\r\n\t\t\t\toptions.speed = getValue(validateSpeed(optionsMap.speed), 1);\r\n\t\t\t}\r\n\t\t\tif (isBoolean(optionsMap.promise)) {\r\n\t\t\t\toptions.promise = optionsMap.promise;\r\n\t\t\t}\r\n\t\t\toptions.queue = getValue(validateQueue(optionsMap.queue), defaults.queue);\r\n\t\t\tif (optionsMap.mobileHA && !VelocityStatic.State.isGingerbread) {\r\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)\r\n\t\t\t\t on animating elements. HA is removed from the element at the completion of its animation. */\r\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. */\r\n\t\t\t\t/* Note: You can read more about the use of mobileHA in Velocity's documentation: VelocityJS.org/#mobileHA. */\r\n\t\t\t\toptions.mobileHA = true;\r\n\t\t\t}\r\n\t\t\tif (!isReverse) {\r\n\t\t\t\tif (optionsMap.display != null) {\r\n\t\t\t\t\t(propertiesMap as VelocityProperties).display = optionsMap.display as string;\r\n\t\t\t\t\tconsole.error(\"Deprecated 'options.display' used, this is now a property:\", optionsMap.display);\r\n\t\t\t\t}\r\n\t\t\t\tif (optionsMap.visibility != null) {\r\n\t\t\t\t\t(propertiesMap as VelocityProperties).visibility = optionsMap.visibility as string;\r\n\t\t\t\t\tconsole.error(\"Deprecated 'options.visibility' used, this is now a property:\", optionsMap.visibility);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// TODO: Allow functional options for different options per element\r\n\t\t\tconst optionsBegin = validateBegin(optionsMap.begin),\r\n\t\t\t\toptionsComplete = validateComplete(optionsMap.complete),\r\n\t\t\t\toptionsProgress = validateProgress(optionsMap.progress),\r\n\t\t\t\toptionsSync = validateSync(optionsMap.sync);\r\n\r\n\t\t\tif (optionsBegin != null) {\r\n\t\t\t\toptions.begin = optionsBegin;\r\n\t\t\t}\r\n\t\t\tif (optionsComplete != null) {\r\n\t\t\t\toptions.complete = optionsComplete;\r\n\t\t\t}\r\n\t\t\tif (optionsProgress != null) {\r\n\t\t\t\toptions.progress = optionsProgress;\r\n\t\t\t}\r\n\t\t\tif (optionsSync != null) {\r\n\t\t\t\tisSync = optionsSync;\r\n\t\t\t}\r\n\t\t} else if (!syntacticSugar) {\r\n\t\t\t// Expand any direct options if possible.\r\n\t\t\tconst duration = validateDuration(_arguments[argumentIndex], true);\r\n\t\t\tlet offset = 0;\r\n\r\n\t\t\tif (duration !== undefined) {\r\n\t\t\t\toffset++;\r\n\t\t\t\toptions.duration = duration;\r\n\t\t\t}\r\n\t\t\tif (!isFunction(_arguments[argumentIndex + offset])) {\r\n\t\t\t\t// Despite coming before Complete, we can't pass a fn easing\r\n\t\t\t\tconst easing = validateEasing(_arguments[argumentIndex + offset], getValue(options && validateDuration(options.duration), defaults.duration) as number, true);\r\n\r\n\t\t\t\tif (easing !== undefined) {\r\n\t\t\t\t\toffset++;\r\n\t\t\t\t\toptions.easing = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconst complete = validateComplete(_arguments[argumentIndex + offset], true);\r\n\r\n\t\t\tif (complete !== undefined) {\r\n\t\t\t\toptions.complete = complete;\r\n\t\t\t}\r\n\t\t\toptions.loop = defaults.loop;\r\n\t\t\toptions.repeat = options.repeatAgain = defaults.repeat;\r\n\t\t}\r\n\r\n\t\tif (isReverse && options.queue === false) {\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot reverse a queue:false animation.\");\r\n\t\t}\r\n\r\n\t\t/* When a set of elements is targeted by a Velocity call, the set is broken up and each element has the current Velocity call individually queued onto it.\r\n\t\t In this way, each element's existing queue is respected; some elements may already be animating and accordingly should not have this current Velocity call triggered immediately. */\r\n\t\t/* In each queue, tween data is processed for each animating property then pushed onto the call-wide calls array. When the last element in the set has had its tweens processed,\r\n\t\t the call array is pushed to VelocityStatic.State.calls for live processing by the requestAnimationFrame tick. */\r\n\r\n\t\tconst rootAnimation: AnimationCall = {\r\n\t\t\t_prev: undefined,\r\n\t\t\t_next: undefined,\r\n\t\t\t_flags: isSync ? AnimationFlags.SYNC : 0,\r\n\t\t\toptions: options,\r\n\t\t\tpercentComplete: 0,\r\n\t\t\t//element: element,\r\n\t\t\telements: elements,\r\n\t\t\tellapsedTime: 0,\r\n\t\t\ttimeStart: 0\r\n\t\t};\r\n\r\n\t\tanimations = [];\r\n\t\tfor (let index = 0; index < elements.length; index++) {\r\n\t\t\tconst element = elements[index];\r\n\t\t\tlet flags = 0;\r\n\r\n\t\t\tif (isNode(element)) { // TODO: This needs to check for valid animation targets, not just Elements\r\n\t\t\t\tif (isReverse) {\r\n\t\t\t\t\tconst lastAnimation = Data(element).lastAnimationList[options.queue as string];\r\n\r\n\t\t\t\t\tpropertiesMap = lastAnimation && lastAnimation.tweens;\r\n\t\t\t\t\tif (!propertiesMap) {\r\n\t\t\t\t\t\tconsole.error(\"VelocityJS: Attempting to reverse an animation on an element with no previous animation:\", element);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tflags |= AnimationFlags.REVERSE & ~(lastAnimation._flags & AnimationFlags.REVERSE);\r\n\t\t\t\t}\r\n\t\t\t\tconst tweens = Object.create(null),\r\n\t\t\t\t\tanimation: AnimationCall = Object.assign({\r\n\t\t\t\t\t\telement: element,\r\n\t\t\t\t\t\ttweens: tweens\r\n\t\t\t\t\t}, rootAnimation);\r\n\r\n\t\t\t\toptions._total++;\r\n\t\t\t\tanimation._flags |= flags;\r\n\t\t\t\tanimations.push(animation);\r\n\t\t\t\tif (isReverse) {\r\n\t\t\t\t\t// In this case we're using the previous animation, so\r\n\t\t\t\t\t// it will be expanded correctly when that one runs.\r\n\t\t\t\t\tanimation.tweens = propertiesMap as any;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tVelocityStatic.expandProperties(animation, propertiesMap);\r\n\t\t\t\t}\r\n\t\t\t\tVelocityStatic.queue(element, animation, options.queue);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (VelocityStatic.State.isTicking === false) {\r\n\t\t\t// If the animation tick isn't running, start it. (Velocity shuts it\r\n\t\t\t// off when there are no active calls to process.)\r\n\t\t\tVelocityStatic.tick();\r\n\t\t}\r\n\t\tif (animations) {\r\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\r\n\t\t}\r\n\t}\r\n\t/***************\r\n\t Chaining\r\n\t ***************/\r\n\r\n\t/* Return the elements back to the call chain, with wrapped elements taking precedence in case Velocity was called via the $.fn. extension. */\r\n\treturn elements || promise as any;\r\n};\r\n\r\n\r\n/***************\r\n Summary\r\n ***************/\r\n\r\n/*\r\n - CSS: CSS stack that works independently from the rest of Velocity.\r\n - animate(): Core animation method that iterates over the targeted elements and queues the incoming call onto each element individually.\r\n - Pre-Queueing: Prepare the element for animation by instantiating its data cache and processing the call's options.\r\n - Queueing: The logic that runs once the call has reached its point of execution in the element's queue stack.\r\n Most logic is placed here to avoid risking it becoming stale (if the element's properties have changed).\r\n - Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container.\r\n - tick(): The single requestAnimationFrame loop responsible for tweening all in-progress calls.\r\n - completeCall(): Handles the cleanup process for each Velocity call.\r\n */\r\n\r\n/*********************\r\n Helper Functions\r\n *********************/\r\n\r\n/* IE detection. Gist: https://gist.github.com/julianshapiro/9098609 */\r\nvar IE = (function() {\r\n\tif (document.documentMode) {\r\n\t\treturn document.documentMode;\r\n\t} else {\r\n\t\tfor (let i = 7; i > 4; i--) {\r\n\t\t\tlet div = document.createElement(\"div\");\r\n\r\n\t\t\tdiv.innerHTML = \"\";\r\n\t\t\tif (div.getElementsByTagName(\"span\").length) {\r\n\t\t\t\tdiv = null;\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn undefined;\r\n})();\r\n\r\n/******************\r\n Unsupported\r\n ******************/\r\n\r\nif (IE <= 8) {\r\n\tthrow new Error(\"VelocityJS cannot run on Internet Explorer 8 or earlier\");\r\n}\r\n\r\n/******************\r\n Frameworks\r\n ******************/\r\n\r\ninterface Window {\r\n\tjQuery: {fn?: any};\r\n\tZepto: {fn?: any};\r\n\tVelocity: any;\r\n}\r\n\r\nif (window === this) {\r\n\t/*\r\n\t * Both jQuery and Zepto allow their $.fn object to be extended to allow\r\n\t * wrapped elements to be subjected to plugin calls. If either framework is\r\n\t * loaded, register a \"velocity\" extension pointing to Velocity's core\r\n\t * animate() method. Velocity also registers itself onto a global container\r\n\t * (window.jQuery || window.Zepto || window) so that certain features are\r\n\t * accessible beyond just a per-element scope. Accordingly, Velocity can\r\n\t * both act on wrapped DOM elements and stand alone for targeting raw DOM\r\n\t * elements.\r\n\t */\r\n\tconst patch = VelocityStatic.patch,\r\n\t\tjQuery = window.jQuery,\r\n\t\tZepto = window.Zepto;\r\n\r\n\tpatch(window, true);\r\n\tpatch(Element && Element.prototype);\r\n\tpatch(NodeList && NodeList.prototype);\r\n\tpatch(HTMLCollection && HTMLCollection.prototype);\r\n\r\n\tpatch(jQuery, true);\r\n\tpatch(jQuery && jQuery.fn);\r\n\r\n\tpatch(Zepto, true);\r\n\tpatch(Zepto && Zepto.fn);\r\n}\r\n\r\n/******************\r\n Known Issues\r\n ******************/\r\n\r\n/* The CSS spec mandates that the translateX/Y/Z transforms are %-relative to the element itself -- not its parent.\r\n Velocity, however, doesn't make this distinction. Thus, converting to or from the % unit with these subproperties\r\n will produce an inaccurate conversion value. The same issue exists with the cx/cy attributes of SVG circles and ellipses. */\r\n","///\r\n///\r\n///\r\n///\r\n///\r\n///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Merge the VelocityStatic namespace onto the Velocity function for external\r\n * use. This is done as a read-only way. Any attempt to change these values will\r\n * be allowed.\r\n */\r\nfor (const key in VelocityStatic) {\r\n\tlet value = VelocityStatic[key];\r\n\r\n\tif (isString(value) || isNumber(value) || isBoolean(value)) {\r\n\t\tObject.defineProperty(VelocityFn, key, {\r\n\t\t\tenumerable: PUBLIC_MEMBERS.indexOf(key) >= 0,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn VelocityStatic[key];\r\n\t\t\t},\r\n\t\t\tset: function(value?: any) {\r\n\t\t\t\tVelocityStatic[key] = value;\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tObject.defineProperty(VelocityFn, key, {\r\n\t\t\tenumerable: PUBLIC_MEMBERS.indexOf(key) >= 0,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn VelocityStatic[key];\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\n// console.log(\"Velocity keys\", Object.keys(VelocityStatic));\r\n"]} \ No newline at end of file +{"version":3,"sources":["../src/constants.ts","../src/types.ts","../src/utility.ts","../src/Velocity/actions/actions.ts","../src/Velocity/actions/defaultAction.ts","../src/Velocity/actions/finish.ts","../src/Velocity/actions/option.ts","../src/Velocity/actions/pauseResume.ts","../src/Velocity/actions/reverse.ts","../src/Velocity/actions/stop.ts","../src/Velocity/actions/style.ts","../src/Velocity/actions/tween.ts","../src/Velocity/state.ts","../src/Velocity/css/camelCase.ts","../src/Velocity/css/fixColors.ts","../src/Velocity/css/colors.ts","../src/Velocity/css/getPropertyValue.ts","../src/Velocity/css/getUnit.ts","../src/Velocity/css/setPropertyValue.ts","../src/Velocity/easing/easings.ts","../src/Velocity/easing/back.ts","../src/Velocity/easing/bezier.ts","../src/Velocity/easing/bounce.ts","../src/Velocity/easing/elastic.ts","../src/Velocity/easing/spring_rk4.ts","../src/Velocity/easing/step.ts","../src/Velocity/easing/string.ts","../src/Velocity/normalizations/normalizations.ts","../src/Velocity/normalizations/svg/attributes.ts","../src/Velocity/normalizations/svg/dimensions.ts","../src/Velocity/normalizations/dimensions.ts","../src/Velocity/normalizations/display.ts","../src/Velocity/normalizations/scroll.ts","../src/Velocity/normalizations/style.ts","../src/Velocity/normalizations/tween.ts","../src/Velocity/complete.ts","../src/Velocity/data.ts","../src/Velocity/debug.ts","../src/Velocity/defaults.ts","../src/Velocity/mock.ts","../src/Velocity/patch.ts","../src/Velocity/queue.ts","../src/Velocity/redirects.ts","../src/Velocity/registereffect.ts","../src/Velocity/runsequence.ts","../src/Velocity/tick.ts","../src/Velocity/timestamp.ts","../src/Velocity/tweens.ts","../src/Velocity/validate.ts","../src/Velocity/version.ts","../src/core.ts","../src/app.ts"],"names":["PUBLIC_MEMBERS","ALL_VENDOR_PREFIXES","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","TWEEN_NUMBER_REGEX","CLASSNAME","Duration","fast","normal","slow","isBoolean","variable","isNumber","isNumberWhenParsed","isNaN","Number","isString","isFunction","Object","prototype","toString","call","isNode","nodeType","isVelocityResult","length","velocity","propertyIsEnumerable","object","property","isWrapped","window","isSVG","SVGElement","isPlainObject","proto","getPrototypeOf","hasOwnProperty","constructor","isEmptyObject","name_1","createEmptyObject","create","defineProperty","name","value","configurable","writable","_now","Date","now","getTime","_inArray","array","i","sanitizeElements","elements","getValue","args","_args","arguments","_arg","undefined","addClass","element","className","Element","classList","add","removeClass","remove","replace","RegExp","VelocityStatic","Actions","registerAction","internal","callback","console","warn","defaultAction","promiseHandler","action","Redirects","options","opts_1","__assign","durationOriginal_1","parseFloat","duration","delayOriginal_1","delay","backwards","reverse","forEach","elementIndex","stagger","drag","test","Math","max","_resolver","abortError","_rejecter","Error","log","checkAnimationShouldBeFinished","animation","queueName","defaultQueue","validateTweens","queue","_flags","_started","_first","begin","callBegin","tweens","tween_1","pattern","currentValue","endValue","end","CSS","setPropertyValue","fn","completeCall","finish","validateQueue","defaults","finishAll","animations","activeCall","State","first","nextCall","firstNew","_next","then","animationFlags","isExpanded","isReady","isStarted","isStopped","isPaused","isSync","isReverse","option","key","indexOf","push","result","flag","isPercentComplete","validateCache","validateBegin","validateComplete","validateDelay","validateDuration","validateFpsLimit","validateLoop","validateRepeat","num","timeStart","lastTick","checkAnimation","pauseResume","SyntaxError","checkAnimationShouldBeStopped","stop","style","styleAction","fixColors","getPropertyValue","error","propertyName","value_1","String","tween","percentComplete","properties","easing","tweenAction","requireForcefeeding","info","document","body","fakeAnimation","singleResult","count","_a","Array","isArray","activeEasing","validateEasing","expandProperties","tween_2","easing_1","startValue","start","result_1","round","isClient","isMobile","navigator","userAgent","isAndroid","isGingerbread","isChrome","chrome","isFirefox","prefixElement","createElement","windowScrollAnchor","pageYOffset","scrollAnchor","documentElement","parentNode","scrollPropertyLeft","scrollPropertyTop","isTicking","cache","camelCase","fixed","$","letter","toUpperCase","ColorNames","makeRGBA","ignore","r","g","b","parseInt","rxColor6","rxColor3","rxColorName","rxRGB","rxSpaces","str","$0","$1","$2","colorValues","aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgrey","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgrey","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen","name_2","color","floor","computePropertyValue","data","Data","computedStyle","getComputedStyle","computedValue","toggleDisplay","augmentDimension","topLeft","position","getBoundingClientRect","skipCache","propertyValue","NoCacheNormalizations","has","getNormalization","debug","Units","getUnit","units","unit","j","Easing","Easings","registerEasing","cos","PI","exp","registerBackIn","amount","pow","registerBackOut","registerBackInOut","fixRange","min","A","aA1","aA2","B","C","calcBezier","aT","getSlope","generateBezier","mX1","mY1","mX2","mY2","NEWTON_ITERATIONS","NEWTON_MIN_SLOPE","SUBDIVISION_PRECISION","SUBDIVISION_MAX_ITERATIONS","kSplineTableSize","kSampleStepSize","float32ArraySupported","isFinite","mSampleValues","Float32Array","newtonRaphsonIterate","aX","aGuessT","currentSlope","currentX","calcSampleValues","binarySubdivide","aA","aB","currentT","abs","getTForX","intervalStart","currentSample","lastSample","dist","guessForT","initialSlope","_precomputed","precompute","f","getControlPoints","x","y","easeIn","easeOut","easeInOut","easeOutBounce","easeInBounce","pi2","registerElasticIn","amplitude","period","sin","asin","registerElasticOut","registerElasticInOut","s","springAccelerationForState","state","tension","friction","v","springEvaluateStateWithDerivative","initialState","dt","derivative","dx","dv","springIntegrateState","a","c","d","dxdt","dvdt","generateSpringRK4","initState","path","time_lapsed","tolerance","DT","have_duration","last_state","generateStep","steps","MaxType","Normalizations","NormalizationUnits","Set","constructors","registerNormalization","index","nextArg","hasNormalization","getNormalizationUnit","types","getAttribute","setAttribute","base","rxSubtype","rxElement","getOwnPropertyNames","globals","subtype","exec","createElementNS","toLowerCase","attribute","e","getDimension","getBBox","wantInner","isBorderBox","sides","fields","augment","inlineRx","listItemRx","tableRowRx","tableRx","tableRowGroupRx","display","nodeName","clientWidth","scrollWidth","clientHeight","scrollHeight","scroll","direction","client","scroll_1","HTMLElement","rxAddPx","getSetPrefixed","unprefixed","getSetStyle","rxVendors","addUnit","getSetTween","callComplete","complete","setTimeout","isLoop","loop","isRepeat","repeat","repeatAgain","lastFinishList","ellapsedTime","_completed","_total","resolver","dequeue","freeAnimationCall","newData","queueList","lastAnimationList","_cache","_begin","_complete","_delay","_duration","_easing","_fpsLimit","_loop","_minFrameTime","_promise","_promiseRejectEmpty","_queue","_repeat","_speed","_sync","mobileHA","defineProperties","reset","enumerable","get","set","fpsLimit","minFrameTime","promise","validatePromise","promiseRejectEmpty","validatePromiseRejectEmpty","speed","validateSpeed","sync","validateSync","mock","patch","global","VelocityFn","animate","prev","last","_prev","skip","next","elementsIndex","elementsSize","opts","inlineValues","computedValues","height","marginTop","marginBottom","paddingTop","paddingBottom","isInline","overflow","promiseData","propertiesMap","opacity","this","animateParentHeight","totalDuration","totalHeightDelta","propertiesToSum","RegisterEffect","effectName","redirectOptions","finalElement","defaultDuration","callIndex","calls","durationPercentage","shareDuration","propertyMap","redirectDuration","callOptions","match","visibility","injectFinalCallbacks_1","resetProperty","resetValue","resetOptions","_deepCopyObject","target","sources","_i","TypeError","to","source","shift","RunSequence","originalSequence","sequence","currentCall","currentCallOptions","o","nextCallOptions","timing","sequenceQueue","callbackOriginal_1","nextCallElements","callProgress","timeCurrent","tweenValue","progress","firstProgress","firstComplete","asyncCallbacks","_nextProgress","_nextComplete","FRAME_TIME","performance","perf","nowOffset_1","navigationStart","rAFProxy","rAFShim","requestAnimationFrame","ticker","hidden","addEventListener","updateTicker","event","tick","ticking","timestamp","deltaTime","defaultSpeed","defaultEasing","lastProgress","lastComplete","flags","queue_1","_ready","delta","millisecondsEllapsed","tween_3","JSON","stringify","rxHex","commands","Map","elementArrayIndex","valueData","tween_4","arr1","arr2","explodeTween","isForcefeed","runAgain","arrayStart","arrayEnd","indexStart","indexEnd","inCalc","inRGB","inRGBA","isStringValue","charStart","charEnd","tempStart","tempEnd","dotStart","dotEnd","unitStart","unitEnd","startNumbers_1","count_1","index_1","pop","tween_5","parseDuration","def","noError","parsed","apply","validateProgress","version","__args","_arguments","args0","syntacticSugar","p","names","argumentIndex","optionsMap","rejecter","assign","bind","isAction","Promise","_resolve","_reject","_then","catch","finally","optionsBegin","optionsComplete","optionsProgress","optionsSync","offset","rootAnimation","lastAnimation","IE","documentMode","div","innerHTML","getElementsByTagName","jQuery","Zepto","NodeList","HTMLCollection"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;0RAUA;IAAMA,mBAAkB,WAAW,kBAAkB,SAAS,SAAS;;;;;GAKvE,KAAMC,sBAAsB;;AAE5B,IAAMC,gBAAgB;;AACtB,IAAMC,kBAAkB;;AACxB,IAAMC,gBAAgB;;AAEtB,IAAMC,sBAAsB;;AAE5B,IAAMC,gBAAgB;;AACtB,IAAMC,gBAAgB;;AACtB,IAAMC,mBAAmBL;;AACzB,IAAMM,iBAAiB;;AACvB,IAAMC,mBAAmB;;AACzB,IAAMC,eAAe;;AACrB,IAAMC,kBAAkB;;AACxB,IAAMC,+BAA+B;;AACrC,IAAMC,gBAAgB;;AACtB,IAAMC,iBAAiB;;AACvB,IAAMC,gBAAgB;;AACtB,IAAMC,eAAe;;AACrB,IAAMC,qBAAqB;;AAE3B,IAAMC,YAAY;;AAElB,IAAMC;IACLC,MAAQnB;IACRoB,QAAUnB;IACVoB,MAAQnB;;;;;;;;;GClCT,UAAAoB,UAAmBC;IAClB,OAAOA,aAAa,QAAQA,aAAa;;;AAG1C,SAAAC,SAAkBD;IACjB,cAAcA,aAAa;;;;;;;GAQ5B,UAAAE,mBAA4BF;IAC3B,QAAQG,MAAMC,OAAOJ;;;AAGtB,SAAAK,SAAkBL;IACjB,cAAcA,aAAa;;;AAG5B,SAAAM,WAAoBN;IACnB,OAAOO,OAAOC,UAAUC,SAASC,KAAKV,cAAc;;;AAGrD,SAAAW,OAAgBX;IACf,UAAUA,YAAYA,SAASY;;;AAGhC,SAAAC,iBAA0Bb;IACzB,OAAOA,YAAYC,SAASD,SAASc,WAA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c,KAAK;gBACJ,OAAOxhB,eAAe2E;;;;;;;;;;;;;;;;;;;;GAjB1B,MAAK,IAAMA,OAAO3E,gBAAe;YAAtB2E","file":"velocity.js","sourceRoot":"src/","sourcesContent":["/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Constants and defaults. These values should never change without a MINOR\r\n * version bump.\r\n */\r\n\r\n//[\"completeCall\", \"CSS\", \"State\", \"getEasing\", \"Easings\", \"data\", \"debug\", \"defaults\", \"hook\", \"init\", \"mock\", \"pauseAll\", \"queue\", \"dequeue\", \"freeAnimationCall\", \"Redirects\", \"RegisterEffect\", \"resumeAll\", \"RunSequence\", \"lastTick\", \"tick\", \"timestamp\", \"expandTween\", \"version\"]\r\nconst PUBLIC_MEMBERS = [\"version\", \"RegisterEffect\", \"style\", \"patch\", \"timestamp\"];\r\n/**\r\n * Without this it will only un-prefix properties that have a valid \"normal\"\r\n * version.\r\n */\r\nconst ALL_VENDOR_PREFIXES = true;\r\n\r\nconst DURATION_FAST = 200;\r\nconst DURATION_NORMAL = 400;\r\nconst DURATION_SLOW = 600;\r\n\r\nconst FUZZY_MS_PER_SECOND = 980;\r\n\r\nconst DEFAULT_CACHE = true;\r\nconst DEFAULT_DELAY = 0;\r\nconst DEFAULT_DURATION = DURATION_NORMAL;\r\nconst DEFAULT_EASING = \"swing\";\r\nconst DEFAULT_FPSLIMIT = 60;\r\nconst DEFAULT_LOOP = 0;\r\nconst DEFAULT_PROMISE = true;\r\nconst DEFAULT_PROMISE_REJECT_EMPTY = true;\r\nconst DEFAULT_QUEUE = \"\";\r\nconst DEFAULT_REPEAT = 0;\r\nconst DEFAULT_SPEED = 1;\r\nconst DEFAULT_SYNC = true;\r\nconst TWEEN_NUMBER_REGEX = /[\\d\\.-]/;\r\n\r\nconst CLASSNAME = \"velocity-animating\";\r\n\r\nconst Duration = {\r\n\t\"fast\": DURATION_FAST,\r\n\t\"normal\": DURATION_NORMAL,\r\n\t\"slow\": DURATION_SLOW,\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Runtime type checking methods.\r\n */\r\n\r\nfunction isBoolean(variable): variable is boolean {\r\n\treturn variable === true || variable === false;\r\n}\r\n\r\nfunction isNumber(variable): variable is number {\r\n\treturn typeof variable === \"number\";\r\n}\r\n\r\n/**\r\n * Faster way to parse a string/number as a number https://jsperf.com/number-vs-parseint-vs-plus/3\r\n * @param variable The given string or number\r\n * @returns {variable is number} Returns boolean true if it is a number, false otherwise\r\n */\r\nfunction isNumberWhenParsed(variable: string | number): variable is number {\r\n\treturn !isNaN(Number(variable));\r\n}\r\n\r\nfunction isString(variable): variable is string {\r\n\treturn typeof variable === \"string\";\r\n}\r\n\r\nfunction isFunction(variable): variable is Function {\r\n\treturn Object.prototype.toString.call(variable) === \"[object Function]\";\r\n}\r\n\r\nfunction isNode(variable): variable is HTMLorSVGElement {\r\n\treturn !!(variable && variable.nodeType);\r\n}\r\n\r\nfunction isVelocityResult(variable): variable is VelocityResult {\r\n\treturn variable && isNumber(variable.length) && isFunction((variable as VelocityResult).velocity);\r\n}\r\n\r\nfunction propertyIsEnumerable(object: Object, property: string): boolean {\r\n\treturn Object.prototype.propertyIsEnumerable.call(object, property);\r\n}\r\n\r\n/* Determine if variable is an array-like wrapped jQuery, Zepto or similar element, or even a NodeList etc. */\r\n\r\n/* NOTE: HTMLFormElements also have a length. */\r\nfunction isWrapped(variable): variable is HTMLorSVGElement[] {\r\n\treturn variable\r\n\t\t&& variable !== window\r\n\t\t&& isNumber(variable.length)\r\n\t\t&& !isString(variable)\r\n\t\t&& !isFunction(variable)\r\n\t\t&& !isNode(variable)\r\n\t\t&& (variable.length === 0 || isNode(variable[0]));\r\n}\r\n\r\nfunction isSVG(variable): variable is SVGElement {\r\n\treturn SVGElement && variable instanceof SVGElement;\r\n}\r\n\r\nfunction isPlainObject(variable): variable is {} {\r\n\tif (!variable || typeof variable !== \"object\" || variable.nodeType || Object.prototype.toString.call(variable) !== \"[object Object]\") {\r\n\t\treturn false;\r\n\t}\r\n\tlet proto = Object.getPrototypeOf(variable) as Object;\r\n\r\n\treturn !proto || (proto.hasOwnProperty(\"constructor\") && proto.constructor === Object);\r\n}\r\n\r\nfunction isEmptyObject(variable): variable is {} {\r\n\tfor (let name in variable) {\r\n\t\tif (variable.hasOwnProperty(name)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn true;\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\n/**\r\n * Creates an empty object without any prototype chain.\r\n */\r\nfunction createEmptyObject() {\r\n\treturn Object.create(null);\r\n}\r\n\r\n/**\r\n * The defineProperty() function provides a\r\n * shortcut to defining a property that cannot be accidentally iterated across.\r\n */\r\nfunction defineProperty(proto: any, name: string, value: Function | any) {\r\n\tif (proto) {\r\n\t\tObject.defineProperty(proto, name, {\r\n\t\t\tconfigurable: true,\r\n\t\t\twritable: true,\r\n\t\t\tvalue: value\r\n\t\t});\r\n\t}\r\n}\r\n\r\n/**\r\n * Shim to get the current milliseconds - on anything except old IE it'll use\r\n * Date.now() and save creating an object. If that doesn't exist then it'll\r\n * create one that gets GC.\r\n */\r\nconst _now = Date.now ? Date.now : function() {\r\n\treturn (new Date()).getTime();\r\n};\r\n\r\n/**\r\n * Check whether a value belongs to an array\r\n * https://jsperf.com/includes-vs-indexof-vs-while-loop/6\r\n * @param array The given array\r\n * @param value The given element to check if it is part of the array\r\n * @returns {boolean} True if it exists, false otherwise\r\n */\r\nfunction _inArray(array: T[], value: T): boolean {\r\n\tlet i = 0;\r\n\r\n\twhile (i < array.length) {\r\n\t\tif (array[i++] === value) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\treturn false;\r\n}\r\n\r\n/**\r\n * Convert an element or array-like element list into an array if needed.\r\n */\r\nfunction sanitizeElements(elements: HTMLorSVGElement | HTMLorSVGElement[]): HTMLorSVGElement[] {\r\n\tif (isNode(elements)) {\r\n\t\treturn [elements];\r\n\t}\r\n\treturn elements as HTMLorSVGElement[];\r\n}\r\n\r\n/**\r\n * When there are multiple locations for a value pass them all in, then get the\r\n * first value that is valid.\r\n */\r\nfunction getValue(...args: T[]): T;\r\nfunction getValue(args: any): T {\r\n\tfor (let i = 0, _args = arguments; i < _args.length; i++) {\r\n\t\tconst _arg = _args[i];\r\n\r\n\t\tif (_arg !== undefined && _arg === _arg) {\r\n\t\t\treturn _arg;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Add a single className to an Element.\r\n */\r\nfunction addClass(element: HTMLorSVGElement, className: string): void {\r\n\tif (element instanceof Element) {\r\n\t\tif (element.classList) {\r\n\t\t\telement.classList.add(className);\r\n\t\t} else {\r\n\t\t\tremoveClass(element, className);\r\n\t\t\telement.className += (element.className.length ? \" \" : \"\") + className;\r\n\t\t}\r\n\t}\r\n}\r\n\r\n/**\r\n * Remove a single className from an Element.\r\n */\r\nfunction removeClass(element: HTMLorSVGElement, className: string): void {\r\n\tif (element instanceof Element) {\r\n\t\tif (element.classList) {\r\n\t\t\telement.classList.remove(className);\r\n\t\t} else {\r\n\t\t\t// TODO: Need some jsperf tests on performance - can we get rid of the regex and maybe use split / array manipulation?\r\n\t\t\telement.className = element.className.toString().replace(new RegExp(\"(^|\\\\s)\" + className + \"(\\\\s|$)\", \"gi\"), \" \");\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Actions that can be performed by passing a string instead of a propertiesMap.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Actions cannot be replaced if they are internal (hasOwnProperty is false\r\n\t * but they still exist). Otherwise they can be replaced by users.\r\n\t * \r\n\t * All external method calls should be using actions rather than sub-calls\r\n\t * of Velocity itself.\r\n\t */\r\n\texport const Actions: {[name: string]: VelocityActionFn} = createEmptyObject();\r\n\r\n\t/**\r\n\t * Used to register an action. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerAction\", \"name\", VelocityActionFn);\r\n\t * \r\n\t * @private\r\n\t */\r\n\texport function registerAction(args?: [string, VelocityActionFn], internal?: boolean) {\r\n\t\tconst name: string = args[0],\r\n\t\t\tcallback = args[1];\r\n\r\n\t\tif (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerAction' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerAction' callback to an invalid value:\", name, callback);\r\n\t\t} else if (Actions[name] && !propertyIsEnumerable(Actions, name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to override internal 'registerAction' callback\", name);\r\n\t\t} else if (internal === true) {\r\n\t\t\tdefineProperty(Actions, name, callback);\r\n\t\t} else {\r\n\t\t\tActions[name] = callback;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"registerAction\", registerAction as any], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Default action.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * When the stop action is triggered, the elements' currently active call is immediately stopped. The active call might have\r\n\t * been applied to multiple elements, in which case all of the call's elements will be stopped. When an element\r\n\t * is stopped, the next item in its animation queue is immediately triggered.\r\n\t * An additional argument may be passed in to clear an element's remaining queued calls. Either true (which defaults to the \"fx\" queue)\r\n\t * or a custom queue string can be passed in.\r\n\t * Note: The stop command runs prior to Velocity's Queueing phase since its behavior is intended to take effect *immediately*,\r\n\t * regardless of the element's current queue state.\r\n\t * \r\n\t * @param {HTMLorSVGElement[]} elements The collection of HTML or SVG elements\r\n\t * @param {StrictVelocityOptions} The strict Velocity options\r\n\t * @param {Promise} An optional promise if the user uses promises\r\n\t * @param {(value?: (HTMLorSVGElement[] | VelocityResult)) => void} resolver The resolve method of the promise\r\n\t */\r\n\tfunction defaultAction(args?: any[], elements?: HTMLorSVGElement[] | VelocityResult, promiseHandler?: VelocityPromise, action?: string): void {\r\n\t\t// TODO: default is wrong, should be runSequence based, and needs all arguments\r\n\t\tif (isString(action) && VelocityStatic.Redirects[action]) {\r\n\t\t\tconst options = isPlainObject(args[0]) ? args[0] as VelocityOptions : {},\r\n\t\t\t\topts = {...options},\r\n\t\t\t\tdurationOriginal = parseFloat(options.duration as any),\r\n\t\t\t\tdelayOriginal = parseFloat(options.delay as any) || 0;\r\n\r\n\t\t\t/* If the backwards option was passed in, reverse the element set so that elements animate from the last to the first. */\r\n\t\t\tif (opts.backwards === true) {\r\n\t\t\t\telements = elements.reverse();\r\n\t\t\t}\r\n\r\n\t\t\t/* Individually trigger the redirect for each element in the set to prevent users from having to handle iteration logic in their redirect. */\r\n\t\t\telements.forEach(function(element, elementIndex) {\r\n\r\n\t\t\t\t/* If the stagger option was passed in, successively delay each element by the stagger value (in ms). Retain the original delay value. */\r\n\t\t\t\tif (parseFloat(opts.stagger as string)) {\r\n\t\t\t\t\topts.delay = delayOriginal + (parseFloat(opts.stagger as string) * elementIndex);\r\n\t\t\t\t} else if (isFunction(opts.stagger)) {\r\n\t\t\t\t\topts.delay = delayOriginal + opts.stagger.call(element, elementIndex, elements.length);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If the drag option was passed in, successively increase/decrease (depending on the presense of opts.backwards)\r\n the duration of each element's animation, using floors to prevent producing very short durations. */\r\n\t\t\t\tif (opts.drag) {\r\n\t\t\t\t\t/* Default the duration of UI pack effects (callouts and transitions) to 1000ms instead of the usual default duration of 400ms. */\r\n\t\t\t\t\topts.duration = durationOriginal || (/^(callout|transition)/.test(action) ? 1000 : DEFAULT_DURATION);\r\n\r\n\t\t\t\t\t/* For each element, take the greater duration of: A) animation completion percentage relative to the original duration,\r\n B) 75% of the original duration, or C) a 200ms fallback (in case duration is already set to a low value).\r\n The end result is a baseline of 75% of the redirect's duration that increases/decreases as the end of the element set is approached. */\r\n\t\t\t\t\topts.duration = Math.max(opts.duration * (opts.backwards ? 1 - elementIndex / elements.length : (elementIndex + 1) / elements.length), opts.duration * 0.75, 200);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Pass in the call's opts object so that the redirect can optionally extend it. It defaults to an empty object instead of null to\r\n reduce the opts checking logic required inside the redirect. */\r\n\t\t\t\tVelocityStatic.Redirects[action].call(element, element, opts, elementIndex, elements.length, elements, promiseHandler && promiseHandler._resolver);\r\n\t\t\t});\r\n\r\n\t\t\t/* Since the animation logic resides within the redirect's own code, abort the remainder of this call.\r\n (The performance overhead up to this point is virtually non-existant.) */\r\n\t\t\t/* Note: The jQuery call chain is kept intact by returning the complete element set. */\r\n\t\t} else {\r\n\t\t\tconst abortError = \"Velocity: First argument (\" + action + \") was not a property map, a known action, or a registered redirect. Aborting.\";\r\n\r\n\t\t\tif (promiseHandler) {\r\n\t\t\t\tpromiseHandler._rejecter(new Error(abortError));\r\n\t\t\t} else if (window.console) {\r\n\t\t\t\tconsole.log(abortError);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"default\", defaultAction], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Finish all animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be finished, and if so we set the tweens to\r\n\t * the final value for it, then call complete.\r\n\t */\r\n\tfunction checkAnimationShouldBeFinished(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\r\n\t\tvalidateTweens(animation);\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tif (!(animation._flags & AnimationFlags.STARTED)) {\r\n\t\t\t\t// Copied from tick.ts - ensure that the animation is completely\r\n\t\t\t\t// valid and run begin() before complete().\r\n\t\t\t\tconst options = animation.options;\r\n\r\n\t\t\t\t// The begin callback is fired once per call, not once per\r\n\t\t\t\t// element, and is passed the full raw DOM element set as both\r\n\t\t\t\t// its context and its first argument.\r\n\t\t\t\tif (options._started++ === 0) {\r\n\t\t\t\t\toptions._first = animation;\r\n\t\t\t\t\tif (options.begin) {\r\n\t\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\t\t\t\tcallBegin(animation);\r\n\t\t\t\t\t\t// Only called once, even if reversed or repeated\r\n\t\t\t\t\t\toptions.begin = undefined;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tanimation._flags |= AnimationFlags.STARTED;\r\n\t\t\t}\r\n\t\t\tfor (const property in animation.tweens) {\r\n\t\t\t\tconst tween = animation.tweens[property],\r\n\t\t\t\t\tpattern = tween.pattern;\r\n\t\t\t\tlet currentValue = \"\",\r\n\t\t\t\t\ti = 0;\r\n\r\n\t\t\t\tif (pattern) {\r\n\t\t\t\t\tfor (; i < pattern.length; i++) {\r\n\t\t\t\t\t\tconst endValue = tween.end[i];\r\n\r\n\t\t\t\t\t\tcurrentValue += endValue == null ? pattern[i] : endValue;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tCSS.setPropertyValue(animation.element, property, currentValue, tween.fn);\r\n\t\t\t}\r\n\t\t\tcompleteCall(animation);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the finish action is triggered, the elements' currently active call is\r\n\t * immediately finished. When an element is finished, the next item in its\r\n\t * animation queue is immediately triggered. If passed via a chained call\r\n\t * then this will only target the animations in that call, and not the\r\n\t * elements linked to it.\r\n\t * \r\n\t * A queue name may be passed in to specify that only animations on the\r\n\t * named queue are finished. The default queue is named \"\". In addition the\r\n\t * value of `false` is allowed for the queue name.\r\n\t * \r\n\t * An final argument may be passed in to clear an element's remaining queued\r\n\t * calls. This may only be the value `true`.\r\n\t */\r\n\tfunction finish(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise): void {\r\n\t\tconst queueName: string | false = validateQueue(args[0], true),\r\n\t\t\tdefaultQueue: false | string = defaults.queue,\r\n\t\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimationShouldBeFinished(animations[i], queueName, defaultQueue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall = State.first,\r\n\t\t\t\tnextCall: AnimationCall;\r\n\r\n\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t}\r\n\t\t\tfor (activeCall = State.first; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\r\n\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimationShouldBeFinished(activeCall, queueName, defaultQueue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"finish\", finish], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a value from one or more running animations.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Used to map getters for the various AnimationFlags.\r\n\t */\r\n\tconst animationFlags: {[key: string]: number} = {\r\n\t\t\"isExpanded\": AnimationFlags.EXPANDED,\r\n\t\t\"isReady\": AnimationFlags.READY,\r\n\t\t\"isStarted\": AnimationFlags.STARTED,\r\n\t\t\"isStopped\": AnimationFlags.STOPPED,\r\n\t\t\"isPaused\": AnimationFlags.PAUSED,\r\n\t\t\"isSync\": AnimationFlags.SYNC,\r\n\t\t\"isReverse\": AnimationFlags.REVERSE\r\n\t};\r\n\r\n\t/**\r\n\t * Get or set an option or running AnimationCall data value. If there is no\r\n\t * value passed then it will get, otherwise we will set.\r\n\t * \r\n\t * NOTE: When using \"get\" this will not touch the Promise as it is never\r\n\t * returned to the user.\r\n\t */\r\n\tfunction option(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tconst key = args[0],\r\n\t\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\r\n\t\t\tqueueName = queue === \"false\" ? false : validateQueue(queue, true);\r\n\t\tlet animations: AnimationCall[],\r\n\t\t\tvalue = args[1];\r\n\r\n\t\tif (!key) {\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot access a non-existant key!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// If we're chaining the return value from Velocity then we are only\r\n\t\t// interested in the values related to that call\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tanimations = elements.velocity.animations;\r\n\t\t} else {\r\n\t\t\tanimations = [];\r\n\r\n\t\t\tfor (let activeCall = State.first; activeCall; activeCall = activeCall._next) {\r\n\t\t\t\tif (elements.indexOf(activeCall.element) >= 0 && getValue(activeCall.queue, activeCall.options.queue) === queueName) {\r\n\t\t\t\t\tanimations.push(activeCall);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// If we're dealing with multiple elements that are pointing at a\r\n\t\t\t// single running animation, then instead treat them as a single\r\n\t\t\t// animation.\r\n\t\t\tif (elements.length > 1 && animations.length > 1) {\r\n\t\t\t\tlet i = 1,\r\n\t\t\t\t\toptions = animations[0].options;\r\n\r\n\t\t\t\twhile (i < animations.length) {\r\n\t\t\t\t\tif (animations[i++].options !== options) {\r\n\t\t\t\t\t\toptions = null;\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\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\r\n\t\t\t\tif (options) {\r\n\t\t\t\t\tanimations = [animations[0]];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t// GET\r\n\t\tif (value === undefined) {\r\n\t\t\tconst result = [],\r\n\t\t\t\tflag = animationFlags[key];\r\n\r\n\t\t\tfor (let i = 0; i < animations.length; i++) {\r\n\t\t\t\tif (flag === undefined) {\r\n\t\t\t\t\t// A normal key to get.\r\n\t\t\t\t\tresult.push(getValue(animations[i][key], animations[i].options[key]));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// A flag that we're checking against.\r\n\t\t\t\t\tresult.push((animations[i]._flags & flag) === 0);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (elements.length === 1 && animations.length === 1) {\r\n\t\t\t\t// If only a single animation is found and we're only targetting a\r\n\t\t\t\t// single element, then return the value directly\r\n\t\t\t\treturn result[0];\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t// SET\r\n\t\tlet isPercentComplete: boolean;\r\n\r\n\t\tswitch (key) {\r\n\t\t\tcase \"cache\":\r\n\t\t\t\tvalue = validateCache(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"begin\":\r\n\t\t\t\tvalue = validateBegin(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"complete\":\r\n\t\t\t\tvalue = validateComplete(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"delay\":\r\n\t\t\t\tvalue = validateDelay(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"duration\":\r\n\t\t\t\tvalue = validateDuration(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"fpsLimit\":\r\n\t\t\t\tvalue = validateFpsLimit(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"loop\":\r\n\t\t\t\tvalue = validateLoop(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"percentComplete\":\r\n\t\t\t\tisPercentComplete = true;\r\n\t\t\t\tvalue = parseFloat(value);\r\n\t\t\t\tbreak;\r\n\t\t\tcase \"repeat\":\r\n\t\t\tcase \"repeatAgain\":\r\n\t\t\t\tvalue = validateRepeat(value);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tif (key[0] !== \"_\") {\r\n\t\t\t\t\tconst num = parseFloat(value);\r\n\r\n\t\t\t\t\tif (value == num) {\r\n\t\t\t\t\t\tvalue = num;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t// deliberate fallthrough\r\n\t\t\tcase \"queue\":\r\n\t\t\tcase \"promise\":\r\n\t\t\tcase \"promiseRejectEmpty\":\r\n\t\t\tcase \"easing\":\r\n\t\t\tcase \"started\":\r\n\t\t\t\tconsole.warn(\"VelocityJS: Trying to set a read-only key:\", key);\r\n\t\t\t\treturn;\r\n\t\t}\r\n\t\tif (value === undefined || value !== value) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set an invalid value:\", key, \"=\", value, \"(\" + args[1] + \")\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tfor (let i = 0; i < animations.length; i++) {\r\n\t\t\tconst animation = animations[i];\r\n\r\n\t\t\tif (isPercentComplete) {\r\n\t\t\t\tanimation.timeStart = lastTick - (getValue(animation.duration, animation.options.duration, defaults.duration) * value);\r\n\t\t\t} else {\r\n\t\t\t\tanimation[key] = value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"option\", option], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Pause and resume animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be paused / resumed.\r\n\t */\r\n\tfunction checkAnimation(animation: AnimationCall, queueName: false | string, defaultQueue: false | string, isPaused: boolean) {\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tif (isPaused) {\r\n\t\t\t\tanimation._flags |= AnimationFlags.PAUSED;\r\n\t\t\t} else {\r\n\t\t\t\tanimation._flags &= ~AnimationFlags.PAUSED;\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\r\n\t/**\r\n\t * Pause and Resume are call-wide (not on a per element basis). Thus, calling pause or resume on a\r\n\t * single element will cause any calls that contain tweens for that element to be paused/resumed\r\n\t * as well.\r\n\t */\r\n\tfunction pauseResume(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string) {\r\n\t\tconst isPaused = action.indexOf(\"pause\") === 0,\r\n\t\t\tqueue = action.indexOf(\".\") >= 0 ? action.replace(/^.*\\./, \"\") : undefined,\r\n\t\t\tqueueName = queue === \"false\" ? false : validateQueue(args[0]),\r\n\t\t\tdefaultQueue = defaults.queue;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimation(animations[i], queueName, defaultQueue, isPaused);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall: AnimationCall = State.first;\r\n\r\n\t\t\twhile (activeCall) {\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimation(activeCall, queueName, defaultQueue, isPaused);\r\n\t\t\t\t}\r\n\t\t\t\tactiveCall = activeCall._next;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"pause\", pauseResume], true);\r\n\tregisterAction([\"resume\", pauseResume], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Actions that can be performed by passing a string instead of a propertiesMap.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\tregisterAction([\"reverse\", function(args?: any[], elements?: HTMLorSVGElement[] | VelocityResult, promiseHandler?: VelocityPromise, action?: string) {\r\n\t\t// TODO: Code needs to split out before here - but this is needed to prevent it being overridden\r\n\t\tthrow new SyntaxError(\"VelocityJS: The 'reverse' action is private.\");\r\n\t}], true)\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Stop animation.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Check if an animation should be stopped, and if so then set the STOPPED\r\n\t * flag on it, then call complete.\r\n\t */\r\n\tfunction checkAnimationShouldBeStopped(animation: AnimationCall, queueName: false | string, defaultQueue: false | string) {\r\n\t\tvalidateTweens(animation);\r\n\t\tif (queueName === undefined || queueName === getValue(animation.queue, animation.options.queue, defaultQueue)) {\r\n\t\t\tanimation._flags |= AnimationFlags.STOPPED;\r\n\t\t\tcompleteCall(animation);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * When the stop action is triggered, the elements' currently active call is\r\n\t * immediately stopped. When an element is stopped, the next item in its\r\n\t * animation queue is immediately triggered. If passed via a chained call\r\n\t * then this will only target the animations in that call, and not the\r\n\t * elements linked to it.\r\n\t * \r\n\t * A queue name may be passed in to specify that only animations on the\r\n\t * named queue are stopped. The default queue is named \"\". In addition the\r\n\t * value of `false` is allowed for the queue name.\r\n\t * \r\n\t * An final argument may be passed in to clear an element's remaining queued\r\n\t * calls. This may only be the value `true`.\r\n\t * \r\n\t * Note: The stop command runs prior to Velocity's Queueing phase since its\r\n\t * behavior is intended to take effect *immediately*, regardless of the\r\n\t * element's current queue state.\r\n\t */\r\n\tfunction stop(args: any[], elements: VelocityResult, promiseHandler?: VelocityPromise, action?: string): void {\r\n\t\tconst queueName: string | false = validateQueue(args[0], true),\r\n\t\t\tdefaultQueue: false | string = defaults.queue,\r\n\t\t\tfinishAll = args[queueName === undefined ? 0 : 1] === true;\r\n\r\n\t\tif (isVelocityResult(elements) && elements.velocity.animations) {\r\n\t\t\tfor (let i = 0, animations = elements.velocity.animations; i < animations.length; i++) {\r\n\t\t\t\tcheckAnimationShouldBeStopped(animations[i], queueName, defaultQueue);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tlet activeCall = State.first,\r\n\t\t\t\tnextCall: AnimationCall;\r\n\r\n\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t}\r\n\t\t\tfor (activeCall = State.first; activeCall && (finishAll || activeCall !== State.firstNew); activeCall = nextCall || State.firstNew) {\r\n\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\tif (!elements || _inArray(elements, activeCall.element)) {\r\n\t\t\t\t\tcheckAnimationShouldBeStopped(activeCall, queueName, defaultQueue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"stop\", stop], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a property from one or more elements.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Expose a style shortcut - can't be used with chaining, but might be of\r\n\t * use to people.\r\n\t */\r\n\texport function style(elements: VelocityResult, property: {[property: string]: string}): VelocityResult;\r\n\texport function style(elements: VelocityResult, property: string): string | string[];\r\n\texport function style(elements: VelocityResult, property: string, value: string): VelocityResult;\r\n\texport function style(elements: VelocityResult, property: string | {[property: string]: string}, value?: string) {\r\n\t\treturn styleAction([property, value], elements);\r\n\t}\r\n\r\n\t/**\r\n\t * Get or set a style of Nomralised property value on one or more elements.\r\n\t * If there is no value passed then it will get, otherwise we will set.\r\n\t * \r\n\t * NOTE: When using \"get\" this will not touch the Promise as it is never\r\n\t * returned to the user.\r\n\t * \r\n\t * This can fail to set, and will reject the Promise if it does so.\r\n\t * \r\n\t * Velocity(elements, \"style\", \"property\", \"value\") => elements;\r\n\t * Velocity(elements, \"style\", {\"property\": \"value\", ...}) => elements;\r\n\t * Velocity(element, \"style\", \"property\") => \"value\";\r\n\t * Velocity(elements, \"style\", \"property\") => [\"value\", ...];\r\n\t */\r\n\tfunction styleAction(args?: any[], elements?: VelocityResult, promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tconst property = args[0],\r\n\t\t\tvalue = args[1];\r\n\r\n\t\tif (!property) {\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot access a non-existant property!\");\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// GET\r\n\t\tif (value === undefined && !isPlainObject(property)) {\r\n\t\t\t// If only a single animation is found and we're only targetting a\r\n\t\t\t// single element, then return the value directly\r\n\t\t\tif (elements.length === 1) {\r\n\t\t\t\treturn CSS.fixColors(CSS.getPropertyValue(elements[0], property));\r\n\t\t\t}\r\n\t\t\tconst result = [];\r\n\r\n\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\tresult.push(CSS.fixColors(CSS.getPropertyValue(elements[i], property)));\r\n\t\t\t}\r\n\t\t\treturn result;\r\n\t\t}\r\n\t\t// SET\r\n\t\tlet error: string;\r\n\r\n\t\tif (isPlainObject(property)) {\r\n\t\t\tfor (const propertyName in property) {\r\n\t\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\t\tconst value = property[propertyName];\r\n\r\n\t\t\t\t\tif (isString(value) || isNumber(value)) {\r\n\t\t\t\t\t\tCSS.setPropertyValue(elements[i], propertyName, property[propertyName]);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\terror = (error ? error + \", \" : \"\") + \"Cannot set a property '\" + propertyName + \"' to an unknown type: \" + (typeof value);\r\n\t\t\t\t\t\tconsole.warn(\"VelocityJS: Cannot set a property '\" + propertyName + \"' to an unknown type:\", value);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} else if (isString(value) || isNumber(value)) {\r\n\t\t\tfor (let i = 0; i < elements.length; i++) {\r\n\t\t\t\tCSS.setPropertyValue(elements[i], property, String(value));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\terror = \"Cannot set a property '\" + property + \"' to an unknown type: \" + (typeof value);\r\n\t\t\tconsole.warn(\"VelocityJS: Cannot set a property '\" + property + \"' to an unknown type:\", value);\r\n\t\t}\r\n\t\tif (promiseHandler) {\r\n\t\t\tif (error) {\r\n\t\t\t\tpromiseHandler._rejecter(error);\r\n\t\t\t} else if (isVelocityResult(elements) && elements.velocity.animations && elements.then) {\r\n\t\t\t\telements.then(promiseHandler._resolver);\r\n\t\t\t} else {\r\n\t\t\t\tpromiseHandler._resolver(elements);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"style\", styleAction], true);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Get or set a property from one or more elements.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Expose a style shortcut - can't be used with chaining, but might be of\r\n\t * use to people.\r\n\t */\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, properties: VelocityProperties, easing?: VelocityEasingType);\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, propertyName: string, property: VelocityProperty, easing?: VelocityEasingType);\r\n\texport function tween(elements: HTMLorSVGElement[], percentComplete: number, properties: VelocityProperties | string, property?: VelocityProperty | VelocityEasingType, easing?: VelocityEasingType) {\r\n\t\treturn tweenAction(arguments as any, elements);\r\n\t}\r\n\r\n\t/**\r\n\t * \r\n\t */\r\n\tfunction tweenAction(args?: any[], elements?: HTMLorSVGElement[], promiseHandler?: VelocityPromise, action?: string): any {\r\n\t\tlet requireForcefeeding: boolean;\r\n\r\n\t\tif (!elements) {\r\n\t\t\tif (!args.length) {\r\n\t\t\t\tconsole.info(\"Velocity(, \\\"tween\\\", percentComplete, property, end | [end, , ], ) => value\\n\"\r\n\t\t\t\t\t+ \"Velocity(, \\\"tween\\\", percentComplete, {property: end | [end, , ], ...}, ) => {property: value, ...}\");\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\telements = [document.body];\r\n\t\t\trequireForcefeeding = true;\r\n\t\t} else if (elements.length !== 1) {\r\n\t\t\t// TODO: Allow more than a single element to return an array of results\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot tween more than one element!\");\r\n\t\t}\r\n\t\tconst percentComplete: number = args[0],\r\n\t\t\tfakeAnimation = {\r\n\t\t\t\telements: elements,\r\n\t\t\t\telement: elements[0],\r\n\t\t\t\tqueue: false,\r\n\t\t\t\toptions: {\r\n\t\t\t\t\tduration: 1000\r\n\t\t\t\t},\r\n\t\t\t\ttweens: null as {[property: string]: VelocityTween}\r\n\t\t\t},\r\n\t\t\tresult: {[property: string]: string} = {};\r\n\t\tlet properties: VelocityProperties = args[1],\r\n\t\t\tsingleResult: boolean,\r\n\t\t\teasing: VelocityEasingType = args[2],\r\n\t\t\tcount = 0;\r\n\r\n\t\tif (isString(args[1])) {\r\n\t\t\tsingleResult = true;\r\n\t\t\tproperties = {\r\n\t\t\t\t[args[1]]: args[2]\r\n\t\t\t};\r\n\t\t\teasing = args[3];\r\n\t\t} else if (Array.isArray(args[1])) {\r\n\t\t\tsingleResult = true;\r\n\t\t\tproperties = {\r\n\t\t\t\t\"tween\": args[1]\r\n\t\t\t} as any;\r\n\t\t\teasing = args[2];\r\n\t\t}\r\n\t\tif (!isNumber(percentComplete) || percentComplete < 0 || percentComplete > 1) {\r\n\t\t\tthrow new Error(\"VelocityJS: Must tween a percentage from 0 to 1!\");\r\n\t\t}\r\n\t\tif (!isPlainObject(properties)) {\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot tween an invalid property!\");\r\n\t\t}\r\n\t\tif (requireForcefeeding) {\r\n\t\t\tfor (const property in properties) {\r\n\t\t\t\tif (properties.hasOwnProperty(property) && (!Array.isArray(properties[property]) || properties[property].length < 2)) {\r\n\t\t\t\t\tthrow new Error(\"VelocityJS: When not supplying an element you must force-feed values: \" + property);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tconst activeEasing = validateEasing(getValue(easing, defaults.easing), 1000);\r\n\r\n\t\texpandProperties(fakeAnimation as AnimationCall, properties);\r\n\t\tfor (const property in fakeAnimation.tweens) {\r\n\t\t\t// For every element, iterate through each property.\r\n\t\t\tconst tween = fakeAnimation.tweens[property],\r\n\t\t\t\teasing = tween.easing || activeEasing,\r\n\t\t\t\tpattern = tween.pattern;\r\n\t\t\tlet currentValue = \"\";\r\n\r\n\t\t\tcount++;\r\n\t\t\tif (pattern) {\r\n\t\t\t\tfor (let i = 0; i < pattern.length; i++) {\r\n\t\t\t\t\tconst startValue = tween.start[i];\r\n\r\n\t\t\t\t\tif (startValue == null) {\r\n\t\t\t\t\t\tcurrentValue += pattern[i];\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tconst result = easing(percentComplete, startValue as number, tween.end[i] as number, property)\r\n\r\n\t\t\t\t\t\tcurrentValue += pattern[i] === true ? Math.round(result) : result;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tresult[property] = currentValue;\r\n\t\t}\r\n\t\tif (singleResult && count === 1) {\r\n\t\t\tfor (const property in result) {\r\n\t\t\t\tif (result.hasOwnProperty(property)) {\r\n\t\t\t\t\treturn result[property];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}\r\n\r\n\tregisterAction([\"tween\", tweenAction], true);\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Container for page-wide Velocity state data.\r\n\t */\r\n\texport namespace State {\r\n\t\texport let\r\n\t\t\t/**\r\n\t\t\t * Detect if this is a NodeJS or web browser\r\n\t\t\t */\r\n\t\t\tisClient = window && window === window.window,\r\n\t\t\t/**\r\n\t\t\t * Detect mobile devices to determine if mobileHA should be turned\r\n\t\t\t * on.\r\n\t\t\t */\r\n\t\t\tisMobile = isClient && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * The mobileHA option's behavior changes on older Android devices\r\n\t\t\t * (Gingerbread, versions 2.3.3-2.3.7).\r\n\t\t\t */\r\n\t\t\tisAndroid = isClient && /Android/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * The mobileHA option's behavior changes on older Android devices\r\n\t\t\t * (Gingerbread, versions 2.3.3-2.3.7).\r\n\t\t\t */\r\n\t\t\tisGingerbread = isClient && /Android 2\\.3\\.[3-7]/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * Chrome browser\r\n\t\t\t */\r\n\t\t\tisChrome = isClient && (window as any).chrome,\r\n\t\t\t/**\r\n\t\t\t * Firefox browser\r\n\t\t\t */\r\n\t\t\tisFirefox = isClient && /Firefox/i.test(navigator.userAgent),\r\n\t\t\t/**\r\n\t\t\t * Create a cached element for re-use when checking for CSS property\r\n\t\t\t * prefixes.\r\n\t\t\t */\r\n\t\t\tprefixElement = isClient && document.createElement(\"div\"),\r\n\t\t\t/**\r\n\t\t\t * Retrieve the appropriate scroll anchor and property name for the\r\n\t\t\t * browser: https://developer.mozilla.org/en-US/docs/Web/API/Window.scrollY\r\n\t\t\t */\r\n\t\t\twindowScrollAnchor = isClient && window.pageYOffset !== undefined,\r\n\t\t\t/**\r\n\t\t\t * Cache the anchor used for animating window scrolling.\r\n\t\t\t */\r\n\t\t\tscrollAnchor = windowScrollAnchor ? window : (!isClient || document.documentElement || document.body.parentNode || document.body),\r\n\t\t\t/**\r\n\t\t\t * Cache the browser-specific property names associated with the\r\n\t\t\t * scroll anchor.\r\n\t\t\t */\r\n\t\t\tscrollPropertyLeft = windowScrollAnchor ? \"pageXOffset\" : \"scrollLeft\",\r\n\t\t\t/**\r\n\t\t\t * Cache the browser-specific property names associated with the\r\n\t\t\t * scroll anchor.\r\n\t\t\t */\r\n\t\t\tscrollPropertyTop = windowScrollAnchor ? \"pageYOffset\" : \"scrollTop\",\r\n\t\t\t/**\r\n\t\t\t * The className we add / remove when animating.\r\n\t\t\t */\r\n\t\t\tclassName = CLASSNAME,\r\n\t\t\t/**\r\n\t\t\t * Keep track of whether our RAF tick is running.\r\n\t\t\t */\r\n\t\t\tisTicking = false,\r\n\t\t\t/**\r\n\t\t\t * Container for every in-progress call to Velocity.\r\n\t\t\t */\r\n\t\t\tfirst: AnimationCall,\r\n\t\t\t/**\r\n\t\t\t * Container for every in-progress call to Velocity.\r\n\t\t\t */\r\n\t\t\tlast: AnimationCall,\r\n\t\t\t/**\r\n\t\t\t * First new animation - to shortcut starting them all up and push\r\n\t\t\t * any css reads to the start of the tick\r\n\t\t\t */\r\n\t\t\tfirstNew: AnimationCall\r\n\t};\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * Cache every camelCase match to avoid repeating lookups.\r\n\t */\r\n\tconst cache: {[property: string]: string} = createEmptyObject();\r\n\r\n\t/**\r\n\t * Camelcase a property name into its JavaScript notation (e.g.\r\n\t * \"background-color\" ==> \"backgroundColor\"). Camelcasing is used to\r\n\t * normalize property names between and across calls.\r\n\t */\r\n\texport function camelCase(property: string): string {\r\n\t\tconst fixed = cache[property];\r\n\r\n\t\tif (fixed) {\r\n\t\t\treturn fixed;\r\n\t\t}\r\n\t\treturn cache[property] = property.replace(/-([a-z])/g, ($: string, letter: string) => letter.toUpperCase());\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * This is the list of color names -> rgb values. The object is in here so\r\n\t * that the actual name conversion can be in a separate file and not\r\n\t * included for custom builds.\r\n\t */\r\n\texport const ColorNames: {[name: string]: string} = createEmptyObject();\r\n\r\n\t/**\r\n\t * Convert a hex list to an rgba value. Designed to be used in replace.\r\n\t */\r\n\tfunction makeRGBA(ignore: any, r: string, g: string, b: string): string {\r\n\t\treturn \"rgba(\" + parseInt(r, 16) + \",\" + parseInt(g, 16) + \",\" + parseInt(b, 16) + \",1)\";\r\n\t}\r\n\r\n\tconst rxColor6 = /#([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})/gi,\r\n\t\trxColor3 = /#([a-f\\d])([a-f\\d])([a-f\\d])/gi,\r\n\t\trxColorName = /(rgba?\\(\\s*)?(\\b[a-z]+\\b)/g,\r\n\t\trxRGB = /rgb(a?)\\(([^\\)]+)\\)/gi,\r\n\t\trxSpaces = /\\s+/g;\r\n\r\n\t/**\r\n\t * Replace any css colour name with its rgba() value. It is possible to use\r\n\t * the name within an \"rgba(blue, 0.4)\" string this way.\r\n\t */\r\n\texport function fixColors(str: string): string {\r\n\t\treturn str\r\n\t\t\t.replace(rxColor6, makeRGBA)\r\n\t\t\t.replace(rxColor3, function($0, r, g, b) {\r\n\t\t\t\treturn makeRGBA($0, r + r, g + g, b + b);\r\n\t\t\t})\r\n\t\t\t.replace(rxColorName, function($0, $1, $2) {\r\n\t\t\t\tif (ColorNames[$2]) {\r\n\t\t\t\t\treturn ($1 ? $1 : \"rgba(\") + ColorNames[$2] + ($1 ? \"\" : \",1)\");\r\n\t\t\t\t}\r\n\t\t\t\treturn $0;\r\n\t\t\t})\r\n\t\t\t.replace(rxRGB, function($0, $1, $2: string) {\r\n\t\t\t\treturn \"rgba(\" + $2.replace(rxSpaces, \"\") + ($1 ? \"\" : \",1\") + \")\";\r\n\t\t\t});\r\n\t}\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t// Converting from hex as it makes for a smaller file.\r\n\t// TODO: When build system changes to webpack, make this one optional.\r\n\tconst colorValues = {\r\n\t\t\"aliceblue\": 0xf0f8ff,\r\n\t\t\"antiquewhite\": 0xfaebd7,\r\n\t\t\"aqua\": 0x00ffff,\r\n\t\t\"aquamarine\": 0x7fffd4,\r\n\t\t\"azure\": 0xf0ffff,\r\n\t\t\"beige\": 0xf5f5dc,\r\n\t\t\"bisque\": 0xffe4c4,\r\n\t\t\"black\": 0x000000,\r\n\t\t\"blanchedalmond\": 0xffebcd,\r\n\t\t\"blue\": 0x0000ff,\r\n\t\t\"blueviolet\": 0x8a2be2,\r\n\t\t\"brown\": 0xa52a2a,\r\n\t\t\"burlywood\": 0xdeb887,\r\n\t\t\"cadetblue\": 0x5f9ea0,\r\n\t\t\"chartreuse\": 0x7fff00,\r\n\t\t\"chocolate\": 0xd2691e,\r\n\t\t\"coral\": 0xff7f50,\r\n\t\t\"cornflowerblue\": 0x6495ed,\r\n\t\t\"cornsilk\": 0xfff8dc,\r\n\t\t\"crimson\": 0xdc143c,\r\n\t\t\"cyan\": 0x00ffff,\r\n\t\t\"darkblue\": 0x00008b,\r\n\t\t\"darkcyan\": 0x008b8b,\r\n\t\t\"darkgoldenrod\": 0xb8860b,\r\n\t\t\"darkgray\": 0xa9a9a9,\r\n\t\t\"darkgrey\": 0xa9a9a9,\r\n\t\t\"darkgreen\": 0x006400,\r\n\t\t\"darkkhaki\": 0xbdb76b,\r\n\t\t\"darkmagenta\": 0x8b008b,\r\n\t\t\"darkolivegreen\": 0x556b2f,\r\n\t\t\"darkorange\": 0xff8c00,\r\n\t\t\"darkorchid\": 0x9932cc,\r\n\t\t\"darkred\": 0x8b0000,\r\n\t\t\"darksalmon\": 0xe9967a,\r\n\t\t\"darkseagreen\": 0x8fbc8f,\r\n\t\t\"darkslateblue\": 0x483d8b,\r\n\t\t\"darkslategray\": 0x2f4f4f,\r\n\t\t\"darkslategrey\": 0x2f4f4f,\r\n\t\t\"darkturquoise\": 0x00ced1,\r\n\t\t\"darkviolet\": 0x9400d3,\r\n\t\t\"deeppink\": 0xff1493,\r\n\t\t\"deepskyblue\": 0x00bfff,\r\n\t\t\"dimgray\": 0x696969,\r\n\t\t\"dimgrey\": 0x696969,\r\n\t\t\"dodgerblue\": 0x1e90ff,\r\n\t\t\"firebrick\": 0xb22222,\r\n\t\t\"floralwhite\": 0xfffaf0,\r\n\t\t\"forestgreen\": 0x228b22,\r\n\t\t\"fuchsia\": 0xff00ff,\r\n\t\t\"gainsboro\": 0xdcdcdc,\r\n\t\t\"ghostwhite\": 0xf8f8ff,\r\n\t\t\"gold\": 0xffd700,\r\n\t\t\"goldenrod\": 0xdaa520,\r\n\t\t\"gray\": 0x808080,\r\n\t\t\"grey\": 0x808080,\r\n\t\t\"green\": 0x008000,\r\n\t\t\"greenyellow\": 0xadff2f,\r\n\t\t\"honeydew\": 0xf0fff0,\r\n\t\t\"hotpink\": 0xff69b4,\r\n\t\t\"indianred\": 0xcd5c5c,\r\n\t\t\"indigo\": 0x4b0082,\r\n\t\t\"ivory\": 0xfffff0,\r\n\t\t\"khaki\": 0xf0e68c,\r\n\t\t\"lavender\": 0xe6e6fa,\r\n\t\t\"lavenderblush\": 0xfff0f5,\r\n\t\t\"lawngreen\": 0x7cfc00,\r\n\t\t\"lemonchiffon\": 0xfffacd,\r\n\t\t\"lightblue\": 0xadd8e6,\r\n\t\t\"lightcoral\": 0xf08080,\r\n\t\t\"lightcyan\": 0xe0ffff,\r\n\t\t\"lightgoldenrodyellow\": 0xfafad2,\r\n\t\t\"lightgray\": 0xd3d3d3,\r\n\t\t\"lightgrey\": 0xd3d3d3,\r\n\t\t\"lightgreen\": 0x90ee90,\r\n\t\t\"lightpink\": 0xffb6c1,\r\n\t\t\"lightsalmon\": 0xffa07a,\r\n\t\t\"lightseagreen\": 0x20b2aa,\r\n\t\t\"lightskyblue\": 0x87cefa,\r\n\t\t\"lightslategray\": 0x778899,\r\n\t\t\"lightslategrey\": 0x778899,\r\n\t\t\"lightsteelblue\": 0xb0c4de,\r\n\t\t\"lightyellow\": 0xffffe0,\r\n\t\t\"lime\": 0x00ff00,\r\n\t\t\"limegreen\": 0x32cd32,\r\n\t\t\"linen\": 0xfaf0e6,\r\n\t\t\"magenta\": 0xff00ff,\r\n\t\t\"maroon\": 0x800000,\r\n\t\t\"mediumaquamarine\": 0x66cdaa,\r\n\t\t\"mediumblue\": 0x0000cd,\r\n\t\t\"mediumorchid\": 0xba55d3,\r\n\t\t\"mediumpurple\": 0x9370db,\r\n\t\t\"mediumseagreen\": 0x3cb371,\r\n\t\t\"mediumslateblue\": 0x7b68ee,\r\n\t\t\"mediumspringgreen\": 0x00fa9a,\r\n\t\t\"mediumturquoise\": 0x48d1cc,\r\n\t\t\"mediumvioletred\": 0xc71585,\r\n\t\t\"midnightblue\": 0x191970,\r\n\t\t\"mintcream\": 0xf5fffa,\r\n\t\t\"mistyrose\": 0xffe4e1,\r\n\t\t\"moccasin\": 0xffe4b5,\r\n\t\t\"navajowhite\": 0xffdead,\r\n\t\t\"navy\": 0x000080,\r\n\t\t\"oldlace\": 0xfdf5e6,\r\n\t\t\"olive\": 0x808000,\r\n\t\t\"olivedrab\": 0x6b8e23,\r\n\t\t\"orange\": 0xffa500,\r\n\t\t\"orangered\": 0xff4500,\r\n\t\t\"orchid\": 0xda70d6,\r\n\t\t\"palegoldenrod\": 0xeee8aa,\r\n\t\t\"palegreen\": 0x98fb98,\r\n\t\t\"paleturquoise\": 0xafeeee,\r\n\t\t\"palevioletred\": 0xdb7093,\r\n\t\t\"papayawhip\": 0xffefd5,\r\n\t\t\"peachpuff\": 0xffdab9,\r\n\t\t\"peru\": 0xcd853f,\r\n\t\t\"pink\": 0xffc0cb,\r\n\t\t\"plum\": 0xdda0dd,\r\n\t\t\"powderblue\": 0xb0e0e6,\r\n\t\t\"purple\": 0x800080,\r\n\t\t\"rebeccapurple\": 0x663399,\r\n\t\t\"red\": 0xff0000,\r\n\t\t\"rosybrown\": 0xbc8f8f,\r\n\t\t\"royalblue\": 0x4169e1,\r\n\t\t\"saddlebrown\": 0x8b4513,\r\n\t\t\"salmon\": 0xfa8072,\r\n\t\t\"sandybrown\": 0xf4a460,\r\n\t\t\"seagreen\": 0x2e8b57,\r\n\t\t\"seashell\": 0xfff5ee,\r\n\t\t\"sienna\": 0xa0522d,\r\n\t\t\"silver\": 0xc0c0c0,\r\n\t\t\"skyblue\": 0x87ceeb,\r\n\t\t\"slateblue\": 0x6a5acd,\r\n\t\t\"slategray\": 0x708090,\r\n\t\t\"slategrey\": 0x708090,\r\n\t\t\"snow\": 0xfffafa,\r\n\t\t\"springgreen\": 0x00ff7f,\r\n\t\t\"steelblue\": 0x4682b4,\r\n\t\t\"tan\": 0xd2b48c,\r\n\t\t\"teal\": 0x008080,\r\n\t\t\"thistle\": 0xd8bfd8,\r\n\t\t\"tomato\": 0xff6347,\r\n\t\t\"turquoise\": 0x40e0d0,\r\n\t\t\"violet\": 0xee82ee,\r\n\t\t\"wheat\": 0xf5deb3,\r\n\t\t\"white\": 0xffffff,\r\n\t\t\"whitesmoke\": 0xf5f5f5,\r\n\t\t\"yellow\": 0xffff00,\r\n\t\t\"yellowgreen\": 0x9acd32\r\n\t};\r\n\r\n\tfor (let name in colorValues) {\r\n\t\tif (colorValues.hasOwnProperty(name)) {\r\n\t\t\tlet color = colorValues[name];\r\n\r\n\t\t\tColorNames[name] = Math.floor(color / 65536) + \",\" + Math.floor(color / 256 % 256) + \",\" + (color % 256);\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t// TODO: This is still a complete mess\r\n\texport function computePropertyValue(element: HTMLorSVGElement, property: string): string {\r\n\t\tconst data = Data(element),\r\n\t\t\t// If computedStyle is cached, use it.\r\n\t\t\tcomputedStyle = data && data.computedStyle ? data.computedStyle : window.getComputedStyle(element, null);\r\n\t\tlet computedValue: string | number = 0;\r\n\r\n\t\tif (data && !data.computedStyle) {\r\n\t\t\tdata.computedStyle = computedStyle;\r\n\t\t}\r\n\t\tif (property === \"width\" || property === \"height\") {\r\n\t\t\t// Browsers do not return height and width values for elements\r\n\t\t\t// that are set to display:\"none\". Thus, we temporarily toggle\r\n\t\t\t// display to the element type's default value.\r\n\t\t\tconst toggleDisplay: boolean = getPropertyValue(element, \"display\") === \"none\";\r\n\r\n\t\t\t// When box-sizing isn't set to border-box, height and width\r\n\t\t\t// style values are incorrectly computed when an element's\r\n\t\t\t// scrollbars are visible (which expands the element's\r\n\t\t\t// dimensions). Thus, we defer to the more accurate\r\n\t\t\t// offsetHeight/Width property, which includes the total\r\n\t\t\t// dimensions for interior, border, padding, and scrollbar. We\r\n\t\t\t// subtract border and padding to get the sum of interior +\r\n\t\t\t// scrollbar.\r\n\t\t\t// TODO: offsetHeight does not exist on SVGElement\r\n\t\t\tif (toggleDisplay) {\r\n\t\t\t\tsetPropertyValue(element, \"display\", \"auto\");\r\n\t\t\t}\r\n\t\t\tcomputedValue = augmentDimension(element, property, true);\r\n\t\t\tif (toggleDisplay) {\r\n\t\t\t\tsetPropertyValue(element, \"display\", \"none\");\r\n\t\t\t}\r\n\t\t\treturn String(computedValue);\r\n\t\t}\r\n\r\n\t\t/* IE and Firefox do not return a value for the generic borderColor -- they only return individual values for each border side's color.\r\n\t\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.\r\n\t\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. */\r\n\t\t/* TODO: There is a borderColor normalisation in legacy/ - figure out where this is needed... */\r\n\r\n\t\tcomputedValue = computedStyle[property];\r\n\t\t/* Fall back to the property's style value (if defined) when computedValue returns nothing,\r\n\t\t which can happen when the element hasn't been painted. */\r\n\t\tif (!computedValue) {\r\n\t\t\tcomputedValue = element.style[property];\r\n\t\t}\r\n\t\t/* For top, right, bottom, and left (TRBL) values that are set to \"auto\" on elements of \"fixed\" or \"absolute\" position,\r\n\t\t defer to jQuery for converting \"auto\" to a numeric value. (For elements with a \"static\" or \"relative\" position, \"auto\" has the same\r\n\t\t effect as being set to 0, so no conversion is necessary.) */\r\n\t\t/* An example of why numeric conversion is necessary: When an element with \"position:absolute\" has an untouched \"left\"\r\n\t\t property, which reverts to \"auto\", left's value is 0 relative to its parent element, but is often non-zero relative\r\n\t\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\"). */\r\n\t\tif (computedValue === \"auto\") {\r\n\t\t\tswitch (property) {\r\n\t\t\t\tcase \"top\":\r\n\t\t\t\tcase \"left\":\r\n\t\t\t\t\tlet topLeft = true;\r\n\t\t\t\tcase \"right\":\r\n\t\t\t\tcase \"bottom\":\r\n\t\t\t\t\tconst position = getPropertyValue(element, \"position\"); /* GET */\r\n\r\n\t\t\t\t\tif (position === \"fixed\" || (topLeft && position === \"absolute\")) {\r\n\t\t\t\t\t\t// Note: this has no pixel unit on its returned values,\r\n\t\t\t\t\t\t// we re-add it here to conform with\r\n\t\t\t\t\t\t// computePropertyValue's behavior.\r\n\t\t\t\t\t\tcomputedValue = element.getBoundingClientRect[property] + \"px\"; /* GET */\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t// Deliberate fallthrough!\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tcomputedValue = \"0px\";\r\n\t\t\t\t\tbreak\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn computedValue ? String(computedValue) : \"\";\r\n\t}\r\n\r\n\t/**\r\n\t * Get a property value. This will grab via the cache if it exists, then\r\n\t * via any normalisations.\r\n\t */\r\n\texport function getPropertyValue(element: HTMLorSVGElement, propertyName: string, fn?: VelocityNormalizationsFn, skipCache?: boolean): string {\r\n\t\tconst data = Data(element);\r\n\t\tlet propertyValue: string;\r\n\r\n\t\tif (NoCacheNormalizations.has(propertyName)) {\r\n\t\t\tskipCache = true;\r\n\t\t}\r\n\t\tif (!skipCache && data && data.cache[propertyName] != null) {\r\n\t\t\tpropertyValue = data.cache[propertyName];\r\n\t\t} else {\r\n\t\t\tfn = fn || getNormalization(element, propertyName);\r\n\t\t\tif (fn) {\r\n\t\t\t\tpropertyValue = fn(element);\r\n\t\t\t\tif (data) {\r\n\t\t\t\t\tdata.cache[propertyName] = propertyValue;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (debug >= 2) {\r\n\t\t\tconsole.info(\"Get \" + propertyName + \": \" + propertyValue);\r\n\t\t}\r\n\t\treturn propertyValue;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * All possible units in CSS. Used to recognise units when parsing tweens.\r\n\t */\r\n\tconst Units = [\r\n\t\t\"%\", // relative\r\n\t\t\"em\", \"ex\", \"ch\", \"rem\", // font relative\r\n\t\t\"vw\", \"vh\", \"vmin\", \"vmax\", // viewport relative\r\n\t\t\"cm\", \"mm\", \"Q\", \"in\", \"pc\", \"pt\", \"px\", // absolute lengths\r\n\t\t\"deg\", \"grad\", \"rad\", \"turn\", // angles\r\n\t\t\"s\", \"ms\" // time\r\n\t];\r\n\r\n\t/**\r\n\t * Get the current unit for this property. Only used when parsing tweens\r\n\t * to check if the unit is changing between the start and end values.\r\n\t */\r\n\texport function getUnit(property: string, start?: number): string {\r\n\t\tstart = start || 0;\r\n\t\tif (property[start] && property[start] !== \" \") {\r\n\t\t\tfor (let i = 0, units = Units; i < units.length; i++) {\r\n\t\t\t\tconst unit = units[i];\r\n\t\t\t\tlet j = 0;\r\n\r\n\t\t\t\tdo {\r\n\t\t\t\t\tif (j >= unit.length) {\r\n\t\t\t\t\t\treturn unit;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (unit[j] !== property[start + j]) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t} while (++j);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\t/**\r\n\t * The singular setPropertyValue, which routes the logic for all\r\n\t * normalizations.\r\n\t */\r\n\texport function setPropertyValue(element: HTMLorSVGElement, propertyName: string, propertyValue: any, fn?: VelocityNormalizationsFn) {\r\n\t\tconst data = Data(element);\r\n\r\n\t\tif (isString(propertyValue)\r\n\t\t\t&& propertyValue[0] === \"c\"\r\n\t\t\t&& propertyValue[1] === \"a\"\r\n\t\t\t&& propertyValue[2] === \"l\"\r\n\t\t\t&& propertyValue[3] === \"c\"\r\n\t\t\t&& propertyValue[4] === \"(\"\r\n\t\t\t&& propertyValue[5] === \"0\"\r\n\t\t\t&& propertyValue[5] === \" \") {\r\n\t\t\t// Make sure we un-calc unit changing values - try not to trigger\r\n\t\t\t// this code any more often than we have to since it's expensive\r\n\t\t\tpropertyValue = propertyValue.replace(/^calc\\(0[^\\d]* \\+ ([^\\(\\)]+)\\)$/, \"$1\");\r\n\t\t}\r\n\t\tif (data && data.cache[propertyName] !== propertyValue) {\r\n\t\t\t// By setting it to undefined we force a true \"get\" later\r\n\t\t\tdata.cache[propertyName] = propertyValue || undefined;\r\n\t\t\tfn = fn || getNormalization(element, propertyName);\r\n\t\t\tif (fn) {\r\n\t\t\t\tfn(element, propertyValue);\r\n\t\t\t}\r\n\t\t\tif (debug >= 2) {\r\n\t\t\t\tconsole.info(\"Set \" + propertyName + \": \" + propertyValue, element);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"linear\": true;\r\n\t\"swing\": true;\r\n\t\"spring\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\texport const Easings: {[name: string]: VelocityEasingFn} = createEmptyObject();\r\n\r\n\t/**\r\n\t * Used to register a easing. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerEasing\", \"name\", VelocityEasingFn);\r\n\t *\r\n\t * @private\r\n\t */\r\n\texport function registerEasing(args?: [string, VelocityEasingFn]) {\r\n\t\tconst name: string = args[0],\r\n\t\t\tcallback = args[1];\r\n\r\n\t\tif (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerEasing' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerEasing' callback to an invalid value:\", name, callback);\r\n\t\t} else if (Easings[name]) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to override 'registerEasing' callback\", name);\r\n\t\t} else {\r\n\t\t\tEasings[name] = callback;\r\n\t\t}\r\n\t}\r\n\r\n\tregisterAction([\"registerEasing\", registerEasing], true);\r\n\r\n\t/* Basic (same as jQuery) easings. */\r\n\tregisterEasing([\"linear\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + percentComplete * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"swing\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + (0.5 - Math.cos(percentComplete * Math.PI) / 2) * (endValue - startValue);\r\n\t}]);\r\n\r\n\t/* Bonus \"spring\" easing, which is a less exaggerated version of easeInOutElastic. */\r\n\tregisterEasing([\"spring\", function(percentComplete, startValue, endValue) {\r\n\t\treturn startValue + (1 - (Math.cos(percentComplete * 4.5 * Math.PI) * Math.exp(-percentComplete * 6))) * (endValue - startValue);\r\n\t}]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Back easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"easeInBack\": true;\r\n\t\"easeOutBack\": true;\r\n\t\"easeInOutBack\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\texport function registerBackIn(name: string, amount: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn Math.pow(percentComplete, 2) * ((amount + 1) * percentComplete - amount) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerBackOut(name: string, amount: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn (Math.pow(--percentComplete, 2) * ((amount + 1) * percentComplete + amount) + 1) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerBackInOut(name: string, amount: number) {\r\n\t\tamount *= 1.525;\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn ((percentComplete *= 2) < 1\r\n\t\t\t\t? (Math.pow(percentComplete, 2) * ((amount + 1) * percentComplete - amount))\r\n\t\t\t\t: (Math.pow(percentComplete -= 2, 2) * ((amount + 1) * percentComplete + amount) + 2)\r\n\t\t\t) * 0.5 * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\tregisterBackIn(\"easeInBack\", 1.7);\r\n\tregisterBackOut(\"easeOutBack\", 1.7);\r\n\tregisterBackInOut(\"easeInOutBack\", 1.7);\r\n\r\n\t// TODO: Expose these as actions to register custom easings?\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"ease\": true;\r\n\t\"easeIn\": true;\r\n\t\"ease-in\": true;\r\n\t\"easeOut\": true;\r\n\t\"ease-out\": true;\r\n\t\"easeInOut\": true;\r\n\t\"ease-in-out\": true;\r\n\t\"easeInSine\": true;\r\n\t\"easeOutSine\": true;\r\n\t\"easeInOutSine\": true;\r\n\t\"easeInQuad\": true;\r\n\t\"easeOutQuad\": true;\r\n\t\"easeInOutQuad\": true;\r\n\t\"easeInCubic\": true;\r\n\t\"easeOutCubic\": true;\r\n\t\"easeInOutCubic\": true;\r\n\t\"easeInQuart\": true;\r\n\t\"easeOutQuart\": true;\r\n\t\"easeInOutQuart\": true;\r\n\t\"easeInQuint\": true;\r\n\t\"easeOutQuint\": true;\r\n\t\"easeInOutQuint\": true;\r\n\t\"easeInExpo\": true;\r\n\t\"easeOutExpo\": true;\r\n\t\"easeInOutExpo\": true;\r\n\t\"easeInCirc\": true;\r\n\t\"easeOutCirc\": true;\r\n\t\"easeInOutCirc\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\t/**\r\n\t * Fix to a range of 0 <= num <= 1.\r\n\t */\r\n\tfunction fixRange(num: number) {\r\n\t\treturn Math.min(Math.max(num, 0), 1);\r\n\t}\r\n\r\n\tfunction A(aA1, aA2) {\r\n\t\treturn 1.0 - 3.0 * aA2 + 3.0 * aA1;\r\n\t}\r\n\r\n\tfunction B(aA1, aA2) {\r\n\t\treturn 3.0 * aA2 - 6.0 * aA1;\r\n\t}\r\n\r\n\tfunction C(aA1) {\r\n\t\treturn 3.0 * aA1;\r\n\t}\r\n\r\n\tfunction calcBezier(aT, aA1, aA2) {\r\n\t\treturn ((A(aA1, aA2) * aT + B(aA1, aA2)) * aT + C(aA1)) * aT;\r\n\t}\r\n\r\n\tfunction getSlope(aT, aA1, aA2) {\r\n\t\treturn 3.0 * A(aA1, aA2) * aT * aT + 2.0 * B(aA1, aA2) * aT + C(aA1);\r\n\t}\r\n\r\n\texport function generateBezier(mX1: number, mY1: number, mX2: number, mY2: number): VelocityEasingFn {\r\n\t\tconst NEWTON_ITERATIONS = 4,\r\n\t\t\tNEWTON_MIN_SLOPE = 0.001,\r\n\t\t\tSUBDIVISION_PRECISION = 0.0000001,\r\n\t\t\tSUBDIVISION_MAX_ITERATIONS = 10,\r\n\t\t\tkSplineTableSize = 11,\r\n\t\t\tkSampleStepSize = 1.0 / (kSplineTableSize - 1.0),\r\n\t\t\tfloat32ArraySupported = \"Float32Array\" in window;\r\n\r\n\t\t/* Must contain four arguments. */\r\n\t\tif (arguments.length !== 4) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t/* Arguments must be numbers. */\r\n\t\tfor (let i = 0; i < 4; ++i) {\r\n\t\t\tif (typeof arguments[i] !== \"number\" || isNaN(arguments[i]) || !isFinite(arguments[i])) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* X values must be in the [0, 1] range. */\r\n\t\tmX1 = fixRange(mX1);\r\n\t\tmX2 = fixRange(mX2);\r\n\r\n\t\tconst mSampleValues = float32ArraySupported ? new Float32Array(kSplineTableSize) : new Array(kSplineTableSize);\r\n\r\n\t\tfunction newtonRaphsonIterate(aX, aGuessT) {\r\n\t\t\tfor (let i = 0; i < NEWTON_ITERATIONS; ++i) {\r\n\t\t\t\tconst currentSlope = getSlope(aGuessT, mX1, mX2);\r\n\r\n\t\t\t\tif (currentSlope === 0.0) {\r\n\t\t\t\t\treturn aGuessT;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tconst currentX = calcBezier(aGuessT, mX1, mX2) - aX;\r\n\t\t\t\taGuessT -= currentX / currentSlope;\r\n\t\t\t}\r\n\r\n\t\t\treturn aGuessT;\r\n\t\t}\r\n\r\n\t\tfunction calcSampleValues() {\r\n\t\t\tfor (let i = 0; i < kSplineTableSize; ++i) {\r\n\t\t\t\tmSampleValues[i] = calcBezier(i * kSampleStepSize, mX1, mX2);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfunction binarySubdivide(aX, aA, aB) {\r\n\t\t\tlet currentX, currentT, i = 0;\r\n\r\n\t\t\tdo {\r\n\t\t\t\tcurrentT = aA + (aB - aA) / 2.0;\r\n\t\t\t\tcurrentX = calcBezier(currentT, mX1, mX2) - aX;\r\n\t\t\t\tif (currentX > 0.0) {\r\n\t\t\t\t\taB = currentT;\r\n\t\t\t\t} else {\r\n\t\t\t\t\taA = currentT;\r\n\t\t\t\t}\r\n\t\t\t} while (Math.abs(currentX) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS);\r\n\r\n\t\t\treturn currentT;\r\n\t\t}\r\n\r\n\t\tfunction getTForX(aX) {\r\n\t\t\tlet intervalStart = 0.0,\r\n\t\t\t\tcurrentSample = 1,\r\n\t\t\t\tlastSample = kSplineTableSize - 1;\r\n\r\n\t\t\tfor (; currentSample !== lastSample && mSampleValues[currentSample] <= aX; ++currentSample) {\r\n\t\t\t\tintervalStart += kSampleStepSize;\r\n\t\t\t}\r\n\r\n\t\t\t--currentSample;\r\n\r\n\t\t\tconst dist = (aX - mSampleValues[currentSample]) / (mSampleValues[currentSample + 1] - mSampleValues[currentSample]),\r\n\t\t\t\tguessForT = intervalStart + dist * kSampleStepSize,\r\n\t\t\t\tinitialSlope = getSlope(guessForT, mX1, mX2);\r\n\r\n\t\t\tif (initialSlope >= NEWTON_MIN_SLOPE) {\r\n\t\t\t\treturn newtonRaphsonIterate(aX, guessForT);\r\n\t\t\t} else if (initialSlope === 0.0) {\r\n\t\t\t\treturn guessForT;\r\n\t\t\t} else {\r\n\t\t\t\treturn binarySubdivide(aX, intervalStart, intervalStart + kSampleStepSize);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tlet _precomputed = false;\r\n\r\n\t\tfunction precompute() {\r\n\t\t\t_precomputed = true;\r\n\t\t\tif (mX1 !== mY1 || mX2 !== mY2) {\r\n\t\t\t\tcalcSampleValues();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tconst f = function(percentComplete: number, startValue: number, endValue: number, property?: string) {\r\n\t\t\tif (!_precomputed) {\r\n\t\t\t\tprecompute();\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\tif (mX1 === mY1 && mX2 === mY2) {\r\n\t\t\t\treturn startValue + percentComplete * (endValue - startValue);\r\n\t\t\t}\r\n\t\t\treturn startValue + calcBezier(getTForX(percentComplete), mY1, mY2) * (endValue - startValue);\r\n\t\t};\r\n\r\n\t\t(f as any).getControlPoints = function() {\r\n\t\t\treturn [{x: mX1, y: mY1}, {x: mX2, y: mY2}];\r\n\t\t};\r\n\r\n\t\tconst str = \"generateBezier(\" + [mX1, mY1, mX2, mY2] + \")\";\r\n\t\tf.toString = function() {\r\n\t\t\treturn str;\r\n\t\t};\r\n\r\n\t\treturn f;\r\n\t}\r\n\r\n\t/* Common easings */\r\n\tconst easeIn = generateBezier(0.42, 0.0, 1.00, 1.0),\r\n\t\teaseOut = generateBezier(0.00, 0.0, 0.58, 1.0),\r\n\t\teaseInOut = generateBezier(0.42, 0.0, 0.58, 1.0);\r\n\r\n\tregisterEasing([\"ease\", generateBezier(0.25, 0.1, 0.25, 1.0)]);\r\n\tregisterEasing([\"easeIn\", easeIn]);\r\n\tregisterEasing([\"ease-in\", easeIn]);\r\n\tregisterEasing([\"easeOut\", easeOut]);\r\n\tregisterEasing([\"ease-out\", easeOut]);\r\n\tregisterEasing([\"easeInOut\", easeInOut]);\r\n\tregisterEasing([\"ease-in-out\", easeInOut]);\r\n\tregisterEasing([\"easeInSine\", generateBezier(0.47, 0, 0.745, 0.715)]);\r\n\tregisterEasing([\"easeOutSine\", generateBezier(0.39, 0.575, 0.565, 1)]);\r\n\tregisterEasing([\"easeInOutSine\", generateBezier(0.445, 0.05, 0.55, 0.95)]);\r\n\tregisterEasing([\"easeInQuad\", generateBezier(0.55, 0.085, 0.68, 0.53)]);\r\n\tregisterEasing([\"easeOutQuad\", generateBezier(0.25, 0.46, 0.45, 0.94)]);\r\n\tregisterEasing([\"easeInOutQuad\", generateBezier(0.455, 0.03, 0.515, 0.955)]);\r\n\tregisterEasing([\"easeInCubic\", generateBezier(0.55, 0.055, 0.675, 0.19)]);\r\n\tregisterEasing([\"easeOutCubic\", generateBezier(0.215, 0.61, 0.355, 1)]);\r\n\tregisterEasing([\"easeInOutCubic\", generateBezier(0.645, 0.045, 0.355, 1)]);\r\n\tregisterEasing([\"easeInQuart\", generateBezier(0.895, 0.03, 0.685, 0.22)]);\r\n\tregisterEasing([\"easeOutQuart\", generateBezier(0.165, 0.84, 0.44, 1)]);\r\n\tregisterEasing([\"easeInOutQuart\", generateBezier(0.77, 0, 0.175, 1)]);\r\n\tregisterEasing([\"easeInQuint\", generateBezier(0.755, 0.05, 0.855, 0.06)]);\r\n\tregisterEasing([\"easeOutQuint\", generateBezier(0.23, 1, 0.32, 1)]);\r\n\tregisterEasing([\"easeInOutQuint\", generateBezier(0.86, 0, 0.07, 1)]);\r\n\tregisterEasing([\"easeInExpo\", generateBezier(0.95, 0.05, 0.795, 0.035)]);\r\n\tregisterEasing([\"easeOutExpo\", generateBezier(0.19, 1, 0.22, 1)]);\r\n\tregisterEasing([\"easeInOutExpo\", generateBezier(1, 0, 0, 1)]);\r\n\tregisterEasing([\"easeInCirc\", generateBezier(0.6, 0.04, 0.98, 0.335)]);\r\n\tregisterEasing([\"easeOutCirc\", generateBezier(0.075, 0.82, 0.165, 1)]);\r\n\tregisterEasing([\"easeInOutCirc\", generateBezier(0.785, 0.135, 0.15, 0.86)]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Bounce easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"easeInBounce\": true;\r\n\t\"easeOutBounce\": true;\r\n\t\"easeInOutBounce\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tfunction easeOutBounce(percentComplete: number): number {\r\n\t\tif (percentComplete < 1 / 2.75) {\r\n\t\t\treturn (7.5625 * percentComplete * percentComplete);\r\n\t\t}\r\n\t\tif (percentComplete < 2 / 2.75) {\r\n\t\t\treturn (7.5625 * (percentComplete -= 1.5 / 2.75) * percentComplete + 0.75);\r\n\t\t}\r\n\t\tif (percentComplete < 2.5 / 2.75) {\r\n\t\t\treturn (7.5625 * (percentComplete -= 2.25 / 2.75) * percentComplete + 0.9375);\r\n\t\t}\r\n\t\treturn (7.5625 * (percentComplete -= 2.625 / 2.75) * percentComplete + 0.984375);\r\n\t};\r\n\r\n\tfunction easeInBounce(percentComplete: number): number {\r\n\t\treturn 1 - easeOutBounce(1 - percentComplete);\r\n\t};\r\n\r\n\tregisterEasing([\"easeInBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn easeInBounce(percentComplete) * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"easeOutBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn easeOutBounce(percentComplete) * (endValue - startValue);\r\n\t}]);\r\n\r\n\tregisterEasing([\"easeInOutBounce\", function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\tif (percentComplete === 0) {\r\n\t\t\treturn startValue;\r\n\t\t}\r\n\t\tif (percentComplete === 1) {\r\n\t\t\treturn endValue;\r\n\t\t}\r\n\t\treturn (percentComplete < 0.5\r\n\t\t\t? easeInBounce(percentComplete * 2) * .5\r\n\t\t\t: easeOutBounce(percentComplete * 2 - 1) * 0.5 + 0.5\r\n\t\t) * (endValue - startValue);\r\n\t}]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Elastic easings, based on code from https://github.com/yuichiroharai/easeplus-velocity\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"easeInElastic\": true;\r\n\t\"easeOutElastic\": true;\r\n\t\"easeInOutElastic\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tconst pi2 = Math.PI * 2;\r\n\r\n\texport function registerElasticIn(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn -(amplitude * Math.pow(2, 10 * (percentComplete -= 1)) * Math.sin((percentComplete - (period / pi2 * Math.asin(1 / amplitude))) * pi2 / period)) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerElasticOut(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn (amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - (period / pi2 * Math.asin(1 / amplitude))) * pi2 / period) + 1) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\texport function registerElasticInOut(name: string, amplitude: number, period: number) {\r\n\t\tregisterEasing([name, function(percentComplete: number, startValue: number, endValue: number): number {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\tconst s = period / pi2 * Math.asin(1 / amplitude);\r\n\r\n\t\t\tpercentComplete = percentComplete * 2 - 1;\r\n\t\t\treturn (percentComplete < 0\r\n\t\t\t\t? -0.5 * (amplitude * Math.pow(2, 10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period))\r\n\t\t\t\t: amplitude * Math.pow(2, -10 * percentComplete) * Math.sin((percentComplete - s) * pi2 / period) * 0.5 + 1\r\n\t\t\t) * (endValue - startValue);\r\n\t\t}]);\r\n\t}\r\n\r\n\tregisterElasticIn(\"easeInElastic\", 1, 0.3);\r\n\tregisterElasticOut(\"easeOutElastic\", 1, 0.3);\r\n\tregisterElasticInOut(\"easeInOutElastic\", 1, 0.3 * 1.5);\r\n\r\n\t// TODO: Expose these as actions to register custom easings?\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\r\n\tinterface springState {\r\n\t\tx: number;\r\n\t\tv: number;\r\n\t\ttension: number;\r\n\t\tfriction: number;\r\n\t};\r\n\r\n\tinterface springDelta {\r\n\t\tdx: number;\r\n\t\tdv: number;\r\n\t};\r\n\r\n\t/* Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */\r\n\t/* 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\r\n\t then adjusts the time delta -- using the relation between actual time and duration -- to calculate the path for the duration-constrained animation. */\r\n\tfunction springAccelerationForState(state: springState) {\r\n\t\treturn (-state.tension * state.x) - (state.friction * state.v);\r\n\t}\r\n\r\n\tfunction springEvaluateStateWithDerivative(initialState: springState, dt: number, derivative: springDelta): springDelta {\r\n\t\tconst state = {\r\n\t\t\tx: initialState.x + derivative.dx * dt,\r\n\t\t\tv: initialState.v + derivative.dv * dt,\r\n\t\t\ttension: initialState.tension,\r\n\t\t\tfriction: initialState.friction\r\n\t\t};\r\n\r\n\t\treturn {\r\n\t\t\tdx: state.v,\r\n\t\t\tdv: springAccelerationForState(state)\r\n\t\t};\r\n\t}\r\n\r\n\tfunction springIntegrateState(state: springState, dt: number) {\r\n\t\tconst a = {\r\n\t\t\tdx: state.v,\r\n\t\t\tdv: springAccelerationForState(state)\r\n\t\t},\r\n\t\t\tb = springEvaluateStateWithDerivative(state, dt * 0.5, a),\r\n\t\t\tc = springEvaluateStateWithDerivative(state, dt * 0.5, b),\r\n\t\t\td = springEvaluateStateWithDerivative(state, dt, c),\r\n\t\t\tdxdt = 1.0 / 6.0 * (a.dx + 2.0 * (b.dx + c.dx) + d.dx),\r\n\t\t\tdvdt = 1.0 / 6.0 * (a.dv + 2.0 * (b.dv + c.dv) + d.dv);\r\n\r\n\t\tstate.x = state.x + dxdt * dt;\r\n\t\tstate.v = state.v + dvdt * dt;\r\n\r\n\t\treturn state;\r\n\t}\r\n\r\n\texport function generateSpringRK4(tension: number, friction: number): number;\r\n\texport function generateSpringRK4(tension: number, friction: number, duration: number): VelocityEasingFn;\r\n\texport function generateSpringRK4(tension: number, friction: number, duration?: number): any {\r\n\t\tlet initState: springState = {\r\n\t\t\tx: -1,\r\n\t\t\tv: 0,\r\n\t\t\ttension: parseFloat(tension as any) || 500,\r\n\t\t\tfriction: parseFloat(friction as any) || 20\r\n\t\t},\r\n\t\t\tpath = [0],\r\n\t\t\ttime_lapsed = 0,\r\n\t\t\ttolerance = 1 / 10000,\r\n\t\t\tDT = 16 / 1000,\r\n\t\t\thave_duration = duration != null, // deliberate \"==\", as undefined == null != 0\r\n\t\t\tdt: number,\r\n\t\t\tlast_state: springState;\r\n\r\n\t\t/* Calculate the actual time it takes for this animation to complete with the provided conditions. */\r\n\t\tif (have_duration) {\r\n\t\t\t/* Run the simulation without a duration. */\r\n\t\t\ttime_lapsed = generateSpringRK4(initState.tension, initState.friction);\r\n\t\t\t/* Compute the adjusted time delta. */\r\n\t\t\tdt = (time_lapsed as number) / duration * DT;\r\n\t\t} else {\r\n\t\t\tdt = DT;\r\n\t\t}\r\n\r\n\t\twhile (true) {\r\n\t\t\t/* Next/step function .*/\r\n\t\t\tlast_state = springIntegrateState(last_state || initState, dt);\r\n\t\t\t/* Store the position. */\r\n\t\t\tpath.push(1 + last_state.x);\r\n\t\t\ttime_lapsed += 16;\r\n\t\t\t/* If the change threshold is reached, break. */\r\n\t\t\tif (!(Math.abs(last_state.x) > tolerance && Math.abs(last_state.v) > tolerance)) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* If duration is not defined, return the actual time required for completing this animation. Otherwise, return a closure that holds the\r\n\t\t computed path and returns a snapshot of the position according to a given percentComplete. */\r\n\t\treturn !have_duration ? time_lapsed : function(percentComplete: number, startValue: number, endValue: number) {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn startValue + path[(percentComplete * (path.length - 1)) | 0] * (endValue - startValue);\r\n\t\t};\r\n\t};\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details\r\n * \r\n * Step easing generator.\r\n */\r\n\r\nnamespace VelocityStatic.Easing {\r\n\tconst cache: {[steps: number]: VelocityEasingFn} = {};\r\n\r\n\texport function generateStep(steps): VelocityEasingFn {\r\n\t\tconst fn = cache[steps];\r\n\r\n\t\tif (fn) {\r\n\t\t\treturn fn;\r\n\t\t}\r\n\t\treturn cache[steps] = function(percentComplete: number, startValue: number, endValue: number) {\r\n\t\t\tif (percentComplete === 0) {\r\n\t\t\t\treturn startValue;\r\n\t\t\t}\r\n\t\t\tif (percentComplete === 1) {\r\n\t\t\t\treturn endValue;\r\n\t\t\t}\r\n\t\t\treturn startValue + Math.round(percentComplete * steps) * (1 / steps) * (endValue - startValue);\r\n\t\t};\r\n\t}\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Easings to act on strings, either set at the start or at the end depending on\r\n * need.\r\n */\r\n\r\ninterface VelocityEasingsType {\r\n\t\"at-start\": true;\r\n\t\"during\": true;\r\n\t\"at-end\": true;\r\n}\r\n\r\nnamespace VelocityStatic.Easing {\r\n\t/**\r\n\t * Easing function that sets to the specified value immediately after the\r\n\t * animation starts.\r\n\t */\r\n\tregisterEasing([\"at-start\", function(percentComplete: number, startValue: any, endValue: any): any {\r\n\t\treturn percentComplete === 0\r\n\t\t\t? startValue\r\n\t\t\t: endValue;\r\n\t} as any]);\r\n\r\n\t/**\r\n\t * Easing function that sets to the specified value while the animation is\r\n\t * running.\r\n\t */\r\n\tregisterEasing([\"during\", function(percentComplete: number, startValue: any, endValue: any): any {\r\n\t\treturn percentComplete === 0 || percentComplete === 1\r\n\t\t\t? startValue\r\n\t\t\t: endValue;\r\n\t} as any]);\r\n\r\n\t/**\r\n\t * Easing function that sets to the specified value when the animation ends.\r\n\t */\r\n\tregisterEasing([\"at-end\", function(percentComplete: number, startValue: any, endValue: any): any {\r\n\t\treturn percentComplete === 1\r\n\t\t\t? endValue\r\n\t\t\t: startValue;\r\n\t} as any]);\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Normalisations are used when getting or setting a (normally css compound\r\n * properties) value that can have a different order in different browsers.\r\n * \r\n * It can also be used to extend and create specific properties that otherwise\r\n * don't exist (such as for scrolling, or inner/outer dimensions).\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * The highest type index for finding the best normalization for a property.\r\n\t */\r\n\texport let MaxType: number = -1;\r\n\r\n\t/**\r\n\t * Unlike \"actions\", normalizations can always be replaced by users.\r\n\t */\r\n\texport const Normalizations: {[name: string]: VelocityNormalizationsFn}[] = [];\r\n\r\n\t/**\r\n\t * Store a cross-reference to units to be added to specific normalization\r\n\t * functions if the user supplies a unit-less number.\r\n\t * \r\n\t * This is pretty much confined to adding \"px\" to several css properties.\r\n\t */\r\n\texport const NormalizationUnits: {[unit: string]: VelocityNormalizationsFn[]} = createEmptyObject();\r\n\r\n\t/**\r\n\t * Any normalisations that should never be cached are listed here.\r\n\t * Faster than an array - https://jsperf.com/array-includes-and-find-methods-vs-set-has\r\n\t */\r\n\texport const NoCacheNormalizations = new Set();\r\n\r\n\t/**\r\n\t * Used to define a constructor.\r\n\t */\r\n\tinterface ClassConstructor {\r\n\t\tnew(): Object;\r\n\t}\r\n\r\n\t/**\r\n\t * An array of classes used for the per-class normalizations. This\r\n\t * translates into a bitwise enum for quick cross-reference, and so that\r\n\t * the element doesn't need multiple instanceof calls every\r\n\t * frame.\r\n\t */\r\n\texport const constructors: ClassConstructor[] = [];\r\n\r\n\t/**\r\n\t * Used to register a normalization. This should never be called by users\r\n\t * directly, instead it should be called via an action:
\r\n\t * Velocity(\"registerNormalization\", Element, \"name\", VelocityNormalizationsFn[, false]);\r\n\t * \r\n\t * The fourth argument can be an explicit false, which prevents\r\n\t * the property from being cached. Please note that this can be dangerous\r\n\t * for performance!\r\n\t *\r\n\t * @private\r\n\t */\r\n\texport function registerNormalization(args?: [ClassConstructor, string, VelocityNormalizationsFn] | [ClassConstructor, string, VelocityNormalizationsFn, boolean] | [ClassConstructor, string, VelocityNormalizationsFn, string] | [ClassConstructor, string, VelocityNormalizationsFn, string, boolean]) {\r\n\t\tconst constructor = args[0],\r\n\t\t\tname: string = args[1],\r\n\t\t\tcallback = args[2];\r\n\r\n\t\tif (isString(constructor) || !(constructor instanceof Object)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' constructor to an invalid value:\", constructor);\r\n\t\t} else if (!isString(name)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' name to an invalid value:\", name);\r\n\t\t} else if (!isFunction(callback)) {\r\n\t\t\tconsole.warn(\"VelocityJS: Trying to set 'registerNormalization' callback to an invalid value:\", name, callback);\r\n\t\t} else {\r\n\t\t\tlet index = constructors.indexOf(constructor),\r\n\t\t\t\tnextArg = 3;\r\n\r\n\t\t\tif (index < 0) {\r\n\t\t\t\tMaxType = index = constructors.push(constructor) - 1;\r\n\t\t\t\tNormalizations[index] = createEmptyObject();\r\n\t\t\t}\r\n\t\t\tNormalizations[index][name] = callback;\r\n\t\t\tif (isString(args[nextArg])) {\r\n\t\t\t\tlet unit = args[nextArg++] as string,\r\n\t\t\t\t\tunits = NormalizationUnits[unit];\r\n\r\n\t\t\t\tif (!units) {\r\n\t\t\t\t\tunits = NormalizationUnits[unit] = [];\r\n\t\t\t\t}\r\n\t\t\t\tunits.push(callback);\r\n\t\t\t}\r\n\t\t\tif (args[nextArg] === false) {\r\n\t\t\t\tNoCacheNormalizations.add(name);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Used to check if a normalisation exists on a specific class.\r\n\t */\r\n\texport function hasNormalization(args?: [ClassConstructor, string]) {\r\n\t\tconst constructor = args[0],\r\n\t\t\tname: string = args[1];\r\n\t\tlet index = constructors.indexOf(constructor);\r\n\r\n\t\treturn !!Normalizations[index][name];\r\n\t}\r\n\r\n\t/**\r\n\t * Get the unit to add to a unitless number based on the normalization used.\r\n\t */\r\n\texport function getNormalizationUnit(fn: VelocityNormalizationsFn) {\r\n\t\tfor (let unit in NormalizationUnits) {\r\n\t\t\tif (_inArray(NormalizationUnits[unit], fn)) {\r\n\t\t\t\treturn unit;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn \"\";\r\n\t}\r\n\r\n\t/**\r\n\t * Get the normalization for an element and propertyName combination. This\r\n\t * value should be cached at asking time, as it may change if the user adds\r\n\t * more normalizations.\r\n\t */\r\n\texport function getNormalization(element: HTMLorSVGElement, propertyName: string) {\r\n\t\tconst data = Data(element);\r\n\t\tlet fn: VelocityNormalizationsFn;\r\n\r\n\t\tfor (let index = MaxType, types = data.types; !fn && index >= 0; index--) {\r\n\t\t\tif (types & (1 << index)) {\r\n\t\t\t\tfn = Normalizations[index][propertyName];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn fn;\r\n\t}\r\n\r\n\tregisterAction([\"registerNormalization\", registerNormalization]);\r\n\tregisterAction([\"hasNormalization\", hasNormalization]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t/**\r\n\t * Get/set an attribute.\r\n\t */\r\n\tfunction getAttribute(name: string) {\r\n\t\treturn function(element: Element, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn element.getAttribute(name);\r\n\t\t\t}\r\n\t\t\telement.setAttribute(name, propertyValue);\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tconst base = document.createElement(\"div\"),\r\n\t\trxSubtype = /^SVG(.*)Element$/,\r\n\t\trxElement = /Element$/;\r\n\r\n\tObject.getOwnPropertyNames(window).forEach(function(globals) {\r\n\t\tconst subtype = rxSubtype.exec(globals);\r\n\r\n\t\tif (subtype && subtype[1] !== \"SVG\") { // Don't do SVGSVGElement.\r\n\t\t\ttry {\r\n\t\t\t\tconst element = subtype[1] ? document.createElementNS(\"http://www.w3.org/2000/svg\", (subtype[1] || \"svg\").toLowerCase()) : document.createElement(\"svg\"),\r\n\t\t\t\t\tconstructor = element.constructor;\r\n\r\n\t\t\t\tfor (let attribute in element) {\r\n\t\t\t\t\tconst value = element[attribute];\r\n\r\n\t\t\t\t\tif (isString(attribute)\r\n\t\t\t\t\t\t&& !(attribute[0] === \"o\" && attribute[1] === \"n\")\r\n\t\t\t\t\t\t&& attribute !== attribute.toUpperCase()\r\n\t\t\t\t\t\t&& !rxElement.test(attribute)\r\n\t\t\t\t\t\t&& !(attribute in base)\r\n\t\t\t\t\t\t&& !isFunction(value)) {\r\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\r\n\t\t\t\t\t\tregisterNormalization([constructor as any, attribute, getAttribute(attribute)]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} catch (e) {\r\n\t\t\t\tconsole.error(\"VelocityJS: Error when trying to identify SVG attributes on \" + globals + \".\", e);\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic.CSS {\r\n\r\n\t/**\r\n\t * Get/set the width or height.\r\n\t */\r\n\tfunction getDimension(name: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\t// Firefox throws an error if .getBBox() is called on an SVG that isn't attached to the DOM.\r\n\t\t\t\ttry {\r\n\t\t\t\t\treturn (element as SVGGraphicsElement).getBBox()[name] + \"px\";\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\treturn \"0px\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telement.setAttribute(name, propertyValue);\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([SVGElement, \"width\", getDimension(\"width\")]);\r\n\tregisterNormalization([SVGElement, \"height\", getDimension(\"height\")]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Figure out the dimensions for this width / height based on the\r\n\t * potential borders and whether we care about them.\r\n\t */\r\n\texport function augmentDimension(element: HTMLorSVGElement, name: \"width\" | \"height\", wantInner: boolean): number {\r\n\t\tconst isBorderBox = CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() === \"border-box\";\r\n\r\n\t\tif (isBorderBox === wantInner) {\r\n\t\t\t// in box-sizing mode, the CSS width / height accessors already\r\n\t\t\t// give the outerWidth / outerHeight.\r\n\t\t\tconst sides = name === \"width\" ? [\"Left\", \"Right\"] : [\"Top\", \"Bottom\"],\r\n\t\t\t\tfields = [\"padding\" + sides[0], \"padding\" + sides[1], \"border\" + sides[0] + \"Width\", \"border\" + sides[1] + \"Width\"];\r\n\t\t\tlet i: number,\r\n\t\t\t\tvalue: number,\r\n\t\t\t\taugment = 0;\r\n\r\n\t\t\tfor (i = 0; i < fields.length; i++) {\r\n\t\t\t\tvalue = parseFloat(CSS.getPropertyValue(element, fields[i]) as string);\r\n\t\t\t\tif (!isNaN(value)) {\r\n\t\t\t\t\taugment += value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn wantInner ? -augment : augment;\r\n\t\t}\r\n\t\treturn 0;\r\n\t}\r\n\r\n\t/**\r\n\t * Get/set the inner/outer dimension.\r\n\t */\r\n\tfunction getDimension(name: \"width\" | \"height\", wantInner: boolean) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn augmentDimension(element, name, wantInner) + \"px\";\r\n\t\t\t}\r\n\t\t\tCSS.setPropertyValue(element, name, (parseFloat(propertyValue) - augmentDimension(element, name, wantInner)) + \"px\");\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"innerWidth\", getDimension(\"width\", true)]);\r\n\tregisterNormalization([Element, \"innerHeight\", getDimension(\"height\", true)]);\r\n\tregisterNormalization([Element, \"outerWidth\", getDimension(\"width\", false)]);\r\n\tregisterNormalization([Element, \"outerHeight\", getDimension(\"height\", false)]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport 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,\r\n\t\tlistItemRx = /^(li)$/i,\r\n\t\ttableRowRx = /^(tr)$/i,\r\n\t\ttableRx = /^(table)$/i,\r\n\t\ttableRowGroupRx = /^(tbody)$/i;\r\n\r\n\t/**\r\n\t * Display has an extra value of \"auto\" that works out the correct value\r\n\t * based on the type of element.\r\n\t */\r\n\tfunction display(element: HTMLorSVGElement): string;\r\n\tfunction display(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction display(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tconst style = element.style;\r\n\r\n\t\tif (propertyValue === undefined) {\r\n\t\t\treturn CSS.computePropertyValue(element, \"display\");\r\n\t\t}\r\n\t\tif (propertyValue === \"auto\") {\r\n\t\t\tconst nodeName = element && element.nodeName,\r\n\t\t\t\tdata = Data(element);\r\n\r\n\t\t\tif (inlineRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"inline\";\r\n\t\t\t} else if (listItemRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"list-item\";\r\n\t\t\t} else if (tableRowRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table-row\";\r\n\t\t\t} else if (tableRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table\";\r\n\t\t\t} else if (tableRowGroupRx.test(nodeName)) {\r\n\t\t\t\tpropertyValue = \"table-row-group\";\r\n\t\t\t} else {\r\n\t\t\t\t// Default to \"block\" when no match is found.\r\n\t\t\t\tpropertyValue = \"block\";\r\n\t\t\t}\r\n\t\t\t// IMPORTANT: We need to do this as getPropertyValue bypasses the\r\n\t\t\t// Normalisation when it exists in the cache.\r\n\t\t\tdata.cache[\"display\"] = propertyValue;\r\n\t\t}\r\n\t\tstyle.display = propertyValue;\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"display\", display]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Get the scrollWidth of an element.\r\n\t */\r\n\tfunction clientWidth(element: HTMLorSVGElement): string;\r\n\tfunction clientWidth(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction clientWidth(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientWidth + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollWidth of an element.\r\n\t */\r\n\tfunction scrollWidth(element: HTMLorSVGElement): string;\r\n\tfunction scrollWidth(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction scrollWidth(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollWidth + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollHeight of an element.\r\n\t */\r\n\tfunction clientHeight(element: HTMLorSVGElement): string;\r\n\tfunction clientHeight(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction clientHeight(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.clientHeight + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Get the scrollHeight of an element.\r\n\t */\r\n\tfunction scrollHeight(element: HTMLorSVGElement): string;\r\n\tfunction scrollHeight(element: HTMLorSVGElement, propertyValue: string): void;\r\n\tfunction scrollHeight(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\tif (propertyValue == null) {\r\n\t\t\treturn element.scrollHeight + \"px\";\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Scroll an element.\r\n\t */\r\n\tfunction scroll(direction: \"Height\", end: \"Top\"): VelocityNormalizationsFn;\r\n\tfunction scroll(direction: \"Width\", end: \"Left\"): VelocityNormalizationsFn;\r\n\tfunction scroll(direction: \"Height\" | \"Width\", end: \"Top\" | \"Left\"): VelocityNormalizationsFn {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue == null) {\r\n\t\t\t\t// Make sure we have these values cached.\r\n\t\t\t\tCSS.getPropertyValue(element, \"client\" + direction, null, true);\r\n\t\t\t\tCSS.getPropertyValue(element, \"scroll\" + direction, null, true);\r\n\t\t\t\tCSS.getPropertyValue(element, \"scroll\" + end, null, true);\r\n\t\t\t\treturn element[\"scroll\" + end] + \"px\";\r\n\t\t\t}\r\n\t\t\t//\t\tconsole.log(\"setScrollTop\", propertyValue)\r\n\t\t\tconst value = parseFloat(propertyValue),\r\n\t\t\t\tunit = propertyValue.replace(String(value), \"\");\r\n\r\n\t\t\tswitch (unit) {\r\n\t\t\t\tcase \"\":\r\n\t\t\t\tcase \"px\":\r\n\t\t\t\t\telement[\"scroll\" + end] = value;\r\n\t\t\t\t\tbreak;\r\n\r\n\t\t\t\tcase \"%\":\r\n\t\t\t\t\tlet client = parseFloat(CSS.getPropertyValue(element, \"client\" + direction)),\r\n\t\t\t\t\t\tscroll = parseFloat(CSS.getPropertyValue(element, \"scroll\" + direction));\r\n\r\n\t\t\t\t\t//\t\t\t\tconsole.log(\"setScrollTop percent\", scrollHeight, clientHeight, value, Math.max(0, scrollHeight - clientHeight) * value / 100)\r\n\t\t\t\t\telement[\"scroll\" + end] = Math.max(0, scroll - client) * value / 100;\r\n\t\t\t}\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\tregisterNormalization([HTMLElement, \"scroll\", scroll(\"Height\", \"Top\"), false]);\r\n\tregisterNormalization([HTMLElement, \"scrollTop\", scroll(\"Height\", \"Top\"), false]);\r\n\tregisterNormalization([HTMLElement, \"scrollLeft\", scroll(\"Width\", \"Left\"), false]);\r\n\tregisterNormalization([HTMLElement, \"scrollWidth\", scrollWidth]);\r\n\tregisterNormalization([HTMLElement, \"clientWidth\", clientWidth]);\r\n\tregisterNormalization([HTMLElement, \"scrollHeight\", scrollHeight]);\r\n\tregisterNormalization([HTMLElement, \"clientHeight\", clientHeight]);\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * This handles all CSS style properties. With browser prefixed properties it\r\n * will register a version that handles setting (and getting) both the prefixed\r\n * and non-prefixed version.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * An RegExp pattern for the following list of css words using\r\n\t * http://kemio.com.ar/tools/lst-trie-re.php to generate:\r\n\t * \r\n\t * blockSize\r\n\t * borderBottomLeftRadius\r\n\t * borderBottomRightRadius\r\n\t * borderBottomWidth\r\n\t * borderImageOutset\r\n\t * borderImageWidth\r\n\t * borderLeftWidth\r\n\t * borderRadius\r\n\t * borderRightWidth\r\n\t * borderSpacing\r\n\t * borderTopLeftRadius\r\n\t * borderTopRightRadius\r\n\t * borderTopWidth\r\n\t * borderWidth\r\n\t * bottom\r\n\t * columnGap\r\n\t * columnRuleWidth\r\n\t * columnWidth\r\n\t * flexBasis\r\n\t * fontSize\r\n\t * gridColumnGap\r\n\t * gridGap\r\n\t * gridRowGap\r\n\t * height\r\n\t * inlineSize\r\n\t * left\r\n\t * letterSpacing\r\n\t * margin\r\n\t * marginBottom\r\n\t * marginLeft\r\n\t * marginRight\r\n\t * marginTop\r\n\t * maxBlockSize\r\n\t * maxHeight\r\n\t * maxInlineSize\r\n\t * maxWidth\r\n\t * minBlockSize\r\n\t * minHeight\r\n\t * minInlineSize\r\n\t * minWidth\r\n\t * objectPosition\r\n\t * outlineOffset\r\n\t * outlineWidth\r\n\t * padding\r\n\t * paddingBottom\r\n\t * paddingLeft\r\n\t * paddingRight\r\n\t * paddingTop\r\n\t * perspective\r\n\t * right\r\n\t * shapeMargin\r\n\t * strokeDashoffset\r\n\t * strokeWidth\r\n\t * textIndent\r\n\t * top\r\n\t * transformOrigin\r\n\t * width\r\n\t * wordSpacing\r\n\t */\r\n\tconst 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))$/;\r\n\r\n\t/**\r\n\t * Return a Normalisation that can be used to set / get a prefixed style\r\n\t * property.\r\n\t */\r\n\tfunction getSetPrefixed(propertyName: string, unprefixed: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn CSS.computePropertyValue(element, propertyName) || CSS.computePropertyValue(element, unprefixed);\r\n\t\t\t}\r\n\t\t\telement.style[propertyName] = element.style[unprefixed] = propertyValue;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\t/**\r\n\t * Return a Normalisation that can be used to set / get a style property.\r\n\t */\r\n\tfunction getSetStyle(propertyName: string) {\r\n\t\treturn function(element: HTMLorSVGElement, propertyValue?: string): string | void {\r\n\t\t\tif (propertyValue === undefined) {\r\n\t\t\t\treturn CSS.computePropertyValue(element, propertyName);\r\n\t\t\t}\r\n\t\t\telement.style[propertyName] = propertyValue;\r\n\t\t} as VelocityNormalizationsFn;\r\n\t}\r\n\r\n\t/**\r\n\t * Vendor prefixes. Chrome / Safari, Firefox, IE / Edge, Opera.\r\n\t */\r\n\tconst rxVendors = /^(webkit|moz|ms|o)[A-Z]/,\r\n\t\tprefixElement = State.prefixElement;\r\n\r\n\tfor (const propertyName in prefixElement.style) {\r\n\t\tif (rxVendors.test(propertyName)) {\r\n\t\t\tlet unprefixed = propertyName.replace(/^[a-z]+([A-Z])/, ($, letter: string) => letter.toLowerCase());\r\n\r\n\t\t\tif (ALL_VENDOR_PREFIXES || isString(prefixElement.style[unprefixed])) {\r\n\t\t\t\tlet addUnit = rxAddPx.test(unprefixed) ? \"px\" : undefined;\r\n\r\n\t\t\t\tregisterNormalization([Element, unprefixed, getSetPrefixed(propertyName, unprefixed), addUnit]);\r\n\t\t\t}\r\n\t\t} else if (!hasNormalization([Element, propertyName])) {\r\n\t\t\tlet addUnit = rxAddPx.test(propertyName) ? \"px\" : undefined;\r\n\r\n\t\t\tregisterNormalization([Element, propertyName, getSetStyle(propertyName), addUnit]);\r\n\t\t}\r\n\t}\r\n}\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * A fake normalization used to allow the \"tween\" property easy access.\r\n\t */\r\n\tfunction getSetTween(element: HTMLorSVGElement, propertyValue?: string) {\r\n\t\tif (propertyValue === undefined) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t}\r\n\r\n\tregisterNormalization([Element, \"tween\", getSetTween]);\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Call Completion\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Call the complete method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\tfunction callComplete(activeCall: AnimationCall) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements;\r\n\r\n\t\t\t(activeCall.options.complete as VelocityCallback).call(elements, elements, activeCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Complete an animation. This might involve restarting (for loop or repeat\r\n\t * options). Once it is finished we also check for any callbacks or Promises\r\n\t * that need updating.\r\n\t */\r\n\texport function completeCall(activeCall: AnimationCall) {\r\n\t\t//\t\tconsole.log(\"complete\", activeCall)\r\n\t\t// TODO: Check if it's not been completed already\r\n\r\n\t\tconst options = activeCall.options,\r\n\t\t\tqueue = getValue(activeCall.queue, options.queue),\r\n\t\t\tisLoop = getValue(activeCall.loop, options.loop, defaults.loop),\r\n\t\t\tisRepeat = getValue(activeCall.repeat, options.repeat, defaults.repeat),\r\n\t\t\tisStopped = activeCall._flags & AnimationFlags.STOPPED;\r\n\r\n\t\tif (!isStopped && (isLoop || isRepeat)) {\r\n\r\n\t\t\t////////////////////\r\n\t\t\t// Option: Loop //\r\n\t\t\t// Option: Repeat //\r\n\t\t\t////////////////////\r\n\r\n\t\t\tif (isRepeat && isRepeat !== true) {\r\n\t\t\t\tactiveCall.repeat = isRepeat - 1;\r\n\t\t\t} else if (isLoop && isLoop !== true) {\r\n\t\t\t\tactiveCall.loop = isLoop - 1;\r\n\t\t\t\tactiveCall.repeat = getValue(activeCall.repeatAgain, options.repeatAgain, defaults.repeatAgain);\r\n\t\t\t}\r\n\t\t\tif (isLoop) {\r\n\t\t\t\tactiveCall._flags ^= AnimationFlags.REVERSE;\r\n\t\t\t}\r\n\t\t\tif (queue !== false) {\r\n\t\t\t\t// Can't be called when stopped so no need for an extra check.\r\n\t\t\t\tData(activeCall.element).lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\r\n\t\t\t}\r\n\t\t\tactiveCall.timeStart = activeCall.ellapsedTime = activeCall.percentComplete = 0;\r\n\t\t\tactiveCall._flags &= ~AnimationFlags.STARTED;\r\n\t\t} else {\r\n\t\t\tconst element = activeCall.element,\r\n\t\t\t\tdata = Data(element);\r\n\r\n\t\t\tif (!--data.count && !isStopped) {\r\n\r\n\t\t\t\t////////////////////////\r\n\t\t\t\t// Feature: Classname //\r\n\t\t\t\t////////////////////////\r\n\r\n\t\t\t\tremoveClass(element, State.className);\r\n\t\t\t}\r\n\r\n\t\t\t//////////////////////\r\n\t\t\t// Option: Complete //\r\n\t\t\t//////////////////////\r\n\r\n\t\t\t// If this is the last animation in this list then we can check for\r\n\t\t\t// and complete calls or Promises.\r\n\t\t\t// TODO: When deleting an element we need to adjust these values.\r\n\t\t\tif (options && ++options._completed === options._total) {\r\n\t\t\t\tif (!isStopped && options.complete) {\r\n\t\t\t\t\t// We don't call the complete if the animation is stopped,\r\n\t\t\t\t\t// and we clear the key to prevent it being called again.\r\n\t\t\t\t\tcallComplete(activeCall);\r\n\t\t\t\t\toptions.complete = null;\r\n\t\t\t\t}\r\n\t\t\t\tconst resolver = options._resolver;\r\n\r\n\t\t\t\tif (resolver) {\r\n\t\t\t\t\t// Fulfil the Promise\r\n\t\t\t\t\tresolver(activeCall.elements as any);\r\n\t\t\t\t\tdelete options._resolver;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t///////////////////\r\n\t\t\t// Option: Queue //\r\n\t\t\t///////////////////\r\n\r\n\t\t\tif (queue !== false) {\r\n\t\t\t\t// We only do clever things with queues...\r\n\t\t\t\tif (!isStopped) {\r\n\t\t\t\t\t// If we're not stopping an animation, we need to remember\r\n\t\t\t\t\t// what time it finished so that the next animation in\r\n\t\t\t\t\t// sequence gets the correct start time.\r\n\t\t\t\t\tdata.lastFinishList[queue] = activeCall.timeStart + getValue(activeCall.duration, options.duration, defaults.duration);\r\n\t\t\t\t}\r\n\t\t\t\t// Start the next animation in sequence, or delete the queue if\r\n\t\t\t\t// this was the last one.\r\n\t\t\t\tdequeue(element, queue);\r\n\t\t\t}\r\n\t\t\t// Cleanup any pointers, and remember the last animation etc.\r\n\t\t\tfreeAnimationCall(activeCall);\r\n\t\t}\r\n\t}\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\ninterface Element {\r\n\tvelocityData: ElementData;\r\n}\r\n\r\n/**\r\n * Get (and create) the internal data store for an element.\r\n */\r\nfunction Data(element: HTMLorSVGElement): ElementData {\r\n\t// Use a string member so Uglify doesn't mangle it.\r\n\tconst data = element[\"velocityData\"];\r\n\r\n\tif (data) {\r\n\t\treturn data;\r\n\t}\r\n\tlet types = 0;\r\n\r\n\tfor (let index = 0, constructors = VelocityStatic.constructors; index < constructors.length; index++) {\r\n\t\tif (element instanceof constructors[index]) {\r\n\t\t\ttypes |= 1 << index;\r\n\t\t}\r\n\t}\r\n\t// Do it this way so it errors on incorrect data.\r\n\tlet newData: ElementData = {\r\n\t\ttypes: types,\r\n\t\tcount: 0,\r\n\t\tcomputedStyle: null,\r\n\t\tcache: createEmptyObject(),\r\n\t\tqueueList: createEmptyObject(),\r\n\t\tlastAnimationList: createEmptyObject(),\r\n\t\tlastFinishList: createEmptyObject()\r\n\t};\r\n\tObject.defineProperty(element, \"velocityData\", {\r\n\t\tvalue: newData\r\n\t});\r\n\treturn newData;\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Set to true, 1 or 2 (most verbose) to output debug info to console.\r\n\t */\r\n\texport let debug: boolean | 1 | 2 = false;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Velocity option defaults, which can be overriden by the user.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t// NOTE: Add the variable here, then add the default state in \"reset\" below.\r\n\tlet _cache: boolean,\r\n\t\t_begin: VelocityCallback,\r\n\t\t_complete: VelocityCallback,\r\n\t\t_delay: number,\r\n\t\t_duration: number,\r\n\t\t_easing: VelocityEasingType,\r\n\t\t_fpsLimit: number,\r\n\t\t_loop: number | true,\r\n\t\t_minFrameTime: number,\r\n\t\t_promise: boolean,\r\n\t\t_promiseRejectEmpty: boolean,\r\n\t\t_queue: string | false,\r\n\t\t_repeat: number | true,\r\n\t\t_speed: number,\r\n\t\t_sync: boolean;\r\n\r\n\texport const defaults: StrictVelocityOptions & {reset?: () => void} = {\r\n\t\tmobileHA: true\r\n\t};\r\n\r\n\t// IMPORTANT: Make sure any new defaults get added to the actions/set.ts list\r\n\tObject.defineProperties(defaults, {\r\n\t\treset: {\r\n\t\t\tenumerable: true,\r\n\t\t\tvalue: function() {\r\n\t\t\t\t_cache = DEFAULT_CACHE;\r\n\t\t\t\t_begin = undefined;\r\n\t\t\t\t_complete = undefined;\r\n\t\t\t\t_delay = DEFAULT_DELAY;\r\n\t\t\t\t_duration = DEFAULT_DURATION;\r\n\t\t\t\t_easing = validateEasing(DEFAULT_EASING, DEFAULT_DURATION);\r\n\t\t\t\t_fpsLimit = DEFAULT_FPSLIMIT;\r\n\t\t\t\t_loop = DEFAULT_LOOP;\r\n\t\t\t\t_minFrameTime = FUZZY_MS_PER_SECOND / DEFAULT_FPSLIMIT;\r\n\t\t\t\t_promise = DEFAULT_PROMISE;\r\n\t\t\t\t_promiseRejectEmpty = DEFAULT_PROMISE_REJECT_EMPTY;\r\n\t\t\t\t_queue = DEFAULT_QUEUE;\r\n\t\t\t\t_repeat = DEFAULT_REPEAT;\r\n\t\t\t\t_speed = DEFAULT_SPEED;\r\n\t\t\t\t_sync = DEFAULT_SYNC;\r\n\t\t\t}\r\n\t\t},\r\n\t\tcache: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _cache;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validateCache(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_cache = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tbegin: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityCallback {\r\n\t\t\t\treturn _begin;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityCallback) {\r\n\t\t\t\tvalue = validateBegin(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_begin = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomplete: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityCallback {\r\n\t\t\t\treturn _complete;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityCallback) {\r\n\t\t\t\tvalue = validateComplete(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_complete = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tdelay: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): \"fast\" | \"normal\" | \"slow\" | number {\r\n\t\t\t\treturn _delay;\r\n\t\t\t},\r\n\t\t\tset: function(value: \"fast\" | \"normal\" | \"slow\" | number) {\r\n\t\t\t\tvalue = validateDelay(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_delay = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tduration: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): \"fast\" | \"normal\" | \"slow\" | number {\r\n\t\t\t\treturn _duration;\r\n\t\t\t},\r\n\t\t\tset: function(value: \"fast\" | \"normal\" | \"slow\" | number) {\r\n\t\t\t\tvalue = validateDuration(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_duration = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\teasing: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): VelocityEasingType {\r\n\t\t\t\treturn _easing;\r\n\t\t\t},\r\n\t\t\tset: function(value: VelocityEasingType) {\r\n\t\t\t\tvalue = validateEasing(value, _duration);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_easing = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tfpsLimit: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | false {\r\n\t\t\t\treturn _fpsLimit;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | false) {\r\n\t\t\t\tvalue = validateFpsLimit(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_fpsLimit = value;\r\n\t\t\t\t\t_minFrameTime = FUZZY_MS_PER_SECOND / value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tloop: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | true {\r\n\t\t\t\treturn _loop;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | boolean) {\r\n\t\t\t\tvalue = validateLoop(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_loop = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tminFrameTime: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | false {\r\n\t\t\t\treturn _minFrameTime;\r\n\t\t\t}\r\n\t\t},\r\n\t\tpromise: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _promise;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validatePromise(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_promise = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tpromiseRejectEmpty: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _promiseRejectEmpty;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validatePromiseRejectEmpty(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_promiseRejectEmpty = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tqueue: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): string | false {\r\n\t\t\t\treturn _queue;\r\n\t\t\t},\r\n\t\t\tset: function(value: string | false) {\r\n\t\t\t\tvalue = validateQueue(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_queue = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\trepeat: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number | true {\r\n\t\t\t\treturn _repeat;\r\n\t\t\t},\r\n\t\t\tset: function(value: number | boolean) {\r\n\t\t\t\tvalue = validateRepeat(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_repeat = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tspeed: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): number {\r\n\t\t\t\treturn _speed;\r\n\t\t\t},\r\n\t\t\tset: function(value: number) {\r\n\t\t\t\tvalue = validateSpeed(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_speed = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t},\r\n\t\tsync: {\r\n\t\t\tenumerable: true,\r\n\t\t\tget: function(): boolean {\r\n\t\t\t\treturn _sync;\r\n\t\t\t},\r\n\t\t\tset: function(value: boolean) {\r\n\t\t\t\tvalue = validateSync(value);\r\n\t\t\t\tif (value !== undefined) {\r\n\t\t\t\t\t_sync = value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t});\r\n\tdefaults.reset();\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Velocity-wide animation time remapping for testing purposes.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * In mock mode, all animations are forced to complete immediately upon the\r\n\t * next rAF tick. If there are further animations queued then they will each\r\n\t * take one single frame in turn. Loops and repeats will be disabled while\r\n\t * mock = true.\r\n\t */\r\n\texport let mock: boolean = false;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/**\r\n\t * Used to patch any object to allow Velocity chaining. In order to chain an\r\n\t * object must either be treatable as an array - with a .length\r\n\t * property, and each member a Node, or a Node directly.\r\n\t * \r\n\t * By default Velocity will try to patch window,\r\n\t * jQuery, Zepto, and several classes that return\r\n\t * Nodes or lists of Nodes.\r\n\t * \r\n\t * @public\r\n\t */\r\n\texport function patch(proto: any, global?: boolean) {\r\n\t\ttry {\r\n\t\t\tdefineProperty(proto, (global ? \"V\" : \"v\") + \"elocity\", VelocityFn);\r\n\t\t} catch (e) {\r\n\t\t\tconsole.warn(\"VelocityJS: Error when trying to add prototype.\", e);\r\n\t\t}\r\n\t}\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * AnimationCall queue\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Simple queue management. Un-named queue is directly within the element data,\r\n\t * named queue is within an object within it.\r\n\t */\r\n\tfunction animate(animation: AnimationCall) {\r\n\t\tconst prev = State.last;\r\n\r\n\t\tanimation._prev = prev;\r\n\t\tanimation._next = undefined;\r\n\t\tif (prev) {\r\n\t\t\tprev._next = animation;\r\n\t\t} else {\r\n\t\t\tState.first = animation;\r\n\t\t}\r\n\t\tState.last = animation;\r\n\t\tif (!State.firstNew) {\r\n\t\t\tState.firstNew = animation;\r\n\t\t}\r\n\t\tconst element = animation.element,\r\n\t\t\tdata = Data(element);\r\n\r\n\t\tif (!data.count++) {\r\n\r\n\t\t\t////////////////////////\r\n\t\t\t// Feature: Classname //\r\n\t\t\t////////////////////////\r\n\r\n\t\t\taddClass(element, State.className);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Add an item to an animation queue.\r\n\t */\r\n\texport function queue(element: HTMLorSVGElement, animation: AnimationCall, queue: string | false): void {\r\n\t\tconst data = Data(element);\r\n\r\n\t\tif (queue !== false) {\r\n\t\t\t// Store the last animation added so we can use it for the\r\n\t\t\t// beginning of the next one.\r\n\t\t\tdata.lastAnimationList[queue] = animation;\r\n\t\t}\r\n\t\tif (queue === false) {\r\n\t\t\tanimate(animation);\r\n\t\t} else {\r\n\t\t\tif (!isString(queue)) {\r\n\t\t\t\tqueue = \"\";\r\n\t\t\t}\r\n\t\t\tlet last = data.queueList[queue];\r\n\r\n\t\t\tif (!last) {\r\n\t\t\t\tif (last === null) {\r\n\t\t\t\t\tdata.queueList[queue] = animation;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tdata.queueList[queue] = null;\r\n\t\t\t\t\tanimate(animation);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twhile (last._next) {\r\n\t\t\t\t\tlast = last._next;\r\n\t\t\t\t}\r\n\t\t\t\tlast._next = animation;\r\n\t\t\t\tanimation._prev = last;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Start the next animation on this element's queue (named or default).\r\n\t *\r\n\t * @returns the next animation that is starting.\r\n\t */\r\n\texport function dequeue(element: HTMLorSVGElement, queue?: string | boolean, skip?: boolean): AnimationCall {\r\n\t\tif (queue !== false) {\r\n\t\t\tif (!isString(queue)) {\r\n\t\t\t\tqueue = \"\";\r\n\t\t\t}\r\n\t\t\tconst data = Data(element),\r\n\t\t\t\tanimation = data.queueList[queue];\r\n\r\n\t\t\tif (animation) {\r\n\t\t\t\tdata.queueList[queue] = animation._next || null;\r\n\t\t\t\tif (!skip) {\r\n\t\t\t\t\tanimate(animation);\r\n\t\t\t\t}\r\n\t\t\t} else if (animation === null) {\r\n\t\t\t\tdelete data.queueList[queue];\r\n\t\t\t}\r\n\t\t\treturn animation;\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Remove an animation from the active animation list. If it has a queue set\r\n\t * then remember it as the last animation for that queue, and free the one\r\n\t * that was previously there. If the animation list is completely empty then\r\n\t * mark us as finished.\r\n\t */\r\n\texport function freeAnimationCall(animation: AnimationCall): void {\r\n\t\tconst next = animation._next,\r\n\t\t\tprev = animation._prev,\r\n\t\t\tqueue = animation.queue == null ? animation.options.queue : animation.queue;\r\n\r\n\t\tif (State.firstNew === animation) {\r\n\t\t\tState.firstNew = next;\r\n\t\t}\r\n\t\tif (State.first === animation) {\r\n\t\t\tState.first = next;\r\n\t\t} else if (prev) {\r\n\t\t\tprev._next = next;\r\n\t\t}\r\n\t\tif (State.last === animation) {\r\n\t\t\tState.last = prev;\r\n\t\t} else if (next) {\r\n\t\t\tnext._prev = prev;\r\n\t\t}\r\n\t\tif (queue) {\r\n\t\t\tconst data = Data(animation.element);\r\n\r\n\t\t\tif (data) {\r\n\t\t\t\tanimation._next = animation._prev = undefined;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/* Container for the user's custom animation redirects that are referenced by name in place of the properties map argument. */\r\n\texport let Redirects = {/* Manually registered by the user. */};\r\n\r\n\t/***********************\r\n\t Packaged Redirects\r\n\t ***********************/\r\n\r\n\t/* slideUp, slideDown */\r\n\t[\"Down\", \"Up\"].forEach(function(direction) {\r\n\t\tRedirects[\"slide\" + direction] = function(element: HTMLorSVGElement, options: VelocityOptions, elementsIndex: number, elementsSize, elements: HTMLorSVGElement[], resolver: (value?: HTMLorSVGElement[] | VelocityResult) => void) {\r\n\t\t\tlet opts = {...options},\r\n\t\t\t\tbegin = opts.begin,\r\n\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\tinlineValues = {},\r\n\t\t\t\tcomputedValues = {\r\n\t\t\t\t\theight: \"\",\r\n\t\t\t\t\tmarginTop: \"\",\r\n\t\t\t\t\tmarginBottom: \"\",\r\n\t\t\t\t\tpaddingTop: \"\",\r\n\t\t\t\t\tpaddingBottom: \"\"\r\n\t\t\t\t};\r\n\r\n\t\t\tif (opts.display === undefined) {\r\n\t\t\t\tlet isInline = inlineRx.test(element.nodeName.toLowerCase());\r\n\r\n\t\t\t\t/* Show the element before slideDown begins and hide the element after slideUp completes. */\r\n\t\t\t\t/* Note: Inline elements cannot have dimensions animated, so they're reverted to inline-block. */\r\n\t\t\t\topts.display = (direction === \"Down\" ? (isInline ? \"inline-block\" : \"block\") : \"none\");\r\n\t\t\t}\r\n\r\n\t\t\topts.begin = function() {\r\n\t\t\t\t/* If the user passed in a begin callback, fire it now. */\r\n\t\t\t\tif (elementsIndex === 0 && begin) {\r\n\t\t\t\t\tbegin.call(elements, elements);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Cache the elements' original vertical dimensional property values so that we can animate back to them. */\r\n\t\t\t\tfor (let property in computedValues) {\r\n\t\t\t\t\tif (!computedValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tinlineValues[property] = element.style[property];\r\n\r\n\t\t\t\t\t/* For slideDown, use forcefeeding to animate all vertical properties from 0. For slideUp,\r\n\t\t\t\t\t use forcefeeding to start from computed values and animate down to 0. */\r\n\t\t\t\t\tlet propertyValue = CSS.getPropertyValue(element, property);\r\n\t\t\t\t\tcomputedValues[property] = (direction === \"Down\") ? [propertyValue, 0] : [0, propertyValue];\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Force vertical overflow content to clip so that sliding works as expected. */\r\n\t\t\t\t(inlineValues as any).overflow = element.style.overflow;\r\n\t\t\t\telement.style.overflow = \"hidden\";\r\n\t\t\t};\r\n\r\n\t\t\topts.complete = function() {\r\n\t\t\t\t/* Reset element to its pre-slide inline values once its slide animation is complete. */\r\n\t\t\t\tfor (let property in inlineValues) {\r\n\t\t\t\t\tif (inlineValues.hasOwnProperty(property)) {\r\n\t\t\t\t\t\telement.style[property] = inlineValues[property];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* If the user passed in a complete callback, fire it now. */\r\n\t\t\t\tif (elementsIndex === elementsSize - 1) {\r\n\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (resolver) {\r\n\t\t\t\t\t\tresolver(elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t};\r\n\r\n\t\t\t(VelocityFn as any)(element, computedValues, opts);\r\n\t\t};\r\n\t});\r\n\r\n\t/* fadeIn, fadeOut */\r\n\t[\"In\", \"Out\"].forEach(function(direction) {\r\n\t\tRedirects[\"fade\" + direction] = function(element: HTMLorSVGElement, options: VelocityOptions, elementsIndex: number, elementsSize, elements: HTMLorSVGElement[], promiseData) {\r\n\t\t\tlet opts = {...options},\r\n\t\t\t\tcomplete = opts.complete,\r\n\t\t\t\tpropertiesMap = {\r\n\t\t\t\t\topacity: (direction === \"In\") ? 1 : 0\r\n\t\t\t\t};\r\n\r\n\t\t\t/* Since redirects are triggered individually for each element in the animated set, avoid repeatedly triggering\r\n\t\t\t callbacks by firing them only when the final element has been reached. */\r\n\t\t\tif (elementsIndex !== 0) {\r\n\t\t\t\topts.begin = null;\r\n\t\t\t}\r\n\t\t\tif (elementsIndex !== elementsSize - 1) {\r\n\t\t\t\topts.complete = null;\r\n\t\t\t} else {\r\n\t\t\t\topts.complete = function() {\r\n\t\t\t\t\tif (complete) {\r\n\t\t\t\t\t\tcomplete.call(elements, elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (promiseData) {\r\n\t\t\t\t\t\tpromiseData.resolver(elements);\r\n\t\t\t\t\t}\r\n\t\t\t\t};\r\n\t\t\t}\r\n\r\n\t\t\t/* If a display was passed in, use it. Otherwise, default to \"none\" for fadeOut or the element-specific default for fadeIn. */\r\n\t\t\t/* Note: We allow users to pass in \"null\" to skip display setting altogether. */\r\n\t\t\tif (opts.display === undefined) {\r\n\t\t\t\topts.display = (direction === \"In\" ? \"auto\" : \"none\");\r\n\t\t\t}\r\n\r\n\t\t\t(VelocityFn as any)(this, propertiesMap, opts);\r\n\t\t};\r\n\t});\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Effect Registration\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\t/* Animate the expansion/contraction of the elements' parent's height for In/Out effects. */\r\n\tfunction animateParentHeight(elements: HTMLorSVGElement | HTMLorSVGElement[], direction, totalDuration, stagger) {\r\n\t\tlet totalHeightDelta = 0,\r\n\t\t\tparentNode: HTMLorSVGElement;\r\n\r\n\t\t/* Sum the total height (including padding and margin) of all targeted elements. */\r\n\t\t((elements as HTMLorSVGElement).nodeType ? [elements as HTMLorSVGElement] : elements as HTMLorSVGElement[]).forEach(function(element: HTMLorSVGElement, i) {\r\n\t\t\tif (stagger) {\r\n\t\t\t\t/* Increase the totalDuration by the successive delay amounts produced by the stagger option. */\r\n\t\t\t\ttotalDuration += i * stagger;\r\n\t\t\t}\r\n\r\n\t\t\tparentNode = element.parentNode as HTMLorSVGElement;\r\n\r\n\t\t\tlet propertiesToSum = [\"height\", \"paddingTop\", \"paddingBottom\", \"marginTop\", \"marginBottom\"];\r\n\r\n\t\t\t/* If box-sizing is border-box, the height already includes padding and margin */\r\n\t\t\tif (CSS.getPropertyValue(element, \"boxSizing\").toString().toLowerCase() === \"border-box\") {\r\n\t\t\t\tpropertiesToSum = [\"height\"];\r\n\t\t\t}\r\n\r\n\t\t\tpropertiesToSum.forEach(function(property) {\r\n\t\t\t\ttotalHeightDelta += parseFloat(CSS.getPropertyValue(element, property) as string);\r\n\t\t\t});\r\n\t\t});\r\n\r\n\t\t/* Animate the parent element's height adjustment (with a varying duration multiplier for aesthetic benefits). */\r\n\t\t// TODO: Get this typesafe again\r\n\t\t(VelocityFn as any)(\r\n\t\t\tparentNode,\r\n\t\t\t{height: (direction === \"In\" ? \"+\" : \"-\") + \"=\" + totalHeightDelta},\r\n\t\t\t{queue: false, easing: \"ease-in-out\", duration: totalDuration * (direction === \"In\" ? 0.6 : 1)}\r\n\t\t);\r\n\t}\r\n\r\n\t/* Note: RegisterUI is a legacy name. */\r\n\texport function RegisterEffect(effectName: string, properties): Velocity {\r\n\r\n\t\t/* Register a custom redirect for each effect. */\r\n\t\tRedirects[effectName] = function(element, redirectOptions, elementsIndex, elementsSize, elements, resolver: (value?: HTMLorSVGElement[] | VelocityResult) => void, loop) {\r\n\t\t\tlet finalElement = (elementsIndex === elementsSize - 1),\r\n\t\t\t\ttotalDuration = 0;\r\n\r\n\t\t\tloop = loop || properties.loop;\r\n\t\t\tif (typeof properties.defaultDuration === \"function\") {\r\n\t\t\t\tproperties.defaultDuration = properties.defaultDuration.call(elements, elements);\r\n\t\t\t} else {\r\n\t\t\t\tproperties.defaultDuration = parseFloat(properties.defaultDuration);\r\n\t\t\t}\r\n\r\n\t\t\t/* Get the total duration used, so we can share it out with everything that doesn't have a duration */\r\n\t\t\tfor (let callIndex = 0; callIndex < properties.calls.length; callIndex++) {\r\n\t\t\t\tlet durationPercentage = properties.calls[callIndex][1];\r\n\t\t\t\tif (typeof durationPercentage === \"number\") {\r\n\t\t\t\t\ttotalDuration += durationPercentage;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tlet shareDuration = totalDuration >= 1 ? 0 : properties.calls.length ? (1 - totalDuration) / properties.calls.length : 1;\r\n\r\n\t\t\t/* Iterate through each effect's call array. */\r\n\t\t\tfor (let callIndex = 0; callIndex < properties.calls.length; callIndex++) {\r\n\t\t\t\tlet call = properties.calls[callIndex],\r\n\t\t\t\t\tpropertyMap = call[0],\r\n\t\t\t\t\tredirectDuration = 1000,\r\n\t\t\t\t\tdurationPercentage = call[1],\r\n\t\t\t\t\tcallOptions = call[2] || {},\r\n\t\t\t\t\topts: VelocityOptions = {};\r\n\r\n\t\t\t\tif (redirectOptions.duration !== undefined) {\r\n\t\t\t\t\tredirectDuration = redirectOptions.duration;\r\n\t\t\t\t} else if (properties.defaultDuration !== undefined) {\r\n\t\t\t\t\tredirectDuration = properties.defaultDuration;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Assign the whitelisted per-call options. */\r\n\t\t\t\topts.duration = redirectDuration * (typeof durationPercentage === \"number\" ? durationPercentage : shareDuration);\r\n\t\t\t\topts.queue = redirectOptions.queue || \"\";\r\n\t\t\t\topts.easing = callOptions.easing || \"ease\";\r\n\t\t\t\topts.delay = parseFloat(callOptions.delay) || 0;\r\n\t\t\t\topts.loop = !properties.loop && callOptions.loop;\r\n\t\t\t\topts.cache = callOptions.cache || true;\r\n\r\n\t\t\t\t/* Special processing for the first effect call. */\r\n\t\t\t\tif (callIndex === 0) {\r\n\t\t\t\t\t/* If a delay was passed into the redirect, combine it with the first call's delay. */\r\n\t\t\t\t\topts.delay += (parseFloat(redirectOptions.delay) || 0);\r\n\r\n\t\t\t\t\tif (elementsIndex === 0) {\r\n\t\t\t\t\t\topts.begin = function() {\r\n\t\t\t\t\t\t\t/* Only trigger a begin callback on the first effect call with the first element in the set. */\r\n\t\t\t\t\t\t\tif (redirectOptions.begin) {\r\n\t\t\t\t\t\t\t\tredirectOptions.begin.call(elements, elements);\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tlet direction = effectName.match(/(In|Out)$/);\r\n\r\n\t\t\t\t\t\t\t/* Make \"in\" transitioning elements invisible immediately so that there's no FOUC between now\r\n\t\t\t\t\t\t\t and the first RAF tick. */\r\n\t\t\t\t\t\t\tif ((direction && direction[0] === \"In\") && propertyMap.opacity !== undefined) {\r\n\t\t\t\t\t\t\t\t(elements.nodeType ? [elements] : elements).forEach(function(element) {\r\n\t\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, \"opacity\", 0);\r\n\t\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* Only trigger animateParentHeight() if we're using an In/Out transition. */\r\n\t\t\t\t\t\t\tif (redirectOptions.animateParentHeight && direction) {\r\n\t\t\t\t\t\t\t\tanimateParentHeight(elements, direction[0], redirectDuration + (opts.delay as number), redirectOptions.stagger);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/* If the user isn't overriding the display option, default to \"auto\" for \"In\"-suffixed transitions. */\r\n\t\t\t\t\t//\t\t\t\t\tif (redirectOptions.display !== null) {\r\n\t\t\t\t\t//\t\t\t\t\t\tif (redirectOptions.display !== undefined && redirectOptions.display !== \"none\") {\r\n\t\t\t\t\t//\t\t\t\t\t\t\topts.display = redirectOptions.display;\r\n\t\t\t\t\t//\t\t\t\t\t\t} else if (/In$/.test(effectName)) {\r\n\t\t\t\t\t//\t\t\t\t\t\t\t/* Inline elements cannot be subjected to transforms, so we switch them to inline-block. */\r\n\t\t\t\t\t//\t\t\t\t\t\t\tlet defaultDisplay = CSS.Values.getDisplayType(element);\r\n\t\t\t\t\t//\t\t\t\t\t\t\topts.display = (defaultDisplay === \"inline\") ? \"inline-block\" : defaultDisplay;\r\n\t\t\t\t\t//\t\t\t\t\t\t}\r\n\t\t\t\t\t//\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (redirectOptions.visibility && redirectOptions.visibility !== \"hidden\") {\r\n\t\t\t\t\t\topts.visibility = redirectOptions.visibility;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Special processing for the last effect call. */\r\n\t\t\t\tif (callIndex === properties.calls.length - 1) {\r\n\t\t\t\t\t/* Append promise resolving onto the user's redirect callback. */\r\n\t\t\t\t\tlet injectFinalCallbacks = function() {\r\n\t\t\t\t\t\tif ((redirectOptions.display === undefined || redirectOptions.display === \"none\") && /Out$/.test(effectName)) {\r\n\t\t\t\t\t\t\t(elements.nodeType ? [elements] : elements).forEach(function(element) {\r\n\t\t\t\t\t\t\t\tCSS.setPropertyValue(element, \"display\", \"none\");\r\n\t\t\t\t\t\t\t});\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (redirectOptions.complete) {\r\n\t\t\t\t\t\t\tredirectOptions.complete.call(elements, elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (resolver) {\r\n\t\t\t\t\t\t\tresolver(elements || element);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\topts.complete = function() {\r\n\t\t\t\t\t\tif (loop) {\r\n\t\t\t\t\t\t\tRedirects[effectName](element, redirectOptions, elementsIndex, elementsSize, elements, resolver, loop === true ? true : Math.max(0, loop - 1));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (properties.reset) {\r\n\t\t\t\t\t\t\tfor (let resetProperty in properties.reset) {\r\n\t\t\t\t\t\t\t\tif (!properties.reset.hasOwnProperty(resetProperty)) {\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\tlet resetValue = properties.reset[resetProperty];\r\n\r\n\t\t\t\t\t\t\t\t/* Format each non-array value in the reset property map to [ value, value ] so that changes apply\r\n\t\t\t\t\t\t\t\t immediately and DOM querying is avoided (via forcefeeding). */\r\n\t\t\t\t\t\t\t\t/* Note: Don't forcefeed hooks, otherwise their hook roots will be defaulted to their null values. */\r\n\t\t\t\t\t\t\t\t// TODO: Fix this\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\tif (CSS.Hooks.registered[resetProperty] === undefined && (typeof resetValue === \"string\" || typeof resetValue === \"number\")) {\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t\tproperties.reset[resetProperty] = [properties.reset[resetProperty], properties.reset[resetProperty]];\r\n\t\t\t\t\t\t\t\t//\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\t/* So that the reset values are applied instantly upon the next rAF tick, use a zero duration and parallel queueing. */\r\n\t\t\t\t\t\t\tlet resetOptions: VelocityOptions = {duration: 0, queue: false};\r\n\r\n\t\t\t\t\t\t\t/* Since the reset option uses up the complete callback, we trigger the user's complete callback at the end of ours. */\r\n\t\t\t\t\t\t\tif (finalElement) {\r\n\t\t\t\t\t\t\t\tresetOptions.complete = injectFinalCallbacks;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t\tVelocityFn(element, properties.reset, resetOptions);\r\n\t\t\t\t\t\t\t/* Only trigger the user's complete callback on the last effect call with the last element in the set. */\r\n\t\t\t\t\t\t} else if (finalElement) {\r\n\t\t\t\t\t\t\tinjectFinalCallbacks();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif (redirectOptions.visibility === \"hidden\") {\r\n\t\t\t\t\t\topts.visibility = redirectOptions.visibility;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tVelocityFn(element, propertyMap, opts);\r\n\t\t\t}\r\n\t\t};\r\n\r\n\t\t/* Return the Velocity object so that RegisterUI calls can be chained. */\r\n\t\treturn VelocityFn as any;\r\n\t};\r\n};","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Sequence Running\r\n */\r\n\r\n/**\r\n * Perform a deep copy of an object - also copies children so they're not\r\n * going to be affected by changing original.\r\n */\r\nfunction _deepCopyObject(target: T, ...sources: U[]): T & U {\r\n\tif (target == null) { // TypeError if undefined or null\r\n\t\tthrow new TypeError(\"Cannot convert undefined or null to object\");\r\n\t}\r\n\tconst to = Object(target),\r\n\t\thasOwnProperty = Object.prototype.hasOwnProperty;\r\n\tlet source: any;\r\n\r\n\twhile ((source = sources.shift())) {\r\n\t\tif (source != null) {\r\n\t\t\tfor (const key in source) {\r\n\t\t\t\tif (hasOwnProperty.call(source, key)) {\r\n\t\t\t\t\tconst value = source[key];\r\n\r\n\t\t\t\t\tif (Array.isArray(value)) {\r\n\t\t\t\t\t\t_deepCopyObject(to[key] = [], value);\r\n\t\t\t\t\t} else if (isPlainObject(value)) {\r\n\t\t\t\t\t\t_deepCopyObject(to[key] = {}, value);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tto[key] = value;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn to;\r\n}\r\n\r\nnamespace VelocityStatic {\r\n\t/* Note: Sequence calls must use Velocity's single-object arguments syntax. */\r\n\texport function RunSequence(originalSequence): void {\r\n\t\tlet sequence = _deepCopyObject([], originalSequence);\r\n\r\n\t\tif (sequence.length > 1) {\r\n\t\t\tsequence.reverse().forEach(function(currentCall, i) {\r\n\t\t\t\tlet nextCall = sequence[i + 1];\r\n\r\n\t\t\t\tif (nextCall) {\r\n\t\t\t\t\t/* Parallel sequence calls (indicated via sequenceQueue:false) are triggered\r\n\t\t\t\t\t in the previous call's begin callback. Otherwise, chained calls are normally triggered\r\n\t\t\t\t\t in the previous call's complete callback. */\r\n\t\t\t\t\tlet currentCallOptions = currentCall.o || currentCall.options,\r\n\t\t\t\t\t\tnextCallOptions = nextCall.o || nextCall.options;\r\n\r\n\t\t\t\t\tlet timing = (currentCallOptions && currentCallOptions.sequenceQueue === false) ? \"begin\" : \"complete\",\r\n\t\t\t\t\t\tcallbackOriginal = nextCallOptions && nextCallOptions[timing],\r\n\t\t\t\t\t\toptions = {};\r\n\r\n\t\t\t\t\toptions[timing] = function() {\r\n\t\t\t\t\t\tlet nextCallElements = nextCall.e || nextCall.elements;\r\n\t\t\t\t\t\tlet elements = nextCallElements.nodeType ? [nextCallElements] : nextCallElements;\r\n\r\n\t\t\t\t\t\tif (callbackOriginal) {\r\n\t\t\t\t\t\t\tcallbackOriginal.call(elements, elements);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tVelocityFn(currentCall);\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t\tif (nextCall.o) {\r\n\t\t\t\t\t\tnextCall.o = {...nextCallOptions, ...options};\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tnextCall.options = {...nextCallOptions, ...options};\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\tsequence.reverse();\r\n\t\t}\r\n\r\n\t\tVelocityFn(sequence[0]);\r\n\t};\r\n};\r\n","///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Tick\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\r\n\t/**\r\n\t * Call the begin method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\texport function callBegin(activeCall: AnimationCall) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements;\r\n\r\n\t\t\t(activeCall.options.begin as VelocityCallback).call(elements, elements, activeCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Call the progress method of an animation in a separate function so it can\r\n\t * benefit from JIT compiling while still having a try/catch block.\r\n\t */\r\n\tfunction callProgress(activeCall: AnimationCall, timeCurrent: number) {\r\n\t\ttry {\r\n\t\t\tconst elements = activeCall.elements,\r\n\t\t\t\tpercentComplete = activeCall.percentComplete,\r\n\t\t\t\toptions = activeCall.options,\r\n\t\t\t\ttweenValue = activeCall.tween;\r\n\r\n\t\t\t(activeCall.options.progress as VelocityProgress).call(elements,\r\n\t\t\t\telements,\r\n\t\t\t\tpercentComplete,\r\n\t\t\t\tMath.max(0, activeCall.timeStart + (activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaults.duration) - timeCurrent),\r\n\t\t\t\ttweenValue !== undefined ? tweenValue : String(percentComplete * 100),\r\n\t\t\t\tactiveCall);\r\n\t\t} catch (error) {\r\n\t\t\tsetTimeout(function() {\r\n\t\t\t\tthrow error;\r\n\t\t\t}, 1);\r\n\t\t}\r\n\t}\r\n\r\n\tlet firstProgress: AnimationCall,\r\n\t\tfirstComplete: AnimationCall;\r\n\r\n\tfunction asyncCallbacks() {\r\n\t\tlet activeCall: AnimationCall,\r\n\t\t\tnextCall: AnimationCall;\r\n\t\t// Callbacks and complete that might read the DOM again.\r\n\r\n\t\t// Progress callback\r\n\t\tfor (activeCall = firstProgress; activeCall; activeCall = nextCall) {\r\n\t\t\tnextCall = activeCall._nextProgress;\r\n\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\tcallProgress(activeCall, lastTick);\r\n\t\t}\r\n\t\t// Complete animations, including complete callback or looping\r\n\t\tfor (activeCall = firstComplete; activeCall; activeCall = nextCall) {\r\n\t\t\tnextCall = activeCall._nextComplete;\r\n\t\t\t/* If this call has finished tweening, pass it to complete() to handle call cleanup. */\r\n\t\t\tcompleteCall(activeCall);\r\n\t\t}\r\n\t}\r\n\r\n\t/**************\r\n\t Timing\r\n\t **************/\r\n\r\n\tconst FRAME_TIME = 1000 / 60,\r\n\t\t/**\r\n\t\t* Shim for window.performance in case it doesn't exist\r\n\t\t*/\r\n\t\tperformance = (function() {\r\n\t\t\tconst perf = window.performance || {} as Performance;\r\n\r\n\t\t\tif (typeof perf.now !== \"function\") {\r\n\t\t\t\tconst nowOffset = perf.timing && perf.timing.navigationStart ? perf.timing.navigationStart : _now();\r\n\r\n\t\t\t\tperf.now = function() {\r\n\t\t\t\t\treturn _now() - nowOffset;\r\n\t\t\t\t};\r\n\t\t\t}\r\n\t\t\treturn perf;\r\n\t\t})(),\r\n\t\t/**\r\n\t\t * Proxy function for when rAF is not available - try to be as accurate\r\n\t\t * as possible with the setTimeout calls, however they are far less\r\n\t\t * accurate than rAF can be - so try not to use normally (unless the tab\r\n\t\t * is in the background).\r\n\t\t */\r\n\t\trAFProxy = function(callback: FrameRequestCallback) {\r\n\t\t\tconsole.log(\"rAFProxy\", Math.max(0, FRAME_TIME - (performance.now() - lastTick)), performance.now(), lastTick, FRAME_TIME)\r\n\t\t\treturn setTimeout(function() {\r\n\t\t\t\tcallback(performance.now());\r\n\t\t\t}, Math.max(0, FRAME_TIME - (performance.now() - lastTick)));\r\n\t\t},\r\n\t\t/* rAF shim. Gist: https://gist.github.com/julianshapiro/9497513 */\r\n\t\trAFShim = window.requestAnimationFrame || rAFProxy;\r\n\t/**\r\n\t * The ticker function being used, either rAF, or a function that\r\n\t * emulates it.\r\n\t */\r\n\tlet ticker: (callback: FrameRequestCallback) => number = document.hidden ? rAFProxy : rAFShim;\r\n\t/**\r\n\t * The time that the last animation frame ran at. Set from tick(), and used\r\n\t * for missing rAF (ie, when not in focus etc).\r\n\t */\r\n\texport let lastTick: number = 0;\r\n\r\n\t/* Inactive browser tabs pause rAF, which results in all active animations immediately sprinting to their completion states when the tab refocuses.\r\n\t To get around this, we dynamically switch rAF to setTimeout (which the browser *doesn't* pause) when the tab loses focus. We skip this for mobile\r\n\t devices to avoid wasting battery power on inactive tabs. */\r\n\t/* Note: Tab focus detection doesn't work on older versions of IE, but that's okay since they don't support rAF to begin with. */\r\n\tif (!State.isMobile && document.hidden !== undefined) {\r\n\t\tdocument.addEventListener(\"visibilitychange\", function updateTicker(event?: Event) {\r\n\t\t\tlet hidden = document.hidden;\r\n\r\n\t\t\tticker = hidden ? rAFProxy : rAFShim;\r\n\t\t\tif (event) {\r\n\t\t\t\tsetTimeout(tick, 2000);\r\n\t\t\t}\r\n\t\t\ttick();\r\n\t\t});\r\n\t}\r\n\r\n\tlet ticking: boolean;\r\n\r\n\t/**\r\n\t * Called on every tick, preferably through rAF. This is reponsible for\r\n\t * initialising any new animations, then starting any that need starting.\r\n\t * Finally it will expand any tweens and set the properties relating to\r\n\t * them. If there are any callbacks relating to the animations then they\r\n\t * will attempt to call at the end (with the exception of \"begin\").\r\n\t */\r\n\texport function tick(timestamp?: number | boolean) {\r\n\t\tif (ticking) {\r\n\t\t\t// Should never happen - but if we've swapped back from hidden to\r\n\t\t\t// visibile then we want to make sure\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tticking = true;\r\n\t\t/* An empty timestamp argument indicates that this is the first tick occurence since ticking was turned on.\r\n\t\t We leverage this metadata to fully ignore the first tick pass since RAF's initial pass is fired whenever\r\n\t\t the browser's next tick sync time occurs, which results in the first elements subjected to Velocity\r\n\t\t calls being animated out of sync with any elements animated immediately thereafter. In short, we ignore\r\n\t\t the first RAF tick pass so that elements being immediately consecutively animated -- instead of simultaneously animated\r\n\t\t by the same Velocity call -- are properly batched into the same initial RAF tick and consequently remain in sync thereafter. */\r\n\t\tif (timestamp) {\r\n\t\t\t/* We normally use RAF's high resolution timestamp but as it can be significantly offset when the browser is\r\n\t\t\t under high stress we give the option for choppiness over allowing the browser to drop huge chunks of frames.\r\n\t\t\t We use performance.now() and shim it if it doesn't exist for when the tab is hidden. */\r\n\t\t\tconst timeCurrent = timestamp && timestamp !== true ? timestamp : performance.now(),\r\n\t\t\t\tdeltaTime = lastTick ? timeCurrent - lastTick : FRAME_TIME,\r\n\t\t\t\tdefaultSpeed = defaults.speed,\r\n\t\t\t\tdefaultEasing = defaults.easing,\r\n\t\t\t\tdefaultDuration = defaults.duration;\r\n\t\t\tlet activeCall: AnimationCall,\r\n\t\t\t\tnextCall: AnimationCall,\r\n\t\t\t\tlastProgress: AnimationCall,\r\n\t\t\t\tlastComplete: AnimationCall;\r\n\r\n\t\t\tfirstProgress = null;\r\n\t\t\tfirstComplete = null;\r\n\t\t\tif (deltaTime >= defaults.minFrameTime || !lastTick) {\r\n\t\t\t\tlastTick = timeCurrent;\r\n\r\n\t\t\t\t/********************\r\n\t\t\t\t Call Iteration\r\n\t\t\t\t ********************/\r\n\r\n\t\t\t\t// Expand any tweens that might need it.\r\n\t\t\t\twhile ((activeCall = State.firstNew)) {\r\n\t\t\t\t\tvalidateTweens(activeCall);\r\n\t\t\t\t}\r\n\t\t\t\t// Iterate through each active call.\r\n\t\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = activeCall._next) {\r\n\t\t\t\t\tconst element = activeCall.element;\r\n\t\t\t\t\tlet data: ElementData;\r\n\r\n\t\t\t\t\t// Check to see if this element has been deleted midway\r\n\t\t\t\t\t// through the animation. If it's gone then end this\r\n\t\t\t\t\t// animation.\r\n\t\t\t\t\tif (!element.parentNode || !(data = Data(element))) {\r\n\t\t\t\t\t\t// TODO: Remove safely - decrease count, delete data, remove from arrays\r\n\t\t\t\t\t\tfreeAnimationCall(activeCall);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Don't bother getting until we can use these.\r\n\t\t\t\t\tconst options = activeCall.options,\r\n\t\t\t\t\t\tflags = activeCall._flags;\r\n\t\t\t\t\tlet timeStart = activeCall.timeStart;\r\n\r\n\t\t\t\t\t// If this is the first time that this call has been\r\n\t\t\t\t\t// processed by tick() then we assign timeStart now so that\r\n\t\t\t\t\t// it's value is as close to the real animation start time\r\n\t\t\t\t\t// as possible.\r\n\t\t\t\t\tif (!timeStart) {\r\n\t\t\t\t\t\tconst queue = activeCall.queue != null ? activeCall.queue : options.queue;\r\n\r\n\t\t\t\t\t\ttimeStart = timeCurrent - deltaTime;\r\n\t\t\t\t\t\tif (queue !== false) {\r\n\t\t\t\t\t\t\ttimeStart = Math.max(timeStart, data.lastFinishList[queue] || 0);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactiveCall.timeStart = timeStart;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// If this animation is paused then skip processing unless\r\n\t\t\t\t\t// it has been set to resume.\r\n\t\t\t\t\tif (flags & AnimationFlags.PAUSED) {\r\n\t\t\t\t\t\t// Update the time start to accomodate the paused\r\n\t\t\t\t\t\t// completion amount.\r\n\t\t\t\t\t\tactiveCall.timeStart += deltaTime;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Check if this animation is ready - if it's synced then it\r\n\t\t\t\t\t// needs to wait for all other animations in the sync\r\n\t\t\t\t\tif (!(flags & AnimationFlags.READY)) {\r\n\t\t\t\t\t\tactiveCall._flags |= AnimationFlags.READY;\r\n\t\t\t\t\t\toptions._ready++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Need to split the loop, as ready sync animations must all get\r\n\t\t\t\t// the same start time.\r\n\t\t\t\tfor (activeCall = State.first; activeCall && activeCall !== State.firstNew; activeCall = nextCall) {\r\n\t\t\t\t\tconst flags = activeCall._flags;\r\n\r\n\t\t\t\t\tnextCall = activeCall._next;\r\n\t\t\t\t\tif (!(flags & AnimationFlags.READY) || (flags & AnimationFlags.PAUSED)) {\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst options = activeCall.options;\r\n\r\n\t\t\t\t\tif ((flags & AnimationFlags.SYNC) && options._ready < options._total) {\r\n\t\t\t\t\t\tactiveCall.timeStart += deltaTime;\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tconst speed = activeCall.speed != null ? activeCall.speed : options.speed != null ? options.speed : defaultSpeed;\r\n\t\t\t\t\tlet timeStart = activeCall.timeStart;\r\n\r\n\t\t\t\t\t// Don't bother getting until we can use these.\r\n\t\t\t\t\tif (!(flags & AnimationFlags.STARTED)) {\r\n\t\t\t\t\t\tconst delay = activeCall.delay != null ? activeCall.delay : options.delay;\r\n\r\n\t\t\t\t\t\t// Make sure anything we've delayed doesn't start\r\n\t\t\t\t\t\t// animating yet, there might still be an active delay\r\n\t\t\t\t\t\t// after something has been un-paused\r\n\t\t\t\t\t\tif (delay) {\r\n\t\t\t\t\t\t\tif (timeStart + (delay / speed) > timeCurrent) {\r\n\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tactiveCall.timeStart = timeStart += delay / (delay > 0 ? speed : 1);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tactiveCall._flags |= AnimationFlags.STARTED;\r\n\t\t\t\t\t\t// The begin callback is fired once per call, not once\r\n\t\t\t\t\t\t// per element, and is passed the full raw DOM element\r\n\t\t\t\t\t\t// set as both its context and its first argument.\r\n\t\t\t\t\t\tif (options._started++ === 0) {\r\n\t\t\t\t\t\t\toptions._first = activeCall;\r\n\t\t\t\t\t\t\tif (options.begin) {\r\n\t\t\t\t\t\t\t\t// Pass to an external fn with a try/catch block for optimisation\r\n\t\t\t\t\t\t\t\tcallBegin(activeCall);\r\n\t\t\t\t\t\t\t\t// Only called once, even if reversed or repeated\r\n\t\t\t\t\t\t\t\toptions.begin = undefined;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (speed !== 1) {\r\n\t\t\t\t\t\t// On the first frame we may have a shorter delta\r\n\t\t\t\t\t\tconst delta = Math.min(deltaTime, timeCurrent - timeStart);\r\n\t\t\t\t\t\tactiveCall.timeStart = timeStart += delta * (1 - speed);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (options._first === activeCall && options.progress) {\r\n\t\t\t\t\t\tactiveCall._nextProgress = undefined;\r\n\t\t\t\t\t\tif (lastProgress) {\r\n\t\t\t\t\t\t\tlastProgress._nextProgress = lastProgress = activeCall;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfirstProgress = lastProgress = activeCall;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tconst activeEasing = activeCall.easing != null ? activeCall.easing : options.easing != null ? options.easing : defaultEasing,\r\n\t\t\t\t\t\tmillisecondsEllapsed = activeCall.ellapsedTime = timeCurrent - timeStart,\r\n\t\t\t\t\t\tduration = activeCall.duration != null ? activeCall.duration : options.duration != null ? options.duration : defaultDuration,\r\n\t\t\t\t\t\tpercentComplete = activeCall.percentComplete = mock ? 1 : Math.min(millisecondsEllapsed / duration, 1),\r\n\t\t\t\t\t\ttweens = activeCall.tweens,\r\n\t\t\t\t\t\treverse = flags & AnimationFlags.REVERSE;\r\n\r\n\t\t\t\t\tif (percentComplete === 1) {\r\n\t\t\t\t\t\tactiveCall._nextComplete = undefined;\r\n\t\t\t\t\t\tif (lastComplete) {\r\n\t\t\t\t\t\t\tlastComplete._nextComplete = lastComplete = activeCall;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfirstComplete = lastComplete = activeCall;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tfor (const property in tweens) {\r\n\t\t\t\t\t\t// For every element, iterate through each property.\r\n\t\t\t\t\t\tconst tween = tweens[property],\r\n\t\t\t\t\t\t\teasing = tween.easing || activeEasing,\r\n\t\t\t\t\t\t\tpattern = tween.pattern;\r\n\t\t\t\t\t\tlet currentValue = \"\",\r\n\t\t\t\t\t\t\ti = 0;\r\n\r\n\t\t\t\t\t\tif (pattern) {\r\n\t\t\t\t\t\t\tfor (; i < pattern.length; i++) {\r\n\t\t\t\t\t\t\t\tconst startValue = tween.start[i];\r\n\r\n\t\t\t\t\t\t\t\tif (startValue == null) {\r\n\t\t\t\t\t\t\t\t\tcurrentValue += pattern[i];\r\n\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t// All easings must deal with numbers except for\r\n\t\t\t\t\t\t\t\t\t// our internal ones\r\n\t\t\t\t\t\t\t\t\tconst result = easing(reverse ? 1 - percentComplete : percentComplete, startValue as number, tween.end[i] as number, property)\r\n\r\n\t\t\t\t\t\t\t\t\tcurrentValue += pattern[i] === true ? Math.round(result) : result;\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (property !== \"tween\") {\r\n\t\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\r\n\t\t\t\t\t\t\t\tCSS.setPropertyValue(activeCall.element, property, currentValue, tween.fn);\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t// Skip the fake 'tween' property as that is only\r\n\t\t\t\t\t\t\t\t// passed into the progress callback.\r\n\t\t\t\t\t\t\t\tactiveCall.tween = currentValue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tconsole.warn(\"VelocityJS: Missing pattern:\", property, JSON.stringify(tween[property]))\r\n\t\t\t\t\t\t\tdelete tweens[property];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (firstProgress || firstComplete) {\r\n\t\t\t\t\tsetTimeout(asyncCallbacks, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (State.first) {\r\n\t\t\tState.isTicking = true;\r\n\t\t\tticker(tick);\r\n\t\t} else {\r\n\t\t\tState.isTicking = false;\r\n\t\t\tlastTick = 0;\r\n\t\t}\r\n\t\tticking = false;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Use rAF high resolution timestamp when available.\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport let timestamp: boolean = true;\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Tweens\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\tconst rxHex = /^#([A-f\\d]{3}){1,2}$/i;\r\n\tlet commands = new Map string>();\r\n\r\n\tcommands.set(\"function\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn (value as any as VelocityPropertyValueFn).call(element, elementArrayIndex, elements.length);\r\n\t})\r\n\tcommands.set(\"number\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn value + getNormalizationUnit(tween.fn);\r\n\t});\r\n\tcommands.set(\"string\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn CSS.fixColors(value);\r\n\t});\r\n\tcommands.set(\"undefined\", function(value, element, elements, elementArrayIndex, propertyName, tween) {\r\n\t\treturn CSS.fixColors(CSS.getPropertyValue(element, propertyName, tween.fn) || \"\");\r\n\t});\r\n\r\n\t/**\r\n\t * Expand a VelocityProperty argument into a valid sparse Tween array. This\r\n\t * pre-allocates the array as it is then the correct size and slightly\r\n\t * faster to access.\r\n\t */\r\n\texport function expandProperties(animation: AnimationCall, properties: VelocityProperties) {\r\n\t\tconst tweens = animation.tweens = createEmptyObject(),\r\n\t\t\telements = animation.elements,\r\n\t\t\telement = animation.element,\r\n\t\t\telementArrayIndex = elements.indexOf(element),\r\n\t\t\tdata = Data(element),\r\n\t\t\tqueue = getValue(animation.queue, animation.options.queue),\r\n\t\t\tduration = getValue(animation.options.duration, defaults.duration);\r\n\r\n\t\tfor (const property in properties) {\r\n\t\t\tconst propertyName = CSS.camelCase(property);\r\n\t\t\tlet valueData = properties[property],\r\n\t\t\t\tfn = getNormalization(element, propertyName);\r\n\r\n\t\t\tif (!fn && propertyName !== \"tween\") {\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Skipping [\" + property + \"] due to a lack of browser support.\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tif (valueData == null) {\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Skipping [\" + property + \"] due to no value supplied.\");\r\n\t\t\t\t}\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\t\t\tconst tween: VelocityTween = tweens[propertyName] = createEmptyObject() as any;\r\n\t\t\tlet endValue: string,\r\n\t\t\t\tstartValue: string;\r\n\r\n\t\t\ttween.fn = fn;\r\n\t\t\tif (isFunction(valueData)) {\r\n\t\t\t\t// If we have a function as the main argument then resolve\r\n\t\t\t\t// it first, in case it returns an array that needs to be\r\n\t\t\t\t// split.\r\n\t\t\t\tvalueData = (valueData as VelocityPropertyFn).call(element, elementArrayIndex, elements.length, elements);\r\n\t\t\t}\r\n\t\t\tif (Array.isArray(valueData)) {\r\n\t\t\t\t// valueData is an array in the form of\r\n\t\t\t\t// [ endValue, [, easing] [, startValue] ]\r\n\t\t\t\tconst arr1 = valueData[1],\r\n\t\t\t\t\tarr2 = valueData[2];\r\n\r\n\t\t\t\tendValue = valueData[0] as any;\r\n\t\t\t\tif ((isString(arr1) && (/^[\\d-]/.test(arr1) || rxHex.test(arr1))) || isFunction(arr1) || isNumber(arr1)) {\r\n\t\t\t\t\tstartValue = arr1 as any;\r\n\t\t\t\t} else if ((isString(arr1) && Easing.Easings[arr1]) || Array.isArray(arr1)) {\r\n\t\t\t\t\ttween.easing = arr1 as any;\r\n\t\t\t\t\tstartValue = arr2 as any;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tstartValue = arr1 || arr2 as any;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tendValue = valueData as any;\r\n\t\t\t}\r\n\t\t\ttween.end = commands.get(typeof endValue)(endValue, element, elements, elementArrayIndex, propertyName, tween) as any;\r\n\t\t\tif (startValue != null || (queue === false || data.queueList[queue] === undefined)) {\r\n\t\t\t\ttween.start = commands.get(typeof startValue)(startValue, element, elements, elementArrayIndex, propertyName, tween) as any;\r\n\t\t\t}\r\n\t\t\texplodeTween(propertyName, tween, duration, !!startValue);\r\n\t\t}\r\n\t}\r\n\r\n\t/**\r\n\t * Convert a string-based tween with start and end strings, into a pattern\r\n\t * based tween with arrays.\r\n\t */\r\n\tfunction explodeTween(propertyName: string, tween: VelocityTween, duration: number, isForcefeed?: boolean) {\r\n\t\tconst endValue: string = tween.end as any as string;\r\n\t\tlet startValue: string = tween.start as any as string;\r\n\r\n\t\tif (!isString(endValue) || !isString(startValue)) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tlet runAgain = false; // Can only be set once if the Start value doesn't match the End value and it's not forcefed\r\n\t\tdo {\r\n\t\t\trunAgain = false;\r\n\t\t\tconst arrayStart: (string | number)[] = tween.start = [null],\r\n\t\t\t\tarrayEnd: (string | number)[] = tween.end = [null],\r\n\t\t\t\tpattern: (string | boolean)[] = tween.pattern = [\"\"];\r\n\t\t\tlet easing = tween.easing as any,\r\n\t\t\t\tindexStart = 0, // index in startValue\r\n\t\t\t\tindexEnd = 0, // index in endValue\r\n\t\t\t\tinCalc = 0, // Keep track of being inside a \"calc()\" so we don't duplicate it\r\n\t\t\t\tinRGB = 0, // Keep track of being inside an RGB as we can't use fractional values\r\n\t\t\t\tinRGBA = 0, // Keep track of being inside an RGBA as we must pass fractional for the alpha channel\r\n\t\t\t\tisStringValue: boolean;\r\n\r\n\t\t\t// TODO: Relative Values\r\n\r\n\t\t\t/* Operator logic must be performed last since it requires unit-normalized start and end values. */\r\n\t\t\t/* Note: Relative *percent values* do not behave how most people think; while one would expect \"+=50%\"\r\n\t\t\t to increase the property 1.5x its current value, it in fact increases the percent units in absolute terms:\r\n\t\t\t 50 points is added on top of the current % value. */\r\n\t\t\t//\t\t\t\t\tswitch (operator as any as string) {\r\n\t\t\t//\t\t\t\t\t\tcase \"+\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue + endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"-\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue - endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"*\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue * endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\r\n\t\t\t//\t\t\t\t\t\tcase \"/\":\r\n\t\t\t//\t\t\t\t\t\t\tendValue = startValue / endValue;\r\n\t\t\t//\t\t\t\t\t\t\tbreak;\r\n\t\t\t//\t\t\t\t\t}\r\n\r\n\t\t\t// TODO: Leading from a calc value\r\n\t\t\twhile (indexStart < startValue.length && indexEnd < endValue.length) {\r\n\t\t\t\tlet charStart = startValue[indexStart],\r\n\t\t\t\t\tcharEnd = endValue[indexEnd];\r\n\r\n\t\t\t\t// If they're both numbers, then parse them as a whole\r\n\t\t\t\tif (TWEEN_NUMBER_REGEX.test(charStart) && TWEEN_NUMBER_REGEX.test(charEnd)) {\r\n\t\t\t\t\tlet tempStart = charStart, // temporary character buffer\r\n\t\t\t\t\t\ttempEnd = charEnd, // temporary character buffer\r\n\t\t\t\t\t\tdotStart = \".\", // Make sure we can only ever match a single dot in a decimal\r\n\t\t\t\t\t\tdotEnd = \".\"; // Make sure we can only ever match a single dot in a decimal\r\n\r\n\t\t\t\t\twhile (++indexStart < startValue.length) {\r\n\t\t\t\t\t\tcharStart = startValue[indexStart];\r\n\t\t\t\t\t\tif (charStart === dotStart) {\r\n\t\t\t\t\t\t\tdotStart = \"..\"; // Can never match two characters\r\n\t\t\t\t\t\t} else if (!isNumberWhenParsed(charStart)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttempStart += charStart;\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (++indexEnd < endValue.length) {\r\n\t\t\t\t\t\tcharEnd = endValue[indexEnd];\r\n\t\t\t\t\t\tif (charEnd === dotEnd) {\r\n\t\t\t\t\t\t\tdotEnd = \"..\"; // Can never match two characters\r\n\t\t\t\t\t\t} else if (!isNumberWhenParsed(charEnd)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttempEnd += charEnd;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tlet unitStart = CSS.getUnit(startValue, indexStart), // temporary unit type\r\n\t\t\t\t\t\tunitEnd = CSS.getUnit(endValue, indexEnd); // temporary unit type\r\n\r\n\t\t\t\t\tindexStart += unitStart.length;\r\n\t\t\t\t\tindexEnd += unitEnd.length;\r\n\t\t\t\t\tif (unitEnd.length === 0) {\r\n\t\t\t\t\t\t// This order as it's most common for the user supplied\r\n\t\t\t\t\t\t// value to be a number.\r\n\t\t\t\t\t\tunitEnd = unitStart;\r\n\t\t\t\t\t} else if (unitStart.length === 0) {\r\n\t\t\t\t\t\tunitStart = unitEnd;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (unitStart === unitEnd) {\r\n\t\t\t\t\t\t// Same units\r\n\t\t\t\t\t\tif (tempStart === tempEnd) {\r\n\t\t\t\t\t\t\t// Same numbers, so just copy over\r\n\t\t\t\t\t\t\tpattern[pattern.length - 1] += tempStart + unitStart;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpattern.push(inRGB ? true : false, unitStart);\r\n\t\t\t\t\t\t\tarrayStart.push(parseFloat(tempStart), null);\r\n\t\t\t\t\t\t\tarrayEnd.push(parseFloat(tempEnd), null);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t// Different units, so put into a \"calc(from + to)\" and\r\n\t\t\t\t\t\t// animate each side to/from zero. setPropertyValue will\r\n\t\t\t\t\t\t// look out for the final \"calc(0 + \" prefix and remove\r\n\t\t\t\t\t\t// it from the value when it finds it.\r\n\t\t\t\t\t\tpattern[pattern.length - 1] += inCalc ? \"+ (\" : \"calc(\";\r\n\t\t\t\t\t\tpattern.push(false, unitStart + \" + \", false, unitEnd + \")\");\r\n\t\t\t\t\t\tarrayStart.push(parseFloat(tempStart) || 0, null, 0, null);\r\n\t\t\t\t\t\tarrayEnd.push(0, null, parseFloat(tempEnd) || 0, null);\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (charStart === charEnd) {\r\n\t\t\t\t\tpattern[pattern.length - 1] += charStart;\r\n\t\t\t\t\tindexStart++;\r\n\t\t\t\t\tindexEnd++;\r\n\t\t\t\t\t// Keep track of being inside a calc()\r\n\t\t\t\t\tif (inCalc === 0 && charStart === \"c\"\r\n\t\t\t\t\t\t|| inCalc === 1 && charStart === \"a\"\r\n\t\t\t\t\t\t|| inCalc === 2 && charStart === \"l\"\r\n\t\t\t\t\t\t|| inCalc === 3 && charStart === \"c\"\r\n\t\t\t\t\t\t|| inCalc >= 4 && charStart === \"(\"\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tinCalc++;\r\n\t\t\t\t\t} else if ((inCalc && inCalc < 5)\r\n\t\t\t\t\t\t|| inCalc >= 4 && charStart === \")\" && --inCalc < 5) {\r\n\t\t\t\t\t\tinCalc = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Keep track of being inside an rgb() / rgba()\r\n\t\t\t\t\t// The opacity must not be rounded.\r\n\t\t\t\t\tif (inRGB === 0 && charStart === \"r\"\r\n\t\t\t\t\t\t|| inRGB === 1 && charStart === \"g\"\r\n\t\t\t\t\t\t|| inRGB === 2 && charStart === \"b\"\r\n\t\t\t\t\t\t|| inRGB === 3 && charStart === \"a\"\r\n\t\t\t\t\t\t|| inRGB >= 3 && charStart === \"(\"\r\n\t\t\t\t\t) {\r\n\t\t\t\t\t\tif (inRGB === 3 && charStart === \"a\") {\r\n\t\t\t\t\t\t\tinRGBA = 1;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tinRGB++;\r\n\t\t\t\t\t} else if (inRGBA && charStart === \",\") {\r\n\t\t\t\t\t\tif (++inRGBA > 3) {\r\n\t\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if ((inRGBA && inRGB < (inRGBA ? 5 : 4))\r\n\t\t\t\t\t\t|| inRGB >= (inRGBA ? 4 : 3) && charStart === \")\" && --inRGB < (inRGBA ? 5 : 4)) {\r\n\t\t\t\t\t\tinRGB = inRGBA = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (charStart || charEnd) {\r\n\t\t\t\t\t// Different letters, so we're going to push them into start\r\n\t\t\t\t\t// and end until the next word\r\n\t\t\t\t\tisStringValue = true;\r\n\t\t\t\t\tif (!isString(arrayStart[arrayStart.length - 1])) {\r\n\t\t\t\t\t\tif (pattern.length === 1 && !pattern[0]) {\r\n\t\t\t\t\t\t\tarrayStart[0] = arrayEnd[0] = \"\";\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tpattern.push(\"\");\r\n\t\t\t\t\t\t\tarrayStart.push(\"\");\r\n\t\t\t\t\t\t\tarrayEnd.push(\"\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (indexStart < startValue.length) {\r\n\t\t\t\t\t\tcharStart = startValue[indexStart++];\r\n\t\t\t\t\t\tif (charStart === \" \" || TWEEN_NUMBER_REGEX.test(charStart)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarrayStart[arrayStart.length - 1] += charStart;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\twhile (indexEnd < endValue.length) {\r\n\t\t\t\t\t\tcharEnd = endValue[indexEnd++];\r\n\t\t\t\t\t\tif (charEnd === \" \" || TWEEN_NUMBER_REGEX.test(charEnd)) {\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tarrayEnd[arrayEnd.length - 1] += charEnd;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (!isForcefeed && (indexStart === startValue.length) !== (indexEnd === endValue.length)) {\r\n\t\t\t\t\t// This little piece will take a startValue, split out the\r\n\t\t\t\t\t// various numbers in it, then copy the endValue into the\r\n\t\t\t\t\t// startValue while replacing the numbers in it to match the\r\n\t\t\t\t\t// original start numbers as a repeating sequence.\r\n\t\t\t\t\t// Finally this function will run again with the new\r\n\t\t\t\t\t// startValue and a now matching pattern.\r\n\t\t\t\t\tlet startNumbers = startValue.match(/\\d\\.?\\d*/g) || [\"0\"],\r\n\t\t\t\t\t\tcount = startNumbers.length,\r\n\t\t\t\t\t\tindex = 0;\r\n\r\n\t\t\t\t\tstartValue = endValue.replace(/\\d+\\.?\\d*/g, function() {\r\n\t\t\t\t\t\treturn startNumbers[index++ % count];\r\n\t\t\t\t\t});\r\n\t\t\t\t\trunAgain = isForcefeed = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (!runAgain) {\r\n\t\t\t\t// TODO: These two would be slightly better to not add the array indices in the first place\r\n\t\t\t\tif (pattern[0] === \"\" && arrayEnd[0] == null) {\r\n\t\t\t\t\tpattern.shift();\r\n\t\t\t\t\tarrayStart.shift();\r\n\t\t\t\t\tarrayEnd.shift();\r\n\t\t\t\t}\r\n\t\t\t\tif (pattern[pattern.length] === \"\" && arrayEnd[arrayEnd.length] == null) {\r\n\t\t\t\t\tpattern.pop();\r\n\t\t\t\t\tarrayStart.pop();\r\n\t\t\t\t\tarrayEnd.pop();\r\n\t\t\t\t}\r\n\t\t\t\tif (indexStart < startValue.length || indexEnd < endValue.length) {\r\n\t\t\t\t\t// NOTE: We should never be able to reach this code unless a\r\n\t\t\t\t\t// bad forcefed value is supplied.\r\n\t\t\t\t\tconsole.error(\"Velocity: Trying to pattern match mis-matched strings \" + propertyName + \":[\\\"\" + endValue + \"\\\", \\\"\" + startValue + \"\\\"]\");\r\n\t\t\t\t}\r\n\t\t\t\tif (debug) {\r\n\t\t\t\t\tconsole.log(\"Velocity: Pattern found:\", pattern, \" -> \", arrayStart, arrayEnd, \"[\" + startValue + \",\" + endValue + \"]\");\r\n\t\t\t\t}\r\n\t\t\t\tif (propertyName === \"display\") {\r\n\t\t\t\t\tif (!/^(at-start|at-end|during)$/.test(easing)) {\r\n\t\t\t\t\t\teasing = endValue === \"none\" ? \"at-end\" : \"at-start\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (propertyName === \"visibility\") {\r\n\t\t\t\t\tif (!/^(at-start|at-end|during)$/.test(easing)) {\r\n\t\t\t\t\t\teasing = endValue === \"hidden\" ? \"at-end\" : \"at-start\";\r\n\t\t\t\t\t}\r\n\t\t\t\t} else if (isStringValue\r\n\t\t\t\t\t&& easing !== \"at-start\" && easing !== \"during\" && easing !== \"at-end\"\r\n\t\t\t\t\t&& easing !== Easing.Easings[\"at-Start\"] && easing !== Easing.Easings[\"during\"] && easing !== Easing.Easings[\"at-end\"]) {\r\n\t\t\t\t\tconsole.warn(\"Velocity: String easings must use one of 'at-start', 'during' or 'at-end': {\" + propertyName + \": [\\\"\" + endValue + \"\\\", \" + easing + \", \\\"\" + startValue + \"\\\"]}\");\r\n\t\t\t\t\teasing = \"at-start\";\r\n\t\t\t\t}\r\n\t\t\t\ttween.easing = validateEasing(easing, duration);\r\n\t\t\t}\r\n\t\t\t// This can only run a second time once - if going from automatic startValue to \"fixed\" pattern from endValue with startValue numbers\r\n\t\t} while (runAgain);\r\n\t}\r\n\r\n\t/**\r\n\t * Expand all queued animations that haven't gone yet\r\n\t *\r\n\t * This will automatically expand the properties map for any recently added\r\n\t * animations so that the start and end values are correct.\r\n\t */\r\n\texport function validateTweens(activeCall: AnimationCall) {\r\n\t\t// This might be called on an already-ready animation\r\n\t\tif (State.firstNew === activeCall) {\r\n\t\t\tState.firstNew = activeCall._next;\r\n\t\t}\r\n\t\t// Check if we're actually already ready\r\n\t\tif (activeCall._flags & AnimationFlags.EXPANDED) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tlet element = activeCall.element,\r\n\t\t\ttweens = activeCall.tweens,\r\n\t\t\tduration = getValue(activeCall.options.duration, defaults.duration);\r\n\r\n\t\tfor (const propertyName in tweens) {\r\n\t\t\tconst tween = tweens[propertyName];\r\n\r\n\t\t\tif (tween.start == null) {\r\n\t\t\t\t// Get the start value as it's not been passed in\r\n\t\t\t\tconst startValue = CSS.getPropertyValue(activeCall.element, propertyName);\r\n\r\n\t\t\t\tif (isString(startValue)) {\r\n\t\t\t\t\ttween.start = CSS.fixColors(startValue) as any;\r\n\t\t\t\t\texplodeTween(propertyName, tween, duration);\r\n\t\t\t\t} else if (!Array.isArray(startValue)) {\r\n\t\t\t\t\tconsole.warn(\"bad type\", tween, propertyName, startValue)\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (debug) {\r\n\t\t\t\tconsole.log(\"tweensContainer (\" + propertyName + \"): \" + JSON.stringify(tween), element);\r\n\t\t\t}\r\n\t\t}\r\n\t\tactiveCall._flags |= AnimationFlags.EXPANDED;\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Validation functions used for various types of data that can be supplied.\r\n * All errors are reported in the non-minified version for development. If a\r\n * validation fails then it should return undefined.\r\n */\r\n\r\n/**\r\n * Parse a duration value and return an ms number. Optionally return a\r\n * default value if the number is not valid.\r\n */\r\nfunction parseDuration(duration: \"fast\" | \"normal\" | \"slow\" | number, def?: \"fast\" | \"normal\" | \"slow\" | number): number {\r\n\tif (isNumber(duration)) {\r\n\t\treturn duration;\r\n\t}\r\n\tif (isString(duration)) {\r\n\t\treturn Duration[duration.toLowerCase()] || parseFloat(duration.replace(\"ms\", \"\").replace(\"s\", \"000\"));\r\n\t}\r\n\treturn def == null ? undefined : parseDuration(def);\r\n}\r\n\r\n/**\r\n * Validate a cache option.\r\n * @private\r\n */\r\nfunction validateCache(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'cache' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a begin option.\r\n * @private\r\n */\r\nfunction validateBegin(value: VelocityCallback): VelocityCallback {\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'begin' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a complete option.\r\n * @private\r\n */\r\nfunction validateComplete(value: VelocityCallback, noError?: true): VelocityCallback {\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'complete' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a delay option.\r\n * @private\r\n */\r\nfunction validateDelay(value: \"fast\" | \"normal\" | \"slow\" | number): number {\r\n\tconst parsed = parseDuration(value);\r\n\r\n\tif (!isNaN(parsed)) {\r\n\t\treturn parsed;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'delay' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a duration option.\r\n * @private\r\n */\r\nfunction validateDuration(value: \"fast\" | \"normal\" | \"slow\" | number, noError?: true): number {\r\n\tconst parsed = parseDuration(value);\r\n\r\n\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\treturn parsed;\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'duration' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a easing option.\r\n * @private\r\n */\r\nfunction validateEasing(value: VelocityEasingType, duration: number, noError?: true): VelocityEasingFn {\r\n\tconst Easing = VelocityStatic.Easing;\r\n\r\n\tif (isString(value)) {\r\n\t\t// Named easing\r\n\t\treturn Easing.Easings[value];\r\n\t}\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (Array.isArray(value)) {\r\n\t\tif (value.length === 1) {\r\n\t\t\t// Steps\r\n\t\t\treturn Easing.generateStep(value[0]);\r\n\t\t}\r\n\t\tif (value.length === 2) {\r\n\t\t\t// springRK4 must be passed the animation's duration.\r\n\t\t\t// Note: If the springRK4 array contains non-numbers,\r\n\t\t\t// generateSpringRK4() returns an easing function generated with\r\n\t\t\t// default tension and friction values.\r\n\t\t\treturn Easing.generateSpringRK4(value[0], value[1], duration);\r\n\t\t}\r\n\t\tif (value.length === 4) {\r\n\t\t\t// Note: If the bezier array contains non-numbers, generateBezier()\r\n\t\t\t// returns undefined.\r\n\t\t\treturn Easing.generateBezier.apply(null, value) || false;\r\n\t\t}\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'easing' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a fpsLimit option.\r\n * @private\r\n */\r\nfunction validateFpsLimit(value: number | false): number {\r\n\tif (value === false) {\r\n\t\treturn 0;\r\n\t} else {\r\n\t\tconst parsed = parseInt(value as any, 10);\r\n\r\n\t\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\t\treturn Math.min(parsed, 60);\r\n\t\t}\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'fpsLimit' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n\r\n/**\r\n * Validate a loop option.\r\n * @private\r\n */\r\nfunction validateLoop(value: number | boolean): number | true {\r\n\tif (value === false) {\r\n\t\treturn 0;\r\n\t} else if (value === true) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\tconst parsed = parseInt(value as any, 10);\r\n\r\n\t\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\t\treturn parsed;\r\n\t\t}\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'loop' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a progress option.\r\n * @private\r\n */\r\nfunction validateProgress(value: VelocityProgress): VelocityProgress {\r\n\tif (isFunction(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'progress' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a promise option.\r\n * @private\r\n */\r\nfunction validatePromise(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promise' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a promiseRejectEmpty option.\r\n * @private\r\n */\r\nfunction validatePromiseRejectEmpty(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'promiseRejectEmpty' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a queue option.\r\n * @private\r\n */\r\nfunction validateQueue(value: string | false, noError?: true): string | false {\r\n\tif (value === false || isString(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null && !noError) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'queue' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a repeat option.\r\n * @private\r\n */\r\nfunction validateRepeat(value: number | boolean): number | true {\r\n\tif (value === false) {\r\n\t\treturn 0;\r\n\t} else if (value === true) {\r\n\t\treturn true;\r\n\t} else {\r\n\t\tconst parsed = parseInt(value as any, 10);\r\n\r\n\t\tif (!isNaN(parsed) && parsed >= 0) {\r\n\t\t\treturn parsed;\r\n\t\t}\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.warn(\"VelocityJS: Trying to set 'repeat' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a speed option.\r\n * @private\r\n */\r\nfunction validateSpeed(value: number): number {\r\n\tif (isNumber(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'speed' to an invalid value:\", value);\r\n\t}\r\n}\r\n\r\n/**\r\n * Validate a sync option.\r\n * @private\r\n */\r\nfunction validateSync(value: boolean): boolean {\r\n\tif (isBoolean(value)) {\r\n\t\treturn value;\r\n\t}\r\n\tif (value != null) {\r\n\t\tconsole.error(\"VelocityJS: Trying to set 'sync' to an invalid value:\", value);\r\n\t}\r\n}\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Velocity version (should grab from package.json during build).\r\n */\r\n\r\nnamespace VelocityStatic {\r\n\texport let version = \"2.0.1\";\r\n};\r\n","/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n *\r\n * Core \"Velocity\" function.\r\n */\r\n\r\ninterface Document {\r\n\tdocumentMode: any; // IE\r\n}\r\n\r\n/**\r\n * The main Velocity function. Acts as a gateway to everything else.\r\n */\r\nfunction VelocityFn(options: VelocityObjectArgs): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, options?: VelocityOptions): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(elements: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements, propertyMap: string | VelocityProperties, duration?: number | \"fast\" | \"normal\" | \"slow\", easing?: string | number[], complete?: () => void): VelocityResult;\r\nfunction VelocityFn(this: VelocityElements | void, ...__args: any[]): VelocityResult {\r\n\tconst\r\n\t\t/**\r\n\t\t * A shortcut to the default options.\r\n\t\t */\r\n\t\tdefaults = VelocityStatic.defaults,\r\n\t\t/**\r\n\t\t * Shortcut to arguments for file size.\r\n\t\t */\r\n\t\t_arguments = arguments,\r\n\t\t/**\r\n\t\t * Cache of the first argument - this is used often enough to be saved.\r\n\t\t */\r\n\t\targs0 = _arguments[0] as VelocityObjectArgs,\r\n\t\t/**\r\n\t\t * To allow for expressive CoffeeScript code, Velocity supports an\r\n\t\t * alternative syntax in which \"elements\" (or \"e\"), \"properties\" (or\r\n\t\t * \"p\"), and \"options\" (or \"o\") objects are defined on a container\r\n\t\t * object that's passed in as Velocity's sole argument.\r\n\t\t *\r\n\t\t * Note: Some browsers automatically populate arguments with a\r\n\t\t * \"properties\" object. We detect it by checking for its default\r\n\t\t * \"names\" property.\r\n\t\t */\r\n\t\t// TODO: Confirm which browsers - if <=IE8 the we can drop completely\r\n\t\tsyntacticSugar = isPlainObject(args0) && (args0.p || ((isPlainObject(args0.properties) && !(args0.properties as any).names) || isString(args0.properties)));\r\n\tlet\r\n\t\t/**\r\n\t\t * When Velocity is called via the utility function (Velocity()),\r\n\t\t * elements are explicitly passed in as the first parameter. Thus,\r\n\t\t * argument positioning varies.\r\n\t\t */\r\n\t\targumentIndex: number = 0,\r\n\t\t/**\r\n\t\t * The list of elements, extended with Promise and Velocity.\r\n\t\t */\r\n\t\telements: VelocityResult,\r\n\t\t/**\r\n\t\t * The properties being animated. This can be a string, in which case it\r\n\t\t * is either a function for these elements, or it is a \"named\" animation\r\n\t\t * sequence to use instead. Named sequences start with either \"callout.\"\r\n\t\t * or \"transition.\". When used as a callout the values will be reset\r\n\t\t * after finishing. When used as a transtition then there is no special\r\n\t\t * handling after finishing.\r\n\t\t */\r\n\t\tpropertiesMap: string | VelocityProperties,\r\n\t\t/**\r\n\t\t * Options supplied, this will be mapped and validated into\r\n\t\t * options.\r\n\t\t */\r\n\t\toptionsMap: VelocityOptions,\r\n\t\t/**\r\n\t\t * If called via a chain then this contains the last calls\r\n\t\t * animations. If this does not have a value then any access to the\r\n\t\t * element's animations needs to be to the currently-running ones.\r\n\t\t */\r\n\t\tanimations: AnimationCall[],\r\n\t\t/**\r\n\t\t * The promise that is returned.\r\n\t\t */\r\n\t\tpromise: Promise,\r\n\t\t// Used when the animation is finished\r\n\t\tresolver: (value?: VelocityResult) => void,\r\n\t\t// Used when there was an issue with one or more of the Velocity arguments\r\n\t\trejecter: (reason: any) => void;\r\n\r\n\t//console.log(\"Velocity\", _arguments)\r\n\t// First get the elements, and the animations connected to the last call if\r\n\t// this is chained.\r\n\t// TODO: Clean this up a bit\r\n\t// TODO: Throw error if the chain is called with elements as the first argument. isVelocityResult(this) && ( (isNode(arg0) || isWrapped(arg0)) && arg0 == this)\r\n\tif (isNode(this)) {\r\n\t\t// This is from a chain such as document.getElementById(\"\").velocity(...)\r\n\t\telements = [this as HTMLorSVGElement] as VelocityResult;\r\n\t} else if (isWrapped(this)) {\r\n\t\t// This might be a chain from something else, but if chained from a\r\n\t\t// previous Velocity() call then grab the animations it's related to.\r\n\t\telements = Object.assign([], this as HTMLorSVGElement[]) as VelocityResult;\r\n\t\tif (isVelocityResult(this)) {\r\n\t\t\tanimations = (this as VelocityResult).velocity.animations;\r\n\t\t}\r\n\t} else if (syntacticSugar) {\r\n\t\telements = Object.assign([], args0.elements || args0.e) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t} else if (isNode(args0)) {\r\n\t\telements = Object.assign([], [args0]) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t} else if (isWrapped(args0)) {\r\n\t\telements = Object.assign([], args0) as VelocityResult;\r\n\t\targumentIndex++;\r\n\t}\r\n\t// Allow elements to be chained.\r\n\tif (elements) {\r\n\t\tdefineProperty(elements, \"velocity\", VelocityFn.bind(elements));\r\n\t\tif (animations) {\r\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\r\n\t\t}\r\n\t}\r\n\t// Next get the propertiesMap and options.\r\n\tif (syntacticSugar) {\r\n\t\tpropertiesMap = getValue(args0.properties, args0.p);\r\n\t} else {\r\n\t\t// TODO: Should be possible to call Velocity(\"pauseAll\") - currently not possible\r\n\t\tpropertiesMap = _arguments[argumentIndex++] as string | VelocityProperties;\r\n\t}\r\n\t// Get any options map passed in as arguments first, expand any direct\r\n\t// options if possible.\r\n\tconst isReverse = propertiesMap === \"reverse\",\r\n\t\tisAction = !isReverse && isString(propertiesMap),\r\n\t\topts = syntacticSugar ? getValue(args0.options, args0.o) : _arguments[argumentIndex];\r\n\r\n\tif (isPlainObject(opts)) {\r\n\t\toptionsMap = opts;\r\n\t}\r\n\t// Create the promise if supported and wanted.\r\n\tif (Promise && getValue(optionsMap && optionsMap.promise, defaults.promise)) {\r\n\t\tpromise = new Promise(function(_resolve, _reject) {\r\n\t\t\trejecter = _reject;\r\n\t\t\t// IMPORTANT:\r\n\t\t\t// If a resolver tries to run on a Promise then it will wait until\r\n\t\t\t// that Promise resolves - but in this case we're running on our own\r\n\t\t\t// Promise, so need to make sure it's not seen as one. Setting these\r\n\t\t\t// values to undefined for the duration of the resolve.\r\n\t\t\t// Due to being an async call, they should be back to \"normal\"\r\n\t\t\t// before the .then() function gets called.\r\n\t\t\tresolver = function(args: VelocityResult) {\r\n\t\t\t\tif (isVelocityResult(args)) {\r\n\t\t\t\t\tconst _then = args && args.then;\r\n\r\n\t\t\t\t\tif (_then) {\r\n\t\t\t\t\t\targs.then = undefined; // Preserving enumeration etc\r\n\t\t\t\t\t}\r\n\t\t\t\t\t_resolve(args);\r\n\t\t\t\t\tif (_then) {\r\n\t\t\t\t\t\targs.then = _then;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\t_resolve(args);\r\n\t\t\t\t}\r\n\t\t\t};\r\n\t\t});\r\n\t\tif (elements) {\r\n\t\t\tdefineProperty(elements, \"then\", promise.then.bind(promise));\r\n\t\t\tdefineProperty(elements, \"catch\", promise.catch.bind(promise));\r\n\t\t\tif ((promise as any).finally) {\r\n\t\t\t\t// Semi-standard\r\n\t\t\t\tdefineProperty(elements, \"finally\", (promise as any).finally.bind(promise));\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tconst promiseRejectEmpty: boolean = getValue(optionsMap && optionsMap.promiseRejectEmpty, defaults.promiseRejectEmpty);\r\n\r\n\tif (promise) {\r\n\t\tif (!elements && !isAction) {\r\n\t\t\tif (promiseRejectEmpty) {\r\n\t\t\t\trejecter(\"Velocity: No elements supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\");\r\n\t\t\t} else {\r\n\t\t\t\tresolver();\r\n\t\t\t}\r\n\t\t} else if (!propertiesMap) {\r\n\t\t\tif (promiseRejectEmpty) {\r\n\t\t\t\trejecter(\"Velocity: No properties supplied, if that is deliberate then pass `promiseRejectEmpty:false` as an option. Aborting.\");\r\n\t\t\t} else {\r\n\t\t\t\tresolver();\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tif ((!elements && !isAction) || !propertiesMap) {\r\n\t\treturn promise as any;\r\n\t}\r\n\r\n\t// NOTE: Can't use isAction here due to type inference - there are callbacks\r\n\t// between so the type isn't considered safe.\r\n\tif (isAction) {\r\n\t\tconst args: any[] = [],\r\n\t\t\tpromiseHandler: VelocityPromise = promise && {\r\n\t\t\t\t_promise: promise,\r\n\t\t\t\t_resolver: resolver,\r\n\t\t\t\t_rejecter: rejecter\r\n\t\t\t};\r\n\r\n\t\twhile (argumentIndex < _arguments.length) {\r\n\t\t\targs.push(_arguments[argumentIndex++]);\r\n\t\t}\r\n\r\n\t\t// Velocity's behavior is categorized into \"actions\". If a string is\r\n\t\t// passed in instead of a propertiesMap then that will call a function\r\n\t\t// to do something special to the animation linked.\r\n\t\t// There is one special case - \"reverse\" - which is handled differently,\r\n\t\t// by being stored on the animation and then expanded when the animation\r\n\t\t// starts.\r\n\t\tconst action = (propertiesMap as string).replace(/\\..*$/, \"\"),\r\n\t\t\tcallback = VelocityStatic.Actions[action] || VelocityStatic.Actions[\"default\"];\r\n\r\n\t\tif (callback) {\r\n\t\t\tconst result = callback(args, elements, promiseHandler, propertiesMap as string);\r\n\r\n\t\t\tif (result !== undefined) {\r\n\t\t\t\treturn result;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tconsole.warn(\"VelocityJS: Unknown action:\", propertiesMap);\r\n\t\t}\r\n\t} else if (isPlainObject(propertiesMap) || isReverse) {\r\n\t\t/**\r\n\t\t * The options for this set of animations.\r\n\t\t */\r\n\t\tconst options: StrictVelocityOptions = {};\r\n\t\tlet isSync = defaults.sync;\r\n\r\n\t\t// Private options first - set as non-enumerable, and starting with an\r\n\t\t// underscore so we can filter them out.\r\n\t\tif (promise) {\r\n\t\t\tdefineProperty(options, \"_promise\", promise);\r\n\t\t\tdefineProperty(options, \"_rejecter\", rejecter);\r\n\t\t\tdefineProperty(options, \"_resolver\", resolver);\r\n\t\t}\r\n\t\tdefineProperty(options, \"_ready\", 0);\r\n\t\tdefineProperty(options, \"_started\", 0);\r\n\t\tdefineProperty(options, \"_completed\", 0);\r\n\t\tdefineProperty(options, \"_total\", 0);\r\n\r\n\t\t// Now check the optionsMap\r\n\t\tif (isPlainObject(optionsMap)) {\r\n\t\t\toptions.duration = getValue(validateDuration(optionsMap.duration), defaults.duration);\r\n\t\t\toptions.delay = getValue(validateDelay(optionsMap.delay), defaults.delay);\r\n\t\t\t// Need the extra fallback here in case it supplies an invalid\r\n\t\t\t// easing that we need to overrride with the default.\r\n\t\t\toptions.easing = validateEasing(getValue(optionsMap.easing, defaults.easing), options.duration) || validateEasing(defaults.easing, options.duration);\r\n\t\t\toptions.loop = getValue(validateLoop(optionsMap.loop), defaults.loop);\r\n\t\t\toptions.repeat = options.repeatAgain = getValue(validateRepeat(optionsMap.repeat), defaults.repeat);\r\n\t\t\tif (optionsMap.speed != null) {\r\n\t\t\t\toptions.speed = getValue(validateSpeed(optionsMap.speed), 1);\r\n\t\t\t}\r\n\t\t\tif (isBoolean(optionsMap.promise)) {\r\n\t\t\t\toptions.promise = optionsMap.promise;\r\n\t\t\t}\r\n\t\t\toptions.queue = getValue(validateQueue(optionsMap.queue), defaults.queue);\r\n\t\t\tif (optionsMap.mobileHA && !VelocityStatic.State.isGingerbread) {\r\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)\r\n\t\t\t\t on animating elements. HA is removed from the element at the completion of its animation. */\r\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. */\r\n\t\t\t\t/* Note: You can read more about the use of mobileHA in Velocity's documentation: VelocityJS.org/#mobileHA. */\r\n\t\t\t\toptions.mobileHA = true;\r\n\t\t\t}\r\n\t\t\tif (!isReverse) {\r\n\t\t\t\tif (optionsMap.display != null) {\r\n\t\t\t\t\t(propertiesMap as VelocityProperties).display = optionsMap.display as string;\r\n\t\t\t\t\tconsole.error(\"Deprecated 'options.display' used, this is now a property:\", optionsMap.display);\r\n\t\t\t\t}\r\n\t\t\t\tif (optionsMap.visibility != null) {\r\n\t\t\t\t\t(propertiesMap as VelocityProperties).visibility = optionsMap.visibility as string;\r\n\t\t\t\t\tconsole.error(\"Deprecated 'options.visibility' used, this is now a property:\", optionsMap.visibility);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// TODO: Allow functional options for different options per element\r\n\t\t\tconst optionsBegin = validateBegin(optionsMap.begin),\r\n\t\t\t\toptionsComplete = validateComplete(optionsMap.complete),\r\n\t\t\t\toptionsProgress = validateProgress(optionsMap.progress),\r\n\t\t\t\toptionsSync = validateSync(optionsMap.sync);\r\n\r\n\t\t\tif (optionsBegin != null) {\r\n\t\t\t\toptions.begin = optionsBegin;\r\n\t\t\t}\r\n\t\t\tif (optionsComplete != null) {\r\n\t\t\t\toptions.complete = optionsComplete;\r\n\t\t\t}\r\n\t\t\tif (optionsProgress != null) {\r\n\t\t\t\toptions.progress = optionsProgress;\r\n\t\t\t}\r\n\t\t\tif (optionsSync != null) {\r\n\t\t\t\tisSync = optionsSync;\r\n\t\t\t}\r\n\t\t} else if (!syntacticSugar) {\r\n\t\t\t// Expand any direct options if possible.\r\n\t\t\tconst duration = validateDuration(_arguments[argumentIndex], true);\r\n\t\t\tlet offset = 0;\r\n\r\n\t\t\tif (duration !== undefined) {\r\n\t\t\t\toffset++;\r\n\t\t\t\toptions.duration = duration;\r\n\t\t\t}\r\n\t\t\tif (!isFunction(_arguments[argumentIndex + offset])) {\r\n\t\t\t\t// Despite coming before Complete, we can't pass a fn easing\r\n\t\t\t\tconst easing = validateEasing(_arguments[argumentIndex + offset], getValue(options && validateDuration(options.duration), defaults.duration) as number, true);\r\n\r\n\t\t\t\tif (easing !== undefined) {\r\n\t\t\t\t\toffset++;\r\n\t\t\t\t\toptions.easing = easing;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconst complete = validateComplete(_arguments[argumentIndex + offset], true);\r\n\r\n\t\t\tif (complete !== undefined) {\r\n\t\t\t\toptions.complete = complete;\r\n\t\t\t}\r\n\t\t\toptions.loop = defaults.loop;\r\n\t\t\toptions.repeat = options.repeatAgain = defaults.repeat;\r\n\t\t}\r\n\r\n\t\tif (isReverse && options.queue === false) {\r\n\t\t\tthrow new Error(\"VelocityJS: Cannot reverse a queue:false animation.\");\r\n\t\t}\r\n\r\n\t\t/* When a set of elements is targeted by a Velocity call, the set is broken up and each element has the current Velocity call individually queued onto it.\r\n\t\t In this way, each element's existing queue is respected; some elements may already be animating and accordingly should not have this current Velocity call triggered immediately. */\r\n\t\t/* In each queue, tween data is processed for each animating property then pushed onto the call-wide calls array. When the last element in the set has had its tweens processed,\r\n\t\t the call array is pushed to VelocityStatic.State.calls for live processing by the requestAnimationFrame tick. */\r\n\r\n\t\tconst rootAnimation: AnimationCall = {\r\n\t\t\t_prev: undefined,\r\n\t\t\t_next: undefined,\r\n\t\t\t_flags: isSync ? AnimationFlags.SYNC : 0,\r\n\t\t\toptions: options,\r\n\t\t\tpercentComplete: 0,\r\n\t\t\t//element: element,\r\n\t\t\telements: elements,\r\n\t\t\tellapsedTime: 0,\r\n\t\t\ttimeStart: 0\r\n\t\t};\r\n\r\n\t\tanimations = [];\r\n\t\tfor (let index = 0; index < elements.length; index++) {\r\n\t\t\tconst element = elements[index];\r\n\t\t\tlet flags = 0;\r\n\r\n\t\t\tif (isNode(element)) { // TODO: This needs to check for valid animation targets, not just Elements\r\n\t\t\t\tif (isReverse) {\r\n\t\t\t\t\tconst lastAnimation = Data(element).lastAnimationList[options.queue as string];\r\n\r\n\t\t\t\t\tpropertiesMap = lastAnimation && lastAnimation.tweens;\r\n\t\t\t\t\tif (!propertiesMap) {\r\n\t\t\t\t\t\tconsole.error(\"VelocityJS: Attempting to reverse an animation on an element with no previous animation:\", element);\r\n\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tflags |= AnimationFlags.REVERSE & ~(lastAnimation._flags & AnimationFlags.REVERSE);\r\n\t\t\t\t}\r\n\t\t\t\tconst tweens = createEmptyObject(),\r\n\t\t\t\t\tanimation: AnimationCall = Object.assign({\r\n\t\t\t\t\t\telement: element,\r\n\t\t\t\t\t\ttweens: tweens\r\n\t\t\t\t\t}, rootAnimation);\r\n\r\n\t\t\t\toptions._total++;\r\n\t\t\t\tanimation._flags |= flags;\r\n\t\t\t\tanimations.push(animation);\r\n\t\t\t\tif (isReverse) {\r\n\t\t\t\t\t// In this case we're using the previous animation, so\r\n\t\t\t\t\t// it will be expanded correctly when that one runs.\r\n\t\t\t\t\tanimation.tweens = propertiesMap as any;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tVelocityStatic.expandProperties(animation, propertiesMap);\r\n\t\t\t\t}\r\n\t\t\t\tVelocityStatic.queue(element, animation, options.queue);\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (VelocityStatic.State.isTicking === false) {\r\n\t\t\t// If the animation tick isn't running, start it. (Velocity shuts it\r\n\t\t\t// off when there are no active calls to process.)\r\n\t\t\tVelocityStatic.tick();\r\n\t\t}\r\n\t\tif (animations) {\r\n\t\t\tdefineProperty(elements.velocity, \"animations\", animations);\r\n\t\t}\r\n\t}\r\n\t/***************\r\n\t Chaining\r\n\t ***************/\r\n\r\n\t/* Return the elements back to the call chain, with wrapped elements taking precedence in case Velocity was called via the $.fn. extension. */\r\n\treturn elements || promise as any;\r\n};\r\n\r\n\r\n/***************\r\n Summary\r\n ***************/\r\n\r\n/*\r\n - CSS: CSS stack that works independently from the rest of Velocity.\r\n - animate(): Core animation method that iterates over the targeted elements and queues the incoming call onto each element individually.\r\n - Pre-Queueing: Prepare the element for animation by instantiating its data cache and processing the call's options.\r\n - Queueing: The logic that runs once the call has reached its point of execution in the element's queue stack.\r\n Most logic is placed here to avoid risking it becoming stale (if the element's properties have changed).\r\n - Pushing: Consolidation of the tween data followed by its push onto the global in-progress calls container.\r\n - tick(): The single requestAnimationFrame loop responsible for tweening all in-progress calls.\r\n - completeCall(): Handles the cleanup process for each Velocity call.\r\n */\r\n\r\n/*********************\r\n Helper Functions\r\n *********************/\r\n\r\n/* IE detection. Gist: https://gist.github.com/julianshapiro/9098609 */\r\nvar IE = (function() {\r\n\tif (document.documentMode) {\r\n\t\treturn document.documentMode;\r\n\t} else {\r\n\t\tfor (let i = 7; i > 4; i--) {\r\n\t\t\tlet div = document.createElement(\"div\");\r\n\r\n\t\t\tdiv.innerHTML = \"\";\r\n\t\t\tif (div.getElementsByTagName(\"span\").length) {\r\n\t\t\t\tdiv = null;\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn undefined;\r\n})();\r\n\r\n/******************\r\n Unsupported\r\n ******************/\r\n\r\nif (IE <= 8) {\r\n\tthrow new Error(\"VelocityJS cannot run on Internet Explorer 8 or earlier\");\r\n}\r\n\r\n/******************\r\n Frameworks\r\n ******************/\r\n\r\ninterface Window {\r\n\tjQuery: {fn?: any};\r\n\tZepto: {fn?: any};\r\n\tVelocity: any;\r\n}\r\n\r\nif (window === this) {\r\n\t/*\r\n\t * Both jQuery and Zepto allow their $.fn object to be extended to allow\r\n\t * wrapped elements to be subjected to plugin calls. If either framework is\r\n\t * loaded, register a \"velocity\" extension pointing to Velocity's core\r\n\t * animate() method. Velocity also registers itself onto a global container\r\n\t * (window.jQuery || window.Zepto || window) so that certain features are\r\n\t * accessible beyond just a per-element scope. Accordingly, Velocity can\r\n\t * both act on wrapped DOM elements and stand alone for targeting raw DOM\r\n\t * elements.\r\n\t */\r\n\tconst patch = VelocityStatic.patch,\r\n\t\tjQuery = window.jQuery,\r\n\t\tZepto = window.Zepto;\r\n\r\n\tpatch(window, true);\r\n\tpatch(Element && Element.prototype);\r\n\tpatch(NodeList && NodeList.prototype);\r\n\tpatch(HTMLCollection && HTMLCollection.prototype);\r\n\r\n\tpatch(jQuery, true);\r\n\tpatch(jQuery && jQuery.fn);\r\n\r\n\tpatch(Zepto, true);\r\n\tpatch(Zepto && Zepto.fn);\r\n}\r\n\r\n/******************\r\n Known Issues\r\n ******************/\r\n\r\n/* The CSS spec mandates that the translateX/Y/Z transforms are %-relative to the element itself -- not its parent.\r\n Velocity, however, doesn't make this distinction. Thus, converting to or from the % unit with these subproperties\r\n will produce an inaccurate conversion value. The same issue exists with the cx/cy attributes of SVG circles and ellipses. */\r\n","///\r\n///\r\n///\r\n///\r\n///\r\n///\r\n/*\r\n * VelocityJS.org (C) 2014-2017 Julian Shapiro.\r\n *\r\n * Licensed under the MIT license. See LICENSE file in the project root for details.\r\n * \r\n * Merge the VelocityStatic namespace onto the Velocity function for external\r\n * use. This is done as a read-only way. Any attempt to change these values will\r\n * be allowed.\r\n */\r\nfor (const key in VelocityStatic) {\r\n\tlet value = VelocityStatic[key];\r\n\r\n\tif (isString(value) || isNumber(value) || isBoolean(value)) {\r\n\t\tObject.defineProperty(VelocityFn, key, {\r\n\t\t\tenumerable: PUBLIC_MEMBERS.indexOf(key) >= 0,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn VelocityStatic[key];\r\n\t\t\t},\r\n\t\t\tset: function(value?: any) {\r\n\t\t\t\tVelocityStatic[key] = value;\r\n\t\t\t}\r\n\t\t});\r\n\t} else {\r\n\t\tObject.defineProperty(VelocityFn, key, {\r\n\t\t\tenumerable: PUBLIC_MEMBERS.indexOf(key) >= 0,\r\n\t\t\tget: function() {\r\n\t\t\t\treturn VelocityStatic[key];\r\n\t\t\t}\r\n\t\t});\r\n\t}\r\n}\r\n\r\n// console.log(\"Velocity keys\", Object.keys(VelocityStatic));\r\n"]} \ No newline at end of file diff --git a/velocity.min.js b/velocity.min.js index af60063e..1c062b1e 100644 --- a/velocity.min.js +++ b/velocity.min.js @@ -1,2 +1,2 @@ -/*! velocity-animate v2.0.1 (Saturday 24th February 2018, 7:26:12 AM) */ -!function(e,t){"function"==typeof define&&define.amd?define("Velocity",[],function(){return e.Velocity=t()}):"object"==typeof module&&module.exports?module.exports=t():e.Velocity=t()}(this,function(){var e=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0)return n}function ve(e,t,n){var r=re.Easing;if(l(e))return r.Easings[e];if(u(e))return e;if(Array.isArray(e)){if(1===e.length)return r.generateStep(e[0]);if(2===e.length)return r.generateSpringRK4(e[0],e[1],t);if(4===e.length)return r.generateBezier.apply(null,e)||!1}}function me(e){if(!1===e)return 0;var t=parseInt(e,10);return!isNaN(t)&&t>=0?Math.min(t,60):void 0}function he(e){if(!1===e)return 0;if(!0===e)return!0;var t=parseInt(e,10);return!isNaN(t)&&t>=0?t:void 0}function ye(e,t){if(!1===e||l(e))return e}function be(e){if(!1===e)return 0;if(!0===e)return!0;var t=parseInt(e,10);return!isNaN(t)&&t>=0?t:void 0}function we(e){if(o(e))return e}function Se(e){if(a(e))return e}function Ee(){for(var e=[],t=0;t=0?a.replace(/^.*\./,""):void 0,c="false"!==u&&ye(u,!0),g=n[1];if(!l)return null;if(f(r)&&r.velocity.animations)o=r.velocity.animations;else{o=[];for(var d=e.State.first;d;d=d._next)r.indexOf(d.element)>=0&&oe(d.queue,d.options.queue)===c&&o.push(d);if(r.length>1&&o.length>1){for(var p=1,v=o[0].options;p=0?a.replace(/^.*\./,""):void 0)&&ye(n[0]),l=e.defaults.queue;if(f(r)&&r.velocity.animations)for(var u=0,c=r.velocity.animations;u1)throw Error("VelocityJS: Must tween a percentage from 0 to 1!");if(!d(g))throw Error("VelocityJS: Cannot tween an invalid property!");if(a)for(var m in g)if(g.hasOwnProperty(m)&&(!Array.isArray(g[m])||g[m].length<2))throw Error("VelocityJS: When not supplying an element you must force-feed values: "+m);var h,y=ve(oe(p,e.defaults.easing),1e3);for(var m in e.expandProperties(c,g),c.tweens){var b=c.tweens[m],w=b.easing||y,S=b.pattern,E="";if(v++,S)for(var x=0;x=i.length)return i;if(i[a]!==e[t+a])break}while(++a)}return""},((O=re||(re={})).CSS||(O.CSS={})).setPropertyValue=function(e,t,n,r){var i=le(e);l(n)&&"c"===n[0]&&"a"===n[1]&&"l"===n[2]&&"c"===n[3]&&"("===n[4]&&"0"===n[5]&&" "===n[5]&&(n=n.replace(/^calc\(0[^\d]* \+ ([^\(\)]+)\)$/,"$1")),i&&i.cache[t]!==n&&(i.cache[t]=n||void 0,(r=r||O.getNormalization(e,t))&&r(e,n))},function(e){function t(t){var n=t[0],r=t[1];l(n)&&u(r)&&(e.Easings[n]||(e.Easings[n]=r))}e.Easings=Object.create(null),e.registerEasing=t,k.registerAction(["registerEasing",t],!0),t(["linear",function(e,t,n){return t+e*(n-t)}]),t(["swing",function(e,t,n){return t+(.5-Math.cos(e*Math.PI)/2)*(n-t)}]),t(["spring",function(e,t,n){return t+(1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e))*(n-t)}])}((k=re||(re={})).Easing||(k.Easing={})),function(e){function t(t,n){e.registerEasing([t,function(e,t,r){return 0===e?t:1===e?r:Math.pow(e,2)*((n+1)*e-n)*(r-t)}])}function n(t,n){e.registerEasing([t,function(e,t,r){return 0===e?t:1===e?r:(Math.pow(--e,2)*((n+1)*e+n)+1)*(r-t)}])}function r(t,n){n*=1.525,e.registerEasing([t,function(e,t,r){return 0===e?t:1===e?r:.5*((e*=2)<1?Math.pow(e,2)*((n+1)*e-n):Math.pow(e-=2,2)*((n+1)*e+n)+2)*(r-t)}])}e.registerBackIn=t,e.registerBackOut=n,e.registerBackInOut=r,t("easeInBack",1.7),n("easeOutBack",1.7),r("easeInOutBack",1.7)}((_=re||(re={})).Easing||(_.Easing={})),function(e){function t(e){return Math.min(Math.max(e,0),1)}function n(e,t){return 1-3*t+3*e}function r(e,t){return 3*t-6*e}function i(e){return 3*e}function a(e,t,a){return((n(t,a)*e+r(t,a))*e+i(t))*e}function o(e,t,a){return 3*n(t,a)*e*e+2*r(t,a)*e+i(t)}function s(e,n,r,i){var s=4,l=.001,u=1e-7,c=10,f=11,g=1/(f-1),d="Float32Array"in window;if(4===arguments.length){for(var p=0;p<4;++p)if("number"!=typeof arguments[p]||isNaN(arguments[p])||!isFinite(arguments[p]))return;e=t(e),r=t(r);var v=d?new Float32Array(f):Array(f),m=!1,h=function(t,o,s,l){return m||w(),0===t?o:1===t?s:e===n&&r===i?o+t*(s-o):o+a(b(t),n,i)*(s-o)};h.getControlPoints=function(){return[{x:e,y:n},{x:r,y:i}]};var y="generateBezier("+[e,n,r,i]+")";return h.toString=function(){return y},h}function b(t){for(var n=0,i=1,d=f-1;i!==d&&v[i]<=t;++i)n+=g;var p=n+(t-v[--i])/(v[i+1]-v[i])*g,m=o(p,e,r);return m>=l?function(t,n){for(var i=0;i0?i=s:n=s}while(Math.abs(o)>u&&++l1e-4&&Math.abs(s.v)>1e-4;);return y?function(e,t,n){return 0===e?t:1===e?n:t+m[e*(m.length-1)|0]*(n-t)}:h}}(),I=re||(re={}),q=I.Easing||(I.Easing={}),j={},q.generateStep=function(e){var t=j[e];return t||(j[e]=function(t,n,r){return 0===t?n:1===t?r:n+Math.round(t*e)*(1/e)*(r-n)})},z=re||(re={}),(V=z.Easing||(z.Easing={})).registerEasing(["at-start",function(e,t,n){return 0===e?t:n}]),V.registerEasing(["during",function(e,t,n){return 0===e||1===e?t:n}]),V.registerEasing(["at-end",function(e,t,n){return 1===e?n:t}]),function(e){function t(t){var n=t[0],r=t[1],i=t[2];if(!l(n)&&n instanceof Object)if(l(r))if(u(i)){var a=e.constructors.indexOf(n);a<0&&(e.MaxType=a=e.constructors.push(n)-1,e.Normalizations[a]=Object.create(null)),e.Normalizations[a][r]=i,!1===t[3]&&e.NoCacheNormalizations.add(r)}else;else;else;}function n(t){var n=t[1],r=e.constructors.indexOf(t[0]);return!!e.Normalizations[r][n]}e.MaxType=-1,e.Normalizations=[],e.NoCacheNormalizations=new Set,e.constructors=[],e.registerNormalization=t,e.hasNormalization=n,e.getNormalization=function(t,n){for(var r,i=le(t),a=e.MaxType,o=i.types;!r&&a>=0;a--)o&1<=1?0:n.calls.length?(1-f)/n.calls.length:1,v=function(f){var g=n.calls[f],d=g[0],v=1e3,m=g[1],h=g[2]||{},y={};if(void 0!==i.duration?v=i.duration:void 0!==n.defaultDuration&&(v=n.defaultDuration),y.duration=v*("number"==typeof m?m:p),y.queue=i.queue||"",y.easing=h.easing||"ease",y.delay=parseFloat(h.delay)||0,y.loop=!n.loop&&h.loop,y.cache=h.cache||!0,0===f&&(y.delay+=parseFloat(i.delay)||0,0===a&&(y.begin=function(){i.begin&&i.begin.call(s,s);var n,r,a,o,l,u,c=t.match(/(In|Out)$/);c&&"In"===c[0]&&void 0!==d.opacity&&(s.nodeType?[s]:s).forEach(function(t){e.CSS.setPropertyValue(t,"opacity",0)}),i.animateParentHeight&&c&&(r=c[0],a=v+y.delay,o=i.stagger,u=0,((n=s).nodeType?[n]:n).forEach(function(t,n){o&&(a+=n*o),l=t.parentNode;var r=["height","paddingTop","paddingBottom","marginTop","marginBottom"];"border-box"===(""+e.CSS.getPropertyValue(t,"boxSizing")).toLowerCase()&&(r=["height"]),r.forEach(function(n){u+=parseFloat(e.CSS.getPropertyValue(t,n))})}),Ee(l,{height:("In"===r?"+":"-")+"="+u},{queue:!1,easing:"ease-in-out",duration:a*("In"===r?.6:1)}))}),i.visibility&&"hidden"!==i.visibility&&(y.visibility=i.visibility)),f===n.calls.length-1){var b=function(){void 0!==i.display&&"none"!==i.display||!/Out$/.test(t)||(s.nodeType?[s]:s).forEach(function(t){e.CSS.setPropertyValue(t,"display","none")}),i.complete&&i.complete.call(s,s),l&&l(s||r)};y.complete=function(){if(u&&e.Redirects[t](r,i,a,o,s,l,!0===u||Math.max(0,u-1)),n.reset){for(var f in n.reset)n.reset.hasOwnProperty(f);var g={duration:0,queue:!1};c&&(g.complete=b),Ee(r,n.reset,g)}else c&&b()},"hidden"===i.visibility&&(y.visibility=i.visibility)}Ee(r,d,y)};for(g=0;g1&&(n.reverse().forEach(function(t,r){var i=n[r+1];if(i){var a=t.o||t.options,o=i.o||i.options,s=a&&!1===a.sequenceQueue?"begin":"complete",l=o&&o[s],u={};u[s]=function(){var e=i.e||i.elements,n=e.nodeType?[e]:e;l&&l.call(n,n),Ee(t)},i.o?i.o=e({},o,u):i.options=e({},o,u)}}),n.reverse()),Ee(n[0])}}(),function(e){function t(e){try{var t=e.elements;e.options.begin.call(t,t,e)}catch(e){setTimeout(function(){throw e},1)}}function n(t,n){try{var r=t.elements,i=t.percentComplete,a=t.options,o=t.tween;t.options.progress.call(r,r,i,Math.max(0,t.timeStart+(null!=t.duration?t.duration:null!=a.duration?a.duration:e.defaults.duration)-n),void 0!==o?o:100*i+"",t)}catch(e){setTimeout(function(){throw e},1)}}var r,i;function a(){var t,a;for(t=r;t;t=a)a=t._nextProgress,n(t,e.lastTick);for(t=i;t;t=a)a=t._nextComplete,e.completeCall(t)}e.callBegin=t;var o,s=1e3/60,l=function(){var e=window.performance||{};if("function"!=typeof e.now){var t=e.timing&&e.timing.navigationStart?e.timing.navigationStart:ie();e.now=function(){return ie()-t}}return e}(),u=function(t){return setTimeout(function(){t(l.now())},Math.max(0,s-(l.now()-e.lastTick)))},c=window.requestAnimationFrame||u,f=document.hidden?u:c;function g(n){if(!o){if(o=!0,n){var u=n&&!0!==n?n:l.now(),c=e.lastTick?u-e.lastTick:s,d=e.defaults.speed,p=e.defaults.easing,v=e.defaults.duration,m=void 0,h=void 0,y=void 0,b=void 0;if(r=null,i=null,c>=e.defaults.minFrameTime||!e.lastTick){for(e.lastTick=u;m=e.State.firstNew;)e.validateTweens(m);for(m=e.State.first;m&&m!==e.State.firstNew;m=m._next){var w=m.element,S=void 0;if(w.parentNode&&(S=le(w))){var E=m.options,x=m._flags;if(!(O=m.timeStart)){var C=null!=m.queue?m.queue:E.queue;O=u-c,!1!==C&&(O=Math.max(O,S.lastFinishList[C]||0)),m.timeStart=O}16&x?m.timeStart+=c:2&x||(m._flags|=2,E._ready++)}else e.freeAnimationCall(m)}for(m=e.State.first;m&&m!==e.State.firstNew;m=h){if(h=m._next,2&(x=m._flags)&&!(16&x)){E=m.options;if(32&x&&E._readyu)continue;m.timeStart=O+=k/(k>0?N:1)}m._flags|=4,0==E._started++&&(E._first=m,E.begin&&(t(m),E.begin=void 0))}if(1!==N)m.timeStart=O+=Math.min(c,u-O)*(1-N);E._first===m&&E.progress&&(m._nextProgress=void 0,y?y._nextProgress=y=m:r=y=m);var _=null!=m.easing?m.easing:null!=E.easing?E.easing:p,A=m.ellapsedTime=u-O,P=m.percentComplete=e.mock?1:Math.min(A/(null!=m.duration?m.duration:null!=E.duration?E.duration:v),1),T=m.tweens,M=64&x;for(var q in 1===P&&(m._nextComplete=void 0,b?b._nextComplete=b=m:i=b=m),T){var j=T[q],I=j.easing||_,z=j.pattern,V="",L=0;if(z){for(;L=4&&"("===t?h++:(h&&h<5||h>=4&&")"===t&&--h<5)&&(h=0),0===y&&"r"===t||1===y&&"g"===t||2===y&&"b"===t||3===y&&"a"===t||y>=3&&"("===t?(3===y&&"a"===t&&(b=1),y++):b&&","===t?++b>3&&(y=b=0):(b&&y<(b?5:4)||y>=(b?4:3)&&")"===t&&--y<(b?5:4))&&(y=b=0);else if(t||n){for(w=!0,l(f[f.length-1])||(1!==d.length||d[0]?(d.push(""),f.push(""),g.push("")):f[0]=g[0]="");v4;e--){var t=document.createElement("div");if(t.innerHTML="\x3c!--[if IE "+e+"]>=0,get:function(){return re[e]},set:function(t){re[e]=t}}):Object.defineProperty(Ee,e,{enumerable:t.indexOf(e)>=0,get:function(){return re[e]}})};for(var ke in re)Oe(ke);return Ee}); \ No newline at end of file +/*! velocity-animate v2.0.1 (Sunday 4th March 2018, 4:05:24 PM) */ +!function(e,t){"function"==typeof define&&define.amd?define("velocity-animate",[],t):"object"==typeof module&&module.exports?module.exports=t():e.Velocity=t()}(this,function(){var e=this&&this.__assign||Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0)return n}function ve(e,t,n){var i=re.Easing;if(l(e))return i.Easings[e];if(u(e))return e;if(Array.isArray(e)){if(1===e.length)return i.generateStep(e[0]);if(2===e.length)return i.generateSpringRK4(e[0],e[1],t);if(4===e.length)return i.generateBezier.apply(null,e)||!1}}function he(e){if(!1===e)return 0;var t=parseInt(e,10);return!isNaN(t)&&t>=0?Math.min(t,60):void 0}function ye(e){if(!1===e)return 0;if(!0===e)return!0;var t=parseInt(e,10);return!isNaN(t)&&t>=0?t:void 0}function be(e,t){if(!1===e||l(e))return e}function Se(e){if(!1===e)return 0;if(!0===e)return!0;var t=parseInt(e,10);return!isNaN(t)&&t>=0?t:void 0}function we(e){if(o(e))return e}function Ee(e){if(a(e))return e}function xe(){for(var e=[],t=0;t=0?a.replace(/^.*\./,""):void 0,c="false"!==u&&be(u,!0),g=n[1];if(!l)return null;if(f(i)&&i.velocity.animations)o=i.velocity.animations;else{o=[];for(var d=e.State.first;d;d=d._next)i.indexOf(d.element)>=0&&se(d.queue,d.options.queue)===c&&o.push(d);if(i.length>1&&o.length>1){for(var p=1,m=o[0].options;p=0?a.replace(/^.*\./,""):void 0)&&be(n[0]),l=e.defaults.queue;if(f(i)&&i.velocity.animations)for(var u=0,c=i.velocity.animations;u1)throw Error("VelocityJS: Must tween a percentage from 0 to 1!");if(!d(g))throw Error("VelocityJS: Cannot tween an invalid property!");if(a)for(var v in g)if(g.hasOwnProperty(v)&&(!Array.isArray(g[v])||g[v].length<2))throw Error("VelocityJS: When not supplying an element you must force-feed values: "+v);var h,y=ve(se(p,e.defaults.easing),1e3);for(var v in e.expandProperties(c,g),c.tweens){var b=c.tweens[v],S=b.easing||y,w=b.pattern,E="";if(m++,w)for(var x=0;x=r.length)return r;if(r[a]!==e[t+a])break}while(++a)}return""},((_=re||(re={})).CSS||(_.CSS={})).setPropertyValue=function(e,t,n,i){var r=ue(e);l(n)&&"c"===n[0]&&"a"===n[1]&&"l"===n[2]&&"c"===n[3]&&"("===n[4]&&"0"===n[5]&&" "===n[5]&&(n=n.replace(/^calc\(0[^\d]* \+ ([^\(\)]+)\)$/,"$1")),r&&r.cache[t]!==n&&(r.cache[t]=n||void 0,(i=i||_.getNormalization(e,t))&&i(e,n))},function(e){function t(t){var n=t[0],i=t[1];l(n)&&u(i)&&(e.Easings[n]||(e.Easings[n]=i))}e.Easings=p(),e.registerEasing=t,O.registerAction(["registerEasing",t],!0),t(["linear",function(e,t,n){return t+e*(n-t)}]),t(["swing",function(e,t,n){return t+(.5-Math.cos(e*Math.PI)/2)*(n-t)}]),t(["spring",function(e,t,n){return t+(1-Math.cos(4.5*e*Math.PI)*Math.exp(6*-e))*(n-t)}])}((O=re||(re={})).Easing||(O.Easing={})),function(e){function t(t,n){e.registerEasing([t,function(e,t,i){return 0===e?t:1===e?i:Math.pow(e,2)*((n+1)*e-n)*(i-t)}])}function n(t,n){e.registerEasing([t,function(e,t,i){return 0===e?t:1===e?i:(Math.pow(--e,2)*((n+1)*e+n)+1)*(i-t)}])}function i(t,n){n*=1.525,e.registerEasing([t,function(e,t,i){return 0===e?t:1===e?i:.5*((e*=2)<1?Math.pow(e,2)*((n+1)*e-n):Math.pow(e-=2,2)*((n+1)*e+n)+2)*(i-t)}])}e.registerBackIn=t,e.registerBackOut=n,e.registerBackInOut=i,t("easeInBack",1.7),n("easeOutBack",1.7),i("easeInOutBack",1.7)}((A=re||(re={})).Easing||(A.Easing={})),function(e){function t(e){return Math.min(Math.max(e,0),1)}function n(e,t){return 1-3*t+3*e}function i(e,t){return 3*t-6*e}function r(e){return 3*e}function a(e,t,a){return((n(t,a)*e+i(t,a))*e+r(t))*e}function o(e,t,a){return 3*n(t,a)*e*e+2*i(t,a)*e+r(t)}function s(e,n,i,r){var s=4,l=.001,u=1e-7,c=10,f=11,g=1/(f-1),d="Float32Array"in window;if(4===arguments.length){for(var p=0;p<4;++p)if("number"!=typeof arguments[p]||isNaN(arguments[p])||!isFinite(arguments[p]))return;e=t(e),i=t(i);var m=d?new Float32Array(f):Array(f),v=!1,h=function(t,o,s,l){return v||S(),0===t?o:1===t?s:e===n&&i===r?o+t*(s-o):o+a(b(t),n,r)*(s-o)};h.getControlPoints=function(){return[{x:e,y:n},{x:i,y:r}]};var y="generateBezier("+[e,n,i,r]+")";return h.toString=function(){return y},h}function b(t){for(var n=0,r=1,d=f-1;r!==d&&m[r]<=t;++r)n+=g;var p=n+(t-m[--r])/(m[r+1]-m[r])*g,v=o(p,e,i);return v>=l?function(t,n){for(var r=0;r0?r=s:n=s}while(Math.abs(o)>u&&++l1e-4&&Math.abs(s.v)>1e-4;);return y?function(e,t,n){return 0===e?t:1===e?n:t+v[e*(v.length-1)|0]*(n-t)}:h}}(),L=re||(re={}),z=L.Easing||(L.Easing={}),I={},z.generateStep=function(e){var t=I[e];return t||(I[e]=function(t,n,i){return 0===t?n:1===t?i:n+Math.round(t*e)*(1/e)*(i-n)})},R=re||(re={}),(V=R.Easing||(R.Easing={})).registerEasing(["at-start",function(e,t,n){return 0===e?t:n}]),V.registerEasing(["during",function(e,t,n){return 0===e||1===e?t:n}]),V.registerEasing(["at-end",function(e,t,n){return 1===e?n:t}]),function(e){function t(t){var n=t[0],i=t[1],r=t[2];if(!l(n)&&n instanceof Object)if(l(i))if(u(r)){var a=e.constructors.indexOf(n),o=3;if(a<0&&(e.MaxType=a=e.constructors.push(n)-1,e.Normalizations[a]=p()),e.Normalizations[a][i]=r,l(t[o])){var s=t[o++],c=e.NormalizationUnits[s];c||(c=e.NormalizationUnits[s]=[]),c.push(r)}!1===t[o]&&e.NoCacheNormalizations.add(i)}else;else;else;}function n(t){var n=t[1],i=e.constructors.indexOf(t[0]);return!!e.Normalizations[i][n]}e.MaxType=-1,e.Normalizations=[],e.NormalizationUnits=p(),e.NoCacheNormalizations=new Set,e.constructors=[],e.registerNormalization=t,e.hasNormalization=n,e.getNormalizationUnit=function(t){for(var n in e.NormalizationUnits)if(oe(e.NormalizationUnits[n],t))return n;return""},e.getNormalization=function(t,n){for(var i,r=ue(t),a=e.MaxType,o=r.types;!i&&a>=0;a--)o&1<=1?0:n.calls.length?(1-f)/n.calls.length:1,m=function(f){var g=n.calls[f],d=g[0],m=1e3,v=g[1],h=g[2]||{},y={};if(void 0!==r.duration?m=r.duration:void 0!==n.defaultDuration&&(m=n.defaultDuration),y.duration=m*("number"==typeof v?v:p),y.queue=r.queue||"",y.easing=h.easing||"ease",y.delay=parseFloat(h.delay)||0,y.loop=!n.loop&&h.loop,y.cache=h.cache||!0,0===f&&(y.delay+=parseFloat(r.delay)||0,0===a&&(y.begin=function(){r.begin&&r.begin.call(s,s);var n,i,a,o,l,u,c=t.match(/(In|Out)$/);c&&"In"===c[0]&&void 0!==d.opacity&&(s.nodeType?[s]:s).forEach(function(t){e.CSS.setPropertyValue(t,"opacity",0)}),r.animateParentHeight&&c&&(i=c[0],a=m+y.delay,o=r.stagger,u=0,((n=s).nodeType?[n]:n).forEach(function(t,n){o&&(a+=n*o),l=t.parentNode;var i=["height","paddingTop","paddingBottom","marginTop","marginBottom"];"border-box"===(""+e.CSS.getPropertyValue(t,"boxSizing")).toLowerCase()&&(i=["height"]),i.forEach(function(n){u+=parseFloat(e.CSS.getPropertyValue(t,n))})}),xe(l,{height:("In"===i?"+":"-")+"="+u},{queue:!1,easing:"ease-in-out",duration:a*("In"===i?.6:1)}))}),r.visibility&&"hidden"!==r.visibility&&(y.visibility=r.visibility)),f===n.calls.length-1){var b=function(){void 0!==r.display&&"none"!==r.display||!/Out$/.test(t)||(s.nodeType?[s]:s).forEach(function(t){e.CSS.setPropertyValue(t,"display","none")}),r.complete&&r.complete.call(s,s),l&&l(s||i)};y.complete=function(){if(u&&e.Redirects[t](i,r,a,o,s,l,!0===u||Math.max(0,u-1)),n.reset){for(var f in n.reset)n.reset.hasOwnProperty(f);var g={duration:0,queue:!1};c&&(g.complete=b),xe(i,n.reset,g)}else c&&b()},"hidden"===r.visibility&&(y.visibility=r.visibility)}xe(i,d,y)};for(g=0;g1&&(n.reverse().forEach(function(t,i){var r=n[i+1];if(r){var a=t.o||t.options,o=r.o||r.options,s=a&&!1===a.sequenceQueue?"begin":"complete",l=o&&o[s],u={};u[s]=function(){var e=r.e||r.elements,n=e.nodeType?[e]:e;l&&l.call(n,n),xe(t)},r.o?r.o=e({},o,u):r.options=e({},o,u)}}),n.reverse()),xe(n[0])}}(),function(e){function t(e){try{var t=e.elements;e.options.begin.call(t,t,e)}catch(e){setTimeout(function(){throw e},1)}}function n(t,n){try{var i=t.elements,r=t.percentComplete,a=t.options,o=t.tween;t.options.progress.call(i,i,r,Math.max(0,t.timeStart+(null!=t.duration?t.duration:null!=a.duration?a.duration:e.defaults.duration)-n),void 0!==o?o:100*r+"",t)}catch(e){setTimeout(function(){throw e},1)}}var i,r;function a(){var t,a;for(t=i;t;t=a)a=t._nextProgress,n(t,e.lastTick);for(t=r;t;t=a)a=t._nextComplete,e.completeCall(t)}e.callBegin=t;var o,s=1e3/60,l=function(){var e=window.performance||{};if("function"!=typeof e.now){var t=e.timing&&e.timing.navigationStart?e.timing.navigationStart:ae();e.now=function(){return ae()-t}}return e}(),u=function(t){return setTimeout(function(){t(l.now())},Math.max(0,s-(l.now()-e.lastTick)))},c=window.requestAnimationFrame||u,f=document.hidden?u:c;function g(n){if(!o){if(o=!0,n){var u=n&&!0!==n?n:l.now(),c=e.lastTick?u-e.lastTick:s,d=e.defaults.speed,p=e.defaults.easing,m=e.defaults.duration,v=void 0,h=void 0,y=void 0,b=void 0;if(i=null,r=null,c>=e.defaults.minFrameTime||!e.lastTick){for(e.lastTick=u;v=e.State.firstNew;)e.validateTweens(v);for(v=e.State.first;v&&v!==e.State.firstNew;v=v._next){var S=v.element,w=void 0;if(S.parentNode&&(w=ue(S))){var E=v.options,x=v._flags;if(!(k=v.timeStart)){var C=null!=v.queue?v.queue:E.queue;k=u-c,!1!==C&&(k=Math.max(k,w.lastFinishList[C]||0)),v.timeStart=k}16&x?v.timeStart+=c:2&x||(v._flags|=2,E._ready++)}else e.freeAnimationCall(v)}for(v=e.State.first;v&&v!==e.State.firstNew;v=h){if(h=v._next,2&(x=v._flags)&&!(16&x)){E=v.options;if(32&x&&E._readyu)continue;v.timeStart=k+=_/(_>0?N:1)}v._flags|=4,0==E._started++&&(E._first=v,E.begin&&(t(v),E.begin=void 0))}if(1!==N)v.timeStart=k+=Math.min(c,u-k)*(1-N);E._first===v&&E.progress&&(v._nextProgress=void 0,y?y._nextProgress=y=v:i=y=v);var O=null!=v.easing?v.easing:null!=E.easing?E.easing:p,A=v.ellapsedTime=u-k,P=v.percentComplete=e.mock?1:Math.min(A/(null!=v.duration?v.duration:null!=E.duration?E.duration:m),1),T=v.tweens,M=64&x;for(var q in 1===P&&(v._nextComplete=void 0,b?b._nextComplete=b=v:r=b=v),T){var z=T[q],I=z.easing||O,L=z.pattern,R="",V=0;if(L){for(;V=4&&"("===t?h++:(h&&h<5||h>=4&&")"===t&&--h<5)&&(h=0),0===y&&"r"===t||1===y&&"g"===t||2===y&&"b"===t||3===y&&"a"===t||y>=3&&"("===t?(3===y&&"a"===t&&(b=1),y++):b&&","===t?++b>3&&(y=b=0):(b&&y<(b?5:4)||y>=(b?4:3)&&")"===t&&--y<(b?5:4))&&(y=b=0);else if(t||n){for(S=!0,l(f[f.length-1])||(1!==d.length||d[0]?(d.push(""),f.push(""),g.push("")):f[0]=g[0]="");m4;e--){var t=document.createElement("div");if(t.innerHTML="\x3c!--[if IE "+e+"]>=0,get:function(){return re[e]},set:function(t){re[e]=t}}):Object.defineProperty(xe,e,{enumerable:t.indexOf(e)>=0,get:function(){return re[e]}})};for(var Oe in re)_e(Oe);return xe}); \ No newline at end of file diff --git a/velocity.ui.min.js b/velocity.ui.min.js index 70fd769e..8c601295 100644 --- a/velocity.ui.min.js +++ b/velocity.ui.min.js @@ -1,2 +1,2 @@ -/*! velocity-animate v2.0.1 (Saturday 24th February 2018, 7:26:12 AM) */ +/*! velocity-animate v2.0.1 (Sunday 4th March 2018, 4:05:24 PM) */ !function(t){"use strict";"function"==typeof require&&"object"==typeof exports?module.exports=t():"function"==typeof define&&define.amd?define(["velocity"],t):t()}(function(t){"use strict";return function(a,r){var e=t||(this||a).Velocity;if(e){var n={"callout.bounce":{defaultDuration:550,calls:[[{translateY:-30},.25],[{translateY:0},.125],[{translateY:-15},.125],[{translateY:0},.25]]},"callout.shake":{defaultDuration:800,calls:[[{translateX:-11}],[{translateX:11}],[{translateX:-11}],[{translateX:11}],[{translateX:-11}],[{translateX:11}],[{translateX:-11}],[{translateX:0}]]},"callout.flash":{defaultDuration:1100,calls:[[{opacity:[0,"easeInOutQuad",1]}],[{opacity:[1,"easeInOutQuad"]}],[{opacity:[0,"easeInOutQuad"]}],[{opacity:[1,"easeInOutQuad"]}]]},"callout.pulse":{defaultDuration:825,calls:[[{scaleX:1.1,scaleY:1.1},.5,{easing:"easeInExpo"}],[{scaleX:1,scaleY:1},.5]]},"callout.swing":{defaultDuration:950,calls:[[{rotateZ:15}],[{rotateZ:-10}],[{rotateZ:5}],[{rotateZ:-5}],[{rotateZ:0}]]},"callout.tada":{defaultDuration:1e3,calls:[[{scaleX:.9,scaleY:.9,rotateZ:-3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:3},.1],[{scaleX:1.1,scaleY:1.1,rotateZ:-3},.1],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],["reverse",.125],[{scaleX:1,scaleY:1,rotateZ:0},.2]]},"transition.fadeIn":{defaultDuration:500,calls:[[{opacity:[1,0]}]]},"transition.fadeOut":{defaultDuration:500,calls:[[{opacity:[0,1]}]]},"transition.flipXIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateY:[0,-55]}]],reset:{transformPerspective:0}},"transition.flipXOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateY:55}]],reset:{transformPerspective:0,rotateY:0}},"transition.flipYIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],rotateX:[0,-45]}]],reset:{transformPerspective:0}},"transition.flipYOut":{defaultDuration:800,calls:[[{opacity:[0,1],transformPerspective:[800,800],rotateX:25}]],reset:{transformPerspective:0,rotateX:0}},"transition.flipBounceXIn":{defaultDuration:900,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateY:[-10,90]},.5],[{opacity:.8,rotateY:10},.25],[{opacity:1,rotateY:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceXOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateY:-10}],[{opacity:0,rotateY:90}]],reset:{transformPerspective:0,rotateY:0}},"transition.flipBounceYIn":{defaultDuration:850,calls:[[{opacity:[.725,0],transformPerspective:[400,400],rotateX:[-10,90]},.5],[{opacity:.8,rotateX:10},.25],[{opacity:1,rotateX:0},.25]],reset:{transformPerspective:0}},"transition.flipBounceYOut":{defaultDuration:800,calls:[[{opacity:[.9,1],transformPerspective:[400,400],rotateX:-15}],[{opacity:0,rotateX:90}]],reset:{transformPerspective:0,rotateX:0}},"transition.swoopIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["100%","50%"],transformOriginY:["100%","100%"],scaleX:[1,0],scaleY:[1,0],translateX:[0,-700],translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%"}},"transition.swoopOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformOriginX:["50%","100%"],transformOriginY:["100%","100%"],scaleX:0,scaleY:0,translateX:-700,translateZ:0}]],reset:{transformOriginX:"50%",transformOriginY:"50%",scaleX:1,scaleY:1,translateX:0}},"transition.whirlIn":{defaultDuration:850,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,0],scaleY:[1,0],rotateY:[0,160]},1,{easing:"easeInOutSine"}]]},"transition.whirlOut":{defaultDuration:750,calls:[[{opacity:[0,"easeInOutQuint",1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:0,scaleY:0,rotateY:160},1,{easing:"swing"}]],reset:{scaleX:1,scaleY:1,rotateY:0}},"transition.shrinkIn":{defaultDuration:750,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,1.5],scaleY:[1,1.5],translateZ:0}]]},"transition.shrinkOut":{defaultDuration:600,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:1.3,scaleY:1.3,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.expandIn":{defaultDuration:700,calls:[[{opacity:[1,0],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:[1,.625],scaleY:[1,.625],translateZ:0}]]},"transition.expandOut":{defaultDuration:700,calls:[[{opacity:[0,1],transformOriginX:["50%","50%"],transformOriginY:["50%","50%"],scaleX:.5,scaleY:.5,translateZ:0}]],reset:{scaleX:1,scaleY:1}},"transition.bounceIn":{defaultDuration:800,calls:[[{opacity:[1,0],scaleX:[1.05,.3],scaleY:[1.05,.3]},.35],[{scaleX:.9,scaleY:.9,translateZ:0},.2],[{scaleX:1,scaleY:1},.45]]},"transition.bounceOut":{defaultDuration:800,calls:[[{scaleX:.95,scaleY:.95},.35],[{scaleX:1.1,scaleY:1.1,translateZ:0},.35],[{opacity:[0,1],scaleX:.3,scaleY:.3},.3]],reset:{scaleX:1,scaleY:1}},"transition.bounceUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[-30,1e3]},.6,{easing:"easeOutCirc"}],[{translateY:10},.2],[{translateY:0},.2]]},"transition.bounceUpOut":{defaultDuration:1e3,calls:[[{translateY:20},.2],[{opacity:[0,"easeInCirc",1],translateY:-1e3},.8]],reset:{translateY:0}},"transition.bounceDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateY:[30,-1e3]},.6,{easing:"easeOutCirc"}],[{translateY:-10},.2],[{translateY:0},.2]]},"transition.bounceDownOut":{defaultDuration:1e3,calls:[[{translateY:-20},.2],[{opacity:[0,"easeInCirc",1],translateY:1e3},.8]],reset:{translateY:0}},"transition.bounceLeftIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[30,-1250]},.6,{easing:"easeOutCirc"}],[{translateX:-10},.2],[{translateX:0},.2]]},"transition.bounceLeftOut":{defaultDuration:750,calls:[[{translateX:30},.2],[{opacity:[0,"easeInCirc",1],translateX:-1250},.8]],reset:{translateX:0}},"transition.bounceRightIn":{defaultDuration:750,calls:[[{opacity:[1,0],translateX:[-30,1250]},.6,{easing:"easeOutCirc"}],[{translateX:10},.2],[{translateX:0},.2]]},"transition.bounceRightOut":{defaultDuration:750,calls:[[{translateX:-30},.2],[{opacity:[0,"easeInCirc",1],translateX:1250},.8]],reset:{translateX:0}},"transition.slideUpIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,20],translateZ:0}]]},"transition.slideUpOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:-20,translateZ:0}]],reset:{translateY:0}},"transition.slideDownIn":{defaultDuration:900,calls:[[{opacity:[1,0],translateY:[0,-20],translateZ:0}]]},"transition.slideDownOut":{defaultDuration:900,calls:[[{opacity:[0,1],translateY:20,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,-20],translateZ:0}]]},"transition.slideLeftOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:-20,translateZ:0}]],reset:{translateX:0}},"transition.slideRightIn":{defaultDuration:1e3,calls:[[{opacity:[1,0],translateX:[0,20],translateZ:0}]]},"transition.slideRightOut":{defaultDuration:1050,calls:[[{opacity:[0,1],translateX:20,translateZ:0}]],reset:{translateX:0}},"transition.slideUpBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,75],translateZ:0}]]},"transition.slideUpBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:-75,translateZ:0}]],reset:{translateY:0}},"transition.slideDownBigIn":{defaultDuration:850,calls:[[{opacity:[1,0],translateY:[0,-75],translateZ:0}]]},"transition.slideDownBigOut":{defaultDuration:800,calls:[[{opacity:[0,1],translateY:75,translateZ:0}]],reset:{translateY:0}},"transition.slideLeftBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,-75],translateZ:0}]]},"transition.slideLeftBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:-75,translateZ:0}]],reset:{translateX:0}},"transition.slideRightBigIn":{defaultDuration:800,calls:[[{opacity:[1,0],translateX:[0,75],translateZ:0}]]},"transition.slideRightBigOut":{defaultDuration:750,calls:[[{opacity:[0,1],translateX:75,translateZ:0}]],reset:{translateX:0}},"transition.perspectiveUpIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:[0,-180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveUpOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:["100%","100%"],rotateX:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveDownIn":{defaultDuration:800,calls:[[{opacity:[1,0],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveDownOut":{defaultDuration:850,calls:[[{opacity:[0,1],transformPerspective:[800,800],transformOriginX:[0,0],transformOriginY:[0,0],rotateX:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateX:0}},"transition.perspectiveLeftIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:[0,-180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveLeftOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:[0,0],transformOriginY:[0,0],rotateY:-180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}},"transition.perspectiveRightIn":{defaultDuration:950,calls:[[{opacity:[1,0],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:[0,180]}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%"}},"transition.perspectiveRightOut":{defaultDuration:950,calls:[[{opacity:[0,1],transformPerspective:[2e3,2e3],transformOriginX:["100%","100%"],transformOriginY:[0,0],rotateY:180}]],reset:{transformPerspective:0,transformOriginX:"50%",transformOriginY:"50%",rotateY:0}}};for(var s in n)n.hasOwnProperty(s)&&e.RegisterEffect(s,n[s])}}(window)}); \ No newline at end of file