123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915 |
- /**
- * @license Angular v5.2.11
- * (c) 2010-2018 Google, Inc. https://angular.io/
- * License: MIT
- */
- (function (global, factory) {
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/platform-browser'), require('@angular/animations'), require('@angular/animations/browser')) :
- typeof define === 'function' && define.amd ? define('@angular/platform-browser/animations', ['exports', '@angular/core', '@angular/platform-browser', '@angular/animations', '@angular/animations/browser'], factory) :
- (factory((global.ng = global.ng || {}, global.ng.platformBrowser = global.ng.platformBrowser || {}, global.ng.platformBrowser.animations = {}),global.ng.core,global.ng.platformBrowser,global.ng.animations,global.ng.animations.browser));
- }(this, (function (exports,_angular_core,_angular_platformBrowser,_angular_animations,_angular_animations_browser) { 'use strict';
-
- /*! *****************************************************************************
- Copyright (c) Microsoft Corporation. All rights reserved.
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of the
- License at http://www.apache.org/licenses/LICENSE-2.0
-
- THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
- WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
- MERCHANTABLITY OR NON-INFRINGEMENT.
-
- See the Apache Version 2.0 License for specific language governing permissions
- and limitations under the License.
- ***************************************************************************** */
- /* global Reflect, Promise */
-
- var extendStatics = Object.setPrototypeOf ||
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
-
- function __extends(d, b) {
- extendStatics(d, b);
- function __() { this.constructor = d; }
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
- }
-
- /**
- * @license Angular v5.2.11
- * (c) 2010-2018 Google, Inc. https://angular.io/
- * License: MIT
- */
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes} checked by tsc
- */
- var BrowserAnimationBuilder = /** @class */ (function (_super) {
- __extends(BrowserAnimationBuilder, _super);
- function BrowserAnimationBuilder(rootRenderer, doc) {
- var _this = _super.call(this) || this;
- _this._nextAnimationId = 0;
- var /** @type {?} */ typeData = /** @type {?} */ ({
- id: '0',
- encapsulation: _angular_core.ViewEncapsulation.None,
- styles: [],
- data: { animation: [] }
- });
- _this._renderer = /** @type {?} */ (rootRenderer.createRenderer(doc.body, typeData));
- return _this;
- }
- /**
- * @param {?} animation
- * @return {?}
- */
- BrowserAnimationBuilder.prototype.build = /**
- * @param {?} animation
- * @return {?}
- */
- function (animation) {
- var /** @type {?} */ id = this._nextAnimationId.toString();
- this._nextAnimationId++;
- var /** @type {?} */ entry = Array.isArray(animation) ? _angular_animations.sequence(animation) : animation;
- issueAnimationCommand(this._renderer, null, id, 'register', [entry]);
- return new BrowserAnimationFactory(id, this._renderer);
- };
- BrowserAnimationBuilder.decorators = [
- { type: _angular_core.Injectable },
- ];
- /** @nocollapse */
- BrowserAnimationBuilder.ctorParameters = function () { return [
- { type: _angular_core.RendererFactory2, },
- { type: undefined, decorators: [{ type: _angular_core.Inject, args: [_angular_platformBrowser.DOCUMENT,] },] },
- ]; };
- return BrowserAnimationBuilder;
- }(_angular_animations.AnimationBuilder));
- var BrowserAnimationFactory = /** @class */ (function (_super) {
- __extends(BrowserAnimationFactory, _super);
- function BrowserAnimationFactory(_id, _renderer) {
- var _this = _super.call(this) || this;
- _this._id = _id;
- _this._renderer = _renderer;
- return _this;
- }
- /**
- * @param {?} element
- * @param {?=} options
- * @return {?}
- */
- BrowserAnimationFactory.prototype.create = /**
- * @param {?} element
- * @param {?=} options
- * @return {?}
- */
- function (element, options) {
- return new RendererAnimationPlayer(this._id, element, options || {}, this._renderer);
- };
- return BrowserAnimationFactory;
- }(_angular_animations.AnimationFactory));
- var RendererAnimationPlayer = /** @class */ (function () {
- function RendererAnimationPlayer(id, element, options, _renderer) {
- this.id = id;
- this.element = element;
- this._renderer = _renderer;
- this.parentPlayer = null;
- this._started = false;
- this.totalTime = 0;
- this._command('create', options);
- }
- /**
- * @param {?} eventName
- * @param {?} callback
- * @return {?}
- */
- RendererAnimationPlayer.prototype._listen = /**
- * @param {?} eventName
- * @param {?} callback
- * @return {?}
- */
- function (eventName, callback) {
- return this._renderer.listen(this.element, "@@" + this.id + ":" + eventName, callback);
- };
- /**
- * @param {?} command
- * @param {...?} args
- * @return {?}
- */
- RendererAnimationPlayer.prototype._command = /**
- * @param {?} command
- * @param {...?} args
- * @return {?}
- */
- function (command) {
- var args = [];
- for (var _i = 1; _i < arguments.length; _i++) {
- args[_i - 1] = arguments[_i];
- }
- return issueAnimationCommand(this._renderer, this.element, this.id, command, args);
- };
- /**
- * @param {?} fn
- * @return {?}
- */
- RendererAnimationPlayer.prototype.onDone = /**
- * @param {?} fn
- * @return {?}
- */
- function (fn) { this._listen('done', fn); };
- /**
- * @param {?} fn
- * @return {?}
- */
- RendererAnimationPlayer.prototype.onStart = /**
- * @param {?} fn
- * @return {?}
- */
- function (fn) { this._listen('start', fn); };
- /**
- * @param {?} fn
- * @return {?}
- */
- RendererAnimationPlayer.prototype.onDestroy = /**
- * @param {?} fn
- * @return {?}
- */
- function (fn) { this._listen('destroy', fn); };
- /**
- * @return {?}
- */
- RendererAnimationPlayer.prototype.init = /**
- * @return {?}
- */
- function () { this._command('init'); };
- /**
- * @return {?}
- */
- RendererAnimationPlayer.prototype.hasStarted = /**
- * @return {?}
- */
- function () { return this._started; };
- /**
- * @return {?}
- */
- RendererAnimationPlayer.prototype.play = /**
- * @return {?}
- */
- function () {
- this._command('play');
- this._started = true;
- };
- /**
- * @return {?}
- */
- RendererAnimationPlayer.prototype.pause = /**
- * @return {?}
- */
- function () { this._command('pause'); };
- /**
- * @return {?}
- */
- RendererAnimationPlayer.prototype.restart = /**
- * @return {?}
- */
- function () { this._command('restart'); };
- /**
- * @return {?}
- */
- RendererAnimationPlayer.prototype.finish = /**
- * @return {?}
- */
- function () { this._command('finish'); };
- /**
- * @return {?}
- */
- RendererAnimationPlayer.prototype.destroy = /**
- * @return {?}
- */
- function () { this._command('destroy'); };
- /**
- * @return {?}
- */
- RendererAnimationPlayer.prototype.reset = /**
- * @return {?}
- */
- function () { this._command('reset'); };
- /**
- * @param {?} p
- * @return {?}
- */
- RendererAnimationPlayer.prototype.setPosition = /**
- * @param {?} p
- * @return {?}
- */
- function (p) { this._command('setPosition', p); };
- /**
- * @return {?}
- */
- RendererAnimationPlayer.prototype.getPosition = /**
- * @return {?}
- */
- function () { return 0; };
- return RendererAnimationPlayer;
- }());
- /**
- * @param {?} renderer
- * @param {?} element
- * @param {?} id
- * @param {?} command
- * @param {?} args
- * @return {?}
- */
- function issueAnimationCommand(renderer, element, id, command, args) {
- return renderer.setProperty(element, "@@" + id + ":" + command, args);
- }
-
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes} checked by tsc
- */
- var ANIMATION_PREFIX = '@';
- var DISABLE_ANIMATIONS_FLAG = '@.disabled';
- var AnimationRendererFactory = /** @class */ (function () {
- function AnimationRendererFactory(delegate, engine, _zone) {
- this.delegate = delegate;
- this.engine = engine;
- this._zone = _zone;
- this._currentId = 0;
- this._microtaskId = 1;
- this._animationCallbacksBuffer = [];
- this._rendererCache = new Map();
- this._cdRecurDepth = 0;
- this.promise = Promise.resolve(0);
- engine.onRemovalComplete = function (element, delegate) {
- // Note: if an component element has a leave animation, and the component
- // a host leave animation, the view engine will call `removeChild` for the parent
- // component renderer as well as for the child component renderer.
- // Therefore, we need to check if we already removed the element.
- if (delegate && delegate.parentNode(element)) {
- delegate.removeChild(element.parentNode, element);
- }
- };
- }
- /**
- * @param {?} hostElement
- * @param {?} type
- * @return {?}
- */
- AnimationRendererFactory.prototype.createRenderer = /**
- * @param {?} hostElement
- * @param {?} type
- * @return {?}
- */
- function (hostElement, type) {
- var _this = this;
- var /** @type {?} */ EMPTY_NAMESPACE_ID = '';
- // cache the delegates to find out which cached delegate can
- // be used by which cached renderer
- var /** @type {?} */ delegate = this.delegate.createRenderer(hostElement, type);
- if (!hostElement || !type || !type.data || !type.data['animation']) {
- var /** @type {?} */ renderer = this._rendererCache.get(delegate);
- if (!renderer) {
- renderer = new BaseAnimationRenderer(EMPTY_NAMESPACE_ID, delegate, this.engine);
- // only cache this result when the base renderer is used
- this._rendererCache.set(delegate, renderer);
- }
- return renderer;
- }
- var /** @type {?} */ componentId = type.id;
- var /** @type {?} */ namespaceId = type.id + '-' + this._currentId;
- this._currentId++;
- this.engine.register(namespaceId, hostElement);
- var /** @type {?} */ animationTriggers = /** @type {?} */ (type.data['animation']);
- animationTriggers.forEach(function (trigger) {
- return _this.engine.registerTrigger(componentId, namespaceId, hostElement, trigger.name, trigger);
- });
- return new AnimationRenderer(this, namespaceId, delegate, this.engine);
- };
- /**
- * @return {?}
- */
- AnimationRendererFactory.prototype.begin = /**
- * @return {?}
- */
- function () {
- this._cdRecurDepth++;
- if (this.delegate.begin) {
- this.delegate.begin();
- }
- };
- /**
- * @return {?}
- */
- AnimationRendererFactory.prototype._scheduleCountTask = /**
- * @return {?}
- */
- function () {
- var _this = this;
- // always use promise to schedule microtask instead of use Zone
- this.promise.then(function () { _this._microtaskId++; });
- };
- /* @internal */
- /**
- * @param {?} count
- * @param {?} fn
- * @param {?} data
- * @return {?}
- */
- AnimationRendererFactory.prototype.scheduleListenerCallback = /**
- * @param {?} count
- * @param {?} fn
- * @param {?} data
- * @return {?}
- */
- function (count, fn, data) {
- var _this = this;
- if (count >= 0 && count < this._microtaskId) {
- this._zone.run(function () { return fn(data); });
- return;
- }
- if (this._animationCallbacksBuffer.length == 0) {
- Promise.resolve(null).then(function () {
- _this._zone.run(function () {
- _this._animationCallbacksBuffer.forEach(function (tuple) {
- var fn = tuple[0], data = tuple[1];
- fn(data);
- });
- _this._animationCallbacksBuffer = [];
- });
- });
- }
- this._animationCallbacksBuffer.push([fn, data]);
- };
- /**
- * @return {?}
- */
- AnimationRendererFactory.prototype.end = /**
- * @return {?}
- */
- function () {
- var _this = this;
- this._cdRecurDepth--;
- // this is to prevent animations from running twice when an inner
- // component does CD when a parent component insted has inserted it
- if (this._cdRecurDepth == 0) {
- this._zone.runOutsideAngular(function () {
- _this._scheduleCountTask();
- _this.engine.flush(_this._microtaskId);
- });
- }
- if (this.delegate.end) {
- this.delegate.end();
- }
- };
- /**
- * @return {?}
- */
- AnimationRendererFactory.prototype.whenRenderingDone = /**
- * @return {?}
- */
- function () { return this.engine.whenRenderingDone(); };
- AnimationRendererFactory.decorators = [
- { type: _angular_core.Injectable },
- ];
- /** @nocollapse */
- AnimationRendererFactory.ctorParameters = function () { return [
- { type: _angular_core.RendererFactory2, },
- { type: _angular_animations_browser.ɵAnimationEngine, },
- { type: _angular_core.NgZone, },
- ]; };
- return AnimationRendererFactory;
- }());
- var BaseAnimationRenderer = /** @class */ (function () {
- function BaseAnimationRenderer(namespaceId, delegate, engine) {
- this.namespaceId = namespaceId;
- this.delegate = delegate;
- this.engine = engine;
- this.destroyNode = this.delegate.destroyNode ? function (n) { return ((delegate.destroyNode))(n); } : null;
- }
- Object.defineProperty(BaseAnimationRenderer.prototype, "data", {
- get: /**
- * @return {?}
- */
- function () { return this.delegate.data; },
- enumerable: true,
- configurable: true
- });
- /**
- * @return {?}
- */
- BaseAnimationRenderer.prototype.destroy = /**
- * @return {?}
- */
- function () {
- this.engine.destroy(this.namespaceId, this.delegate);
- this.delegate.destroy();
- };
- /**
- * @param {?} name
- * @param {?=} namespace
- * @return {?}
- */
- BaseAnimationRenderer.prototype.createElement = /**
- * @param {?} name
- * @param {?=} namespace
- * @return {?}
- */
- function (name, namespace) {
- return this.delegate.createElement(name, namespace);
- };
- /**
- * @param {?} value
- * @return {?}
- */
- BaseAnimationRenderer.prototype.createComment = /**
- * @param {?} value
- * @return {?}
- */
- function (value) { return this.delegate.createComment(value); };
- /**
- * @param {?} value
- * @return {?}
- */
- BaseAnimationRenderer.prototype.createText = /**
- * @param {?} value
- * @return {?}
- */
- function (value) { return this.delegate.createText(value); };
- /**
- * @param {?} parent
- * @param {?} newChild
- * @return {?}
- */
- BaseAnimationRenderer.prototype.appendChild = /**
- * @param {?} parent
- * @param {?} newChild
- * @return {?}
- */
- function (parent, newChild) {
- this.delegate.appendChild(parent, newChild);
- this.engine.onInsert(this.namespaceId, newChild, parent, false);
- };
- /**
- * @param {?} parent
- * @param {?} newChild
- * @param {?} refChild
- * @return {?}
- */
- BaseAnimationRenderer.prototype.insertBefore = /**
- * @param {?} parent
- * @param {?} newChild
- * @param {?} refChild
- * @return {?}
- */
- function (parent, newChild, refChild) {
- this.delegate.insertBefore(parent, newChild, refChild);
- this.engine.onInsert(this.namespaceId, newChild, parent, true);
- };
- /**
- * @param {?} parent
- * @param {?} oldChild
- * @return {?}
- */
- BaseAnimationRenderer.prototype.removeChild = /**
- * @param {?} parent
- * @param {?} oldChild
- * @return {?}
- */
- function (parent, oldChild) {
- this.engine.onRemove(this.namespaceId, oldChild, this.delegate);
- };
- /**
- * @param {?} selectorOrNode
- * @return {?}
- */
- BaseAnimationRenderer.prototype.selectRootElement = /**
- * @param {?} selectorOrNode
- * @return {?}
- */
- function (selectorOrNode) { return this.delegate.selectRootElement(selectorOrNode); };
- /**
- * @param {?} node
- * @return {?}
- */
- BaseAnimationRenderer.prototype.parentNode = /**
- * @param {?} node
- * @return {?}
- */
- function (node) { return this.delegate.parentNode(node); };
- /**
- * @param {?} node
- * @return {?}
- */
- BaseAnimationRenderer.prototype.nextSibling = /**
- * @param {?} node
- * @return {?}
- */
- function (node) { return this.delegate.nextSibling(node); };
- /**
- * @param {?} el
- * @param {?} name
- * @param {?} value
- * @param {?=} namespace
- * @return {?}
- */
- BaseAnimationRenderer.prototype.setAttribute = /**
- * @param {?} el
- * @param {?} name
- * @param {?} value
- * @param {?=} namespace
- * @return {?}
- */
- function (el, name, value, namespace) {
- this.delegate.setAttribute(el, name, value, namespace);
- };
- /**
- * @param {?} el
- * @param {?} name
- * @param {?=} namespace
- * @return {?}
- */
- BaseAnimationRenderer.prototype.removeAttribute = /**
- * @param {?} el
- * @param {?} name
- * @param {?=} namespace
- * @return {?}
- */
- function (el, name, namespace) {
- this.delegate.removeAttribute(el, name, namespace);
- };
- /**
- * @param {?} el
- * @param {?} name
- * @return {?}
- */
- BaseAnimationRenderer.prototype.addClass = /**
- * @param {?} el
- * @param {?} name
- * @return {?}
- */
- function (el, name) { this.delegate.addClass(el, name); };
- /**
- * @param {?} el
- * @param {?} name
- * @return {?}
- */
- BaseAnimationRenderer.prototype.removeClass = /**
- * @param {?} el
- * @param {?} name
- * @return {?}
- */
- function (el, name) { this.delegate.removeClass(el, name); };
- /**
- * @param {?} el
- * @param {?} style
- * @param {?} value
- * @param {?=} flags
- * @return {?}
- */
- BaseAnimationRenderer.prototype.setStyle = /**
- * @param {?} el
- * @param {?} style
- * @param {?} value
- * @param {?=} flags
- * @return {?}
- */
- function (el, style, value, flags) {
- this.delegate.setStyle(el, style, value, flags);
- };
- /**
- * @param {?} el
- * @param {?} style
- * @param {?=} flags
- * @return {?}
- */
- BaseAnimationRenderer.prototype.removeStyle = /**
- * @param {?} el
- * @param {?} style
- * @param {?=} flags
- * @return {?}
- */
- function (el, style, flags) {
- this.delegate.removeStyle(el, style, flags);
- };
- /**
- * @param {?} el
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- BaseAnimationRenderer.prototype.setProperty = /**
- * @param {?} el
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- function (el, name, value) {
- if (name.charAt(0) == ANIMATION_PREFIX && name == DISABLE_ANIMATIONS_FLAG) {
- this.disableAnimations(el, !!value);
- }
- else {
- this.delegate.setProperty(el, name, value);
- }
- };
- /**
- * @param {?} node
- * @param {?} value
- * @return {?}
- */
- BaseAnimationRenderer.prototype.setValue = /**
- * @param {?} node
- * @param {?} value
- * @return {?}
- */
- function (node, value) { this.delegate.setValue(node, value); };
- /**
- * @param {?} target
- * @param {?} eventName
- * @param {?} callback
- * @return {?}
- */
- BaseAnimationRenderer.prototype.listen = /**
- * @param {?} target
- * @param {?} eventName
- * @param {?} callback
- * @return {?}
- */
- function (target, eventName, callback) {
- return this.delegate.listen(target, eventName, callback);
- };
- /**
- * @param {?} element
- * @param {?} value
- * @return {?}
- */
- BaseAnimationRenderer.prototype.disableAnimations = /**
- * @param {?} element
- * @param {?} value
- * @return {?}
- */
- function (element, value) {
- this.engine.disableAnimations(element, value);
- };
- return BaseAnimationRenderer;
- }());
- var AnimationRenderer = /** @class */ (function (_super) {
- __extends(AnimationRenderer, _super);
- function AnimationRenderer(factory, namespaceId, delegate, engine) {
- var _this = _super.call(this, namespaceId, delegate, engine) || this;
- _this.factory = factory;
- _this.namespaceId = namespaceId;
- return _this;
- }
- /**
- * @param {?} el
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- AnimationRenderer.prototype.setProperty = /**
- * @param {?} el
- * @param {?} name
- * @param {?} value
- * @return {?}
- */
- function (el, name, value) {
- if (name.charAt(0) == ANIMATION_PREFIX) {
- if (name.charAt(1) == '.' && name == DISABLE_ANIMATIONS_FLAG) {
- value = value === undefined ? true : !!value;
- this.disableAnimations(el, /** @type {?} */ (value));
- }
- else {
- this.engine.process(this.namespaceId, el, name.substr(1), value);
- }
- }
- else {
- this.delegate.setProperty(el, name, value);
- }
- };
- /**
- * @param {?} target
- * @param {?} eventName
- * @param {?} callback
- * @return {?}
- */
- AnimationRenderer.prototype.listen = /**
- * @param {?} target
- * @param {?} eventName
- * @param {?} callback
- * @return {?}
- */
- function (target, eventName, callback) {
- var _this = this;
- if (eventName.charAt(0) == ANIMATION_PREFIX) {
- var /** @type {?} */ element = resolveElementFromTarget(target);
- var /** @type {?} */ name_1 = eventName.substr(1);
- var /** @type {?} */ phase = '';
- // @listener.phase is for trigger animation callbacks
- // @@listener is for animation builder callbacks
- if (name_1.charAt(0) != ANIMATION_PREFIX) {
- _a = parseTriggerCallbackName(name_1), name_1 = _a[0], phase = _a[1];
- }
- return this.engine.listen(this.namespaceId, element, name_1, phase, function (event) {
- var /** @type {?} */ countId = (/** @type {?} */ (event))['_data'] || -1;
- _this.factory.scheduleListenerCallback(countId, callback, event);
- });
- }
- return this.delegate.listen(target, eventName, callback);
- var _a;
- };
- return AnimationRenderer;
- }(BaseAnimationRenderer));
- /**
- * @param {?} target
- * @return {?}
- */
- function resolveElementFromTarget(target) {
- switch (target) {
- case 'body':
- return document.body;
- case 'document':
- return document;
- case 'window':
- return window;
- default:
- return target;
- }
- }
- /**
- * @param {?} triggerName
- * @return {?}
- */
- function parseTriggerCallbackName(triggerName) {
- var /** @type {?} */ dotIndex = triggerName.indexOf('.');
- var /** @type {?} */ trigger = triggerName.substring(0, dotIndex);
- var /** @type {?} */ phase = triggerName.substr(dotIndex + 1);
- return [trigger, phase];
- }
-
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes} checked by tsc
- */
- /**
- * @license
- * Copyright Google Inc. All Rights Reserved.
- *
- * Use of this source code is governed by an MIT-style license that can be
- * found in the LICENSE file at https://angular.io/license
- */
- var InjectableAnimationEngine = /** @class */ (function (_super) {
- __extends(InjectableAnimationEngine, _super);
- function InjectableAnimationEngine(driver, normalizer) {
- return _super.call(this, driver, normalizer) || this;
- }
- InjectableAnimationEngine.decorators = [
- { type: _angular_core.Injectable },
- ];
- /** @nocollapse */
- InjectableAnimationEngine.ctorParameters = function () { return [
- { type: _angular_animations_browser.AnimationDriver, },
- { type: _angular_animations_browser.ɵAnimationStyleNormalizer, },
- ]; };
- return InjectableAnimationEngine;
- }(_angular_animations_browser.ɵAnimationEngine));
- /**
- * @return {?}
- */
- function instantiateSupportedAnimationDriver() {
- if (_angular_animations_browser.ɵsupportsWebAnimations()) {
- return new _angular_animations_browser.ɵWebAnimationsDriver();
- }
- return new _angular_animations_browser.ɵNoopAnimationDriver();
- }
- /**
- * @return {?}
- */
- function instantiateDefaultStyleNormalizer() {
- return new _angular_animations_browser.ɵWebAnimationsStyleNormalizer();
- }
- /**
- * @param {?} renderer
- * @param {?} engine
- * @param {?} zone
- * @return {?}
- */
- function instantiateRendererFactory(renderer, engine, zone) {
- return new AnimationRendererFactory(renderer, engine, zone);
- }
- var SHARED_ANIMATION_PROVIDERS = [
- { provide: _angular_animations.AnimationBuilder, useClass: BrowserAnimationBuilder },
- { provide: _angular_animations_browser.ɵAnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer },
- { provide: _angular_animations_browser.ɵAnimationEngine, useClass: InjectableAnimationEngine }, {
- provide: _angular_core.RendererFactory2,
- useFactory: instantiateRendererFactory,
- deps: [_angular_platformBrowser.ɵDomRendererFactory2, _angular_animations_browser.ɵAnimationEngine, _angular_core.NgZone]
- }
- ];
- /**
- * Separate providers from the actual module so that we can do a local modification in Google3 to
- * include them in the BrowserModule.
- */
- var BROWSER_ANIMATIONS_PROVIDERS = [
- { provide: _angular_animations_browser.AnimationDriver, useFactory: instantiateSupportedAnimationDriver }
- ].concat(SHARED_ANIMATION_PROVIDERS);
- /**
- * Separate providers from the actual module so that we can do a local modification in Google3 to
- * include them in the BrowserTestingModule.
- */
- var BROWSER_NOOP_ANIMATIONS_PROVIDERS = [{ provide: _angular_animations_browser.AnimationDriver, useClass: _angular_animations_browser.ɵNoopAnimationDriver }].concat(SHARED_ANIMATION_PROVIDERS);
-
- /**
- * @fileoverview added by tsickle
- * @suppress {checkTypes} checked by tsc
- */
- /**
- * \@experimental Animation support is experimental.
- */
- var BrowserAnimationsModule = /** @class */ (function () {
- function BrowserAnimationsModule() {
- }
- BrowserAnimationsModule.decorators = [
- { type: _angular_core.NgModule, args: [{
- exports: [_angular_platformBrowser.BrowserModule],
- providers: BROWSER_ANIMATIONS_PROVIDERS,
- },] },
- ];
- /** @nocollapse */
- BrowserAnimationsModule.ctorParameters = function () { return []; };
- return BrowserAnimationsModule;
- }());
- /**
- * \@experimental Animation support is experimental.
- */
- var NoopAnimationsModule = /** @class */ (function () {
- function NoopAnimationsModule() {
- }
- NoopAnimationsModule.decorators = [
- { type: _angular_core.NgModule, args: [{
- exports: [_angular_platformBrowser.BrowserModule],
- providers: BROWSER_NOOP_ANIMATIONS_PROVIDERS,
- },] },
- ];
- /** @nocollapse */
- NoopAnimationsModule.ctorParameters = function () { return []; };
- return NoopAnimationsModule;
- }());
-
- exports.BrowserAnimationsModule = BrowserAnimationsModule;
- exports.NoopAnimationsModule = NoopAnimationsModule;
- exports.ɵBrowserAnimationBuilder = BrowserAnimationBuilder;
- exports.ɵBrowserAnimationFactory = BrowserAnimationFactory;
- exports.ɵAnimationRenderer = AnimationRenderer;
- exports.ɵAnimationRendererFactory = AnimationRendererFactory;
- exports.ɵa = BaseAnimationRenderer;
- exports.ɵf = BROWSER_ANIMATIONS_PROVIDERS;
- exports.ɵg = BROWSER_NOOP_ANIMATIONS_PROVIDERS;
- exports.ɵb = InjectableAnimationEngine;
- exports.ɵd = instantiateDefaultStyleNormalizer;
- exports.ɵe = instantiateRendererFactory;
- exports.ɵc = instantiateSupportedAnimationDriver;
-
- Object.defineProperty(exports, '__esModule', { value: true });
-
- })));
- //# sourceMappingURL=platform-browser-animations.umd.js.map
|