tfabrica
Version:
library for TFabrica - TechSol
1,518 lines (1,502 loc) • 4.14 MB
JavaScript
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // identity function for calling harmony imports with the correct context
/******/ __webpack_require__.i = function(value) { return value; };
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, {
/******/ configurable: false,
/******/ enumerable: true,
/******/ get: getter
/******/ });
/******/ }
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/dist/";
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 152);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ (function(module, exports, __webpack_require__) {
/**
* @license Angular v2.4.9
* (c) 2010-2017 Google, Inc. https://angular.io/
* License: MIT
*/
(function (global, factory) {
true ? factory(exports, __webpack_require__(14), __webpack_require__(27), __webpack_require__(1)) :
typeof define === 'function' && define.amd ? define(['exports', 'rxjs/symbol/observable', 'rxjs/Subject', 'rxjs/Observable'], factory) :
(factory((global.ng = global.ng || {}, global.ng.core = global.ng.core || {}),global.rxjs_symbol_observable,global.Rx,global.Rx));
}(this, function (exports,rxjs_symbol_observable,rxjs_Subject,rxjs_Observable) { 'use strict';
/**
* @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 /** @type {?} */ globalScope;
if (typeof window === 'undefined') {
if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {
// TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492
globalScope = (self);
}
else {
globalScope = (global);
}
}
else {
globalScope = (window);
}
/**
* @param {?} fn
* @return {?}
*/
function scheduleMicroTask(fn) {
Zone.current.scheduleMicroTask('scheduleMicrotask', fn);
}
// Need to declare a new variable for global here since TypeScript
// exports the original value of the symbol.
var /** @type {?} */ global$1 = globalScope;
/**
* @param {?} type
* @return {?}
*/
function getTypeNameForDebugging(type) {
return type['name'] || typeof type;
}
// TODO: remove calls to assert in production environment
// Note: Can't just export this and import in in other files
// as `assert` is a reserved keyword in Dart
global$1.assert = function assert(condition) {
// TODO: to be fixed properly via #2830, noop for now
};
/**
* @param {?} obj
* @return {?}
*/
function isPresent(obj) {
return obj != null;
}
/**
* @param {?} obj
* @return {?}
*/
function isBlank(obj) {
return obj == null;
}
/**
* @param {?} token
* @return {?}
*/
function stringify(token) {
if (typeof token === 'string') {
return token;
}
if (token == null) {
return '' + token;
}
if (token.overriddenName) {
return "" + token.overriddenName;
}
if (token.name) {
return "" + token.name;
}
var /** @type {?} */ res = token.toString();
var /** @type {?} */ newLineIndex = res.indexOf('\n');
return newLineIndex === -1 ? res : res.substring(0, newLineIndex);
}
/**
* @param {?} a
* @param {?} b
* @return {?}
*/
function looseIdentical(a, b) {
return a === b || typeof a === 'number' && typeof b === 'number' && isNaN(a) && isNaN(b);
}
/**
* @param {?} o
* @return {?}
*/
function isJsObject(o) {
return o !== null && (typeof o === 'function' || typeof o === 'object');
}
/**
* @param {?} obj
* @return {?}
*/
function print(obj) {
// tslint:disable-next-line:no-console
console.log(obj);
}
/**
* @param {?} obj
* @return {?}
*/
function warn(obj) {
console.warn(obj);
}
var /** @type {?} */ _symbolIterator = null;
/**
* @return {?}
*/
function getSymbolIterator() {
if (!_symbolIterator) {
if (((globalScope)).Symbol && Symbol.iterator) {
_symbolIterator = Symbol.iterator;
}
else {
// es6-shim specific logic
var /** @type {?} */ keys = Object.getOwnPropertyNames(Map.prototype);
for (var /** @type {?} */ i = 0; i < keys.length; ++i) {
var /** @type {?} */ key = keys[i];
if (key !== 'entries' && key !== 'size' &&
((Map)).prototype[key] === Map.prototype['entries']) {
_symbolIterator = key;
}
}
}
}
return _symbolIterator;
}
/**
* @param {?} obj
* @return {?}
*/
function isPrimitive(obj) {
return !isJsObject(obj);
}
var /** @type {?} */ _nextClassId = 0;
var /** @type {?} */ Reflect = global$1.Reflect;
/**
* @param {?} annotation
* @return {?}
*/
function extractAnnotation(annotation) {
if (typeof annotation === 'function' && annotation.hasOwnProperty('annotation')) {
// it is a decorator, extract annotation
annotation = annotation.annotation;
}
return annotation;
}
/**
* @param {?} fnOrArray
* @param {?} key
* @return {?}
*/
function applyParams(fnOrArray, key) {
if (fnOrArray === Object || fnOrArray === String || fnOrArray === Function ||
fnOrArray === Number || fnOrArray === Array) {
throw new Error("Can not use native " + stringify(fnOrArray) + " as constructor");
}
if (typeof fnOrArray === 'function') {
return fnOrArray;
}
if (Array.isArray(fnOrArray)) {
var /** @type {?} */ annotations = fnOrArray;
var /** @type {?} */ annoLength = annotations.length - 1;
var /** @type {?} */ fn = fnOrArray[annoLength];
if (typeof fn !== 'function') {
throw new Error("Last position of Class method array must be Function in key " + key + " was '" + stringify(fn) + "'");
}
if (annoLength != fn.length) {
throw new Error("Number of annotations (" + annoLength + ") does not match number of arguments (" + fn.length + ") in the function: " + stringify(fn));
}
var /** @type {?} */ paramsAnnotations = [];
for (var /** @type {?} */ i = 0, /** @type {?} */ ii = annotations.length - 1; i < ii; i++) {
var /** @type {?} */ paramAnnotations = [];
paramsAnnotations.push(paramAnnotations);
var /** @type {?} */ annotation = annotations[i];
if (Array.isArray(annotation)) {
for (var /** @type {?} */ j = 0; j < annotation.length; j++) {
paramAnnotations.push(extractAnnotation(annotation[j]));
}
}
else if (typeof annotation === 'function') {
paramAnnotations.push(extractAnnotation(annotation));
}
else {
paramAnnotations.push(annotation);
}
}
Reflect.defineMetadata('parameters', paramsAnnotations, fn);
return fn;
}
throw new Error("Only Function or Array is supported in Class definition for key '" + key + "' is '" + stringify(fnOrArray) + "'");
}
/**
* Provides a way for expressing ES6 classes with parameter annotations in ES5.
*
* ## Basic Example
*
* ```
* var Greeter = ng.Class({
* constructor: function(name) {
* this.name = name;
* },
*
* greet: function() {
* alert('Hello ' + this.name + '!');
* }
* });
* ```
*
* is equivalent to ES6:
*
* ```
* class Greeter {
* constructor(name) {
* this.name = name;
* }
*
* greet() {
* alert('Hello ' + this.name + '!');
* }
* }
* ```
*
* or equivalent to ES5:
*
* ```
* var Greeter = function (name) {
* this.name = name;
* }
*
* Greeter.prototype.greet = function () {
* alert('Hello ' + this.name + '!');
* }
* ```
*
* ### Example with parameter annotations
*
* ```
* var MyService = ng.Class({
* constructor: [String, [new Optional(), Service], function(name, myService) {
* ...
* }]
* });
* ```
*
* is equivalent to ES6:
*
* ```
* class MyService {
* constructor(name: string, \@Optional() myService: Service) {
* ...
* }
* }
* ```
*
* ### Example with inheritance
*
* ```
* var Shape = ng.Class({
* constructor: (color) {
* this.color = color;
* }
* });
*
* var Square = ng.Class({
* extends: Shape,
* constructor: function(color, size) {
* Shape.call(this, color);
* this.size = size;
* }
* });
* ```
* \@stable
* @param {?} clsDef
* @return {?}
*/
function Class(clsDef) {
var /** @type {?} */ constructor = applyParams(clsDef.hasOwnProperty('constructor') ? clsDef.constructor : undefined, 'constructor');
var /** @type {?} */ proto = constructor.prototype;
if (clsDef.hasOwnProperty('extends')) {
if (typeof clsDef.extends === 'function') {
((constructor)).prototype = proto =
Object.create(((clsDef.extends)).prototype);
}
else {
throw new Error("Class definition 'extends' property must be a constructor function was: " + stringify(clsDef.extends));
}
}
for (var key in clsDef) {
if (key !== 'extends' && key !== 'prototype' && clsDef.hasOwnProperty(key)) {
proto[key] = applyParams(clsDef[key], key);
}
}
if (this && this.annotations instanceof Array) {
Reflect.defineMetadata('annotations', this.annotations, constructor);
}
var /** @type {?} */ constructorName = constructor['name'];
if (!constructorName || constructorName === 'constructor') {
((constructor))['overriddenName'] = "class" + _nextClassId++;
}
return (constructor);
}
/**
* @param {?} name
* @param {?} props
* @param {?=} parentClass
* @param {?=} chainFn
* @return {?}
*/
function makeDecorator(name, props, parentClass, chainFn) {
if (chainFn === void 0) { chainFn = null; }
var /** @type {?} */ metaCtor = makeMetadataCtor([props]);
/**
* @param {?} objOrType
* @return {?}
*/
function DecoratorFactory(objOrType) {
if (!(Reflect && Reflect.getOwnMetadata)) {
throw 'reflect-metadata shim is required when using class decorators';
}
if (this instanceof DecoratorFactory) {
metaCtor.call(this, objOrType);
return this;
}
var /** @type {?} */ annotationInstance = new ((DecoratorFactory))(objOrType);
var /** @type {?} */ chainAnnotation = typeof this === 'function' && Array.isArray(this.annotations) ? this.annotations : [];
chainAnnotation.push(annotationInstance);
var /** @type {?} */ TypeDecorator = (function TypeDecorator(cls) {
var /** @type {?} */ annotations = Reflect.getOwnMetadata('annotations', cls) || [];
annotations.push(annotationInstance);
Reflect.defineMetadata('annotations', annotations, cls);
return cls;
});
TypeDecorator.annotations = chainAnnotation;
TypeDecorator.Class = Class;
if (chainFn)
chainFn(TypeDecorator);
return TypeDecorator;
}
if (parentClass) {
DecoratorFactory.prototype = Object.create(parentClass.prototype);
}
DecoratorFactory.prototype.toString = function () { return ("@" + name); };
((DecoratorFactory)).annotationCls = DecoratorFactory;
return DecoratorFactory;
}
/**
* @param {?} props
* @return {?}
*/
function makeMetadataCtor(props) {
return function ctor() {
var _this = this;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
}
props.forEach(function (prop, i) {
var /** @type {?} */ argVal = args[i];
if (Array.isArray(prop)) {
// plain parameter
_this[prop[0]] = argVal === undefined ? prop[1] : argVal;
}
else {
for (var propName in prop) {
_this[propName] =
argVal && argVal.hasOwnProperty(propName) ? argVal[propName] : prop[propName];
}
}
});
};
}
/**
* @param {?} name
* @param {?} props
* @param {?=} parentClass
* @return {?}
*/
function makeParamDecorator(name, props, parentClass) {
var /** @type {?} */ metaCtor = makeMetadataCtor(props);
/**
* @param {...?} args
* @return {?}
*/
function ParamDecoratorFactory() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
}
if (this instanceof ParamDecoratorFactory) {
metaCtor.apply(this, args);
return this;
}
var /** @type {?} */ annotationInstance = new ((_a = ((ParamDecoratorFactory))).bind.apply(_a, [void 0].concat(args)))();
((ParamDecorator)).annotation = annotationInstance;
return ParamDecorator;
/**
* @param {?} cls
* @param {?} unusedKey
* @param {?} index
* @return {?}
*/
function ParamDecorator(cls, unusedKey, index) {
var /** @type {?} */ parameters = Reflect.getOwnMetadata('parameters', cls) || [];
// there might be gaps if some in between parameters do not have annotations.
// we pad with nulls.
while (parameters.length <= index) {
parameters.push(null);
}
parameters[index] = parameters[index] || [];
parameters[index].push(annotationInstance);
Reflect.defineMetadata('parameters', parameters, cls);
return cls;
}
var _a;
}
if (parentClass) {
ParamDecoratorFactory.prototype = Object.create(parentClass.prototype);
}
ParamDecoratorFactory.prototype.toString = function () { return ("@" + name); };
((ParamDecoratorFactory)).annotationCls = ParamDecoratorFactory;
return ParamDecoratorFactory;
}
/**
* @param {?} name
* @param {?} props
* @param {?=} parentClass
* @return {?}
*/
function makePropDecorator(name, props, parentClass) {
var /** @type {?} */ metaCtor = makeMetadataCtor(props);
/**
* @param {...?} args
* @return {?}
*/
function PropDecoratorFactory() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
}
if (this instanceof PropDecoratorFactory) {
metaCtor.apply(this, args);
return this;
}
var /** @type {?} */ decoratorInstance = new ((_a = ((PropDecoratorFactory))).bind.apply(_a, [void 0].concat(args)))();
return function PropDecorator(target, name) {
var /** @type {?} */ meta = Reflect.getOwnMetadata('propMetadata', target.constructor) || {};
meta[name] = meta.hasOwnProperty(name) && meta[name] || [];
meta[name].unshift(decoratorInstance);
Reflect.defineMetadata('propMetadata', meta, target.constructor);
};
var _a;
}
if (parentClass) {
PropDecoratorFactory.prototype = Object.create(parentClass.prototype);
}
PropDecoratorFactory.prototype.toString = function () { return ("@" + name); };
((PropDecoratorFactory)).annotationCls = PropDecoratorFactory;
return PropDecoratorFactory;
}
/**
* Inject decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Inject = makeParamDecorator('Inject', [['token', undefined]]);
/**
* Optional decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Optional = makeParamDecorator('Optional', []);
/**
* Injectable decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Injectable = (makeDecorator('Injectable', []));
/**
* Self decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Self = makeParamDecorator('Self', []);
/**
* SkipSelf decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ SkipSelf = makeParamDecorator('SkipSelf', []);
/**
* Host decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Host = makeParamDecorator('Host', []);
var OpaqueToken = (function () {
/**
* @param {?} _desc
*/
function OpaqueToken(_desc) {
this._desc = _desc;
}
/**
* @return {?}
*/
OpaqueToken.prototype.toString = function () { return "Token " + this._desc; };
OpaqueToken.decorators = [
{ type: Injectable },
];
/** @nocollapse */
OpaqueToken.ctorParameters = function () { return [
null,
]; };
return OpaqueToken;
}());
/**
* This token can be used to create a virtual provider that will populate the
* `entryComponents` fields of components and ng modules based on its `useValue`.
* All components that are referenced in the `useValue` value (either directly
* or in a nested array or map) will be added to the `entryComponents` property.
*
* ### Example
* The following example shows how the router can populate the `entryComponents`
* field of an NgModule based on the router configuration which refers
* to components.
*
* ```typescript
* // helper function inside the router
* function provideRoutes(routes) {
* return [
* {provide: ROUTES, useValue: routes},
* {provide: ANALYZE_FOR_ENTRY_COMPONENTS, useValue: routes, multi: true}
* ];
* }
*
* // user code
* let routes = [
* {path: '/root', component: RootComp},
* {path: '/teams', component: TeamsComp}
* ];
*
* @NgModule({
* providers: [provideRoutes(routes)]
* })
* class ModuleWithRoutes {}
* ```
*
* @experimental
*/
var /** @type {?} */ ANALYZE_FOR_ENTRY_COMPONENTS = new OpaqueToken('AnalyzeForEntryComponents');
/**
* Attribute decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Attribute = makeParamDecorator('Attribute', [['attributeName', undefined]]);
/**
* Base class for query metadata.
*
* See {\@link ContentChildren}, {\@link ContentChild}, {\@link ViewChildren}, {\@link ViewChild} for
* more information.
*
* \@stable
* @abstract
*/
var Query = (function () {
function Query() {
}
return Query;
}());
/**
* ContentChildren decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ ContentChildren = (makePropDecorator('ContentChildren', [
['selector', undefined], {
first: false,
isViewQuery: false,
descendants: false,
read: undefined,
}
], Query));
/**
* ContentChild decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ ContentChild = makePropDecorator('ContentChild', [
['selector', undefined], {
first: true,
isViewQuery: false,
descendants: true,
read: undefined,
}
], Query);
/**
* ViewChildren decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ ViewChildren = makePropDecorator('ViewChildren', [
['selector', undefined], {
first: false,
isViewQuery: true,
descendants: true,
read: undefined,
}
], Query);
/**
* ViewChild decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ ViewChild = makePropDecorator('ViewChild', [
['selector', undefined], {
first: true,
isViewQuery: true,
descendants: true,
read: undefined,
}
], Query);
var ChangeDetectionStrategy = {};
ChangeDetectionStrategy.OnPush = 0;
ChangeDetectionStrategy.Default = 1;
ChangeDetectionStrategy[ChangeDetectionStrategy.OnPush] = "OnPush";
ChangeDetectionStrategy[ChangeDetectionStrategy.Default] = "Default";
var ChangeDetectorStatus = {};
ChangeDetectorStatus.CheckOnce = 0;
ChangeDetectorStatus.Checked = 1;
ChangeDetectorStatus.CheckAlways = 2;
ChangeDetectorStatus.Detached = 3;
ChangeDetectorStatus.Errored = 4;
ChangeDetectorStatus.Destroyed = 5;
ChangeDetectorStatus[ChangeDetectorStatus.CheckOnce] = "CheckOnce";
ChangeDetectorStatus[ChangeDetectorStatus.Checked] = "Checked";
ChangeDetectorStatus[ChangeDetectorStatus.CheckAlways] = "CheckAlways";
ChangeDetectorStatus[ChangeDetectorStatus.Detached] = "Detached";
ChangeDetectorStatus[ChangeDetectorStatus.Errored] = "Errored";
ChangeDetectorStatus[ChangeDetectorStatus.Destroyed] = "Destroyed";
/**
* @param {?} changeDetectionStrategy
* @return {?}
*/
function isDefaultChangeDetectionStrategy(changeDetectionStrategy) {
return isBlank(changeDetectionStrategy) ||
changeDetectionStrategy === ChangeDetectionStrategy.Default;
}
/**
* Directive decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Directive = (makeDecorator('Directive', {
selector: undefined,
inputs: undefined,
outputs: undefined,
host: undefined,
providers: undefined,
exportAs: undefined,
queries: undefined
}));
/**
* Component decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Component = (makeDecorator('Component', {
selector: undefined,
inputs: undefined,
outputs: undefined,
host: undefined,
exportAs: undefined,
moduleId: undefined,
providers: undefined,
viewProviders: undefined,
changeDetection: ChangeDetectionStrategy.Default,
queries: undefined,
templateUrl: undefined,
template: undefined,
styleUrls: undefined,
styles: undefined,
animations: undefined,
encapsulation: undefined,
interpolation: undefined,
entryComponents: undefined
}, Directive));
/**
* Pipe decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Pipe = (makeDecorator('Pipe', {
name: undefined,
pure: true,
}));
/**
* Input decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Input = makePropDecorator('Input', [['bindingPropertyName', undefined]]);
/**
* Output decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ Output = makePropDecorator('Output', [['bindingPropertyName', undefined]]);
/**
* HostBinding decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ HostBinding = makePropDecorator('HostBinding', [['hostPropertyName', undefined]]);
/**
* HostListener decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ HostListener = makePropDecorator('HostListener', [['eventName', undefined], ['args', []]]);
/**
* @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 LifecycleHooks = {};
LifecycleHooks.OnInit = 0;
LifecycleHooks.OnDestroy = 1;
LifecycleHooks.DoCheck = 2;
LifecycleHooks.OnChanges = 3;
LifecycleHooks.AfterContentInit = 4;
LifecycleHooks.AfterContentChecked = 5;
LifecycleHooks.AfterViewInit = 6;
LifecycleHooks.AfterViewChecked = 7;
LifecycleHooks[LifecycleHooks.OnInit] = "OnInit";
LifecycleHooks[LifecycleHooks.OnDestroy] = "OnDestroy";
LifecycleHooks[LifecycleHooks.DoCheck] = "DoCheck";
LifecycleHooks[LifecycleHooks.OnChanges] = "OnChanges";
LifecycleHooks[LifecycleHooks.AfterContentInit] = "AfterContentInit";
LifecycleHooks[LifecycleHooks.AfterContentChecked] = "AfterContentChecked";
LifecycleHooks[LifecycleHooks.AfterViewInit] = "AfterViewInit";
LifecycleHooks[LifecycleHooks.AfterViewChecked] = "AfterViewChecked";
var /** @type {?} */ LIFECYCLE_HOOKS_VALUES = [
LifecycleHooks.OnInit, LifecycleHooks.OnDestroy, LifecycleHooks.DoCheck, LifecycleHooks.OnChanges,
LifecycleHooks.AfterContentInit, LifecycleHooks.AfterContentChecked, LifecycleHooks.AfterViewInit,
LifecycleHooks.AfterViewChecked
];
/**
* \@whatItDoes Lifecycle hook that is called when any data-bound property of a directive changes.
* \@howToUse
* {\@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnChanges'}
*
* \@description
* `ngOnChanges` is called right after the data-bound properties have been checked and before view
* and content children are checked if at least one of them has changed.
* The `changes` parameter contains the changed properties.
*
* See {\@linkDocs guide/lifecycle-hooks#onchanges "Lifecycle Hooks Guide"}.
*
* \@stable
* @abstract
*/
var OnChanges = (function () {
function OnChanges() {
}
/**
* @abstract
* @param {?} changes
* @return {?}
*/
OnChanges.prototype.ngOnChanges = function (changes) { };
return OnChanges;
}());
/**
* \@whatItDoes Lifecycle hook that is called after data-bound properties of a directive are
* initialized.
* \@howToUse
* {\@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnInit'}
*
* \@description
* `ngOnInit` is called right after the directive's data-bound properties have been checked for the
* first time, and before any of its children have been checked. It is invoked only once when the
* directive is instantiated.
*
* See {\@linkDocs guide/lifecycle-hooks "Lifecycle Hooks Guide"}.
*
* \@stable
* @abstract
*/
var OnInit = (function () {
function OnInit() {
}
/**
* @abstract
* @return {?}
*/
OnInit.prototype.ngOnInit = function () { };
return OnInit;
}());
/**
* \@whatItDoes Lifecycle hook that is called when Angular dirty checks a directive.
* \@howToUse
* {\@example core/ts/metadata/lifecycle_hooks_spec.ts region='DoCheck'}
*
* \@description
* `ngDoCheck` gets called to check the changes in the directives in addition to the default
* algorithm. The default change detection algorithm looks for differences by comparing
* bound-property values by reference across change detection runs.
*
* Note that a directive typically should not use both `DoCheck` and {\@link OnChanges} to respond to
* changes on the same input, as `ngOnChanges` will continue to be called when the default change
* detector detects changes.
*
* See {\@link KeyValueDiffers} and {\@link IterableDiffers} for implementing custom dirty checking
* for collections.
*
* See {\@linkDocs guide/lifecycle-hooks#docheck "Lifecycle Hooks Guide"}.
*
* \@stable
* @abstract
*/
var DoCheck = (function () {
function DoCheck() {
}
/**
* @abstract
* @return {?}
*/
DoCheck.prototype.ngDoCheck = function () { };
return DoCheck;
}());
/**
* \@whatItDoes Lifecycle hook that is called when a directive, pipe or service is destroyed.
* \@howToUse
* {\@example core/ts/metadata/lifecycle_hooks_spec.ts region='OnDestroy'}
*
* \@description
* `ngOnDestroy` callback is typically used for any custom cleanup that needs to occur when the
* instance is destroyed.
*
* See {\@linkDocs guide/lifecycle-hooks "Lifecycle Hooks Guide"}.
*
* \@stable
* @abstract
*/
var OnDestroy = (function () {
function OnDestroy() {
}
/**
* @abstract
* @return {?}
*/
OnDestroy.prototype.ngOnDestroy = function () { };
return OnDestroy;
}());
/**
*
* \@whatItDoes Lifecycle hook that is called after a directive's content has been fully
* initialized.
* \@howToUse
* {\@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentInit'}
*
* \@description
* See {\@linkDocs guide/lifecycle-hooks#aftercontent "Lifecycle Hooks Guide"}.
*
* \@stable
* @abstract
*/
var AfterContentInit = (function () {
function AfterContentInit() {
}
/**
* @abstract
* @return {?}
*/
AfterContentInit.prototype.ngAfterContentInit = function () { };
return AfterContentInit;
}());
/**
* \@whatItDoes Lifecycle hook that is called after every check of a directive's content.
* \@howToUse
* {\@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterContentChecked'}
*
* \@description
* See {\@linkDocs guide/lifecycle-hooks#aftercontent "Lifecycle Hooks Guide"}.
*
* \@stable
* @abstract
*/
var AfterContentChecked = (function () {
function AfterContentChecked() {
}
/**
* @abstract
* @return {?}
*/
AfterContentChecked.prototype.ngAfterContentChecked = function () { };
return AfterContentChecked;
}());
/**
* \@whatItDoes Lifecycle hook that is called after a component's view has been fully
* initialized.
* \@howToUse
* {\@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewInit'}
*
* \@description
* See {\@linkDocs guide/lifecycle-hooks#afterview "Lifecycle Hooks Guide"}.
*
* \@stable
* @abstract
*/
var AfterViewInit = (function () {
function AfterViewInit() {
}
/**
* @abstract
* @return {?}
*/
AfterViewInit.prototype.ngAfterViewInit = function () { };
return AfterViewInit;
}());
/**
* \@whatItDoes Lifecycle hook that is called after every check of a component's view.
* \@howToUse
* {\@example core/ts/metadata/lifecycle_hooks_spec.ts region='AfterViewChecked'}
*
* \@description
* See {\@linkDocs guide/lifecycle-hooks#afterview "Lifecycle Hooks Guide"}.
*
* \@stable
* @abstract
*/
var AfterViewChecked = (function () {
function AfterViewChecked() {
}
/**
* @abstract
* @return {?}
*/
AfterViewChecked.prototype.ngAfterViewChecked = function () { };
return AfterViewChecked;
}());
/**
* Defines a schema that will allow:
* - any non-Angular elements with a `-` in their name,
* - any properties on elements with a `-` in their name which is the common rule for custom
* elements.
*
* @stable
*/
var /** @type {?} */ CUSTOM_ELEMENTS_SCHEMA = {
name: 'custom-elements'
};
/**
* Defines a schema that will allow any property on any element.
*
* @experimental
*/
var /** @type {?} */ NO_ERRORS_SCHEMA = {
name: 'no-errors-schema'
};
/**
* NgModule decorator and metadata.
*
* @stable
* @Annotation
*/
var /** @type {?} */ NgModule = (makeDecorator('NgModule', {
providers: undefined,
declarations: undefined,
imports: undefined,
exports: undefined,
entryComponents: undefined,
bootstrap: undefined,
schemas: undefined,
id: undefined,
}));
/**
* @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 ViewEncapsulation = {};
ViewEncapsulation.Emulated = 0;
ViewEncapsulation.Native = 1;
ViewEncapsulation.None = 2;
ViewEncapsulation[ViewEncapsulation.Emulated] = "Emulated";
ViewEncapsulation[ViewEncapsulation.Native] = "Native";
ViewEncapsulation[ViewEncapsulation.None] = "None";
/**
* Metadata properties available for configuring Views.
*
* For details on the `\@Component` annotation, see {\@link Component}.
*
* ### Example
*
* ```
* \@Component({
* selector: 'greet',
* template: 'Hello {{name}}!',
* })
* class Greet {
* name: string;
*
* constructor() {
* this.name = 'World';
* }
* }
* ```
*
* @deprecated Use Component instead.
*
* {\@link Component}
*/
var ViewMetadata = (function () {
/**
* @param {?=} __0
*/
function ViewMetadata(_a) {
var _b = _a === void 0 ? {} : _a, templateUrl = _b.templateUrl, template = _b.template, encapsulation = _b.encapsulation, styles = _b.styles, styleUrls = _b.styleUrls, animations = _b.animations, interpolation = _b.interpolation;
this.templateUrl = templateUrl;
this.template = template;
this.styleUrls = styleUrls;
this.styles = styles;
this.encapsulation = encapsulation;
this.animations = animations;
this.interpolation = interpolation;
}
return ViewMetadata;
}());
/**
* \@whatItDoes Represents the version of Angular
*
* \@stable
*/
var Version = (function () {
/**
* @param {?} full
*/
function Version(full) {
this.full = full;
}
Object.defineProperty(Version.prototype, "major", {
/**
* @return {?}
*/
get: function () { return this.full.split('.')[0]; },
enumerable: true,
configurable: true
});
Object.defineProperty(Version.prototype, "minor", {
/**
* @return {?}
*/
get: function () { return this.full.split('.')[1]; },
enumerable: true,
configurable: true
});
Object.defineProperty(Version.prototype, "patch", {
/**
* @return {?}
*/
get: function () { return this.full.split('.').slice(2).join('.'); },
enumerable: true,
configurable: true
});
return Version;
}());
/**
* @stable
*/
var /** @type {?} */ VERSION = new Version('2.4.9');
/**
* Allows to refer to references which are not yet defined.
*
* For instance, `forwardRef` is used when the `token` which we need to refer to for the purposes of
* DI is declared,
* but not yet defined. It is also used when the `token` which we use when creating a query is not
* yet defined.
*
* ### Example
* {\@example core/di/ts/forward_ref/forward_ref_spec.ts region='forward_ref'}
* \@experimental
* @param {?} forwardRefFn
* @return {?}
*/
function forwardRef(forwardRefFn) {
((forwardRefFn)).__forward_ref__ = forwardRef;
((forwardRefFn)).toString = function () { return stringify(this()); };
return (((forwardRefFn)));
}
/**
* Lazily retrieves the reference value from a forwardRef.
*
* Acts as the identity function when given a non-forward-ref value.
*
* ### Example ([live demo](http://plnkr.co/edit/GU72mJrk1fiodChcmiDR?p=preview))
*
* {\@example core/di/ts/forward_ref/forward_ref_spec.ts region='resolve_forward_ref'}
*
* See: {\@link forwardRef}
* \@experimental
* @param {?} type
* @return {?}
*/
function resolveForwardRef(type) {
if (typeof type === 'function' && type.hasOwnProperty('__forward_ref__') &&
type.__forward_ref__ === forwardRef) {
return ((type))();
}
else {
return type;
}
}
var /** @type {?} */ _THROW_IF_NOT_FOUND = new Object();
var /** @type {?} */ THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
var _NullInjector = (function () {
function _NullInjector() {
}
/**
* @param {?} token
* @param {?=} notFoundValue
* @return {?}
*/
_NullInjector.prototype.get = function (token, notFoundValue) {
if (notFoundValue === void 0) { notFoundValue = _THROW_IF_NOT_FOUND; }
if (notFoundValue === _THROW_IF_NOT_FOUND) {
throw new Error("No provider for " + stringify(token) + "!");
}
return notFoundValue;
};
return _NullInjector;
}());
/**
* \@whatItDoes Injector interface
* \@howToUse
* ```
* const injector: Injector = ...;
* injector.get(...);
* ```
*
* \@description
* For more details, see the {\@linkDocs guide/dependency-injection "Dependency Injection Guide"}.
*
* ### Example
*
* {\@example core/di/ts/injector_spec.ts region='Injector'}
*
* `Injector` returns itself when given `Injector` as a token:
* {\@example core/di/ts/injector_spec.ts region='injectInjector'}
*
* \@stable
* @abstract
*/
var Injector = (function () {
function Injector() {
}
/**
* Retrieves an instance from the injector based on the provided token.
* If not found:
* - Throws {\@link NoProviderError} if no `notFoundValue` that is not equal to
* Injector.THROW_IF_NOT_FOUND is given
* - Returns the `notFoundValue` otherwise
* @abstract
* @param {?} token
* @param {?=} notFoundValue
* @return {?}
*/
Injector.prototype.get = function (token, notFoundValue) { };
Injector.THROW_IF_NOT_FOUND = _THROW_IF_NOT_FOUND;
Injector.NULL = new _NullInjector();
return Injector;
}());
var __extends$1 = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
/**
* \@stable
*/
var BaseError = (function (_super) {
__extends$1(BaseError, _super);
/**
* @param {?} message
*/
function BaseError(message) {
_super.call(this, message);
// Errors don't use current this, instead they create a new instance.
// We have to do forward all of our api to the nativeInstance.
// TODO(bradfordcsmith): Remove this hack when
// google/closure-compiler/issues/2102 is fixed.
var nativeError = new Error(message);
this._nativeError = nativeError;
}
Object.defineProperty(BaseError.prototype, "message", {
/**
* @return {?}
*/
get: function () { return this._nativeError.message; },
/**
* @param {?} message
* @return {?}
*/
set: function (message) { this._nativeError.message = message; },
enumerable: true,
configurable: true
});
Object.defineProperty(BaseError.prototype, "name", {
/**
* @return {?}
*/
get: function () { return this._nativeError.name; },
enumerable: true,
configurable: true
});
Object.defineProperty(BaseError.prototype, "stack", {
/**
* @return {?}
*/
get: function () { return ((this._nativeError)).stack; },
/**
* @param {?} value
* @return {?}
*/
set: function (value) { ((this._nativeError)).stack = value; },
enumerable: true,
configurable: true
});
/**
* @return {?}
*/
BaseError.prototype.toString = function () { return this._nativeError.toString(); };
return BaseError;
}(Error));
/**
* \@stable
*/
var WrappedError = (function (_super) {
__extends$1(WrappedError, _super);
/**
* @param {?} message
* @param {?} error
*/
function WrappedError(message, error) {
_super.call(this, message + " caused by: " + (error instanceof Error ? error.message : error));
this.originalError = error;
}
Object.defineProperty(WrappedError.prototype, "stack", {
/**
* @return {?}
*/
get: function () {
return (((this.originalError instanceof Error ? this.originalError : this._nativeError)))
.stack;
},
enumerable: true,
configurable: true
});
return WrappedError;
}(BaseError));
/**
* @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 __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
/**
* @param {?} keys
* @return {?}
*/
function findFirstClosedCycle(keys) {
var /** @type {?} */ res = [];
for (var /** @type {?} */ i = 0; i < keys.length; ++i) {
if (res.indexOf(keys[i]) > -1) {
res.push(keys[i]);
return res;
}
res.push(keys[i]);
}
return res;
}
/**
* @param {?} keys
* @return {?}
*/
function constructResolvingPath(keys) {
if (keys.length > 1) {
var /** @type {?} */ reversed = findFirstClosedCycle(keys.slice().reverse());
var /** @type {?} */ tokenStrs = reversed.map(function (k) { return stringify(k.token); });
return ' (' + tokenStrs.join(' -> ') + ')';
}
return '';
}
/**
* Base class for all errors arising from misconfigured providers.
* \@stable
*/
var AbstractProviderError = (function (_super) {
__extends(AbstractProviderError, _super);
/**
* @param {?} injector
* @param {?} key
* @param {?} constructResolvingMessage
*/
function AbstractProviderError(injector, key, constructResolvingMessage) {
_super.call(this, 'DI Error');
this.keys = [key];
this.injectors = [injector];
this.constructResolvingMessage = constructResolvingMessage;
this.message = this.constructResolvingMessage(this.keys);
}
/**
* @param {?} injector
* @param {?} key
* @return {?}
*/
AbstractProviderError.prototype.addKey = function (injector, key) {
this.injectors.push(injector);
this.keys.push(key);
this.message = this.constructResolvingMessage(this.keys);
};
return AbstractProviderError;
}(BaseError));
/**
* Thrown when trying to retrieve a dependency by key from {\@link Injector}, but the
* {\@link Injector} does not have a {\@link Provider} for the given key.
*
* ### Example ([live demo](http://plnkr.co/edit/vq8D3FRB9aGbnWJqtEPE?p=preview))
*
* ```typescript
* class A {
* constructor(b:B) {}
* }
*
* expect(() => Injector.resolveAndCreate([A])).toThrowError();
* ```
* \@stable
*/
var NoProviderError = (function (_super) {
__extends(NoProviderError, _super);
/**
* @param {?} injector
* @param {?} key
*/
function NoProviderError(injector, key) {
_super.call(this, injector, key, function (keys) {
var first = stringify(keys[0].token);
return "No provider for " + first + "!" + constructResolvingPath(keys);
});
}
return NoProviderError;
}(AbstractProviderError));
/**
* Thrown when dependencies form a cycle.
*
* ### Example ([live demo](http://plnkr.co/edit/wYQdNos0Tzql3ei1EV9j?p=info))
*
* ```typescript
* var injector = Injector.resolveAndCreate([
* {provide: "one", useFactory: (two) => "two", deps: [[new Inject("two")]]},
* {provide: "two", useFactory: (one) => "one", deps: [[new Inject("one")]]}
* ]);
*
* expect(() => injector.get("one")).toThrowError();
* ```
*
* Retrieving `A` or `B` throws a `CyclicDependencyError` as the graph above cannot be constructed.
* \@stable
*/
var CyclicDependencyError = (function (_super) {
__extends(CyclicDependencyError, _super);
/**
* @param {?} injector
* @param {?} key
*/
function CyclicDependencyError(injector, key) {
_super.call(this, injector, key, function (keys) {
return "Cannot instantiate cyclic dependency!" + constructResolvingPath(keys);
});
}
return CyclicDependencyError;
}(AbstractProviderError));
/**
* Thrown when a constructing type returns with an Error.
*
* The `InstantiationError` class contains the ori