{"version":3,"file":"animations-browser.umd.min.js","sources":["../../../../packages/animations/browser/src/render/transition_animation_engine.ts","../../../../packages/animations/browser/src/util.ts","../../../../packages/animations/browser/src/render/animation_engine_next.ts","../../../../packages/animations/browser/src/render/web_animations/web_animations_player.ts","../../../../packages/animations/browser/src/render/web_animations/web_animations_driver.ts","../../../../packages/animations/browser/src/dsl/style_normalization/web_animations_style_normalizer.ts","../../../../packages/animations/browser/src/dsl/animation_transition_factory.ts","../../../../packages/animations/browser/src/dsl/animation_trigger.ts","../../../../packages/animations/browser/src/render/timeline_animation_engine.ts","../../../../packages/animations/browser/src/dsl/animation_ast_builder.ts","../../../../packages/animations/browser/src/dsl/element_instruction_map.ts","../../../../packages/animations/browser/src/dsl/animation_timeline_builder.ts","../../../../packages/animations/browser/src/dsl/animation.ts","../../../../packages/animations/browser/src/dsl/style_normalization/animation_style_normalizer.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../packages/animations/browser/src/render/shared.ts","../../../../packages/animations/browser/src/render/animation_driver.ts","../../../../packages/animations/browser/src/dsl/animation_transition_instruction.ts","../../../../packages/animations/browser/src/dsl/animation_timeline_instruction.ts","../../../../packages/animations/browser/src/dsl/animation_transition_expr.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AUTO_STYLE, AnimationOptions, AnimationPlayer, NoopAnimationPlayer, ɵAnimationGroupPlayer as AnimationGroupPlayer, ɵPRE_STYLE as PRE_STYLE, ɵStyleData} from '@angular/animations';\n\nimport {AnimationTimelineInstruction} from '../dsl/animation_timeline_instruction';\nimport {AnimationTransitionFactory} from '../dsl/animation_transition_factory';\nimport {AnimationTransitionInstruction} from '../dsl/animation_transition_instruction';\nimport {AnimationTrigger} from '../dsl/animation_trigger';\nimport {ElementInstructionMap} from '../dsl/element_instruction_map';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\nimport {ENTER_CLASSNAME, LEAVE_CLASSNAME, NG_ANIMATING_CLASSNAME, NG_ANIMATING_SELECTOR, NG_TRIGGER_CLASSNAME, NG_TRIGGER_SELECTOR, copyObj, eraseStyles, setStyles} from '../util';\n\nimport {AnimationDriver} from './animation_driver';\nimport {getOrSetAsInMap, listenOnPlayer, makeAnimationEvent, normalizeKeyframes, optimizeGroupPlayer} from './shared';\n\nconst /** @type {?} */ QUEUED_CLASSNAME = 'ng-animate-queued';\nconst /** @type {?} */ QUEUED_SELECTOR = '.ng-animate-queued';\nconst /** @type {?} */ DISABLED_CLASSNAME = 'ng-animate-disabled';\nconst /** @type {?} */ DISABLED_SELECTOR = '.ng-animate-disabled';\n\nconst /** @type {?} */ EMPTY_PLAYER_ARRAY: TransitionAnimationPlayer[] = [];\nconst /** @type {?} */ NULL_REMOVAL_STATE: ElementAnimationState = {\n namespaceId: '',\n setForRemoval: null,\n hasAnimation: false,\n removedBeforeQueried: false\n};\nconst /** @type {?} */ NULL_REMOVED_QUERIED_STATE: ElementAnimationState = {\n namespaceId: '',\n setForRemoval: null,\n hasAnimation: false,\n removedBeforeQueried: true\n};\n\ninterface TriggerListener {\n name: string;\n phase: string;\n callback: (event: any) => any;\n}\n\nexport interface QueueInstruction {\n element: any;\n triggerName: string;\n fromState: StateValue;\n toState: StateValue;\n transition: AnimationTransitionFactory;\n player: TransitionAnimationPlayer;\n isFallbackTransition: boolean;\n}\n\nexport const /** @type {?} */ REMOVAL_FLAG = '__ng_removed';\n\nexport interface ElementAnimationState {\n setForRemoval: any;\n hasAnimation: boolean;\n namespaceId: string;\n removedBeforeQueried: boolean;\n}\nexport class StateValue {\npublic value: string;\npublic options: AnimationOptions;\n/**\n * @return {?}\n */\nget params(): {[key: string]: any} { return /** @type {?} */(( this.options.params as{[key: string]: any})); }\n/**\n * @param {?} input\n */\nconstructor(input: any) {\n const isObj = input && input.hasOwnProperty('value');\n const value = isObj ? input['value'] : input;\n this.value = normalizeTriggerValue(value);\n if (isObj) {\n const options = copyObj(input as any);\n delete options['value'];\n this.options = options as AnimationOptions;\n } else {\n this.options = {};\n }\n if (!this.options.params) {\n this.options.params = {};\n }\n }\n/**\n * @param {?} options\n * @return {?}\n */\nabsorbOptions(options: AnimationOptions) {\n const /** @type {?} */ newParams = options.params;\n if (newParams) {\n const /** @type {?} */ oldParams = /** @type {?} */(( this.options.params));\n Object.keys(newParams).forEach(prop => {\n if (oldParams[prop] == null) {\n oldParams[prop] = newParams[prop];\n }\n });\n }\n }\n}\n\nfunction StateValue_tsickle_Closure_declarations() {\n/** @type {?} */\nStateValue.prototype.value;\n/** @type {?} */\nStateValue.prototype.options;\n}\n\n\nexport const /** @type {?} */ VOID_VALUE = 'void';\nexport const /** @type {?} */ DEFAULT_STATE_VALUE = new StateValue(VOID_VALUE);\nexport const /** @type {?} */ DELETED_STATE_VALUE = new StateValue('DELETED');\nexport class AnimationTransitionNamespace {\npublic players: TransitionAnimationPlayer[] = [];\nprivate _triggers: {[triggerName: string]: AnimationTrigger} = {};\nprivate _queue: QueueInstruction[] = [];\nprivate _elementListeners = new Map();\nprivate _hostClassName: string;\n/**\n * @param {?} id\n * @param {?} hostElement\n * @param {?} _engine\n */\nconstructor(\npublic id: string,\npublic hostElement: any,\nprivate _engine: TransitionAnimationEngine) {\n this._hostClassName = 'ng-tns-' + id;\n addClass(hostElement, this._hostClassName);\n }\n/**\n * @param {?} element\n * @param {?} name\n * @param {?} phase\n * @param {?} callback\n * @return {?}\n */\nlisten(element: any, name: string, phase: string, callback: (event: any) => boolean): () => any {\n if (!this._triggers.hasOwnProperty(name)) {\n throw new Error(`Unable to listen on the animation trigger event \"${\n phase}\" because the animation trigger \"${name}\" doesn\\'t exist!`);\n }\n\n if (phase == null || phase.length == 0) {\n throw new Error(`Unable to listen on the animation trigger \"${\n name}\" because the provided event is undefined!`);\n }\n\n if (!isTriggerEventValid(phase)) {\n throw new Error(`The provided animation trigger event \"${phase}\" for the animation trigger \"${\n name}\" is not supported!`);\n }\n\n const /** @type {?} */ listeners = getOrSetAsInMap(this._elementListeners, element, []);\n const /** @type {?} */ data = {name, phase, callback};\n listeners.push(data);\n\n const /** @type {?} */ triggersWithStates = getOrSetAsInMap(this._engine.statesByElement, element, {});\n if (!triggersWithStates.hasOwnProperty(name)) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + name);\n triggersWithStates[name] = null;\n }\n\n return () => {\n // the event listener is removed AFTER the flush has occurred such\n // that leave animations callbacks can fire (otherwise if the node\n // is removed in between then the listeners would be deregistered)\n this._engine.afterFlush(() => {\n const /** @type {?} */ index = listeners.indexOf(data);\n if (index >= 0) {\n listeners.splice(index, 1);\n }\n\n if (!this._triggers[name]) {\n delete triggersWithStates[name];\n }\n });\n };\n }\n/**\n * @param {?} name\n * @param {?} ast\n * @return {?}\n */\nregister(name: string, ast: AnimationTrigger): boolean {\n if (this._triggers[name]) {\n // throw\n return false;\n } else {\n this._triggers[name] = ast;\n return true;\n }\n }\n/**\n * @param {?} name\n * @return {?}\n */\nprivate _getTrigger(name: string) {\n const /** @type {?} */ trigger = this._triggers[name];\n if (!trigger) {\n throw new Error(`The provided animation trigger \"${name}\" has not been registered!`);\n }\n return trigger;\n }\n/**\n * @param {?} element\n * @param {?} triggerName\n * @param {?} value\n * @param {?=} defaultToFallback\n * @return {?}\n */\ntrigger(element: any, triggerName: string, value: any, defaultToFallback: boolean = true):\n TransitionAnimationPlayer|undefined {\n const /** @type {?} */ trigger = this._getTrigger(triggerName);\n const /** @type {?} */ player = new TransitionAnimationPlayer(this.id, triggerName, element);\n\n let /** @type {?} */ triggersWithStates = this._engine.statesByElement.get(element);\n if (!triggersWithStates) {\n addClass(element, NG_TRIGGER_CLASSNAME);\n addClass(element, NG_TRIGGER_CLASSNAME + '-' + triggerName);\n this._engine.statesByElement.set(element, triggersWithStates = {});\n }\n\n let /** @type {?} */ fromState = triggersWithStates[triggerName];\n const /** @type {?} */ toState = new StateValue(value);\n\n const /** @type {?} */ isObj = value && value.hasOwnProperty('value');\n if (!isObj && fromState) {\n toState.absorbOptions(fromState.options);\n }\n\n triggersWithStates[triggerName] = toState;\n\n if (!fromState) {\n fromState = DEFAULT_STATE_VALUE;\n } else if (fromState === DELETED_STATE_VALUE) {\n return player;\n }\n\n const /** @type {?} */ isRemoval = toState.value === VOID_VALUE;\n\n // normally this isn't reached by here, however, if an object expression\n // is passed in then it may be a new object each time. Comparing the value\n // is important since that will stay the same despite there being a new object.\n // The removal arc here is special cased because the same element is triggered\n // twice in the event that it contains animations on the outer/inner portions\n // of the host container\n if (!isRemoval && fromState.value === toState.value) {\n // this means that despite the value not changing, some inner params\n // have changed which means that the animation final styles need to be applied\n if (!objEquals(fromState.params, toState.params)) {\n const /** @type {?} */ errors: any[] = [];\n const /** @type {?} */ fromStyles = trigger.matchStyles(fromState.value, fromState.params, errors);\n const /** @type {?} */ toStyles = trigger.matchStyles(toState.value, toState.params, errors);\n if (errors.length) {\n this._engine.reportError(errors);\n } else {\n this._engine.afterFlush(() => {\n eraseStyles(element, fromStyles);\n setStyles(element, toStyles);\n });\n }\n }\n return;\n }\n\n const /** @type {?} */ playersOnElement: TransitionAnimationPlayer[] =\n getOrSetAsInMap(this._engine.playersByElement, element, []);\n playersOnElement.forEach(player => {\n // only remove the player if it is queued on the EXACT same trigger/namespace\n // we only also deal with queued players here because if the animation has\n // started then we want to keep the player alive until the flush happens\n // (which is where the previousPlayers are passed into the new palyer)\n if (player.namespaceId == this.id && player.triggerName == triggerName && player.queued) {\n player.destroy();\n }\n });\n\n let /** @type {?} */ transition = trigger.matchTransition(fromState.value, toState.value);\n let /** @type {?} */ isFallbackTransition = false;\n if (!transition) {\n if (!defaultToFallback) return;\n transition = trigger.fallbackTransition;\n isFallbackTransition = true;\n }\n\n this._engine.totalQueuedPlayers++;\n this._queue.push(\n {element, triggerName, transition, fromState, toState, player, isFallbackTransition});\n\n if (!isFallbackTransition) {\n addClass(element, QUEUED_CLASSNAME);\n player.onStart(() => { removeClass(element, QUEUED_CLASSNAME); });\n }\n\n player.onDone(() => {\n let /** @type {?} */ index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n\n const /** @type {?} */ players = this._engine.playersByElement.get(element);\n if (players) {\n let /** @type {?} */ index = players.indexOf(player);\n if (index >= 0) {\n players.splice(index, 1);\n }\n }\n });\n\n this.players.push(player);\n playersOnElement.push(player);\n\n return player;\n }\n/**\n * @param {?} name\n * @return {?}\n */\nderegister(name: string) {\n delete this._triggers[name];\n\n this._engine.statesByElement.forEach((stateMap, element) => { delete stateMap[name]; });\n\n this._elementListeners.forEach((listeners, element) => {\n this._elementListeners.set(\n element, listeners.filter(entry => { return entry.name != name; }));\n });\n }\n/**\n * @param {?} element\n * @return {?}\n */\nclearElementCache(element: any) {\n this._engine.statesByElement.delete(element);\n this._elementListeners.delete(element);\n const /** @type {?} */ elementPlayers = this._engine.playersByElement.get(element);\n if (elementPlayers) {\n elementPlayers.forEach(player => player.destroy());\n this._engine.playersByElement.delete(element);\n }\n }\n/**\n * @param {?} rootElement\n * @param {?} context\n * @param {?=} animate\n * @return {?}\n */\nprivate _destroyInnerNodes(rootElement: any, context: any, animate: boolean = false) {\n this._engine.driver.query(rootElement, NG_TRIGGER_SELECTOR, true).forEach(elm => {\n if (animate && containsClass(elm, this._hostClassName)) {\n const /** @type {?} */ innerNs = this._engine.namespacesByHostElement.get(elm);\n\n // special case for a host element with animations on the same element\n if (innerNs) {\n innerNs.removeNode(elm, context, true);\n }\n\n this.removeNode(elm, context, true);\n } else {\n this.clearElementCache(elm);\n }\n });\n }\n/**\n * @param {?} element\n * @param {?} context\n * @param {?=} doNotRecurse\n * @return {?}\n */\nremoveNode(element: any, context: any, doNotRecurse?: boolean): void {\n const /** @type {?} */ engine = this._engine;\n\n if (!doNotRecurse && element.childElementCount) {\n this._destroyInnerNodes(element, context, true);\n }\n\n const /** @type {?} */ triggerStates = engine.statesByElement.get(element);\n if (triggerStates) {\n const /** @type {?} */ players: TransitionAnimationPlayer[] = [];\n Object.keys(triggerStates).forEach(triggerName => {\n // this check is here in the event that an element is removed\n // twice (both on the host level and the component level)\n if (this._triggers[triggerName]) {\n const /** @type {?} */ player = this.trigger(element, triggerName, VOID_VALUE, false);\n if (player) {\n players.push(player);\n }\n }\n });\n\n if (players.length) {\n engine.markElementAsRemoved(this.id, element, true, context);\n optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n return;\n }\n }\n\n // find the player that is animating and make sure that the\n // removal is delayed until that player has completed\n let /** @type {?} */ containsPotentialParentTransition = false;\n if (engine.totalAnimations) {\n const /** @type {?} */ currentPlayers =\n engine.players.length ? engine.playersByQueriedElement.get(element) : [];\n\n // when this `if statement` does not continue forward it means that\n // a previous animation query has selected the current element and\n // is animating it. In this situation want to continue fowards and\n // allow the element to be queued up for animation later.\n if (currentPlayers && currentPlayers.length) {\n containsPotentialParentTransition = true;\n } else {\n let /** @type {?} */ parent = element;\n while (parent = parent.parentNode) {\n const /** @type {?} */ triggers = engine.statesByElement.get(parent);\n if (triggers) {\n containsPotentialParentTransition = true;\n break;\n }\n }\n }\n }\n\n // at this stage we know that the element will either get removed\n // during flush or will be picked up by a parent query. Either way\n // we need to fire the listeners for this element when it DOES get\n // removed (once the query parent animation is done or after flush)\n const /** @type {?} */ listeners = this._elementListeners.get(element);\n if (listeners) {\n const /** @type {?} */ visitedTriggers = new Set();\n listeners.forEach(listener => {\n const /** @type {?} */ triggerName = listener.name;\n if (visitedTriggers.has(triggerName)) return;\n visitedTriggers.add(triggerName);\n\n const /** @type {?} */ trigger = this._triggers[triggerName];\n const /** @type {?} */ transition = trigger.fallbackTransition;\n const /** @type {?} */ elementStates = /** @type {?} */(( engine.statesByElement.get(element)));\n const /** @type {?} */ fromState = elementStates[triggerName] || DEFAULT_STATE_VALUE;\n const /** @type {?} */ toState = new StateValue(VOID_VALUE);\n const /** @type {?} */ player = new TransitionAnimationPlayer(this.id, triggerName, element);\n\n this._engine.totalQueuedPlayers++;\n this._queue.push({\n element,\n triggerName,\n transition,\n fromState,\n toState,\n player,\n isFallbackTransition: true\n });\n });\n }\n\n // whether or not a parent has an animation we need to delay the deferral of the leave\n // operation until we have more information (which we do after flush() has been called)\n if (containsPotentialParentTransition) {\n engine.markElementAsRemoved(this.id, element, false, context);\n } else {\n // we do this after the flush has occurred such\n // that the callbacks can be fired\n engine.afterFlush(() => this.clearElementCache(element));\n engine.destroyInnerAnimations(element);\n engine._onRemovalComplete(element, context);\n }\n }\n/**\n * @param {?} element\n * @param {?} parent\n * @return {?}\n */\ninsertNode(element: any, parent: any): void { addClass(element, this._hostClassName); }\n/**\n * @param {?} microtaskId\n * @return {?}\n */\ndrainQueuedTransitions(microtaskId: number): QueueInstruction[] {\n const /** @type {?} */ instructions: QueueInstruction[] = [];\n this._queue.forEach(entry => {\n const /** @type {?} */ player = entry.player;\n if (player.destroyed) return;\n\n const /** @type {?} */ element = entry.element;\n const /** @type {?} */ listeners = this._elementListeners.get(element);\n if (listeners) {\n listeners.forEach((listener: TriggerListener) => {\n if (listener.name == entry.triggerName) {\n const /** @type {?} */ baseEvent = makeAnimationEvent(\n element, entry.triggerName, entry.fromState.value, entry.toState.value);\n ( /** @type {?} */((baseEvent as any)))['_data'] = microtaskId;\n listenOnPlayer(entry.player, listener.phase, baseEvent, listener.callback);\n }\n });\n }\n\n if (player.markedForDestroy) {\n this._engine.afterFlush(() => {\n // now we can destroy the element properly since the event listeners have\n // been bound to the player\n player.destroy();\n });\n } else {\n instructions.push(entry);\n }\n });\n\n this._queue = [];\n\n return instructions.sort((a, b) => {\n // if depCount == 0 them move to front\n // otherwise if a contains b then move back\n const /** @type {?} */ d0 = a.transition.ast.depCount;\n const /** @type {?} */ d1 = b.transition.ast.depCount;\n if (d0 == 0 || d1 == 0) {\n return d0 - d1;\n }\n return this._engine.driver.containsElement(a.element, b.element) ? 1 : -1;\n });\n }\n/**\n * @param {?} context\n * @return {?}\n */\ndestroy(context: any) {\n this.players.forEach(p => p.destroy());\n this._destroyInnerNodes(this.hostElement, context);\n }\n/**\n * @param {?} element\n * @return {?}\n */\nelementContainsData(element: any): boolean {\n let /** @type {?} */ containsData = false;\n if (this._elementListeners.has(element)) containsData = true;\n containsData =\n (this._queue.find(entry => entry.element === element) ? true : false) || containsData;\n return containsData;\n }\n}\n\nfunction AnimationTransitionNamespace_tsickle_Closure_declarations() {\n/** @type {?} */\nAnimationTransitionNamespace.prototype.players;\n/** @type {?} */\nAnimationTransitionNamespace.prototype._triggers;\n/** @type {?} */\nAnimationTransitionNamespace.prototype._queue;\n/** @type {?} */\nAnimationTransitionNamespace.prototype._elementListeners;\n/** @type {?} */\nAnimationTransitionNamespace.prototype._hostClassName;\n/** @type {?} */\nAnimationTransitionNamespace.prototype.id;\n/** @type {?} */\nAnimationTransitionNamespace.prototype.hostElement;\n/** @type {?} */\nAnimationTransitionNamespace.prototype._engine;\n}\n\n\nexport interface QueuedTransition {\n element: any;\n instruction: AnimationTransitionInstruction;\n player: TransitionAnimationPlayer;\n}\nexport class TransitionAnimationEngine {\npublic players: TransitionAnimationPlayer[] = [];\npublic newHostElements = new Map();\npublic playersByElement = new Map();\npublic playersByQueriedElement = new Map();\npublic statesByElement = new Map();\npublic disabledNodes = new Set();\npublic totalAnimations = 0;\npublic totalQueuedPlayers = 0;\nprivate _namespaceLookup: {[id: string]: AnimationTransitionNamespace} = {};\nprivate _namespaceList: AnimationTransitionNamespace[] = [];\nprivate _flushFns: (() => any)[] = [];\nprivate _whenQuietFns: (() => any)[] = [];\npublic namespacesByHostElement = new Map();\npublic collectedEnterElements: any[] = [];\npublic collectedLeaveElements: any[] = [];\npublic onRemovalComplete = (element: any, context: any) => {};\n/**\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\n_onRemovalComplete(element: any, context: any) { this.onRemovalComplete(element, context); }\n/**\n * @param {?} driver\n * @param {?} _normalizer\n */\nconstructor(public driver: AnimationDriver,\nprivate _normalizer: AnimationStyleNormalizer) {}\n/**\n * @return {?}\n */\nget queuedPlayers(): TransitionAnimationPlayer[] {\n const /** @type {?} */ players: TransitionAnimationPlayer[] = [];\n this._namespaceList.forEach(ns => {\n ns.players.forEach(player => {\n if (player.queued) {\n players.push(player);\n }\n });\n });\n return players;\n }\n/**\n * @param {?} namespaceId\n * @param {?} hostElement\n * @return {?}\n */\ncreateNamespace(namespaceId: string, hostElement: any) {\n const /** @type {?} */ ns = new AnimationTransitionNamespace(namespaceId, hostElement, this);\n if (hostElement.parentNode) {\n this._balanceNamespaceList(ns, hostElement);\n } else {\n // defer this later until flush during when the host element has\n // been inserted so that we know exactly where to place it in\n // the namespace list\n this.newHostElements.set(hostElement, ns);\n\n // given that this host element is apart of the animation code, it\n // may or may not be inserted by a parent node that is an of an\n // animation renderer type. If this happens then we can still have\n // access to this item when we query for :enter nodes. If the parent\n // is a renderer then the set data-structure will normalize the entry\n this.collectEnterElement(hostElement);\n }\n return this._namespaceLookup[namespaceId] = ns;\n }\n/**\n * @param {?} ns\n * @param {?} hostElement\n * @return {?}\n */\nprivate _balanceNamespaceList(ns: AnimationTransitionNamespace, hostElement: any) {\n const /** @type {?} */ limit = this._namespaceList.length - 1;\n if (limit >= 0) {\n let /** @type {?} */ found = false;\n for (let /** @type {?} */ i = limit; i >= 0; i--) {\n const /** @type {?} */ nextNamespace = this._namespaceList[i];\n if (this.driver.containsElement(nextNamespace.hostElement, hostElement)) {\n this._namespaceList.splice(i + 1, 0, ns);\n found = true;\n break;\n }\n }\n if (!found) {\n this._namespaceList.splice(0, 0, ns);\n }\n } else {\n this._namespaceList.push(ns);\n }\n\n this.namespacesByHostElement.set(hostElement, ns);\n return ns;\n }\n/**\n * @param {?} namespaceId\n * @param {?} hostElement\n * @return {?}\n */\nregister(namespaceId: string, hostElement: any) {\n let /** @type {?} */ ns = this._namespaceLookup[namespaceId];\n if (!ns) {\n ns = this.createNamespace(namespaceId, hostElement);\n }\n return ns;\n }\n/**\n * @param {?} namespaceId\n * @param {?} name\n * @param {?} trigger\n * @return {?}\n */\nregisterTrigger(namespaceId: string, name: string, trigger: AnimationTrigger) {\n let /** @type {?} */ ns = this._namespaceLookup[namespaceId];\n if (ns && ns.register(name, trigger)) {\n this.totalAnimations++;\n }\n }\n/**\n * @param {?} namespaceId\n * @param {?} context\n * @return {?}\n */\ndestroy(namespaceId: string, context: any) {\n if (!namespaceId) return;\n\n const /** @type {?} */ ns = this._fetchNamespace(namespaceId);\n\n this.afterFlush(() => {\n this.namespacesByHostElement.delete(ns.hostElement);\n delete this._namespaceLookup[namespaceId];\n const /** @type {?} */ index = this._namespaceList.indexOf(ns);\n if (index >= 0) {\n this._namespaceList.splice(index, 1);\n }\n });\n\n this.afterFlushAnimationsDone(() => ns.destroy(context));\n }\n/**\n * @param {?} id\n * @return {?}\n */\nprivate _fetchNamespace(id: string) { return this._namespaceLookup[id]; }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @param {?} name\n * @param {?} value\n * @return {?}\n */\ntrigger(namespaceId: string, element: any, name: string, value: any): boolean {\n if (isElementNode(element)) {\n this._fetchNamespace(namespaceId).trigger(element, name, value);\n return true;\n }\n return false;\n }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @param {?} parent\n * @param {?} insertBefore\n * @return {?}\n */\ninsertNode(namespaceId: string, element: any, parent: any, insertBefore: boolean): void {\n if (!isElementNode(element)) return;\n\n // special case for when an element is removed and reinserted (move operation)\n // when this occurs we do not want to use the element for deletion later\n const /** @type {?} */ details = /** @type {?} */(( element[REMOVAL_FLAG] as ElementAnimationState));\n if (details && details.setForRemoval) {\n details.setForRemoval = false;\n }\n\n // in the event that the namespaceId is blank then the caller\n // code does not contain any animation code in it, but it is\n // just being called so that the node is marked as being inserted\n if (namespaceId) {\n this._fetchNamespace(namespaceId).insertNode(element, parent);\n }\n\n // only *directives and host elements are inserted before\n if (insertBefore) {\n this.collectEnterElement(element);\n }\n }\n/**\n * @param {?} element\n * @return {?}\n */\ncollectEnterElement(element: any) { this.collectedEnterElements.push(element); }\n/**\n * @param {?} element\n * @param {?} value\n * @return {?}\n */\nmarkElementAsDisabled(element: any, value: boolean) {\n if (value) {\n if (!this.disabledNodes.has(element)) {\n this.disabledNodes.add(element);\n addClass(element, DISABLED_CLASSNAME);\n }\n } else if (this.disabledNodes.has(element)) {\n this.disabledNodes.delete(element);\n removeClass(element, DISABLED_CLASSNAME);\n }\n }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @param {?} context\n * @param {?=} doNotRecurse\n * @return {?}\n */\nremoveNode(namespaceId: string, element: any, context: any, doNotRecurse?: boolean): void {\n if (!isElementNode(element)) {\n this._onRemovalComplete(element, context);\n return;\n }\n\n const /** @type {?} */ ns = namespaceId ? this._fetchNamespace(namespaceId) : null;\n if (ns) {\n ns.removeNode(element, context, doNotRecurse);\n } else {\n this.markElementAsRemoved(namespaceId, element, false, context);\n }\n }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @param {?=} hasAnimation\n * @param {?=} context\n * @return {?}\n */\nmarkElementAsRemoved(namespaceId: string, element: any, hasAnimation?: boolean, context?: any) {\n this.collectedLeaveElements.push(element);\n element[REMOVAL_FLAG] = {\n namespaceId,\n setForRemoval: context, hasAnimation,\n removedBeforeQueried: false\n };\n }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @param {?} name\n * @param {?} phase\n * @param {?} callback\n * @return {?}\n */\nlisten(\n namespaceId: string, element: any, name: string, phase: string,\n callback: (event: any) => boolean): () => any {\n if (isElementNode(element)) {\n return this._fetchNamespace(namespaceId).listen(element, name, phase, callback);\n }\n return () => {};\n }\n/**\n * @param {?} entry\n * @param {?} subTimelines\n * @return {?}\n */\nprivate _buildInstruction(entry: QueueInstruction, subTimelines: ElementInstructionMap) {\n return entry.transition.build(\n this.driver, entry.element, entry.fromState.value, entry.toState.value,\n entry.fromState.options, entry.toState.options, subTimelines);\n }\n/**\n * @param {?} containerElement\n * @return {?}\n */\ndestroyInnerAnimations(containerElement: any) {\n let /** @type {?} */ elements = this.driver.query(containerElement, NG_TRIGGER_SELECTOR, true);\n elements.forEach(element => {\n const /** @type {?} */ players = this.playersByElement.get(element);\n if (players) {\n players.forEach(player => {\n // special case for when an element is set for destruction, but hasn't started.\n // in this situation we want to delay the destruction until the flush occurs\n // so that any event listeners attached to the player are triggered.\n if (player.queued) {\n player.markedForDestroy = true;\n } else {\n player.destroy();\n }\n });\n }\n const /** @type {?} */ stateMap = this.statesByElement.get(element);\n if (stateMap) {\n Object.keys(stateMap).forEach(triggerName => stateMap[triggerName] = DELETED_STATE_VALUE);\n }\n });\n\n if (this.playersByQueriedElement.size == 0) return;\n\n elements = this.driver.query(containerElement, NG_ANIMATING_SELECTOR, true);\n if (elements.length) {\n elements.forEach(element => {\n const /** @type {?} */ players = this.playersByQueriedElement.get(element);\n if (players) {\n players.forEach(player => player.finish());\n }\n });\n }\n }\n/**\n * @return {?}\n */\nwhenRenderingDone(): Promise {\n return new Promise(resolve => {\n if (this.players.length) {\n return optimizeGroupPlayer(this.players).onDone(() => resolve());\n } else {\n resolve();\n }\n });\n }\n/**\n * @param {?} element\n * @return {?}\n */\nprocessLeaveNode(element: any) {\n const /** @type {?} */ details = /** @type {?} */(( element[REMOVAL_FLAG] as ElementAnimationState));\n if (details && details.setForRemoval) {\n // this will prevent it from removing it twice\n element[REMOVAL_FLAG] = NULL_REMOVAL_STATE;\n if (details.namespaceId) {\n this.destroyInnerAnimations(element);\n const /** @type {?} */ ns = this._fetchNamespace(details.namespaceId);\n if (ns) {\n ns.clearElementCache(element);\n }\n }\n this._onRemovalComplete(element, details.setForRemoval);\n }\n\n if (this.driver.matchesElement(element, DISABLED_SELECTOR)) {\n this.markElementAsDisabled(element, false);\n }\n\n this.driver.query(element, DISABLED_SELECTOR, true).forEach(node => {\n this.markElementAsDisabled(element, false);\n });\n }\n/**\n * @param {?=} microtaskId\n * @return {?}\n */\nflush(microtaskId: number = -1) {\n let /** @type {?} */ players: AnimationPlayer[] = [];\n if (this.newHostElements.size) {\n this.newHostElements.forEach((ns, element) => this._balanceNamespaceList(ns, element));\n this.newHostElements.clear();\n }\n\n if (this._namespaceList.length &&\n (this.totalQueuedPlayers || this.collectedLeaveElements.length)) {\n const /** @type {?} */ cleanupFns: Function[] = [];\n try {\n players = this._flushAnimations(cleanupFns, microtaskId);\n } finally {\n for (let /** @type {?} */ i = 0; i < cleanupFns.length; i++) {\n cleanupFns[i]();\n }\n }\n } else {\n for (let /** @type {?} */ i = 0; i < this.collectedLeaveElements.length; i++) {\n const /** @type {?} */ element = this.collectedLeaveElements[i];\n this.processLeaveNode(element);\n }\n }\n\n this.totalQueuedPlayers = 0;\n this.collectedEnterElements.length = 0;\n this.collectedLeaveElements.length = 0;\n this._flushFns.forEach(fn => fn());\n this._flushFns = [];\n\n if (this._whenQuietFns.length) {\n // we move these over to a variable so that\n // if any new callbacks are registered in another\n // flush they do not populate the existing set\n const /** @type {?} */ quietFns = this._whenQuietFns;\n this._whenQuietFns = [];\n\n if (players.length) {\n optimizeGroupPlayer(players).onDone(() => { quietFns.forEach(fn => fn()); });\n } else {\n quietFns.forEach(fn => fn());\n }\n }\n }\n/**\n * @param {?} errors\n * @return {?}\n */\nreportError(errors: string[]) {\n throw new Error(\n `Unable to process animations due to the following failed trigger transitions\\n ${\n errors.join('\\n')}`);\n }\n/**\n * @param {?} cleanupFns\n * @param {?} microtaskId\n * @return {?}\n */\nprivate _flushAnimations(cleanupFns: Function[], microtaskId: number):\n TransitionAnimationPlayer[] {\n const /** @type {?} */ subTimelines = new ElementInstructionMap();\n const /** @type {?} */ skippedPlayers: TransitionAnimationPlayer[] = [];\n const /** @type {?} */ skippedPlayersMap = new Map();\n const /** @type {?} */ queuedInstructions: QueuedTransition[] = [];\n const /** @type {?} */ queriedElements = new Map();\n const /** @type {?} */ allPreStyleElements = new Map>();\n const /** @type {?} */ allPostStyleElements = new Map>();\n\n const /** @type {?} */ disabledElementsSet = new Set();\n this.disabledNodes.forEach(node => {\n disabledElementsSet.add(node);\n const /** @type {?} */ nodesThatAreDisabled = this.driver.query(node, QUEUED_SELECTOR, true);\n for (let /** @type {?} */ i = 0; i < nodesThatAreDisabled.length; i++) {\n disabledElementsSet.add(nodesThatAreDisabled[i]);\n }\n });\n\n const /** @type {?} */ bodyNode = getBodyNode();\n const /** @type {?} */ allEnterNodes: any[] = this.collectedEnterElements.length ?\n this.collectedEnterElements.filter(createIsRootFilterFn(this.collectedEnterElements)) :\n [];\n\n // this must occur before the instructions are built below such that\n // the :enter queries match the elements (since the timeline queries\n // are fired during instruction building).\n for (let /** @type {?} */ i = 0; i < allEnterNodes.length; i++) {\n addClass(allEnterNodes[i], ENTER_CLASSNAME);\n }\n\n const /** @type {?} */ allLeaveNodes: any[] = [];\n const /** @type {?} */ leaveNodesWithoutAnimations = new Set();\n for (let /** @type {?} */ i = 0; i < this.collectedLeaveElements.length; i++) {\n const /** @type {?} */ element = this.collectedLeaveElements[i];\n const /** @type {?} */ details = /** @type {?} */(( element[REMOVAL_FLAG] as ElementAnimationState));\n if (details && details.setForRemoval) {\n addClass(element, LEAVE_CLASSNAME);\n allLeaveNodes.push(element);\n if (!details.hasAnimation) {\n leaveNodesWithoutAnimations.add(element);\n }\n }\n }\n\n cleanupFns.push(() => {\n allEnterNodes.forEach(element => removeClass(element, ENTER_CLASSNAME));\n allLeaveNodes.forEach(element => {\n removeClass(element, LEAVE_CLASSNAME);\n this.processLeaveNode(element);\n });\n });\n\n const /** @type {?} */ allPlayers: TransitionAnimationPlayer[] = [];\n const /** @type {?} */ erroneousTransitions: AnimationTransitionInstruction[] = [];\n for (let /** @type {?} */ i = this._namespaceList.length - 1; i >= 0; i--) {\n const /** @type {?} */ ns = this._namespaceList[i];\n ns.drainQueuedTransitions(microtaskId).forEach(entry => {\n const /** @type {?} */ player = entry.player;\n allPlayers.push(player);\n\n const /** @type {?} */ element = entry.element;\n if (!bodyNode || !this.driver.containsElement(bodyNode, element)) {\n player.destroy();\n return;\n }\n\n const /** @type {?} */ instruction = /** @type {?} */(( this._buildInstruction(entry, subTimelines)));\n if (instruction.errors && instruction.errors.length) {\n erroneousTransitions.push(instruction);\n return;\n }\n\n // if a unmatched transition is queued to go then it SHOULD NOT render\n // an animation and cancel the previously running animations.\n if (entry.isFallbackTransition) {\n player.onStart(() => eraseStyles(element, instruction.fromStyles));\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n skippedPlayers.push(player);\n return;\n }\n\n // this means that if a parent animation uses this animation as a sub trigger\n // then it will instruct the timeline builder to not add a player delay, but\n // instead stretch the first keyframe gap up until the animation starts. The\n // reason this is important is to prevent extra initialization styles from being\n // required by the user in the animation.\n instruction.timelines.forEach(tl => tl.stretchStartingKeyframe = true);\n\n subTimelines.append(element, instruction.timelines);\n\n const /** @type {?} */ tuple = {instruction, player, element};\n\n queuedInstructions.push(tuple);\n\n instruction.queriedElements.forEach(\n element => getOrSetAsInMap(queriedElements, element, []).push(player));\n\n instruction.preStyleProps.forEach((stringMap, element) => {\n const /** @type {?} */ props = Object.keys(stringMap);\n if (props.length) {\n let /** @type {?} */ setVal: Set = /** @type {?} */(( allPreStyleElements.get(element)));\n if (!setVal) {\n allPreStyleElements.set(element, setVal = new Set());\n }\n props.forEach(prop => setVal.add(prop));\n }\n });\n\n instruction.postStyleProps.forEach((stringMap, element) => {\n const /** @type {?} */ props = Object.keys(stringMap);\n let /** @type {?} */ setVal: Set = /** @type {?} */(( allPostStyleElements.get(element)));\n if (!setVal) {\n allPostStyleElements.set(element, setVal = new Set());\n }\n props.forEach(prop => setVal.add(prop));\n });\n });\n }\n\n if (erroneousTransitions.length) {\n const /** @type {?} */ errors: string[] = [];\n erroneousTransitions.forEach(instruction => {\n errors.push(`@${instruction.triggerName} has failed due to:\\n`); /** @type {?} */((\n instruction.errors)).forEach(error => errors.push(`- ${error}\\n`));\n });\n\n allPlayers.forEach(player => player.destroy());\n this.reportError(errors);\n }\n\n // these can only be detected here since we have a map of all the elements\n // that have animations attached to them... We use a set here in the event\n // multiple enter captures on the same element were caught in different\n // renderer namespaces (e.g. when a @trigger was on a host binding that had *ngIf)\n const /** @type {?} */ enterNodesWithoutAnimations = new Set();\n for (let /** @type {?} */ i = 0; i < allEnterNodes.length; i++) {\n const /** @type {?} */ element = allEnterNodes[i];\n if (!subTimelines.has(element)) {\n enterNodesWithoutAnimations.add(element);\n }\n }\n\n const /** @type {?} */ allPreviousPlayersMap = new Map();\n let /** @type {?} */ sortedParentElements: any[] = [];\n queuedInstructions.forEach(entry => {\n const /** @type {?} */ element = entry.element;\n if (subTimelines.has(element)) {\n sortedParentElements.unshift(element);\n this._beforeAnimationBuild(\n entry.player.namespaceId, entry.instruction, allPreviousPlayersMap);\n }\n });\n\n skippedPlayers.forEach(player => {\n const /** @type {?} */ element = player.element;\n const /** @type {?} */ previousPlayers =\n this._getPreviousPlayers(element, false, player.namespaceId, player.triggerName, null);\n previousPlayers.forEach(prevPlayer => {\n getOrSetAsInMap(allPreviousPlayersMap, element, []).push(prevPlayer);\n prevPlayer.destroy();\n });\n });\n\n // this is a special case for nodes that will be removed (either by)\n // having their own leave animations or by being queried in a container\n // that will be removed once a parent animation is complete. The idea\n // here is that * styles must be identical to ! styles because of\n // backwards compatibility (* is also filled in by default in many places).\n // Otherwise * styles will return an empty value or auto since the element\n // that is being getComputedStyle'd will not be visible (since * = destination)\n const /** @type {?} */ replaceNodes = allLeaveNodes.filter(node => {\n return replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements);\n });\n\n // POST STAGE: fill the * styles\n const [postStylesMap, allLeaveQueriedNodes] = cloakAndComputeStyles(\n this.driver, leaveNodesWithoutAnimations, allPostStyleElements, AUTO_STYLE);\n\n allLeaveQueriedNodes.forEach(node => {\n if (replacePostStylesAsPre(node, allPreStyleElements, allPostStyleElements)) {\n replaceNodes.push(node);\n }\n });\n\n // PRE STAGE: fill the ! styles\n const [preStylesMap] = allPreStyleElements.size ?\n cloakAndComputeStyles(\n this.driver, enterNodesWithoutAnimations, allPreStyleElements, PRE_STYLE) :\n [new Map()];\n\n replaceNodes.forEach(node => {\n const /** @type {?} */ post = postStylesMap.get(node);\n const /** @type {?} */ pre = preStylesMap.get(node);\n postStylesMap.set(node, /** @type {?} */(( { ...post, ...pre } as any)));\n });\n\n const /** @type {?} */ rootPlayers: TransitionAnimationPlayer[] = [];\n const /** @type {?} */ subPlayers: TransitionAnimationPlayer[] = [];\n queuedInstructions.forEach(entry => {\n const {element, player, instruction} = entry;\n // this means that it was never consumed by a parent animation which\n // means that it is independent and therefore should be set for animation\n if (subTimelines.has(element)) {\n if (disabledElementsSet.has(element)) {\n skippedPlayers.push(player);\n return;\n }\n\n const /** @type {?} */ innerPlayer = this._buildAnimation(\n player.namespaceId, instruction, allPreviousPlayersMap, skippedPlayersMap, preStylesMap,\n postStylesMap);\n player.setRealPlayer(innerPlayer);\n\n let /** @type {?} */ parentHasPriority: any = null;\n for (let /** @type {?} */ i = 0; i < sortedParentElements.length; i++) {\n const /** @type {?} */ parent = sortedParentElements[i];\n if (parent === element) break;\n if (this.driver.containsElement(parent, element)) {\n parentHasPriority = parent;\n break;\n }\n }\n\n if (parentHasPriority) {\n const /** @type {?} */ parentPlayers = this.playersByElement.get(parentHasPriority);\n if (parentPlayers && parentPlayers.length) {\n player.parentPlayer = optimizeGroupPlayer(parentPlayers);\n }\n skippedPlayers.push(player);\n } else {\n rootPlayers.push(player);\n }\n } else {\n eraseStyles(element, instruction.fromStyles);\n player.onDestroy(() => setStyles(element, instruction.toStyles));\n // there still might be a ancestor player animating this\n // element therefore we will still add it as a sub player\n // even if its animation may be disabled\n subPlayers.push(player);\n if (disabledElementsSet.has(element)) {\n skippedPlayers.push(player);\n }\n }\n });\n\n // find all of the sub players' corresponding inner animation player\n subPlayers.forEach(player => {\n // even if any players are not found for a sub animation then it\n // will still complete itself after the next tick since it's Noop\n const /** @type {?} */ playersForElement = skippedPlayersMap.get(player.element);\n if (playersForElement && playersForElement.length) {\n const /** @type {?} */ innerPlayer = optimizeGroupPlayer(playersForElement);\n player.setRealPlayer(innerPlayer);\n }\n });\n\n // the reason why we don't actually play the animation is\n // because all that a skipped player is designed to do is to\n // fire the start/done transition callback events\n skippedPlayers.forEach(player => {\n if (player.parentPlayer) {\n player.parentPlayer.onDestroy(() => player.destroy());\n } else {\n player.destroy();\n }\n });\n\n // run through all of the queued removals and see if they\n // were picked up by a query. If not then perform the removal\n // operation right away unless a parent animation is ongoing.\n for (let /** @type {?} */ i = 0; i < allLeaveNodes.length; i++) {\n const /** @type {?} */ element = allLeaveNodes[i];\n const /** @type {?} */ details = /** @type {?} */(( element[REMOVAL_FLAG] as ElementAnimationState));\n removeClass(element, LEAVE_CLASSNAME);\n\n // this means the element has a removal animation that is being\n // taken care of and therefore the inner elements will hang around\n // until that animation is over (or the parent queried animation)\n if (details && details.hasAnimation) continue;\n\n let /** @type {?} */ players: TransitionAnimationPlayer[] = [];\n\n // if this element is queried or if it contains queried children\n // then we want for the element not to be removed from the page\n // until the queried animations have finished\n if (queriedElements.size) {\n let /** @type {?} */ queriedPlayerResults = queriedElements.get(element);\n if (queriedPlayerResults && queriedPlayerResults.length) {\n players.push(...queriedPlayerResults);\n }\n\n let /** @type {?} */ queriedInnerElements = this.driver.query(element, NG_ANIMATING_SELECTOR, true);\n for (let /** @type {?} */ j = 0; j < queriedInnerElements.length; j++) {\n let /** @type {?} */ queriedPlayers = queriedElements.get(queriedInnerElements[j]);\n if (queriedPlayers && queriedPlayers.length) {\n players.push(...queriedPlayers);\n }\n }\n }\n\n const /** @type {?} */ activePlayers = players.filter(p => !p.destroyed);\n if (activePlayers.length) {\n removeNodesAfterAnimationDone(this, element, activePlayers);\n } else {\n this.processLeaveNode(element);\n }\n }\n\n // this is required so the cleanup method doesn't remove them\n allLeaveNodes.length = 0;\n\n rootPlayers.forEach(player => {\n this.players.push(player);\n player.onDone(() => {\n player.destroy();\n\n const /** @type {?} */ index = this.players.indexOf(player);\n this.players.splice(index, 1);\n });\n player.play();\n });\n\n return rootPlayers;\n }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @return {?}\n */\nelementContainsData(namespaceId: string, element: any) {\n let /** @type {?} */ containsData = false;\n const /** @type {?} */ details = /** @type {?} */(( element[REMOVAL_FLAG] as ElementAnimationState));\n if (details && details.setForRemoval) containsData = true;\n if (this.playersByElement.has(element)) containsData = true;\n if (this.playersByQueriedElement.has(element)) containsData = true;\n if (this.statesByElement.has(element)) containsData = true;\n return this._fetchNamespace(namespaceId).elementContainsData(element) || containsData;\n }\n/**\n * @param {?} callback\n * @return {?}\n */\nafterFlush(callback: () => any) { this._flushFns.push(callback); }\n/**\n * @param {?} callback\n * @return {?}\n */\nafterFlushAnimationsDone(callback: () => any) { this._whenQuietFns.push(callback); }\n/**\n * @param {?} element\n * @param {?} isQueriedElement\n * @param {?=} namespaceId\n * @param {?=} triggerName\n * @param {?=} toStateValue\n * @return {?}\n */\nprivate _getPreviousPlayers(\n element: string, isQueriedElement: boolean, namespaceId?: string, triggerName?: string,\n toStateValue?: any): TransitionAnimationPlayer[] {\n let /** @type {?} */ players: TransitionAnimationPlayer[] = [];\n if (isQueriedElement) {\n const /** @type {?} */ queriedElementPlayers = this.playersByQueriedElement.get(element);\n if (queriedElementPlayers) {\n players = queriedElementPlayers;\n }\n } else {\n const /** @type {?} */ elementPlayers = this.playersByElement.get(element);\n if (elementPlayers) {\n const /** @type {?} */ isRemovalAnimation = !toStateValue || toStateValue == VOID_VALUE;\n elementPlayers.forEach(player => {\n if (player.queued) return;\n if (!isRemovalAnimation && player.triggerName != triggerName) return;\n players.push(player);\n });\n }\n }\n if (namespaceId || triggerName) {\n players = players.filter(player => {\n if (namespaceId && namespaceId != player.namespaceId) return false;\n if (triggerName && triggerName != player.triggerName) return false;\n return true;\n });\n }\n return players;\n }\n/**\n * @param {?} namespaceId\n * @param {?} instruction\n * @param {?} allPreviousPlayersMap\n * @return {?}\n */\nprivate _beforeAnimationBuild(\n namespaceId: string, instruction: AnimationTransitionInstruction,\n allPreviousPlayersMap: Map) {\n const /** @type {?} */ triggerName = instruction.triggerName;\n const /** @type {?} */ rootElement = instruction.element;\n\n // when a removal animation occurs, ALL previous players are collected\n // and destroyed (even if they are outside of the current namespace)\n const /** @type {?} */ targetNameSpaceId: string|undefined =\n instruction.isRemovalTransition ? undefined : namespaceId;\n const /** @type {?} */ targetTriggerName: string|undefined =\n instruction.isRemovalTransition ? undefined : triggerName;\n\n instruction.timelines.map(timelineInstruction => {\n const /** @type {?} */ element = timelineInstruction.element;\n const /** @type {?} */ isQueriedElement = element !== rootElement;\n const /** @type {?} */ players = getOrSetAsInMap(allPreviousPlayersMap, element, []);\n const /** @type {?} */ previousPlayers = this._getPreviousPlayers(\n element, isQueriedElement, targetNameSpaceId, targetTriggerName, instruction.toState);\n previousPlayers.forEach(player => {\n const /** @type {?} */ realPlayer = /** @type {?} */(( player.getRealPlayer() as any));\n if (realPlayer.beforeDestroy) {\n realPlayer.beforeDestroy();\n }\n player.destroy();\n players.push(player);\n });\n });\n\n // this needs to be done so that the PRE/POST styles can be\n // computed properly without interfering with the previous animation\n eraseStyles(rootElement, instruction.fromStyles);\n }\n/**\n * @param {?} namespaceId\n * @param {?} instruction\n * @param {?} allPreviousPlayersMap\n * @param {?} skippedPlayersMap\n * @param {?} preStylesMap\n * @param {?} postStylesMap\n * @return {?}\n */\nprivate _buildAnimation(\n namespaceId: string, instruction: AnimationTransitionInstruction,\n allPreviousPlayersMap: Map,\n skippedPlayersMap: Map, preStylesMap: Map,\n postStylesMap: Map): AnimationPlayer {\n const /** @type {?} */ triggerName = instruction.triggerName;\n const /** @type {?} */ rootElement = instruction.element;\n\n // we first run this so that the previous animation player\n // data can be passed into the successive animation players\n const /** @type {?} */ allQueriedPlayers: TransitionAnimationPlayer[] = [];\n const /** @type {?} */ allConsumedElements = new Set();\n const /** @type {?} */ allSubElements = new Set();\n const /** @type {?} */ allNewPlayers = instruction.timelines.map(timelineInstruction => {\n const /** @type {?} */ element = timelineInstruction.element;\n allConsumedElements.add(element);\n\n // FIXME (matsko): make sure to-be-removed animations are removed properly\n const /** @type {?} */ details = element[REMOVAL_FLAG];\n if (details && details.removedBeforeQueried) return new NoopAnimationPlayer();\n\n const /** @type {?} */ isQueriedElement = element !== rootElement;\n const /** @type {?} */ previousPlayers =\n flattenGroupPlayers((allPreviousPlayersMap.get(element) || EMPTY_PLAYER_ARRAY)\n .map(p => p.getRealPlayer()))\n .filter(p => {\n // the `element` is not apart of the AnimationPlayer definition, but\n // Mock/WebAnimations\n // use the element within their implementation. This will be added in Angular5 to\n // AnimationPlayer\n const /** @type {?} */ pp = /** @type {?} */(( p as any));\n return pp.element ? pp.element === element : false;\n });\n\n const /** @type {?} */ preStyles = preStylesMap.get(element);\n const /** @type {?} */ postStyles = postStylesMap.get(element);\n const /** @type {?} */ keyframes = normalizeKeyframes(\n this.driver, this._normalizer, element, timelineInstruction.keyframes, preStyles,\n postStyles);\n const /** @type {?} */ player = this._buildPlayer(timelineInstruction, keyframes, previousPlayers);\n\n // this means that this particular player belongs to a sub trigger. It is\n // important that we match this player up with the corresponding (@trigger.listener)\n if (timelineInstruction.subTimeline && skippedPlayersMap) {\n allSubElements.add(element);\n }\n\n if (isQueriedElement) {\n const /** @type {?} */ wrappedPlayer = new TransitionAnimationPlayer(namespaceId, triggerName, element);\n wrappedPlayer.setRealPlayer(player);\n allQueriedPlayers.push(wrappedPlayer);\n }\n\n return player;\n });\n\n allQueriedPlayers.forEach(player => {\n getOrSetAsInMap(this.playersByQueriedElement, player.element, []).push(player);\n player.onDone(() => deleteOrUnsetInMap(this.playersByQueriedElement, player.element, player));\n });\n\n allConsumedElements.forEach(element => addClass(element, NG_ANIMATING_CLASSNAME));\n const /** @type {?} */ player = optimizeGroupPlayer(allNewPlayers);\n player.onDestroy(() => {\n allConsumedElements.forEach(element => removeClass(element, NG_ANIMATING_CLASSNAME));\n setStyles(rootElement, instruction.toStyles);\n });\n\n // this basically makes all of the callbacks for sub element animations\n // be dependent on the upper players for when they finish\n allSubElements.forEach(\n element => { getOrSetAsInMap(skippedPlayersMap, element, []).push(player); });\n\n return player;\n }\n/**\n * @param {?} instruction\n * @param {?} keyframes\n * @param {?} previousPlayers\n * @return {?}\n */\nprivate _buildPlayer(\n instruction: AnimationTimelineInstruction, keyframes: ɵStyleData[],\n previousPlayers: AnimationPlayer[]): AnimationPlayer {\n if (keyframes.length > 0) {\n return this.driver.animate(\n instruction.element, keyframes, instruction.duration, instruction.delay,\n instruction.easing, previousPlayers);\n }\n\n // special case for when an empty transition|definition is provided\n // ... there is no point in rendering an empty animation\n return new NoopAnimationPlayer();\n }\n}\n\nfunction TransitionAnimationEngine_tsickle_Closure_declarations() {\n/** @type {?} */\nTransitionAnimationEngine.prototype.players;\n/** @type {?} */\nTransitionAnimationEngine.prototype.newHostElements;\n/** @type {?} */\nTransitionAnimationEngine.prototype.playersByElement;\n/** @type {?} */\nTransitionAnimationEngine.prototype.playersByQueriedElement;\n/** @type {?} */\nTransitionAnimationEngine.prototype.statesByElement;\n/** @type {?} */\nTransitionAnimationEngine.prototype.disabledNodes;\n/** @type {?} */\nTransitionAnimationEngine.prototype.totalAnimations;\n/** @type {?} */\nTransitionAnimationEngine.prototype.totalQueuedPlayers;\n/** @type {?} */\nTransitionAnimationEngine.prototype._namespaceLookup;\n/** @type {?} */\nTransitionAnimationEngine.prototype._namespaceList;\n/** @type {?} */\nTransitionAnimationEngine.prototype._flushFns;\n/** @type {?} */\nTransitionAnimationEngine.prototype._whenQuietFns;\n/** @type {?} */\nTransitionAnimationEngine.prototype.namespacesByHostElement;\n/** @type {?} */\nTransitionAnimationEngine.prototype.collectedEnterElements;\n/** @type {?} */\nTransitionAnimationEngine.prototype.collectedLeaveElements;\n/** @type {?} */\nTransitionAnimationEngine.prototype.onRemovalComplete;\n/** @type {?} */\nTransitionAnimationEngine.prototype.driver;\n/** @type {?} */\nTransitionAnimationEngine.prototype._normalizer;\n}\n\nexport class TransitionAnimationPlayer implements AnimationPlayer {\nprivate _player: AnimationPlayer = new NoopAnimationPlayer();\nprivate _containsRealPlayer = false;\nprivate _queuedCallbacks: {[name: string]: (() => any)[]} = {};\nprivate _destroyed = false;\npublic parentPlayer: AnimationPlayer;\npublic markedForDestroy: boolean = false;\n/**\n * @param {?} namespaceId\n * @param {?} triggerName\n * @param {?} element\n */\nconstructor(public namespaceId: string,\npublic triggerName: string,\npublic element: any) {}\n/**\n * @return {?}\n */\nget queued() { return this._containsRealPlayer == false; }\n/**\n * @return {?}\n */\nget destroyed() { return this._destroyed; }\n/**\n * @param {?} player\n * @return {?}\n */\nsetRealPlayer(player: AnimationPlayer) {\n if (this._containsRealPlayer) return;\n\n this._player = player;\n Object.keys(this._queuedCallbacks).forEach(phase => {\n this._queuedCallbacks[phase].forEach(\n callback => listenOnPlayer(player, phase, undefined, callback));\n });\n this._queuedCallbacks = {};\n this._containsRealPlayer = true;\n }\n/**\n * @return {?}\n */\ngetRealPlayer() { return this._player; }\n/**\n * @param {?} name\n * @param {?} callback\n * @return {?}\n */\nprivate _queueEvent(name: string, callback: (event: any) => any): void {\n getOrSetAsInMap(this._queuedCallbacks, name, []).push(callback);\n }\n/**\n * @param {?} fn\n * @return {?}\n */\nonDone(fn: () => void): void {\n if (this.queued) {\n this._queueEvent('done', fn);\n }\n this._player.onDone(fn);\n }\n/**\n * @param {?} fn\n * @return {?}\n */\nonStart(fn: () => void): void {\n if (this.queued) {\n this._queueEvent('start', fn);\n }\n this._player.onStart(fn);\n }\n/**\n * @param {?} fn\n * @return {?}\n */\nonDestroy(fn: () => void): void {\n if (this.queued) {\n this._queueEvent('destroy', fn);\n }\n this._player.onDestroy(fn);\n }\n/**\n * @return {?}\n */\ninit(): void { this._player.init(); }\n/**\n * @return {?}\n */\nhasStarted(): boolean { return this.queued ? false : this._player.hasStarted(); }\n/**\n * @return {?}\n */\nplay(): void { !this.queued && this._player.play(); }\n/**\n * @return {?}\n */\npause(): void { !this.queued && this._player.pause(); }\n/**\n * @return {?}\n */\nrestart(): void { !this.queued && this._player.restart(); }\n/**\n * @return {?}\n */\nfinish(): void { this._player.finish(); }\n/**\n * @return {?}\n */\ndestroy(): void {\n this._destroyed = true;\n this._player.destroy();\n }\n/**\n * @return {?}\n */\nreset(): void { !this.queued && this._player.reset(); }\n/**\n * @param {?} p\n * @return {?}\n */\nsetPosition(p: any): void {\n if (!this.queued) {\n this._player.setPosition(p);\n }\n }\n/**\n * @return {?}\n */\ngetPosition(): number { return this.queued ? 0 : this._player.getPosition(); }\n/**\n * @return {?}\n */\nget totalTime(): number { return this._player.totalTime; }\n}\n\nfunction TransitionAnimationPlayer_tsickle_Closure_declarations() {\n/** @type {?} */\nTransitionAnimationPlayer.prototype._player;\n/** @type {?} */\nTransitionAnimationPlayer.prototype._containsRealPlayer;\n/** @type {?} */\nTransitionAnimationPlayer.prototype._queuedCallbacks;\n/** @type {?} */\nTransitionAnimationPlayer.prototype._destroyed;\n/** @type {?} */\nTransitionAnimationPlayer.prototype.parentPlayer;\n/** @type {?} */\nTransitionAnimationPlayer.prototype.markedForDestroy;\n/** @type {?} */\nTransitionAnimationPlayer.prototype.namespaceId;\n/** @type {?} */\nTransitionAnimationPlayer.prototype.triggerName;\n/** @type {?} */\nTransitionAnimationPlayer.prototype.element;\n}\n\n/**\n * @param {?} map\n * @param {?} key\n * @param {?} value\n * @return {?}\n */\nfunction deleteOrUnsetInMap(map: Map| {[key: string]: any}, key: any, value: any) {\n let /** @type {?} */ currentValues: any[]|null|undefined;\n if (map instanceof Map) {\n currentValues = map.get(key);\n if (currentValues) {\n if (currentValues.length) {\n const /** @type {?} */ index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n map.delete(key);\n }\n }\n } else {\n currentValues = map[key];\n if (currentValues) {\n if (currentValues.length) {\n const /** @type {?} */ index = currentValues.indexOf(value);\n currentValues.splice(index, 1);\n }\n if (currentValues.length == 0) {\n delete map[key];\n }\n }\n }\n return currentValues;\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction normalizeTriggerValue(value: any): any {\n // we use `!= null` here because it's the most simple\n // way to test against a \"falsy\" value without mixing\n // in empty strings or a zero value. DO NOT OPTIMIZE.\n return value != null ? value : null;\n}\n/**\n * @param {?} node\n * @return {?}\n */\nfunction isElementNode(node: any) {\n return node && node['nodeType'] === 1;\n}\n/**\n * @param {?} eventName\n * @return {?}\n */\nfunction isTriggerEventValid(eventName: string): boolean {\n return eventName == 'start' || eventName == 'done';\n}\n/**\n * @param {?} element\n * @param {?=} value\n * @return {?}\n */\nfunction cloakElement(element: any, value?: string) {\n const /** @type {?} */ oldValue = element.style.display;\n element.style.display = value != null ? value : 'none';\n return oldValue;\n}\n/**\n * @param {?} driver\n * @param {?} elements\n * @param {?} elementPropsMap\n * @param {?} defaultStyle\n * @return {?}\n */\nfunction cloakAndComputeStyles(\n driver: AnimationDriver, elements: Set, elementPropsMap: Map>,\n defaultStyle: string): [Map, any[]] {\n const /** @type {?} */ cloakVals: string[] = [];\n elements.forEach(element => cloakVals.push(cloakElement(element)));\n\n const /** @type {?} */ valuesMap = new Map();\n const /** @type {?} */ failedElements: any[] = [];\n\n elementPropsMap.forEach((props: Set, element: any) => {\n const /** @type {?} */ styles: ɵStyleData = {};\n props.forEach(prop => {\n const /** @type {?} */ value = styles[prop] = driver.computeStyle(element, prop, defaultStyle);\n\n // there is no easy way to detect this because a sub element could be removed\n // by a parent animation element being detached.\n if (!value || value.length == 0) {\n element[REMOVAL_FLAG] = NULL_REMOVED_QUERIED_STATE;\n failedElements.push(element);\n }\n });\n valuesMap.set(element, styles);\n });\n\n // we use a index variable here since Set.forEach(a, i) does not return\n // an index value for the closure (but instead just the value)\n let /** @type {?} */ i = 0;\n elements.forEach(element => cloakElement(element, cloakVals[i++]));\n return [valuesMap, failedElements];\n}\n/**\n * @param {?} nodes\n * @return {?}\n */\nfunction createIsRootFilterFn(nodes: any): (node: any) => boolean {\n const /** @type {?} */ nodeSet = new Set(nodes);\n const /** @type {?} */ knownRootContainer = new Set();\n let /** @type {?} */ isRoot: (node: any) => boolean;\n isRoot = node => {\n if (!node) return true;\n if (nodeSet.has(node.parentNode)) return false;\n if (knownRootContainer.has(node.parentNode)) return true;\n if (isRoot(node.parentNode)) {\n knownRootContainer.add(node);\n return true;\n }\n return false;\n };\n return isRoot;\n}\n\nconst /** @type {?} */ CLASSES_CACHE_KEY = '$$classes';\n/**\n * @param {?} element\n * @param {?} className\n * @return {?}\n */\nfunction containsClass(element: any, className: string): boolean {\n if (element.classList) {\n return element.classList.contains(className);\n } else {\n const /** @type {?} */ classes = element[CLASSES_CACHE_KEY];\n return classes && classes[className];\n }\n}\n/**\n * @param {?} element\n * @param {?} className\n * @return {?}\n */\nfunction addClass(element: any, className: string) {\n if (element.classList) {\n element.classList.add(className);\n } else {\n let /** @type {?} */ classes: {[className: string]: boolean} = element[CLASSES_CACHE_KEY];\n if (!classes) {\n classes = element[CLASSES_CACHE_KEY] = {};\n }\n classes[className] = true;\n }\n}\n/**\n * @param {?} element\n * @param {?} className\n * @return {?}\n */\nfunction removeClass(element: any, className: string) {\n if (element.classList) {\n element.classList.remove(className);\n } else {\n let /** @type {?} */ classes: {[className: string]: boolean} = element[CLASSES_CACHE_KEY];\n if (classes) {\n delete classes[className];\n }\n }\n}\n/**\n * @return {?}\n */\nfunction getBodyNode(): any|null {\n if (typeof document != 'undefined') {\n return document.body;\n }\n return null;\n}\n/**\n * @param {?} engine\n * @param {?} element\n * @param {?} players\n * @return {?}\n */\nfunction removeNodesAfterAnimationDone(\n engine: TransitionAnimationEngine, element: any, players: AnimationPlayer[]) {\n optimizeGroupPlayer(players).onDone(() => engine.processLeaveNode(element));\n}\n/**\n * @param {?} players\n * @return {?}\n */\nfunction flattenGroupPlayers(players: AnimationPlayer[]): AnimationPlayer[] {\n const /** @type {?} */ finalPlayers: AnimationPlayer[] = [];\n _flattenGroupPlayersRecur(players, finalPlayers);\n return finalPlayers;\n}\n/**\n * @param {?} players\n * @param {?} finalPlayers\n * @return {?}\n */\nfunction _flattenGroupPlayersRecur(players: AnimationPlayer[], finalPlayers: AnimationPlayer[]) {\n for (let /** @type {?} */ i = 0; i < players.length; i++) {\n const /** @type {?} */ player = players[i];\n if (player instanceof AnimationGroupPlayer) {\n _flattenGroupPlayersRecur(player.players, finalPlayers);\n } else {\n finalPlayers.push( /** @type {?} */((player as AnimationPlayer)));\n }\n }\n}\n/**\n * @param {?} a\n * @param {?} b\n * @return {?}\n */\nfunction objEquals(a: {[key: string]: any}, b: {[key: string]: any}): boolean {\n const /** @type {?} */ k1 = Object.keys(a);\n const /** @type {?} */ k2 = Object.keys(b);\n if (k1.length != k2.length) return false;\n for (let /** @type {?} */ i = 0; i < k1.length; i++) {\n const /** @type {?} */ prop = k1[i];\n if (!b.hasOwnProperty(prop) || a[prop] !== b[prop]) return false;\n }\n return true;\n}\n/**\n * @param {?} element\n * @param {?} allPreStyleElements\n * @param {?} allPostStyleElements\n * @return {?}\n */\nfunction replacePostStylesAsPre(\n element: any, allPreStyleElements: Map>,\n allPostStyleElements: Map>): boolean {\n const /** @type {?} */ postEntry = allPostStyleElements.get(element);\n if (!postEntry) return false;\n\n let /** @type {?} */ preEntry = allPreStyleElements.get(element);\n if (preEntry) {\n postEntry.forEach(data => /** @type {?} */(( preEntry)).add(data));\n } else {\n allPreStyleElements.set(element, postEntry);\n }\n\n allPostStyleElements.delete(element);\n return true;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimateTimings, AnimationMetadata, AnimationMetadataType, AnimationOptions, sequence, ɵStyleData} from '@angular/animations';\nimport {Ast as AnimationAst, AstVisitor as AnimationAstVisitor} from './dsl/animation_ast';\nimport {AnimationDslVisitor} from './dsl/animation_dsl_visitor';\n\nexport const ONE_SECOND = 1000;\n\nexport const SUBSTITUTION_EXPR_START = '{{';\nexport const SUBSTITUTION_EXPR_END = '}}';\nexport const ENTER_CLASSNAME = 'ng-enter';\nexport const LEAVE_CLASSNAME = 'ng-leave';\nexport const ENTER_SELECTOR = '.ng-enter';\nexport const LEAVE_SELECTOR = '.ng-leave';\nexport const NG_TRIGGER_CLASSNAME = 'ng-trigger';\nexport const NG_TRIGGER_SELECTOR = '.ng-trigger';\nexport const NG_ANIMATING_CLASSNAME = 'ng-animating';\nexport const NG_ANIMATING_SELECTOR = '.ng-animating';\n\nexport function resolveTimingValue(value: string | number) {\n if (typeof value == 'number') return value;\n\n const matches = (value as string).match(/^(-?[\\.\\d]+)(m?s)/);\n if (!matches || matches.length < 2) return 0;\n\n return _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n}\n\nfunction _convertTimeValueToMS(value: number, unit: string): number {\n switch (unit) {\n case 's':\n return value * ONE_SECOND;\n default: // ms or something else\n return value;\n }\n}\n\nexport function resolveTiming(\n timings: string | number | AnimateTimings, errors: any[], allowNegativeValues?: boolean) {\n return timings.hasOwnProperty('duration') ?\n timings :\n parseTimeExpression(timings, errors, allowNegativeValues);\n}\n\nfunction parseTimeExpression(\n exp: string | number, errors: string[], allowNegativeValues?: boolean): AnimateTimings {\n const regex = /^(-?[\\.\\d]+)(m?s)(?:\\s+(-?[\\.\\d]+)(m?s))?(?:\\s+([-a-z]+(?:\\(.+?\\))?))?$/i;\n let duration: number;\n let delay: number = 0;\n let easing: string = '';\n if (typeof exp === 'string') {\n const matches = exp.match(regex);\n if (matches === null) {\n errors.push(`The provided timing value \"${exp}\" is invalid.`);\n return {duration: 0, delay: 0, easing: ''};\n }\n\n duration = _convertTimeValueToMS(parseFloat(matches[1]), matches[2]);\n\n const delayMatch = matches[3];\n if (delayMatch != null) {\n delay = _convertTimeValueToMS(Math.floor(parseFloat(delayMatch)), matches[4]);\n }\n\n const easingVal = matches[5];\n if (easingVal) {\n easing = easingVal;\n }\n } else {\n duration = exp;\n }\n\n if (!allowNegativeValues) {\n let containsErrors = false;\n let startIndex = errors.length;\n if (duration < 0) {\n errors.push(`Duration values below 0 are not allowed for this animation step.`);\n containsErrors = true;\n }\n if (delay < 0) {\n errors.push(`Delay values below 0 are not allowed for this animation step.`);\n containsErrors = true;\n }\n if (containsErrors) {\n errors.splice(startIndex, 0, `The provided timing value \"${exp}\" is invalid.`);\n }\n }\n\n return {duration, delay, easing};\n}\n\nexport function copyObj(\n obj: {[key: string]: any}, destination: {[key: string]: any} = {}): {[key: string]: any} {\n Object.keys(obj).forEach(prop => { destination[prop] = obj[prop]; });\n return destination;\n}\n\nexport function normalizeStyles(styles: ɵStyleData | ɵStyleData[]): ɵStyleData {\n const normalizedStyles: ɵStyleData = {};\n if (Array.isArray(styles)) {\n styles.forEach(data => copyStyles(data, false, normalizedStyles));\n } else {\n copyStyles(styles, false, normalizedStyles);\n }\n return normalizedStyles;\n}\n\nexport function copyStyles(\n styles: ɵStyleData, readPrototype: boolean, destination: ɵStyleData = {}): ɵStyleData {\n if (readPrototype) {\n // we make use of a for-in loop so that the\n // prototypically inherited properties are\n // revealed from the backFill map\n for (let prop in styles) {\n destination[prop] = styles[prop];\n }\n } else {\n copyObj(styles, destination);\n }\n return destination;\n}\n\nexport function setStyles(element: any, styles: ɵStyleData) {\n if (element['style']) {\n Object.keys(styles).forEach(prop => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = styles[prop];\n });\n }\n}\n\nexport function eraseStyles(element: any, styles: ɵStyleData) {\n if (element['style']) {\n Object.keys(styles).forEach(prop => {\n const camelProp = dashCaseToCamelCase(prop);\n element.style[camelProp] = '';\n });\n }\n}\n\nexport function normalizeAnimationEntry(steps: AnimationMetadata | AnimationMetadata[]):\n AnimationMetadata {\n if (Array.isArray(steps)) {\n if (steps.length == 1) return steps[0];\n return sequence(steps);\n }\n return steps as AnimationMetadata;\n}\n\nexport function validateStyleParams(\n value: string | number, options: AnimationOptions, errors: any[]) {\n const params = options.params || {};\n const matches = extractStyleParams(value);\n if (matches.length) {\n matches.forEach(varName => {\n if (!params.hasOwnProperty(varName)) {\n errors.push(\n `Unable to resolve the local animation param ${varName} in the given list of values`);\n }\n });\n }\n}\n\nconst PARAM_REGEX =\n new RegExp(`${SUBSTITUTION_EXPR_START}\\\\s*(.+?)\\\\s*${SUBSTITUTION_EXPR_END}`, 'g');\nexport function extractStyleParams(value: string | number): string[] {\n let params: string[] = [];\n if (typeof value === 'string') {\n const val = value.toString();\n\n let match: any;\n while (match = PARAM_REGEX.exec(val)) {\n params.push(match[1] as string);\n }\n PARAM_REGEX.lastIndex = 0;\n }\n return params;\n}\n\nexport function interpolateParams(\n value: string | number, params: {[name: string]: any}, errors: any[]): string|number {\n const original = value.toString();\n const str = original.replace(PARAM_REGEX, (_, varName) => {\n let localVal = params[varName];\n // this means that the value was never overidden by the data passed in by the user\n if (!params.hasOwnProperty(varName)) {\n errors.push(`Please provide a value for the animation param ${varName}`);\n localVal = '';\n }\n return localVal.toString();\n });\n\n // we do this to assert that numeric values stay as they are\n return str == original ? value : str;\n}\n\nexport function iteratorToArray(iterator: any): any[] {\n const arr: any[] = [];\n let item = iterator.next();\n while (!item.done) {\n arr.push(item.value);\n item = iterator.next();\n }\n return arr;\n}\n\nexport function mergeAnimationOptions(\n source: AnimationOptions, destination: AnimationOptions): AnimationOptions {\n if (source.params) {\n const p0 = source.params;\n if (!destination.params) {\n destination.params = {};\n }\n const p1 = destination.params;\n Object.keys(p0).forEach(param => {\n if (!p1.hasOwnProperty(param)) {\n p1[param] = p0[param];\n }\n });\n }\n return destination;\n}\n\nconst DASH_CASE_REGEXP = /-+([a-z0-9])/g;\nexport function dashCaseToCamelCase(input: string): string {\n return input.replace(DASH_CASE_REGEXP, (...m: any[]) => m[1].toUpperCase());\n}\n\nexport function allowPreviousPlayerStylesMerge(duration: number, delay: number) {\n return duration === 0 || delay === 0;\n}\n\nexport function visitDslNode(\n visitor: AnimationDslVisitor, node: AnimationMetadata, context: any): any;\nexport function visitDslNode(\n visitor: AnimationAstVisitor, node: AnimationAst, context: any): any;\nexport function visitDslNode(visitor: any, node: any, context: any): any {\n switch (node.type) {\n case AnimationMetadataType.Trigger:\n return visitor.visitTrigger(node, context);\n case AnimationMetadataType.State:\n return visitor.visitState(node, context);\n case AnimationMetadataType.Transition:\n return visitor.visitTransition(node, context);\n case AnimationMetadataType.Sequence:\n return visitor.visitSequence(node, context);\n case AnimationMetadataType.Group:\n return visitor.visitGroup(node, context);\n case AnimationMetadataType.Animate:\n return visitor.visitAnimate(node, context);\n case AnimationMetadataType.Keyframes:\n return visitor.visitKeyframes(node, context);\n case AnimationMetadataType.Style:\n return visitor.visitStyle(node, context);\n case AnimationMetadataType.Reference:\n return visitor.visitReference(node, context);\n case AnimationMetadataType.AnimateChild:\n return visitor.visitAnimateChild(node, context);\n case AnimationMetadataType.AnimateRef:\n return visitor.visitAnimateRef(node, context);\n case AnimationMetadataType.Query:\n return visitor.visitQuery(node, context);\n case AnimationMetadataType.Stagger:\n return visitor.visitStagger(node, context);\n default:\n throw new Error(`Unable to resolve animation metadata node #${node.type}`);\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationMetadata, AnimationPlayer, AnimationTriggerMetadata} from '@angular/animations';\nimport {TriggerAst} from '../dsl/animation_ast';\nimport {buildAnimationAst} from '../dsl/animation_ast_builder';\nimport {AnimationTrigger, buildTrigger} from '../dsl/animation_trigger';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\n\nimport {AnimationDriver} from './animation_driver';\nimport {parseTimelineCommand} from './shared';\nimport {TimelineAnimationEngine} from './timeline_animation_engine';\nimport {TransitionAnimationEngine} from './transition_animation_engine';\nexport class AnimationEngine {\nprivate _transitionEngine: TransitionAnimationEngine;\nprivate _timelineEngine: TimelineAnimationEngine;\nprivate _triggerCache: {[key: string]: AnimationTrigger} = {};\npublic onRemovalComplete = (element: any, context: any) => {};\n/**\n * @param {?} driver\n * @param {?} normalizer\n */\nconstructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {\n this._transitionEngine = new TransitionAnimationEngine(driver, normalizer);\n this._timelineEngine = new TimelineAnimationEngine(driver, normalizer);\n\n this._transitionEngine.onRemovalComplete = (element: any, context: any) =>\n this.onRemovalComplete(element, context);\n }\n/**\n * @param {?} componentId\n * @param {?} namespaceId\n * @param {?} hostElement\n * @param {?} name\n * @param {?} metadata\n * @return {?}\n */\nregisterTrigger(\n componentId: string, namespaceId: string, hostElement: any, name: string,\n metadata: AnimationTriggerMetadata): void {\n const /** @type {?} */ cacheKey = componentId + '-' + name;\n let /** @type {?} */ trigger = this._triggerCache[cacheKey];\n if (!trigger) {\n const /** @type {?} */ errors: any[] = [];\n const /** @type {?} */ ast = /** @type {?} */(( buildAnimationAst( /** @type {?} */((metadata as AnimationMetadata)), errors) as TriggerAst));\n if (errors.length) {\n throw new Error(\n `The animation trigger \"${name}\" has failed to build due to the following errors:\\n - ${errors.join(\"\\n - \")}`);\n }\n trigger = buildTrigger(name, ast);\n this._triggerCache[cacheKey] = trigger;\n }\n this._transitionEngine.registerTrigger(namespaceId, name, trigger);\n }\n/**\n * @param {?} namespaceId\n * @param {?} hostElement\n * @return {?}\n */\nregister(namespaceId: string, hostElement: any) {\n this._transitionEngine.register(namespaceId, hostElement);\n }\n/**\n * @param {?} namespaceId\n * @param {?} context\n * @return {?}\n */\ndestroy(namespaceId: string, context: any) {\n this._transitionEngine.destroy(namespaceId, context);\n }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @param {?} parent\n * @param {?} insertBefore\n * @return {?}\n */\nonInsert(namespaceId: string, element: any, parent: any, insertBefore: boolean): void {\n this._transitionEngine.insertNode(namespaceId, element, parent, insertBefore);\n }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @param {?} context\n * @return {?}\n */\nonRemove(namespaceId: string, element: any, context: any): void {\n this._transitionEngine.removeNode(namespaceId, element, context);\n }\n/**\n * @param {?} element\n * @param {?} disable\n * @return {?}\n */\ndisableAnimations(element: any, disable: boolean) {\n this._transitionEngine.markElementAsDisabled(element, disable);\n }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @param {?} property\n * @param {?} value\n * @return {?}\n */\nprocess(namespaceId: string, element: any, property: string, value: any) {\n if (property.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(property);\n const /** @type {?} */ args = /** @type {?} */(( value as any[]));\n this._timelineEngine.command(id, element, action, args);\n } else {\n this._transitionEngine.trigger(namespaceId, element, property, value);\n }\n }\n/**\n * @param {?} namespaceId\n * @param {?} element\n * @param {?} eventName\n * @param {?} eventPhase\n * @param {?} callback\n * @return {?}\n */\nlisten(\n namespaceId: string, element: any, eventName: string, eventPhase: string,\n callback: (event: any) => any): () => any {\n // @@listen\n if (eventName.charAt(0) == '@') {\n const [id, action] = parseTimelineCommand(eventName);\n return this._timelineEngine.listen(id, element, action, callback);\n }\n return this._transitionEngine.listen(namespaceId, element, eventName, eventPhase, callback);\n }\n/**\n * @param {?=} microtaskId\n * @return {?}\n */\nflush(microtaskId: number = -1): void { this._transitionEngine.flush(microtaskId); }\n/**\n * @return {?}\n */\nget players(): AnimationPlayer[] {\n return ( /** @type {?} */((this._transitionEngine.players as AnimationPlayer[])))\n .concat( /** @type {?} */((this._timelineEngine.players as AnimationPlayer[])));\n }\n/**\n * @return {?}\n */\nwhenRenderingDone(): Promise { return this._transitionEngine.whenRenderingDone(); }\n}\n\nfunction AnimationEngine_tsickle_Closure_declarations() {\n/** @type {?} */\nAnimationEngine.prototype._transitionEngine;\n/** @type {?} */\nAnimationEngine.prototype._timelineEngine;\n/** @type {?} */\nAnimationEngine.prototype._triggerCache;\n/** @type {?} */\nAnimationEngine.prototype.onRemovalComplete;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationPlayer} from '@angular/animations';\n\nimport {allowPreviousPlayerStylesMerge, copyStyles} from '../../util';\n\nimport {DOMAnimation} from './dom_animation';\nexport class WebAnimationsPlayer implements AnimationPlayer {\nprivate _onDoneFns: Function[] = [];\nprivate _onStartFns: Function[] = [];\nprivate _onDestroyFns: Function[] = [];\nprivate _player: DOMAnimation;\nprivate _duration: number;\nprivate _delay: number;\nprivate _initialized = false;\nprivate _finished = false;\nprivate _started = false;\nprivate _destroyed = false;\nprivate _finalKeyframe: {[key: string]: string | number};\npublic time = 0;\npublic parentPlayer: AnimationPlayer|null = null;\npublic previousStyles: {[styleName: string]: string | number} = {};\npublic currentSnapshot: {[styleName: string]: string | number} = {};\n/**\n * @param {?} element\n * @param {?} keyframes\n * @param {?} options\n * @param {?=} previousPlayers\n */\nconstructor(\npublic element: any,\npublic keyframes: {[key: string]: string | number}[],\npublic options: {[key: string]: string | number},\nprivate previousPlayers: WebAnimationsPlayer[] = []) {\n this._duration = options['duration'];\n this._delay = options['delay'] || 0;\n this.time = this._duration + this._delay;\n\n if (allowPreviousPlayerStylesMerge(this._duration, this._delay)) {\n previousPlayers.forEach(player => {\n let styles = player.currentSnapshot;\n Object.keys(styles).forEach(prop => this.previousStyles[prop] = styles[prop]);\n });\n }\n }\n/**\n * @return {?}\n */\nprivate _onFinish() {\n if (!this._finished) {\n this._finished = true;\n this._onDoneFns.forEach(fn => fn());\n this._onDoneFns = [];\n }\n }\n/**\n * @return {?}\n */\ninit(): void {\n this._buildPlayer();\n this._preparePlayerBeforeStart();\n }\n/**\n * @return {?}\n */\nprivate _buildPlayer(): void {\n if (this._initialized) return;\n this._initialized = true;\n\n const /** @type {?} */ keyframes = this.keyframes.map(styles => copyStyles(styles, false));\n const /** @type {?} */ previousStyleProps = Object.keys(this.previousStyles);\n if (previousStyleProps.length) {\n let /** @type {?} */ startingKeyframe = keyframes[0];\n let /** @type {?} */ missingStyleProps: string[] = [];\n previousStyleProps.forEach(prop => {\n if (!startingKeyframe.hasOwnProperty(prop)) {\n missingStyleProps.push(prop);\n }\n startingKeyframe[prop] = this.previousStyles[prop];\n });\n\n if (missingStyleProps.length) {\n const /** @type {?} */ self = this;\n // tslint:disable-next-line\n for (var /** @type {?} */ i = 1; i < keyframes.length; i++) {\n let /** @type {?} */ kf = keyframes[i];\n missingStyleProps.forEach(function(prop) {\n kf[prop] = _computeStyle(self.element, prop);\n });\n }\n }\n }\n\n this._player = this._triggerWebAnimation(this.element, keyframes, this.options);\n this._finalKeyframe = keyframes.length ? keyframes[keyframes.length - 1] : {};\n this._player.addEventListener('finish', () => this._onFinish());\n }\n/**\n * @return {?}\n */\nprivate _preparePlayerBeforeStart() {\n // this is required so that the player doesn't start to animate right away\n if (this._delay) {\n this._resetDomPlayerState();\n } else {\n this._player.pause();\n }\n }\n/**\n * \\@internal\n * @param {?} element\n * @param {?} keyframes\n * @param {?} options\n * @return {?}\n */\n_triggerWebAnimation(element: any, keyframes: any[], options: any): DOMAnimation {\n // jscompiler doesn't seem to know animate is a native property because it's not fully\n // supported yet across common browsers (we polyfill it for Edge/Safari) [CL #143630929]\n return /** @type {?} */(( element['animate'](keyframes, options) as DOMAnimation));\n }\n/**\n * @return {?}\n */\nget domPlayer() { return this._player; }\n/**\n * @param {?} fn\n * @return {?}\n */\nonStart(fn: () => void): void { this._onStartFns.push(fn); }\n/**\n * @param {?} fn\n * @return {?}\n */\nonDone(fn: () => void): void { this._onDoneFns.push(fn); }\n/**\n * @param {?} fn\n * @return {?}\n */\nonDestroy(fn: () => void): void { this._onDestroyFns.push(fn); }\n/**\n * @return {?}\n */\nplay(): void {\n this._buildPlayer();\n if (!this.hasStarted()) {\n this._onStartFns.forEach(fn => fn());\n this._onStartFns = [];\n this._started = true;\n }\n this._player.play();\n }\n/**\n * @return {?}\n */\npause(): void {\n this.init();\n this._player.pause();\n }\n/**\n * @return {?}\n */\nfinish(): void {\n this.init();\n this._onFinish();\n this._player.finish();\n }\n/**\n * @return {?}\n */\nreset(): void {\n this._resetDomPlayerState();\n this._destroyed = false;\n this._finished = false;\n this._started = false;\n }\n/**\n * @return {?}\n */\nprivate _resetDomPlayerState() {\n if (this._player) {\n this._player.cancel();\n }\n }\n/**\n * @return {?}\n */\nrestart(): void {\n this.reset();\n this.play();\n }\n/**\n * @return {?}\n */\nhasStarted(): boolean { return this._started; }\n/**\n * @return {?}\n */\ndestroy(): void {\n if (!this._destroyed) {\n this._destroyed = true;\n this._resetDomPlayerState();\n this._onFinish();\n this._onDestroyFns.forEach(fn => fn());\n this._onDestroyFns = [];\n }\n }\n/**\n * @param {?} p\n * @return {?}\n */\nsetPosition(p: number): void { this._player.currentTime = p * this.time; }\n/**\n * @return {?}\n */\ngetPosition(): number { return this._player.currentTime / this.time; }\n/**\n * @return {?}\n */\nget totalTime(): number { return this._delay + this._duration; }\n/**\n * @return {?}\n */\nbeforeDestroy() {\n const /** @type {?} */ styles: {[key: string]: string | number} = {};\n if (this.hasStarted()) {\n Object.keys(this._finalKeyframe).forEach(prop => {\n if (prop != 'offset') {\n styles[prop] =\n this._finished ? this._finalKeyframe[prop] : _computeStyle(this.element, prop);\n }\n });\n }\n this.currentSnapshot = styles;\n }\n}\n\nfunction WebAnimationsPlayer_tsickle_Closure_declarations() {\n/** @type {?} */\nWebAnimationsPlayer.prototype._onDoneFns;\n/** @type {?} */\nWebAnimationsPlayer.prototype._onStartFns;\n/** @type {?} */\nWebAnimationsPlayer.prototype._onDestroyFns;\n/** @type {?} */\nWebAnimationsPlayer.prototype._player;\n/** @type {?} */\nWebAnimationsPlayer.prototype._duration;\n/** @type {?} */\nWebAnimationsPlayer.prototype._delay;\n/** @type {?} */\nWebAnimationsPlayer.prototype._initialized;\n/** @type {?} */\nWebAnimationsPlayer.prototype._finished;\n/** @type {?} */\nWebAnimationsPlayer.prototype._started;\n/** @type {?} */\nWebAnimationsPlayer.prototype._destroyed;\n/** @type {?} */\nWebAnimationsPlayer.prototype._finalKeyframe;\n/** @type {?} */\nWebAnimationsPlayer.prototype.time;\n/** @type {?} */\nWebAnimationsPlayer.prototype.parentPlayer;\n/** @type {?} */\nWebAnimationsPlayer.prototype.previousStyles;\n/** @type {?} */\nWebAnimationsPlayer.prototype.currentSnapshot;\n/** @type {?} */\nWebAnimationsPlayer.prototype.element;\n/** @type {?} */\nWebAnimationsPlayer.prototype.keyframes;\n/** @type {?} */\nWebAnimationsPlayer.prototype.options;\n/** @type {?} */\nWebAnimationsPlayer.prototype.previousPlayers;\n}\n\n/**\n * @param {?} element\n * @param {?} prop\n * @return {?}\n */\nfunction _computeStyle(element: any, prop: string): string {\n return ( /** @type {?} */((window.getComputedStyle(element))))[prop];\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationPlayer, ɵStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../animation_driver';\nimport {containsElement, invokeQuery, matchesElement} from '../shared';\n\nimport {WebAnimationsPlayer} from './web_animations_player';\nexport class WebAnimationsDriver implements AnimationDriver {\n/**\n * @param {?} element\n * @param {?} selector\n * @return {?}\n */\nmatchesElement(element: any, selector: string): boolean {\n return matchesElement(element, selector);\n }\n/**\n * @param {?} elm1\n * @param {?} elm2\n * @return {?}\n */\ncontainsElement(elm1: any, elm2: any): boolean { return containsElement(elm1, elm2); }\n/**\n * @param {?} element\n * @param {?} selector\n * @param {?} multi\n * @return {?}\n */\nquery(element: any, selector: string, multi: boolean): any[] {\n return invokeQuery(element, selector, multi);\n }\n/**\n * @param {?} element\n * @param {?} prop\n * @param {?=} defaultValue\n * @return {?}\n */\ncomputeStyle(element: any, prop: string, defaultValue?: string): string {\n return /** @type {?} */(( ( /** @type {?} */((window.getComputedStyle(element) as any)))[prop] as string));\n }\n/**\n * @param {?} element\n * @param {?} keyframes\n * @param {?} duration\n * @param {?} delay\n * @param {?} easing\n * @param {?=} previousPlayers\n * @return {?}\n */\nanimate(\n element: any, keyframes: ɵStyleData[], duration: number, delay: number, easing: string,\n previousPlayers: AnimationPlayer[] = []): WebAnimationsPlayer {\n const /** @type {?} */ fill = delay == 0 ? 'both' : 'forwards';\n const /** @type {?} */ playerOptions: {[key: string]: string | number} = {duration, delay, fill};\n\n // we check for this to avoid having a null|undefined value be present\n // for the easing (which results in an error for certain browsers #9752)\n if (easing) {\n playerOptions['easing'] = easing;\n }\n\n const /** @type {?} */ previousWebAnimationPlayers = /** @type {?} */(( previousPlayers.filter(\n player => { return player instanceof WebAnimationsPlayer; })));\n return new WebAnimationsPlayer(element, keyframes, playerOptions, previousWebAnimationPlayers);\n }\n}\n/**\n * @return {?}\n */\nexport function supportsWebAnimations() {\n return typeof Element !== 'undefined' && typeof( /** @type {?} */((Element))).prototype['animate'] === 'function';\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {dashCaseToCamelCase} from '../../util';\n\nimport {AnimationStyleNormalizer} from './animation_style_normalizer';\nexport class WebAnimationsStyleNormalizer extends AnimationStyleNormalizer {\n/**\n * @param {?} propertyName\n * @param {?} errors\n * @return {?}\n */\nnormalizePropertyName(propertyName: string, errors: string[]): string {\n return dashCaseToCamelCase(propertyName);\n }\n/**\n * @param {?} userProvidedProperty\n * @param {?} normalizedProperty\n * @param {?} value\n * @param {?} errors\n * @return {?}\n */\nnormalizeStyleValue(\n userProvidedProperty: string, normalizedProperty: string, value: string|number,\n errors: string[]): string {\n let /** @type {?} */ unit: string = '';\n const /** @type {?} */ strVal = value.toString().trim();\n\n if (DIMENSIONAL_PROP_MAP[normalizedProperty] && value !== 0 && value !== '0') {\n if (typeof value === 'number') {\n unit = 'px';\n } else {\n const /** @type {?} */ valAndSuffixMatch = value.match(/^[+-]?[\\d\\.]+([a-z]*)$/);\n if (valAndSuffixMatch && valAndSuffixMatch[1].length == 0) {\n errors.push(`Please provide a CSS unit value for ${userProvidedProperty}:${value}`);\n }\n }\n }\n return strVal + unit;\n }\n}\n\nconst /** @type {?} */ DIMENSIONAL_PROP_MAP = makeBooleanMap(\n 'width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective'\n .split(','));\n/**\n * @param {?} keys\n * @return {?}\n */\nfunction makeBooleanMap(keys: string[]): {[key: string]: boolean} {\n const /** @type {?} */ map: {[key: string]: boolean} = {};\n keys.forEach(key => map[key] = true);\n return map;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationOptions, ɵStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {getOrSetAsInMap} from '../render/shared';\nimport {copyObj, interpolateParams, iteratorToArray, mergeAnimationOptions} from '../util';\n\nimport {StyleAst, TransitionAst} from './animation_ast';\nimport {buildAnimationTimelines} from './animation_timeline_builder';\nimport {TransitionMatcherFn} from './animation_transition_expr';\nimport {AnimationTransitionInstruction, createTransitionInstruction} from './animation_transition_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\n\nconst /** @type {?} */ EMPTY_OBJECT = {};\nexport class AnimationTransitionFactory {\n/**\n * @param {?} _triggerName\n * @param {?} ast\n * @param {?} _stateStyles\n */\nconstructor(\nprivate _triggerName: string,\npublic ast: TransitionAst,\nprivate _stateStyles: {[stateName: string]: AnimationStateStyles}) {}\n/**\n * @param {?} currentState\n * @param {?} nextState\n * @return {?}\n */\nmatch(currentState: any, nextState: any): boolean {\n return oneOrMoreTransitionsMatch(this.ast.matchers, currentState, nextState);\n }\n/**\n * @param {?} stateName\n * @param {?} params\n * @param {?} errors\n * @return {?}\n */\nbuildStyles(stateName: string, params: {[key: string]: any}, errors: any[]) {\n const /** @type {?} */ backupStateStyler = this._stateStyles['*'];\n const /** @type {?} */ stateStyler = this._stateStyles[stateName];\n const /** @type {?} */ backupStyles = backupStateStyler ? backupStateStyler.buildStyles(params, errors) : {};\n return stateStyler ? stateStyler.buildStyles(params, errors) : backupStyles;\n }\n/**\n * @param {?} driver\n * @param {?} element\n * @param {?} currentState\n * @param {?} nextState\n * @param {?=} currentOptions\n * @param {?=} nextOptions\n * @param {?=} subInstructions\n * @return {?}\n */\nbuild(\n driver: AnimationDriver, element: any, currentState: any, nextState: any,\n currentOptions?: AnimationOptions, nextOptions?: AnimationOptions,\n subInstructions?: ElementInstructionMap): AnimationTransitionInstruction {\n const /** @type {?} */ errors: any[] = [];\n\n const /** @type {?} */ transitionAnimationParams = this.ast.options && this.ast.options.params || EMPTY_OBJECT;\n const /** @type {?} */ currentAnimationParams = currentOptions && currentOptions.params || EMPTY_OBJECT;\n const /** @type {?} */ currentStateStyles = this.buildStyles(currentState, currentAnimationParams, errors);\n const /** @type {?} */ nextAnimationParams = nextOptions && nextOptions.params || EMPTY_OBJECT;\n const /** @type {?} */ nextStateStyles = this.buildStyles(nextState, nextAnimationParams, errors);\n\n const /** @type {?} */ queriedElements = new Set();\n const /** @type {?} */ preStyleMap = new Map();\n const /** @type {?} */ postStyleMap = new Map();\n const /** @type {?} */ isRemoval = nextState === 'void';\n\n const /** @type {?} */ animationOptions = {params: {...transitionAnimationParams, ...nextAnimationParams}};\n\n const /** @type {?} */ timelines = buildAnimationTimelines(\n driver, element, this.ast.animation, currentStateStyles, nextStateStyles, animationOptions,\n subInstructions, errors);\n\n if (errors.length) {\n return createTransitionInstruction(\n element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles,\n nextStateStyles, [], [], preStyleMap, postStyleMap, errors);\n }\n\n timelines.forEach(tl => {\n const /** @type {?} */ elm = tl.element;\n const /** @type {?} */ preProps = getOrSetAsInMap(preStyleMap, elm, {});\n tl.preStyleProps.forEach(prop => preProps[prop] = true);\n\n const /** @type {?} */ postProps = getOrSetAsInMap(postStyleMap, elm, {});\n tl.postStyleProps.forEach(prop => postProps[prop] = true);\n\n if (elm !== element) {\n queriedElements.add(elm);\n }\n });\n\n const /** @type {?} */ queriedElementsList = iteratorToArray(queriedElements.values());\n return createTransitionInstruction(\n element, this._triggerName, currentState, nextState, isRemoval, currentStateStyles,\n nextStateStyles, timelines, queriedElementsList, preStyleMap, postStyleMap);\n }\n}\n\nfunction AnimationTransitionFactory_tsickle_Closure_declarations() {\n/** @type {?} */\nAnimationTransitionFactory.prototype._triggerName;\n/** @type {?} */\nAnimationTransitionFactory.prototype.ast;\n/** @type {?} */\nAnimationTransitionFactory.prototype._stateStyles;\n}\n\n/**\n * @param {?} matchFns\n * @param {?} currentState\n * @param {?} nextState\n * @return {?}\n */\nfunction oneOrMoreTransitionsMatch(\n matchFns: TransitionMatcherFn[], currentState: any, nextState: any): boolean {\n return matchFns.some(fn => fn(currentState, nextState));\n}\nexport class AnimationStateStyles {\n/**\n * @param {?} styles\n * @param {?} defaultParams\n */\nconstructor(private styles: StyleAst,\nprivate defaultParams: {[key: string]: any}) {}\n/**\n * @param {?} params\n * @param {?} errors\n * @return {?}\n */\nbuildStyles(params: {[key: string]: any}, errors: string[]): ɵStyleData {\n const /** @type {?} */ finalStyles: ɵStyleData = {};\n const /** @type {?} */ combinedParams = copyObj(this.defaultParams);\n Object.keys(params).forEach(key => {\n const /** @type {?} */ value = params[key];\n if (value != null) {\n combinedParams[key] = value;\n }\n });\n this.styles.styles.forEach(value => {\n if (typeof value !== 'string') {\n const /** @type {?} */ styleObj = /** @type {?} */(( value as any));\n Object.keys(styleObj).forEach(prop => {\n let /** @type {?} */ val = styleObj[prop];\n if (val.length > 1) {\n val = interpolateParams(val, combinedParams, errors);\n }\n finalStyles[prop] = val;\n });\n }\n });\n return finalStyles;\n }\n}\n\nfunction AnimationStateStyles_tsickle_Closure_declarations() {\n/** @type {?} */\nAnimationStateStyles.prototype.styles;\n/** @type {?} */\nAnimationStateStyles.prototype.defaultParams;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationMetadataType, ɵStyleData} from '@angular/animations';\n\nimport {copyStyles, interpolateParams} from '../util';\n\nimport {SequenceAst, StyleAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationStateStyles, AnimationTransitionFactory} from './animation_transition_factory';\n/**\n * \\@experimental Animation support is experimental.\n * @param {?} name\n * @param {?} ast\n * @return {?}\n */\nexport function buildTrigger(name: string, ast: TriggerAst): AnimationTrigger {\n return new AnimationTrigger(name, ast);\n}\n/**\n * \\@experimental Animation support is experimental.\n */\nexport class AnimationTrigger {\npublic transitionFactories: AnimationTransitionFactory[] = [];\npublic fallbackTransition: AnimationTransitionFactory;\npublic states: {[stateName: string]: AnimationStateStyles} = {};\n/**\n * @param {?} name\n * @param {?} ast\n */\nconstructor(public name: string,\npublic ast: TriggerAst) {\n ast.states.forEach(ast => {\n const defaultParams = (ast.options && ast.options.params) || {};\n this.states[ast.name] = new AnimationStateStyles(ast.style, defaultParams);\n });\n\n balanceProperties(this.states, 'true', '1');\n balanceProperties(this.states, 'false', '0');\n\n ast.transitions.forEach(ast => {\n this.transitionFactories.push(new AnimationTransitionFactory(name, ast, this.states));\n });\n\n this.fallbackTransition = createFallbackTransition(name, this.states);\n }\n/**\n * @return {?}\n */\nget containsQueries() { return this.ast.queryCount > 0; }\n/**\n * @param {?} currentState\n * @param {?} nextState\n * @return {?}\n */\nmatchTransition(currentState: any, nextState: any): AnimationTransitionFactory|null {\n const /** @type {?} */ entry = this.transitionFactories.find(f => f.match(currentState, nextState));\n return entry || null;\n }\n/**\n * @param {?} currentState\n * @param {?} params\n * @param {?} errors\n * @return {?}\n */\nmatchStyles(currentState: any, params: {[key: string]: any}, errors: any[]): ɵStyleData {\n return this.fallbackTransition.buildStyles(currentState, params, errors);\n }\n}\n\nfunction AnimationTrigger_tsickle_Closure_declarations() {\n/** @type {?} */\nAnimationTrigger.prototype.transitionFactories;\n/** @type {?} */\nAnimationTrigger.prototype.fallbackTransition;\n/** @type {?} */\nAnimationTrigger.prototype.states;\n/** @type {?} */\nAnimationTrigger.prototype.name;\n/** @type {?} */\nAnimationTrigger.prototype.ast;\n}\n\n/**\n * @param {?} triggerName\n * @param {?} states\n * @return {?}\n */\nfunction createFallbackTransition(\n triggerName: string,\n states: {[stateName: string]: AnimationStateStyles}): AnimationTransitionFactory {\n const /** @type {?} */ matchers = [(fromState: any, toState: any) => true];\n const /** @type {?} */ animation: SequenceAst = {type: AnimationMetadataType.Sequence, steps: [], options: null};\n const /** @type {?} */ transition: TransitionAst = {\n type: AnimationMetadataType.Transition,\n animation,\n matchers,\n options: null,\n queryCount: 0,\n depCount: 0\n };\n return new AnimationTransitionFactory(triggerName, transition, states);\n}\n/**\n * @param {?} obj\n * @param {?} key1\n * @param {?} key2\n * @return {?}\n */\nfunction balanceProperties(obj: {[key: string]: any}, key1: string, key2: string) {\n if (obj.hasOwnProperty(key1)) {\n if (!obj.hasOwnProperty(key2)) {\n obj[key2] = obj[key1];\n }\n } else if (obj.hasOwnProperty(key2)) {\n obj[key1] = obj[key2];\n }\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AUTO_STYLE, AnimationMetadata, AnimationMetadataType, AnimationOptions, AnimationPlayer, ɵStyleData} from '@angular/animations';\n\nimport {Ast} from '../dsl/animation_ast';\nimport {buildAnimationAst} from '../dsl/animation_ast_builder';\nimport {buildAnimationTimelines} from '../dsl/animation_timeline_builder';\nimport {AnimationTimelineInstruction} from '../dsl/animation_timeline_instruction';\nimport {ElementInstructionMap} from '../dsl/element_instruction_map';\nimport {AnimationStyleNormalizer} from '../dsl/style_normalization/animation_style_normalizer';\n\nimport {AnimationDriver} from './animation_driver';\nimport {getOrSetAsInMap, listenOnPlayer, makeAnimationEvent, normalizeKeyframes, optimizeGroupPlayer} from './shared';\n\nconst /** @type {?} */ EMPTY_INSTRUCTION_MAP = new ElementInstructionMap();\nexport class TimelineAnimationEngine {\nprivate _animations: {[id: string]: Ast} = {};\nprivate _playersById: {[id: string]: AnimationPlayer} = {};\npublic players: AnimationPlayer[] = [];\n/**\n * @param {?} _driver\n * @param {?} _normalizer\n */\nconstructor(private _driver: AnimationDriver,\nprivate _normalizer: AnimationStyleNormalizer) {}\n/**\n * @param {?} id\n * @param {?} metadata\n * @return {?}\n */\nregister(id: string, metadata: AnimationMetadata|AnimationMetadata[]) {\n const /** @type {?} */ errors: any[] = [];\n const /** @type {?} */ ast = buildAnimationAst(metadata, errors);\n if (errors.length) {\n throw new Error(\n `Unable to build the animation due to the following errors: ${errors.join(\"\\n\")}`);\n } else {\n this._animations[id] = ast;\n }\n }\n/**\n * @param {?} i\n * @param {?} preStyles\n * @param {?=} postStyles\n * @return {?}\n */\nprivate _buildPlayer(\n i: AnimationTimelineInstruction, preStyles: ɵStyleData,\n postStyles?: ɵStyleData): AnimationPlayer {\n const /** @type {?} */ element = i.element;\n const /** @type {?} */ keyframes = normalizeKeyframes(\n this._driver, this._normalizer, element, i.keyframes, preStyles, postStyles);\n return this._driver.animate(element, keyframes, i.duration, i.delay, i.easing, []);\n }\n/**\n * @param {?} id\n * @param {?} element\n * @param {?=} options\n * @return {?}\n */\ncreate(id: string, element: any, options: AnimationOptions = {}): AnimationPlayer {\n const /** @type {?} */ errors: any[] = [];\n const /** @type {?} */ ast = this._animations[id];\n let /** @type {?} */ instructions: AnimationTimelineInstruction[];\n\n const /** @type {?} */ autoStylesMap = new Map();\n\n if (ast) {\n instructions = buildAnimationTimelines(\n this._driver, element, ast, {}, {}, options, EMPTY_INSTRUCTION_MAP, errors);\n instructions.forEach(inst => {\n const /** @type {?} */ styles = getOrSetAsInMap(autoStylesMap, inst.element, {});\n inst.postStyleProps.forEach(prop => styles[prop] = null);\n });\n } else {\n errors.push('The requested animation doesn\\'t exist or has already been destroyed');\n instructions = [];\n }\n\n if (errors.length) {\n throw new Error(\n `Unable to create the animation due to the following errors: ${errors.join(\"\\n\")}`);\n }\n\n autoStylesMap.forEach((styles, element) => {\n Object.keys(styles).forEach(\n prop => { styles[prop] = this._driver.computeStyle(element, prop, AUTO_STYLE); });\n });\n\n const /** @type {?} */ players = instructions.map(i => {\n const /** @type {?} */ styles = autoStylesMap.get(i.element);\n return this._buildPlayer(i, {}, styles);\n });\n const /** @type {?} */ player = optimizeGroupPlayer(players);\n this._playersById[id] = player;\n player.onDestroy(() => this.destroy(id));\n\n this.players.push(player);\n return player;\n }\n/**\n * @param {?} id\n * @return {?}\n */\ndestroy(id: string) {\n const /** @type {?} */ player = this._getPlayer(id);\n player.destroy();\n delete this._playersById[id];\n const /** @type {?} */ index = this.players.indexOf(player);\n if (index >= 0) {\n this.players.splice(index, 1);\n }\n }\n/**\n * @param {?} id\n * @return {?}\n */\nprivate _getPlayer(id: string): AnimationPlayer {\n const /** @type {?} */ player = this._playersById[id];\n if (!player) {\n throw new Error(`Unable to find the timeline player referenced by ${id}`);\n }\n return player;\n }\n/**\n * @param {?} id\n * @param {?} element\n * @param {?} eventName\n * @param {?} callback\n * @return {?}\n */\nlisten(id: string, element: string, eventName: string, callback: (event: any) => any):\n () => void {\n // triggerName, fromState, toState are all ignored for timeline animations\n const /** @type {?} */ baseEvent = makeAnimationEvent(element, '', '', '');\n listenOnPlayer(this._getPlayer(id), eventName, baseEvent, callback);\n return () => {};\n }\n/**\n * @param {?} id\n * @param {?} element\n * @param {?} command\n * @param {?} args\n * @return {?}\n */\ncommand(id: string, element: any, command: string, args: any[]): void {\n if (command == 'register') {\n this.register(id, /** @type {?} */(( args[0] as AnimationMetadata | AnimationMetadata[])));\n return;\n }\n\n if (command == 'create') {\n const /** @type {?} */ options = /** @type {?} */(( (args[0] || {}) as AnimationOptions));\n this.create(id, element, options);\n return;\n }\n\n const /** @type {?} */ player = this._getPlayer(id);\n switch (command) {\n case 'play':\n player.play();\n break;\n case 'pause':\n player.pause();\n break;\n case 'reset':\n player.reset();\n break;\n case 'restart':\n player.restart();\n break;\n case 'finish':\n player.finish();\n break;\n case 'init':\n player.init();\n break;\n case 'setPosition':\n player.setPosition(parseFloat( /** @type {?} */((args[0] as string))));\n break;\n case 'destroy':\n this.destroy(id);\n break;\n }\n }\n}\n\nfunction TimelineAnimationEngine_tsickle_Closure_declarations() {\n/** @type {?} */\nTimelineAnimationEngine.prototype._animations;\n/** @type {?} */\nTimelineAnimationEngine.prototype._playersById;\n/** @type {?} */\nTimelineAnimationEngine.prototype.players;\n/** @type {?} */\nTimelineAnimationEngine.prototype._driver;\n/** @type {?} */\nTimelineAnimationEngine.prototype._normalizer;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AUTO_STYLE, AnimateTimings, AnimationAnimateChildMetadata, AnimationAnimateMetadata, AnimationAnimateRefMetadata, AnimationGroupMetadata, AnimationKeyframesSequenceMetadata, AnimationMetadata, AnimationMetadataType, AnimationOptions, AnimationQueryMetadata, AnimationQueryOptions, AnimationReferenceMetadata, AnimationSequenceMetadata, AnimationStaggerMetadata, AnimationStateMetadata, AnimationStyleMetadata, AnimationTransitionMetadata, AnimationTriggerMetadata, style, ɵStyleData} from '@angular/animations';\n\nimport {getOrSetAsInMap} from '../render/shared';\nimport {ENTER_SELECTOR, LEAVE_SELECTOR, NG_ANIMATING_SELECTOR, NG_TRIGGER_SELECTOR, SUBSTITUTION_EXPR_START, copyObj, extractStyleParams, iteratorToArray, normalizeAnimationEntry, resolveTiming, validateStyleParams, visitDslNode} from '../util';\n\nimport {AnimateAst, AnimateChildAst, AnimateRefAst, Ast, DynamicTimingAst, GroupAst, KeyframesAst, QueryAst, ReferenceAst, SequenceAst, StaggerAst, StateAst, StyleAst, TimingAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationDslVisitor} from './animation_dsl_visitor';\nimport {parseTransitionExpr} from './animation_transition_expr';\n\nconst /** @type {?} */ SELF_TOKEN = ':self';\nconst /** @type {?} */ SELF_TOKEN_REGEX = new RegExp(`\\s*${SELF_TOKEN}\\s*,?`, 'g');\n/**\n * @param {?} metadata\n * @param {?} errors\n * @return {?}\n */\nexport function buildAnimationAst(\n metadata: AnimationMetadata | AnimationMetadata[], errors: any[]): Ast {\n return new AnimationAstBuilderVisitor().build(metadata, errors);\n}\n\nconst /** @type {?} */ LEAVE_TOKEN = ':leave';\nconst /** @type {?} */ LEAVE_TOKEN_REGEX = new RegExp(LEAVE_TOKEN, 'g');\nconst /** @type {?} */ ENTER_TOKEN = ':enter';\nconst /** @type {?} */ ENTER_TOKEN_REGEX = new RegExp(ENTER_TOKEN, 'g');\nconst /** @type {?} */ ROOT_SELECTOR = '';\nexport class AnimationAstBuilderVisitor implements AnimationDslVisitor {\n/**\n * @param {?} metadata\n * @param {?} errors\n * @return {?}\n */\nbuild(metadata: AnimationMetadata|AnimationMetadata[], errors: any[]):\n Ast {\n const /** @type {?} */ context = new AnimationAstBuilderContext(errors);\n this._resetContextStyleTimingState(context);\n return /** @type {?} */(( >visitDslNode(\n this, normalizeAnimationEntry(metadata), context)));\n }\n/**\n * @param {?} context\n * @return {?}\n */\nprivate _resetContextStyleTimingState(context: AnimationAstBuilderContext) {\n context.currentQuerySelector = ROOT_SELECTOR;\n context.collectedStyles = {};\n context.collectedStyles[ROOT_SELECTOR] = {};\n context.currentTime = 0;\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitTrigger(metadata: AnimationTriggerMetadata, context: AnimationAstBuilderContext):\n TriggerAst {\n let /** @type {?} */ queryCount = context.queryCount = 0;\n let /** @type {?} */ depCount = context.depCount = 0;\n const /** @type {?} */ states: StateAst[] = [];\n const /** @type {?} */ transitions: TransitionAst[] = [];\n metadata.definitions.forEach(def => {\n this._resetContextStyleTimingState(context);\n if (def.type == AnimationMetadataType.State) {\n const /** @type {?} */ stateDef = /** @type {?} */(( def as AnimationStateMetadata));\n const /** @type {?} */ name = stateDef.name;\n name.split(/\\s*,\\s*/).forEach(n => {\n stateDef.name = n;\n states.push(this.visitState(stateDef, context));\n });\n stateDef.name = name;\n } else if (def.type == AnimationMetadataType.Transition) {\n const /** @type {?} */ transition = this.visitTransition( /** @type {?} */((def as AnimationTransitionMetadata)), context);\n queryCount += transition.queryCount;\n depCount += transition.depCount;\n transitions.push(transition);\n } else {\n context.errors.push(\n 'only state() and transition() definitions can sit inside of a trigger()');\n }\n });\n\n return {\n type: AnimationMetadataType.Trigger,\n name: metadata.name, states, transitions, queryCount, depCount,\n options: null\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitState(metadata: AnimationStateMetadata, context: AnimationAstBuilderContext): StateAst {\n const /** @type {?} */ styleAst = this.visitStyle(metadata.styles, context);\n const /** @type {?} */ astParams = (metadata.options && metadata.options.params) || null;\n if (styleAst.containsDynamicStyles) {\n const /** @type {?} */ missingSubs = new Set();\n const /** @type {?} */ params = astParams || {};\n styleAst.styles.forEach(value => {\n if (isObject(value)) {\n const /** @type {?} */ stylesObj = /** @type {?} */(( value as any));\n Object.keys(stylesObj).forEach(prop => {\n extractStyleParams(stylesObj[prop]).forEach(sub => {\n if (!params.hasOwnProperty(sub)) {\n missingSubs.add(sub);\n }\n });\n });\n }\n });\n if (missingSubs.size) {\n const /** @type {?} */ missingSubsArr = iteratorToArray(missingSubs.values());\n context.errors.push(\n `state(\"${metadata.name}\", ...) must define default values for all the following style substitutions: ${missingSubsArr.join(', ')}`);\n }\n }\n\n return {\n type: AnimationMetadataType.State,\n name: metadata.name,\n style: styleAst,\n options: astParams ? {params: astParams} : null\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitTransition(metadata: AnimationTransitionMetadata, context: AnimationAstBuilderContext):\n TransitionAst {\n context.queryCount = 0;\n context.depCount = 0;\n const /** @type {?} */ animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n const /** @type {?} */ matchers = parseTransitionExpr(metadata.expr, context.errors);\n\n return {\n type: AnimationMetadataType.Transition,\n matchers,\n animation,\n queryCount: context.queryCount,\n depCount: context.depCount,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitSequence(metadata: AnimationSequenceMetadata, context: AnimationAstBuilderContext):\n SequenceAst {\n return {\n type: AnimationMetadataType.Sequence,\n steps: metadata.steps.map(s => visitDslNode(this, s, context)),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitGroup(metadata: AnimationGroupMetadata, context: AnimationAstBuilderContext): GroupAst {\n const /** @type {?} */ currentTime = context.currentTime;\n let /** @type {?} */ furthestTime = 0;\n const /** @type {?} */ steps = metadata.steps.map(step => {\n context.currentTime = currentTime;\n const /** @type {?} */ innerAst = visitDslNode(this, step, context);\n furthestTime = Math.max(furthestTime, context.currentTime);\n return innerAst;\n });\n\n context.currentTime = furthestTime;\n return {\n type: AnimationMetadataType.Group,\n steps,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitAnimate(metadata: AnimationAnimateMetadata, context: AnimationAstBuilderContext):\n AnimateAst {\n const /** @type {?} */ timingAst = constructTimingAst(metadata.timings, context.errors);\n context.currentAnimateTimings = timingAst;\n\n let /** @type {?} */ styleAst: StyleAst|KeyframesAst;\n let /** @type {?} */ styleMetadata: AnimationMetadata = metadata.styles ? metadata.styles : style({});\n if (styleMetadata.type == AnimationMetadataType.Keyframes) {\n styleAst = this.visitKeyframes( /** @type {?} */((styleMetadata as AnimationKeyframesSequenceMetadata)), context);\n } else {\n let /** @type {?} */ styleMetadata = /** @type {?} */(( metadata.styles as AnimationStyleMetadata));\n let /** @type {?} */ isEmpty = false;\n if (!styleMetadata) {\n isEmpty = true;\n const /** @type {?} */ newStyleData: {[prop: string]: string | number} = {};\n if (timingAst.easing) {\n newStyleData['easing'] = timingAst.easing;\n }\n styleMetadata = style(newStyleData);\n }\n context.currentTime += timingAst.duration + timingAst.delay;\n const /** @type {?} */ _styleAst = this.visitStyle(styleMetadata, context);\n _styleAst.isEmptyStep = isEmpty;\n styleAst = _styleAst;\n }\n\n context.currentAnimateTimings = null;\n return {\n type: AnimationMetadataType.Animate,\n timings: timingAst,\n style: styleAst,\n options: null\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitStyle(metadata: AnimationStyleMetadata, context: AnimationAstBuilderContext): StyleAst {\n const /** @type {?} */ ast = this._makeStyleAst(metadata, context);\n this._validateStyleAst(ast, context);\n return ast;\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nprivate _makeStyleAst(metadata: AnimationStyleMetadata, context: AnimationAstBuilderContext):\n StyleAst {\n const /** @type {?} */ styles: (ɵStyleData | string)[] = [];\n if (Array.isArray(metadata.styles)) {\n ( /** @type {?} */((metadata.styles as(ɵStyleData | string)[]))).forEach(styleTuple => {\n if (typeof styleTuple == 'string') {\n if (styleTuple == AUTO_STYLE) {\n styles.push( /** @type {?} */((styleTuple as string)));\n } else {\n context.errors.push(`The provided style string value ${styleTuple} is not allowed.`);\n }\n } else {\n styles.push( /** @type {?} */((styleTuple as ɵStyleData)));\n }\n });\n } else {\n styles.push(metadata.styles);\n }\n\n let /** @type {?} */ containsDynamicStyles = false;\n let /** @type {?} */ collectedEasing: string|null = null;\n styles.forEach(styleData => {\n if (isObject(styleData)) {\n const /** @type {?} */ styleMap = /** @type {?} */(( styleData as ɵStyleData));\n const /** @type {?} */ easing = styleMap['easing'];\n if (easing) {\n collectedEasing = /** @type {?} */(( easing as string));\n delete styleMap['easing'];\n }\n if (!containsDynamicStyles) {\n for (let /** @type {?} */ prop in styleMap) {\n const /** @type {?} */ value = styleMap[prop];\n if (value.toString().indexOf(SUBSTITUTION_EXPR_START) >= 0) {\n containsDynamicStyles = true;\n break;\n }\n }\n }\n }\n });\n\n return {\n type: AnimationMetadataType.Style,\n styles,\n easing: collectedEasing,\n offset: metadata.offset, containsDynamicStyles,\n options: null\n };\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nprivate _validateStyleAst(ast: StyleAst, context: AnimationAstBuilderContext): void {\n const /** @type {?} */ timings = context.currentAnimateTimings;\n let /** @type {?} */ endTime = context.currentTime;\n let /** @type {?} */ startTime = context.currentTime;\n if (timings && startTime > 0) {\n startTime -= timings.duration + timings.delay;\n }\n\n ast.styles.forEach(tuple => {\n if (typeof tuple == 'string') return;\n\n Object.keys(tuple).forEach(prop => {\n const /** @type {?} */ collectedStyles = context.collectedStyles[ /** @type {?} */((context.currentQuerySelector))];\n const /** @type {?} */ collectedEntry = collectedStyles[prop];\n let /** @type {?} */ updateCollectedStyle = true;\n if (collectedEntry) {\n if (startTime != endTime && startTime >= collectedEntry.startTime &&\n endTime <= collectedEntry.endTime) {\n context.errors.push(\n `The CSS property \"${prop}\" that exists between the times of \"${collectedEntry.startTime}ms\" and \"${collectedEntry.endTime}ms\" is also being animated in a parallel animation between the times of \"${startTime}ms\" and \"${endTime}ms\"`);\n updateCollectedStyle = false;\n }\n\n // we always choose the smaller start time value since we\n // want to have a record of the entire animation window where\n // the style property is being animated in between\n startTime = collectedEntry.startTime;\n }\n\n if (updateCollectedStyle) {\n collectedStyles[prop] = {startTime, endTime};\n }\n\n if (context.options) {\n validateStyleParams(tuple[prop], context.options, context.errors);\n }\n });\n });\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitKeyframes(metadata: AnimationKeyframesSequenceMetadata, context: AnimationAstBuilderContext):\n KeyframesAst {\n const /** @type {?} */ ast: KeyframesAst = {type: AnimationMetadataType.Keyframes, styles: [], options: null};\n if (!context.currentAnimateTimings) {\n context.errors.push(`keyframes() must be placed inside of a call to animate()`);\n return ast;\n }\n\n const /** @type {?} */ MAX_KEYFRAME_OFFSET = 1;\n\n let /** @type {?} */ totalKeyframesWithOffsets = 0;\n const /** @type {?} */ offsets: number[] = [];\n let /** @type {?} */ offsetsOutOfOrder = false;\n let /** @type {?} */ keyframesOutOfRange = false;\n let /** @type {?} */ previousOffset: number = 0;\n\n const /** @type {?} */ keyframes: StyleAst[] = metadata.steps.map(styles => {\n const /** @type {?} */ style = this._makeStyleAst(styles, context);\n let /** @type {?} */ offsetVal: number|null =\n style.offset != null ? style.offset : consumeOffset(style.styles);\n let /** @type {?} */ offset: number = 0;\n if (offsetVal != null) {\n totalKeyframesWithOffsets++;\n offset = style.offset = offsetVal;\n }\n keyframesOutOfRange = keyframesOutOfRange || offset < 0 || offset > 1;\n offsetsOutOfOrder = offsetsOutOfOrder || offset < previousOffset;\n previousOffset = offset;\n offsets.push(offset);\n return style;\n });\n\n if (keyframesOutOfRange) {\n context.errors.push(`Please ensure that all keyframe offsets are between 0 and 1`);\n }\n\n if (offsetsOutOfOrder) {\n context.errors.push(`Please ensure that all keyframe offsets are in order`);\n }\n\n const /** @type {?} */ length = metadata.steps.length;\n let /** @type {?} */ generatedOffset = 0;\n if (totalKeyframesWithOffsets > 0 && totalKeyframesWithOffsets < length) {\n context.errors.push(`Not all style() steps within the declared keyframes() contain offsets`);\n } else if (totalKeyframesWithOffsets == 0) {\n generatedOffset = MAX_KEYFRAME_OFFSET / (length - 1);\n }\n\n const /** @type {?} */ limit = length - 1;\n const /** @type {?} */ currentTime = context.currentTime;\n const /** @type {?} */ currentAnimateTimings = /** @type {?} */(( context.currentAnimateTimings));\n const /** @type {?} */ animateDuration = currentAnimateTimings.duration;\n keyframes.forEach((kf, i) => {\n const /** @type {?} */ offset = generatedOffset > 0 ? (i == limit ? 1 : (generatedOffset * i)) : offsets[i];\n const /** @type {?} */ durationUpToThisFrame = offset * animateDuration;\n context.currentTime = currentTime + currentAnimateTimings.delay + durationUpToThisFrame;\n currentAnimateTimings.duration = durationUpToThisFrame;\n this._validateStyleAst(kf, context);\n kf.offset = offset;\n\n ast.styles.push(kf);\n });\n\n return ast;\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitReference(metadata: AnimationReferenceMetadata, context: AnimationAstBuilderContext):\n ReferenceAst {\n return {\n type: AnimationMetadataType.Reference,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitAnimateChild(metadata: AnimationAnimateChildMetadata, context: AnimationAstBuilderContext):\n AnimateChildAst {\n context.depCount++;\n return {\n type: AnimationMetadataType.AnimateChild,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitAnimateRef(metadata: AnimationAnimateRefMetadata, context: AnimationAstBuilderContext):\n AnimateRefAst {\n return {\n type: AnimationMetadataType.AnimateRef,\n animation: this.visitReference(metadata.animation, context),\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitQuery(metadata: AnimationQueryMetadata, context: AnimationAstBuilderContext): QueryAst {\n const /** @type {?} */ parentSelector = /** @type {?} */(( context.currentQuerySelector));\n const /** @type {?} */ options = /** @type {?} */(( (metadata.options || {}) as AnimationQueryOptions));\n\n context.queryCount++;\n context.currentQuery = metadata;\n const [selector, includeSelf] = normalizeSelector(metadata.selector);\n context.currentQuerySelector =\n parentSelector.length ? (parentSelector + ' ' + selector) : selector;\n getOrSetAsInMap(context.collectedStyles, context.currentQuerySelector, {});\n\n const /** @type {?} */ animation = visitDslNode(this, normalizeAnimationEntry(metadata.animation), context);\n context.currentQuery = null;\n context.currentQuerySelector = parentSelector;\n\n return {\n type: AnimationMetadataType.Query,\n selector,\n limit: options.limit || 0,\n optional: !!options.optional, includeSelf, animation,\n originalSelector: metadata.selector,\n options: normalizeAnimationOptions(metadata.options)\n };\n }\n/**\n * @param {?} metadata\n * @param {?} context\n * @return {?}\n */\nvisitStagger(metadata: AnimationStaggerMetadata, context: AnimationAstBuilderContext):\n StaggerAst {\n if (!context.currentQuery) {\n context.errors.push(`stagger() can only be used inside of query()`);\n }\n const /** @type {?} */ timings = metadata.timings === 'full' ?\n {duration: 0, delay: 0, easing: 'full'} :\n resolveTiming(metadata.timings, context.errors, true);\n\n return {\n type: AnimationMetadataType.Stagger,\n animation: visitDslNode(this, normalizeAnimationEntry(metadata.animation), context), timings,\n options: null\n };\n }\n}\n/**\n * @param {?} selector\n * @return {?}\n */\nfunction normalizeSelector(selector: string): [string, boolean] {\n const /** @type {?} */ hasAmpersand = selector.split(/\\s*,\\s*/).find(token => token == SELF_TOKEN) ? true : false;\n if (hasAmpersand) {\n selector = selector.replace(SELF_TOKEN_REGEX, '');\n }\n\n selector = selector.replace(ENTER_TOKEN_REGEX, ENTER_SELECTOR)\n .replace(LEAVE_TOKEN_REGEX, LEAVE_SELECTOR)\n .replace(/@\\*/g, NG_TRIGGER_SELECTOR)\n .replace(/@\\w+/g, match => NG_TRIGGER_SELECTOR + '-' + match.substr(1))\n .replace(/:animating/g, NG_ANIMATING_SELECTOR);\n\n return [selector, hasAmpersand];\n}\n/**\n * @param {?} obj\n * @return {?}\n */\nfunction normalizeParams(obj: {[key: string]: any} | any): {[key: string]: any}|null {\n return obj ? copyObj(obj) : null;\n}\n\nexport type StyleTimeTuple = {\n startTime: number; endTime: number;\n};\nexport class AnimationAstBuilderContext {\npublic queryCount: number = 0;\npublic depCount: number = 0;\npublic currentTransition: AnimationTransitionMetadata|null = null;\npublic currentQuery: AnimationQueryMetadata|null = null;\npublic currentQuerySelector: string|null = null;\npublic currentAnimateTimings: TimingAst|null = null;\npublic currentTime: number = 0;\npublic collectedStyles: {[selectorName: string]: {[propName: string]: StyleTimeTuple}} = {};\npublic options: AnimationOptions|null = null;\n/**\n * @param {?} errors\n */\nconstructor(public errors: any[]) {}\n}\n\nfunction AnimationAstBuilderContext_tsickle_Closure_declarations() {\n/** @type {?} */\nAnimationAstBuilderContext.prototype.queryCount;\n/** @type {?} */\nAnimationAstBuilderContext.prototype.depCount;\n/** @type {?} */\nAnimationAstBuilderContext.prototype.currentTransition;\n/** @type {?} */\nAnimationAstBuilderContext.prototype.currentQuery;\n/** @type {?} */\nAnimationAstBuilderContext.prototype.currentQuerySelector;\n/** @type {?} */\nAnimationAstBuilderContext.prototype.currentAnimateTimings;\n/** @type {?} */\nAnimationAstBuilderContext.prototype.currentTime;\n/** @type {?} */\nAnimationAstBuilderContext.prototype.collectedStyles;\n/** @type {?} */\nAnimationAstBuilderContext.prototype.options;\n/** @type {?} */\nAnimationAstBuilderContext.prototype.errors;\n}\n\n/**\n * @param {?} styles\n * @return {?}\n */\nfunction consumeOffset(styles: ɵStyleData | string | (ɵStyleData | string)[]): number|null {\n if (typeof styles == 'string') return null;\n\n let /** @type {?} */ offset: number|null = null;\n\n if (Array.isArray(styles)) {\n styles.forEach(styleTuple => {\n if (isObject(styleTuple) && styleTuple.hasOwnProperty('offset')) {\n const /** @type {?} */ obj = /** @type {?} */(( styleTuple as ɵStyleData));\n offset = parseFloat( /** @type {?} */((obj['offset'] as string)));\n delete obj['offset'];\n }\n });\n } else if (isObject(styles) && styles.hasOwnProperty('offset')) {\n const /** @type {?} */ obj = /** @type {?} */(( styles as ɵStyleData));\n offset = parseFloat( /** @type {?} */((obj['offset'] as string)));\n delete obj['offset'];\n }\n return offset;\n}\n/**\n * @param {?} value\n * @return {?}\n */\nfunction isObject(value: any): boolean {\n return !Array.isArray(value) && typeof value == 'object';\n}\n/**\n * @param {?} value\n * @param {?} errors\n * @return {?}\n */\nfunction constructTimingAst(value: string | number | AnimateTimings, errors: any[]) {\n let /** @type {?} */ timings: AnimateTimings|null = null;\n if (value.hasOwnProperty('duration')) {\n timings = /** @type {?} */(( value as AnimateTimings));\n } else if (typeof value == 'number') {\n const /** @type {?} */ duration = resolveTiming( /** @type {?} */((value as number)), errors).duration;\n return makeTimingAst( /** @type {?} */((duration as number)), 0, '');\n }\n\n const /** @type {?} */ strValue = /** @type {?} */(( value as string));\n const /** @type {?} */ isDynamic = strValue.split(/\\s+/).some(v => v.charAt(0) == '{' && v.charAt(1) == '{');\n if (isDynamic) {\n const /** @type {?} */ ast = /** @type {?} */(( makeTimingAst(0, 0, '') as any));\n ast.dynamic = true;\n ast.strValue = strValue;\n return /** @type {?} */(( ast as DynamicTimingAst));\n }\n\n timings = timings || resolveTiming(strValue, errors);\n return makeTimingAst(timings.duration, timings.delay, timings.easing);\n}\n/**\n * @param {?} options\n * @return {?}\n */\nfunction normalizeAnimationOptions(options: AnimationOptions | null): AnimationOptions {\n if (options) {\n options = copyObj(options);\n if (options['params']) {\n options['params'] = /** @type {?} */(( normalizeParams(options['params'])));\n }\n } else {\n options = {};\n }\n return options;\n}\n/**\n * @param {?} duration\n * @param {?} delay\n * @param {?} easing\n * @return {?}\n */\nfunction makeTimingAst(duration: number, delay: number, easing: string | null): TimingAst {\n return {duration, delay, easing};\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\nexport class ElementInstructionMap {\nprivate _map = new Map();\n/**\n * @param {?} element\n * @return {?}\n */\nconsume(element: any): AnimationTimelineInstruction[] {\n let /** @type {?} */ instructions = this._map.get(element);\n if (instructions) {\n this._map.delete(element);\n } else {\n instructions = [];\n }\n return instructions;\n }\n/**\n * @param {?} element\n * @param {?} instructions\n * @return {?}\n */\nappend(element: any, instructions: AnimationTimelineInstruction[]) {\n let /** @type {?} */ existingInstructions = this._map.get(element);\n if (!existingInstructions) {\n this._map.set(element, existingInstructions = []);\n }\n existingInstructions.push(...instructions);\n }\n/**\n * @param {?} element\n * @return {?}\n */\nhas(element: any): boolean { return this._map.has(element); }\n/**\n * @return {?}\n */\nclear() { this._map.clear(); }\n}\n\nfunction ElementInstructionMap_tsickle_Closure_declarations() {\n/** @type {?} */\nElementInstructionMap.prototype._map;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AUTO_STYLE, AnimateChildOptions, AnimateTimings, AnimationMetadataType, AnimationOptions, AnimationQueryOptions, ɵPRE_STYLE as PRE_STYLE, ɵStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {copyObj, copyStyles, interpolateParams, iteratorToArray, resolveTiming, resolveTimingValue, visitDslNode} from '../util';\n\nimport {AnimateAst, AnimateChildAst, AnimateRefAst, Ast, AstVisitor, DynamicTimingAst, GroupAst, KeyframesAst, QueryAst, ReferenceAst, SequenceAst, StaggerAst, StateAst, StyleAst, TimingAst, TransitionAst, TriggerAst} from './animation_ast';\nimport {AnimationTimelineInstruction, createTimelineInstruction} from './animation_timeline_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\n\nconst /** @type {?} */ ONE_FRAME_IN_MILLISECONDS = 1;\n/**\n * @param {?} driver\n * @param {?} rootElement\n * @param {?} ast\n * @param {?=} startingStyles\n * @param {?=} finalStyles\n * @param {?=} options\n * @param {?=} subInstructions\n * @param {?=} errors\n * @return {?}\n */\nexport function buildAnimationTimelines(\n driver: AnimationDriver, rootElement: any, ast: Ast,\n startingStyles: ɵStyleData = {}, finalStyles: ɵStyleData = {}, options: AnimationOptions,\n subInstructions?: ElementInstructionMap, errors: any[] = []): AnimationTimelineInstruction[] {\n return new AnimationTimelineBuilderVisitor().buildKeyframes(\n driver, rootElement, ast, startingStyles, finalStyles, options, subInstructions, errors);\n}\nexport class AnimationTimelineBuilderVisitor implements AstVisitor {\n/**\n * @param {?} driver\n * @param {?} rootElement\n * @param {?} ast\n * @param {?} startingStyles\n * @param {?} finalStyles\n * @param {?} options\n * @param {?=} subInstructions\n * @param {?=} errors\n * @return {?}\n */\nbuildKeyframes(\n driver: AnimationDriver, rootElement: any, ast: Ast,\n startingStyles: ɵStyleData, finalStyles: ɵStyleData, options: AnimationOptions,\n subInstructions?: ElementInstructionMap, errors: any[] = []): AnimationTimelineInstruction[] {\n subInstructions = subInstructions || new ElementInstructionMap();\n const /** @type {?} */ context = new AnimationTimelineContext(driver, rootElement, subInstructions, errors, []);\n context.options = options;\n context.currentTimeline.setStyles([startingStyles], null, context.errors, options);\n\n visitDslNode(this, ast, context);\n\n // this checks to see if an actual animation happened\n const /** @type {?} */ timelines = context.timelines.filter(timeline => timeline.containsAnimation());\n if (timelines.length && Object.keys(finalStyles).length) {\n const /** @type {?} */ tl = timelines[timelines.length - 1];\n if (!tl.allowOnlyTimelineStyles()) {\n tl.setStyles([finalStyles], null, context.errors, options);\n }\n }\n\n return timelines.length ? timelines.map(timeline => timeline.buildKeyframes()) :\n [createTimelineInstruction(rootElement, [], [], [], 0, 0, '', false)];\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitTrigger(ast: TriggerAst, context: AnimationTimelineContext): any {\n // these values are not visited in this AST\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitState(ast: StateAst, context: AnimationTimelineContext): any {\n // these values are not visited in this AST\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitTransition(ast: TransitionAst, context: AnimationTimelineContext): any {\n // these values are not visited in this AST\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitAnimateChild(ast: AnimateChildAst, context: AnimationTimelineContext): any {\n const /** @type {?} */ elementInstructions = context.subInstructions.consume(context.element);\n if (elementInstructions) {\n const /** @type {?} */ innerContext = context.createSubContext(ast.options);\n const /** @type {?} */ startTime = context.currentTimeline.currentTime;\n const /** @type {?} */ endTime = this._visitSubInstructions(\n elementInstructions, innerContext, /** @type {?} */(( innerContext.options as AnimateChildOptions)));\n if (startTime != endTime) {\n // we do this on the upper context because we created a sub context for\n // the sub child animations\n context.transformIntoNewTimeline(endTime);\n }\n }\n context.previousNode = ast;\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitAnimateRef(ast: AnimateRefAst, context: AnimationTimelineContext): any {\n const /** @type {?} */ innerContext = context.createSubContext(ast.options);\n innerContext.transformIntoNewTimeline();\n this.visitReference(ast.animation, innerContext);\n context.transformIntoNewTimeline(innerContext.currentTimeline.currentTime);\n context.previousNode = ast;\n }\n/**\n * @param {?} instructions\n * @param {?} context\n * @param {?} options\n * @return {?}\n */\nprivate _visitSubInstructions(\n instructions: AnimationTimelineInstruction[], context: AnimationTimelineContext,\n options: AnimateChildOptions): number {\n const /** @type {?} */ startTime = context.currentTimeline.currentTime;\n let /** @type {?} */ furthestTime = startTime;\n\n // this is a special-case for when a user wants to skip a sub\n // animation from being fired entirely.\n const /** @type {?} */ duration = options.duration != null ? resolveTimingValue(options.duration) : null;\n const /** @type {?} */ delay = options.delay != null ? resolveTimingValue(options.delay) : null;\n if (duration !== 0) {\n instructions.forEach(instruction => {\n const /** @type {?} */ instructionTimings =\n context.appendInstructionToTimeline(instruction, duration, delay);\n furthestTime =\n Math.max(furthestTime, instructionTimings.duration + instructionTimings.delay);\n });\n }\n\n return furthestTime;\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitReference(ast: ReferenceAst, context: AnimationTimelineContext) {\n context.updateOptions(ast.options, true);\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitSequence(ast: SequenceAst, context: AnimationTimelineContext) {\n const /** @type {?} */ subContextCount = context.subContextCount;\n let /** @type {?} */ ctx = context;\n const /** @type {?} */ options = ast.options;\n\n if (options && (options.params || options.delay)) {\n ctx = context.createSubContext(options);\n ctx.transformIntoNewTimeline();\n\n if (options.delay != null) {\n if (ctx.previousNode.type == AnimationMetadataType.Style) {\n ctx.currentTimeline.snapshotCurrentStyles();\n ctx.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n\n const /** @type {?} */ delay = resolveTimingValue(options.delay);\n ctx.delayNextStep(delay);\n }\n }\n\n if (ast.steps.length) {\n ast.steps.forEach(s => visitDslNode(this, s, ctx));\n\n // this is here just incase the inner steps only contain or end with a style() call\n ctx.currentTimeline.applyStylesToKeyframe();\n\n // this means that some animation function within the sequence\n // ended up creating a sub timeline (which means the current\n // timeline cannot overlap with the contents of the sequence)\n if (ctx.subContextCount > subContextCount) {\n ctx.transformIntoNewTimeline();\n }\n }\n\n context.previousNode = ast;\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitGroup(ast: GroupAst, context: AnimationTimelineContext) {\n const /** @type {?} */ innerTimelines: TimelineBuilder[] = [];\n let /** @type {?} */ furthestTime = context.currentTimeline.currentTime;\n const /** @type {?} */ delay = ast.options && ast.options.delay ? resolveTimingValue(ast.options.delay) : 0;\n\n ast.steps.forEach(s => {\n const /** @type {?} */ innerContext = context.createSubContext(ast.options);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n\n visitDslNode(this, s, innerContext);\n furthestTime = Math.max(furthestTime, innerContext.currentTimeline.currentTime);\n innerTimelines.push(innerContext.currentTimeline);\n });\n\n // this operation is run after the AST loop because otherwise\n // if the parent timeline's collected styles were updated then\n // it would pass in invalid data into the new-to-be forked items\n innerTimelines.forEach(\n timeline => context.currentTimeline.mergeTimelineCollectedStyles(timeline));\n context.transformIntoNewTimeline(furthestTime);\n context.previousNode = ast;\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nprivate _visitTiming(ast: TimingAst, context: AnimationTimelineContext): AnimateTimings {\n if (( /** @type {?} */((ast as DynamicTimingAst))).dynamic) {\n const /** @type {?} */ strValue = ( /** @type {?} */((ast as DynamicTimingAst))).strValue;\n const /** @type {?} */ timingValue =\n context.params ? interpolateParams(strValue, context.params, context.errors) : strValue;\n return resolveTiming(timingValue, context.errors);\n } else {\n return {duration: ast.duration, delay: ast.delay, easing: ast.easing};\n }\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitAnimate(ast: AnimateAst, context: AnimationTimelineContext) {\n const /** @type {?} */ timings = context.currentAnimateTimings = this._visitTiming(ast.timings, context);\n const /** @type {?} */ timeline = context.currentTimeline;\n if (timings.delay) {\n context.incrementTime(timings.delay);\n timeline.snapshotCurrentStyles();\n }\n\n const /** @type {?} */ style = ast.style;\n if (style.type == AnimationMetadataType.Keyframes) {\n this.visitKeyframes(style, context);\n } else {\n context.incrementTime(timings.duration);\n this.visitStyle( /** @type {?} */((style as StyleAst)), context);\n timeline.applyStylesToKeyframe();\n }\n\n context.currentAnimateTimings = null;\n context.previousNode = ast;\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitStyle(ast: StyleAst, context: AnimationTimelineContext) {\n const /** @type {?} */ timeline = context.currentTimeline;\n const /** @type {?} */ timings = /** @type {?} */(( context.currentAnimateTimings));\n\n // this is a special case for when a style() call\n // directly follows an animate() call (but not inside of an animate() call)\n if (!timings && timeline.getCurrentStyleProperties().length) {\n timeline.forwardFrame();\n }\n\n const /** @type {?} */ easing = (timings && timings.easing) || ast.easing;\n if (ast.isEmptyStep) {\n timeline.applyEmptyStep(easing);\n } else {\n timeline.setStyles(ast.styles, easing, context.errors, context.options);\n }\n\n context.previousNode = ast;\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitKeyframes(ast: KeyframesAst, context: AnimationTimelineContext) {\n const /** @type {?} */ currentAnimateTimings = /** @type {?} */(( context.currentAnimateTimings));\n const /** @type {?} */ startTime = ( /** @type {?} */((context.currentTimeline))).duration;\n const /** @type {?} */ duration = currentAnimateTimings.duration;\n const /** @type {?} */ innerContext = context.createSubContext();\n const /** @type {?} */ innerTimeline = innerContext.currentTimeline;\n innerTimeline.easing = currentAnimateTimings.easing;\n\n ast.styles.forEach(step => {\n const /** @type {?} */ offset: number = step.offset || 0;\n innerTimeline.forwardTime(offset * duration);\n innerTimeline.setStyles(step.styles, step.easing, context.errors, context.options);\n innerTimeline.applyStylesToKeyframe();\n });\n\n // this will ensure that the parent timeline gets all the styles from\n // the child even if the new timeline below is not used\n context.currentTimeline.mergeTimelineCollectedStyles(innerTimeline);\n\n // we do this because the window between this timeline and the sub timeline\n // should ensure that the styles within are exactly the same as they were before\n context.transformIntoNewTimeline(startTime + duration);\n context.previousNode = ast;\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitQuery(ast: QueryAst, context: AnimationTimelineContext) {\n // in the event that the first step before this is a style step we need\n // to ensure the styles are applied before the children are animated\n const /** @type {?} */ startTime = context.currentTimeline.currentTime;\n const /** @type {?} */ options = /** @type {?} */(( (ast.options || {}) as AnimationQueryOptions));\n const /** @type {?} */ delay = options.delay ? resolveTimingValue(options.delay) : 0;\n\n if (delay && (context.previousNode.type === AnimationMetadataType.Style ||\n (startTime == 0 && context.currentTimeline.getCurrentStyleProperties().length))) {\n context.currentTimeline.snapshotCurrentStyles();\n context.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n }\n\n let /** @type {?} */ furthestTime = startTime;\n const /** @type {?} */ elms = context.invokeQuery(\n ast.selector, ast.originalSelector, ast.limit, ast.includeSelf,\n options.optional ? true : false, context.errors);\n\n context.currentQueryTotal = elms.length;\n let /** @type {?} */ sameElementTimeline: TimelineBuilder|null = null;\n elms.forEach((element, i) => {\n\n context.currentQueryIndex = i;\n const /** @type {?} */ innerContext = context.createSubContext(ast.options, element);\n if (delay) {\n innerContext.delayNextStep(delay);\n }\n\n if (element === context.element) {\n sameElementTimeline = innerContext.currentTimeline;\n }\n\n visitDslNode(this, ast.animation, innerContext);\n\n // this is here just incase the inner steps only contain or end\n // with a style() call (which is here to signal that this is a preparatory\n // call to style an element before it is animated again)\n innerContext.currentTimeline.applyStylesToKeyframe();\n\n const /** @type {?} */ endTime = innerContext.currentTimeline.currentTime;\n furthestTime = Math.max(furthestTime, endTime);\n });\n\n context.currentQueryIndex = 0;\n context.currentQueryTotal = 0;\n context.transformIntoNewTimeline(furthestTime);\n\n if (sameElementTimeline) {\n context.currentTimeline.mergeTimelineCollectedStyles(sameElementTimeline);\n context.currentTimeline.snapshotCurrentStyles();\n }\n\n context.previousNode = ast;\n }\n/**\n * @param {?} ast\n * @param {?} context\n * @return {?}\n */\nvisitStagger(ast: StaggerAst, context: AnimationTimelineContext) {\n const /** @type {?} */ parentContext = /** @type {?} */(( context.parentContext));\n const /** @type {?} */ tl = context.currentTimeline;\n const /** @type {?} */ timings = ast.timings;\n const /** @type {?} */ duration = Math.abs(timings.duration);\n const /** @type {?} */ maxTime = duration * (context.currentQueryTotal - 1);\n let /** @type {?} */ delay = duration * context.currentQueryIndex;\n\n let /** @type {?} */ staggerTransformer = timings.duration < 0 ? 'reverse' : timings.easing;\n switch (staggerTransformer) {\n case 'reverse':\n delay = maxTime - delay;\n break;\n case 'full':\n delay = parentContext.currentStaggerTime;\n break;\n }\n\n const /** @type {?} */ timeline = context.currentTimeline;\n if (delay) {\n timeline.delayNextStep(delay);\n }\n\n const /** @type {?} */ startingTime = timeline.currentTime;\n visitDslNode(this, ast.animation, context);\n context.previousNode = ast;\n\n // time = duration + delay\n // the reason why this computation is so complex is because\n // the inner timeline may either have a delay value or a stretched\n // keyframe depending on if a subtimeline is not used or is used.\n parentContext.currentStaggerTime =\n (tl.currentTime - startingTime) + (tl.startTime - parentContext.currentTimeline.startTime);\n }\n}\n\nexport declare type StyleAtTime = {\n time: number; value: string | number;\n};\n\nconst /** @type {?} */ DEFAULT_NOOP_PREVIOUS_NODE = /** @type {?} */(( >{}));\nexport class AnimationTimelineContext {\npublic parentContext: AnimationTimelineContext|null = null;\npublic currentTimeline: TimelineBuilder;\npublic currentAnimateTimings: AnimateTimings|null = null;\npublic previousNode: Ast = DEFAULT_NOOP_PREVIOUS_NODE;\npublic subContextCount = 0;\npublic options: AnimationOptions = {};\npublic currentQueryIndex: number = 0;\npublic currentQueryTotal: number = 0;\npublic currentStaggerTime: number = 0;\n/**\n * @param {?} _driver\n * @param {?} element\n * @param {?} subInstructions\n * @param {?} errors\n * @param {?} timelines\n * @param {?=} initialTimeline\n */\nconstructor(\nprivate _driver: AnimationDriver,\npublic element: any,\npublic subInstructions: ElementInstructionMap,\npublic errors: any[],\npublic timelines: TimelineBuilder[], initialTimeline?: TimelineBuilder) {\n this.currentTimeline = initialTimeline || new TimelineBuilder(element, 0);\n timelines.push(this.currentTimeline);\n }\n/**\n * @return {?}\n */\nget params() { return this.options.params; }\n/**\n * @param {?} options\n * @param {?=} skipIfExists\n * @return {?}\n */\nupdateOptions(options: AnimationOptions|null, skipIfExists?: boolean) {\n if (!options) return;\n\n const /** @type {?} */ newOptions = /** @type {?} */(( options as any));\n let /** @type {?} */ optionsToUpdate = this.options;\n\n // NOTE: this will get patched up when other animation methods support duration overrides\n if (newOptions.duration != null) {\n ( /** @type {?} */((optionsToUpdate as any))).duration = resolveTimingValue(newOptions.duration);\n }\n\n if (newOptions.delay != null) {\n optionsToUpdate.delay = resolveTimingValue(newOptions.delay);\n }\n\n const /** @type {?} */ newParams = newOptions.params;\n if (newParams) {\n let /** @type {?} */ paramsToUpdate: {[name: string]: any} = /** @type {?} */(( optionsToUpdate.params));\n if (!paramsToUpdate) {\n paramsToUpdate = this.options.params = {};\n }\n\n Object.keys(newParams).forEach(name => {\n if (!skipIfExists || !paramsToUpdate.hasOwnProperty(name)) {\n paramsToUpdate[name] = interpolateParams(newParams[name], paramsToUpdate, this.errors);\n }\n });\n }\n }\n/**\n * @return {?}\n */\nprivate _copyOptions() {\n const /** @type {?} */ options: AnimationOptions = {};\n if (this.options) {\n const /** @type {?} */ oldParams = this.options.params;\n if (oldParams) {\n const /** @type {?} */ params: {[name: string]: any} = options['params'] = {};\n Object.keys(oldParams).forEach(name => { params[name] = oldParams[name]; });\n }\n }\n return options;\n }\n/**\n * @param {?=} options\n * @param {?=} element\n * @param {?=} newTime\n * @return {?}\n */\ncreateSubContext(options: AnimationOptions|null = null, element?: any, newTime?: number):\n AnimationTimelineContext {\n const /** @type {?} */ target = element || this.element;\n const /** @type {?} */ context = new AnimationTimelineContext(\n this._driver, target, this.subInstructions, this.errors, this.timelines,\n this.currentTimeline.fork(target, newTime || 0));\n context.previousNode = this.previousNode;\n context.currentAnimateTimings = this.currentAnimateTimings;\n\n context.options = this._copyOptions();\n context.updateOptions(options);\n\n context.currentQueryIndex = this.currentQueryIndex;\n context.currentQueryTotal = this.currentQueryTotal;\n context.parentContext = this;\n this.subContextCount++;\n return context;\n }\n/**\n * @param {?=} newTime\n * @return {?}\n */\ntransformIntoNewTimeline(newTime?: number) {\n this.previousNode = DEFAULT_NOOP_PREVIOUS_NODE;\n this.currentTimeline = this.currentTimeline.fork(this.element, newTime);\n this.timelines.push(this.currentTimeline);\n return this.currentTimeline;\n }\n/**\n * @param {?} instruction\n * @param {?} duration\n * @param {?} delay\n * @return {?}\n */\nappendInstructionToTimeline(\n instruction: AnimationTimelineInstruction, duration: number|null,\n delay: number|null): AnimateTimings {\n const /** @type {?} */ updatedTimings: AnimateTimings = {\n duration: duration != null ? duration : instruction.duration,\n delay: this.currentTimeline.currentTime + (delay != null ? delay : 0) + instruction.delay,\n easing: ''\n };\n const /** @type {?} */ builder = new SubTimelineBuilder(\n instruction.element, instruction.keyframes, instruction.preStyleProps,\n instruction.postStyleProps, updatedTimings, instruction.stretchStartingKeyframe);\n this.timelines.push(builder);\n return updatedTimings;\n }\n/**\n * @param {?} time\n * @return {?}\n */\nincrementTime(time: number) {\n this.currentTimeline.forwardTime(this.currentTimeline.duration + time);\n }\n/**\n * @param {?} delay\n * @return {?}\n */\ndelayNextStep(delay: number) {\n // negative delays are not yet supported\n if (delay > 0) {\n this.currentTimeline.delayNextStep(delay);\n }\n }\n/**\n * @param {?} selector\n * @param {?} originalSelector\n * @param {?} limit\n * @param {?} includeSelf\n * @param {?} optional\n * @param {?} errors\n * @return {?}\n */\ninvokeQuery(\n selector: string, originalSelector: string, limit: number, includeSelf: boolean,\n optional: boolean, errors: any[]): any[] {\n let /** @type {?} */ results: any[] = [];\n if (includeSelf) {\n results.push(this.element);\n }\n if (selector.length > 0) { // if :self is only used then the selector is empty\n const /** @type {?} */ multi = limit != 1;\n let /** @type {?} */ elements = this._driver.query(this.element, selector, multi);\n if (limit !== 0) {\n elements = elements.slice(0, limit);\n }\n results.push(...elements);\n }\n\n if (!optional && results.length == 0) {\n errors.push(\n `\\`query(\"${originalSelector}\")\\` returned zero elements. (Use \\`query(\"${originalSelector}\", { optional: true })\\` if you wish to allow this.)`);\n }\n return results;\n }\n}\n\nfunction AnimationTimelineContext_tsickle_Closure_declarations() {\n/** @type {?} */\nAnimationTimelineContext.prototype.parentContext;\n/** @type {?} */\nAnimationTimelineContext.prototype.currentTimeline;\n/** @type {?} */\nAnimationTimelineContext.prototype.currentAnimateTimings;\n/** @type {?} */\nAnimationTimelineContext.prototype.previousNode;\n/** @type {?} */\nAnimationTimelineContext.prototype.subContextCount;\n/** @type {?} */\nAnimationTimelineContext.prototype.options;\n/** @type {?} */\nAnimationTimelineContext.prototype.currentQueryIndex;\n/** @type {?} */\nAnimationTimelineContext.prototype.currentQueryTotal;\n/** @type {?} */\nAnimationTimelineContext.prototype.currentStaggerTime;\n/** @type {?} */\nAnimationTimelineContext.prototype._driver;\n/** @type {?} */\nAnimationTimelineContext.prototype.element;\n/** @type {?} */\nAnimationTimelineContext.prototype.subInstructions;\n/** @type {?} */\nAnimationTimelineContext.prototype.errors;\n/** @type {?} */\nAnimationTimelineContext.prototype.timelines;\n}\n\nexport class TimelineBuilder {\npublic duration: number = 0;\npublic easing: string|null;\nprivate _previousKeyframe: ɵStyleData = {};\nprivate _currentKeyframe: ɵStyleData = {};\nprivate _keyframes = new Map();\nprivate _styleSummary: {[prop: string]: StyleAtTime} = {};\nprivate _localTimelineStyles: ɵStyleData;\nprivate _globalTimelineStyles: ɵStyleData;\nprivate _pendingStyles: ɵStyleData = {};\nprivate _backFill: ɵStyleData = {};\nprivate _currentEmptyStepKeyframe: ɵStyleData|null = null;\n/**\n * @param {?} element\n * @param {?} startTime\n * @param {?=} _elementTimelineStylesLookup\n */\nconstructor(\npublic element: any,\npublic startTime: number,\nprivate _elementTimelineStylesLookup?: Map) {\n if (!this._elementTimelineStylesLookup) {\n this._elementTimelineStylesLookup = new Map();\n }\n\n this._localTimelineStyles = Object.create(this._backFill, {});\n this._globalTimelineStyles = this._elementTimelineStylesLookup.get(element) !;\n if (!this._globalTimelineStyles) {\n this._globalTimelineStyles = this._localTimelineStyles;\n this._elementTimelineStylesLookup.set(element, this._localTimelineStyles);\n }\n this._loadKeyframe();\n }\n/**\n * @return {?}\n */\ncontainsAnimation(): boolean {\n switch (this._keyframes.size) {\n case 0:\n return false;\n case 1:\n return this.getCurrentStyleProperties().length > 0;\n default:\n return true;\n }\n }\n/**\n * @return {?}\n */\ngetCurrentStyleProperties(): string[] { return Object.keys(this._currentKeyframe); }\n/**\n * @return {?}\n */\nget currentTime() { return this.startTime + this.duration; }\n/**\n * @param {?} delay\n * @return {?}\n */\ndelayNextStep(delay: number) {\n // in the event that a style() step is placed right before a stagger()\n // and that style() step is the very first style() value in the animation\n // then we need to make a copy of the keyframe [0, copy, 1] so that the delay\n // properly applies the style() values to work with the stagger...\n const /** @type {?} */ hasPreStyleStep = this._keyframes.size == 1 && Object.keys(this._pendingStyles).length;\n\n if (this.duration || hasPreStyleStep) {\n this.forwardTime(this.currentTime + delay);\n if (hasPreStyleStep) {\n this.snapshotCurrentStyles();\n }\n } else {\n this.startTime += delay;\n }\n }\n/**\n * @param {?} element\n * @param {?=} currentTime\n * @return {?}\n */\nfork(element: any, currentTime?: number): TimelineBuilder {\n this.applyStylesToKeyframe();\n return new TimelineBuilder(\n element, currentTime || this.currentTime, this._elementTimelineStylesLookup);\n }\n/**\n * @return {?}\n */\nprivate _loadKeyframe() {\n if (this._currentKeyframe) {\n this._previousKeyframe = this._currentKeyframe;\n }\n this._currentKeyframe = /** @type {?} */(( this._keyframes.get(this.duration)));\n if (!this._currentKeyframe) {\n this._currentKeyframe = Object.create(this._backFill, {});\n this._keyframes.set(this.duration, this._currentKeyframe);\n }\n }\n/**\n * @return {?}\n */\nforwardFrame() {\n this.duration += ONE_FRAME_IN_MILLISECONDS;\n this._loadKeyframe();\n }\n/**\n * @param {?} time\n * @return {?}\n */\nforwardTime(time: number) {\n this.applyStylesToKeyframe();\n this.duration = time;\n this._loadKeyframe();\n }\n/**\n * @param {?} prop\n * @param {?} value\n * @return {?}\n */\nprivate _updateStyle(prop: string, value: string|number) {\n this._localTimelineStyles[prop] = value;\n this._globalTimelineStyles[prop] = value;\n this._styleSummary[prop] = {time: this.currentTime, value};\n }\n/**\n * @return {?}\n */\nallowOnlyTimelineStyles() { return this._currentEmptyStepKeyframe !== this._currentKeyframe; }\n/**\n * @param {?} easing\n * @return {?}\n */\napplyEmptyStep(easing: string|null) {\n if (easing) {\n this._previousKeyframe['easing'] = easing;\n }\n\n // special case for animate(duration):\n // all missing styles are filled with a `*` value then\n // if any destination styles are filled in later on the same\n // keyframe then they will override the overridden styles\n // We use `_globalTimelineStyles` here because there may be\n // styles in previous keyframes that are not present in this timeline\n Object.keys(this._globalTimelineStyles).forEach(prop => {\n this._backFill[prop] = this._globalTimelineStyles[prop] || AUTO_STYLE;\n this._currentKeyframe[prop] = AUTO_STYLE;\n });\n this._currentEmptyStepKeyframe = this._currentKeyframe;\n }\n/**\n * @param {?} input\n * @param {?} easing\n * @param {?} errors\n * @param {?=} options\n * @return {?}\n */\nsetStyles(\n input: (ɵStyleData|string)[], easing: string|null, errors: any[],\n options?: AnimationOptions) {\n if (easing) {\n this._previousKeyframe['easing'] = easing;\n }\n\n const /** @type {?} */ params = (options && options.params) || {};\n const /** @type {?} */ styles = flattenStyles(input, this._globalTimelineStyles);\n Object.keys(styles).forEach(prop => {\n const /** @type {?} */ val = interpolateParams(styles[prop], params, errors);\n this._pendingStyles[prop] = val;\n if (!this._localTimelineStyles.hasOwnProperty(prop)) {\n this._backFill[prop] = this._globalTimelineStyles.hasOwnProperty(prop) ?\n this._globalTimelineStyles[prop] :\n AUTO_STYLE;\n }\n this._updateStyle(prop, val);\n });\n }\n/**\n * @return {?}\n */\napplyStylesToKeyframe() {\n const /** @type {?} */ styles = this._pendingStyles;\n const /** @type {?} */ props = Object.keys(styles);\n if (props.length == 0) return;\n\n this._pendingStyles = {};\n\n props.forEach(prop => {\n const /** @type {?} */ val = styles[prop];\n this._currentKeyframe[prop] = val;\n });\n\n Object.keys(this._localTimelineStyles).forEach(prop => {\n if (!this._currentKeyframe.hasOwnProperty(prop)) {\n this._currentKeyframe[prop] = this._localTimelineStyles[prop];\n }\n });\n }\n/**\n * @return {?}\n */\nsnapshotCurrentStyles() {\n Object.keys(this._localTimelineStyles).forEach(prop => {\n const /** @type {?} */ val = this._localTimelineStyles[prop];\n this._pendingStyles[prop] = val;\n this._updateStyle(prop, val);\n });\n }\n/**\n * @return {?}\n */\ngetFinalKeyframe() { return this._keyframes.get(this.duration); }\n/**\n * @return {?}\n */\nget properties() {\n const /** @type {?} */ properties: string[] = [];\n for (let /** @type {?} */ prop in this._currentKeyframe) {\n properties.push(prop);\n }\n return properties;\n }\n/**\n * @param {?} timeline\n * @return {?}\n */\nmergeTimelineCollectedStyles(timeline: TimelineBuilder) {\n Object.keys(timeline._styleSummary).forEach(prop => {\n const /** @type {?} */ details0 = this._styleSummary[prop];\n const /** @type {?} */ details1 = timeline._styleSummary[prop];\n if (!details0 || details1.time > details0.time) {\n this._updateStyle(prop, details1.value);\n }\n });\n }\n/**\n * @return {?}\n */\nbuildKeyframes(): AnimationTimelineInstruction {\n this.applyStylesToKeyframe();\n const /** @type {?} */ preStyleProps = new Set();\n const /** @type {?} */ postStyleProps = new Set();\n const /** @type {?} */ isEmpty = this._keyframes.size === 1 && this.duration === 0;\n\n let /** @type {?} */ finalKeyframes: ɵStyleData[] = [];\n this._keyframes.forEach((keyframe, time) => {\n const /** @type {?} */ finalKeyframe = copyStyles(keyframe, true);\n Object.keys(finalKeyframe).forEach(prop => {\n const /** @type {?} */ value = finalKeyframe[prop];\n if (value == PRE_STYLE) {\n preStyleProps.add(prop);\n } else if (value == AUTO_STYLE) {\n postStyleProps.add(prop);\n }\n });\n if (!isEmpty) {\n finalKeyframe['offset'] = time / this.duration;\n }\n finalKeyframes.push(finalKeyframe);\n });\n\n const /** @type {?} */ preProps: string[] = preStyleProps.size ? iteratorToArray(preStyleProps.values()) : [];\n const /** @type {?} */ postProps: string[] = postStyleProps.size ? iteratorToArray(postStyleProps.values()) : [];\n\n // special case for a 0-second animation (which is designed just to place styles onscreen)\n if (isEmpty) {\n const /** @type {?} */ kf0 = finalKeyframes[0];\n const /** @type {?} */ kf1 = copyObj(kf0);\n kf0['offset'] = 0;\n kf1['offset'] = 1;\n finalKeyframes = [kf0, kf1];\n }\n\n return createTimelineInstruction(\n this.element, finalKeyframes, preProps, postProps, this.duration, this.startTime,\n this.easing, false);\n }\n}\n\nfunction TimelineBuilder_tsickle_Closure_declarations() {\n/** @type {?} */\nTimelineBuilder.prototype.duration;\n/** @type {?} */\nTimelineBuilder.prototype.easing;\n/** @type {?} */\nTimelineBuilder.prototype._previousKeyframe;\n/** @type {?} */\nTimelineBuilder.prototype._currentKeyframe;\n/** @type {?} */\nTimelineBuilder.prototype._keyframes;\n/** @type {?} */\nTimelineBuilder.prototype._styleSummary;\n/** @type {?} */\nTimelineBuilder.prototype._localTimelineStyles;\n/** @type {?} */\nTimelineBuilder.prototype._globalTimelineStyles;\n/** @type {?} */\nTimelineBuilder.prototype._pendingStyles;\n/** @type {?} */\nTimelineBuilder.prototype._backFill;\n/** @type {?} */\nTimelineBuilder.prototype._currentEmptyStepKeyframe;\n/** @type {?} */\nTimelineBuilder.prototype.element;\n/** @type {?} */\nTimelineBuilder.prototype.startTime;\n/** @type {?} */\nTimelineBuilder.prototype._elementTimelineStylesLookup;\n}\n\nclass SubTimelineBuilder extends TimelineBuilder {\npublic timings: AnimateTimings;\n/**\n * @param {?} element\n * @param {?} keyframes\n * @param {?} preStyleProps\n * @param {?} postStyleProps\n * @param {?} timings\n * @param {?=} _stretchStartingKeyframe\n */\nconstructor(\npublic element: any,\npublic keyframes: ɵStyleData[],\npublic preStyleProps: string[],\npublic postStyleProps: string[], timings: AnimateTimings,\nprivate _stretchStartingKeyframe: boolean = false) {\n super(element, timings.delay);\n this.timings = {duration: timings.duration, delay: timings.delay, easing: timings.easing};\n }\n/**\n * @return {?}\n */\ncontainsAnimation(): boolean { return this.keyframes.length > 1; }\n/**\n * @return {?}\n */\nbuildKeyframes(): AnimationTimelineInstruction {\n let /** @type {?} */ keyframes = this.keyframes;\n let {delay, duration, easing} = this.timings;\n if (this._stretchStartingKeyframe && delay) {\n const /** @type {?} */ newKeyframes: ɵStyleData[] = [];\n const /** @type {?} */ totalTime = duration + delay;\n const /** @type {?} */ startingGap = delay / totalTime;\n\n // the original starting keyframe now starts once the delay is done\n const /** @type {?} */ newFirstKeyframe = copyStyles(keyframes[0], false);\n newFirstKeyframe['offset'] = 0;\n newKeyframes.push(newFirstKeyframe);\n\n const /** @type {?} */ oldFirstKeyframe = copyStyles(keyframes[0], false);\n oldFirstKeyframe['offset'] = roundOffset(startingGap);\n newKeyframes.push(oldFirstKeyframe);\n\n /*\n When the keyframe is stretched then it means that the delay before the animation\n starts is gone. Instead the first keyframe is placed at the start of the animation\n and it is then copied to where it starts when the original delay is over. This basically\n means nothing animates during that delay, but the styles are still renderered. For this\n to work the original offset values that exist in the original keyframes must be \"warped\"\n so that they can take the new keyframe + delay into account.\n\n delay=1000, duration=1000, keyframes = 0 .5 1\n\n turns into\n\n delay=0, duration=2000, keyframes = 0 .33 .66 1\n */\n\n // offsets between 1 ... n -1 are all warped by the keyframe stretch\n const /** @type {?} */ limit = keyframes.length - 1;\n for (let /** @type {?} */ i = 1; i <= limit; i++) {\n let /** @type {?} */ kf = copyStyles(keyframes[i], false);\n const /** @type {?} */ oldOffset = /** @type {?} */(( kf['offset'] as number));\n const /** @type {?} */ timeAtKeyframe = delay + oldOffset * duration;\n kf['offset'] = roundOffset(timeAtKeyframe / totalTime);\n newKeyframes.push(kf);\n }\n\n // the new starting keyframe should be added at the start\n duration = totalTime;\n delay = 0;\n easing = '';\n\n keyframes = newKeyframes;\n }\n\n return createTimelineInstruction(\n this.element, keyframes, this.preStyleProps, this.postStyleProps, duration, delay, easing,\n true);\n }\n}\n\nfunction SubTimelineBuilder_tsickle_Closure_declarations() {\n/** @type {?} */\nSubTimelineBuilder.prototype.timings;\n/** @type {?} */\nSubTimelineBuilder.prototype.element;\n/** @type {?} */\nSubTimelineBuilder.prototype.keyframes;\n/** @type {?} */\nSubTimelineBuilder.prototype.preStyleProps;\n/** @type {?} */\nSubTimelineBuilder.prototype.postStyleProps;\n/** @type {?} */\nSubTimelineBuilder.prototype._stretchStartingKeyframe;\n}\n\n/**\n * @param {?} offset\n * @param {?=} decimalPoints\n * @return {?}\n */\nfunction roundOffset(offset: number, decimalPoints = 3): number {\n const /** @type {?} */ mult = Math.pow(10, decimalPoints - 1);\n return Math.round(offset * mult) / mult;\n}\n/**\n * @param {?} input\n * @param {?} allStyles\n * @return {?}\n */\nfunction flattenStyles(input: (ɵStyleData | string)[], allStyles: ɵStyleData) {\n const /** @type {?} */ styles: ɵStyleData = {};\n let /** @type {?} */ allProperties: string[];\n input.forEach(token => {\n if (token === '*') {\n allProperties = allProperties || Object.keys(allStyles);\n allProperties.forEach(prop => { styles[prop] = AUTO_STYLE; });\n } else {\n copyStyles( /** @type {?} */((token as ɵStyleData)), false, styles);\n }\n });\n return styles;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {AnimationMetadata, AnimationMetadataType, AnimationOptions, ɵStyleData} from '@angular/animations';\n\nimport {AnimationDriver} from '../render/animation_driver';\nimport {normalizeStyles} from '../util';\n\nimport {Ast} from './animation_ast';\nimport {buildAnimationAst} from './animation_ast_builder';\nimport {buildAnimationTimelines} from './animation_timeline_builder';\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\nimport {ElementInstructionMap} from './element_instruction_map';\nexport class Animation {\nprivate _animationAst: Ast;\n/**\n * @param {?} _driver\n * @param {?} input\n */\nconstructor(private _driver: AnimationDriver, input: AnimationMetadata|AnimationMetadata[]) {\n const errors: any[] = [];\n const ast = buildAnimationAst(input, errors);\n if (errors.length) {\n const errorMessage = `animation validation failed:\\n${errors.join(\"\\n\")}`;\n throw new Error(errorMessage);\n }\n this._animationAst = ast;\n }\n/**\n * @param {?} element\n * @param {?} startingStyles\n * @param {?} destinationStyles\n * @param {?} options\n * @param {?=} subInstructions\n * @return {?}\n */\nbuildTimelines(\n element: any, startingStyles: ɵStyleData|ɵStyleData[],\n destinationStyles: ɵStyleData|ɵStyleData[], options: AnimationOptions,\n subInstructions?: ElementInstructionMap): AnimationTimelineInstruction[] {\n const /** @type {?} */ start = Array.isArray(startingStyles) ? normalizeStyles(startingStyles) : /** @type {?} */((\n <ɵStyleData>startingStyles));\n const /** @type {?} */ dest = Array.isArray(destinationStyles) ? normalizeStyles(destinationStyles) : /** @type {?} */((\n <ɵStyleData>destinationStyles));\n const /** @type {?} */ errors: any = [];\n subInstructions = subInstructions || new ElementInstructionMap();\n const /** @type {?} */ result = buildAnimationTimelines(\n this._driver, element, this._animationAst, start, dest, options, subInstructions, errors);\n if (errors.length) {\n const /** @type {?} */ errorMessage = `animation building failed:\\n${errors.join(\"\\n\")}`;\n throw new Error(errorMessage);\n }\n return result;\n }\n}\n\nfunction Animation_tsickle_Closure_declarations() {\n/** @type {?} */\nAnimation.prototype._animationAst;\n/** @type {?} */\nAnimation.prototype._driver;\n}\n\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\n/**\n * @experimental Animation support is experimental.\n */\nexport abstract class AnimationStyleNormalizer {\n abstract normalizePropertyName(propertyName: string, errors: string[]): string;\n abstract normalizeStyleValue(\n userProvidedProperty: string, normalizedProperty: string, value: string|number,\n errors: string[]): string;\n}\n\n/**\n * @experimental Animation support is experimental.\n */\nexport class NoopAnimationStyleNormalizer {\n normalizePropertyName(propertyName: string, errors: string[]): string { return propertyName; }\n\n normalizeStyleValue(\n userProvidedProperty: string, normalizedProperty: string, value: string|number,\n errors: string[]): string {\n return value;\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator.throw(value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = y[op[0] & 2 ? \"return\" : op[0] ? \"throw\" : \"next\"]) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [0, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { if (o[n]) i[n] = function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; }; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator];\r\n return m ? m.call(o) : typeof __values === \"function\" ? __values(o) : o[Symbol.iterator]();\r\n}","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AUTO_STYLE, AnimationEvent, AnimationPlayer, NoopAnimationPlayer, ɵAnimationGroupPlayer, ɵPRE_STYLE as PRE_STYLE, ɵStyleData} from '@angular/animations';\n\nimport {AnimationStyleNormalizer} from '../../src/dsl/style_normalization/animation_style_normalizer';\nimport {AnimationDriver} from '../../src/render/animation_driver';\n\nexport function optimizeGroupPlayer(players: AnimationPlayer[]): AnimationPlayer {\n switch (players.length) {\n case 0:\n return new NoopAnimationPlayer();\n case 1:\n return players[0];\n default:\n return new ɵAnimationGroupPlayer(players);\n }\n}\n\nexport function normalizeKeyframes(\n driver: AnimationDriver, normalizer: AnimationStyleNormalizer, element: any,\n keyframes: ɵStyleData[], preStyles: ɵStyleData = {},\n postStyles: ɵStyleData = {}): ɵStyleData[] {\n const errors: string[] = [];\n const normalizedKeyframes: ɵStyleData[] = [];\n let previousOffset = -1;\n let previousKeyframe: ɵStyleData|null = null;\n keyframes.forEach(kf => {\n const offset = kf['offset'] as number;\n const isSameOffset = offset == previousOffset;\n const normalizedKeyframe: ɵStyleData = (isSameOffset && previousKeyframe) || {};\n Object.keys(kf).forEach(prop => {\n let normalizedProp = prop;\n let normalizedValue = kf[prop];\n if (prop !== 'offset') {\n normalizedProp = normalizer.normalizePropertyName(normalizedProp, errors);\n switch (normalizedValue) {\n case PRE_STYLE:\n normalizedValue = preStyles[prop];\n break;\n\n case AUTO_STYLE:\n normalizedValue = postStyles[prop];\n break;\n\n default:\n normalizedValue =\n normalizer.normalizeStyleValue(prop, normalizedProp, normalizedValue, errors);\n break;\n }\n }\n normalizedKeyframe[normalizedProp] = normalizedValue;\n });\n if (!isSameOffset) {\n normalizedKeyframes.push(normalizedKeyframe);\n }\n previousKeyframe = normalizedKeyframe;\n previousOffset = offset;\n });\n if (errors.length) {\n const LINE_START = '\\n - ';\n throw new Error(\n `Unable to animate due to the following errors:${LINE_START}${errors.join(LINE_START)}`);\n }\n\n return normalizedKeyframes;\n}\n\nexport function listenOnPlayer(\n player: AnimationPlayer, eventName: string, event: AnimationEvent | undefined,\n callback: (event: any) => any) {\n switch (eventName) {\n case 'start':\n player.onStart(() => callback(event && copyAnimationEvent(event, 'start', player.totalTime)));\n break;\n case 'done':\n player.onDone(() => callback(event && copyAnimationEvent(event, 'done', player.totalTime)));\n break;\n case 'destroy':\n player.onDestroy(\n () => callback(event && copyAnimationEvent(event, 'destroy', player.totalTime)));\n break;\n }\n}\n\nexport function copyAnimationEvent(\n e: AnimationEvent, phaseName?: string, totalTime?: number): AnimationEvent {\n const event = makeAnimationEvent(\n e.element, e.triggerName, e.fromState, e.toState, phaseName || e.phaseName,\n totalTime == undefined ? e.totalTime : totalTime);\n const data = (e as any)['_data'];\n if (data != null) {\n (event as any)['_data'] = data;\n }\n return event;\n}\n\nexport function makeAnimationEvent(\n element: any, triggerName: string, fromState: string, toState: string, phaseName: string = '',\n totalTime: number = 0): AnimationEvent {\n return {element, triggerName, fromState, toState, phaseName, totalTime};\n}\n\nexport function getOrSetAsInMap(\n map: Map| {[key: string]: any}, key: any, defaultValue: any) {\n let value: any;\n if (map instanceof Map) {\n value = map.get(key);\n if (!value) {\n map.set(key, value = defaultValue);\n }\n } else {\n value = map[key];\n if (!value) {\n value = map[key] = defaultValue;\n }\n }\n return value;\n}\n\nexport function parseTimelineCommand(command: string): [string, string] {\n const separatorPos = command.indexOf(':');\n const id = command.substring(1, separatorPos);\n const action = command.substr(separatorPos + 1);\n return [id, action];\n}\n\nlet _contains: (elm1: any, elm2: any) => boolean = (elm1: any, elm2: any) => false;\nlet _matches: (element: any, selector: string) => boolean = (element: any, selector: string) =>\n false;\nlet _query: (element: any, selector: string, multi: boolean) => any[] =\n (element: any, selector: string, multi: boolean) => {\n return [];\n };\n\nif (typeof Element != 'undefined') {\n // this is well supported in all browsers\n _contains = (elm1: any, elm2: any) => { return elm1.contains(elm2) as boolean; };\n\n if (Element.prototype.matches) {\n _matches = (element: any, selector: string) => element.matches(selector);\n } else {\n const proto = Element.prototype as any;\n const fn = proto.matchesSelector || proto.mozMatchesSelector || proto.msMatchesSelector ||\n proto.oMatchesSelector || proto.webkitMatchesSelector;\n if (fn) {\n _matches = (element: any, selector: string) => fn.apply(element, [selector]);\n }\n }\n\n _query = (element: any, selector: string, multi: boolean): any[] => {\n let results: any[] = [];\n if (multi) {\n results.push(...element.querySelectorAll(selector));\n } else {\n const elm = element.querySelector(selector);\n if (elm) {\n results.push(elm);\n }\n }\n return results;\n };\n}\n\nexport const matchesElement = _matches;\nexport const containsElement = _contains;\nexport const invokeQuery = _query;\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport {AnimationPlayer, NoopAnimationPlayer} from '@angular/animations';\n\nimport {containsElement, invokeQuery, matchesElement} from './shared';\n\n\n/**\n * @experimental\n */\nexport class NoopAnimationDriver implements AnimationDriver {\n matchesElement(element: any, selector: string): boolean {\n return matchesElement(element, selector);\n }\n\n containsElement(elm1: any, elm2: any): boolean { return containsElement(elm1, elm2); }\n\n query(element: any, selector: string, multi: boolean): any[] {\n return invokeQuery(element, selector, multi);\n }\n\n computeStyle(element: any, prop: string, defaultValue?: string): string {\n return defaultValue || '';\n }\n\n animate(\n element: any, keyframes: {[key: string]: string | number}[], duration: number, delay: number,\n easing: string, previousPlayers: any[] = []): AnimationPlayer {\n return new NoopAnimationPlayer();\n }\n}\n\n/**\n * @experimental\n */\nexport abstract class AnimationDriver {\n static NOOP: AnimationDriver = new NoopAnimationDriver();\n\n abstract matchesElement(element: any, selector: string): boolean;\n\n abstract containsElement(elm1: any, elm2: any): boolean;\n\n abstract query(element: any, selector: string, multi: boolean): any[];\n\n abstract computeStyle(element: any, prop: string, defaultValue?: string): string;\n\n abstract animate(\n element: any, keyframes: {[key: string]: string | number}[], duration: number, delay: number,\n easing?: string|null, previousPlayers?: any[]): any;\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵStyleData} from '@angular/animations';\nimport {AnimationEngineInstruction, AnimationTransitionInstructionType} from '../render/animation_engine_instruction';\nimport {AnimationTimelineInstruction} from './animation_timeline_instruction';\n\nexport interface AnimationTransitionInstruction extends AnimationEngineInstruction {\n element: any;\n triggerName: string;\n isRemovalTransition: boolean;\n fromState: string;\n fromStyles: ɵStyleData;\n toState: string;\n toStyles: ɵStyleData;\n timelines: AnimationTimelineInstruction[];\n queriedElements: any[];\n preStyleProps: Map;\n postStyleProps: Map;\n errors?: any[];\n}\n/**\n * @param {?} element\n * @param {?} triggerName\n * @param {?} fromState\n * @param {?} toState\n * @param {?} isRemovalTransition\n * @param {?} fromStyles\n * @param {?} toStyles\n * @param {?} timelines\n * @param {?} queriedElements\n * @param {?} preStyleProps\n * @param {?} postStyleProps\n * @param {?=} errors\n * @return {?}\n */\nexport function createTransitionInstruction(\n element: any, triggerName: string, fromState: string, toState: string,\n isRemovalTransition: boolean, fromStyles: ɵStyleData, toStyles: ɵStyleData,\n timelines: AnimationTimelineInstruction[], queriedElements: any[],\n preStyleProps: Map,\n postStyleProps: Map,\n errors?: any[]): AnimationTransitionInstruction {\n return {\n type: AnimationTransitionInstructionType.TransitionAnimation,\n element,\n triggerName,\n isRemovalTransition,\n fromState,\n fromStyles,\n toState,\n toStyles,\n timelines,\n queriedElements,\n preStyleProps,\n postStyleProps,\n errors\n };\n}\n","/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport {ɵStyleData} from '@angular/animations';\nimport {AnimationEngineInstruction, AnimationTransitionInstructionType} from '../render/animation_engine_instruction';\n\nexport interface AnimationTimelineInstruction extends AnimationEngineInstruction {\n element: any;\n keyframes: ɵStyleData[];\n preStyleProps: string[];\n postStyleProps: string[];\n duration: number;\n delay: number;\n totalTime: number;\n easing: string|null;\n stretchStartingKeyframe?: boolean;\n subTimeline: boolean;\n}\n/**\n * @param {?} element\n * @param {?} keyframes\n * @param {?} preStyleProps\n * @param {?} postStyleProps\n * @param {?} duration\n * @param {?} delay\n * @param {?=} easing\n * @param {?=} subTimeline\n * @return {?}\n */\nexport function createTimelineInstruction(\n element: any, keyframes: ɵStyleData[], preStyleProps: string[], postStyleProps: string[],\n duration: number, delay: number, easing: string | null = null,\n subTimeline: boolean = false): AnimationTimelineInstruction {\n return {\n type: AnimationTransitionInstructionType.TimelineAnimation,\n element,\n keyframes,\n preStyleProps,\n postStyleProps,\n duration,\n delay,\n totalTime: duration + delay, easing, subTimeline\n };\n}\n","\n/**\n * @license \n * Copyright Google Inc. All Rights Reserved.\n * \n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nexport const ANY_STATE = '*';\nexport declare type TransitionMatcherFn = (fromState: any, toState: any) => boolean;\n/**\n * @param {?} transitionValue\n * @param {?} errors\n * @return {?}\n */\nexport function parseTransitionExpr(\n transitionValue: string | TransitionMatcherFn, errors: string[]): TransitionMatcherFn[] {\n const /** @type {?} */ expressions: TransitionMatcherFn[] = [];\n if (typeof transitionValue == 'string') {\n ( /** @type {?} */((transitionValue)))\n .split(/\\s*,\\s*/)\n .forEach(str => parseInnerTransitionStr(str, expressions, errors));\n } else {\n expressions.push( /** @type {?} */((transitionValue)));\n }\n return expressions;\n}\n/**\n * @param {?} eventStr\n * @param {?} expressions\n * @param {?} errors\n * @return {?}\n */\nfunction parseInnerTransitionStr(\n eventStr: string, expressions: TransitionMatcherFn[], errors: string[]) {\n if (eventStr[0] == ':') {\n eventStr = parseAnimationAlias(eventStr, errors);\n }\n const /** @type {?} */ match = eventStr.match(/^(\\*|[-\\w]+)\\s*()\\s*(\\*|[-\\w]+)$/);\n if (match == null || match.length < 4) {\n errors.push(`The provided transition expression \"${eventStr}\" is not supported`);\n return expressions;\n }\n\n const /** @type {?} */ fromState = match[1];\n const /** @type {?} */ separator = match[2];\n const /** @type {?} */ toState = match[3];\n expressions.push(makeLambdaFromStates(fromState, toState));\n\n const /** @type {?} */ isFullAnyStateExpr = fromState == ANY_STATE && toState == ANY_STATE;\n if (separator[0] == '<' && !isFullAnyStateExpr) {\n expressions.push(makeLambdaFromStates(toState, fromState));\n }\n}\n/**\n * @param {?} alias\n * @param {?} errors\n * @return {?}\n */\nfunction parseAnimationAlias(alias: string, errors: string[]): string {\n switch (alias) {\n case ':enter':\n return 'void => *';\n case ':leave':\n return '* => void';\n default:\n errors.push(`The transition alias value \"${alias}\" is not supported`);\n return '* => *';\n }\n}\n\nconst /** @type {?} */ TRUE_BOOLEAN_VALUES = new Set();\nTRUE_BOOLEAN_VALUES.add('true');\nTRUE_BOOLEAN_VALUES.add('1');\n\nconst /** @type {?} */ FALSE_BOOLEAN_VALUES = new Set();\nFALSE_BOOLEAN_VALUES.add('false');\nFALSE_BOOLEAN_VALUES.add('0');\n/**\n * @param {?} lhs\n * @param {?} rhs\n * @return {?}\n */\nfunction makeLambdaFromStates(lhs: string, rhs: string): TransitionMatcherFn {\n const /** @type {?} */ LHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(lhs) || FALSE_BOOLEAN_VALUES.has(lhs);\n const /** @type {?} */ RHS_MATCH_BOOLEAN = TRUE_BOOLEAN_VALUES.has(rhs) || FALSE_BOOLEAN_VALUES.has(rhs);\n\n return (fromState: any, toState: any): boolean => {\n let /** @type {?} */ lhsMatch = lhs == ANY_STATE || lhs == fromState;\n let /** @type {?} */ rhsMatch = rhs == ANY_STATE || rhs == toState;\n\n if (!lhsMatch && LHS_MATCH_BOOLEAN && typeof fromState === 'boolean') {\n lhsMatch = fromState ? TRUE_BOOLEAN_VALUES.has(lhs) : FALSE_BOOLEAN_VALUES.has(lhs);\n }\n if (!rhsMatch && RHS_MATCH_BOOLEAN && typeof toState === 'boolean') {\n rhsMatch = toState ? TRUE_BOOLEAN_VALUES.has(rhs) : FALSE_BOOLEAN_VALUES.has(rhs);\n }\n\n return lhsMatch && rhsMatch;\n };\n}\n"],"names":["player","parentPlayer","onDestroy","destroy","removeClass","element","players","queriedElements","size","queriedPlayerResults","get","length","push","apply","queriedInnerElements","this","driver","query","NG_ANIMATING_SELECTOR","j","queriedPlayers","activePlayers","filter","p","destroyed","removeNodesAfterAnimationDone","processLeaveNode","allLeaveNodes","rootPlayers","forEach","TransitionAnimationEngine","prototype","elementContainsData","namespaceId","containsData","details","REMOVAL_FLAG","playersByQueriedElement","has","_getPreviousPlayers","isQueriedElement","triggerName","toStateValue","queriedElementPlayers","elementPlayers","playersByElement","isRemovalAnimation_1","queued","_this","instruction","rootElement","targetNameSpaceId","isRemovalTransition","undefined","targetTriggerName","timelines","map","timelineInstruction","getOrSetAsInMap","allPreviousPlayersMap","realPlayer","getRealPlayer","beforeDestroy","allQueriedPlayers","allSubElements","Set","allNewPlayers","removedBeforeQueried","pp","postStyles","postStylesMap","keyframes","normalizeKeyframes","_normalizer","preStyles","_buildPlayer","previousPlayers","subTimeline","skippedPlayersMap","add","wrappedPlayer","TransitionAnimationPlayer","setRealPlayer","onDone","deleteOrUnsetInMap","allConsumedElements","addClass","_player","fn","onStart","AnimationEngine","registerTrigger","componentId","hostElement","name","metadata","cacheKey","trigger","_triggerCache","eventName","charAt","_transitionEngine","WebAnimationsPlayer","options","_onDoneFns","_onStartFns","_onDestroyFns","_initialized","_finished","_started","_destroyed","time","previousStyles","currentSnapshot","allowPreviousPlayerStylesMerge","_duration","_delay","_onFinish","_preparePlayerBeforeStart","styles","copyStyles","previousStyleProps","Object","keys","missingStyleProps_1","prop","startingKeyframe_1","hasOwnProperty","self_1","addEventListener","_triggerWebAnimation","hasStarted","finish","reset","play","_resetDomPlayerState","setPosition","currentTime","getPosition","configurable","_finalKeyframe","fill","delay","easing","playerOptions","WebAnimationsStyleNormalizer","normalizeStyleValue","userProvidedProperty","normalizedProperty","value","errors","unit","strVal","toString","trim","DIMENSIONAL_PROP_MAP","valAndSuffixMatch","match","AnimationTransitionFactory","build","currentState","nextState","currentOptions","nextOptions","subInstructions","transitionAnimationParams","ast","params","EMPTY_OBJECT","currentAnimationParams","currentStateStyles","buildStyles","nextAnimationParams","nextStateStyles","preStyleMap","Map","postStyleMap","isRemoval","animationOptions","assign","buildAnimationTimelines","animation","createTransitionInstruction","_triggerName","tl","elm","preProps","preStyleProps","postProps","AnimationStateStyles","finalStyles","combinedParams","copyObj","defaultParams","key","styleObj_1","val","interpolateParams","AnimationTrigger","transitionFactories","states","balanceProperties","TimelineAnimationEngine","create","id","instructions","_animations","autoStylesMap","_driver","EMPTY_INSTRUCTION_MAP","inst","postStyleProps","Error","join","computeStyle","_angular_animations","AUTO_STYLE","optimizeGroupPlayer","_playersById","command","args","register","_getPlayer","pause","restart","init","EMPTY_PLAYER_ARRAY","NULL_REMOVAL_STATE","setForRemoval","hasAnimation","StateValue","input","isObj","normalizeTriggerValue","absorbOptions","newParams","oldParams_2","AnimationTransitionNamespace","_engine","listen","phase","callback","_triggers","isTriggerEventValid","triggersWithStates","statesByElement","afterFlush","defaultToFallback","_getTrigger","NG_TRIGGER_CLASSNAME","set","fromState","toState","playersOnElement","transition","matchTransition","isFallbackTransition","fallbackTransition","totalQueuedPlayers","_queue","index","indexOf","splice","objEquals","fromStyles_1","matchStyles","toStyles_1","reportError","_destroyInnerNodes","context","animate","NG_TRIGGER_SELECTOR","containsClass","_hostClassName","innerNs","namespacesByHostElement","engine","doNotRecurse","childElementCount","triggerStates","players_1","currentPlayers","containsPotentialParentTransition","listeners","_elementListeners","visitedTriggers_1","listener","elementStates","DEFAULT_STATE_VALUE","insertNode","parent","drainQueuedTransitions","microtaskId","entry","baseEvent","makeAnimationEvent","listenOnPlayer","markedForDestroy","sort","a","b","d0","d1","find","newHostElements","disabledNodes","totalAnimations","_onRemovalComplete","onRemovalComplete","defineProperty","_balanceNamespaceList","ns","limit","_namespaceList","found","i","nextNamespace","containsElement","_fetchNamespace","markElementAsDisabled","removeNode","isElementNode","destroyInnerAnimations","containerElement","stateMap","DELETED_STATE_VALUE","whenRenderingDone","clearElementCache","flush","clear","collectedLeaveElements","cleanupFns","_flushAnimations","_flushFns","_whenQuietFns","subTimelines","ElementInstructionMap","skippedPlayers","queuedInstructions","allPreStyleElements","allPostStyleElements","disabledElementsSet","node","nodesThatAreDisabled","collectedEnterElements","createIsRootFilterFn","allEnterNodes","leaveNodesWithoutAnimations","allPlayers","erroneousTransitions","stretchStartingKeyframe","append","tuple","stringMap","props","setVal_1","setVal","errors_1","enterNodesWithoutAnimations","sortedParentElements","unshift","_beforeAnimationBuild","replacePostStylesAsPre","_a","cloakAndComputeStyles","preStylesMap","ɵPRE_STYLE","post","pre","subPlayers","innerPlayer","_buildAnimation","parentHasPriority","parentPlayers","eraseStyles","fromStyles","playersForElement","AnimationAstBuilderVisitor","visitTrigger","queryCount","depCount","transitions","definitions","def","_resetContextStyleTimingState","type","stateDef_1","split","n","visitState","visitTransition","styleAst","visitStyle","astParams","containsDynamicStyles","missingSubs_1","params_1","isObject","stylesObj_1","extractStyleParams","sub","missingSubsArr","iteratorToArray","values","visitDslNode","normalizeAnimationEntry","visitGroup","furthestTime","steps","step","innerAst","visitAnimate","timingAst","constructTimingAst","timings","currentAnimateTimings","styleMetadata","style","visitKeyframes","styleMetadata_1","isEmpty","newStyleData","duration","_styleAst","isEmptyStep","_makeStyleAst","Array","isArray","styleTuple","collectedEasing","styleData","styleMap","_validateStyleAst","endTime","startTime","updateCollectedStyle","collectedEntry","totalKeyframesWithOffsets","offsets","offsetsOutOfOrder","keyframesOutOfRange","previousOffset","style$$1","offsetVal","offset","consumeOffset","generatedOffset","animateDuration","kf","visitQuery","parentSelector","currentQuery","normalizeSelector","selector","includeSelf","currentQuerySelector","collectedStyles","visitStagger","AnimationAstBuilderContext","existingInstructions","_map","AnimationTimelineBuilderVisitor","buildKeyframes","startingStyles","AnimationTimelineContext","currentTimeline","setStyles","visitAnimateChild","elementInstructions","consume","_visitSubInstructions","resolveTimingValue","visitSequence","subContextCount","ctx","createSubContext","transformIntoNewTimeline","snapshotCurrentStyles","innerTimelines","innerContext","delayNextStep","_visitTiming","timeline","incrementTime","getCurrentStyleProperties","forwardFrame","innerTimeline","previousNode","DEFAULT_NOOP_PREVIOUS_NODE","elms","invokeQuery","originalSelector","optional","currentQueryTotal","sameElementTimeline","applyStylesToKeyframe","Math","max","parentContext","abs","maxTime","currentQueryIndex","initialTimeline","updateOptions","skipIfExists","newOptions","optionsToUpdate","paramsToUpdate_1","_copyOptions","newTime","target","fork","results","multi","elements","slice","TimelineBuilder","_elementTimelineStylesLookup","_previousKeyframe","_currentKeyframe","_keyframes","_styleSummary","_pendingStyles","_backFill","_currentEmptyStepKeyframe","_globalTimelineStyles","_loadKeyframe","hasPreStyleStep","flattenStyles","_localTimelineStyles","getFinalKeyframe","properties","details0","details1","keyframe","finalKeyframe","finalKeyframes","SubTimelineBuilder","containsAnimation","_stretchStartingKeyframe","timeAtKeyframe","oldOffset","roundOffset","totalTime","newKeyframes","Animation","buildTimelines","destinationStyles","start","normalizeStyles","dest","errorMessage","AnimationStyleNormalizer","NoopAnimationStyleNormalizer","normalizePropertyName","propertyName","ONE_SECOND","ENTER_SELECTOR","LEAVE_SELECTOR","PARAM_REGEX","RegExp","SUBSTITUTION_EXPR_START","DASH_CASE_REGEXP","createFallbackTransition","obj","key1","currentValues","delete","cloakVals","cloakElement","valuesMap","NULL_REMOVED_QUERIED_STATE","nodes","isRoot","nodeSet","knownRootContainer","parentNode","className","classList","classes","CLASSES_CACHE_KEY","_flattenGroupPlayersRecur","finalPlayers","k1","postEntry","preEntry","extendStatics","setPrototypeOf","__proto__","d","_contains","elm1","elm2","_query","Element","contains","matches","_matches","proto","fn_1","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","querySelectorAll","querySelector","NoopAnimationDriver","matchesElement","defaultValue","toStyles","createTimelineInstruction","allStyles","allProperties","token","NoopAnimationPlayer","ɵAnimationGroupPlayer","normalizer","normalizedKeyframes","previousKeyframe","isSameOffset","normalizedKeyframe","normalizedProp","normalizedValue","event","copyAnimationEvent","e","phaseName","data","parseTimelineCommand","separatorPos","substr","_convertTimeValueToMS","parseFloat","resolveTiming","allowNegativeValues","parseTimeExpression","exp","regex","delayMatch","floor","easingVal","containsErrors","startIndex","destination","normalizedStyles","readPrototype","camelProp","dashCaseToCamelCase","sequence","validateStyleParams","varName","exec","lastIndex","str","original","replace","_","localVal","iterator","arr","item","next","done","m","_i","arguments","toUpperCase","visitor","visitReference","visitAnimateRef","parseTransitionExpr","transitionValue","expressions","parseInnerTransitionStr","eventStr","parseAnimationAlias","alias","makeLambdaFromStates","lhs","rhs","LHS_MATCH_BOOLEAN","TRUE_BOOLEAN_VALUES","FALSE_BOOLEAN_VALUES","RHS_MATCH_BOOLEAN","lhsMatch","ANY_STATE","hasAmpersand","SELF_TOKEN","LEAVE_TOKEN_REGEX","makeTimingAst","strValue","normalizeAnimationOptions","exports","module","factory","require"],"mappings":";;;;;0BcAA,gBAAAqrB,UAAA,mBAAAC,QAAAC,QAAAF,QAAAG,QAAA;;;;;;;;;;;;ACuBA,QAAA/d,qBAAAnN,SAIA,OAAAA,QAAAK,QACA,IAAA,GACA,MAAA,IAAA4M,qBAAAgZ,mBACA,KAAA,GACA,MAAAjmB,SAAA,EAAA,SAAA,MAAA,IAAAiN,qBAAAiZ,sBAAAlmB,UAGA,QAAAkE,oBAAAxD,OAAAylB,WAAApmB,QAAAkE,UAAAG,UAAAL,gBACA,KAAIK,YAAwBA,kBAC5B,KAAAL,aAAAA,cACA,IAAAiF,WACAod,uBACAjL,gBAAA,EACAkL,iBAAA,IAsCA,IArCApiB,UAAA1C,QAAA,SAAAma,IACA,GAAAJ,QAAAI,GAAA,OACA4K,aAAAhL,QAAAH,eAEAoL,mBAAAD,cAAAD,oBACAjf,QAAAC,KAAAqU,IAAYna,QAAZ,SAAAgG,MACA,GAAAif,gBAAAjf,KAEAkf,gBAAA/K,GAAAnU,KACA,IAAA,WAAAA,KAEA,OADAif,eAAAL,WAAA/D,sBAAAoE,eAAAxd,QACYyd,iBACZ,IAAAxZ,qBAAAuJ,WACAiQ,gBAAAriB,UAAAmD,KACA,MACA,KAAA0F,qBAAAC,WACAuZ,gBAAA1iB,WAAAwD,KACA,MACA,SACAkf,gBACAN,WAAAvd,oBAAArB,KAAAif,eAAAC,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