You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sc...@apache.org on 2018/04/30 21:03:34 UTC

[38/51] [partial] nifi-fds git commit: gh-pages update

http://git-wip-us.apache.org/repos/asf/nifi-fds/blob/d07dd0f2/node_modules/@angular/animations/bundles/animations-browser.umd.js
----------------------------------------------------------------------
diff --git a/node_modules/@angular/animations/bundles/animations-browser.umd.js b/node_modules/@angular/animations/bundles/animations-browser.umd.js
index 7a11496..a4a5e7f 100644
--- a/node_modules/@angular/animations/bundles/animations-browser.umd.js
+++ b/node_modules/@angular/animations/bundles/animations-browser.umd.js
@@ -1,12 +1,12 @@
 /**
- * @license Angular v4.4.6
- * (c) 2010-2017 Google, Inc. https://angular.io/
+ * @license Angular v5.2.0
+ * (c) 2010-2018 Google, Inc. https://angular.io/
  * License: MIT
  */
 (function (global, factory) {
 	typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/animations')) :
-	typeof define === 'function' && define.amd ? define(['exports', '@angular/animations'], factory) :
-	(factory((global.ng = global.ng || {}, global.ng.animations = global.ng.animations || {}, global.ng.animations.browser = global.ng.animations.browser || {}),global.ng.animations));
+	typeof define === 'function' && define.amd ? define('@angular/animations/browser', ['exports', '@angular/animations'], factory) :
+	(factory((global.ng = global.ng || {}, global.ng.animations = global.ng.animations || {}, global.ng.animations.browser = {}),global.ng.animations));
 }(this, (function (exports,_angular_animations) { 'use strict';
 
 /*! *****************************************************************************
@@ -33,19 +33,28 @@ function __extends(d, b) {
     extendStatics(d, b);
     function __() { this.constructor = d; }
     d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
-}
+}
+
+var __assign = Object.assign || function __assign(t) {
+    for (var s, i = 1, n = arguments.length; i < n; i++) {
+        s = arguments[i];
+        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
+    }
+    return t;
+};
 
 /**
- * @license Angular v4.4.6
- * (c) 2010-2017 Google, Inc. https://angular.io/
+ * @license Angular v5.2.0
+ * (c) 2010-2018 Google, Inc. https://angular.io/
  * License: MIT
  */
 /**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
+/**
+ * @param {?} players
+ * @return {?}
  */
 function optimizeGroupPlayer(players) {
     switch (players.length) {
@@ -57,20 +66,29 @@ function optimizeGroupPlayer(players) {
             return new _angular_animations.ɵAnimationGroupPlayer(players);
     }
 }
+/**
+ * @param {?} driver
+ * @param {?} normalizer
+ * @param {?} element
+ * @param {?} keyframes
+ * @param {?=} preStyles
+ * @param {?=} postStyles
+ * @return {?}
+ */
 function normalizeKeyframes(driver, normalizer, element, keyframes, preStyles, postStyles) {
     if (preStyles === void 0) { preStyles = {}; }
     if (postStyles === void 0) { postStyles = {}; }
-    var errors = [];
-    var normalizedKeyframes = [];
-    var previousOffset = -1;
-    var previousKeyframe = null;
+    var /** @type {?} */ errors = [];
+    var /** @type {?} */ normalizedKeyframes = [];
+    var /** @type {?} */ previousOffset = -1;
+    var /** @type {?} */ previousKeyframe = null;
     keyframes.forEach(function (kf) {
-        var offset = kf['offset'];
-        var isSameOffset = offset == previousOffset;
-        var normalizedKeyframe = (isSameOffset && previousKeyframe) || {};
+        var /** @type {?} */ offset = /** @type {?} */ (kf['offset']);
+        var /** @type {?} */ isSameOffset = offset == previousOffset;
+        var /** @type {?} */ normalizedKeyframe = (isSameOffset && previousKeyframe) || {};
         Object.keys(kf).forEach(function (prop) {
-            var normalizedProp = prop;
-            var normalizedValue = kf[prop];
+            var /** @type {?} */ normalizedProp = prop;
+            var /** @type {?} */ normalizedValue = kf[prop];
             if (prop !== 'offset') {
                 normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);
                 switch (normalizedValue) {
@@ -95,11 +113,18 @@ function normalizeKeyframes(driver, normalizer, element, keyframes, preStyles, p
         previousOffset = offset;
     });
     if (errors.length) {
-        var LINE_START = '\n - ';
+        var /** @type {?} */ LINE_START = '\n - ';
         throw new Error("Unable to animate due to the following errors:" + LINE_START + errors.join(LINE_START));
     }
     return normalizedKeyframes;
 }
+/**
+ * @param {?} player
+ * @param {?} eventName
+ * @param {?} event
+ * @param {?} callback
+ * @return {?}
+ */
 function listenOnPlayer(player, eventName, event, callback) {
     switch (eventName) {
         case 'start':
@@ -113,21 +138,42 @@ function listenOnPlayer(player, eventName, event, callback) {
             break;
     }
 }
+/**
+ * @param {?} e
+ * @param {?=} phaseName
+ * @param {?=} totalTime
+ * @return {?}
+ */
 function copyAnimationEvent(e, phaseName, totalTime) {
-    var event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime);
-    var data = e['_data'];
+    var /** @type {?} */ event = makeAnimationEvent(e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName, totalTime == undefined ? e.totalTime : totalTime);
+    var /** @type {?} */ data = (/** @type {?} */ (e))['_data'];
     if (data != null) {
-        event['_data'] = data;
+        (/** @type {?} */ (event))['_data'] = data;
     }
     return event;
 }
+/**
+ * @param {?} element
+ * @param {?} triggerName
+ * @param {?} fromState
+ * @param {?} toState
+ * @param {?=} phaseName
+ * @param {?=} totalTime
+ * @return {?}
+ */
 function makeAnimationEvent(element, triggerName, fromState, toState, phaseName, totalTime) {
     if (phaseName === void 0) { phaseName = ''; }
     if (totalTime === void 0) { totalTime = 0; }
     return { element: element, triggerName: triggerName, fromState: fromState, toState: toState, phaseName: phaseName, totalTime: totalTime };
 }
+/**
+ * @param {?} map
+ * @param {?} key
+ * @param {?} defaultValue
+ * @return {?}
+ */
 function getOrSetAsInMap(map, key, defaultValue) {
-    var value;
+    var /** @type {?} */ value;
     if (map instanceof Map) {
         value = map.get(key);
         if (!value) {
@@ -142,38 +188,44 @@ function getOrSetAsInMap(map, key, defaultValue) {
     }
     return value;
 }
+/**
+ * @param {?} command
+ * @return {?}
+ */
 function parseTimelineCommand(command) {
-    var separatorPos = command.indexOf(':');
-    var id = command.substring(1, separatorPos);
-    var action = command.substr(separatorPos + 1);
+    var /** @type {?} */ separatorPos = command.indexOf(':');
+    var /** @type {?} */ id = command.substring(1, separatorPos);
+    var /** @type {?} */ action = command.substr(separatorPos + 1);
     return [id, action];
 }
 var _contains = function (elm1, elm2) { return false; };
-var _matches = function (element, selector) { return false; };
+var _matches = function (element, selector) {
+    return false;
+};
 var _query = function (element, selector, multi) {
     return [];
 };
 if (typeof Element != 'undefined') {
     // this is well supported in all browsers
-    _contains = function (elm1, elm2) { return elm1.contains(elm2); };
+    _contains = function (elm1, elm2) { return /** @type {?} */ (elm1.contains(elm2)); };
     if (Element.prototype.matches) {
         _matches = function (element, selector) { return element.matches(selector); };
     }
     else {
-        var proto = Element.prototype;
-        var fn_1 = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||
+        var /** @type {?} */ proto = /** @type {?} */ (Element.prototype);
+        var /** @type {?} */ fn_1 = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||
             proto.oMatchesSelector || proto.webkitMatchesSelector;
         if (fn_1) {
             _matches = function (element, selector) { return fn_1.apply(element, [selector]); };
         }
     }
     _query = function (element, selector, multi) {
-        var results = [];
+        var /** @type {?} */ results = [];
         if (multi) {
             results.push.apply(results, element.querySelectorAll(selector));
         }
         else {
-            var elm = element.querySelector(selector);
+            var /** @type {?} */ elm = element.querySelector(selector);
             if (elm) {
                 results.push(elm);
             }
@@ -181,113 +233,241 @@ if (typeof Element != 'undefined') {
         return results;
     };
 }
+/**
+ * @param {?} prop
+ * @return {?}
+ */
+function containsVendorPrefix(prop) {
+    // Webkit is the only real popular vendor prefix nowadays
+    // cc: http://shouldiprefix.com/
+    return prop.substring(1, 6) == 'ebkit'; // webkit or Webkit
+}
+var _CACHED_BODY = null;
+var _IS_WEBKIT = false;
+/**
+ * @param {?} prop
+ * @return {?}
+ */
+function validateStyleProperty(prop) {
+    if (!_CACHED_BODY) {
+        _CACHED_BODY = getBodyNode() || {};
+        _IS_WEBKIT = /** @type {?} */ ((_CACHED_BODY)).style ? ('WebkitAppearance' in /** @type {?} */ ((_CACHED_BODY)).style) : false;
+    }
+    var /** @type {?} */ result = true;
+    if (/** @type {?} */ ((_CACHED_BODY)).style && !containsVendorPrefix(prop)) {
+        result = prop in /** @type {?} */ ((_CACHED_BODY)).style;
+        if (!result && _IS_WEBKIT) {
+            var /** @type {?} */ camelProp = 'Webkit' + prop.charAt(0).toUpperCase() + prop.substr(1);
+            result = camelProp in /** @type {?} */ ((_CACHED_BODY)).style;
+        }
+    }
+    return result;
+}
+/**
+ * @return {?}
+ */
+function getBodyNode() {
+    if (typeof document != 'undefined') {
+        return document.body;
+    }
+    return null;
+}
 var matchesElement = _matches;
 var containsElement = _contains;
 var invokeQuery = _query;
+
 /**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
  */
 /**
- * @experimental
+ * \@experimental
  */
-var NoopAnimationDriver = (function () {
+var NoopAnimationDriver = /** @class */ (function () {
     function NoopAnimationDriver() {
     }
-    NoopAnimationDriver.prototype.matchesElement = function (element, selector) {
+    /**
+     * @param {?} prop
+     * @return {?}
+     */
+    NoopAnimationDriver.prototype.validateStyleProperty = /**
+     * @param {?} prop
+     * @return {?}
+     */
+    function (prop) { return validateStyleProperty(prop); };
+    /**
+     * @param {?} element
+     * @param {?} selector
+     * @return {?}
+     */
+    NoopAnimationDriver.prototype.matchesElement = /**
+     * @param {?} element
+     * @param {?} selector
+     * @return {?}
+     */
+    function (element, selector) {
         return matchesElement(element, selector);
     };
-    NoopAnimationDriver.prototype.containsElement = function (elm1, elm2) { return containsElement(elm1, elm2); };
-    NoopAnimationDriver.prototype.query = function (element, selector, multi) {
+    /**
+     * @param {?} elm1
+     * @param {?} elm2
+     * @return {?}
+     */
+    NoopAnimationDriver.prototype.containsElement = /**
+     * @param {?} elm1
+     * @param {?} elm2
+     * @return {?}
+     */
+    function (elm1, elm2) { return containsElement(elm1, elm2); };
+    /**
+     * @param {?} element
+     * @param {?} selector
+     * @param {?} multi
+     * @return {?}
+     */
+    NoopAnimationDriver.prototype.query = /**
+     * @param {?} element
+     * @param {?} selector
+     * @param {?} multi
+     * @return {?}
+     */
+    function (element, selector, multi) {
         return invokeQuery(element, selector, multi);
     };
-    NoopAnimationDriver.prototype.computeStyle = function (element, prop, defaultValue) {
+    /**
+     * @param {?} element
+     * @param {?} prop
+     * @param {?=} defaultValue
+     * @return {?}
+     */
+    NoopAnimationDriver.prototype.computeStyle = /**
+     * @param {?} element
+     * @param {?} prop
+     * @param {?=} defaultValue
+     * @return {?}
+     */
+    function (element, prop, defaultValue) {
         return defaultValue || '';
     };
-    NoopAnimationDriver.prototype.animate = function (element, keyframes, duration, delay, easing, previousPlayers) {
+    /**
+     * @param {?} element
+     * @param {?} keyframes
+     * @param {?} duration
+     * @param {?} delay
+     * @param {?} easing
+     * @param {?=} previousPlayers
+     * @return {?}
+     */
+    NoopAnimationDriver.prototype.animate = /**
+     * @param {?} element
+     * @param {?} keyframes
+     * @param {?} duration
+     * @param {?} delay
+     * @param {?} easing
+     * @param {?=} previousPlayers
+     * @return {?}
+     */
+    function (element, keyframes, duration, delay, easing, previousPlayers) {
         if (previousPlayers === void 0) { previousPlayers = []; }
         return new _angular_animations.NoopAnimationPlayer();
     };
     return NoopAnimationDriver;
 }());
 /**
- * @experimental
+ * \@experimental
+ * @abstract
  */
-var AnimationDriver = (function () {
+var AnimationDriver = /** @class */ (function () {
     function AnimationDriver() {
     }
+    AnimationDriver.NOOP = new NoopAnimationDriver();
     return AnimationDriver;
 }());
-AnimationDriver.NOOP = new NoopAnimationDriver();
+
 /**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
  */
 var ONE_SECOND = 1000;
 var SUBSTITUTION_EXPR_START = '{{';
 var SUBSTITUTION_EXPR_END = '}}';
 var ENTER_CLASSNAME = 'ng-enter';
 var LEAVE_CLASSNAME = 'ng-leave';
-var ENTER_SELECTOR = '.ng-enter';
-var LEAVE_SELECTOR = '.ng-leave';
+
+
 var NG_TRIGGER_CLASSNAME = 'ng-trigger';
 var NG_TRIGGER_SELECTOR = '.ng-trigger';
 var NG_ANIMATING_CLASSNAME = 'ng-animating';
 var NG_ANIMATING_SELECTOR = '.ng-animating';
+/**
+ * @param {?} value
+ * @return {?}
+ */
 function resolveTimingValue(value) {
     if (typeof value == 'number')
         return value;
-    var matches = value.match(/^(-?[\.\d]+)(m?s)/);
+    var /** @type {?} */ matches = (/** @type {?} */ (value)).match(/^(-?[\.\d]+)(m?s)/);
     if (!matches || matches.length < 2)
         return 0;
     return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);
 }
+/**
+ * @param {?} value
+ * @param {?} unit
+ * @return {?}
+ */
 function _convertTimeValueToMS(value, unit) {
     switch (unit) {
         case 's':
             return value * ONE_SECOND;
         default:
+            // ms or something else
             return value;
     }
 }
+/**
+ * @param {?} timings
+ * @param {?} errors
+ * @param {?=} allowNegativeValues
+ * @return {?}
+ */
 function resolveTiming(timings, errors, allowNegativeValues) {
-    return timings.hasOwnProperty('duration') ?
-        timings :
-        parseTimeExpression(timings, errors, allowNegativeValues);
+    return timings.hasOwnProperty('duration') ? /** @type {?} */ (timings) :
+        parseTimeExpression(/** @type {?} */ (timings), errors, allowNegativeValues);
 }
+/**
+ * @param {?} exp
+ * @param {?} errors
+ * @param {?=} allowNegativeValues
+ * @return {?}
+ */
 function parseTimeExpression(exp, errors, allowNegativeValues) {
-    var regex = /^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;
-    var duration;
-    var delay = 0;
-    var easing = '';
+    var /** @type {?} */ regex = /^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i;
+    var /** @type {?} */ duration;
+    var /** @type {?} */ delay = 0;
+    var /** @type {?} */ easing = '';
     if (typeof exp === 'string') {
-        var matches = exp.match(regex);
+        var /** @type {?} */ matches = exp.match(regex);
         if (matches === null) {
             errors.push("The provided timing value \"" + exp + "\" is invalid.");
             return { duration: 0, delay: 0, easing: '' };
         }
         duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);
-        var delayMatch = matches[3];
+        var /** @type {?} */ delayMatch = matches[3];
         if (delayMatch != null) {
             delay = _convertTimeValueToMS(Math.floor(parseFloat(delayMatch)), matches[4]);
         }
-        var easingVal = matches[5];
+        var /** @type {?} */ easingVal = matches[5];
         if (easingVal) {
             easing = easingVal;
         }
     }
     else {
-        duration = exp;
+        duration = /** @type {?} */ (exp);
     }
     if (!allowNegativeValues) {
-        var containsErrors = false;
-        var startIndex = errors.length;
+        var /** @type {?} */ containsErrors = false;
+        var /** @type {?} */ startIndex = errors.length;
         if (duration < 0) {
             errors.push("Duration values below 0 are not allowed for this animation step.");
             containsErrors = true;
@@ -302,13 +482,22 @@ function parseTimeExpression(exp, errors, allowNegativeValues) {
     }
     return { duration: duration, delay: delay, easing: easing };
 }
+/**
+ * @param {?} obj
+ * @param {?=} destination
+ * @return {?}
+ */
 function copyObj(obj, destination) {
     if (destination === void 0) { destination = {}; }
     Object.keys(obj).forEach(function (prop) { destination[prop] = obj[prop]; });
     return destination;
 }
+/**
+ * @param {?} styles
+ * @return {?}
+ */
 function normalizeStyles(styles) {
-    var normalizedStyles = {};
+    var /** @type {?} */ normalizedStyles = {};
     if (Array.isArray(styles)) {
         styles.forEach(function (data) { return copyStyles(data, false, normalizedStyles); });
     }
@@ -317,13 +506,19 @@ function normalizeStyles(styles) {
     }
     return normalizedStyles;
 }
+/**
+ * @param {?} styles
+ * @param {?} readPrototype
+ * @param {?=} destination
+ * @return {?}
+ */
 function copyStyles(styles, readPrototype, destination) {
     if (destination === void 0) { destination = {}; }
     if (readPrototype) {
         // we make use of a for-in loop so that the
         // prototypically inherited properties are
         // revealed from the backFill map
-        for (var prop in styles) {
+        for (var /** @type {?} */ prop in styles) {
             destination[prop] = styles[prop];
         }
     }
@@ -332,33 +527,53 @@ function copyStyles(styles, readPrototype, destination) {
     }
     return destination;
 }
+/**
+ * @param {?} element
+ * @param {?} styles
+ * @return {?}
+ */
 function setStyles(element, styles) {
     if (element['style']) {
         Object.keys(styles).forEach(function (prop) {
-            var camelProp = dashCaseToCamelCase(prop);
+            var /** @type {?} */ camelProp = dashCaseToCamelCase(prop);
             element.style[camelProp] = styles[prop];
         });
     }
 }
+/**
+ * @param {?} element
+ * @param {?} styles
+ * @return {?}
+ */
 function eraseStyles(element, styles) {
     if (element['style']) {
         Object.keys(styles).forEach(function (prop) {
-            var camelProp = dashCaseToCamelCase(prop);
+            var /** @type {?} */ camelProp = dashCaseToCamelCase(prop);
             element.style[camelProp] = '';
         });
     }
 }
+/**
+ * @param {?} steps
+ * @return {?}
+ */
 function normalizeAnimationEntry(steps) {
     if (Array.isArray(steps)) {
         if (steps.length == 1)
             return steps[0];
         return _angular_animations.sequence(steps);
     }
-    return steps;
+    return /** @type {?} */ (steps);
 }
+/**
+ * @param {?} value
+ * @param {?} options
+ * @param {?} errors
+ * @return {?}
+ */
 function validateStyleParams(value, options, errors) {
-    var params = options.params || {};
-    var matches = extractStyleParams(value);
+    var /** @type {?} */ params = options.params || {};
+    var /** @type {?} */ matches = extractStyleParams(value);
     if (matches.length) {
         matches.forEach(function (varName) {
             if (!params.hasOwnProperty(varName)) {
@@ -368,22 +583,32 @@ function validateStyleParams(value, options, errors) {
     }
 }
 var PARAM_REGEX = new RegExp(SUBSTITUTION_EXPR_START + "\\s*(.+?)\\s*" + SUBSTITUTION_EXPR_END, 'g');
+/**
+ * @param {?} value
+ * @return {?}
+ */
 function extractStyleParams(value) {
-    var params = [];
+    var /** @type {?} */ params = [];
     if (typeof value === 'string') {
-        var val = value.toString();
-        var match = void 0;
+        var /** @type {?} */ val = value.toString();
+        var /** @type {?} */ match = void 0;
         while (match = PARAM_REGEX.exec(val)) {
-            params.push(match[1]);
+            params.push(/** @type {?} */ (match[1]));
         }
         PARAM_REGEX.lastIndex = 0;
     }
     return params;
 }
+/**
+ * @param {?} value
+ * @param {?} params
+ * @param {?} errors
+ * @return {?}
+ */
 function interpolateParams(value, params, errors) {
-    var original = value.toString();
-    var str = original.replace(PARAM_REGEX, function (_, varName) {
-        var localVal = params[varName];
+    var /** @type {?} */ original = value.toString();
+    var /** @type {?} */ str = original.replace(PARAM_REGEX, function (_, varName) {
+        var /** @type {?} */ localVal = params[varName];
         // this means that the value was never overidden by the data passed in by the user
         if (!params.hasOwnProperty(varName)) {
             errors.push("Please provide a value for the animation param " + varName);
@@ -394,16 +619,30 @@ function interpolateParams(value, params, errors) {
     // we do this to assert that numeric values stay as they are
     return str == original ? value : str;
 }
+/**
+ * @param {?} iterator
+ * @return {?}
+ */
 function iteratorToArray(iterator) {
-    var arr = [];
-    var item = iterator.next();
+    var /** @type {?} */ arr = [];
+    var /** @type {?} */ item = iterator.next();
     while (!item.done) {
         arr.push(item.value);
         item = iterator.next();
     }
     return arr;
 }
+/**
+ * @param {?} source
+ * @param {?} destination
+ * @return {?}
+ */
+
 var DASH_CASE_REGEXP = /-+([a-z0-9])/g;
+/**
+ * @param {?} input
+ * @return {?}
+ */
 function dashCaseToCamelCase(input) {
     return input.replace(DASH_CASE_REGEXP, function () {
         var m = [];
@@ -413,9 +652,20 @@ function dashCaseToCamelCase(input) {
         return m[1].toUpperCase();
     });
 }
+/**
+ * @param {?} duration
+ * @param {?} delay
+ * @return {?}
+ */
 function allowPreviousPlayerStylesMerge(duration, delay) {
     return duration === 0 || delay === 0;
 }
+/**
+ * @param {?} visitor
+ * @param {?} node
+ * @param {?} context
+ * @return {?}
+ */
 function visitDslNode(visitor, node, context) {
     switch (node.type) {
         case 7 /* Trigger */:
@@ -448,6 +698,11 @@ function visitDslNode(visitor, node, context) {
             throw new Error("Unable to resolve animation metadata node #" + node.type);
     }
 }
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
 /**
  * @license
  * Copyright Google Inc. All Rights Reserved.
@@ -464,7 +719,7 @@ var ANY_STATE = '*';
 function parseTransitionExpr(transitionValue, errors) {
     var /** @type {?} */ expressions = [];
     if (typeof transitionValue == 'string') {
-        ((transitionValue))
+        (/** @type {?} */ (transitionValue))
             .split(/\s*,\s*/)
             .forEach(function (str) { return parseInnerTransitionStr(str, expressions, errors); });
     }
@@ -481,7 +736,12 @@ function parseTransitionExpr(transitionValue, errors) {
  */
 function parseInnerTransitionStr(eventStr, expressions, errors) {
     if (eventStr[0] == ':') {
-        eventStr = parseAnimationAlias(eventStr, errors);
+        var /** @type {?} */ result = parseAnimationAlias(eventStr, errors);
+        if (typeof result == 'function') {
+            expressions.push(result);
+            return;
+        }
+        eventStr = /** @type {?} */ (result);
     }
     var /** @type {?} */ match = eventStr.match(/^(\*|[-\w]+)\s*(<?[=-]>)\s*(\*|[-\w]+)$/);
     if (match == null || match.length < 4) {
@@ -508,17 +768,21 @@ function parseAnimationAlias(alias, errors) {
             return 'void => *';
         case ':leave':
             return '* => void';
+        case ':increment':
+            return function (fromState, toState) { return parseFloat(toState) > parseFloat(fromState); };
+        case ':decrement':
+            return function (fromState, toState) { return parseFloat(toState) < parseFloat(fromState); };
         default:
             errors.push("The transition alias value \"" + alias + "\" is not supported");
             return '* => *';
     }
 }
-var TRUE_BOOLEAN_VALUES = new Set();
-TRUE_BOOLEAN_VALUES.add('true');
-TRUE_BOOLEAN_VALUES.add('1');
-var FALSE_BOOLEAN_VALUES = new Set();
-FALSE_BOOLEAN_VALUES.add('false');
-FALSE_BOOLEAN_VALUES.add('0');
+// DO NOT REFACTOR ... keep the follow set instantiations
+// with the values intact (closure compiler for some reason
+// removes follow-up lines that add the values outside of
+// the constructor...
+var TRUE_BOOLEAN_VALUES = new Set(['true', '1']);
+var FALSE_BOOLEAN_VALUES = new Set(['false', '0']);
 /**
  * @param {?} lhs
  * @param {?} rhs
@@ -539,46 +803,51 @@ function makeLambdaFromStates(lhs, rhs) {
         return lhsMatch && rhsMatch;
     };
 }
+
 /**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
  */
 var SELF_TOKEN = ':self';
 var SELF_TOKEN_REGEX = new RegExp("s*" + SELF_TOKEN + "s*,?", 'g');
 /**
+ * @param {?} driver
  * @param {?} metadata
  * @param {?} errors
  * @return {?}
  */
-function buildAnimationAst(metadata, errors) {
-    return new AnimationAstBuilderVisitor().build(metadata, errors);
+function buildAnimationAst(driver, metadata, errors) {
+    return new AnimationAstBuilderVisitor(driver).build(metadata, errors);
 }
-var LEAVE_TOKEN = ':leave';
-var LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');
-var ENTER_TOKEN = ':enter';
-var ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');
 var ROOT_SELECTOR = '';
-var AnimationAstBuilderVisitor = (function () {
-    function AnimationAstBuilderVisitor() {
+var AnimationAstBuilderVisitor = /** @class */ (function () {
+    function AnimationAstBuilderVisitor(_driver) {
+        this._driver = _driver;
     }
     /**
      * @param {?} metadata
      * @param {?} errors
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.build = function (metadata, errors) {
+    AnimationAstBuilderVisitor.prototype.build = /**
+     * @param {?} metadata
+     * @param {?} errors
+     * @return {?}
+     */
+    function (metadata, errors) {
         var /** @type {?} */ context = new AnimationAstBuilderContext(errors);
         this._resetContextStyleTimingState(context);
-        return (visitDslNode(this, normalizeAnimationEntry(metadata), context));
+        return /** @type {?} */ (visitDslNode(this, normalizeAnimationEntry(metadata), context));
     };
     /**
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype._resetContextStyleTimingState = function (context) {
+    AnimationAstBuilderVisitor.prototype._resetContextStyleTimingState = /**
+     * @param {?} context
+     * @return {?}
+     */
+    function (context) {
         context.currentQuerySelector = ROOT_SELECTOR;
         context.collectedStyles = {};
         context.collectedStyles[ROOT_SELECTOR] = {};
@@ -589,22 +858,30 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitTrigger = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitTrigger = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         var _this = this;
         var /** @type {?} */ queryCount = context.queryCount = 0;
         var /** @type {?} */ depCount = context.depCount = 0;
         var /** @type {?} */ states = [];
         var /** @type {?} */ transitions = [];
+        if (metadata.name.charAt(0) == '@') {
+            context.errors.push('animation triggers cannot be prefixed with an `@` sign (e.g. trigger(\'@foo\', [...]))');
+        }
         metadata.definitions.forEach(function (def) {
             _this._resetContextStyleTimingState(context);
             if (def.type == 0 /* State */) {
-                var /** @type {?} */ stateDef_1 = (def);
-                var /** @type {?} */ name = stateDef_1.name;
-                name.split(/\s*,\s*/).forEach(function (n) {
+                var /** @type {?} */ stateDef_1 = /** @type {?} */ (def);
+                var /** @type {?} */ name_1 = stateDef_1.name;
+                name_1.split(/\s*,\s*/).forEach(function (n) {
                     stateDef_1.name = n;
                     states.push(_this.visitState(stateDef_1, context));
                 });
-                stateDef_1.name = name;
+                stateDef_1.name = name_1;
             }
             else if (def.type == 1 /* Transition */) {
                 var /** @type {?} */ transition = _this.visitTransition(/** @type {?} */ (def), context);
@@ -627,7 +904,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitState = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitState = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         var /** @type {?} */ styleAst = this.visitStyle(metadata.styles, context);
         var /** @type {?} */ astParams = (metadata.options && metadata.options.params) || null;
         if (styleAst.containsDynamicStyles) {
@@ -635,7 +917,7 @@ var AnimationAstBuilderVisitor = (function () {
             var /** @type {?} */ params_1 = astParams || {};
             styleAst.styles.forEach(function (value) {
                 if (isObject(value)) {
-                    var /** @type {?} */ stylesObj_1 = (value);
+                    var /** @type {?} */ stylesObj_1 = /** @type {?} */ (value);
                     Object.keys(stylesObj_1).forEach(function (prop) {
                         extractStyleParams(stylesObj_1[prop]).forEach(function (sub) {
                             if (!params_1.hasOwnProperty(sub)) {
@@ -662,7 +944,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitTransition = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitTransition = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         context.queryCount = 0;
         context.depCount = 0;
         var /** @type {?} */ animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);
@@ -681,7 +968,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitSequence = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitSequence = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         var _this = this;
         return {
             type: 2 /* Sequence */,
@@ -694,7 +986,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitGroup = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitGroup = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         var _this = this;
         var /** @type {?} */ currentTime = context.currentTime;
         var /** @type {?} */ furthestTime = 0;
@@ -716,7 +1013,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitAnimate = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitAnimate = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         var /** @type {?} */ timingAst = constructTimingAst(metadata.timings, context.errors);
         context.currentAnimateTimings = timingAst;
         var /** @type {?} */ styleAst;
@@ -725,7 +1027,7 @@ var AnimationAstBuilderVisitor = (function () {
             styleAst = this.visitKeyframes(/** @type {?} */ (styleMetadata), context);
         }
         else {
-            var /** @type {?} */ styleMetadata_1 = (metadata.styles);
+            var /** @type {?} */ styleMetadata_1 = /** @type {?} */ (metadata.styles);
             var /** @type {?} */ isEmpty = false;
             if (!styleMetadata_1) {
                 isEmpty = true;
@@ -753,7 +1055,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitStyle = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitStyle = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         var /** @type {?} */ ast = this._makeStyleAst(metadata, context);
         this._validateStyleAst(ast, context);
         return ast;
@@ -763,10 +1070,15 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype._makeStyleAst = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype._makeStyleAst = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         var /** @type {?} */ styles = [];
         if (Array.isArray(metadata.styles)) {
-            ((metadata.styles)).forEach(function (styleTuple) {
+            (/** @type {?} */ (metadata.styles)).forEach(function (styleTuple) {
                 if (typeof styleTuple == 'string') {
                     if (styleTuple == _angular_animations.AUTO_STYLE) {
                         styles.push(/** @type {?} */ (styleTuple));
@@ -787,10 +1099,10 @@ var AnimationAstBuilderVisitor = (function () {
         var /** @type {?} */ collectedEasing = null;
         styles.forEach(function (styleData) {
             if (isObject(styleData)) {
-                var /** @type {?} */ styleMap = (styleData);
+                var /** @type {?} */ styleMap = /** @type {?} */ (styleData);
                 var /** @type {?} */ easing = styleMap['easing'];
                 if (easing) {
-                    collectedEasing = (easing);
+                    collectedEasing = /** @type {?} */ (easing);
                     delete styleMap['easing'];
                 }
                 if (!containsDynamicStyles) {
@@ -817,7 +1129,13 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype._validateStyleAst = function (ast, context) {
+    AnimationAstBuilderVisitor.prototype._validateStyleAst = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
+        var _this = this;
         var /** @type {?} */ timings = context.currentAnimateTimings;
         var /** @type {?} */ endTime = context.currentTime;
         var /** @type {?} */ startTime = context.currentTime;
@@ -828,7 +1146,11 @@ var AnimationAstBuilderVisitor = (function () {
             if (typeof tuple == 'string')
                 return;
             Object.keys(tuple).forEach(function (prop) {
-                var /** @type {?} */ collectedStyles = context.collectedStyles[((context.currentQuerySelector))];
+                if (!_this._driver.validateStyleProperty(prop)) {
+                    context.errors.push("The provided animation property \"" + prop + "\" is not a supported CSS property for animations");
+                    return;
+                }
+                var /** @type {?} */ collectedStyles = context.collectedStyles[/** @type {?} */ ((context.currentQuerySelector))];
                 var /** @type {?} */ collectedEntry = collectedStyles[prop];
                 var /** @type {?} */ updateCollectedStyle = true;
                 if (collectedEntry) {
@@ -856,7 +1178,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitKeyframes = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitKeyframes = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         var _this = this;
         var /** @type {?} */ ast = { type: 5 /* Keyframes */, styles: [], options: null };
         if (!context.currentAnimateTimings) {
@@ -899,7 +1226,7 @@ var AnimationAstBuilderVisitor = (function () {
         }
         var /** @type {?} */ limit = length - 1;
         var /** @type {?} */ currentTime = context.currentTime;
-        var /** @type {?} */ currentAnimateTimings = ((context.currentAnimateTimings));
+        var /** @type {?} */ currentAnimateTimings = /** @type {?} */ ((context.currentAnimateTimings));
         var /** @type {?} */ animateDuration = currentAnimateTimings.duration;
         keyframes.forEach(function (kf, i) {
             var /** @type {?} */ offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];
@@ -917,7 +1244,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitReference = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitReference = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         return {
             type: 8 /* Reference */,
             animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),
@@ -929,7 +1261,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitAnimateChild = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitAnimateChild = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         context.depCount++;
         return {
             type: 9 /* AnimateChild */,
@@ -941,7 +1278,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitAnimateRef = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitAnimateRef = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         return {
             type: 10 /* AnimateRef */,
             animation: this.visitReference(metadata.animation, context),
@@ -953,9 +1295,14 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitQuery = function (metadata, context) {
-        var /** @type {?} */ parentSelector = ((context.currentQuerySelector));
-        var /** @type {?} */ options = ((metadata.options || {}));
+    AnimationAstBuilderVisitor.prototype.visitQuery = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
+        var /** @type {?} */ parentSelector = /** @type {?} */ ((context.currentQuerySelector));
+        var /** @type {?} */ options = /** @type {?} */ ((metadata.options || {}));
         context.queryCount++;
         context.currentQuery = metadata;
         var _a = normalizeSelector(metadata.selector), selector = _a[0], includeSelf = _a[1];
@@ -979,7 +1326,12 @@ var AnimationAstBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationAstBuilderVisitor.prototype.visitStagger = function (metadata, context) {
+    AnimationAstBuilderVisitor.prototype.visitStagger = /**
+     * @param {?} metadata
+     * @param {?} context
+     * @return {?}
+     */
+    function (metadata, context) {
         if (!context.currentQuery) {
             context.errors.push("stagger() can only be used inside of query()");
         }
@@ -1003,9 +1355,8 @@ function normalizeSelector(selector) {
     if (hasAmpersand) {
         selector = selector.replace(SELF_TOKEN_REGEX, '');
     }
-    selector = selector.replace(ENTER_TOKEN_REGEX, ENTER_SELECTOR)
-        .replace(LEAVE_TOKEN_REGEX, LEAVE_SELECTOR)
-        .replace(/@\*/g, NG_TRIGGER_SELECTOR)
+    // the :enter and :leave selectors are filled in at runtime during timeline building
+    selector = selector.replace(/@\*/g, NG_TRIGGER_SELECTOR)
         .replace(/@\w+/g, function (match) { return NG_TRIGGER_SELECTOR + '-' + match.substr(1); })
         .replace(/:animating/g, NG_ANIMATING_SELECTOR);
     return [selector, hasAmpersand];
@@ -1017,10 +1368,7 @@ function normalizeSelector(selector) {
 function normalizeParams(obj) {
     return obj ? copyObj(obj) : null;
 }
-var AnimationAstBuilderContext = (function () {
-    /**
-     * @param {?} errors
-     */
+var AnimationAstBuilderContext = /** @class */ (function () {
     function AnimationAstBuilderContext(errors) {
         this.errors = errors;
         this.queryCount = 0;
@@ -1046,14 +1394,14 @@ function consumeOffset(styles) {
     if (Array.isArray(styles)) {
         styles.forEach(function (styleTuple) {
             if (isObject(styleTuple) && styleTuple.hasOwnProperty('offset')) {
-                var /** @type {?} */ obj = (styleTuple);
+                var /** @type {?} */ obj = /** @type {?} */ (styleTuple);
                 offset = parseFloat(/** @type {?} */ (obj['offset']));
                 delete obj['offset'];
             }
         });
     }
     else if (isObject(styles) && styles.hasOwnProperty('offset')) {
-        var /** @type {?} */ obj = (styles);
+        var /** @type {?} */ obj = /** @type {?} */ (styles);
         offset = parseFloat(/** @type {?} */ (obj['offset']));
         delete obj['offset'];
     }
@@ -1074,19 +1422,19 @@ function isObject(value) {
 function constructTimingAst(value, errors) {
     var /** @type {?} */ timings = null;
     if (value.hasOwnProperty('duration')) {
-        timings = (value);
+        timings = /** @type {?} */ (value);
     }
     else if (typeof value == 'number') {
         var /** @type {?} */ duration = resolveTiming(/** @type {?} */ (value), errors).duration;
         return makeTimingAst(/** @type {?} */ (duration), 0, '');
     }
-    var /** @type {?} */ strValue = (value);
+    var /** @type {?} */ strValue = /** @type {?} */ (value);
     var /** @type {?} */ isDynamic = strValue.split(/\s+/).some(function (v) { return v.charAt(0) == '{' && v.charAt(1) == '{'; });
     if (isDynamic) {
-        var /** @type {?} */ ast = (makeTimingAst(0, 0, ''));
+        var /** @type {?} */ ast = /** @type {?} */ (makeTimingAst(0, 0, ''));
         ast.dynamic = true;
         ast.strValue = strValue;
-        return (ast);
+        return /** @type {?} */ (ast);
     }
     timings = timings || resolveTiming(strValue, errors);
     return makeTimingAst(timings.duration, timings.delay, timings.easing);
@@ -1099,7 +1447,7 @@ function normalizeAnimationOptions(options) {
     if (options) {
         options = copyObj(options);
         if (options['params']) {
-            options['params'] = ((normalizeParams(options['params'])));
+            options['params'] = /** @type {?} */ ((normalizeParams(options['params'])));
         }
     }
     else {
@@ -1116,14 +1464,16 @@ function normalizeAnimationOptions(options) {
 function makeTimingAst(duration, delay, easing) {
     return { duration: duration, delay: delay, easing: easing };
 }
+
 /**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
  */
 /**
+ * @record
+ */
+
+/**
  * @param {?} element
  * @param {?} keyframes
  * @param {?} preStyleProps
@@ -1148,14 +1498,12 @@ function createTimelineInstruction(element, keyframes, preStyleProps, postStyleP
         totalTime: duration + delay, easing: easing, subTimeline: subTimeline
     };
 }
+
 /**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
  */
-var ElementInstructionMap = (function () {
+var ElementInstructionMap = /** @class */ (function () {
     function ElementInstructionMap() {
         this._map = new Map();
     }
@@ -1163,7 +1511,11 @@ var ElementInstructionMap = (function () {
      * @param {?} element
      * @return {?}
      */
-    ElementInstructionMap.prototype.consume = function (element) {
+    ElementInstructionMap.prototype.consume = /**
+     * @param {?} element
+     * @return {?}
+     */
+    function (element) {
         var /** @type {?} */ instructions = this._map.get(element);
         if (instructions) {
             this._map.delete(element);
@@ -1178,7 +1530,12 @@ var ElementInstructionMap = (function () {
      * @param {?} instructions
      * @return {?}
      */
-    ElementInstructionMap.prototype.append = function (element, instructions) {
+    ElementInstructionMap.prototype.append = /**
+     * @param {?} element
+     * @param {?} instructions
+     * @return {?}
+     */
+    function (element, instructions) {
         var /** @type {?} */ existingInstructions = this._map.get(element);
         if (!existingInstructions) {
             this._map.set(element, existingInstructions = []);
@@ -1189,25 +1546,36 @@ var ElementInstructionMap = (function () {
      * @param {?} element
      * @return {?}
      */
-    ElementInstructionMap.prototype.has = function (element) { return this._map.has(element); };
+    ElementInstructionMap.prototype.has = /**
+     * @param {?} element
+     * @return {?}
+     */
+    function (element) { return this._map.has(element); };
     /**
      * @return {?}
      */
-    ElementInstructionMap.prototype.clear = function () { this._map.clear(); };
+    ElementInstructionMap.prototype.clear = /**
+     * @return {?}
+     */
+    function () { this._map.clear(); };
     return ElementInstructionMap;
 }());
+
 /**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
  */
 var ONE_FRAME_IN_MILLISECONDS = 1;
+var ENTER_TOKEN = ':enter';
+var ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');
+var LEAVE_TOKEN = ':leave';
+var LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');
 /**
  * @param {?} driver
  * @param {?} rootElement
  * @param {?} ast
+ * @param {?} enterClassName
+ * @param {?} leaveClassName
  * @param {?=} startingStyles
  * @param {?=} finalStyles
  * @param {?=} options
@@ -1215,19 +1583,34 @@ var ONE_FRAME_IN_MILLISECONDS = 1;
  * @param {?=} errors
  * @return {?}
  */
-function buildAnimationTimelines(driver, rootElement, ast, startingStyles, finalStyles, options, subInstructions, errors) {
+function buildAnimationTimelines(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) {
     if (startingStyles === void 0) { startingStyles = {}; }
     if (finalStyles === void 0) { finalStyles = {}; }
     if (errors === void 0) { errors = []; }
-    return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, startingStyles, finalStyles, options, subInstructions, errors);
+    return new AnimationTimelineBuilderVisitor().buildKeyframes(driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors);
 }
-var AnimationTimelineBuilderVisitor = (function () {
+var AnimationTimelineBuilderVisitor = /** @class */ (function () {
     function AnimationTimelineBuilderVisitor() {
     }
     /**
      * @param {?} driver
      * @param {?} rootElement
      * @param {?} ast
+     * @param {?} enterClassName
+     * @param {?} leaveClassName
+     * @param {?} startingStyles
+     * @param {?} finalStyles
+     * @param {?} options
+     * @param {?=} subInstructions
+     * @param {?=} errors
+     * @return {?}
+     */
+    AnimationTimelineBuilderVisitor.prototype.buildKeyframes = /**
+     * @param {?} driver
+     * @param {?} rootElement
+     * @param {?} ast
+     * @param {?} enterClassName
+     * @param {?} leaveClassName
      * @param {?} startingStyles
      * @param {?} finalStyles
      * @param {?} options
@@ -1235,10 +1618,10 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?=} errors
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.buildKeyframes = function (driver, rootElement, ast, startingStyles, finalStyles, options, subInstructions, errors) {
+    function (driver, rootElement, ast, enterClassName, leaveClassName, startingStyles, finalStyles, options, subInstructions, errors) {
         if (errors === void 0) { errors = []; }
         subInstructions = subInstructions || new ElementInstructionMap();
-        var /** @type {?} */ context = new AnimationTimelineContext(driver, rootElement, subInstructions, errors, []);
+        var /** @type {?} */ context = new AnimationTimelineContext(driver, rootElement, subInstructions, enterClassName, leaveClassName, errors, []);
         context.options = options;
         context.currentTimeline.setStyles([startingStyles], null, context.errors, options);
         visitDslNode(this, ast, context);
@@ -1258,7 +1641,12 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitTrigger = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitTrigger = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         // these values are not visited in this AST
     };
     /**
@@ -1266,7 +1654,12 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitState = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitState = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         // these values are not visited in this AST
     };
     /**
@@ -1274,7 +1667,12 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitTransition = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitTransition = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         // these values are not visited in this AST
     };
     /**
@@ -1282,7 +1680,12 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitAnimateChild = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitAnimateChild = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         var /** @type {?} */ elementInstructions = context.subInstructions.consume(context.element);
         if (elementInstructions) {
             var /** @type {?} */ innerContext = context.createSubContext(ast.options);
@@ -1301,7 +1704,12 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitAnimateRef = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitAnimateRef = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         var /** @type {?} */ innerContext = context.createSubContext(ast.options);
         innerContext.transformIntoNewTimeline();
         this.visitReference(ast.animation, innerContext);
@@ -1314,7 +1722,13 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} options
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype._visitSubInstructions = function (instructions, context, options) {
+    AnimationTimelineBuilderVisitor.prototype._visitSubInstructions = /**
+     * @param {?} instructions
+     * @param {?} context
+     * @param {?} options
+     * @return {?}
+     */
+    function (instructions, context, options) {
         var /** @type {?} */ startTime = context.currentTimeline.currentTime;
         var /** @type {?} */ furthestTime = startTime;
         // this is a special-case for when a user wants to skip a sub
@@ -1335,7 +1749,12 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitReference = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitReference = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         context.updateOptions(ast.options, true);
         visitDslNode(this, ast.animation, context);
         context.previousNode = ast;
@@ -1345,7 +1764,12 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitSequence = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitSequence = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         var _this = this;
         var /** @type {?} */ subContextCount = context.subContextCount;
         var /** @type {?} */ ctx = context;
@@ -1380,7 +1804,12 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitGroup = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitGroup = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         var _this = this;
         var /** @type {?} */ innerTimelines = [];
         var /** @type {?} */ furthestTime = context.currentTimeline.currentTime;
@@ -1406,9 +1835,14 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype._visitTiming = function (ast, context) {
-        if (((ast)).dynamic) {
-            var /** @type {?} */ strValue = ((ast)).strValue;
+    AnimationTimelineBuilderVisitor.prototype._visitTiming = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
+        if ((/** @type {?} */ (ast)).dynamic) {
+            var /** @type {?} */ strValue = (/** @type {?} */ (ast)).strValue;
             var /** @type {?} */ timingValue = context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;
             return resolveTiming(timingValue, context.errors);
         }
@@ -1421,7 +1855,12 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitAnimate = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitAnimate = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         var /** @type {?} */ timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);
         var /** @type {?} */ timeline = context.currentTimeline;
         if (timings.delay) {
@@ -1445,9 +1884,14 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitStyle = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitStyle = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         var /** @type {?} */ timeline = context.currentTimeline;
-        var /** @type {?} */ timings = ((context.currentAnimateTimings));
+        var /** @type {?} */ timings = /** @type {?} */ ((context.currentAnimateTimings));
         // this is a special case for when a style() call
         // directly follows  an animate() call (but not inside of an animate() call)
         if (!timings && timeline.getCurrentStyleProperties().length) {
@@ -1467,9 +1911,14 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitKeyframes = function (ast, context) {
-        var /** @type {?} */ currentAnimateTimings = ((context.currentAnimateTimings));
-        var /** @type {?} */ startTime = (((context.currentTimeline))).duration;
+    AnimationTimelineBuilderVisitor.prototype.visitKeyframes = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
+        var /** @type {?} */ currentAnimateTimings = /** @type {?} */ ((context.currentAnimateTimings));
+        var /** @type {?} */ startTime = (/** @type {?} */ ((context.currentTimeline))).duration;
         var /** @type {?} */ duration = currentAnimateTimings.duration;
         var /** @type {?} */ innerContext = context.createSubContext();
         var /** @type {?} */ innerTimeline = innerContext.currentTimeline;
@@ -1493,12 +1942,17 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitQuery = function (ast, context) {
+    AnimationTimelineBuilderVisitor.prototype.visitQuery = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
         var _this = this;
         // in the event that the first step before this is a style step we need
         // to ensure the styles are applied before the children are animated
         var /** @type {?} */ startTime = context.currentTimeline.currentTime;
-        var /** @type {?} */ options = ((ast.options || {}));
+        var /** @type {?} */ options = /** @type {?} */ ((ast.options || {}));
         var /** @type {?} */ delay = options.delay ? resolveTimingValue(options.delay) : 0;
         if (delay && (context.previousNode.type === 6 /* Style */ ||
             (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {
@@ -1540,8 +1994,13 @@ var AnimationTimelineBuilderVisitor = (function () {
      * @param {?} context
      * @return {?}
      */
-    AnimationTimelineBuilderVisitor.prototype.visitStagger = function (ast, context) {
-        var /** @type {?} */ parentContext = ((context.parentContext));
+    AnimationTimelineBuilderVisitor.prototype.visitStagger = /**
+     * @param {?} ast
+     * @param {?} context
+     * @return {?}
+     */
+    function (ast, context) {
+        var /** @type {?} */ parentContext = /** @type {?} */ ((context.parentContext));
         var /** @type {?} */ tl = context.currentTimeline;
         var /** @type {?} */ timings = ast.timings;
         var /** @type {?} */ duration = Math.abs(timings.duration);
@@ -1572,20 +2031,14 @@ var AnimationTimelineBuilderVisitor = (function () {
     };
     return AnimationTimelineBuilderVisitor;
 }());
-var DEFAULT_NOOP_PREVIOUS_NODE = ({});
-var AnimationTimelineContext = (function () {
-    /**
-     * @param {?} _driver
-     * @param {?} element
-     * @param {?} subInstructions
-     * @param {?} errors
-     * @param {?} timelines
-     * @param {?=} initialTimeline
-     */
-    function AnimationTimelineContext(_driver, element, subInstructions, errors, timelines, initialTimeline) {
+var DEFAULT_NOOP_PREVIOUS_NODE = /** @type {?} */ ({});
+var AnimationTimelineContext = /** @class */ (function () {
+    function AnimationTimelineContext(_driver, element, subInstructions, _enterClassName, _leaveClassName, errors, timelines, initialTimeline) {
         this._driver = _driver;
         this.element = element;
         this.subInstructions = subInstructions;
+        this._enterClassName = _enterClassName;
+        this._leaveClassName = _leaveClassName;
         this.errors = errors;
         this.timelines = timelines;
         this.parentContext = null;
@@ -1596,14 +2049,14 @@ var AnimationTimelineContext = (function () {
         this.currentQueryIndex = 0;
         this.currentQueryTotal = 0;
         this.currentStaggerTime = 0;
-        this.currentTimeline = initialTimeline || new TimelineBuilder(element, 0);
+        this.currentTimeline = initialTimeline || new TimelineBuilder(this._driver, element, 0);
         timelines.push(this.currentTimeline);
     }
     Object.defineProperty(AnimationTimelineContext.prototype, "params", {
-        /**
+        get: /**
          * @return {?}
          */
-        get: function () { return this.options.params; },
+        function () { return this.options.params; },
         enumerable: true,
         configurable: true
     });
@@ -1612,22 +2065,27 @@ var AnimationTimelineContext = (function () {
      * @param {?=} skipIfExists
      * @return {?}
      */
-    AnimationTimelineContext.prototype.updateOptions = function (options, skipIfExists) {
+    AnimationTimelineContext.prototype.updateOptions = /**
+     * @param {?} options
+     * @param {?=} skipIfExists
+     * @return {?}
+     */
+    function (options, skipIfExists) {
         var _this = this;
         if (!options)
             return;
-        var /** @type {?} */ newOptions = (options);
+        var /** @type {?} */ newOptions = /** @type {?} */ (options);
         var /** @type {?} */ optionsToUpdate = this.options;
         // NOTE: this will get patched up when other animation methods support duration overrides
         if (newOptions.duration != null) {
-            ((optionsToUpdate)).duration = resolveTimingValue(newOptions.duration);
+            (/** @type {?} */ (optionsToUpdate)).duration = resolveTimingValue(newOptions.duration);
         }
         if (newOptions.delay != null) {
             optionsToUpdate.delay = resolveTimingValue(newOptions.delay);
         }
         var /** @type {?} */ newParams = newOptions.params;
         if (newParams) {
-            var /** @type {?} */ paramsToUpdate_1 = ((optionsToUpdate.params));
+            var /** @type {?} */ paramsToUpdate_1 = /** @type {?} */ ((optionsToUpdate.params));
             if (!paramsToUpdate_1) {
                 paramsToUpdate_1 = this.options.params = {};
             }
@@ -1641,13 +2099,16 @@ var AnimationTimelineContext = (function () {
     /**
      * @return {?}
      */
-    AnimationTimelineContext.prototype._copyOptions = function () {
+    AnimationTimelineContext.prototype._copyOptions = /**
+     * @return {?}
+     */
+    function () {
         var /** @type {?} */ options = {};
         if (this.options) {
             var /** @type {?} */ oldParams_1 = this.options.params;
             if (oldParams_1) {
-                var /** @type {?} */ params_2 = options['params'] = {};
-                Object.keys(oldParams_1).forEach(function (name) { params_2[name] = oldParams_1[name]; });
+                var /** @type {?} */ params_1 = options['params'] = {};
+                Object.keys(oldParams_1).forEach(function (name) { params_1[name] = oldParams_1[name]; });
             }
         }
         return options;
@@ -1658,10 +2119,16 @@ var AnimationTimelineContext = (function () {
      * @param {?=} newTime
      * @return {?}
      */
-    AnimationTimelineContext.prototype.createSubContext = function (options, element, newTime) {
+    AnimationTimelineContext.prototype.createSubContext = /**
+     * @param {?=} options
+     * @param {?=} element
+     * @param {?=} newTime
+     * @return {?}
+     */
+    function (options, element, newTime) {
         if (options === void 0) { options = null; }
         var /** @type {?} */ target = element || this.element;
-        var /** @type {?} */ context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));
+        var /** @type {?} */ context = new AnimationTimelineContext(this._driver, target, this.subInstructions, this._enterClassName, this._leaveClassName, this.errors, this.timelines, this.currentTimeline.fork(target, newTime || 0));
         context.previousNode = this.previousNode;
         context.currentAnimateTimings = this.currentAnimateTimings;
         context.options = this._copyOptions();
@@ -1676,7 +2143,11 @@ var AnimationTimelineContext = (function () {
      * @param {?=} newTime
      * @return {?}
      */
-    AnimationTimelineContext.prototype.transformIntoNewTimeline = function (newTime) {
+    AnimationTimelineContext.prototype.transformIntoNewTimeline = /**
+     * @param {?=} newTime
+     * @return {?}
+     */
+    function (newTime) {
         this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;
         this.currentTimeline = this.currentTimeline.fork(this.element, newTime);
         this.timelines.push(this.currentTimeline);
@@ -1688,13 +2159,19 @@ var AnimationTimelineContext = (function () {
      * @param {?} delay
      * @return {?}
      */
-    AnimationTimelineContext.prototype.appendInstructionToTimeline = function (instruction, duration, delay) {
+    AnimationTimelineContext.prototype.appendInstructionToTimeline = /**
+     * @param {?} instruction
+     * @param {?} duration
+     * @param {?} delay
+     * @return {?}
+     */
+    function (instruction, duration, delay) {
         var /** @type {?} */ updatedTimings = {
             duration: duration != null ? duration : instruction.duration,
             delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,
             easing: ''
         };
-        var /** @type {?} */ builder = new SubTimelineBuilder(instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);
+        var /** @type {?} */ builder = new SubTimelineBuilder(this._driver, instruction.element, instruction.keyframes, instruction.preStyleProps, instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);
         this.timelines.push(builder);
         return updatedTimings;
     };
@@ -1702,14 +2179,22 @@ var AnimationTimelineContext = (function () {
      * @param {?} time
      * @return {?}
      */
-    AnimationTimelineContext.prototype.incrementTime = function (time) {
+    AnimationTimelineContext.prototype.incrementTime = /**
+     * @param {?} time
+     * @return {?}
+     */
+    function (time) {
         this.currentTimeline.forwardTime(this.currentTimeline.duration + time);
     };
     /**
      * @param {?} delay
      * @return {?}
      */
-    AnimationTimelineContext.prototype.delayNextStep = function (delay) {
+    AnimationTimelineContext.prototype.delayNextStep = /**
+     * @param {?} delay
+     * @return {?}
+     */
+    function (delay) {
         // negative delays are not yet supported
         if (delay > 0) {
             this.currentTimeline.delayNextStep(delay);
@@ -1724,16 +2209,29 @@ var AnimationTimelineContext = (function () {
      * @param {?} errors
      * @return {?}
      */
-    AnimationTimelineContext.prototype.invokeQuery = function (selector, originalSelector, limit, includeSelf, optional, errors) {
+    AnimationTimelineContext.prototype.invokeQuery = /**
+     * @param {?} selector
+     * @param {?} originalSelector
+     * @param {?} limit
+     * @param {?} includeSelf
+     * @param {?} optional
+     * @param {?} errors
+     * @return {?}
+     */
+    function (selector, originalSelector, limit, includeSelf, optional, errors) {
         var /** @type {?} */ results = [];
         if (includeSelf) {
             results.push(this.element);
         }
         if (selector.length > 0) {
+            // if :self is only used then the selector is empty
+            selector = selector.replace(ENTER_TOKEN_REGEX, '.' + this._enterClassName);
+            selector = selector.replace(LEAVE_TOKEN_REGEX, '.' + this._leaveClassName);
             var /** @type {?} */ multi = limit != 1;
             var /** @type {?} */ elements = this._driver.query(this.element, selector, multi);
             if (limit !== 0) {
-                elements = elements.slice(0, limit);
+                elements = limit < 0 ? elements.slice(elements.length + limit, elements.length) :
+                    elements.slice(0, limit);
             }
             results.push.apply(results, elements);
         }
@@ -1744,13 +2242,9 @@ var AnimationTimelineContext = (function () {
     };
     return AnimationTimelineContext;
 }());
-var TimelineBuilder = (function () {
-    /**
-     * @param {?} element
-     * @param {?} startTime
-     * @param {?=} _elementTimelineStylesLookup
-     */
-    function TimelineBuilder(element, startTime, _elementTimelineStylesLookup) {
+var TimelineBuilder = /** @class */ (function () {
+    function TimelineBuilder(_driver, element, startTime, _elementTimelineStylesLookup) {
+        this._driver = _driver;
         this.element = element;
         this.startTime = startTime;
         this._elementTimelineStylesLookup = _elementTimelineStylesLookup;
@@ -1766,7 +2260,7 @@ var TimelineBuilder = (function () {
             this._elementTimelineStylesLookup = new Map();
         }
         this._localTimelineStyles = Object.create(this._backFill, {});
-        this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element);
+        this._globalTimelineStyles = /** @type {?} */ ((this._elementTimelineStylesLookup.get(element)));
         if (!this._globalTimelineStyles) {
             this._globalTimelineStyles = this._localTimelineStyles;
             this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);
@@ -1776,7 +2270,10 @@ var TimelineBuilder = (function () {
     /**
      * @return {?}
      */
-    TimelineBuilder.prototype.containsAnimation = function () {
+    TimelineBuilder.prototype.containsAnimation = /**
+     * @return {?}
+     */
+    function () {
         switch (this._keyframes.size) {
             case 0:
                 return false;
@@ -1789,12 +2286,15 @@ var TimelineBuilder = (function () {
     /**
      * @return {?}
      */
-    TimelineBuilder.prototype.getCurrentStyleProperties = function () { return Object.keys(this._currentKeyframe); };
+    TimelineBuilder.prototype.getCurrentStyleProperties = /**
+     * @return {?}
+     */
+    function () { return Object.keys(this._currentKeyframe); };
     Object.defineProperty(TimelineBuilder.prototype, "currentTime", {
-        /**
+        get: /**
          * @return {?}
          */
-        get: function () { return this.startTime + this.duration; },
+        function () { return this.startTime + this.duration; },
         enumerable: true,
         configurable: true
     });
@@ -1802,7 +2302,11 @@ var TimelineBuilder = (function () {
      * @param {?} delay
      * @return {?}
      */
-    TimelineBuilder.prototype.delayNextStep = function (delay) {
+    TimelineBuilder.prototype.delayNextStep = /**
+     * @param {?} delay
+     * @return {?}
+     */
+    function (delay) {
         // in the event that a style() step is placed right before a stagger()
         // and that style() step is the very first style() value in the animation
         // then we need to make a copy of the keyframe [0, copy, 1] so that the delay
@@ -1823,18 +2327,26 @@ var TimelineBuilder = (function () {
      * @param {?=} currentTime
      * @return {?}
      */
-    TimelineBuilder.prototype.fork = function (element, currentTime) {
+    TimelineBuilder.prototype.fork = /**
+     * @param {?} element
+     * @param {?=} currentTime
+     * @return {?}
+     */
+    function (element, currentTime) {
         this.applyStylesToKeyframe();
-        return new TimelineBuilder(element, currentTime || this.currentTime, this._elementTimelineStylesLookup);
+        return new TimelineBuilder(this._driver, element, currentTime || this.currentTime, this._elementTimelineStylesLookup);
     };
     /**
      * @return {?}
      */
-    TimelineBuilder.prototype._loadKeyframe = function () {
+    TimelineBuilder.prototype._loadKeyframe = /**
+     * @return {?}
+     */
+    function () {
         if (this._currentKeyframe) {
             this._previousKeyframe = this._currentKeyframe;
         }
-        this._currentKeyframe = ((this._keyframes.get(this.duration)));
+        this._currentKeyframe = /** @type {?} */ ((this._keyframes.get(this.duration)));
         if (!this._currentKeyframe) {
             this._currentKeyframe = Object.create(this._backFill, {});
             this._keyframes.set(this.duration, this._currentKeyframe);
@@ -1843,7 +2355,10 @@ var TimelineBuilder = (function () {
     /**
      * @return {?}
      */
-    TimelineBuilder.prototype.forwardFrame = function () {
+    TimelineBuilder.prototype.forwardFrame = /**
+     * @return {?}
+     */
+    function () {
         this.duration += ONE_FRAME_IN_MILLISECONDS;
         this._loadKeyframe();
     };
@@ -1851,7 +2366,11 @@ var TimelineBuilder = (function () {
      * @param {?} time
      * @return {?}
      */
-    TimelineBuilder.prototype.forwardTime = function (time) {
+    TimelineBuilder.prototype.forwardTime = /**
+     * @param {?} time
+     * @return {?}
+     */
+    function (time) {
         this.applyStylesToKeyframe();
         this.duration = time;
         this._loadKeyframe();
@@ -1861,7 +2380,12 @@ var TimelineBuilder = (function () {
      * @param {?} value
      * @return {?}
      */
-    TimelineBuilder.prototype._updateStyle = function (prop, value) {
+    TimelineBuilder.prototype._updateStyle = /**
+     * @param {?} prop
+     * @param {?} value
+     * @return {?}
+     */
+    function (prop, value) {
         this._localTimelineStyles[prop] = value;
         this._globalTimelineStyles[prop] = value;
         this._styleSummary[prop] = { time: this.currentTime, value: value };
@@ -1869,12 +2393,19 @@ var TimelineBuilder = (function () {
     /**
      * @return {?}
      */
-    TimelineBuilder.prototype.allowOnlyTimelineStyles = function () { return this._currentEmptyStepKeyframe !== this._currentKeyframe; };
+    TimelineBuilder.prototype.allowOnlyTimelineStyles = /**
+     * @return {?}
+     */
+    function () { return this._currentEmptyStepKeyframe !== this._currentKeyframe; };
     /**
      * @param {?} easing
      * @return {?}
      */
-    TimelineBuilder.prototype.applyEmptyStep = function (easing) {
+    TimelineBuilder.prototype.applyEmptyStep = /**
+     * @param {?} easing
+     * @return {?}
+     */
+    function (easing) {
         var _this = this;
         if (easing) {
             this._previousKeyframe['easing'] = easing;
@@ -1898,7 +2429,14 @@ var TimelineBuilder = (function () {
      * @param {?=} options
      * @return {?}
      */
-    TimelineBuilder.prototype.setStyles = function (input, easing, errors, options) {
+    TimelineBuilder.prototype.setStyles = /**
+     * @param {?} input
+     * @param {?} easing
+     * @param {?} errors
+     * @param {?=} options
+     * @return {?}
+     */
+    function (input, easing, errors, options) {
         var _this = this;
         if (easing) {
             this._previousKeyframe['easing'] = easing;
@@ -1919,7 +2457,10 @@ var TimelineBuilder = (function () {
     /**
      * @return {?}
      */
-    TimelineBuilder.prototype.applyStylesToKeyframe = function () {
+    TimelineBuilder.prototype.applyStylesToKeyframe = /**
+     * @return {?}
+     */
+    function () {
         var _this = this;
         var /** @type {?} */ styles = this._pendingStyles;
         var /** @type {?} */ props = Object.keys(styles);
@@ -1939,7 +2480,10 @@ var TimelineBuilder = (function () {
     /**
      * @return {?}
      */
-    TimelineBuilder.prototype.snapshotCurrentStyles = function () {
+    TimelineBuilder.prototype.snapshotCurrentStyles = /**
+     * @return {?}
+     */
+    function () {
         var _this = this;
         Object.keys(this._localTimelineStyles).forEach(function (prop) {
             var /** @type {?} */ val = _this._localTimelineStyles[prop];
@@ -1950,12 +2494,15 @@ var TimelineBuilder = (function () {
     /**
      * @return {?}
      */
-    TimelineBuilder.prototype.getFinalKeyframe = function () { return this._keyframes.get(this.duration); };
+    TimelineBuilder.prototype.getFinalKeyframe = /**
+     * @return {?}
+     */
+    function () { return this._keyframes.get(this.duration); };
     Object.defineProperty(TimelineBuilder.prototype, "properties", {
-        /**
+        get: /**
          * @return {?}
          */
-        get: function () {
+        function () {
             var /** @type {?} */ properties = [];
             for (var /** @type {?} */ prop in this._currentKeyframe) {
                 properties.push(prop);
@@ -1969,7 +2516,11 @@ var TimelineBuilder = (function () {
      * @param {?} timeline
      * @return {?}
      */
-    TimelineBuilder.prototype.mergeTimelineCollectedStyles = function (timeline) {
+    TimelineBuilder.prototype.mergeTimelineCollectedStyles = /**
+     * @param {?} timeline
+     * @return {?}
+     */
+    function (timeline) {
         var _this = this;
         Object.keys(timeline._styleSummary).forEach(function (prop) {
             var /** @type {?} */ details0 = _this._styleSummary[prop];
@@ -1982,7 +2533,10 @@ var TimelineBuilder = (function () {
     /**
      * @return {?}
      */
-    TimelineBuilder.prototype.buildKeyframes = function () {
+    TimelineBuilder.prototype.buildKeyframes = /**
+     * @return {?}
+     */
+    function () {
         var _this = this;
         this.applyStylesToKeyframe();
         var /** @type {?} */ preStyleProps = new Set();
@@ -2019,19 +2573,11 @@ var TimelineBuilder = (function () {
     };
     return TimelineBuilder;
 }());
-var SubTimelineBuilder = (function (_super) {
+var SubTimelineBuilder = /** @class */ (function (_super) {
     __extends(SubTimelineBuilder, _super);
-    /**
-     * @param {?} element
-     * @param {?} keyframes
-     * @param {?} preStyleProps
-     * @param {?} postStyleProps
-     * @param {?} timings
-     * @param {?=} _stretchStartingKeyframe
-     */
-    function SubTimelineBuilder(element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe) {
+    function SubTimelineBuilder(driver, element, keyframes, preStyleProps, postStyleProps, timings, _stretchStartingKeyframe) {
         if (_stretchStartingKeyframe === void 0) { _stretchStartingKeyframe = false; }
-        var _this = _super.call(this, element, timings.delay) || this;
+        var _this = _super.call(this, driver, element, timings.delay) || this;
         _this.element = element;
         _this.keyframes = keyframes;
         _this.preStyleProps = preStyleProps;
@@ -2043,11 +2589,17 @@ var SubTimelineBuilder = (function (_super) {
     /**
      * @return {?}
      */
-    SubTimelineBuilder.prototype.containsAnimation = function () { return this.keyframes.length > 1; };
+    SubTimelineBuilder.prototype.containsAnimation = /**
+     * @return {?}
+     */
+    function () { return this.keyframes.length > 1; };
     /**
      * @return {?}
      */
-    SubTimelineBuilder.prototype.buildKeyframes = function () {
+    SubTimelineBuilder.prototype.buildKeyframes = /**
+     * @return {?}
+     */
+    function () {
         var /** @type {?} */ keyframes = this.keyframes;
         var _a = this.timings, delay = _a.delay, duration = _a.duration, easing = _a.easing;
         if (this._stretchStartingKeyframe && delay) {
@@ -2062,24 +2614,24 @@ var SubTimelineBuilder = (function (_super) {
             oldFirstKeyframe['offset'] = roundOffset(startingGap);
             newKeyframes.push(oldFirstKeyframe);
             /*
-              When the keyframe is stretched then it means that the delay before the animation
-              starts is gone. Instead the first keyframe is placed at the start of the animation
-              and it is then copied to where it starts when the original delay is over. This basically
-              means nothing animates during that delay, but the styles are still renderered. For this
-              to work the original offset values that exist in the original keyframes must be "warped"
-              so that they can take the new keyframe + delay into account.
-      
-              delay=1000, duration=1000, keyframes = 0 .5 1
-      
-              turns into
-      
-              delay=0, duration=2000, keyframes = 0 .33 .66 1
-             */
+                    When the keyframe is stretched then it means that the delay before the animation
+                    starts is gone. Instead the first keyframe is placed at the start of the animation
+                    and it is then copied to where it starts when the original delay is over. This basically
+                    means nothing animates during that delay, but the styles are still renderered. For this
+                    to work the original offset values that exist in the original keyframes must be "warped"
+                    so that they can take the new keyframe + delay into account.
+            
+                    delay=1000, duration=1000, keyframes = 0 .5 1
+            
+                    turns into
+            
+                    delay=0, duration=2000, keyframes = 0 .33 .66 1
+                   */
             // offsets between 1 ... n -1 are all warped by the keyframe stretch
             var /** @type {?} */ limit = keyframes.length - 1;
             for (var /** @type {?} */ i = 1; i <= limit; i++) {
                 var /** @type {?} */ kf = copyStyles(keyframes[i], false);
-                var /** @type {?} */ oldOffset = (kf['offset']);
+                var /** @type {?} */ oldOffset = /** @type {?} */ (kf['offset']);
                 var /** @type {?} */ timeAtKeyframe = delay + oldOffset * duration;
                 kf['offset'] = roundOffset(timeAtKeyframe / totalTime);
                 newKeyframes.push(kf);
@@ -2123,24 +2675,18 @@ function flattenStyles(input, allStyles) {
     });
     return styles;
 }
+
 /**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
  */
-var Animation = (function () {
-    /**
-     * @param {?} _driver
-     * @param {?} input
-     */
+var Animation = /** @class */ (function () {
     function Animation(_driver, input) {
         this._driver = _driver;
-        var errors = [];
-        var ast = buildAnimationAst(input, errors);
+        var /** @type {?} */ errors = [];
+        var /** @type {?} */ ast = buildAnimationAst(_driver, input, errors);
         if (errors.length) {
-            var errorMessage = "animation validation failed:\n" + errors.join("\n");
+            var /** @type {?} */ errorMessage = "animation validation failed:\n" + errors.join("\n");
             throw new Error(errorMessage);
         }
         this._animationAst = ast;
@@ -2153,12 +2699,20 @@ var Animation = (function () {
      * @param {?=} subInstructions
      * @return {?}
      */
-    Animation.prototype.buildTimelines = function (element, startingStyles, destinationStyles, options, subInstructions) {
-        var /** @type {?} */ start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) : (startingStyles);
-        var /** @type {?} */ dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) : (destinationStyles);
+    Animation.prototype.buildTimelines = /**
+     * @param {?} element
+     * @param {?} startingStyles
+     * @param {?} destinationStyles
+     * @param {?} options
+     * @param {?=} subInstructions
+     * @return {?}
+     */
+    function (element, startingStyles, destinationStyles, options, subInstructions) {
+        var /** @type {?} */ start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) : /** @type {?} */ (startingStyles);
+        var /** @type {?} */ dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) : /** @type {?} */ (destinationStyles);
         var /** @type {?} */ errors = [];
         subInstructions = subInstructions || new ElementInstructionMap();
-        var /** @type {?} */ result = buildAnimationTimelines(this._driver, element, this._animationAst, start, dest, options, subInstructions, errors);
+        var /** @type {?} */ result = buildAnimationTimelines(this._driver, element, this._animationAst, ENTER_CLASSNAME, LEAVE_CLASSNAME, start, dest, options, subInstructions, errors);
         if (errors.length) {
             var /** @type {?} */ errorMessage = "animation building failed:\n" + errors.join("\n");
             throw new Error(errorMessage);
@@ -2167,6 +2721,11 @@ var Animation = (function () {
     };
     return Animation;
 }());
+
+/**
+ * @fileoverview added by tsickle
+ * @suppress {checkTypes} checked by tsc
+ */
 /**
  * @license
  * Copyright Google Inc. All Rights Reserved.
@@ -2175,39 +2734,56 @@ var Animation = (function () {
  * found in the LICENSE file at https://angular.io/license
  */
 /**
- * @experimental Animation support is experimental.
+ * \@experimental Animation support is experimental.
+ * @abstract
  */
-/**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */ var AnimationStyleNormalizer = (function () {
+var AnimationStyleNormalizer = /** @class */ (function () {
     function AnimationStyleNormalizer() {
     }
     return AnimationStyleNormalizer;
 }());
 /**
- * @experimental Animation support is experimental.
+ * \@experimental Animation support is experimental.
  */
-var NoopAnimationStyleNormalizer = (function () {
+var NoopAnimationStyleNormalizer = /** @class */ (function () {
     function NoopAnimationStyleNormalizer() {
     }
-    NoopAnimationStyleNormalizer.prototype.normalizePropertyName = function (propertyName, errors) { return propertyName; };
-    NoopAnimationStyleNormalizer.prototype.normalizeStyleValue = function (userProvidedProperty, normalizedProperty, value, errors) {
-        return value;
+    /**
+     * @param {?} propertyName
+     * @param {?} errors
+     * @return {?}
+     */
+    NoopAnimationStyleNormalizer.prototype.normalizePropertyName = /**
+     * @param {?} propertyName
+     * @param {?} errors
+     * @return {?}
+     */
+    function (propertyName, errors) { return propertyName; };
+    /**
+     * @param {?} userProvidedProperty
+     * @param {?} normalizedProperty
+     * @param {?} value
+     * @param {?} errors
+     * @return {?}
+     */
+    NoopAnimationStyleNormalizer.prototype.normalizeStyleValue

<TRUNCATED>