diff --git a/accessible/libs/README b/accessible/libs/README new file mode 100644 index 000000000..ebf4d96ba --- /dev/null +++ b/accessible/libs/README @@ -0,0 +1,15 @@ +This folder contains the following dependencies for accessible Blockly: + +* Angular2 (angular2-all.umd.min.js, angular2-polyfills.min.js) +* RxJava (Rx.umd.min) + +Used for data binding between the core Blockly workspace and accessible Blockly. +RxJava is required by Angular2. +Fetched from https://code.angularjs.org/ +The current version is 2.0.0-beta.16. + +* ES6 Shim + +Required by Angular2, for Javascript files. +Fetched from https://github.com/paulmillr/es6-shim +The current version is 0.35.1. diff --git a/accessible/libs/Rx.umd.min.js b/accessible/libs/Rx.umd.min.js index 818717409..38c0666b4 100644 --- a/accessible/libs/Rx.umd.min.js +++ b/accessible/libs/Rx.umd.min.js @@ -1,321 +1,748 @@ -(function(t){"object"===typeof exports&&"undefined"!==typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).Rx=t()})(function(){return function a(b,e,h){function k(f,d){if(!e[f]){if(!b[f]){var c="function"==typeof require&&require;if(!d&&c)return c(f,!0);if(m)return m(f,!0);c=Error("Cannot find module '"+f+"'");throw c.code="MODULE_NOT_FOUND",c;}c=e[f]={exports:{}}; -b[f][0].call(c.exports,function(a){var c=b[f][1][a];return k(c?c:a)},c,c.exports,a,b,e,h)}return e[f].exports}for(var m="function"==typeof require&&require,l=0;lf?-1:1;n=f*Math.floor(Math.abs(n));n=0>=n?0:n>g?g:n}this.arr=c;this.idx=d;this.len=n}a.prototype[m.SymbolShim.iterator]=function(){return this};a.prototype.next=function(){return this.idxc)this.delayTime=0;g&&"function"===typeof g.schedule||(this.scheduler=k.asap)}h(f,a);f.create=function(a,c,g){void 0===c&&(c=0);void 0===g&&(g=k.asap);return new f(a,c,g)};f.dispatch=function(a){return a.source.subscribe(a.subscriber)};f.prototype._subscribe=function(a){a.add(this.scheduler.schedule(f.dispatch,this.delayTime,{source:this.source, -subscriber:a}))};return f}(b.Observable);e.SubscribeOnObservable=a},{"../Observable":3,"../scheduler/asap":215,"../util/isNumeric":233}],107:[function(a,b,e){function h(a){var n=a.source;a=a.subscriber;var b=n.callbackFunc,l=n.args,e=n.scheduler,h=n.subject;if(!h){var h=n.subject=new c.AsyncSubject,r=function u(){for(var a=[],c=0;c=a.count?f.complete():(f.next(g[d]),f.isUnsubscribed||(a.index=d+1,this.schedule(a)))}; -d.prototype._subscribe=function(a){var g=this.array,n=g.length,f=this.scheduler;if(f)a.add(f.schedule(d.dispatch,0,{array:g,index:0,count:n,subscriber:a}));else{for(f=0;fd)this.period=0;c&&"function"===typeof c.schedule||(this.scheduler=m.asap)}h(f,a);f.create=function(a,c){void 0===a&&(a=0);void 0===c&& -(c=m.asap);return new f(a,c)};f.dispatch=function(a){var c=a.subscriber,g=a.period;c.next(a.index);c.isUnsubscribed||(a.index+=1,this.schedule(a,g))};f.prototype._subscribe=function(a){var c=this.period;a.add(this.scheduler.schedule(f.dispatch,c,{index:0,subscriber:a,period:c}))};return f}(b.Observable);e.IntervalObservable=a},{"../Observable":3,"../scheduler/asap":215,"../util/isNumeric":233}],117:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&& -(a[d]=b[d]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Observable");var k=a("../util/noop");a=function(a){function b(){a.call(this)}h(b,a);b.create=function(){return new b};b.prototype._subscribe=function(a){k.noop()};return b}(b.Observable);e.InfiniteObservable=a},{"../Observable":3,"../util/noop":236}],118:[function(a,b,e){var h=this&&this.__extends||function(a,b){function l(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null=== -b?Object.create(b):(l.prototype=b.prototype,new l)};a=function(a){function b(l,f,d){a.call(this);this.start=l;this.end=f;this.scheduler=d}h(b,a);b.create=function(a,f,d){void 0===a&&(a=0);void 0===f&&(f=0);return new b(a,f,d)};b.dispatch=function(a){var b=a.start,d=a.index,c=a.subscriber;d>=a.end?c.complete():(c.next(b),c.isUnsubscribed||(a.index=d+1,a.start=b+1,this.schedule(a)))};b.prototype._subscribe=function(a){var f=0,d=this.start,c=this.end,g=this.scheduler;if(g)a.add(g.schedule(b.dispatch, -0,{index:f,end:c,start:d,subscriber:a}));else{do{if(f++>=c){a.complete();break}a.next(d++);if(a.isUnsubscribed)break}while(1)}};return b}(a("../Observable").Observable);e.RangeObservable=a},{"../Observable":3}],119:[function(a,b,e){var h=this&&this.__extends||function(a,b){function l(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(l.prototype=b.prototype,new l)};a=function(a){function b(l,f){a.call(this);this.error=l;this.scheduler=f}h(b, -a);b.create=function(a,f){return new b(a,f)};b.dispatch=function(a){a.subscriber.error(a.error)};b.prototype._subscribe=function(a){var f=this.error,d=this.scheduler;d?a.add(d.schedule(b.dispatch,0,{error:f,subscriber:a})):a.error(f)};return b}(a("../Observable").Observable);e.ErrorObservable=a},{"../Observable":3}],120:[function(a,b,e){var h=this&&this.__extends||function(a,c){function g(){this.constructor=a}for(var n in c)c.hasOwnProperty(n)&&(a[n]=c[n]);a.prototype=null===c?Object.create(c):(g.prototype= -c.prototype,new g)},k=a("../util/isNumeric");b=a("../Observable");var m=a("../scheduler/asap"),l=a("../util/isScheduler"),f=a("../util/isDate");a=function(a){function c(c,n,b){void 0===c&&(c=0);a.call(this);this.period=n;this.scheduler=b;this.dueTime=0;k.isNumeric(n)?this._period=1>Number(n)&&1||Number(n):l.isScheduler(n)&&(b=n);l.isScheduler(b)||(b=m.asap);this.scheduler=b;this.dueTime=f.isDate(c)?+c-this.scheduler.now():c}h(c,a);c.create=function(a,d,b){void 0===a&&(a=0);return new c(a,d,b)};c.dispatch= -function(a){var d=a.index,b=a.period,f=a.subscriber;f.next(d);"undefined"===typeof b?f.complete():f.isUnsubscribed||("undefined"===typeof this.delay?this.add(this.scheduler.schedule(c.dispatch,b,{index:d+1,period:b,subscriber:f})):(a.index=d+1,this.schedule(a,b)))};c.prototype._subscribe=function(a){a.add(this.scheduler.schedule(c.dispatch,this.dueTime,{index:0,period:this._period,subscriber:a}))};return c}(b.Observable);e.TimerObservable=a},{"../Observable":3,"../scheduler/asap":215,"../util/isDate":232, -"../util/isNumeric":233,"../util/isScheduler":235}],121:[function(a,b,e){var h=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var g in d)d.hasOwnProperty(g)&&(a[g]=d[g]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};a=a("../Subscriber");e.buffer=function(a){return this.lift(new k(a))};var k=function(){function a(d){this.closingNotifier=d}a.prototype.call=function(a){return new m(a,this.closingNotifier)};return a}(),m=function(a){function d(c,g){a.call(this, -c);this.buffer=[];this.notifierSubscriber=null;this.notifierSubscriber=new l(this);this.add(g._subscribe(this.notifierSubscriber))}h(d,a);d.prototype._next=function(a){this.buffer.push(a)};d.prototype._error=function(a){this.destination.error(a)};d.prototype._complete=function(){this.destination.complete()};d.prototype.flushBuffer=function(){var a=this.buffer;this.buffer=[];this.destination.next(a);this.isUnsubscribed&&this.notifierSubscriber.unsubscribe()};return d}(a.Subscriber),l=function(a){function d(c){a.call(this, -null);this.parent=c}h(d,a);d.prototype._next=function(a){this.parent.flushBuffer()};d.prototype._error=function(a){this.parent.error(a)};d.prototype._complete=function(){this.parent.complete()};return d}(a.Subscriber)},{"../Subscriber":7}],122:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");e.bufferCount=function(a,b){void 0=== -b&&(b=null);return this.lift(new k(a,b))};var k=function(){function a(b,d){this.bufferSize=b;this.startBufferEvery=d}a.prototype.call=function(a){return new m(a,this.bufferSize,this.startBufferEvery)};return a}(),m=function(a){function b(d,c,g){a.call(this,d);this.bufferSize=c;this.startBufferEvery=g;this.buffers=[[]];this.count=0}h(b,a);b.prototype._next=function(a){var c=this.count+=1,g=this.destination,n=this.bufferSize,b=this.buffers,f=b.length,l=-1;0===c%(null==this.startBufferEvery?n:this.startBufferEvery)&& -b.push([]);for(c=0;c=d[0].time-b.now();)d.shift().notification.observe(g);0(b||0)?Number.POSITIVE_INFINITY:b;return this.lift(new h.ExpandOperator(a,b,l))}},{"./expand-support":145}],147:[function(a,b,e){var h=this&&this.__extends|| -function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e.filter=function(a,c){return this.lift(new l(a,c))};var l=function(){function a(c,d){this.select=c;this.thisArg=d}a.prototype.call=function(a){return new f(a,this.select,this.thisArg)};return a}(),f=function(a){function c(c,b,f){a.call(this,c);this.thisArg=f; -this.count=0;this.select=b}h(c,a);c.prototype._next=function(a){var c=k.tryCatch(this.select).call(this.thisArg||this,a,this.count++);c===m.errorObject?this.destination.error(m.errorObject.e):Boolean(c)&&this.destination.next(a)};return c}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],148:[function(a,b,e){var h=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d): -(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../Subscription");e._finally=function(a){return this.lift(new m(a))};var m=function(){function a(d){this.finallySelector=d}a.prototype.call=function(a){return new l(a,this.finallySelector)};return a}(),l=function(a){function d(c,d){a.call(this,c);this.add(new k.Subscription(d))}h(d,a);return d}(b.Subscriber)},{"../Subscriber":7,"../Subscription":8}],149:[function(a,b,e){var h=this&&this.__extends||function(a,d){function b(){this.constructor= -a}for(var f in d)d.hasOwnProperty(f)&&(a[f]=d[f]);a.prototype=null===d?Object.create(d):(b.prototype=d.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject"),l=a("../util/EmptyError");e.first=function(a,d,b){return this.lift(new f(a,d,b,this))};var f=function(){function a(c,d,b,f){this.predicate=c;this.resultSelector=d;this.defaultValue=b;this.source=f}a.prototype.call=function(a){return new d(a,this.predicate,this.resultSelector,this.defaultValue,this.source)}; -return a}(),d=function(a){function d(b,g,f,l,e){a.call(this,b);this.predicate=g;this.resultSelector=f;this.defaultValue=l;this.source=e;this.index=0;this.hasCompleted=!1}h(d,a);d.prototype._next=function(a){var c=this.destination,d=this.predicate,b=this.resultSelector,g=this.index++,f=!0;if(d&&(f=k.tryCatch(d)(a,g,this.source),f===m.errorObject)){c.error(m.errorObject.e);return}if(f){if(b&&(a=k.tryCatch(b)(a,g),a===m.errorObject)){c.error(m.errorObject.e);return}c.next(a);c.complete();this.hasCompleted= -!0}};d.prototype._complete=function(){var a=this.destination;this.hasCompleted||"undefined"===typeof this.defaultValue?this.hasCompleted||a.error(new l.EmptyError):(a.next(this.defaultValue),a.complete())};return d}(b.Subscriber)},{"../Subscriber":7,"../util/EmptyError":223,"../util/errorObject":230,"../util/tryCatch":241}],150:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b): -(d.prototype=b.prototype,new d)},k=a("../Subscription");a=a("../Observable");b=function(a){function b(){a.call(this);this.attemptedToUnsubscribePrimary=!1;this.count=0}h(b,a);b.prototype.setPrimary=function(a){this.primary=a};b.prototype.unsubscribe=function(){this.isUnsubscribed||this.attemptedToUnsubscribePrimary||(this.attemptedToUnsubscribePrimary=!0,0===this.count&&(a.prototype.unsubscribe.call(this),this.primary.unsubscribe()))};return b}(k.Subscription);e.RefCountSubscription=b;a=function(a){function b(d, -c,g){a.call(this);this.key=d;this.groupSubject=c;this.refCountSubscription=g}h(b,a);b.prototype._subscribe=function(a){var c=new k.Subscription;this.refCountSubscription&&!this.refCountSubscription.isUnsubscribed&&c.add(new m(this.refCountSubscription));c.add(this.groupSubject.subscribe(a));return c};return b}(a.Observable);e.GroupedObservable=a;var m=function(a){function b(d){a.call(this);this.parent=d;d.count++}h(b,a);b.prototype.unsubscribe=function(){this.parent.isUnsubscribed||this.isUnsubscribed|| -(a.prototype.unsubscribe.call(this),this.parent.count--,0===this.parent.count&&this.parent.attemptedToUnsubscribePrimary&&(this.parent.unsubscribe(),this.parent.primary.unsubscribe()))};return b}(k.Subscription);e.InnerRefCountSubscription=m},{"../Observable":3,"../Subscription":8}],151:[function(a,b,e){var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Subscriber"); -var k=a("../Observable"),m=a("../Subject"),l=a("../util/Map"),f=a("../util/FastMap"),d=a("./groupBy-support"),c=a("../util/tryCatch"),g=a("../util/errorObject");e.groupBy=function(a,c,d){return new n(this,a,c,d)};var n=function(a){function c(d,b,g,f){a.call(this);this.source=d;this.keySelector=b;this.elementSelector=g;this.durationSelector=f}h(c,a);c.prototype._subscribe=function(a){var c=new d.RefCountSubscription;a=new p(a,c,this.keySelector,this.elementSelector,this.durationSelector);c.setPrimary(this.source.subscribe(a)); -return c};return c}(k.Observable);e.GroupByObservable=n;var p=function(a){function b(c,d,g,f,n){a.call(this);this.refCountSubscription=d;this.keySelector=g;this.elementSelector=f;this.durationSelector=n;this.groups=null;this.destination=c;this.add(c)}h(b,a);b.prototype._next=function(a){var b=c.tryCatch(this.keySelector)(a);if(b===g.errorObject)this.error(b.e);else{var n=this.groups,e=this.elementSelector,k=this.durationSelector;n||(n=this.groups="string"===typeof b?new f.FastMap:new l.Map);var h= -n.get(b);h||(n.set(b,h=new m.Subject),n=new d.GroupedObservable(b,h,this.refCountSubscription),k&&(k=c.tryCatch(k)(new d.GroupedObservable(b,h)),k===g.errorObject?this.error(k.e):this.add(k._subscribe(new q(b,h,this)))),this.destination.next(n));e?(a=c.tryCatch(e)(a),a===g.errorObject?this.error(a.e):h.next(a)):h.next(a)}};b.prototype._error=function(a){var c=this,b=this.groups;b&&b.forEach(function(b,d){b.error(a);c.removeGroup(d)});this.destination.error(a)};b.prototype._complete=function(){var a= -this,c=this.groups;c&&c.forEach(function(c,b){c.complete();a.removeGroup(c)});this.destination.complete()};b.prototype.removeGroup=function(a){this.groups.delete(a)};return b}(b.Subscriber),q=function(a){function c(b,d,g){a.call(this,null);this.key=b;this.group=d;this.parent=g}h(c,a);c.prototype._next=function(a){this.group.complete();this.parent.removeGroup(this.key)};c.prototype._error=function(a){this.group.error(a);this.parent.removeGroup(this.key)};c.prototype._complete=function(){this.group.complete(); -this.parent.removeGroup(this.key)};return c}(b.Subscriber)},{"../Observable":3,"../Subject":6,"../Subscriber":7,"../util/FastMap":224,"../util/Map":226,"../util/errorObject":230,"../util/tryCatch":241,"./groupBy-support":150}],152:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../util/noop");e.ignoreElements= -function(){return this.lift(new m)};var m=function(){function a(){}a.prototype.call=function(a){return new l(a)};return a}(),l=function(a){function b(){a.apply(this,arguments)}h(b,a);b.prototype._next=function(a){k.noop()};return b}(b.Subscriber)},{"../Subscriber":7,"../util/noop":236}],153:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)}; -b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject"),l=a("../util/EmptyError");e.last=function(a,b,d){return this.lift(new f(a,b,d,this))};var f=function(){function a(c,b,d,f){this.predicate=c;this.resultSelector=b;this.defaultValue=d;this.source=f}a.prototype.call=function(a){return new d(a,this.predicate,this.resultSelector,this.defaultValue,this.source)};return a}(),d=function(a){function b(d,g,f,e,l){a.call(this,d);this.predicate=g;this.resultSelector=f;this.defaultValue= -e;this.source=l;this.hasValue=!1;this.index=0;"undefined"!==typeof e&&(this.lastValue=e,this.hasValue=!0)}h(b,a);b.prototype._next=function(a){var c=this.predicate,b=this.resultSelector,d=this.destination,g=this.index++;if(c)if(c=k.tryCatch(c)(a,g,this.source),c===m.errorObject)d.error(m.errorObject.e);else{if(c){if(b&&(a=k.tryCatch(b)(a,g),a===m.errorObject)){d.error(m.errorObject.e);return}this.lastValue=a;this.hasValue=!0}}else this.lastValue=a,this.hasValue=!0};b.prototype._complete=function(){var a= -this.destination;this.hasValue?(a.next(this.lastValue),a.complete()):a.error(new l.EmptyError)};return b}(b.Subscriber)},{"../Subscriber":7,"../util/EmptyError":223,"../util/errorObject":230,"../util/tryCatch":241}],154:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject"); -e.map=function(a,c){if("function"!==typeof a)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return this.lift(new l(a,c))};var l=function(){function a(c,b){this.project=c;this.thisArg=b}a.prototype.call=function(a){return new f(a,this.project,this.thisArg)};return a}(),f=function(a){function c(c,b,f){a.call(this,c);this.project=b;this.thisArg=f;this.count=0}h(c,a);c.prototype._next=function(a){a=k.tryCatch(this.project).call(this.thisArg||this,a,this.count++);a=== -m.errorObject?this.error(m.errorObject.e):this.destination.next(a)};return c}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],155:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");e.mapTo=function(a){return this.lift(new k(a))};var k=function(){function a(b){this.value=b}a.prototype.call= -function(a){return new m(a,this.value)};return a}(),m=function(a){function b(d,c){a.call(this,d);this.value=c}h(b,a);b.prototype._next=function(a){this.destination.next(this.value)};return b}(a.Subscriber)},{"../Subscriber":7}],156:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../Notification");e.materialize= -function(){return this.lift(new m)};var m=function(){function a(){}a.prototype.call=function(a){return new l(a)};return a}(),l=function(a){function b(c){a.call(this,c)}h(b,a);b.prototype._next=function(a){this.destination.next(k.Notification.createNext(a))};b.prototype._error=function(a){var b=this.destination;b.next(k.Notification.createError(a));b.complete()};b.prototype._complete=function(){var a=this.destination;a.next(k.Notification.createComplete());a.complete()};return b}(b.Subscriber)},{"../Notification":2, -"../Subscriber":7}],157:[function(a,b,e){var h=a("../observable/fromArray"),k=a("./mergeAll-support"),m=a("../scheduler/queue"),l=a("../util/isScheduler");e.merge=function(){for(var a=[],b=0;b -a?-1:a)};return c}(b.Subscriber)},{"../Subscriber":7,"../observable/empty":109}],176:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};a=a("../Subscriber");e.retry=function(a){void 0===a&&(a=0);return this.lift(new k(a,this))};var k=function(){function a(b,c){this.count=b;this.source=c}a.prototype.call=function(a){return new m(a,this.count, -this.source)};return a}(),m=function(a){function b(c,d,n){a.call(this);this.destination=c;this.count=d;this.source=n;c.add(this);this.lastSubscription=this}h(b,a);b.prototype._next=function(a){this.destination.next(a)};b.prototype.error=function(a){this.isUnsubscribed||(this.unsubscribe(),this.resubscribe())};b.prototype._complete=function(){this.unsubscribe();this.destination.complete()};b.prototype.resubscribe=function(a){void 0===a&&(a=0);var b=this.lastSubscription,d=this.destination;d.remove(b); -b.unsubscribe();a=new l(this,this.count,a+1);this.lastSubscription=this.source.subscribe(a);d.add(this.lastSubscription)};return b}(a.Subscriber),l=function(a){function b(c,d,n){void 0===n&&(n=0);a.call(this,null);this.parent=c;this.count=d;this.retried=n}h(b,a);b.prototype._next=function(a){this.parent.destination.next(a)};b.prototype._error=function(a){var b=this.parent,d=this.retried,f=this.count;f&&d===f?b.destination.error(a):b.resubscribe(d)};b.prototype._complete=function(){this.parent.destination.complete()}; -return b}(a.Subscriber)},{"../Subscriber":7}],177:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../Subject"),m=a("../util/tryCatch"),l=a("../util/errorObject");e.retryWhen=function(a){return this.lift(new f(a,this))};var f=function(){function a(c,b){this.notifier=c;this.source=b}a.prototype.call=function(a){return new d(a, -this.notifier,this.source)};return a}(),d=function(a){function b(c,d,g){a.call(this);this.destination=c;this.notifier=d;this.source=g;c.add(this);this.lastSubscription=this}h(b,a);b.prototype._next=function(a){this.destination.next(a)};b.prototype.error=function(c){var b=this.destination;if(!this.isUnsubscribed){a.prototype.unsubscribe.call(this);if(!this.retryNotifications){this.errors=new k.Subject;var d=m.tryCatch(this.notifier).call(this,this.errors);if(d===l.errorObject)b.error(l.errorObject.e); -else{this.retryNotifications=d;var f=new g(this);this.notificationSubscription=d.subscribe(f);b.add(this.notificationSubscription)}}this.errors.next(c)}};b.prototype.destinationError=function(a){this.tearDown();this.destination.error(a)};b.prototype._complete=function(){this.destinationComplete()};b.prototype.destinationComplete=function(){this.tearDown();this.destination.complete()};b.prototype.unsubscribe=function(){this.lastSubscription===this?a.prototype.unsubscribe.call(this):this.tearDown()}; -b.prototype.tearDown=function(){a.prototype.unsubscribe.call(this);this.lastSubscription.unsubscribe();var c=this.notificationSubscription;c&&c.unsubscribe()};b.prototype.resubscribe=function(){var a=this.destination,b=this.lastSubscription;a.remove(b);b.unsubscribe();b=new c(this);this.lastSubscription=this.source.subscribe(b);a.add(this.lastSubscription)};return b}(b.Subscriber),c=function(a){function c(b){a.call(this,null);this.parent=b}h(c,a);c.prototype._next=function(a){this.parent.destination.next(a)}; -c.prototype._error=function(a){this.parent.errors.next(a)};c.prototype._complete=function(){this.parent.destinationComplete()};return c}(b.Subscriber),g=function(a){function c(b){a.call(this,null);this.parent=b}h(c,a);c.prototype._next=function(a){this.parent.resubscribe()};c.prototype._error=function(a){this.parent.destinationError(a)};c.prototype._complete=function(){this.parent.destinationComplete()};return c}(b.Subscriber)},{"../Subject":6,"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}], -178:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};a=a("../Subscriber");e.sample=function(a){return this.lift(new k(a))};var k=function(){function a(b){this.notifier=b}a.prototype.call=function(a){return new m(a,this.notifier)};return a}(),m=function(a){function b(c,d){a.call(this,c);this.notifier=d;this.hasValue=!1;this.add(d._subscribe(new l(this)))} -h(b,a);b.prototype._next=function(a){this.lastValue=a;this.hasValue=!0};b.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))};return b}(a.Subscriber),l=function(a){function b(c){a.call(this,null);this.parent=c}h(b,a);b.prototype._next=function(){this.parent.notifyNext()};b.prototype._error=function(a){this.parent.error(a)};b.prototype._complete=function(){this.parent.notifyNext()};return b}(a.Subscriber)},{"../Subscriber":7}],179:[function(a,b, -e){function h(a){var c=a.delay;a.subscriber.notifyNext();this.schedule(a,c)}var k=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var m=a("../scheduler/asap");e.sampleTime=function(a,c){void 0===c&&(c=m.asap);return this.lift(new l(a,c))};var l=function(){function a(c,b){this.delay=c;this.scheduler=b}a.prototype.call=function(a){return new f(a, -this.delay,this.scheduler)};return a}(),f=function(a){function c(c,b,f){a.call(this,c);this.delay=b;this.scheduler=f;this.hasValue=!1;this.add(f.schedule(h,b,{subscriber:this,delay:b}))}k(c,a);c.prototype._next=function(a){this.lastValue=a;this.hasValue=!0};c.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))};return c}(b.Subscriber)},{"../Subscriber":7,"../scheduler/asap":215}],180:[function(a,b,e){var h=this&&this.__extends||function(a,c){function b(){this.constructor= -a}for(var f in c)c.hasOwnProperty(f)&&(a[f]=c[f]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e.scan=function(a,c){return this.lift(new l(a,c))};var l=function(){function a(c,b){this.accumulator=c;this.seed=b}a.prototype.call=function(a){return new f(a,this.accumulator,this.seed)};return a}(),f=function(a){function c(c,b,f){a.call(this,c);this.accumulator=b;this.accumulatorSet=!1;this.seed=f;this.accumulator= -b;this.accumulatorSet="undefined"!==typeof f}h(c,a);Object.defineProperty(c.prototype,"seed",{get:function(){return this._seed},set:function(a){this.accumulatorSet=!0;this._seed=a},enumerable:!0,configurable:!0});c.prototype._next=function(a){this.accumulatorSet?(a=k.tryCatch(this.accumulator).call(this,this.seed,a),a===m.errorObject?this.destination.error(m.errorObject.e):(this.seed=a,this.destination.next(this.seed))):(this.seed=a,this.destination.next(a))};return c}(b.Subscriber)},{"../Subscriber":7, -"../util/errorObject":230,"../util/tryCatch":241}],181:[function(a,b,e){function h(){return new m.Subject}var k=a("./multicast"),m=a("../Subject");e.share=function(){return k.multicast.call(this,h).refCount()}},{"../Subject":6,"./multicast":165}],182:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};b=a("../Subscriber");var k=a("../util/tryCatch"), -m=a("../util/errorObject"),l=a("../util/EmptyError");e.single=function(a){return this.lift(new f(a,this))};var f=function(){function a(b,c){this.predicate=b;this.source=c}a.prototype.call=function(a){return new d(a,this.predicate,this.source)};return a}(),d=function(a){function b(d,g,f){a.call(this,d);this.predicate=g;this.source=f;this.seenValue=!1;this.index=0}h(b,a);b.prototype.applySingleValue=function(a){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue= -!0,this.singleValue=a)};b.prototype._next=function(a){var b=this.predicate,c=this.index++;b?(b=k.tryCatch(b)(a,c,this.source),b===m.errorObject?this.destination.error(b.e):b&&this.applySingleValue(a)):this.applySingleValue(a)};b.prototype._complete=function(){var a=this.destination;0 -this.total&&this.destination.next(a)};return b}(a.Subscriber)},{"../Subscriber":7}],184:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};a=a("../Subscriber");e.skipUntil=function(a){return this.lift(new k(a))};var k=function(){function a(b){this.notifier=b}a.prototype.call=function(a){return new m(a,this.notifier)};return a}(),m=function(a){function b(c, -d){a.call(this,c);this.notifier=d;this.notificationSubscriber=null;this.notificationSubscriber=new l(this);this.add(this.notifier.subscribe(this.notificationSubscriber))}h(b,a);b.prototype._next=function(a){this.notificationSubscriber.hasValue&&this.destination.next(a)};b.prototype._error=function(a){this.destination.error(a)};b.prototype._complete=function(){this.notificationSubscriber.hasCompleted&&this.destination.complete();this.notificationSubscriber.unsubscribe()};b.prototype.unsubscribe=function(){this._isUnsubscribed|| -(this._subscription?(this._subscription.unsubscribe(),this._isUnsubscribed=!0):a.prototype.unsubscribe.call(this))};return b}(a.Subscriber),l=function(a){function b(c){a.call(this,null);this.parent=c;this.hasCompleted=this.hasValue=!1}h(b,a);b.prototype._next=function(a){this.hasValue=!0};b.prototype._error=function(a){this.parent.error(a);this.hasValue=!0};b.prototype._complete=function(){this.hasCompleted=!0};return b}(a.Subscriber)},{"../Subscriber":7}],185:[function(a,b,e){var h=this&&this.__extends|| -function(a,b){function g(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(g.prototype=b.prototype,new g)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject");e.skipWhile=function(a){return this.lift(new l(a))};var l=function(){function a(b){this.predicate=b}a.prototype.call=function(a){return new f(a,this.predicate)};return a}(),f=function(a){function b(c,f){a.call(this,c);this.predicate=f;this.skipping=!0;this.index= -0}h(b,a);b.prototype._next=function(a){var b=this.destination;if(!0===this.skipping){var c=this.index++,c=k.tryCatch(this.predicate)(a,c);c===m.errorObject?b.error(c.e):this.skipping=Boolean(c)}!1===this.skipping&&b.next(a)};return b}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}],186:[function(a,b,e){var h=a("../observable/fromArray"),k=a("../observable/ScalarObservable"),m=a("../observable/empty"),l=a("./concat-static"),f=a("../util/isScheduler");e.startWith= -function(){for(var a=[],b=0;bthis.total)throw new k.ArgumentOutOfRangeError;}a.prototype.call=function(a){return new f(a,this.total)};return a}(),f=function(a){function b(c,f){a.call(this,c);this.total=f;this.count=0}h(b,a);b.prototype._next= -function(a){var b=this.total;++this.count<=b&&(this.destination.next(a),this.count===b&&this.destination.complete())};return b}(b.Subscriber)},{"../Subscriber":7,"../observable/empty":109,"../util/ArgumentOutOfRangeError":222}],192:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscriber");var k=a("../util/noop");e.takeUntil=function(a){return this.lift(new m(a))}; -var m=function(){function a(b){this.notifier=b}a.prototype.call=function(a){return new l(a,this.notifier)};return a}(),l=function(a){function b(c,e){a.call(this,c);this.notifier=e;this.notificationSubscriber=null;this.notificationSubscriber=new f(c);this.add(e.subscribe(this.notificationSubscriber))}h(b,a);b.prototype._complete=function(){this.destination.complete();this.notificationSubscriber.unsubscribe()};return b}(b.Subscriber),f=function(a){function b(c){a.call(this,null);this.destination=c} -h(b,a);b.prototype._next=function(a){this.destination.complete()};b.prototype._error=function(a){this.destination.error(a)};b.prototype._complete=function(){k.noop()};return b}(b.Subscriber)},{"../Subscriber":7,"../util/noop":236}],193:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscriber");var k=a("../util/tryCatch"),m=a("../util/errorObject"); -e.takeWhile=function(a){return this.lift(new l(a))};var l=function(){function a(b){this.predicate=b}a.prototype.call=function(a){return new f(a,this.predicate)};return a}(),f=function(a){function b(c,f){a.call(this,c);this.predicate=f;this.index=0}h(b,a);b.prototype._next=function(a){var b=this.destination,c=k.tryCatch(this.predicate)(a,this.index++);c==m.errorObject?b.error(c.e):Boolean(c)?b.next(a):b.complete()};return b}(b.Subscriber)},{"../Subscriber":7,"../util/errorObject":230,"../util/tryCatch":241}], -194:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)},k=a("../observable/fromPromise");b=a("../Subscriber");var m=a("../util/tryCatch"),l=a("../util/isPromise"),f=a("../util/errorObject");e.throttle=function(a){return this.lift(new d(a))};var d=function(){function a(b){this.durationSelector=b}a.prototype.call=function(a){return new c(a,this.durationSelector)}; -return a}(),c=function(a){function b(c,d){a.call(this,c);this.durationSelector=d}h(b,a);b.prototype._next=function(a){if(!this.throttled){var b=this.destination,c=m.tryCatch(this.durationSelector)(a);c===f.errorObject?b.error(f.errorObject.e):(l.isPromise(c)&&(c=k.PromiseObservable.create(c)),this.add(this.throttled=c._subscribe(new g(this))),b.next(a))}};b.prototype._error=function(b){this.clearThrottle();a.prototype._error.call(this,b)};b.prototype._complete=function(){this.clearThrottle();a.prototype._complete.call(this)}; -b.prototype.clearThrottle=function(){var a=this.throttled;a&&(a.unsubscribe(),this.remove(a),this.throttled=null)};return b}(b.Subscriber),g=function(a){function b(c){a.call(this,null);this.parent=c}h(b,a);b.prototype._next=function(a){this.parent.clearThrottle()};b.prototype._error=function(a){this.parent.error(a)};b.prototype._complete=function(){this.parent.clearThrottle()};return b}(b.Subscriber)},{"../Subscriber":7,"../observable/fromPromise":115,"../util/errorObject":230,"../util/isPromise":234, -"../util/tryCatch":241}],195:[function(a,b,e){function h(a){a.subscriber.clearThrottle()}var k=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscriber");var m=a("../scheduler/asap");e.throttleTime=function(a,b){void 0===b&&(b=m.asap);return this.lift(new l(a,b))};var l=function(){function a(b,d){this.delay=b;this.scheduler=d}a.prototype.call=function(a){return new f(a, -this.delay,this.scheduler)};return a}(),f=function(a){function b(c,f,e){a.call(this,c);this.delay=f;this.scheduler=e}k(b,a);b.prototype._next=function(a){this.throttled||(this.add(this.throttled=this.scheduler.schedule(h,this.delay,{subscriber:this})),this.destination.next(a))};b.prototype.clearThrottle=function(){var a=this.throttled;a&&(a.unsubscribe(),this.remove(a),this.throttled=null)};return b}(b.Subscriber)},{"../Subscriber":7,"../scheduler/asap":215}],196:[function(a,b,e){var h=this&&this.__extends|| -function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};b=a("../Subscriber");var k=a("../scheduler/queue"),m=a("../util/isDate");e.timeout=function(a,b,f){void 0===b&&(b=null);void 0===f&&(f=k.queue);var e=m.isDate(a);a=e?+a-f.now():a;return this.lift(new l(a,e,b,f))};var l=function(){function a(b,d,f,e){this.waitFor=b;this.absoluteTimeout=d;this.errorToSend=f;this.scheduler=e}a.prototype.call= -function(a){return new f(a,this.absoluteTimeout,this.waitFor,this.errorToSend,this.scheduler)};return a}(),f=function(a){function b(c,f,e,l,k){a.call(this,c);this.absoluteTimeout=f;this.waitFor=e;this.errorToSend=l;this.scheduler=k;this._previousIndex=this.index=0;this._hasCompleted=!1;this.scheduleTimeout()}h(b,a);Object.defineProperty(b.prototype,"previousIndex",{get:function(){return this._previousIndex},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"hasCompleted",{get:function(){return this._hasCompleted}, -enumerable:!0,configurable:!0});b.dispatchTimeout=function(a){var b=a.subscriber;a=a.index;b.hasCompleted||b.previousIndex!==a||b.notifyTimeout()};b.prototype.scheduleTimeout=function(){var a=this.index;this.scheduler.schedule(b.dispatchTimeout,this.waitFor,{subscriber:this,index:a});this.index++;this._previousIndex=a};b.prototype._next=function(a){this.destination.next(a);this.absoluteTimeout||this.scheduleTimeout()};b.prototype._error=function(a){this.destination.error(a);this._hasCompleted=!0}; -b.prototype._complete=function(){this.destination.complete();this._hasCompleted=!0};b.prototype.notifyTimeout=function(){this.error(this.errorToSend||Error("timeout"))};return b}(b.Subscriber)},{"../Subscriber":7,"../scheduler/queue":216,"../util/isDate":232}],197:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)},k=a("../scheduler/queue"), -m=a("../util/isDate");b=a("../OuterSubscriber");var l=a("../util/subscribeToResult");e.timeoutWith=function(a,b,d){void 0===d&&(d=k.queue);var e=m.isDate(a);a=e?+a-d.now():a;return this.lift(new f(a,e,b,d))};var f=function(){function a(b,c,d,f){this.waitFor=b;this.absoluteTimeout=c;this.withObservable=d;this.scheduler=f}a.prototype.call=function(a){return new d(a,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler)};return a}(),d=function(a){function b(d,f,g,e,l){a.call(this,null); -this.destination=d;this.absoluteTimeout=f;this.waitFor=g;this.withObservable=e;this.scheduler=l;this.timeoutSubscription=void 0;this._previousIndex=this.index=0;this._hasCompleted=!1;d.add(this);this.scheduleTimeout()}h(b,a);Object.defineProperty(b.prototype,"previousIndex",{get:function(){return this._previousIndex},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"hasCompleted",{get:function(){return this._hasCompleted},enumerable:!0,configurable:!0});b.dispatchTimeout=function(a){var b= -a.subscriber;a=a.index;b.hasCompleted||b.previousIndex!==a||b.handleTimeout()};b.prototype.scheduleTimeout=function(){var a=this.index;this.scheduler.schedule(b.dispatchTimeout,this.waitFor,{subscriber:this,index:a});this.index++;this._previousIndex=a};b.prototype._next=function(a){this.destination.next(a);this.absoluteTimeout||this.scheduleTimeout()};b.prototype._error=function(a){this.destination.error(a);this._hasCompleted=!0};b.prototype._complete=function(){this.destination.complete();this._hasCompleted= -!0};b.prototype.handleTimeout=function(){if(!this.isUnsubscribed){var a=this.withObservable;this.unsubscribe();this.destination.add(this.timeoutSubscription=l.subscribeToResult(this,a))}};return b}(b.OuterSubscriber)},{"../OuterSubscriber":4,"../scheduler/queue":216,"../util/isDate":232,"../util/subscribeToResult":239}],198:[function(a,b,e){var h=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b): -(d.prototype=b.prototype,new d)};a=a("../Subscriber");e.toArray=function(){return this.lift(new k)};var k=function(){function a(){}a.prototype.call=function(a){return new m(a)};return a}(),m=function(a){function b(d){a.call(this,d);this.array=[]}h(b,a);b.prototype._next=function(a){this.array.push(a)};b.prototype._complete=function(){this.destination.next(this.array);this.destination.complete()};return b}(a.Subscriber)},{"../Subscriber":7}],199:[function(a,b,e){var h=a("../util/root");e.toPromise= -function(a){var b=this;a||(h.root.Rx&&h.root.Rx.config&&h.root.Rx.config.Promise?a=h.root.Rx.config.Promise:h.root.Promise&&(a=h.root.Promise));if(!a)throw Error("no Promise impl found");return new a(function(a,f){var d;b.subscribe(function(a){return d=a},function(a){return f(a)},function(){return a(d)})})}},{"../util/root":238}],200:[function(a,b,e){var h=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b): -(f.prototype=b.prototype,new f)};b=a("../Subscriber");var k=a("../Subject");e.window=function(a){return this.lift(new m(a))};var m=function(){function a(b){this.closingNotifier=b}a.prototype.call=function(a){return new l(a,this.closingNotifier)};return a}(),l=function(a){function b(c,e){a.call(this,c);this.destination=c;this.closingNotifier=e;this.add(e._subscribe(new f(this)));this.openWindow()}h(b,a);b.prototype._next=function(a){this.window.next(a)};b.prototype._error=function(a){this.window.error(a); -this.destination.error(a)};b.prototype._complete=function(){this.window.complete();this.destination.complete()};b.prototype.openWindow=function(){var a=this.window;a&&a.complete();var a=this.destination,b=this.window=new k.Subject;a.add(b);a.next(b)};return b}(b.Subscriber),f=function(a){function b(c){a.call(this,null);this.parent=c}h(b,a);b.prototype._next=function(){this.parent.openWindow()};b.prototype._error=function(a){this.parent._error(a)};b.prototype._complete=function(){this.parent._complete()}; -return b}(b.Subscriber)},{"../Subject":6,"../Subscriber":7}],201:[function(a,b,e){var h=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var g in b)b.hasOwnProperty(g)&&(a[g]=b[g]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subscriber");var k=a("../Subject");e.windowCount=function(a,b){void 0===b&&(b=0);return this.lift(new m(a,b))};var m=function(){function a(b,c){this.windowSize=b;this.startWindowEvery=c}a.prototype.call=function(a){return new l(a, -this.windowSize,this.startWindowEvery)};return a}(),l=function(a){function b(c,d,e){a.call(this,c);this.destination=c;this.windowSize=d;this.startWindowEvery=e;this.windows=[new k.Subject];this.count=0;d=this.windows[0];c.add(d);c.next(d)}h(b,a);b.prototype._next=function(a){for(var b=0this.index};a.prototype.hasCompleted=function(){return this.array.length===this.index};return a}(),q=function(a){function b(c,d,f,e){a.call(this,c);this.parent=d;this.observable=f;this.index=e;this.stillUnsubscribed=!0;this.buffer=[];this.isComplete=!1}h(b,a);b.prototype[d.SymbolShim.iterator]=function(){return this};b.prototype.next=function(){var a=this.buffer;return 0===a.length&&this.isComplete? -{done:!0}:{value:a.shift(),done:!1}};b.prototype.hasValue=function(){return 0=b?this.scheduleNow(a,d):this.scheduleLater(a,b,d)};a.prototype.scheduleNow= -function(a,b){return(new h.QueueAction(this,a)).schedule(b)};a.prototype.scheduleLater=function(a,b,d){return(new k.FutureAction(this,a)).schedule(d,b)};return a}();e.QueueScheduler=a},{"./FutureAction":212,"./QueueAction":213}],215:[function(a,b,e){a=a("./AsapScheduler");e.asap=new a.AsapScheduler},{"./AsapScheduler":211}],216:[function(a,b,e){a=a("./QueueScheduler");e.queue=new a.QueueScheduler},{"./QueueScheduler":214}],217:[function(a,b,e){var h=this&&this.__extends||function(a,b){function e(){this.constructor= -a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(e.prototype=b.prototype,new e)};a=function(a){function b(){a.call(this);this._value=void 0;this._isScalar=this._hasNext=!1}h(b,a);b.prototype._subscribe=function(b){this.completeSignal&&this._hasNext&&b.next(this._value);return a.prototype._subscribe.call(this,b)};b.prototype._next=function(a){this._value=a;this._hasNext=!0};b.prototype._complete=function(){var a=-1,b=this.observers,d=b.length;this.observers= -void 0;this.isUnsubscribed=!0;if(this._hasNext)for(;++ad?1:d;this._windowTime=1>c?1:c;this.scheduler=f}h(b,a);b.prototype._next=function(b){var c=this._getNow();this.events.push(new m(c,b));this._trimBufferThenGetEvents(c);a.prototype._next.call(this,b)};b.prototype._subscribe=function(b){for(var c=this._trimBufferThenGetEvents(this._getNow()),f=-1,e=c.length;!b.isUnsubscribed&& -++fb&&(k=Math.max(k,h-b));0=n?h.complete():(c=b?b(c[e],e):c[e],h.next(c),a.index=e+1,this.schedule(a)))};e.prototype._subscribe=function(a){var c=this.arrayLike,m=this.mapFn, +n=this.scheduler,b=c.length;if(n)return n.schedule(e.dispatch,0,{arrayLike:c,index:0,length:b,mapFn:m,subscriber:a});for(n=0;n=a.count?b.complete():(b.next(d[e]),b.isUnsubscribed||(a.index=e+1,this.schedule(a)))};d.prototype._subscribe=function(a){var e=this.array,n=e.length,b=this.scheduler;if(b)return b.schedule(d.dispatch,0,{array:e,index:0,count:n,subscriber:a});for(b=0;bd)this.period=0;c&&"function"===typeof c.schedule||(this.scheduler=l.asap)}g(e,a);e.create=function(a,c){void 0===a&&(a=0);void 0===c&&(c=l.asap);return new e(a,c)};e.dispatch=function(a){var c=a.subscriber,e=a.period;c.next(a.index);c.isUnsubscribed||(a.index+=1,this.schedule(a,e))};e.prototype._subscribe=function(a){var c=this.period;a.add(this.scheduler.schedule(e.dispatch,c,{index:0,subscriber:a,period:c}))};return e}(b.Observable);f.IntervalObservable=a},{"../Observable":3,"../scheduler/asap":224, +"../util/isNumeric":243}],128:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../util/root"),l=a("../util/isObject"),h=a("../util/tryCatch");b=a("../Observable");var e=a("../util/isFunction"),d=a("../util/SymbolShim"),c=a("../util/errorObject");a=function(a){function b(c,h,f,q){a.call(this);if(null==c)throw Error("iterator cannot be null."); +if(l.isObject(h))this.thisArg=h,this.scheduler=f;else if(e.isFunction(h))this.project=h,this.thisArg=f,this.scheduler=q;else if(null!=h)throw Error("When provided, `project` must be a function.");if((h=c[d.SymbolShim.iterator])||"string"!==typeof c)if(h||void 0===c.length){if(!h)throw new TypeError("Object is not iterable");c=c[d.SymbolShim.iterator]()}else c=new n(c);else c=new m(c);this.iterator=c}g(b,a);b.create=function(a,c,d,e){return new b(a,c,d,e)};b.dispatch=function(a){var d=a.index,e=a.thisArg, +m=a.project,b=a.iterator,n=a.subscriber;a.hasError?n.error(a.error):(b=b.next(),b.done?n.complete():(m?(b=h.tryCatch(m).call(e,b.value,d),b===c.errorObject?(a.error=c.errorObject.e,a.hasError=!0):(n.next(b),a.index=d+1)):(n.next(b.value),a.index=d+1),n.isUnsubscribed||this.schedule(a)))};b.prototype._subscribe=function(a){var d=0,e=this.iterator,m=this.project,n=this.thisArg,f=this.scheduler;if(f)return f.schedule(b.dispatch,0,{index:d,thisArg:n,project:m,iterator:e,subscriber:a});do{f=e.next();if(f.done){a.complete(); +break}else if(m){f=h.tryCatch(m).call(n,f.value,d++);if(f===c.errorObject){a.error(c.errorObject.e);break}a.next(f)}else a.next(f.value);if(a.isUnsubscribed)break}while(1)};return b}(b.Observable);f.IteratorObservable=a;var m=function(){function a(c,d,e){void 0===d&&(d=0);void 0===e&&(e=c.length);this.str=c;this.idx=d;this.len=e}a.prototype[d.SymbolShim.iterator]=function(){return this};a.prototype.next=function(){return this.idxm?-1:1;e=m*Math.floor(Math.abs(e));e=0>=e?0:e>q?q:e}this.arr=c;this.idx=d;this.len=e}a.prototype[d.SymbolShim.iterator]=function(){return this};a.prototype.next=function(){return this.idx=a.end?c.complete():(c.next(e),c.isUnsubscribed||(a.index=d+1,a.start=e+1,this.schedule(a)))};b.prototype._subscribe=function(a){var e=0,d=this.start,c=this.end,m=this.scheduler;if(m)return m.schedule(b.dispatch, +0,{index:e,end:c,start:d,subscriber:a});do{if(e++>=c){a.complete();break}a.next(d++);if(a.isUnsubscribed)break}while(1)};return b}(a("../Observable").Observable);f.RangeObservable=a},{"../Observable":3}],132:[function(a,b,f){var g=this&&this.__extends||function(a,b){function h(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(h.prototype=b.prototype,new h)};a=function(a){function b(h,e){a.call(this);this.value=h;this.scheduler=e;this._isScalar= +!0}g(b,a);b.create=function(a,e){return new b(a,e)};b.dispatch=function(a){var e=a.value,d=a.subscriber;a.done?d.complete():(d.next(e),d.isUnsubscribed||(a.done=!0,this.schedule(a)))};b.prototype._subscribe=function(a){var e=this.value,d=this.scheduler;if(d)return d.schedule(b.dispatch,0,{done:!1,value:e,subscriber:a});a.next(e);a.isUnsubscribed||a.complete()};return b}(a("../Observable").Observable);f.ScalarObservable=a},{"../Observable":3}],133:[function(a,b,f){var g=this&&this.__extends||function(a, +e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};b=a("../Observable");var k=a("../scheduler/asap"),l=a("../util/isNumeric");a=function(a){function e(d,c,e){void 0===c&&(c=0);void 0===e&&(e=k.asap);a.call(this);this.source=d;this.delayTime=c;this.scheduler=e;if(!l.isNumeric(c)||0>c)this.delayTime=0;e&&"function"===typeof e.schedule||(this.scheduler=k.asap)}g(e,a);e.create=function(a,c,m){void 0=== +c&&(c=0);void 0===m&&(m=k.asap);return new e(a,c,m)};e.dispatch=function(a){return a.source.subscribe(a.subscriber)};e.prototype._subscribe=function(a){return this.scheduler.schedule(e.dispatch,this.delayTime,{source:this.source,subscriber:a})};return e}(b.Observable);f.SubscribeOnObservable=a},{"../Observable":3,"../scheduler/asap":224,"../util/isNumeric":243}],134:[function(a,b,f){var g=this&&this.__extends||function(a,c){function e(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]= +c[b]);a.prototype=null===c?Object.create(c):(e.prototype=c.prototype,new e)},k=a("../util/isNumeric");b=a("../Observable");var l=a("../scheduler/asap"),h=a("../util/isScheduler"),e=a("../util/isDate");a=function(a){function c(c,b,f){void 0===c&&(c=0);a.call(this);this.period=-1;this.dueTime=0;k.isNumeric(b)?this.period=1>+b&&1||+b:h.isScheduler(b)&&(f=b);h.isScheduler(f)||(f=l.asap);this.scheduler=f;this.dueTime=e.isDate(c)?+c-this.scheduler.now():c}g(c,a);c.create=function(a,d,e){void 0===a&&(a= +0);return new c(a,d,e)};c.dispatch=function(a){var c=a.index,d=a.period,e=a.subscriber;e.next(c);if(!e.isUnsubscribed){if(-1===d)return e.complete();a.index=c+1;this.schedule(a,d)}};c.prototype._subscribe=function(a){return this.scheduler.schedule(c.dispatch,this.dueTime,{index:0,period:this.period,subscriber:a})};return c}(b.Observable);f.TimerObservable=a},{"../Observable":3,"../scheduler/asap":224,"../util/isDate":241,"../util/isNumeric":243,"../util/isScheduler":246}],135:[function(a,b,f){var g= +this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.buffer=function(a){return this.lift(new l(a))};var l=function(){function a(d){this.closingNotifier=d}a.prototype.call=function(a){return new h(a,this.closingNotifier)};return a}(),h=function(a){function d(c,d){a.call(this,c);this.buffer=[];this.add(k.subscribeToResult(this, +d))}g(d,a);d.prototype._next=function(a){this.buffer.push(a)};d.prototype.notifyNext=function(a,d,e,b,h){a=this.buffer;this.buffer=[];this.destination.next(a)};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],136:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};a=a("../Subscriber");f.bufferCount=function(a, +e){void 0===e&&(e=null);return this.lift(new k(a,e))};var k=function(){function a(e,d){this.bufferSize=e;this.startBufferEvery=d}a.prototype.call=function(a){return new l(a,this.bufferSize,this.startBufferEvery)};return a}(),l=function(a){function e(d,c,e){a.call(this,d);this.bufferSize=c;this.startBufferEvery=e;this.buffers=[[]];this.count=0}g(e,a);e.prototype._next=function(a){var c=this.count+=1,e=this.destination,b=this.bufferSize,h=this.buffers,f=h.length,k=-1;0===c%(null==this.startBufferEvery? +b:this.startBufferEvery)&&h.push([]);for(c=0;c=d[0].time-e.now();)d.shift().notification.observe(b);0(d||0)?Number.POSITIVE_INFINITY:d;return this.lift(new e(a,d,b))};var e=function(){function a(c,d,e){this.project=c;this.concurrent=d;this.scheduler=e}a.prototype.call=function(a){return new d(a,this.project,this.concurrent,this.scheduler)};return a}();f.ExpandOperator=e;var d=function(a){function d(e,b,m,h){a.call(this, +e);this.project=b;this.concurrent=m;this.scheduler=h;this.active=this.index=0;this.hasCompleted=!1;ma?this.lift(new l(-1,this)):this.lift(new l(a-1,this))};var l=function(){function a(d,c){this.count=d;this.source=c}a.prototype.call=function(a){return new h(a, +this.count,this.source)};return a}(),h=function(a){function d(c,d,b){a.call(this,c);this.count=d;this.source=b}g(d,a);d.prototype.complete=function(){if(!this.isStopped){var c=this.source,d=this.count;if(0===d)return a.prototype.complete.call(this);-1this.total&&this.destination.next(a)};return b}(a.Subscriber)},{"../Subscriber":9}],194:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber"); +var k=a("../util/subscribeToResult");f.skipUntil=function(a){return this.lift(new l(a))};var l=function(){function a(d){this.notifier=d}a.prototype.call=function(a){return new h(a,this.notifier)};return a}(),h=function(a){function d(c,d){a.call(this,c);this.isInnerStopped=this.hasValue=!1;this.add(k.subscribeToResult(this,d))}g(d,a);d.prototype._next=function(c){this.hasValue&&a.prototype._next.call(this,c)};d.prototype._complete=function(){this.isInnerStopped?a.prototype._complete.call(this):this.unsubscribe()}; +d.prototype.notifyNext=function(a,d,b,e,f){this.hasValue=!0};d.prototype.notifyComplete=function(){this.isInnerStopped=!0;this.isStopped&&a.prototype._complete.call(this)};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],195:[function(a,b,f){var g=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");f.skipWhile= +function(a){return this.lift(new k(a))};var k=function(){function a(b){this.predicate=b}a.prototype.call=function(a){return new l(a,this.predicate)};return a}(),l=function(a){function b(d,c){a.call(this,d);this.predicate=c;this.skipping=!0;this.index=0}g(b,a);b.prototype._next=function(a){var c=this.destination;this.skipping&&this.tryCallPredicate(a);this.skipping||c.next(a)};b.prototype.tryCallPredicate=function(a){try{this.skipping=!!this.predicate(a,this.index++)}catch(c){this.destination.error(c)}}; +return b}(a.Subscriber)},{"../Subscriber":9}],196:[function(a,b,f){var g=a("../observable/ArrayObservable"),k=a("../observable/ScalarObservable"),l=a("../observable/EmptyObservable"),h=a("./concat"),e=a("../util/isScheduler");f.startWith=function(){for(var a=[],c=0;cthis.total)throw new k.ArgumentOutOfRangeError;}a.prototype.call= +function(a){return new e(a,this.total)};return a}(),e=function(a){function c(c,b){a.call(this,c);this.total=b;this.count=0}g(c,a);c.prototype._next=function(a){var c=this.total;++this.count<=c&&(this.destination.next(a),this.count===c&&this.destination.complete())};return c}(b.Subscriber)},{"../Subscriber":9,"../observable/EmptyObservable":121,"../util/ArgumentOutOfRangeError":231}],202:[function(a,b,f){var g=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&& +(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/ArgumentOutOfRangeError"),l=a("../observable/EmptyObservable");f.takeLast=function(a){return 0===a?new l.EmptyObservable:this.lift(new h(a))};var h=function(){function a(c){this.total=c;if(0>this.total)throw new k.ArgumentOutOfRangeError;}a.prototype.call=function(a){return new e(a,this.total)};return a}(),e=function(a){function c(c,b){a.call(this,c);this.total=b;this.index=this.count= +0;this.ring=Array(b)}g(c,a);c.prototype._next=function(a){var c=this.index,d=this.ring,b=this.total,e=this.count;1this.index};a.prototype.hasCompleted=function(){return this.array.length===this.index};return a}(),u=function(a){function b(c,d,e,f){a.call(this,c);this.parent=d;this.observable=e;this.index=f;this.stillUnsubscribed=!0;this.buffer=[];this.isComplete=!1}k(b,a);b.prototype[c.SymbolShim.iterator]=function(){return this};b.prototype.next= +function(){var a=this.buffer;return 0===a.length&&this.isComplete?{done:!0}:{value:a.shift(),done:!1}};b.prototype.hasValue=function(){return 0=b?this.scheduleNow(a,d):this.scheduleLater(a,b,d)};a.prototype.scheduleNow=function(a,b){return(new g.QueueAction(this,a)).schedule(b)};a.prototype.scheduleLater=function(a,b,d){return(new k.FutureAction(this,a)).schedule(d,b)};return a}(); +f.QueueScheduler=a},{"./FutureAction":221,"./QueueAction":222}],224:[function(a,b,f){a=a("./AsapScheduler");f.asap=new a.AsapScheduler},{"./AsapScheduler":220}],225:[function(a,b,f){a=a("./QueueScheduler");f.queue=new a.QueueScheduler},{"./QueueScheduler":223}],226:[function(a,b,f){var g=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};a=function(a){function b(){a.apply(this, +arguments);this.value=null;this.hasNext=!1}g(b,a);b.prototype._subscribe=function(b){this.hasCompleted&&this.hasNext&&b.next(this.value);return a.prototype._subscribe.call(this,b)};b.prototype._next=function(a){this.value=a;this.hasNext=!0};b.prototype._complete=function(){var a=-1,b=this.observers,d=b.length;this.isUnsubscribed=!0;if(this.hasNext)for(;++ac?1:c; +this._windowTime=1>d?1:d}g(b,a);b.prototype._next=function(b){var d=this._getNow();this.events.push(new h(d,b));this._trimBufferThenGetEvents(d);a.prototype._next.call(this,b)};b.prototype._subscribe=function(b){var d=this._trimBufferThenGetEvents(this._getNow()),f=this.scheduler;f&&b.add(b=new l.ObserveOnSubscriber(b,f));for(var f=-1,g=d.length;++fb&&(g=Math.max(g,f-b));0o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(6),c=n(7),u=function(e){function t(t){e.call(this),this.attributeName=t}return r(t,e),Object.defineProperty(t.prototype,"token",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@Attribute("+s.stringify(this.attributeName)+")"},t=i([s.CONST(),o("design:paramtypes",[String])],t)}(c.DependencyMetadata);t.AttributeMetadata=u;var p=function(e){function t(t,n){var r=void 0===n?{}:n,i=r.descendants,o=void 0===i?!1:i,s=r.first,a=void 0===s?!1:s;e.call(this),this._selector=t,this.descendants=o,this.first=a}return r(t,e),Object.defineProperty(t.prototype,"isViewQuery",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selector",{get:function(){return a.resolveForwardRef(this._selector)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVarBindingQuery",{get:function(){return s.isString(this.selector)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"varBindings",{get:function(){return this.selector.split(",")},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@Query("+s.stringify(this.selector)+")"},t=i([s.CONST(),o("design:paramtypes",[Object,Object])],t)}(c.DependencyMetadata);t.QueryMetadata=p;var l=function(e){function t(t,n){var r=(void 0===n?{}:n).descendants,i=void 0===r?!1:r;e.call(this,t,{descendants:i})}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object,Object])],t)}(p);t.ContentChildrenMetadata=l;var h=function(e){function t(t){e.call(this,t,{descendants:!0,first:!0})}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(p);t.ContentChildMetadata=h;var f=function(e){function t(t,n){var r=void 0===n?{}:n,i=r.descendants,o=void 0===i?!1:i,s=r.first,a=void 0===s?!1:s;e.call(this,t,{descendants:o,first:a})}return r(t,e),Object.defineProperty(t.prototype,"isViewQuery",{get:function(){return!0},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return"@ViewQuery("+s.stringify(this.selector)+")"},t=i([s.CONST(),o("design:paramtypes",[Object,Object])],t)}(p);t.ViewQueryMetadata=f;var d=function(e){function t(t){e.call(this,t,{descendants:!0})}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(f);t.ViewChildrenMetadata=d;var y=function(e){function t(t){e.call(this,t,{descendants:!0,first:!0})}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(f);t.ViewChildMetadata=y},function(e,t){(function(e){function n(e){return e.name}function r(){k=!0}function i(){if(k)throw"Cannot enable prod mode after platform setup.";N=!1}function o(){return N}function s(e){return e}function a(){return function(e){return e}}function c(e){return void 0!==e&&null!==e}function u(e){return void 0===e||null===e}function p(e){return"string"==typeof e}function l(e){return"function"==typeof e}function h(e){return l(e)}function f(e){return"object"==typeof e&&null!==e}function d(e){return e instanceof x.Promise}function y(e){return Array.isArray(e)}function v(e){return"number"==typeof e}function m(e){return e instanceof t.Date&&!isNaN(e.valueOf())}function g(){}function _(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.name)return e.name;var t=e.toString(),n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function b(e){return e}function C(e,t){return e}function P(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function w(e){return e}function R(e){return u(e)?null:e}function E(e){return u(e)?!1:e}function O(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function S(e){console.log(e)}function D(e,t,n){for(var r=t.split("."),i=e;r.length>1;){var o=r.shift();i=i.hasOwnProperty(o)&&c(i[o])?i[o]:i[o]={}}(void 0===i||null===i)&&(i={}),i[r.shift()]=n}function T(){if(u(q))if(c(Symbol)&&c(Symbol.iterator))q=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t=0&&e[r]==t;r--)n--;e=e.substring(0,n)}return e},e.replace=function(e,t,n){return e.replace(t,n)},e.replaceAll=function(e,t,n){return e.replace(t,n)},e.slice=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=null),e.slice(t,null===n?void 0:n)},e.replaceAllMapped=function(e,t,n){return e.replace(t,function(){for(var e=[],t=0;te?-1:e>t?1:0},e}();t.StringWrapper=j;var V=function(){function e(e){void 0===e&&(e=[]),this.parts=e}return e.prototype.add=function(e){this.parts.push(e)},e.prototype.toString=function(){return this.parts.join("")},e}();t.StringJoiner=V;var M=function(e){function t(t){e.call(this),this.message=t}return I(t,e),t.prototype.toString=function(){return this.message},t}(Error);t.NumberParseError=M;var B=function(){function e(){}return e.toFixed=function(e,t){return e.toFixed(t)},e.equal=function(e,t){return e===t},e.parseIntAutoRadix=function(e){var t=parseInt(e);if(isNaN(t))throw new M("Invalid integer literal when parsing "+e);return t},e.parseInt=function(e,t){if(10==t){if(/^(\-|\+)?[0-9]+$/.test(e))return parseInt(e,t)}else if(16==t){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(e))return parseInt(e,t)}else{var n=parseInt(e,t);if(!isNaN(n))return n}throw new M("Invalid integer literal when parsing "+e+" in base "+t)},e.parseFloat=function(e){return parseFloat(e)},Object.defineProperty(e,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),e.isNaN=function(e){return isNaN(e)},e.isInteger=function(e){return Number.isInteger(e)},e}();t.NumberWrapper=B,t.RegExp=x.RegExp;var L=function(){function e(){}return e.create=function(e,t){return void 0===t&&(t=""),t=t.replace(/g/g,""),new x.RegExp(e,t+"g")},e.firstMatch=function(e,t){return e.lastIndex=0,e.exec(t)},e.test=function(e,t){return e.lastIndex=0,e.test(t)},e.matcher=function(e,t){return e.lastIndex=0,{re:e,input:t}},e}();t.RegExpWrapper=L;var F=function(){function e(){}return e.next=function(e){return e.re.exec(e.input)},e}();t.RegExpMatcherWrapper=F;var W=function(){function e(){}return e.apply=function(e,t){return e.apply(null,t)},e}();t.FunctionWrapper=W,t.looseIdentical=P,t.getMapKey=w,t.normalizeBlank=R,t.normalizeBool=E,t.isJsObject=O,t.print=S;var U=function(){function e(){}return e.parse=function(e){return x.JSON.parse(e)},e.stringify=function(e){return x.JSON.stringify(e,null,2)},e}();t.Json=U;var H=function(){function e(){}return e.create=function(e,n,r,i,o,s,a){return void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),new t.Date(e,n-1,r,i,o,s,a)},e.fromISOString=function(e){return new t.Date(e)},e.fromMillis=function(e){return new t.Date(e)},e.toMillis=function(e){return e.getTime()},e.now=function(){return new t.Date},e.toJson=function(e){return e.toJSON()},e}();t.DateWrapper=H,t.setValueOnPath=D;var q=null;t.getSymbolIterator=T}).call(t,function(){return this}())},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(7);t.InjectMetadata=i.InjectMetadata,t.OptionalMetadata=i.OptionalMetadata,t.InjectableMetadata=i.InjectableMetadata,t.SelfMetadata=i.SelfMetadata,t.HostMetadata=i.HostMetadata,t.SkipSelfMetadata=i.SkipSelfMetadata,t.DependencyMetadata=i.DependencyMetadata,r(n(8));var o=n(10);t.forwardRef=o.forwardRef,t.resolveForwardRef=o.resolveForwardRef;var s=n(11);t.Injector=s.Injector;var a=n(13);t.Binding=a.Binding,t.ProviderBuilder=a.ProviderBuilder,t.ResolvedFactory=a.ResolvedFactory,t.Dependency=a.Dependency,t.bind=a.bind,t.Provider=a.Provider,t.provide=a.provide;var c=n(19);t.Key=c.Key,t.TypeLiteral=c.TypeLiteral;var u=n(21);t.NoProviderError=u.NoProviderError,t.AbstractProviderError=u.AbstractProviderError,t.CyclicDependencyError=u.CyclicDependencyError,t.InstantiationError=u.InstantiationError,t.InvalidProviderError=u.InvalidProviderError,t.NoAnnotationError=u.NoAnnotationError,t.OutOfBoundsError=u.OutOfBoundsError;var p=n(22);t.OpaqueToken=p.OpaqueToken},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this.token=e}return e.prototype.toString=function(){return"@Inject("+o.stringify(this.token)+")"},e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.InjectMetadata=s;var a=function(){function e(){}return e.prototype.toString=function(){return"@Optional()"},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.OptionalMetadata=a;var c=function(){function e(){}return Object.defineProperty(e.prototype,"token",{get:function(){return null},enumerable:!0,configurable:!0}),e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.DependencyMetadata=c;var u=function(){function e(){}return e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.InjectableMetadata=u;var p=function(){function e(){}return e.prototype.toString=function(){return"@Self()"},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.SelfMetadata=p;var l=function(){function e(){}return e.prototype.toString=function(){return"@SkipSelf()"},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.SkipSelfMetadata=l;var h=function(){function e(){}return e.prototype.toString=function(){return"@Host()"},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.HostMetadata=h},function(e,t,n){var r=n(7),i=n(9);t.Inject=i.makeParamDecorator(r.InjectMetadata),t.Optional=i.makeParamDecorator(r.OptionalMetadata),t.Injectable=i.makeDecorator(r.InjectableMetadata),t.Self=i.makeParamDecorator(r.SelfMetadata),t.Host=i.makeParamDecorator(r.HostMetadata),t.SkipSelf=i.makeParamDecorator(r.SkipSelfMetadata)},function(e,t,n){function r(e){return u.isFunction(e)&&e.hasOwnProperty("annotation")&&(e=e.annotation),e}function i(e,t){if(e===Object||e===String||e===Function||e===Number||e===Array)throw new Error("Can not use native "+u.stringify(e)+" as constructor");if(u.isFunction(e))return e;if(e instanceof Array){var n=e,i=e[e.length-1];if(!u.isFunction(i))throw new Error("Last position of Class method array must be Function in key "+t+" was '"+u.stringify(i)+"'");var o=n.length-1;if(o!=i.length)throw new Error("Number of annotations ("+o+") does not match number of arguments ("+i.length+") in the function: "+u.stringify(i));for(var s=[],a=0,c=n.length-1;c>a;a++){var l=[];s.push(l);var h=n[a];if(h instanceof Array)for(var f=0;f0&&(this.provider0=t[0].provider,this.keyId0=t[0].getKeyId(),this.visibility0=t[0].visibility),n>1&&(this.provider1=t[1].provider,this.keyId1=t[1].getKeyId(),this.visibility1=t[1].visibility),n>2&&(this.provider2=t[2].provider,this.keyId2=t[2].getKeyId(),this.visibility2=t[2].visibility),n>3&&(this.provider3=t[3].provider,this.keyId3=t[3].getKeyId(),this.visibility3=t[3].visibility),n>4&&(this.provider4=t[4].provider,this.keyId4=t[4].getKeyId(),this.visibility4=t[4].visibility),n>5&&(this.provider5=t[5].provider,this.keyId5=t[5].getKeyId(),this.visibility5=t[5].visibility),n>6&&(this.provider6=t[6].provider,this.keyId6=t[6].getKeyId(),this.visibility6=t[6].visibility),n>7&&(this.provider7=t[7].provider,this.keyId7=t[7].getKeyId(),this.visibility7=t[7].visibility),n>8&&(this.provider8=t[8].provider,this.keyId8=t[8].getKeyId(),this.visibility8=t[8].visibility),n>9&&(this.provider9=t[9].provider,this.keyId9=t[9].getKeyId(),this.visibility9=t[9].visibility)}return e.prototype.getProviderAtIndex=function(e){if(0==e)return this.provider0;if(1==e)return this.provider1;if(2==e)return this.provider2;if(3==e)return this.provider3;if(4==e)return this.provider4;if(5==e)return this.provider5;if(6==e)return this.provider6;if(7==e)return this.provider7;if(8==e)return this.provider8;if(9==e)return this.provider9;throw new a.OutOfBoundsError(e)},e.prototype.createInjectorStrategy=function(e){return new v(e,this)},e}();t.ProtoInjectorInlineStrategy=f;var d=function(){function e(e,t){var n=t.length;this.providers=o.ListWrapper.createFixedSize(n),this.keyIds=o.ListWrapper.createFixedSize(n),this.visibilities=o.ListWrapper.createFixedSize(n);for(var r=0;n>r;r++)this.providers[r]=t[r].provider,this.keyIds[r]=t[r].getKeyId(),this.visibilities[r]=t[r].visibility}return e.prototype.getProviderAtIndex=function(e){if(0>e||e>=this.providers.length)throw new a.OutOfBoundsError(e);return this.providers[e]},e.prototype.createInjectorStrategy=function(e){return new m(this,e)},e}();t.ProtoInjectorDynamicStrategy=d;var y=function(){function e(e){this.numberOfProviders=e.length,this._strategy=e.length>l?new d(this,e):new f(this,e)}return e.prototype.getProviderAtIndex=function(e){return this._strategy.getProviderAtIndex(e)},e}();t.ProtoInjector=y;var v=function(){function e(e,n){this.injector=e,this.protoStrategy=n,this.obj0=t.UNDEFINED,this.obj1=t.UNDEFINED,this.obj2=t.UNDEFINED,this.obj3=t.UNDEFINED,this.obj4=t.UNDEFINED,this.obj5=t.UNDEFINED,this.obj6=t.UNDEFINED,this.obj7=t.UNDEFINED,this.obj8=t.UNDEFINED,this.obj9=t.UNDEFINED}return e.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},e.prototype.instantiateProvider=function(e,t){return this.injector._new(e,t)},e.prototype.attach=function(e,t){var n=this.injector;n._parent=e,n._isHost=t},e.prototype.getObjByKeyId=function(e,n){var i=this.protoStrategy,o=this.injector;return i.keyId0===e&&r(i.visibility0,n)?(this.obj0===t.UNDEFINED&&(this.obj0=o._new(i.provider0,i.visibility0)),this.obj0):i.keyId1===e&&r(i.visibility1,n)?(this.obj1===t.UNDEFINED&&(this.obj1=o._new(i.provider1,i.visibility1)),this.obj1):i.keyId2===e&&r(i.visibility2,n)?(this.obj2===t.UNDEFINED&&(this.obj2=o._new(i.provider2,i.visibility2)),this.obj2):i.keyId3===e&&r(i.visibility3,n)?(this.obj3===t.UNDEFINED&&(this.obj3=o._new(i.provider3,i.visibility3)),this.obj3):i.keyId4===e&&r(i.visibility4,n)?(this.obj4===t.UNDEFINED&&(this.obj4=o._new(i.provider4,i.visibility4)),this.obj4):i.keyId5===e&&r(i.visibility5,n)?(this.obj5===t.UNDEFINED&&(this.obj5=o._new(i.provider5,i.visibility5)),this.obj5):i.keyId6===e&&r(i.visibility6,n)?(this.obj6===t.UNDEFINED&&(this.obj6=o._new(i.provider6,i.visibility6)),this.obj6):i.keyId7===e&&r(i.visibility7,n)?(this.obj7===t.UNDEFINED&&(this.obj7=o._new(i.provider7,i.visibility7)),this.obj7):i.keyId8===e&&r(i.visibility8,n)?(this.obj8===t.UNDEFINED&&(this.obj8=o._new(i.provider8,i.visibility8)),this.obj8):i.keyId9===e&&r(i.visibility9,n)?(this.obj9===t.UNDEFINED&&(this.obj9=o._new(i.provider9,i.visibility9)),this.obj9):t.UNDEFINED},e.prototype.getObjAtIndex=function(e){if(0==e)return this.obj0;if(1==e)return this.obj1;if(2==e)return this.obj2;if(3==e)return this.obj3;if(4==e)return this.obj4;if(5==e)return this.obj5;if(6==e)return this.obj6;if(7==e)return this.obj7;if(8==e)return this.obj8;if(9==e)return this.obj9;throw new a.OutOfBoundsError(e)},e.prototype.getMaxNumberOfObjects=function(){return l},e}();t.InjectorInlineStrategy=v;var m=function(){function e(e,n){this.protoStrategy=e,this.injector=n,this.objs=o.ListWrapper.createFixedSize(e.providers.length),o.ListWrapper.fill(this.objs,t.UNDEFINED)}return e.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},e.prototype.instantiateProvider=function(e,t){return this.injector._new(e,t)},e.prototype.attach=function(e,t){var n=this.injector;n._parent=e,n._isHost=t},e.prototype.getObjByKeyId=function(e,n){for(var i=this.protoStrategy,o=0;oe||e>=this.objs.length)throw new a.OutOfBoundsError(e);return this.objs[e]},e.prototype.getMaxNumberOfObjects=function(){return this.objs.length},e}();t.InjectorDynamicStrategy=m;var g=function(){function e(e,t){this.provider=e,this.visibility=t}return e.prototype.getKeyId=function(){return this.provider.key.id},e}();t.ProviderWithVisibility=g;var _=function(){function e(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),this._depProvider=n,this._debugContext=r,this._isHost=!1,this._constructionCounter=0,this._proto=e,this._parent=t,this._strategy=e._strategy.createInjectorStrategy(this)}return e.resolve=function(e){return s.resolveProviders(e)},e.resolveAndCreate=function(t){var n=e.resolve(t);return e.fromResolvedProviders(n)},e.fromResolvedProviders=function(t){var n=t.map(function(e){return new g(e,h.Public)}),r=new y(n);return new e(r,null,null)},e.fromResolvedBindings=function(t){return e.fromResolvedProviders(t)},e.prototype.debugContext=function(){return this._debugContext()},e.prototype.get=function(e){return this._getByKey(u.Key.get(e),null,null,!1,h.PublicAndPrivate)},e.prototype.getOptional=function(e){return this._getByKey(u.Key.get(e),null,null,!0,h.PublicAndPrivate)},e.prototype.getAt=function(e){return this._strategy.getObjAtIndex(e)},Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"internalStrategy",{get:function(){return this._strategy},enumerable:!0,configurable:!0}),e.prototype.resolveAndCreateChild=function(t){var n=e.resolve(t);return this.createChildFromResolved(n)},e.prototype.createChildFromResolved=function(t){var n=t.map(function(e){return new g(e,h.Public)}),r=new y(n),i=new e(r,null,null);return i._parent=this,i},e.prototype.resolveAndInstantiate=function(t){return this.instantiateResolved(e.resolve([t])[0])},e.prototype.instantiateResolved=function(e){return this._instantiateProvider(e,h.PublicAndPrivate)},e.prototype._new=function(e,t){if(this._constructionCounter++>this._strategy.getMaxNumberOfObjects())throw new a.CyclicDependencyError(this,e.key);return this._instantiateProvider(e,t)},e.prototype._instantiateProvider=function(e,t){if(e.multiProvider){for(var n=o.ListWrapper.createFixedSize(e.resolvedFactories.length),r=0;r0?this._getByDependency(e,E[0],n):null,i=O>1?this._getByDependency(e,E[1],n):null,o=O>2?this._getByDependency(e,E[2],n):null,s=O>3?this._getByDependency(e,E[3],n):null,c=O>4?this._getByDependency(e,E[4],n):null,u=O>5?this._getByDependency(e,E[5],n):null,p=O>6?this._getByDependency(e,E[6],n):null,l=O>7?this._getByDependency(e,E[7],n):null,h=O>8?this._getByDependency(e,E[8],n):null,f=O>9?this._getByDependency(e,E[9],n):null,d=O>10?this._getByDependency(e,E[10],n):null,y=O>11?this._getByDependency(e,E[11],n):null,v=O>12?this._getByDependency(e,E[12],n):null,m=O>13?this._getByDependency(e,E[13],n):null,g=O>14?this._getByDependency(e,E[14],n):null,_=O>15?this._getByDependency(e,E[15],n):null,b=O>16?this._getByDependency(e,E[16],n):null,C=O>17?this._getByDependency(e,E[17],n):null,P=O>18?this._getByDependency(e,E[18],n):null,w=O>19?this._getByDependency(e,E[19],n):null}catch(S){throw(S instanceof a.AbstractProviderError||S instanceof a.InstantiationError)&&S.addKey(this,e.key),S}var D;try{switch(O){case 0:D=R();break;case 1:D=R(r);break;case 2:D=R(r,i);break;case 3:D=R(r,i,o);break;case 4:D=R(r,i,o,s);break;case 5:D=R(r,i,o,s,c);break;case 6:D=R(r,i,o,s,c,u);break;case 7:D=R(r,i,o,s,c,u,p);break;case 8:D=R(r,i,o,s,c,u,p,l);break;case 9:D=R(r,i,o,s,c,u,p,l,h);break;case 10:D=R(r,i,o,s,c,u,p,l,h,f);break;case 11:D=R(r,i,o,s,c,u,p,l,h,f,d);break;case 12:D=R(r,i,o,s,c,u,p,l,h,f,d,y);break;case 13:D=R(r,i,o,s,c,u,p,l,h,f,d,y,v);break;case 14:D=R(r,i,o,s,c,u,p,l,h,f,d,y,v,m);break;case 15:D=R(r,i,o,s,c,u,p,l,h,f,d,y,v,m,g);break;case 16:D=R(r,i,o,s,c,u,p,l,h,f,d,y,v,m,g,_);break;case 17:D=R(r,i,o,s,c,u,p,l,h,f,d,y,v,m,g,_,b);break;case 18:D=R(r,i,o,s,c,u,p,l,h,f,d,y,v,m,g,_,b,C);break;case 19:D=R(r,i,o,s,c,u,p,l,h,f,d,y,v,m,g,_,b,C,P);break;case 20:D=R(r,i,o,s,c,u,p,l,h,f,d,y,v,m,g,_,b,C,P,w)}}catch(S){throw new a.InstantiationError(this,S,S.stack,e.key)}return D},e.prototype._getByDependency=function(e,n,r){var i=c.isPresent(this._depProvider)?this._depProvider.getDependency(this,e,n):t.UNDEFINED;return i!==t.UNDEFINED?i:this._getByKey(n.key,n.lowerBoundVisibility,n.upperBoundVisibility,n.optional,r)},e.prototype._getByKey=function(e,t,n,r,i){return e===b?this:n instanceof p.SelfMetadata?this._getByKeySelf(e,r,i):n instanceof p.HostMetadata?this._getByKeyHost(e,r,i,t):this._getByKeyDefault(e,r,i,t)},e.prototype._throwOrNull=function(e,t){if(t)return null;throw new a.NoProviderError(this,e)},e.prototype._getByKeySelf=function(e,n,r){var i=this._strategy.getObjByKeyId(e.id,r);return i!==t.UNDEFINED?i:this._throwOrNull(e,n)},e.prototype._getByKeyHost=function(e,n,r,i){var o=this;if(i instanceof p.SkipSelfMetadata){if(o._isHost)return this._getPrivateDependency(e,n,o);o=o._parent}for(;null!=o;){var s=o._strategy.getObjByKeyId(e.id,r);if(s!==t.UNDEFINED)return s;if(c.isPresent(o._parent)&&o._isHost)return this._getPrivateDependency(e,n,o);o=o._parent}return this._throwOrNull(e,n)},e.prototype._getPrivateDependency=function(e,n,r){var i=r._parent._strategy.getObjByKeyId(e.id,h.Private);return i!==t.UNDEFINED?i:this._throwOrNull(e,n)},e.prototype._getByKeyDefault=function(e,n,r,i){var o=this;for(i instanceof p.SkipSelfMetadata&&(r=o._isHost?h.PublicAndPrivate:h.Public,o=o._parent);null!=o;){var s=o._strategy.getObjByKeyId(e.id,r);if(s!==t.UNDEFINED)return s;r=o._isHost?h.PublicAndPrivate:h.Public,o=o._parent}return this._throwOrNull(e,n)},Object.defineProperty(e.prototype,"displayName",{get:function(){return"Injector(providers: ["+i(this,function(e){return' "'+e.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return this.displayName},e}();t.Injector=_;var b=u.Key.get(_)},function(e,t,n){function r(e){return o.isJsObject(e)?o.isArray(e)||!(e instanceof t.Map)&&o.getSymbolIterator()in e:!1}function i(e,t){if(o.isArray(e))for(var n=0;n-1?(e.splice(n,1),!0):!1},e.clear=function(e){e.length=0},e.isEmpty=function(e){return 0==e.length},e.fill=function(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=null),e.fill(t,n,null===r?e.length:r)},e.equals=function(e,t){if(e.length!=t.length)return!1;for(var n=0;nr&&(n=s,r=a)}}return n},e}();t.ListWrapper=h,t.isListLikeIterable=r,t.iterateListLike=i;var f=function(){var e=new t.Set([1,2,3]);return 3===e.size?function(e){return new t.Set(e)}:function(e){var n=new t.Set(e);if(n.size!==e.length)for(var r=0;ro?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},m=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},g=n(5),_=n(14),b=n(12),C=n(16),P=n(19),w=n(7),R=n(21),E=n(10),O=function(){function e(e,t,n,r,i){this.key=e,this.optional=t,this.lowerBoundVisibility=n,this.upperBoundVisibility=r,this.properties=i}return e.fromKey=function(t){return new e(t,!1,null,null,[])},e}();t.Dependency=O;var S=g.CONST_EXPR([]),D=function(){function e(e,t){var n=t.useClass,r=t.useValue,i=t.useExisting,o=t.useFactory,s=t.deps,a=t.multi;this.token=e,this.useClass=n,this.useValue=r,this.useExisting=i,this.useFactory=o,this.dependencies=s,this._multi=a}return Object.defineProperty(e.prototype,"multi",{get:function(){return g.normalizeBool(this._multi)},enumerable:!0,configurable:!0}),e=v([g.CONST(),m("design:paramtypes",[Object,Object])],e)}();t.Provider=D;var T=function(e){function t(t,n){var r=n.toClass,i=n.toValue,o=n.toAlias,s=n.toFactory,a=n.deps,c=n.multi;e.call(this,t,{useClass:r,useValue:i,useExisting:o,useFactory:s,deps:a,multi:c})}return y(t,e),Object.defineProperty(t.prototype,"toClass",{get:function(){return this.useClass},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toAlias",{get:function(){return this.useExisting},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toFactory",{get:function(){return this.useFactory},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"toValue",{get:function(){return this.useValue},enumerable:!0,configurable:!0}),t=v([g.CONST(),m("design:paramtypes",[Object,Object])],t)}(D);t.Binding=T;var A=function(){function e(e,t,n){this.key=e,this.resolvedFactories=t,this.multiProvider=n}return Object.defineProperty(e.prototype,"resolvedFactory",{get:function(){return this.resolvedFactories[0]},enumerable:!0,configurable:!0}),e}();t.ResolvedProvider_=A;var I=function(){function e(e,t){this.factory=e,this.dependencies=t}return e}();t.ResolvedFactory=I,t.bind=r,t.provide=i;var x=function(){function e(e){this.token=e}return e.prototype.toClass=function(e){if(!g.isType(e))throw new _.BaseException('Trying to create a class provider but "'+g.stringify(e)+'" is not a class!');return new D(this.token,{useClass:e})},e.prototype.toValue=function(e){return new D(this.token,{useValue:e})},e.prototype.toAlias=function(e){if(g.isBlank(e))throw new _.BaseException("Can not alias "+g.stringify(this.token)+" to a blank value!");return new D(this.token,{useExisting:e})},e.prototype.toFactory=function(e,t){if(!g.isFunction(e))throw new _.BaseException('Trying to create a factory provider but "'+g.stringify(e)+'" is not a function!');return new D(this.token,{useFactory:e,deps:t})},e}();t.ProviderBuilder=x,t.resolveFactory=o,t.resolveProvider=s,t.resolveProviders=a;var N=function(){function e(e,t){this.key=e,this.resolvedFactory=t}return e}()},function(e,t,n){function r(e){return new TypeError(e)}function i(){throw new c("unimplemented")}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(15),a=n(15);t.ExceptionHandler=a.ExceptionHandler;var c=function(e){function t(t){void 0===t&&(t="--"),e.call(this,t),this.message=t,this.stack=new Error(t).stack}return o(t,e),t.prototype.toString=function(){return this.message},t}(Error);t.BaseException=c;var u=function(e){function t(t,n,r,i){e.call(this,t),this._wrapperMessage=t,this._originalException=n,this._originalStack=r,this._context=i,this._wrapperStack=new Error(t).stack}return o(t,e),Object.defineProperty(t.prototype,"wrapperMessage",{get:function(){return this._wrapperMessage},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapperStack",{get:function(){return this._wrapperStack},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalException",{get:function(){return this._originalException},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalStack",{get:function(){return this._originalStack},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return s.ExceptionHandler.exceptionToString(this)},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.message},t}(Error);t.WrappedException=u,t.makeTypeError=r,t.unimplemented=i},function(e,t,n){var r=n(5),i=n(14),o=n(12),s=function(){function e(){this.res=[]}return e.prototype.log=function(e){this.res.push(e)},e.prototype.logError=function(e){this.res.push(e)},e.prototype.logGroup=function(e){this.res.push(e)},e.prototype.logGroupEnd=function(){},e}(),a=function(){function e(e,t){void 0===t&&(t=!0),this._logger=e,this._rethrowException=t}return e.exceptionToString=function(t,n,r){void 0===n&&(n=null),void 0===r&&(r=null);var i=new s,o=new e(i,!1);return o.call(t,n,r),i.res.join("\n")},e.prototype.call=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var i=this._findOriginalException(e),o=this._findOriginalStack(e),s=this._findContext(e);if(this._logger.logGroup("EXCEPTION: "+this._extractMessage(e)),r.isPresent(t)&&r.isBlank(o)&&(this._logger.logError("STACKTRACE:"),this._logger.logError(this._longStackTrace(t))),r.isPresent(n)&&this._logger.logError("REASON: "+n),r.isPresent(i)&&this._logger.logError("ORIGINAL EXCEPTION: "+this._extractMessage(i)),r.isPresent(o)&&(this._logger.logError("ORIGINAL STACKTRACE:"),this._logger.logError(this._longStackTrace(o))),r.isPresent(s)&&(this._logger.logError("ERROR CONTEXT:"),this._logger.logError(s)),this._logger.logGroupEnd(),this._rethrowException)throw e},e.prototype._extractMessage=function(e){return e instanceof i.WrappedException?e.wrapperMessage:e.toString()},e.prototype._longStackTrace=function(e){return o.isListLikeIterable(e)?e.join("\n\n-----async gap-----\n"):e.toString()},e.prototype._findContext=function(e){try{return e instanceof i.WrappedException?r.isPresent(e.context)?e.context:this._findContext(e.originalException):null}catch(t){return null}},e.prototype._findOriginalException=function(e){if(!(e instanceof i.WrappedException))return null;for(var t=e.originalException;t instanceof i.WrappedException&&r.isPresent(t.originalException);)t=t.originalException;return t},e.prototype._findOriginalStack=function(e){if(!(e instanceof i.WrappedException))return null;for(var t=e,n=e.originalStack;t instanceof i.WrappedException&&r.isPresent(t.originalException);)t=t.originalException,t instanceof i.WrappedException&&r.isPresent(t.originalException)&&(n=t.originalStack);return n},e}();t.ExceptionHandler=a},function(e,t,n){var r=n(17),i=n(17);t.Reflector=i.Reflector,t.ReflectionInfo=i.ReflectionInfo;var o=n(18);t.reflector=new r.Reflector(new o.ReflectionCapabilities)},function(e,t,n){function r(e,t){s.StringMapWrapper.forEach(t,function(t,n){return e.set(n,t)})}var i=n(5),o=n(14),s=n(12),a=function(){function e(e,t,n,r,i){this.annotations=e,this.parameters=t,this.factory=n,this.interfaces=r,this.propMetadata=i}return e}();t.ReflectionInfo=a;var c=function(){function e(e){this._injectableInfo=new s.Map,this._getters=new s.Map,this._setters=new s.Map,this._methods=new s.Map,this._usedKeys=null,this.reflectionCapabilities=e}return e.prototype.isReflectionEnabled=function(){return this.reflectionCapabilities.isReflectionEnabled()},e.prototype.trackUsage=function(){this._usedKeys=new s.Set},e.prototype.listUnusedKeys=function(){var e=this;if(null==this._usedKeys)throw new o.BaseException("Usage tracking is disabled");var t=s.MapWrapper.keys(this._injectableInfo);return t.filter(function(t){return!s.SetWrapper.has(e._usedKeys,t)})},e.prototype.registerFunction=function(e,t){this._injectableInfo.set(e,t)},e.prototype.registerType=function(e,t){this._injectableInfo.set(e,t)},e.prototype.registerGetters=function(e){r(this._getters,e)},e.prototype.registerSetters=function(e){r(this._setters,e)},e.prototype.registerMethods=function(e){r(this._methods,e)},e.prototype.factory=function(e){if(this._containsReflectionInfo(e)){var t=this._getReflectionInfo(e).factory;return i.isPresent(t)?t:null}return this.reflectionCapabilities.factory(e)},e.prototype.parameters=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).parameters;return i.isPresent(t)?t:[]}return this.reflectionCapabilities.parameters(e)},e.prototype.annotations=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).annotations;return i.isPresent(t)?t:[]}return this.reflectionCapabilities.annotations(e)},e.prototype.propMetadata=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).propMetadata;return i.isPresent(t)?t:{}}return this.reflectionCapabilities.propMetadata(e)},e.prototype.interfaces=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).interfaces;return i.isPresent(t)?t:[]}return this.reflectionCapabilities.interfaces(e)},e.prototype.getter=function(e){return this._getters.has(e)?this._getters.get(e):this.reflectionCapabilities.getter(e)},e.prototype.setter=function(e){return this._setters.has(e)?this._setters.get(e):this.reflectionCapabilities.setter(e)},e.prototype.method=function(e){return this._methods.has(e)?this._methods.get(e):this.reflectionCapabilities.method(e)},e.prototype._getReflectionInfo=function(e){return i.isPresent(this._usedKeys)&&this._usedKeys.add(e),this._injectableInfo.get(e)},e.prototype._containsReflectionInfo=function(e){return this._injectableInfo.has(e)},e.prototype.importUri=function(e){return this.reflectionCapabilities.importUri(e)},e}();t.Reflector=c},function(e,t,n){var r=n(5),i=n(14),o=function(){function e(e){this._reflect=r.isPresent(e)?e:r.global.Reflect}return e.prototype.isReflectionEnabled=function(){return!0},e.prototype.factory=function(e){switch(e.length){case 0:return function(){return new e};case 1:return function(t){return new e(t)};case 2:return function(t,n){return new e(t,n)};case 3:return function(t,n,r){return new e(t,n,r)};case 4:return function(t,n,r,i){return new e(t,n,r,i)};case 5:return function(t,n,r,i,o){return new e(t,n,r,i,o)};case 6:return function(t,n,r,i,o,s){return new e(t,n,r,i,o,s)};case 7:return function(t,n,r,i,o,s,a){return new e(t,n,r,i,o,s,a)};case 8:return function(t,n,r,i,o,s,a,c){return new e(t,n,r,i,o,s,a,c)};case 9:return function(t,n,r,i,o,s,a,c,u){return new e(t,n,r,i,o,s,a,c,u)};case 10:return function(t,n,r,i,o,s,a,c,u,p){return new e(t,n,r,i,o,s,a,c,u,p)};case 11:return function(t,n,r,i,o,s,a,c,u,p,l){return new e(t,n,r,i,o,s,a,c,u,p,l)};case 12:return function(t,n,r,i,o,s,a,c,u,p,l,h){return new e(t,n,r,i,o,s,a,c,u,p,l,h)};case 13:return function(t,n,r,i,o,s,a,c,u,p,l,h,f){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f)};case 14:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d)};case 15:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y)};case 16:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v)};case 17:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,m){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,m)};case 18:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,m,g){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,m,g)};case 19:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,m,g,_){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,m,g,_)};case 20:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,m,g,_,b){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,m,g,_,b)}}throw new Error("Cannot create a factory for '"+r.stringify(e)+"' because its constructor has more than 20 arguments")},e.prototype._zipTypesAndAnnotaions=function(e,t){var n;n="undefined"==typeof e?new Array(t.length):new Array(e.length);for(var i=0;i1){var t=r(s.ListWrapper.reversed(e)),n=t.map(function(e){return a.stringify(e.token)});return" ("+n.join(" -> ")+")"}return""}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(12),a=n(5),c=n(14),u=function(e){function t(t,n,r){e.call(this,"DI Exception"),this.keys=[n],this.injectors=[t],this.constructResolvingMessage=r,this.message=this.constructResolvingMessage(this.keys)}return o(t,e),t.prototype.addKey=function(e,t){this.injectors.push(e),this.keys.push(t),this.message=this.constructResolvingMessage(this.keys)},Object.defineProperty(t.prototype,"context",{get:function(){return this.injectors[this.injectors.length-1].debugContext()},enumerable:!0,configurable:!0}),t}(c.BaseException);t.AbstractProviderError=u;var p=function(e){function t(t,n){e.call(this,t,n,function(e){var t=a.stringify(s.ListWrapper.first(e).token);return"No provider for "+t+"!"+i(e)})}return o(t,e),t}(u);t.NoProviderError=p;var l=function(e){function t(t,n){e.call(this,t,n,function(e){return"Cannot instantiate cyclic dependency!"+i(e)})}return o(t,e),t}(u);t.CyclicDependencyError=l;var h=function(e){function t(t,n,r,i){e.call(this,"DI Exception",n,r,null),this.keys=[i],this.injectors=[t]}return o(t,e),t.prototype.addKey=function(e,t){this.injectors.push(e),this.keys.push(t)},Object.defineProperty(t.prototype,"wrapperMessage",{get:function(){var e=a.stringify(s.ListWrapper.first(this.keys).token);return"Error during instantiation of "+e+"!"+i(this.keys)+"."},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"causeKey",{get:function(){return this.keys[0]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this.injectors[this.injectors.length-1].debugContext()},enumerable:!0,configurable:!0}),t}(c.WrappedException);t.InstantiationError=h;var f=function(e){function t(t){e.call(this,"Invalid provider - only instances of Provider and Type are allowed, got: "+t.toString())}return o(t,e),t}(c.BaseException);t.InvalidProviderError=f;var d=function(e){function t(n,r){e.call(this,t._genMessage(n,r))}return o(t,e),t._genMessage=function(e,t){for(var n=[],r=0,i=t.length;i>r;r++){var o=t[r];a.isBlank(o)||0==o.length?n.push("?"):n.push(o.map(a.stringify).join(" "))}return"Cannot resolve all parameters for "+a.stringify(e)+"("+n.join(", ")+"). Make sure they all have valid type or annotations."},t}(c.BaseException);t.NoAnnotationError=d;var y=function(e){function t(t){e.call(this,"Index "+t+" is out-of-bounds.")}return o(t,e),t}(c.BaseException);t.OutOfBoundsError=y;var v=function(e){function t(t,n){e.call(this,"Cannot mix multi providers and regular providers, got: "+t.toString()+" "+n.toString())}return o(t,e),t}(c.BaseException);t.MixingMultiProvidersWithRegularProvidersError=v},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this._desc=e}return e.prototype.toString=function(){return"Token "+this._desc},e=r([o.CONST(),i("design:paramtypes",[String])],e)}();t.OpaqueToken=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(7),c=n(24),u=function(e){function t(t){var n=void 0===t?{}:t,r=n.selector,i=n.inputs,o=n.outputs,s=n.properties,a=n.events,c=n.host,u=n.bindings,p=n.providers,l=n.exportAs,h=n.queries;e.call(this),this.selector=r,this._inputs=i,this._properties=s,this._outputs=o,this._events=a,this.host=c,this.exportAs=l,this.queries=h,this._providers=p,this._bindings=u}return r(t,e),Object.defineProperty(t.prototype,"inputs",{get:function(){return s.isPresent(this._properties)&&this._properties.length>0?this._properties:this._inputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this.inputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"outputs",{get:function(){return s.isPresent(this._events)&&this._events.length>0?this._events:this._outputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"events",{get:function(){return this.outputs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providers",{get:function(){return s.isPresent(this._bindings)&&this._bindings.length>0?this._bindings:this._providers},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bindings",{get:function(){return this.providers},enumerable:!0,configurable:!0}),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(a.InjectableMetadata);t.DirectiveMetadata=u;var p=function(e){function t(t){var n=void 0===t?{}:t,r=n.selector,i=n.inputs,o=n.outputs,s=n.properties,a=n.events,u=n.host,p=n.exportAs,l=n.moduleId,h=n.bindings,f=n.providers,d=n.viewBindings,y=n.viewProviders,v=n.changeDetection,m=void 0===v?c.ChangeDetectionStrategy.Default:v,g=n.queries,_=n.templateUrl,b=n.template,C=n.styleUrls,P=n.styles,w=n.directives,R=n.pipes,E=n.encapsulation;e.call(this,{selector:r,inputs:i,outputs:o,properties:s,events:a,host:u,exportAs:p,bindings:h,providers:f,queries:g}),this.changeDetection=m,this._viewProviders=y,this._viewBindings=d,this.templateUrl=_,this.template=b,this.styleUrls=C,this.styles=P,this.directives=w,this.pipes=R,this.encapsulation=E,this.moduleId=l}return r(t,e),Object.defineProperty(t.prototype,"viewProviders",{get:function(){return s.isPresent(this._viewBindings)&&this._viewBindings.length>0?this._viewBindings:this._viewProviders},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"viewBindings",{get:function(){return this.viewProviders},enumerable:!0,configurable:!0}),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(u);t.ComponentMetadata=p;var l=function(e){function t(t){var n=t.name,r=t.pure;e.call(this),this.name=n,this._pure=r}return r(t,e),Object.defineProperty(t.prototype,"pure",{get:function(){return s.isPresent(this._pure)?this._pure:!0},enumerable:!0,configurable:!0}),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(a.InjectableMetadata);t.PipeMetadata=l;var h=function(){function e(e){this.bindingPropertyName=e}return e=i([s.CONST(),o("design:paramtypes",[String])],e)}();t.InputMetadata=h;var f=function(){function e(e){this.bindingPropertyName=e}return e=i([s.CONST(),o("design:paramtypes",[String])],e)}();t.OutputMetadata=f;var d=function(){function e(e){this.hostPropertyName=e}return e=i([s.CONST(),o("design:paramtypes",[String])],e)}();t.HostBindingMetadata=d;var y=function(){function e(e,t){this.eventName=e,this.args=t}return e=i([s.CONST(),o("design:paramtypes",[String,Array])],e)}();t.HostListenerMetadata=y},function(e,t,n){var r=n(25);t.ChangeDetectionStrategy=r.ChangeDetectionStrategy,t.ExpressionChangedAfterItHasBeenCheckedException=r.ExpressionChangedAfterItHasBeenCheckedException,t.ChangeDetectionError=r.ChangeDetectionError,t.ChangeDetectorRef=r.ChangeDetectorRef,t.WrappedValue=r.WrappedValue,t.SimpleChange=r.SimpleChange,t.IterableDiffers=r.IterableDiffers,t.KeyValueDiffers=r.KeyValueDiffers},function(e,t,n){var r=n(26),i=n(27),o=n(28),s=n(29),a=n(5),c=n(30);t.ASTWithSource=c.ASTWithSource,t.AST=c.AST,t.AstTransformer=c.AstTransformer,t.PropertyRead=c.PropertyRead,t.LiteralArray=c.LiteralArray,t.ImplicitReceiver=c.ImplicitReceiver;var u=n(31);t.Lexer=u.Lexer;var p=n(32);t.Parser=p.Parser;var l=n(33);t.Locals=l.Locals;var h=n(34);t.DehydratedException=h.DehydratedException,t.ExpressionChangedAfterItHasBeenCheckedException=h.ExpressionChangedAfterItHasBeenCheckedException,t.ChangeDetectionError=h.ChangeDetectionError;var f=n(35);t.ChangeDetectorDefinition=f.ChangeDetectorDefinition,t.DebugContext=f.DebugContext,t.ChangeDetectorGenConfig=f.ChangeDetectorGenConfig;var d=n(36);t.ChangeDetectionStrategy=d.ChangeDetectionStrategy,t.CHANGE_DETECTION_STRATEGY_VALUES=d.CHANGE_DETECTION_STRATEGY_VALUES;var y=n(37);t.DynamicProtoChangeDetector=y.DynamicProtoChangeDetector;var v=n(51);t.JitProtoChangeDetector=v.JitProtoChangeDetector;var m=n(40);t.BindingRecord=m.BindingRecord,t.BindingTarget=m.BindingTarget;var g=n(41);t.DirectiveIndex=g.DirectiveIndex,t.DirectiveRecord=g.DirectiveRecord;var _=n(42);t.DynamicChangeDetector=_.DynamicChangeDetector;var b=n(44);t.ChangeDetectorRef=b.ChangeDetectorRef;var C=n(26);t.IterableDiffers=C.IterableDiffers;var P=n(28);t.KeyValueDiffers=P.KeyValueDiffers;var w=n(38);t.WrappedValue=w.WrappedValue,t.SimpleChange=w.SimpleChange,t.keyValDiff=a.CONST_EXPR([a.CONST_EXPR(new s.DefaultKeyValueDifferFactory)]),t.iterableDiff=a.CONST_EXPR([a.CONST_EXPR(new i.DefaultIterableDifferFactory)]),t.defaultIterableDiffers=a.CONST_EXPR(new r.IterableDiffers(t.iterableDiff)),t.defaultKeyValueDiffers=a.CONST_EXPR(new o.KeyValueDiffers(t.keyValDiff))},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(6),u=function(){function e(e){this.factories=e}return e.create=function(t,n){if(o.isPresent(n)){var r=a.ListWrapper.clone(n.factories);return t=t.concat(r),new e(t)}return new e(t)},e.extend=function(t){return new c.Provider(e,{useFactory:function(n){if(o.isBlank(n))throw new s.BaseException("Cannot extend IterableDiffers without a parent injector");return e.create(t,n)},deps:[[e,new c.SkipSelfMetadata,new c.OptionalMetadata]]})},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(o.isPresent(t))return t;throw new s.BaseException("Cannot find a differ supporting object '"+e+"'")},e=r([c.Injectable(),o.CONST(),i("design:paramtypes",[Array])],e)}();t.IterableDiffers=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s); -return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(5),u=function(){function e(){}return e.prototype.supports=function(e){return a.isListLikeIterable(e)},e.prototype.create=function(e){return new p},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.DefaultIterableDifferFactory=u;var p=function(){function e(){this._collection=null,this._length=null,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(e.prototype,"collection",{get:function(){return this._collection},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),e.prototype.forEachItem=function(e){var t;for(t=this._itHead;null!==t;t=t._next)e(t)},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousItHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachMovedItem=function(e){var t;for(t=this._movesHead;null!==t;t=t._nextMoved)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.diff=function(e){if(c.isBlank(e)&&(e=[]),!a.isListLikeIterable(e))throw new s.BaseException("Error trying to diff '"+e+"'");return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n,r,i=this._itHead,o=!1;if(c.isArray(e)){var s=e;for(this._length=e.length,n=0;n"+c.stringify(this.currentIndex)+"]"},e}();t.CollectionChangeRecord=l;var h=function(){function e(){this._head=null,this._tail=null}return e.prototype.add=function(e){null===this._head?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)},e.prototype.get=function(e,t){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===t||to?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(6),u=function(){function e(e){this.factories=e}return e.create=function(t,n){if(o.isPresent(n)){var r=a.ListWrapper.clone(n.factories);return t=t.concat(r),new e(t)}return new e(t)},e.extend=function(t){return new c.Provider(e,{useFactory:function(n){if(o.isBlank(n))throw new s.BaseException("Cannot extend KeyValueDiffers without a parent injector");return e.create(t,n)},deps:[[e,new c.SkipSelfMetadata,new c.OptionalMetadata]]})},e.prototype.find=function(e){var t=this.factories.find(function(t){return t.supports(e)});if(o.isPresent(t))return t;throw new s.BaseException("Cannot find a differ supporting object '"+e+"'")},e=r([c.Injectable(),o.CONST(),i("design:paramtypes",[Array])],e)}();t.KeyValueDiffers=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(12),s=n(5),a=n(14),c=function(){function e(){}return e.prototype.supports=function(e){return e instanceof Map||s.isJsObject(e)},e.prototype.create=function(e){return new u},e=r([s.CONST(),i("design:paramtypes",[])],e)}();t.DefaultKeyValueDifferFactory=c;var u=function(){function e(){this._records=new Map,this._mapHead=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),e.prototype.forEachItem=function(e){var t;for(t=this._mapHead;null!==t;t=t._next)e(t)},e.prototype.forEachPreviousItem=function(e){var t;for(t=this._previousMapHead;null!==t;t=t._nextPrevious)e(t)},e.prototype.forEachChangedItem=function(e){var t;for(t=this._changesHead;null!==t;t=t._nextChanged)e(t)},e.prototype.forEachAddedItem=function(e){var t;for(t=this._additionsHead;null!==t;t=t._nextAdded)e(t)},e.prototype.forEachRemovedItem=function(e){var t;for(t=this._removalsHead;null!==t;t=t._nextRemoved)e(t)},e.prototype.diff=function(e){if(s.isBlank(e)&&(e=o.MapWrapper.createFromPairs([])),!(e instanceof Map||s.isJsObject(e)))throw new a.BaseException("Error trying to diff '"+e+"'");return this.check(e)?this:null},e.prototype.onDestroy=function(){},e.prototype.check=function(e){var t=this;this._reset();var n=this._records,r=this._mapHead,i=null,o=null,a=!1;return this._forEach(e,function(e,c){var u;null!==r&&c===r.key?(u=r,s.looseIdentical(e,r.currentValue)||(r.previousValue=r.currentValue,r.currentValue=e,t._addToChanges(r))):(a=!0,null!==r&&(r._next=null,t._removeFromSeq(i,r),t._addToRemovals(r)),n.has(c)?u=n.get(c):(u=new p(c),n.set(c,u),u.currentValue=e,t._addToAdditions(u))),a&&(t._isInRemovals(u)&&t._removeFromRemovals(u),null==o?t._mapHead=u:o._next=u),i=r,o=u,r=null===r?null:r._next}),this._truncate(i,r),this.isDirty},e.prototype._reset=function(){if(this.isDirty){var e;for(e=this._previousMapHead=this._mapHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._changesHead;null!==e;e=e._nextChanged)e.previousValue=e.currentValue;for(e=this._additionsHead;null!=e;e=e._nextAdded)e.previousValue=e.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=this._removalsTail=null}},e.prototype._truncate=function(e,t){for(;null!==t;){null===e?this._mapHead=null:e._next=null;var n=t._next;this._addToRemovals(t),e=t,t=n}for(var r=this._removalsHead;null!==r;r=r._nextRemoved)r.previousValue=r.currentValue,r.currentValue=null,this._records["delete"](r.key)},e.prototype._isInRemovals=function(e){return e===this._removalsHead||null!==e._nextRemoved||null!==e._prevRemoved},e.prototype._addToRemovals=function(e){null===this._removalsHead?this._removalsHead=this._removalsTail=e:(this._removalsTail._nextRemoved=e,e._prevRemoved=this._removalsTail,this._removalsTail=e)},e.prototype._removeFromSeq=function(e,t){var n=t._next;null===e?this._mapHead=n:e._next=n},e.prototype._removeFromRemovals=function(e){var t=e._prevRemoved,n=e._nextRemoved;null===t?this._removalsHead=n:t._nextRemoved=n,null===n?this._removalsTail=t:n._prevRemoved=t,e._prevRemoved=e._nextRemoved=null},e.prototype._addToAdditions=function(e){null===this._additionsHead?this._additionsHead=this._additionsTail=e:(this._additionsTail._nextAdded=e,this._additionsTail=e)},e.prototype._addToChanges=function(e){null===this._changesHead?this._changesHead=this._changesTail=e:(this._changesTail._nextChanged=e,this._changesTail=e)},e.prototype.toString=function(){var e,t=[],n=[],r=[],i=[],o=[];for(e=this._mapHead;null!==e;e=e._next)t.push(s.stringify(e));for(e=this._previousMapHead;null!==e;e=e._nextPrevious)n.push(s.stringify(e));for(e=this._changesHead;null!==e;e=e._nextChanged)r.push(s.stringify(e));for(e=this._additionsHead;null!==e;e=e._nextAdded)i.push(s.stringify(e));for(e=this._removalsHead;null!==e;e=e._nextRemoved)o.push(s.stringify(e));return"map: "+t.join(", ")+"\nprevious: "+n.join(", ")+"\nadditions: "+i.join(", ")+"\nchanges: "+r.join(", ")+"\nremovals: "+o.join(", ")+"\n"},e.prototype._forEach=function(e,t){e instanceof Map?e.forEach(t):o.StringMapWrapper.forEach(e,t)},e}();t.DefaultKeyValueDiffer=u;var p=function(){function e(e){this.key=e,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._nextAdded=null,this._nextRemoved=null,this._prevRemoved=null,this._nextChanged=null}return e.prototype.toString=function(){return s.looseIdentical(this.previousValue,this.currentValue)?s.stringify(this.key):s.stringify(this.key)+"["+s.stringify(this.previousValue)+"->"+s.stringify(this.currentValue)+"]"},e}();t.KVChangeRecord=p},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(12),o=function(){function e(){}return e.prototype.visit=function(e){return null},e.prototype.toString=function(){return"AST"},e}();t.AST=o;var s=function(e){function t(t,n,r){e.call(this),this.prefix=t,this.uninterpretedExpression=n,this.location=r}return r(t,e),t.prototype.visit=function(e){return e.visitQuote(this)},t.prototype.toString=function(){return"Quote"},t}(o);t.Quote=s;var a=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.visit=function(e){},t}(o);t.EmptyExpr=a;var c=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.visit=function(e){return e.visitImplicitReceiver(this)},t}(o);t.ImplicitReceiver=c;var u=function(e){function t(t){e.call(this),this.expressions=t}return r(t,e),t.prototype.visit=function(e){return e.visitChain(this)},t}(o);t.Chain=u;var p=function(e){function t(t,n,r){e.call(this),this.condition=t,this.trueExp=n,this.falseExp=r}return r(t,e),t.prototype.visit=function(e){return e.visitConditional(this)},t}(o);t.Conditional=p;var l=function(e){function t(t,n,r){e.call(this),this.receiver=t,this.name=n,this.getter=r}return r(t,e),t.prototype.visit=function(e){return e.visitPropertyRead(this)},t}(o);t.PropertyRead=l;var h=function(e){function t(t,n,r,i){e.call(this),this.receiver=t,this.name=n,this.setter=r,this.value=i}return r(t,e),t.prototype.visit=function(e){return e.visitPropertyWrite(this)},t}(o);t.PropertyWrite=h;var f=function(e){function t(t,n,r){e.call(this),this.receiver=t,this.name=n,this.getter=r}return r(t,e),t.prototype.visit=function(e){return e.visitSafePropertyRead(this)},t}(o);t.SafePropertyRead=f;var d=function(e){function t(t,n){e.call(this),this.obj=t,this.key=n}return r(t,e),t.prototype.visit=function(e){return e.visitKeyedRead(this)},t}(o);t.KeyedRead=d;var y=function(e){function t(t,n,r){e.call(this),this.obj=t,this.key=n,this.value=r}return r(t,e),t.prototype.visit=function(e){return e.visitKeyedWrite(this)},t}(o);t.KeyedWrite=y;var v=function(e){function t(t,n,r){e.call(this),this.exp=t,this.name=n,this.args=r}return r(t,e),t.prototype.visit=function(e){return e.visitPipe(this)},t}(o);t.BindingPipe=v;var m=function(e){function t(t){e.call(this),this.value=t}return r(t,e),t.prototype.visit=function(e){return e.visitLiteralPrimitive(this)},t}(o);t.LiteralPrimitive=m;var g=function(e){function t(t){e.call(this),this.expressions=t}return r(t,e),t.prototype.visit=function(e){return e.visitLiteralArray(this)},t}(o);t.LiteralArray=g;var _=function(e){function t(t,n){e.call(this),this.keys=t,this.values=n}return r(t,e),t.prototype.visit=function(e){return e.visitLiteralMap(this)},t}(o);t.LiteralMap=_;var b=function(e){function t(t,n){e.call(this),this.strings=t,this.expressions=n}return r(t,e),t.prototype.visit=function(e){return e.visitInterpolation(this)},t}(o);t.Interpolation=b;var C=function(e){function t(t,n,r){e.call(this),this.operation=t,this.left=n,this.right=r}return r(t,e),t.prototype.visit=function(e){return e.visitBinary(this)},t}(o);t.Binary=C;var P=function(e){function t(t){e.call(this),this.expression=t}return r(t,e),t.prototype.visit=function(e){return e.visitPrefixNot(this)},t}(o);t.PrefixNot=P;var w=function(e){function t(t,n,r,i){e.call(this),this.receiver=t,this.name=n,this.fn=r,this.args=i}return r(t,e),t.prototype.visit=function(e){return e.visitMethodCall(this)},t}(o);t.MethodCall=w;var R=function(e){function t(t,n,r,i){e.call(this),this.receiver=t,this.name=n,this.fn=r,this.args=i}return r(t,e),t.prototype.visit=function(e){return e.visitSafeMethodCall(this)},t}(o);t.SafeMethodCall=R;var E=function(e){function t(t,n){e.call(this),this.target=t,this.args=n}return r(t,e),t.prototype.visit=function(e){return e.visitFunctionCall(this)},t}(o);t.FunctionCall=E;var O=function(e){function t(t,n,r){e.call(this),this.ast=t,this.source=n,this.location=r}return r(t,e),t.prototype.visit=function(e){return this.ast.visit(e)},t.prototype.toString=function(){return this.source+" in "+this.location},t}(o);t.ASTWithSource=O;var S=function(){function e(e,t,n,r){this.key=e,this.keyIsVar=t,this.name=n,this.expression=r}return e}();t.TemplateBinding=S;var D=function(){function e(){}return e.prototype.visitBinary=function(e){return e.left.visit(this),e.right.visit(this),null},e.prototype.visitChain=function(e){return this.visitAll(e.expressions)},e.prototype.visitConditional=function(e){return e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this),null},e.prototype.visitPipe=function(e){return e.exp.visit(this),this.visitAll(e.args),null},e.prototype.visitFunctionCall=function(e){return e.target.visit(this),this.visitAll(e.args),null},e.prototype.visitImplicitReceiver=function(e){return null},e.prototype.visitInterpolation=function(e){return this.visitAll(e.expressions)},e.prototype.visitKeyedRead=function(e){return e.obj.visit(this),e.key.visit(this),null},e.prototype.visitKeyedWrite=function(e){return e.obj.visit(this),e.key.visit(this),e.value.visit(this),null},e.prototype.visitLiteralArray=function(e){return this.visitAll(e.expressions)},e.prototype.visitLiteralMap=function(e){return this.visitAll(e.values)},e.prototype.visitLiteralPrimitive=function(e){return null},e.prototype.visitMethodCall=function(e){return e.receiver.visit(this),this.visitAll(e.args)},e.prototype.visitPrefixNot=function(e){return e.expression.visit(this),null},e.prototype.visitPropertyRead=function(e){return e.receiver.visit(this),null},e.prototype.visitPropertyWrite=function(e){return e.receiver.visit(this),e.value.visit(this),null},e.prototype.visitSafePropertyRead=function(e){return e.receiver.visit(this),null},e.prototype.visitSafeMethodCall=function(e){return e.receiver.visit(this),this.visitAll(e.args)},e.prototype.visitAll=function(e){var t=this;return e.forEach(function(e){return e.visit(t)}),null},e.prototype.visitQuote=function(e){return null},e}();t.RecursiveAstVisitor=D;var T=function(){function e(){}return e.prototype.visitImplicitReceiver=function(e){return e},e.prototype.visitInterpolation=function(e){return new b(e.strings,this.visitAll(e.expressions))},e.prototype.visitLiteralPrimitive=function(e){return new m(e.value)},e.prototype.visitPropertyRead=function(e){return new l(e.receiver.visit(this),e.name,e.getter)},e.prototype.visitPropertyWrite=function(e){return new h(e.receiver.visit(this),e.name,e.setter,e.value)},e.prototype.visitSafePropertyRead=function(e){return new f(e.receiver.visit(this),e.name,e.getter)},e.prototype.visitMethodCall=function(e){return new w(e.receiver.visit(this),e.name,e.fn,this.visitAll(e.args))},e.prototype.visitSafeMethodCall=function(e){return new R(e.receiver.visit(this),e.name,e.fn,this.visitAll(e.args))},e.prototype.visitFunctionCall=function(e){return new E(e.target.visit(this),this.visitAll(e.args))},e.prototype.visitLiteralArray=function(e){return new g(this.visitAll(e.expressions))},e.prototype.visitLiteralMap=function(e){return new _(e.keys,this.visitAll(e.values))},e.prototype.visitBinary=function(e){return new C(e.operation,e.left.visit(this),e.right.visit(this))},e.prototype.visitPrefixNot=function(e){return new P(e.expression.visit(this))},e.prototype.visitConditional=function(e){return new p(e.condition.visit(this),e.trueExp.visit(this),e.falseExp.visit(this))},e.prototype.visitPipe=function(e){return new v(e.exp.visit(this),e.name,this.visitAll(e.args))},e.prototype.visitKeyedRead=function(e){return new d(e.obj.visit(this),e.key.visit(this))},e.prototype.visitKeyedWrite=function(e){return new y(e.obj.visit(this),e.key.visit(this),e.value.visit(this))},e.prototype.visitAll=function(e){for(var t=i.ListWrapper.createFixedSize(e.length),n=0;n=t.$TAB&&e<=t.$SPACE||e==H}function p(e){return e>=k&&U>=e||e>=T&&I>=e||e==N||e==t.$$}function l(e){if(0==e.length)return!1;var n=new G(e);if(!p(n.peek))return!1;for(n.advance();n.peek!==t.$EOF;){if(!h(n.peek))return!1;n.advance()}return!0}function h(e){return e>=k&&U>=e||e>=T&&I>=e||e>=S&&D>=e||e==N||e==t.$$}function f(e){return e>=S&&D>=e}function d(e){return e==j||e==A}function y(e){return e==t.$MINUS||e==t.$PLUS}function v(e){switch(e){case M:return t.$LF;case V:return t.$FF;case B:return t.$CR;case L:return t.$TAB;case W:return t.$VTAB;default:return e}}var m=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},g=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},_=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},b=n(8),C=n(12),P=n(5),w=n(14);!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.Keyword=2]="Keyword",e[e.String=3]="String",e[e.Operator=4]="Operator",e[e.Number=5]="Number"}(t.TokenType||(t.TokenType={}));var R=t.TokenType,E=function(){function e(){}return e.prototype.tokenize=function(e){for(var t=new G(e),n=[],r=t.scanToken();null!=r;)n.push(r),r=t.scanToken();return n},e=g([b.Injectable(),_("design:paramtypes",[])],e)}();t.Lexer=E;var O=function(){function e(e,t,n,r){this.index=e,this.type=t,this.numValue=n,this.strValue=r}return e.prototype.isCharacter=function(e){return this.type==R.Character&&this.numValue==e},e.prototype.isNumber=function(){return this.type==R.Number},e.prototype.isString=function(){return this.type==R.String},e.prototype.isOperator=function(e){return this.type==R.Operator&&this.strValue==e},e.prototype.isIdentifier=function(){return this.type==R.Identifier},e.prototype.isKeyword=function(){return this.type==R.Keyword},e.prototype.isKeywordVar=function(){return this.type==R.Keyword&&"var"==this.strValue},e.prototype.isKeywordNull=function(){return this.type==R.Keyword&&"null"==this.strValue},e.prototype.isKeywordUndefined=function(){return this.type==R.Keyword&&"undefined"==this.strValue},e.prototype.isKeywordTrue=function(){return this.type==R.Keyword&&"true"==this.strValue},e.prototype.isKeywordFalse=function(){return this.type==R.Keyword&&"false"==this.strValue},e.prototype.toNumber=function(){return this.type==R.Number?this.numValue:-1},e.prototype.toString=function(){switch(this.type){case R.Character:case R.Identifier:case R.Keyword:case R.Operator:case R.String:return this.strValue;case R.Number:return this.numValue.toString();default:return null}},e}();t.Token=O,t.EOF=new O(-1,R.Character,0,""),t.$EOF=0,t.$TAB=9,t.$LF=10,t.$VTAB=11,t.$FF=12,t.$CR=13,t.$SPACE=32,t.$BANG=33,t.$DQ=34,t.$HASH=35,t.$$=36,t.$PERCENT=37,t.$AMPERSAND=38,t.$SQ=39,t.$LPAREN=40,t.$RPAREN=41,t.$STAR=42,t.$PLUS=43,t.$COMMA=44,t.$MINUS=45,t.$PERIOD=46,t.$SLASH=47,t.$COLON=58,t.$SEMICOLON=59,t.$LT=60,t.$EQ=61,t.$GT=62,t.$QUESTION=63;var S=48,D=57,T=65,A=69,I=90;t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93;var x=94,N=95,k=97,j=101,V=102,M=110,B=114,L=116,F=117,W=118,U=122;t.$LBRACE=123,t.$BAR=124,t.$RBRACE=125;var H=160,q=function(e){function t(t){e.call(this),this.message=t}return m(t,e),t.prototype.toString=function(){return this.message},t}(w.BaseException);t.ScannerError=q;var G=function(){function e(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}return e.prototype.advance=function(){this.peek=++this.index>=this.length?t.$EOF:P.StringWrapper.charCodeAt(this.input,this.index)},e.prototype.scanToken=function(){for(var e=this.input,n=this.length,i=this.peek,o=this.index;i<=t.$SPACE;){if(++o>=n){i=t.$EOF;break}i=P.StringWrapper.charCodeAt(e,o)}if(this.peek=i,this.index=o,o>=n)return null;if(p(i))return this.scanIdentifier();if(f(i))return this.scanNumber(o);var s=o;switch(i){case t.$PERIOD:return this.advance(),f(this.peek)?this.scanNumber(s):r(s,t.$PERIOD);case t.$LPAREN:case t.$RPAREN:case t.$LBRACE:case t.$RBRACE:case t.$LBRACKET:case t.$RBRACKET:case t.$COMMA:case t.$COLON:case t.$SEMICOLON:return this.scanCharacter(s,i);case t.$SQ:case t.$DQ:return this.scanString();case t.$HASH:case t.$PLUS:case t.$MINUS:case t.$STAR:case t.$SLASH:case t.$PERCENT:case x:return this.scanOperator(s,P.StringWrapper.fromCharCode(i));case t.$QUESTION:return this.scanComplexOperator(s,"?",t.$PERIOD,".");case t.$LT:case t.$GT:return this.scanComplexOperator(s,P.StringWrapper.fromCharCode(i),t.$EQ,"=");case t.$BANG:case t.$EQ:return this.scanComplexOperator(s,P.StringWrapper.fromCharCode(i),t.$EQ,"=",t.$EQ,"=");case t.$AMPERSAND:return this.scanComplexOperator(s,"&",t.$AMPERSAND,"&");case t.$BAR:return this.scanComplexOperator(s,"|",t.$BAR,"|");case H:for(;u(this.peek);)this.advance();return this.scanToken()}return this.error("Unexpected character ["+P.StringWrapper.fromCharCode(i)+"]",0),null},e.prototype.scanCharacter=function(e,t){return assert(this.peek==t),this.advance(),r(e,t)},e.prototype.scanOperator=function(e,t){return assert(this.peek==P.StringWrapper.charCodeAt(t,0)),assert(C.SetWrapper.has(z,t)),this.advance(),s(e,t)},e.prototype.scanComplexOperator=function(e,t,n,r,i,o){assert(this.peek==P.StringWrapper.charCodeAt(t,0)),this.advance();var a=t;return this.peek==n&&(this.advance(),a+=r),P.isPresent(i)&&this.peek==i&&(this.advance(),a+=o),assert(C.SetWrapper.has(z,a)),s(e,a)},e.prototype.scanIdentifier=function(){assert(p(this.peek));var e=this.index;for(this.advance();h(this.peek);)this.advance();var t=this.input.substring(e,this.index);return C.SetWrapper.has(K,t)?o(e,t):i(e,t)},e.prototype.scanNumber=function(e){assert(f(this.peek));var n=this.index===e;for(this.advance();;){if(f(this.peek));else if(this.peek==t.$PERIOD)n=!1;else{if(!d(this.peek))break;this.advance(),y(this.peek)&&this.advance(),f(this.peek)||this.error("Invalid exponent",-1),n=!1}this.advance()}var r=this.input.substring(e,this.index),i=n?P.NumberWrapper.parseIntAutoRadix(r):P.NumberWrapper.parseFloat(r);return c(e,i)},e.prototype.scanString=function(){assert(this.peek==t.$SQ||this.peek==t.$DQ);var e=this.index,n=this.peek;this.advance();for(var r,i=this.index,o=this.input;this.peek!=n;)if(this.peek==t.$BACKSLASH){null==r&&(r=new P.StringJoiner),r.add(o.substring(i,this.index)),this.advance();var s;if(this.peek==F){var c=o.substring(this.index+1,this.index+5);try{s=P.NumberWrapper.parseInt(c,16)}catch(u){this.error("Invalid unicode escape [\\u"+c+"]",0)}for(var p=0;5>p;p++)this.advance()}else s=v(this.peek),this.advance();r.add(P.StringWrapper.fromCharCode(s)),i=this.index}else this.peek==t.$EOF?this.error("Unterminated quote",0):this.advance();var l=o.substring(i,this.index);this.advance();var h=l;return null!=r&&(r.add(l),h=r.toString()),a(e,h)},e.prototype.error=function(e,t){var n=this.index+t;throw new q("Lexer Error: "+e+" at column "+n+" in expression ["+this.input+"]")},e}();t.isIdentifier=l;var z=C.SetWrapper.createFromList(["+","-","*","/","%","^","=","==","!=","===","!==","<",">","<=",">=","&&","||","&","|","!","?","#","?."]),K=C.SetWrapper.createFromList(["var","null","undefined","true","false","if","else"])},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(8),a=n(5),c=n(14),u=n(12),p=n(31),l=n(16),h=n(30),f=new h.ImplicitReceiver,d=/\{\{(.*?)\}\}/g,y=function(e){function t(t,n,r,i){e.call(this,"Parser Error: "+t+" "+r+" ["+n+"] in "+i)}return r(t,e),t}(c.BaseException),v=function(){function e(e,t){void 0===t&&(t=null),this._lexer=e,this._reflector=a.isPresent(t)?t:l.reflector}return e.prototype.parseAction=function(e,t){this._checkNoInterpolation(e,t);var n=this._lexer.tokenize(e),r=new m(e,t,n,this._reflector,!0).parseChain();return new h.ASTWithSource(r,e,t)},e.prototype.parseBinding=function(e,t){var n=this._parseBindingAst(e,t);return new h.ASTWithSource(n,e,t)},e.prototype.parseSimpleBinding=function(e,t){var n=this._parseBindingAst(e,t);if(!g.check(n))throw new y("Host binding expression can only contain field access and constants",e,t);return new h.ASTWithSource(n,e,t)},e.prototype._parseBindingAst=function(e,t){var n=this._parseQuote(e,t);if(a.isPresent(n))return n;this._checkNoInterpolation(e,t);var r=this._lexer.tokenize(e); -return new m(e,t,r,this._reflector,!1).parseChain()},e.prototype._parseQuote=function(e,t){if(a.isBlank(e))return null;var n=e.indexOf(":");if(-1==n)return null;var r=e.substring(0,n).trim();if(!p.isIdentifier(r))return null;var i=e.substring(n+1);return new h.Quote(r,i,t)},e.prototype.parseTemplateBindings=function(e,t){var n=this._lexer.tokenize(e);return new m(e,t,n,this._reflector,!1).parseTemplateBindings()},e.prototype.parseInterpolation=function(e,t){var n=a.StringWrapper.split(e,d);if(n.length<=1)return null;for(var r=[],i=[],o=0;o0))throw new y("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(n,o)+" in",t);var c=this._lexer.tokenize(s),u=new m(e,t,c,this._reflector,!1).parseChain();i.push(u)}}return new h.ASTWithSource(new h.Interpolation(r,i),e,t)},e.prototype.wrapLiteralPrimitive=function(e,t){return new h.ASTWithSource(new h.LiteralPrimitive(e),e,t)},e.prototype._checkNoInterpolation=function(e,t){var n=a.StringWrapper.split(e,d);if(n.length>1)throw new y("Got interpolation ({{}}) where expression was expected",e,"at column "+this._findInterpolationErrorColumn(n,1)+" in",t)},e.prototype._findInterpolationErrorColumn=function(e,t){for(var n="",r=0;t>r;r++)n+=r%2===0?e[r]:"{{"+e[r]+"}}";return n.length},e=i([s.Injectable(),o("design:paramtypes",[p.Lexer,l.Reflector])],e)}();t.Parser=v;var m=function(){function e(e,t,n,r,i){this.input=e,this.location=t,this.tokens=n,this.reflector=r,this.parseAction=i,this.index=0}return e.prototype.peek=function(e){var t=this.index+e;return t"))e=new h.Binary(">",e,this.parseAdditive());else if(this.optionalOperator("<="))e=new h.Binary("<=",e,this.parseAdditive());else{if(!this.optionalOperator(">="))return e;e=new h.Binary(">=",e,this.parseAdditive())}},e.prototype.parseAdditive=function(){for(var e=this.parseMultiplicative();;)if(this.optionalOperator("+"))e=new h.Binary("+",e,this.parseMultiplicative());else{if(!this.optionalOperator("-"))return e;e=new h.Binary("-",e,this.parseMultiplicative())}},e.prototype.parseMultiplicative=function(){for(var e=this.parsePrefix();;)if(this.optionalOperator("*"))e=new h.Binary("*",e,this.parsePrefix());else if(this.optionalOperator("%"))e=new h.Binary("%",e,this.parsePrefix());else{if(!this.optionalOperator("/"))return e;e=new h.Binary("/",e,this.parsePrefix())}},e.prototype.parsePrefix=function(){return this.optionalOperator("+")?this.parsePrefix():this.optionalOperator("-")?new h.Binary("-",new h.LiteralPrimitive(0),this.parsePrefix()):this.optionalOperator("!")?new h.PrefixNot(this.parsePrefix()):this.parseCallChain()},e.prototype.parseCallChain=function(){for(var e=this.parsePrimary();;)if(this.optionalCharacter(p.$PERIOD))e=this.parseAccessMemberOrMethodCall(e,!1);else if(this.optionalOperator("?."))e=this.parseAccessMemberOrMethodCall(e,!0);else if(this.optionalCharacter(p.$LBRACKET)){var t=this.parsePipe();if(this.expectCharacter(p.$RBRACKET),this.optionalOperator("=")){var n=this.parseConditional();e=new h.KeyedWrite(e,t,n)}else e=new h.KeyedRead(e,t)}else{if(!this.optionalCharacter(p.$LPAREN))return e;var r=this.parseCallArguments();this.expectCharacter(p.$RPAREN),e=new h.FunctionCall(e,r)}},e.prototype.parsePrimary=function(){if(this.optionalCharacter(p.$LPAREN)){var e=this.parsePipe();return this.expectCharacter(p.$RPAREN),e}if(this.next.isKeywordNull()||this.next.isKeywordUndefined())return this.advance(),new h.LiteralPrimitive(null);if(this.next.isKeywordTrue())return this.advance(),new h.LiteralPrimitive(!0);if(this.next.isKeywordFalse())return this.advance(),new h.LiteralPrimitive(!1);if(this.optionalCharacter(p.$LBRACKET)){var t=this.parseExpressionList(p.$RBRACKET);return this.expectCharacter(p.$RBRACKET),new h.LiteralArray(t)}if(this.next.isCharacter(p.$LBRACE))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(f,!1);if(this.next.isNumber()){var n=this.next.toNumber();return this.advance(),new h.LiteralPrimitive(n)}if(this.next.isString()){var r=this.next.toString();return this.advance(),new h.LiteralPrimitive(r)}throw this.index>=this.tokens.length?this.error("Unexpected end of expression: "+this.input):this.error("Unexpected token "+this.next),new c.BaseException("Fell through all cases in parsePrimary")},e.prototype.parseExpressionList=function(e){var t=[];if(!this.next.isCharacter(e))do t.push(this.parsePipe());while(this.optionalCharacter(p.$COMMA));return t},e.prototype.parseLiteralMap=function(){var e=[],t=[];if(this.expectCharacter(p.$LBRACE),!this.optionalCharacter(p.$RBRACE)){do{var n=this.expectIdentifierOrKeywordOrString();e.push(n),this.expectCharacter(p.$COLON),t.push(this.parsePipe())}while(this.optionalCharacter(p.$COMMA));this.expectCharacter(p.$RBRACE)}return new h.LiteralMap(e,t)},e.prototype.parseAccessMemberOrMethodCall=function(e,t){void 0===t&&(t=!1);var n=this.expectIdentifierOrKeyword();if(this.optionalCharacter(p.$LPAREN)){var r=this.parseCallArguments();this.expectCharacter(p.$RPAREN);var i=this.reflector.method(n);return t?new h.SafeMethodCall(e,n,i,r):new h.MethodCall(e,n,i,r)}if(!t){if(this.optionalOperator("=")){this.parseAction||this.error("Bindings cannot contain assignments");var o=this.parseConditional();return new h.PropertyWrite(e,n,this.reflector.setter(n),o)}return new h.PropertyRead(e,n,this.reflector.getter(n))}return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),null):new h.SafePropertyRead(e,n,this.reflector.getter(n))},e.prototype.parseCallArguments=function(){if(this.next.isCharacter(p.$RPAREN))return[];var e=[];do e.push(this.parsePipe());while(this.optionalCharacter(p.$COMMA));return e},e.prototype.parseBlockContent=function(){this.parseAction||this.error("Binding expression cannot contain chained expression");for(var e=[];this.index":return"operation_greater_then";case"<=":return"operation_less_or_equals_then";case">=":return"operation_greater_or_equals_then";default:throw new h.BaseException("Unsupported operation "+e)}}function c(e){switch(e){case"+":return y.ChangeDetectionUtil.operation_add;case"-":return y.ChangeDetectionUtil.operation_subtract;case"*":return y.ChangeDetectionUtil.operation_multiply;case"/":return y.ChangeDetectionUtil.operation_divide;case"%":return y.ChangeDetectionUtil.operation_remainder;case"==":return y.ChangeDetectionUtil.operation_equals;case"!=":return y.ChangeDetectionUtil.operation_not_equals;case"===":return y.ChangeDetectionUtil.operation_identical;case"!==":return y.ChangeDetectionUtil.operation_not_identical;case"<":return y.ChangeDetectionUtil.operation_less_then;case">":return y.ChangeDetectionUtil.operation_greater_then;case"<=":return y.ChangeDetectionUtil.operation_less_or_equals_then;case">=":return y.ChangeDetectionUtil.operation_greater_or_equals_then;default:throw new h.BaseException("Unsupported operation "+e)}}function u(e){return l.isPresent(e)?""+e:""}function p(e){var t=e.length,n=t>0?e[0]:null,r=t>1?e[1]:null,i=t>2?e[2]:null,o=t>3?e[3]:null,s=t>4?e[4]:null,a=t>5?e[5]:null,c=t>6?e[6]:null,p=t>7?e[7]:null,l=t>8?e[8]:null,f=t>9?e[9]:null;switch(t-1){case 1:return function(e){return n+u(e)+r};case 2:return function(e,t){return n+u(e)+r+u(t)+i};case 3:return function(e,t,s){return n+u(e)+r+u(t)+i+u(s)+o};case 4:return function(e,t,a,c){return n+u(e)+r+u(t)+i+u(a)+o+u(c)+s};case 5:return function(e,t,c,p,l){return n+u(e)+r+u(t)+i+u(c)+o+u(p)+s+u(l)+a};case 6:return function(e,t,p,l,h,f){return n+u(e)+r+u(t)+i+u(p)+o+u(l)+s+u(h)+a+u(f)+c};case 7:return function(e,t,l,h,f,d,y){return n+u(e)+r+u(t)+i+u(l)+o+u(h)+s+u(f)+a+u(d)+c+u(y)+p};case 8:return function(e,t,h,f,d,y,v,m){return n+u(e)+r+u(t)+i+u(h)+o+u(f)+s+u(d)+a+u(y)+c+u(v)+p+u(m)+l};case 9:return function(e,t,h,d,y,v,m,g,_){return n+u(e)+r+u(t)+i+u(h)+o+u(d)+s+u(y)+a+u(v)+c+u(m)+p+u(g)+l+u(_)+f};default:throw new h.BaseException("Does not support more than 9 expressions")}}var l=n(5),h=n(14),f=n(12),d=n(30),y=n(38),v=n(42),m=n(41),g=n(49),_=n(50),b=n(48),C=function(){function e(e){this._definition=e,this._propertyBindingRecords=r(e),this._eventBindingRecords=i(e),this._propertyBindingTargets=this._definition.bindingRecords.map(function(e){return e.target}),this._directiveIndices=this._definition.directiveRecords.map(function(e){return e.directiveIndex})}return e.prototype.instantiate=function(e){return new v.DynamicChangeDetector(this._definition.id,e,this._propertyBindingRecords.length,this._propertyBindingTargets,this._directiveIndices,this._definition.strategy,this._propertyBindingRecords,this._eventBindingRecords,this._definition.directiveRecords,this._definition.genConfig)},e}();t.DynamicProtoChangeDetector=C,t.createPropertyRecords=r,t.createEventRecords=i;var P=function(){function e(){this.records=[]}return e.prototype.add=function(e,t,n){var r=f.ListWrapper.last(this.records);l.isPresent(r)&&r.bindingRecord.directiveRecord==e.directiveRecord&&(r.lastInDirective=!1);var i=this.records.length;this._appendRecords(e,t,n);var o=f.ListWrapper.last(this.records);l.isPresent(o)&&o!==r&&(o.lastInBinding=!0,o.lastInDirective=!0,this._setArgumentToPureFunction(i))},e.prototype._setArgumentToPureFunction=function(e){for(var t=this,n=e;ne},e.operation_greater_then=function(e,t){return e>t},e.operation_less_or_equals_then=function(e,t){return t>=e},e.operation_greater_or_equals_then=function(e,t){return e>=t},e.cond=function(e,t,n){return e?t:n},e.mapFn=function(e){function t(t){for(var n=s.StringMapWrapper.create(),r=0;rt?null:e[t-1]},e.callPipeOnDestroy=function(e){c.implementsOnDestroy(e.pipe)&&e.pipe.ngOnDestroy()},e.bindingTarget=function(e,t,n,r,i){return new u.BindingTarget(e,t,n,r,i)},e.directiveIndex=function(e,t){return new p.DirectiveIndex(e,t)},e.looseNotIdentical=function(e,t){return!i.looseIdentical(e,t)},e.uninitialized=i.CONST_EXPR(new Object),e}();t.ChangeDetectionUtil=m},function(e,t){function n(e){return e.constructor.prototype.ngOnDestroy}t.implementsOnDestroy=n},function(e,t,n){var r=n(5),i="directiveLifecycle",o="native",s="directive",a="elementProperty",c="elementAttribute",u="elementClass",p="elementStyle",l="textNode",h="event",f="hostEvent",d=function(){function e(e,t,n,r,i){this.mode=e,this.elementIndex=t,this.name=n,this.unit=r,this.debug=i}return e.prototype.isDirective=function(){return this.mode===s},e.prototype.isElementProperty=function(){return this.mode===a},e.prototype.isElementAttribute=function(){return this.mode===c},e.prototype.isElementClass=function(){return this.mode===u},e.prototype.isElementStyle=function(){return this.mode===p},e.prototype.isTextNode=function(){return this.mode===l},e}();t.BindingTarget=d;var y=function(){function e(e,t,n,r,i,o,s){this.mode=e,this.target=t,this.implicitReceiver=n,this.ast=r,this.setter=i,this.lifecycleEvent=o,this.directiveRecord=s}return e.prototype.isDirectiveLifecycle=function(){return this.mode===i},e.prototype.callOnChanges=function(){return r.isPresent(this.directiveRecord)&&this.directiveRecord.callOnChanges},e.prototype.isDefaultChangeDetection=function(){return r.isBlank(this.directiveRecord)||this.directiveRecord.isDefaultChangeDetection()},e.createDirectiveDoCheck=function(t){return new e(i,null,0,null,null,"DoCheck",t)},e.createDirectiveOnInit=function(t){return new e(i,null,0,null,null,"OnInit",t)},e.createDirectiveOnChanges=function(t){return new e(i,null,0,null,null,"OnChanges",t)},e.createForDirective=function(t,n,r,i){var o=i.directiveIndex.elementIndex,a=new d(s,o,n,null,t.toString());return new e(s,a,0,t,r,null,i)},e.createForElementProperty=function(t,n,r){var i=new d(a,n,r,null,t.toString());return new e(o,i,0,t,null,null,null)},e.createForElementAttribute=function(t,n,r){var i=new d(c,n,r,null,t.toString());return new e(o,i,0,t,null,null,null)},e.createForElementClass=function(t,n,r){var i=new d(u,n,r,null,t.toString());return new e(o,i,0,t,null,null,null)},e.createForElementStyle=function(t,n,r,i){var s=new d(p,n,r,i,t.toString());return new e(o,s,0,t,null,null,null)},e.createForHostProperty=function(t,n,r){var i=new d(a,t.elementIndex,r,null,n.toString());return new e(o,i,t,n,null,null,null)},e.createForHostAttribute=function(t,n,r){var i=new d(c,t.elementIndex,r,null,n.toString());return new e(o,i,t,n,null,null,null)},e.createForHostClass=function(t,n,r){var i=new d(u,t.elementIndex,r,null,n.toString());return new e(o,i,t,n,null,null,null)},e.createForHostStyle=function(t,n,r,i){var s=new d(p,t.elementIndex,r,i,n.toString());return new e(o,s,t,n,null,null,null)},e.createForTextNode=function(t,n){ -var r=new d(l,n,null,null,t.toString());return new e(o,r,0,t,null,null,null)},e.createForEvent=function(t,n,r){var i=new d(h,r,n,null,t.toString());return new e(h,i,0,t,null,null,null)},e.createForHostEvent=function(t,n,r){var i=r.directiveIndex,o=new d(f,i.elementIndex,n,null,t.toString());return new e(f,o,i,t,null,null,r)},e}();t.BindingRecord=y},function(e,t,n){var r=n(5),i=n(36),o=function(){function e(e,t){this.elementIndex=e,this.directiveIndex=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.elementIndex+"_"+this.directiveIndex},enumerable:!0,configurable:!0}),e}();t.DirectiveIndex=o;var s=function(){function e(e){var t=void 0===e?{}:e,n=t.directiveIndex,i=t.callAfterContentInit,o=t.callAfterContentChecked,s=t.callAfterViewInit,a=t.callAfterViewChecked,c=t.callOnChanges,u=t.callDoCheck,p=t.callOnInit,l=t.changeDetection;this.directiveIndex=n,this.callAfterContentInit=r.normalizeBool(i),this.callAfterContentChecked=r.normalizeBool(o),this.callOnChanges=r.normalizeBool(c),this.callAfterViewInit=r.normalizeBool(s),this.callAfterViewChecked=r.normalizeBool(a),this.callDoCheck=r.normalizeBool(u),this.callOnInit=r.normalizeBool(p),this.changeDetection=l}return e.prototype.isDefaultChangeDetection=function(){return i.isDefaultChangeDetectionStrategy(this.changeDetection)},e}();t.DirectiveRecord=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(5),o=n(14),s=n(12),a=n(43),c=n(38),u=n(36),p=n(48),l=function(e){function t(t,n,r,i,o,a,c,u,p,l){e.call(this,t,n,r,i,o,a),this._records=c,this._eventBindings=u,this._directiveRecords=p,this._genConfig=l,this.directives=null;var h=c.length+1;this.values=s.ListWrapper.createFixedSize(h),this.localPipes=s.ListWrapper.createFixedSize(h),this.prevContexts=s.ListWrapper.createFixedSize(h),this.changes=s.ListWrapper.createFixedSize(h),this.dehydrateDirectives(!1)}return r(t,e),t.prototype.handleEventInternal=function(e,t,n){var r=this,i=!1;return this._matchingEventBindings(e,t).forEach(function(e){var t=r._processEventBinding(e,n);t===!1&&(i=!0)}),i},t.prototype._processEventBinding=function(e,t){var n=s.ListWrapper.createFixedSize(e.records.length);n[0]=this.values[0];for(var r=0;r=0;--t){var n=e[t];n.callAfterContentInit&&this.state==u.ChangeDetectorState.NeverChecked&&this._getDirectiveFor(n.directiveIndex).ngAfterContentInit(),n.callAfterContentChecked&&this._getDirectiveFor(n.directiveIndex).ngAfterContentChecked()}},t.prototype.afterViewLifecycleCallbacksInternal=function(){for(var e=this._directiveRecords,t=e.length-1;t>=0;--t){var n=e[t];n.callAfterViewInit&&this.state==u.ChangeDetectorState.NeverChecked&&this._getDirectiveFor(n.directiveIndex).ngAfterViewInit(),n.callAfterViewChecked&&this._getDirectiveFor(n.directiveIndex).ngAfterViewChecked()}},t.prototype._updateDirectiveOrElement=function(t,n){if(i.isBlank(n.directiveRecord))e.prototype.notifyDispatcher.call(this,t.currentValue);else{var r=n.directiveRecord.directiveIndex;n.setter(this._getDirectiveFor(r),t.currentValue)}this._genConfig.logBindingUpdate&&e.prototype.logBindingUpdate.call(this,t.currentValue)},t.prototype._addChange=function(t,n,r){return t.callOnChanges()?e.prototype.addChange.call(this,r,n.previousValue,n.currentValue):r},t.prototype._getDirectiveFor=function(e){return this.directives.getDirectiveFor(e)},t.prototype._getDetectorFor=function(e){return this.directives.getDetectorFor(e)},t.prototype._check=function(e,t,n,r){return e.isPipeRecord()?this._pipeCheck(e,t,n):this._referenceCheck(e,t,n,r)},t.prototype._referenceCheck=function(t,n,r,i){if(this._pureFuncAndArgsDidNotChange(t))return this._setChanged(t,!1),null;var o=this._calculateCurrValue(t,r,i);if(this.strategy===u.ChangeDetectionStrategy.OnPushObserve&&e.prototype.observeValue.call(this,o,t.selfIndex),t.shouldBeChecked()){var s=this._readSelf(t,r);if(c.ChangeDetectionUtil.looseNotIdentical(s,o)){if(t.lastInBinding){var a=c.ChangeDetectionUtil.simpleChange(s,o);return n&&this.throwOnChangeError(s,o),this._writeSelf(t,o,r),this._setChanged(t,!0),a}return this._writeSelf(t,o,r),this._setChanged(t,!0),null}return this._setChanged(t,!1),null}return this._writeSelf(t,o,r),this._setChanged(t,!0),null},t.prototype._calculateCurrValue=function(e,t,n){switch(e.mode){case p.RecordType.Self:return this._readContext(e,t);case p.RecordType.Const:return e.funcOrValue;case p.RecordType.PropertyRead:var r=this._readContext(e,t);return e.funcOrValue(r);case p.RecordType.SafeProperty:var r=this._readContext(e,t);return i.isBlank(r)?null:e.funcOrValue(r);case p.RecordType.PropertyWrite:var r=this._readContext(e,t),s=this._readArgs(e,t)[0];return e.funcOrValue(r,s),s;case p.RecordType.KeyedWrite:var r=this._readContext(e,t),a=this._readArgs(e,t)[0],s=this._readArgs(e,t)[1];return r[a]=s,s;case p.RecordType.Local:return n.get(e.name);case p.RecordType.InvokeMethod:var r=this._readContext(e,t),c=this._readArgs(e,t);return e.funcOrValue(r,c);case p.RecordType.SafeMethodInvoke:var r=this._readContext(e,t);if(i.isBlank(r))return null;var c=this._readArgs(e,t);return e.funcOrValue(r,c);case p.RecordType.KeyedRead:var u=this._readArgs(e,t)[0];return this._readContext(e,t)[u];case p.RecordType.Chain:var c=this._readArgs(e,t);return c[c.length-1];case p.RecordType.InvokeClosure:return i.FunctionWrapper.apply(this._readContext(e,t),this._readArgs(e,t));case p.RecordType.Interpolate:case p.RecordType.PrimitiveOp:case p.RecordType.CollectionLiteral:return i.FunctionWrapper.apply(e.funcOrValue,this._readArgs(e,t));default:throw new o.BaseException("Unknown operation "+e.mode)}},t.prototype._pipeCheck=function(e,t,n){var r=this._readContext(e,n),i=this._pipeFor(e,r);if(!i.pure||this._argsOrContextChanged(e)){var o=this._readArgs(e,n),s=i.pipe.transform(r,o);if(e.shouldBeChecked()){var a=this._readSelf(e,n);if(c.ChangeDetectionUtil.looseNotIdentical(a,s)){if(s=c.ChangeDetectionUtil.unwrapValue(s),e.lastInBinding){var u=c.ChangeDetectionUtil.simpleChange(a,s);return t&&this.throwOnChangeError(a,s),this._writeSelf(e,s,n),this._setChanged(e,!0),u}return this._writeSelf(e,s,n),this._setChanged(e,!0),null}return this._setChanged(e,!1),null}return this._writeSelf(e,s,n),this._setChanged(e,!0),null}},t.prototype._pipeFor=function(e,t){var n=this._readPipe(e);if(i.isPresent(n))return n;var r=this.pipes.get(e.name);return this._writePipe(e,r),r},t.prototype._readContext=function(e,t){return-1==e.contextIndex?this._getDirectiveFor(e.directiveIndex):t[e.contextIndex]},t.prototype._readSelf=function(e,t){return t[e.selfIndex]},t.prototype._writeSelf=function(e,t,n){n[e.selfIndex]=t},t.prototype._readPipe=function(e){return this.localPipes[e.selfIndex]},t.prototype._writePipe=function(e,t){this.localPipes[e.selfIndex]=t},t.prototype._setChanged=function(e,t){e.argumentToPureFunction&&(this.changes[e.selfIndex]=t)},t.prototype._pureFuncAndArgsDidNotChange=function(e){return e.isPureFunction()&&!this._argsChanged(e)},t.prototype._argsChanged=function(e){for(var t=e.args,n=0;n0);r.set(f.selfIndex,y.selfIndex)}}return i(t)}function i(e){for(var t=[],n=h.ListWrapper.createFixedSize(e.length),r=new h.Map,i=0;ii+1){var c=a(s,t,r);t.push(c),n[c.fixedArgs[0]]=c}}else{var c=a(s,t,r);t.push(c),r.set(s.selfIndex,c.selfIndex)}}return t}function o(e,t,n,r){var i=s(e,t,n);return l.isPresent(i)?(e.lastInBinding?(t.push(u(e,i.selfIndex,t.length+1)),i.referencedBySelf=!0):e.argumentToPureFunction&&(i.argumentToPureFunction=!0),i):(r&&n.push(e.selfIndex),t.push(e),e)}function s(e,t,n){return t.find(function(t){return-1==n.indexOf(t.selfIndex)&&t.mode!==f.RecordType.DirectiveLifecycle&&p(t,e)&&t.mode===e.mode&&l.looseIdentical(t.funcOrValue,e.funcOrValue)&&t.contextIndex===e.contextIndex&&l.looseIdentical(t.name,e.name)&&h.ListWrapper.equals(t.args,e.args)})}function a(e,t,n){var r=e.args.map(function(e){return c(n,e)}),i=c(n,e.contextIndex),o=t.length+1;return new f.ProtoRecord(e.mode,e.name,e.funcOrValue,r,e.fixedArgs,i,e.directiveIndex,o,e.bindingRecord,e.lastInBinding,e.lastInDirective,e.argumentToPureFunction,e.referencedBySelf,e.propertyBindingIndex)}function c(e,t){var n=e.get(t);return l.isPresent(n)?n:t}function u(e,t,n){return new f.ProtoRecord(f.RecordType.Self,"self",null,[],e.fixedArgs,t,e.directiveIndex,n,e.bindingRecord,e.lastInBinding,e.lastInDirective,!1,!1,e.propertyBindingIndex)}function p(e,t){var n=l.isBlank(e.directiveIndex)?null:e.directiveIndex.directiveIndex,r=l.isBlank(e.directiveIndex)?null:e.directiveIndex.elementIndex,i=l.isBlank(t.directiveIndex)?null:t.directiveIndex.directiveIndex,o=l.isBlank(t.directiveIndex)?null:t.directiveIndex.elementIndex;return n===i&&r===o}var l=n(5),h=n(12),f=n(48);t.coalesce=r},function(e,t,n){var r=n(52),i=function(){function e(e){this.definition=e,this._factory=this._createFactory(e)}return e.isSupported=function(){return!0},e.prototype.instantiate=function(e){return this._factory(e)},e.prototype._createFactory=function(e){return new r.ChangeDetectorJITGenerator(e,"util","AbstractChangeDetector","ChangeDetectorStatus").generate()},e}();t.JitProtoChangeDetector=i},function(e,t,n){var r=n(5),i=n(14),o=n(12),s=n(43),a=n(38),c=n(48),u=n(53),p=n(54),l=n(55),h=n(36),f=n(37),d="isChanged",y="changes",v=function(){function e(e,t,n,r){this.changeDetectionUtilVarName=t,this.abstractChangeDetectorVarName=n,this.changeDetectorStateVarName=r;var i=f.createPropertyRecords(e),o=f.createEventRecords(e),s=e.bindingRecords.map(function(e){return e.target});this.id=e.id,this.changeDetectionStrategy=e.strategy,this.genConfig=e.genConfig,this.records=i,this.propertyBindingTargets=s,this.eventBindings=o,this.directiveRecords=e.directiveRecords,this._names=new u.CodegenNameUtil(this.records,this.eventBindings,this.directiveRecords,this.changeDetectionUtilVarName),this._logic=new p.CodegenLogicUtil(this._names,this.changeDetectionUtilVarName,this.changeDetectorStateVarName,this.changeDetectionStrategy),this.typeName=u.sanitizeName("ChangeDetector_"+this.id)}return e.prototype.generate=function(){var e="\n "+this.generateSource()+"\n return function(dispatcher) {\n return new "+this.typeName+"(dispatcher);\n }\n ";return new Function(this.abstractChangeDetectorVarName,this.changeDetectionUtilVarName,this.changeDetectorStateVarName,e)(s.AbstractChangeDetector,a.ChangeDetectionUtil,h.ChangeDetectorState)},e.prototype.generateSource=function(){return"\n var "+this.typeName+" = function "+this.typeName+"(dispatcher) {\n "+this.abstractChangeDetectorVarName+".call(\n this, "+JSON.stringify(this.id)+", dispatcher, "+this.records.length+",\n "+this.typeName+".gen_propertyBindingTargets, "+this.typeName+".gen_directiveIndices,\n "+l.codify(this.changeDetectionStrategy)+");\n this.dehydrateDirectives(false);\n }\n\n "+this.typeName+".prototype = Object.create("+this.abstractChangeDetectorVarName+".prototype);\n\n "+this.typeName+".prototype.detectChangesInRecordsInternal = function(throwOnChange) {\n "+this._names.genInitLocals()+"\n var "+d+" = false;\n var "+y+" = null;\n\n "+this._genAllRecords(this.records)+"\n }\n\n "+this._maybeGenHandleEventInternal()+"\n\n "+this._maybeGenAfterContentLifecycleCallbacks()+"\n\n "+this._maybeGenAfterViewLifecycleCallbacks()+"\n\n "+this._maybeGenHydrateDirectives()+"\n\n "+this._maybeGenDehydrateDirectives()+"\n\n "+this._genPropertyBindingTargets()+"\n\n "+this._genDirectiveIndices()+"\n "},e.prototype._genPropertyBindingTargets=function(){var e=this._logic.genPropertyBindingTargets(this.propertyBindingTargets,this.genConfig.genDebugInfo);return this.typeName+".gen_propertyBindingTargets = "+e+";"},e.prototype._genDirectiveIndices=function(){var e=this._logic.genDirectiveIndices(this.directiveRecords);return this.typeName+".gen_directiveIndices = "+e+";"},e.prototype._maybeGenHandleEventInternal=function(){var e=this;if(this.eventBindings.length>0){var t=this.eventBindings.map(function(t){return e._genEventBinding(t)}).join("\n");return"\n "+this.typeName+".prototype.handleEventInternal = function(eventName, elIndex, locals) {\n var "+this._names.getPreventDefaultAccesor()+" = false;\n "+this._names.genInitEventLocals()+"\n "+t+"\n return "+this._names.getPreventDefaultAccesor()+";\n }\n "}return""},e.prototype._genEventBinding=function(e){var t=this,n=[];return this._endOfBlockIdxs=[],o.ListWrapper.forEachWithIndex(e.records,function(r,i){var o;o=r.isConditionalSkipRecord()?t._genConditionalSkip(r,t._names.getEventLocalName(e,i)):r.isUnconditionalSkipRecord()?t._genUnconditionalSkip(r):t._genEventBindingEval(e,r),o+=t._genEndOfSkipBlock(i),n.push(o)}),'\n if (eventName === "'+e.eventName+'" && elIndex === '+e.elIndex+") {\n "+n.join("\n")+"\n }"},e.prototype._genEventBindingEval=function(e,t){if(t.lastInBinding){var n=this._logic.genEventBindingEvalValue(e,t),r=this._genMarkPathToRootAsCheckOnce(t),i=this._genUpdatePreventDefault(e,t);return n+"\n"+r+"\n"+i}return this._logic.genEventBindingEvalValue(e,t)},e.prototype._genMarkPathToRootAsCheckOnce=function(e){var t=e.bindingRecord;return t.isDefaultChangeDetection()?"":this._names.getDetectorName(t.directiveRecord.directiveIndex)+".markPathToRootAsCheckOnce();"},e.prototype._genUpdatePreventDefault=function(e,t){var n=this._names.getEventLocalName(e,t.selfIndex);return"if ("+n+" === false) { "+this._names.getPreventDefaultAccesor()+" = true};"},e.prototype._maybeGenDehydrateDirectives=function(){var e=this._names.genPipeOnDestroy();e&&(e="if (destroyPipes) { "+e+" }");var t=this._names.genDehydrateFields();return e||t?this.typeName+".prototype.dehydrateDirectives = function(destroyPipes) {\n "+e+"\n "+t+"\n }":""},e.prototype._maybeGenHydrateDirectives=function(){var e=this._logic.genHydrateDirectives(this.directiveRecords),t=this._logic.genHydrateDetectors(this.directiveRecords);return e||t?this.typeName+".prototype.hydrateDirectives = function(directives) {\n "+e+"\n "+t+"\n }":""},e.prototype._maybeGenAfterContentLifecycleCallbacks=function(){var e=this._logic.genContentLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterContentLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._maybeGenAfterViewLifecycleCallbacks=function(){var e=this._logic.genViewLifecycleCallbacks(this.directiveRecords);if(e.length>0){var t=e.join("\n");return"\n "+this.typeName+".prototype.afterViewLifecycleCallbacksInternal = function() {\n "+t+"\n }\n "}return""},e.prototype._genAllRecords=function(e){var t=[];this._endOfBlockIdxs=[];for(var n=0;na;++a)this._sanitizedNames[a+1]=r(""+this._records[a].name+a);for(var u=0;ua;++a)l.push(r(""+p.records[a].name+a+"_"+u));this._sanitizedEventNames.set(p,l)}}return e.prototype._addFieldPrefix=function(e){return""+d+e},e.prototype.getDispatcherName=function(){return this._addFieldPrefix(u)},e.prototype.getPipesAccessorName=function(){return this._addFieldPrefix(h)},e.prototype.getProtosName=function(){return this._addFieldPrefix(f)},e.prototype.getDirectivesAccessorName=function(){return this._addFieldPrefix(c)},e.prototype.getLocalsAccessorName=function(){return this._addFieldPrefix(p)},e.prototype.getStateName=function(){return this._addFieldPrefix(s)},e.prototype.getModeName=function(){return this._addFieldPrefix(l)},e.prototype.getPropertyBindingIndex=function(){return this._addFieldPrefix(a)},e.prototype.getLocalName=function(e){return"l_"+this._sanitizedNames[e]},e.prototype.getEventLocalName=function(e,t){return"l_"+this._sanitizedEventNames.get(e)[t]},e.prototype.getChangeName=function(e){return"c_"+this._sanitizedNames[e]},e.prototype.genInitLocals=function(){for(var e=[],n=[],r=0,i=this.getFieldCount();i>r;++r)if(r==t.CONTEXT_INDEX)e.push(this.getLocalName(r)+" = "+this.getFieldName(r));else{var s=this._records[r-1];if(s.argumentToPureFunction){var a=this.getChangeName(r);e.push(this.getLocalName(r)+","+a),n.push(a)}else e.push(""+this.getLocalName(r))}var c=o.ListWrapper.isEmpty(n)?"":n.join("=")+" = false;";return"var "+e.join(",")+";"+c},e.prototype.genInitEventLocals=function(){var e=this,n=[this.getLocalName(t.CONTEXT_INDEX)+" = "+this.getFieldName(t.CONTEXT_INDEX)];return this._sanitizedEventNames.forEach(function(r,i){for(var o=0;o1?"var "+n.join(",")+";":""},e.prototype.getPreventDefaultAccesor=function(){return"preventDefault"},e.prototype.getFieldCount=function(){return this._sanitizedNames.length},e.prototype.getFieldName=function(e){return this._addFieldPrefix(this._sanitizedNames[e])},e.prototype.getAllFieldNames=function(){for(var e=[],t=0,n=this.getFieldCount();n>t;++t)(0===t||this._records[t-1].shouldBeChecked())&&e.push(this.getFieldName(t));for(var r=0,i=this._records.length;i>r;++r){var o=this._records[r];o.isPipeRecord()&&e.push(this.getPipeName(o.selfIndex))}for(var s=0,a=this._directiveRecords.length;a>s;++s){var c=this._directiveRecords[s];e.push(this.getDirectiveName(c.directiveIndex)),c.isDefaultChangeDetection()||e.push(this.getDetectorName(c.directiveIndex))}return e},e.prototype.genDehydrateFields=function(){var e=this.getAllFieldNames();return o.ListWrapper.removeAt(e,t.CONTEXT_INDEX),o.ListWrapper.isEmpty(e)?"":(e.push(this._utilName+".uninitialized;"),e.join(" = "))},e.prototype.genPipeOnDestroy=function(){var e=this;return this._records.filter(function(e){return e.isPipeRecord()}).map(function(t){return e._utilName+".callPipeOnDestroy("+e.getPipeName(t.selfIndex)+");"}).join("\n")},e.prototype.getPipeName=function(e){return this._addFieldPrefix(this._sanitizedNames[e]+"_pipe")},e.prototype.getDirectiveName=function(e){return this._addFieldPrefix("directive_"+e.name)},e.prototype.getDetectorName=function(e){return this._addFieldPrefix("detector_"+e.name)},e}();t.CodegenNameUtil=v},function(e,t,n){var r=n(5),i=n(55),o=n(48),s=n(36),a=n(14),c=function(){function e(e,t,n,r){this._names=e,this._utilName=t,this._changeDetectorStateName=n,this._changeDetection=r}return e.prototype.genPropertyBindingEvalValue=function(e){var t=this;return this._genEvalValue(e,function(e){return t._names.getLocalName(e)},this._names.getLocalsAccessorName())},e.prototype.genEventBindingEvalValue=function(e,t){var n=this;return this._genEvalValue(t,function(t){return n._names.getEventLocalName(e,t)},"locals")},e.prototype._genEvalValue=function(e,t,n){var r,s=-1==e.contextIndex?this._names.getDirectiveName(e.directiveIndex):t(e.contextIndex),c=e.args.map(function(e){return t(e)}).join(", ");switch(e.mode){case o.RecordType.Self:r=s;break;case o.RecordType.Const:r=i.codify(e.funcOrValue);break;case o.RecordType.PropertyRead:r=this._observe(s+"."+e.name,e);break;case o.RecordType.SafeProperty:var u=this._observe(s+"."+e.name,e);r=this._utilName+".isValueBlank("+s+") ? null : "+this._observe(u,e);break;case o.RecordType.PropertyWrite:r=s+"."+e.name+" = "+t(e.args[0]);break;case o.RecordType.Local:r=this._observe(n+".get("+i.rawString(e.name)+")",e);break;case o.RecordType.InvokeMethod:r=this._observe(s+"."+e.name+"("+c+")",e);break;case o.RecordType.SafeMethodInvoke:var p=s+"."+e.name+"("+c+")";r=this._utilName+".isValueBlank("+s+") ? null : "+this._observe(p,e);break;case o.RecordType.InvokeClosure:r=s+"("+c+")";break;case o.RecordType.PrimitiveOp:r=this._utilName+"."+e.name+"("+c+")";break;case o.RecordType.CollectionLiteral:r=this._utilName+"."+e.name+"("+c+")";break;case o.RecordType.Interpolate:r=this._genInterpolation(e);break;case o.RecordType.KeyedRead:r=this._observe(s+"["+t(e.args[0])+"]",e);break;case o.RecordType.KeyedWrite:r=s+"["+t(e.args[0])+"] = "+t(e.args[1]);break;case o.RecordType.Chain:r="null";break;default:throw new a.BaseException("Unknown operation "+e.mode)}return t(e.selfIndex)+" = "+r+";"},e.prototype._observe=function(e,t){return this._changeDetection===s.ChangeDetectionStrategy.OnPushObserve?"this.observeValue("+e+", "+t.selfIndex+")":e},e.prototype.genPropertyBindingTargets=function(e,t){var n=this,o=e.map(function(e){if(r.isBlank(e))return"null";var o=t?i.codify(e.debug):"null";return n._utilName+".bindingTarget("+i.codify(e.mode)+", "+e.elementIndex+", "+i.codify(e.name)+", "+i.codify(e.unit)+", "+o+")"});return"["+o.join(", ")+"]"},e.prototype.genDirectiveIndices=function(e){var t=this,n=e.map(function(e){return t._utilName+".directiveIndex("+e.directiveIndex.elementIndex+", "+e.directiveIndex.directiveIndex+")"});return"["+n.join(", ")+"]"},e.prototype._genInterpolation=function(e){for(var t=[],n=0;n=0;--i){var o=e[i];o.callAfterContentInit&&t.push("if("+this._names.getStateName()+" "+n+" "+this._changeDetectorStateName+".NeverChecked) "+this._names.getDirectiveName(o.directiveIndex)+".ngAfterContentInit();"),o.callAfterContentChecked&&t.push(this._names.getDirectiveName(o.directiveIndex)+".ngAfterContentChecked();")}return t},e.prototype.genViewLifecycleCallbacks=function(e){for(var t=[],n=r.IS_DART?"==":"===",i=e.length-1;i>=0;--i){var o=e[i];o.callAfterViewInit&&t.push("if("+this._names.getStateName()+" "+n+" "+this._changeDetectorStateName+".NeverChecked) "+this._names.getDirectiveName(o.directiveIndex)+".ngAfterViewInit();"),o.callAfterViewChecked&&t.push(this._names.getDirectiveName(o.directiveIndex)+".ngAfterViewChecked();")}return t},e}();t.CodegenLogicUtil=c},function(e,t){function n(e){return JSON.stringify(e)}function r(e){return"'"+e+"'"}function i(e){return e.join(" + ")}t.codify=n,t.rawString=r,t.combineGeneratedStrings=i},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5);!function(e){e[e.Emulated=0]="Emulated",e[e.Native=1]="Native",e[e.None=2]="None"}(t.ViewEncapsulation||(t.ViewEncapsulation={}));var s=t.ViewEncapsulation;t.VIEW_ENCAPSULATION_VALUES=[s.Emulated,s.Native,s.None];var a=function(){function e(e){var t=void 0===e?{}:e,n=t.templateUrl,r=t.template,i=t.directives,o=t.pipes,s=t.encapsulation,a=t.styles,c=t.styleUrls;this.templateUrl=n,this.template=r,this.styleUrls=c,this.styles=a,this.directives=i,this.pipes=o,this.encapsulation=s}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.ViewMetadata=a},function(e,t,n){var r=n(9);t.Class=r.Class},function(e,t,n){var r=n(5);t.enableProdMode=r.enableProdMode},function(e,t,n){var r=n(5);t.Type=r.Type;var i=n(60);t.EventEmitter=i.EventEmitter;var o=n(14);t.WrappedException=o.WrappedException;var s=n(15);t.ExceptionHandler=s.ExceptionHandler},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(5),o=n(61);t.PromiseWrapper=o.PromiseWrapper,t.Promise=o.Promise;var s=n(62),a=n(63),c=n(64),u=n(62);t.Observable=u.Observable;var p=n(62);t.Subject=p.Subject;var l=function(){function e(){}return e.setTimeout=function(e,t){return i.global.setTimeout(e,t)},e.clearTimeout=function(e){i.global.clearTimeout(e)},e.setInterval=function(e,t){return i.global.setInterval(e,t)},e.clearInterval=function(e){i.global.clearInterval(e)},e}();t.TimerWrapper=l;var h=function(){function e(){}return e.subscribe=function(e,t,n,r){return void 0===r&&(r=function(){}),n="function"==typeof n&&n||i.noop,r="function"==typeof r&&r||i.noop,e.subscribe({next:t,error:n,complete:r})},e.isObservable=function(e){return!!e.subscribe},e.hasSubscribers=function(e){return e.observers.length>0},e.dispose=function(e){e.unsubscribe()},e.callNext=function(e,t){e.next(t)},e.callEmit=function(e,t){e.emit(t)},e.callError=function(e,t){e.error(t)},e.callComplete=function(e){e.complete()},e.fromPromise=function(e){return a.PromiseObservable.create(e)},e.toPromise=function(e){return c.toPromise.call(e)},e}();t.ObservableWrapper=h;var f=function(e){function t(t){void 0===t&&(t=!0),e.call(this),this._isAsync=t}return r(t,e),t.prototype.emit=function(t){e.prototype.next.call(this,t)},t.prototype.next=function(t){e.prototype.next.call(this,t)},t.prototype.subscribe=function(t,n,r){var i,o=function(e){return null},s=function(){return null};return t&&"object"==typeof t?(i=this._isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(o=this._isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(s=this._isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(i=this._isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},n&&(o=this._isAsync?function(e){setTimeout(function(){return n(e)})}:function(e){n(e)}),r&&(s=this._isAsync?function(){setTimeout(function(){return r()})}:function(){r()})),e.prototype.subscribe.call(this,i,o,s)},t}(s.Subject);t.EventEmitter=f},function(e,t){var n=function(){function e(){}return e.resolve=function(e){return Promise.resolve(e)},e.reject=function(e,t){return Promise.reject(e)},e.catchError=function(e,t){return e["catch"](t)},e.all=function(e){return 0==e.length?Promise.resolve([]):Promise.all(e)},e.then=function(e,t,n){return e.then(t,n)},e.wrap=function(e){return new Promise(function(t,n){try{t(e())}catch(r){n(r)}})},e.scheduleMicrotask=function(t){e.then(e.resolve(null),t,function(e){})},e.isPromise=function(e){return e instanceof Promise},e.completer=function(){var e,t,n=new Promise(function(n,r){e=n,t=r});return{promise:n,resolve:e,reject:t}},e}();t.PromiseWrapper=n},function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t,n){function r(e){return[f.provide(d.APP_COMPONENT,{useValue:e}),f.provide(d.APP_COMPONENT_REF_PROMISE,{useFactory:function(t,n,r){var i;return t.loadAsRoot(e,null,r,function(){n._unloadComponent(i)}).then(function(e){return i=e,h.isPresent(e.location.nativeElement)&&r.get(m.TestabilityRegistry).registerApplication(e.location.nativeElement,r.get(m.Testability)),e})},deps:[g.DynamicComponentLoader,D,f.Injector]}),f.provide(e,{useFactory:function(e){return e.then(function(e){return e.instance})},deps:[d.APP_COMPONENT_REF_PROMISE]})]}function i(){return new l.NgZone({enableLongStackTrace:h.assertionsEnabled()})}function o(e){if(w.lockMode(),h.isPresent(R)){if(v.ListWrapper.equals(E,e))return R;throw new _.BaseException("platform cannot be initialized with different sets of providers.")}return a(e)}function s(){h.isPresent(R)&&(R.dispose(),R=null)}function a(e){E=e;var t=f.Injector.resolveAndCreate(e);return R=new S(t,function(){R=null,E=null}),c(t),R}function c(e){var t=e.getOptional(d.PLATFORM_INITIALIZER);h.isPresent(t)&&t.forEach(function(e){return e()})}function u(e){var t=e.getOptional(d.APP_INITIALIZER);h.isPresent(t)&&t.forEach(function(e){return e()})}var p=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},l=n(66),h=n(5),f=n(6),d=n(67),y=n(60),v=n(12),m=n(68),g=n(69),_=n(14),b=n(77),C=n(97),P=n(45),w=n(5);t.createNgZone=i;var R,E;t.platform=o,t.disposePlatform=s;var O=function(){function e(){}return Object.defineProperty(e.prototype,"injector",{get:function(){return _.unimplemented()},enumerable:!0,configurable:!0}),e}();t.PlatformRef=O;var S=function(e){function t(t,n){e.call(this),this._injector=t,this._dispose=n,this._applications=[],this._disposeListeners=[]}return p(t,e),t.prototype.registerDisposeListener=function(e){this._disposeListeners.push(e)},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),t.prototype.application=function(e){var t=this._initApp(i(),e);return t},t.prototype.asyncApplication=function(e,t){var n=this,r=i(),o=y.PromiseWrapper.completer();return r.run(function(){y.PromiseWrapper.then(e(r),function(e){h.isPresent(t)&&(e=v.ListWrapper.concat(e,t)),o.resolve(n._initApp(r,e))})}),o.promise},t.prototype._initApp=function(e,t){var n,r,i=this;return e.run(function(){t=v.ListWrapper.concat(t,[f.provide(l.NgZone,{useValue:e}),f.provide(D,{useFactory:function(){return r},deps:[]})]);var o;try{n=i.injector.resolveAndCreateChild(t),o=n.get(_.ExceptionHandler),e.overrideOnErrorHandler(function(e,t){return o.call(e,t)})}catch(s){h.isPresent(o)?o.call(s,s.stack):h.print(s.toString())}}),r=new T(this,e,n),this._applications.push(r),u(n),r},t.prototype.dispose=function(){v.ListWrapper.clone(this._applications).forEach(function(e){return e.dispose()}),this._disposeListeners.forEach(function(e){return e()}),this._dispose()},t.prototype._applicationDisposed=function(e){v.ListWrapper.remove(this._applications,e)},t}(O);t.PlatformRef_=S;var D=function(){function e(){}return Object.defineProperty(e.prototype,"injector",{get:function(){return _.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zone",{get:function(){return _.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentTypes",{get:function(){return _.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ApplicationRef=D;var T=function(e){function t(t,n,r){var i=this;e.call(this),this._platform=t,this._zone=n,this._injector=r,this._bootstrapListeners=[],this._disposeListeners=[],this._rootComponents=[],this._rootComponentTypes=[],this._changeDetectorRefs=[],this._runningTick=!1,this._enforceNoNewChanges=!1,h.isPresent(this._zone)&&y.ObservableWrapper.subscribe(this._zone.onTurnDone,function(e){i._zone.run(function(){i.tick()})}),this._enforceNoNewChanges=h.assertionsEnabled()}return p(t,e),t.prototype.registerBootstrapListener=function(e){this._bootstrapListeners.push(e)},t.prototype.registerDisposeListener=function(e){this._disposeListeners.push(e)},t.prototype.registerChangeDetector=function(e){this._changeDetectorRefs.push(e)},t.prototype.unregisterChangeDetector=function(e){v.ListWrapper.remove(this._changeDetectorRefs,e)},t.prototype.bootstrap=function(e,t){var n=this,i=y.PromiseWrapper.completer();return this._zone.run(function(){var o=r(e);h.isPresent(t)&&o.push(t);var s=n._injector.get(_.ExceptionHandler);n._rootComponentTypes.push(e);try{var a=n._injector.resolveAndCreateChild(o),c=a.get(d.APP_COMPONENT_REF_PROMISE),u=function(e){n._loadComponent(e),i.resolve(e)},p=y.PromiseWrapper.then(c,u);h.IS_DART&&y.PromiseWrapper.then(p,function(e){}),y.PromiseWrapper.then(p,null,function(e,t){return i.reject(e,t)})}catch(l){s.call(l,l.stack),i.reject(l,l.stack)}}),i.promise.then(function(e){var t=n._injector.get(C.Console),r=h.assertionsEnabled()?"in the development mode. Call enableProdMode() to enable the production mode.":"in the production mode. Call enableDevMode() to enable the development mode.";return t.log("Angular 2 is running "+r),e})},t.prototype._loadComponent=function(e){var t=b.internalView(e.hostView).changeDetector;this._changeDetectorRefs.push(t.ref),this.tick(),this._rootComponents.push(e),this._bootstrapListeners.forEach(function(t){return t(e)})},t.prototype._unloadComponent=function(e){v.ListWrapper.contains(this._rootComponents,e)&&(this.unregisterChangeDetector(b.internalView(e.hostView).changeDetector.ref),v.ListWrapper.remove(this._rootComponents,e))},Object.defineProperty(t.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),t.prototype.tick=function(){if(this._runningTick)throw new _.BaseException("ApplicationRef.tick is called recursively");var e=t._tickScope();try{this._runningTick=!0,this._changeDetectorRefs.forEach(function(e){return e.detectChanges()}),this._enforceNoNewChanges&&this._changeDetectorRefs.forEach(function(e){return e.checkNoChanges()})}finally{this._runningTick=!1,P.wtfLeave(e)}},t.prototype.dispose=function(){v.ListWrapper.clone(this._rootComponents).forEach(function(e){return e.dispose()}),this._disposeListeners.forEach(function(e){return e()}),this._platform._applicationDisposed(this)},Object.defineProperty(t.prototype,"componentTypes",{get:function(){return this._rootComponentTypes},enumerable:!0,configurable:!0}),t._tickScope=P.wtfCreateScope("ApplicationRef#tick()"),t}(D);t.ApplicationRef_=T},function(e,t,n){var r=n(12),i=n(5),o=n(60),s=n(45),a=function(){function e(e,t){this.error=e,this.stackTrace=t}return e}();t.NgZoneError=a;var c=function(){function e(e){var t=e.enableLongStackTrace;this._runScope=s.wtfCreateScope("NgZone#run()"),this._microtaskScope=s.wtfCreateScope("NgZone#microtask()"),this._pendingMicrotasks=0,this._hasExecutedCodeInInnerZone=!1,this._nestedRun=0,this._inVmTurnDone=!1,this._pendingTimeouts=[],i.global.zone?(this._disabled=!1,this._mountZone=i.global.zone,this._innerZone=this._createInnerZone(this._mountZone,t)):(this._disabled=!0,this._mountZone=null),this._onTurnStartEvents=new o.EventEmitter(!1),this._onTurnDoneEvents=new o.EventEmitter(!1),this._onEventDoneEvents=new o.EventEmitter(!1),this._onErrorEvents=new o.EventEmitter(!1)}return e.prototype.overrideOnTurnStart=function(e){this._onTurnStart=i.normalizeBlank(e)},Object.defineProperty(e.prototype,"onTurnStart",{get:function(){return this._onTurnStartEvents},enumerable:!0,configurable:!0}),e.prototype._notifyOnTurnStart=function(e){var t=this;e.call(this._innerZone,function(){t._onTurnStartEvents.emit(null)})},e.prototype.overrideOnTurnDone=function(e){this._onTurnDone=i.normalizeBlank(e)},Object.defineProperty(e.prototype,"onTurnDone",{get:function(){return this._onTurnDoneEvents},enumerable:!0,configurable:!0}),e.prototype._notifyOnTurnDone=function(e){var t=this;e.call(this._innerZone,function(){t._onTurnDoneEvents.emit(null)})},e.prototype.overrideOnEventDone=function(e,t){var n=this;void 0===t&&(t=!1);var r=i.normalizeBlank(e);t?this._onEventDone=function(){n._pendingTimeouts.length||r()}:this._onEventDone=r},Object.defineProperty(e.prototype,"onEventDone",{get:function(){return this._onEventDoneEvents},enumerable:!0,configurable:!0}),e.prototype._notifyOnEventDone=function(){var e=this;this.runOutsideAngular(function(){e._onEventDoneEvents.emit(null)})},Object.defineProperty(e.prototype,"hasPendingMicrotasks",{get:function(){return this._pendingMicrotasks>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingTimers",{get:function(){return this._pendingTimeouts.length>0},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingAsyncTasks",{get:function(){return this.hasPendingMicrotasks||this.hasPendingTimers},enumerable:!0,configurable:!0}),e.prototype.overrideOnErrorHandler=function(e){this._onErrorHandler=i.normalizeBlank(e)},Object.defineProperty(e.prototype,"onError",{get:function(){return this._onErrorEvents},enumerable:!0,configurable:!0}),e.prototype.run=function(e){if(this._disabled)return e();var t=this._runScope();try{return this._innerZone.run(e)}finally{s.wtfLeave(t)}},e.prototype.runOutsideAngular=function(e){return this._disabled?e():this._mountZone.run(e)},e.prototype._createInnerZone=function(e,t){var n,o=this._microtaskScope,a=this;return n=t?r.StringMapWrapper.merge(Zone.longStackTraceZone,{onError:function(e){a._notifyOnError(this,e)}}):{onError:function(e){a._notifyOnError(this,e)}},e.fork(n).fork({$run:function(e){return function(){try{return a._nestedRun++,a._hasExecutedCodeInInnerZone||(a._hasExecutedCodeInInnerZone=!0,a._notifyOnTurnStart(e),a._onTurnStart&&e.call(a._innerZone,a._onTurnStart)),e.apply(this,arguments)}finally{if(a._nestedRun--,0==a._pendingMicrotasks&&0==a._nestedRun&&!this._inVmTurnDone){if(a._hasExecutedCodeInInnerZone)try{this._inVmTurnDone=!0,a._notifyOnTurnDone(e),a._onTurnDone&&e.call(a._innerZone,a._onTurnDone)}finally{this._inVmTurnDone=!1,a._hasExecutedCodeInInnerZone=!1}0===a._pendingMicrotasks&&(a._notifyOnEventDone(),i.isPresent(a._onEventDone)&&a.runOutsideAngular(a._onEventDone))}}}},$scheduleMicrotask:function(e){return function(t){a._pendingMicrotasks++;var n=function(){var e=o();try{t()}finally{a._pendingMicrotasks--,s.wtfLeave(e)}};e.call(this,n)}},$setTimeout:function(e){return function(t,n){for(var i=[],o=2;o")),t.APP_COMPONENT=s.CONST_EXPR(new o.OpaqueToken("AppComponent")),t.APP_ID=s.CONST_EXPR(new o.OpaqueToken("AppId")),t.APP_ID_RANDOM_PROVIDER=s.CONST_EXPR(new o.Provider(t.APP_ID,{useFactory:r,deps:[]})),t.PLATFORM_INITIALIZER=s.CONST_EXPR(new o.OpaqueToken("Platform Initializer")),t.APP_INITIALIZER=s.CONST_EXPR(new o.OpaqueToken("Application Initializer")),t.PACKAGE_ROOT_URL=s.CONST_EXPR(new o.OpaqueToken("Application Packages Root URL"))},function(e,t,n){function r(e){y=e}var i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(12),c=n(5),u=n(14),p=n(66),l=n(60),h=function(){function e(e){this._pendingCount=0,this._callbacks=[],this._isAngularEventPending=!1,this._watchAngularEvents(e)}return e.prototype._watchAngularEvents=function(e){var t=this;l.ObservableWrapper.subscribe(e.onTurnStart,function(e){t._isAngularEventPending=!0}),e.runOutsideAngular(function(){l.ObservableWrapper.subscribe(e.onEventDone,function(n){e.hasPendingTimers||(t._isAngularEventPending=!1,t._runCallbacksIfReady())})})},e.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._pendingCount},e.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new u.BaseException("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},e.prototype.isStable=function(){return 0==this._pendingCount&&!this._isAngularEventPending},e.prototype._runCallbacksIfReady=function(){var e=this;this.isStable()&&l.PromiseWrapper.resolve(null).then(function(t){for(;0!==e._callbacks.length;)e._callbacks.pop()()})},e.prototype.whenStable=function(e){this._callbacks.push(e),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},e.prototype.isAngularEventPending=function(){return this._isAngularEventPending},e.prototype.findBindings=function(e,t,n){return[]},e.prototype.findProviders=function(e,t,n){return[]},e=i([s.Injectable(),o("design:paramtypes",[p.NgZone])],e)}();t.Testability=h;var f=function(){function e(){this._applications=new a.Map,y.addToWindow(this)}return e.prototype.registerApplication=function(e,t){this._applications.set(e,t)},e.prototype.getTestability=function(e){return this._applications.get(e)},e.prototype.getAllTestabilities=function(){return a.MapWrapper.values(this._applications)},e.prototype.findTestabilityInTree=function(e,t){return void 0===t&&(t=!0),y.findTestabilityInTree(this,e,t)},e=i([s.Injectable(),o("design:paramtypes",[])],e)}();t.TestabilityRegistry=f;var d=function(){function e(){}return e.prototype.addToWindow=function(e){},e.prototype.findTestabilityInTree=function(e,t,n){return null},e=i([c.CONST(),o("design:paramtypes",[])],e)}();t.setTestabilityGetter=r;var y=c.CONST_EXPR(new d)},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(70),c=n(5),u=n(81),p=function(){function e(){}return Object.defineProperty(e.prototype,"hostView",{get:function(){return this.location.parentView},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostComponent",{get:function(){return this.instance},enumerable:!0,configurable:!0}),e}();t.ComponentRef=p;var l=function(e){function t(t,n,r,i,o){e.call(this),this._dispose=o,this.location=t,this.instance=n,this.componentType=r,this.injector=i}return r(t,e),Object.defineProperty(t.prototype,"hostComponentType",{get:function(){return this.componentType},enumerable:!0,configurable:!0}),t.prototype.dispose=function(){this._dispose()},t}(p);t.ComponentRef_=l;var h=function(){function e(){}return e}();t.DynamicComponentLoader=h;var f=function(e){function t(t,n){e.call(this),this._compiler=t,this._viewManager=n}return r(t,e), -t.prototype.loadAsRoot=function(e,t,n,r){var i=this;return this._compiler.compileInHost(e).then(function(o){var s=i._viewManager.createRootHostView(o,t,n),a=i._viewManager.getHostElement(s),u=i._viewManager.getComponent(a),p=function(){c.isPresent(r)&&r(),i._viewManager.destroyRootHostView(s)};return new l(a,u,e,n,p)})},t.prototype.loadIntoLocation=function(e,t,n,r){return void 0===r&&(r=null),this.loadNextToLocation(e,this._viewManager.getNamedElementInComponentView(t,n),r)},t.prototype.loadNextToLocation=function(e,t,n){var r=this;return void 0===n&&(n=null),this._compiler.compileInHost(e).then(function(i){var o=r._viewManager.getViewContainer(t),s=o.createHostView(i,o.length,n),a=r._viewManager.getHostElement(s),c=r._viewManager.getComponent(a),u=function(){var e=o.indexOf(s);-1!==e&&o.remove(e)};return new l(a,c,e,null,u)})},t=i([s.Injectable(),o("design:paramtypes",[a.Compiler,u.AppViewManager])],t)}(h);t.DynamicComponentLoader_=f},function(e,t,n){function r(e){return e instanceof d.CompiledHostTemplate}function i(e,t){return e._createProtoView(t)}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=n(71),u=n(6),p=n(5),l=n(14),h=n(60),f=n(16),d=n(96),y=function(){function e(){}return e}();t.Compiler=y;var v=function(e){function t(t){e.call(this),this._protoViewFactory=t}return o(t,e),t.prototype.compileInHost=function(e){var t=f.reflector.annotations(e),n=t.find(r);if(p.isBlank(n))throw new l.BaseException("No precompiled template for component "+p.stringify(e)+" found");return h.PromiseWrapper.resolve(this._createProtoView(n))},t.prototype._createProtoView=function(e){return this._protoViewFactory.createHost(e).ref},t.prototype.clearCache=function(){this._protoViewFactory.clearCache()},t=s([u.Injectable(),a("design:paramtypes",[c.ProtoViewFactory])],t)}(y);t.Compiler_=v,t.internalCreateProtoView=i},function(e,t,n){function r(e,t){return e._createComponent(t)}function i(e,t,n){return e._createEmbeddedTemplate(t,n)}function o(e,t,n,r,i,o,u){var p=null,l=null;if(i>0&&(p=n[n.length-i]),d.isBlank(p)&&(i=-1),o>0){var h=n[n.length-o];d.isPresent(h)&&(l=h.protoElementInjector)}d.isBlank(l)&&(o=-1);var f=null,y=!1,v=u.directives.map(function(t){return s(e,t)});u instanceof S.BeginComponentCmd?f=v[0]:u instanceof S.EmbeddedTemplateCmd&&(y=!0);var m=null,g=u.variableNameAndValues.length>0;if(v.length>0||g||y){var _=new Map;y||(_=a(u.variableNameAndValues,v)),m=C.ProtoElementInjector.create(l,r,v,d.isPresent(f),o,_),m.attributes=c(u.attrNameAndValues,!1)}return new b.ElementBinder(r,p,i,m,f,t)}function s(e,t){var n=e.resolve(t);return C.DirectiveProvider.createFromType(t,n)}function a(e,t){for(var n=new Map,r=0;ro?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},h=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},f=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},d=n(5),y=n(72),v=n(6),m=n(73),g=n(74),_=n(76),b=n(79),C=n(80),P=n(92),w=n(93),R=n(94),E=n(56),O=n(95),S=n(96),D=n(72),T=n(67),A=function(){function e(e,t,n,r,i,o){this._renderer=e,this._platformPipes=t,this._directiveResolver=n,this._viewResolver=r,this._pipeResolver=i,this._appId=o,this._cache=new Map,this._nextTemplateId=0}return e.prototype.clearCache=function(){this._cache.clear()},e.prototype.createHost=function(e){var t=e.template,n=this._cache.get(t.id);if(d.isBlank(n)){var r={},i=this._appId+"-"+this._nextTemplateId++;this._renderer.registerComponentTemplate(new y.RenderComponentTemplate(t.id,i,E.ViewEncapsulation.None,t.commands,[])),n=new _.AppProtoView(t.id,t.commands,_.ViewType.HOST,!0,t.changeDetectorFactory,null,new g.ProtoPipes(r)),this._cache.set(t.id,n)}return n},e.prototype._createComponent=function(e){var t=this,n=this._cache.get(e.templateId);if(d.isBlank(n)){var r=e.directives[0],i=this._viewResolver.resolve(r),o=e.templateGetter(),s=p(o.styles,[]),a=this._appId+"-"+this._nextTemplateId++;this._renderer.registerComponentTemplate(new y.RenderComponentTemplate(o.id,a,e.encapsulation,o.commands,s));var c=this._flattenPipes(i).map(function(e){return t._bindPipe(e)});n=new _.AppProtoView(o.id,o.commands,_.ViewType.COMPONENT,!0,o.changeDetectorFactory,null,g.ProtoPipes.fromProviders(c)),this._cache.set(o.id,n),this._initializeProtoView(n,null)}return n},e.prototype._createEmbeddedTemplate=function(e,t){var n=new _.AppProtoView(t.templateId,e.children,_.ViewType.EMBEDDED,e.isMerged,e.changeDetectorFactory,c(e.variableNameAndValues,!0),new g.ProtoPipes(t.pipes.config));return e.isMerged&&this.initializeProtoViewIfNeeded(n),n},e.prototype.initializeProtoViewIfNeeded=function(e){if(!e.isInitialized()){var t=this._renderer.createProtoView(e.templateId,e.templateCmds);this._initializeProtoView(e,t)}},e.prototype._initializeProtoView=function(e,t){var n=new I(e,this._directiveResolver,this);S.visitAllCommands(n,e.templateCmds);var r=new _.AppProtoViewMergeInfo(n.mergeEmbeddedViewCount,n.mergeElementCount,n.mergeViewCount);e.init(t,n.elementBinders,n.boundTextCount,r,n.variableLocations)},e.prototype._bindPipe=function(e){var t=this._pipeResolver.resolve(e);return m.PipeProvider.createFromType(e,t)},e.prototype._flattenPipes=function(e){var t=[];return d.isPresent(this._platformPipes)&&u(this._platformPipes,t),d.isPresent(e.pipes)&&u(e.pipes,t),t},e=l([v.Injectable(),f(1,v.Optional()),f(1,v.Inject(O.PLATFORM_PIPES)),f(5,v.Inject(T.APP_ID)),h("design:paramtypes",[D.Renderer,Array,P.DirectiveResolver,w.ViewResolver,R.PipeResolver,String])],e)}();t.ProtoViewFactory=A;var I=function(){function e(e,t,n){this._protoView=e,this._directiveResolver=t,this._protoViewFactory=n,this.variableLocations=new Map,this.boundTextCount=0,this.boundElementIndex=0,this.elementBinderStack=[],this.distanceToParentElementBinder=0,this.distanceToParentProtoElementInjector=0,this.elementBinders=[],this.mergeEmbeddedViewCount=0,this.mergeElementCount=0,this.mergeViewCount=1}return e.prototype.visitText=function(e,t){return e.isBound&&this.boundTextCount++,null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitBeginElement=function(e,t){return e.isBound?this._visitBeginBoundElement(e,null):this._visitBeginElement(e,null,null),null},e.prototype.visitEndElement=function(e){return this._visitEndElement()},e.prototype.visitBeginComponent=function(e,t){var n=r(this._protoViewFactory,e);return this._visitBeginBoundElement(e,n)},e.prototype.visitEndComponent=function(e){return this._visitEndElement()},e.prototype.visitEmbeddedTemplate=function(e,t){var n=i(this._protoViewFactory,e,this._protoView);return e.isMerged&&this.mergeEmbeddedViewCount++,this._visitBeginBoundElement(e,n),this._visitEndElement()},e.prototype._visitBeginBoundElement=function(e,t){d.isPresent(t)&&t.isMergable&&(this.mergeElementCount+=t.mergeInfo.elementCount,this.mergeViewCount+=t.mergeInfo.viewCount,this.mergeEmbeddedViewCount+=t.mergeInfo.embeddedViewCount);var n=o(this._directiveResolver,t,this.elementBinderStack,this.boundElementIndex,this.distanceToParentElementBinder,this.distanceToParentProtoElementInjector,e);this.elementBinders.push(n);for(var r=n.protoElementInjector,i=0;i=0;n--)c.isPresent(t[n+this.elementOffset])&&t[n+this.elementOffset].ngAfterContentChecked()},e.prototype.notifyAfterViewChecked=function(){for(var e=this.proto.elementBinders.length,t=this.elementInjectors,n=e-1;n>=0;n--)c.isPresent(t[n+this.elementOffset])&&t[n+this.elementOffset].ngAfterViewChecked()},e.prototype.getDirectiveFor=function(e){var t=this.elementInjectors[this.elementOffset+e.elementIndex];return t.getDirectiveAtIndex(e.directiveIndex)},e.prototype.getNestedView=function(e){var t=this.elementInjectors[e];return c.isPresent(t)?t.getNestedView():null},e.prototype.getContainerElement=function(){return c.isPresent(this.containerElementInjector)?this.containerElementInjector.getElementRef():null},e.prototype.getDebugContext=function(e,t){try{var n=this.elementOffset+e,i=n1)throw new c.BaseException("A directive injectable can contain only one of the following @Attribute or @Query.")},t.createFrom=function(e){return new t(e.key,e.optional,e.lowerBoundVisibility,e.upperBoundVisibility,e.properties,t._attributeName(e.properties),t._query(e.properties))},t._attributeName=function(e){var t=e.find(function(e){return e instanceof d.AttributeMetadata});return a.isPresent(t)?t.attributeName:null},t._query=function(e){return e.find(function(e){return e instanceof d.QueryMetadata})},t}(l.Dependency);t.DirectiveDependency=A;var I=function(e){function t(t,n,r,i,o,s){e.call(this,t,[new f.ResolvedFactory(n,r)],!1),this.metadata=i,this.providers=o,this.viewProviders=s,this.callOnDestroy=b.hasLifecycleHook(O.LifecycleHooks.OnDestroy,t.token)}return s(t,e),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.key.displayName},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"queries",{get:function(){if(a.isBlank(this.metadata.queries))return[];var e=[];return p.StringMapWrapper.forEach(this.metadata.queries,function(t,n){var r=w.reflector.setter(n);e.push(new N(r,t))}),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventEmitters",{get:function(){return a.isPresent(this.metadata)&&a.isPresent(this.metadata.outputs)?this.metadata.outputs:[]},enumerable:!0,configurable:!0}),t.createFromProvider=function(e,n){a.isBlank(n)&&(n=new _.DirectiveMetadata);var r=f.resolveProvider(e),i=r.resolvedFactories[0],o=i.dependencies.map(A.createFrom),s=a.isPresent(n.providers)?n.providers:[],c=n instanceof _.ComponentMetadata&&a.isPresent(n.viewProviders)?n.viewProviders:[];return new t(r.key,i.factory,o,n,s,c)},t.createFromType=function(e,n){var r=new l.Provider(e,{useClass:e});return t.createFromProvider(r,n)},t}(f.ResolvedProvider_);t.DirectiveProvider=I;var x=function(){function e(e,t,n,r){this.viewManager=e,this.view=t,this.elementRef=n,this.templateRef=r,this.nestedView=null}return e}();t.PreBuiltObjects=x;var N=function(){function e(e,t){this.setter=e,this.metadata=t}return e}();t.QueryMetadataWithSetter=N;var k=function(){function e(e,t){this.eventName=e,this.getter=t}return e.prototype.subscribe=function(e,t,n){var r=this,i=this.getter(n);return u.ObservableWrapper.subscribe(i,function(n){return e.triggerEventHandlers(r.eventName,n,t)})},e}();t.EventEmitterAccessor=k;var j=function(){function e(e,t,n,o,s,a){this.parent=e,this.index=t,this.distanceToParent=o,this.directiveVariableBindings=a,this._firstProviderIsComponent=s;var c=n.length;this.protoInjector=new h.ProtoInjector(n),this.eventEmitterAccessors=p.ListWrapper.createFixedSize(c);for(var u=0;c>u;++u)this.eventEmitterAccessors[u]=r(n[u]);this.protoQueryRefs=i(n)}return e.create=function(t,n,r,i,o,s){var a=[];return e._createDirectiveProviderWithVisibility(r,a,i),i&&e._createViewProvidersWithVisibility(r,a),e._createProvidersWithVisibility(r,a),new e(t,n,a,o,i,s)},e._createDirectiveProviderWithVisibility=function(t,n,r){t.forEach(function(i){n.push(e._createProviderWithVisibility(r,i,t,i))})},e._createProvidersWithVisibility=function(e,t){var n=[];e.forEach(function(e){n=p.ListWrapper.concat(n,e.providers)});var r=l.Injector.resolve(n);r.forEach(function(e){return t.push(new h.ProviderWithVisibility(e,h.Visibility.Public))})},e._createProviderWithVisibility=function(e,t,n,r){var i=e&&n[0]===t;return new h.ProviderWithVisibility(r,i?h.Visibility.PublicAndPrivate:h.Visibility.Public)},e._createViewProvidersWithVisibility=function(e,t){var n=l.Injector.resolve(e[0].viewProviders);n.forEach(function(e){return t.push(new h.ProviderWithVisibility(e,h.Visibility.Private))})},e.prototype.instantiate=function(e){return new M(this,e)},e.prototype.directParent=function(){return this.distanceToParent<2?this.parent:null},Object.defineProperty(e.prototype,"hasBindings",{get:function(){return this.eventEmitterAccessors.length>0},enumerable:!0,configurable:!0}),e.prototype.getProviderAtIndex=function(e){return this.protoInjector.getProviderAtIndex(e)},e}();t.ProtoElementInjector=j;var V=function(){function e(e,t,n){this.element=e,this.componentElement=t,this.injector=n}return e}(),M=function(e){function t(t,n){var r=this;e.call(this,n),this._preBuiltObjects=null,this._proto=t,this._injector=new l.Injector(this._proto.protoInjector,null,this,function(){return r._debugContext()});var i=this._injector.internalStrategy;this._strategy=i instanceof h.InjectorInlineStrategy?new U(i,this):new H(i,this),this.hydrated=!1,this._queryStrategy=this._buildQueryStrategy()}return s(t,e),t.prototype.dehydrate=function(){this.hydrated=!1,this._host=null,this._preBuiltObjects=null,this._strategy.callOnDestroy(),this._strategy.dehydrate(),this._queryStrategy.dehydrate()},t.prototype.hydrate=function(e,t,n){this._host=t,this._preBuiltObjects=n,this._reattachInjectors(e),this._queryStrategy.hydrate(),this._strategy.hydrate(),this.hydrated=!0},t.prototype._debugContext=function(){var e=this._preBuiltObjects,t=e.elementRef.boundElementIndex-e.view.elementOffset,n=this._preBuiltObjects.view.getDebugContext(t,null);return a.isPresent(n)?new V(n.element,n.componentElement,n.injector):null},t.prototype._reattachInjectors=function(e){a.isPresent(this._parent)?a.isPresent(e)?(this._reattachInjector(this._injector,e,!1),this._reattachInjector(e,this._parent._injector,!1)):this._reattachInjector(this._injector,this._parent._injector,!1):a.isPresent(this._host)?a.isPresent(e)?(this._reattachInjector(this._injector,e,!1),this._reattachInjector(e,this._host._injector,!0)):this._reattachInjector(this._injector,this._host._injector,!0):a.isPresent(e)&&this._reattachInjector(this._injector,e,!0)},t.prototype._reattachInjector=function(e,t,n){e.internalStrategy.attach(t,n)},t.prototype.hasVariableBinding=function(e){var t=this._proto.directiveVariableBindings;return a.isPresent(t)&&t.has(e)},t.prototype.getVariableBinding=function(e){var t=this._proto.directiveVariableBindings.get(e);return a.isPresent(t)?this.getDirectiveAtIndex(t):this.getElementRef()},t.prototype.get=function(e){return this._injector.get(e)},t.prototype.hasDirective=function(e){return a.isPresent(this._injector.getOptional(e))},t.prototype.getEventEmitterAccessors=function(){return this._proto.eventEmitterAccessors},t.prototype.getDirectiveVariableBindings=function(){return this._proto.directiveVariableBindings},t.prototype.getComponent=function(){return this._strategy.getComponent()},t.prototype.getInjector=function(){return this._injector},t.prototype.getElementRef=function(){return this._preBuiltObjects.elementRef},t.prototype.getViewContainerRef=function(){return new S.ViewContainerRef_(this._preBuiltObjects.viewManager,this.getElementRef())},t.prototype.getNestedView=function(){return this._preBuiltObjects.nestedView},t.prototype.getView=function(){return this._preBuiltObjects.view},t.prototype.directParent=function(){return this._proto.distanceToParent<2?this.parent:null},t.prototype.isComponentKey=function(e){return this._strategy.isComponentKey(e)},t.prototype.getDependency=function(e,t,n){var r=n.key;if(t instanceof I){var i=n,o=t,s=D.instance();if(r.id===s.viewManagerId)return this._preBuiltObjects.viewManager;if(a.isPresent(i.attributeName))return this._buildAttribute(i);if(a.isPresent(i.queryDecorator))return this._queryStrategy.findQuery(i.queryDecorator).list;if(i.key.id===D.instance().changeDetectorRefId){if(o.metadata instanceof _.ComponentMetadata){var c=this._preBuiltObjects.view.getNestedView(this._preBuiltObjects.elementRef.boundElementIndex);return c.changeDetector.ref}return this._preBuiltObjects.view.changeDetector.ref}if(i.key.id===D.instance().elementRefId)return this.getElementRef();if(i.key.id===D.instance().viewContainerId)return this.getViewContainerRef();if(i.key.id===D.instance().templateRefId){if(a.isBlank(this._preBuiltObjects.templateRef)){if(i.optional)return null;throw new l.NoProviderError(null,i.key)}return this._preBuiltObjects.templateRef}}else if(t instanceof E.PipeProvider&&n.key.id===D.instance().changeDetectorRefId){var c=this._preBuiltObjects.view.getNestedView(this._preBuiltObjects.elementRef.boundElementIndex);return c.changeDetector.ref}return h.UNDEFINED},t.prototype._buildAttribute=function(e){var t=this._proto.attributes;return a.isPresent(t)&&t.has(e.attributeName)?t.get(e.attributeName):null},t.prototype.addDirectivesMatchingQuery=function(e,t){var n=a.isBlank(this._preBuiltObjects)?null:this._preBuiltObjects.templateRef;e.selector===g.TemplateRef&&a.isPresent(n)&&t.push(n),this._strategy.addDirectivesMatchingQuery(e,t)},t.prototype._buildQueryStrategy=function(){return 0===this._proto.protoQueryRefs.length?L:this._proto.protoQueryRefs.length<=F.NUMBER_OF_SUPPORTED_QUERIES?new F(this):new W(this)},t.prototype.link=function(e){e.addChild(this); -},t.prototype.unlink=function(){this.remove()},t.prototype.getDirectiveAtIndex=function(e){return this._injector.getAt(e)},t.prototype.hasInstances=function(){return this._proto.hasBindings&&this.hydrated},t.prototype.getHost=function(){return this._host},t.prototype.getBoundElementIndex=function(){return this._proto.index},t.prototype.getRootViewInjectors=function(){if(!this.hydrated)return[];var e=this._preBuiltObjects.view,t=e.getNestedView(e.elementOffset+this.getBoundElementIndex());return a.isPresent(t)?t.rootElementInjectors:[]},t.prototype.ngAfterViewChecked=function(){this._queryStrategy.updateViewQueries()},t.prototype.ngAfterContentChecked=function(){this._queryStrategy.updateContentQueries()},t.prototype.traverseAndSetQueriesAsDirty=function(){for(var e=this;a.isPresent(e);)e._setQueriesAsDirty(),e=e.parent},t.prototype._setQueriesAsDirty=function(){this._queryStrategy.setContentQueriesAsDirty(),a.isPresent(this._host)&&this._host._queryStrategy.setViewQueriesAsDirty()},t}(T);t.ElementInjector=M;var B=function(){function e(){}return e.prototype.setContentQueriesAsDirty=function(){},e.prototype.setViewQueriesAsDirty=function(){},e.prototype.hydrate=function(){},e.prototype.dehydrate=function(){},e.prototype.updateContentQueries=function(){},e.prototype.updateViewQueries=function(){},e.prototype.findQuery=function(e){throw new c.BaseException("Cannot find query for directive "+e+".")},e}(),L=new B,F=function(){function e(e){var t=e._proto.protoQueryRefs;t.length>0&&(this.query0=new G(t[0],e)),t.length>1&&(this.query1=new G(t[1],e)),t.length>2&&(this.query2=new G(t[2],e))}return e.prototype.setContentQueriesAsDirty=function(){a.isPresent(this.query0)&&!this.query0.isViewQuery&&(this.query0.dirty=!0),a.isPresent(this.query1)&&!this.query1.isViewQuery&&(this.query1.dirty=!0),a.isPresent(this.query2)&&!this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.setViewQueriesAsDirty=function(){a.isPresent(this.query0)&&this.query0.isViewQuery&&(this.query0.dirty=!0),a.isPresent(this.query1)&&this.query1.isViewQuery&&(this.query1.dirty=!0),a.isPresent(this.query2)&&this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.hydrate=function(){a.isPresent(this.query0)&&this.query0.hydrate(),a.isPresent(this.query1)&&this.query1.hydrate(),a.isPresent(this.query2)&&this.query2.hydrate()},e.prototype.dehydrate=function(){a.isPresent(this.query0)&&this.query0.dehydrate(),a.isPresent(this.query1)&&this.query1.dehydrate(),a.isPresent(this.query2)&&this.query2.dehydrate()},e.prototype.updateContentQueries=function(){a.isPresent(this.query0)&&!this.query0.isViewQuery&&this.query0.update(),a.isPresent(this.query1)&&!this.query1.isViewQuery&&this.query1.update(),a.isPresent(this.query2)&&!this.query2.isViewQuery&&this.query2.update()},e.prototype.updateViewQueries=function(){a.isPresent(this.query0)&&this.query0.isViewQuery&&this.query0.update(),a.isPresent(this.query1)&&this.query1.isViewQuery&&this.query1.update(),a.isPresent(this.query2)&&this.query2.isViewQuery&&this.query2.update()},e.prototype.findQuery=function(e){if(a.isPresent(this.query0)&&this.query0.protoQueryRef.query===e)return this.query0;if(a.isPresent(this.query1)&&this.query1.protoQueryRef.query===e)return this.query1;if(a.isPresent(this.query2)&&this.query2.protoQueryRef.query===e)return this.query2;throw new c.BaseException("Cannot find query for directive "+e+".")},e.NUMBER_OF_SUPPORTED_QUERIES=3,e}(),W=function(){function e(e){this.queries=e._proto.protoQueryRefs.map(function(t){return new G(t,e)})}return e.prototype.setContentQueriesAsDirty=function(){for(var e=0;e0?this.list.first:null):this.protoQueryRef.setter(e,this.list)}this.list.notifyOnChanges()}},e.prototype._update=function(){var e=[];if(this.protoQueryRef.query.isViewQuery){var t=this.originator.getView(),n=t.getNestedView(t.elementOffset+this.originator.getBoundElementIndex());a.isPresent(n)&&this._visitView(n,e)}else this._visit(this.originator,e);this.list.reset(e)},e.prototype._visit=function(e,t){for(var n=e.getView(),r=n.elementOffset+e._proto.index,i=r;ir&&(a.isBlank(o)||a.isBlank(o.parent)||n.elementOffset+o.parent._proto.indexo?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(6),c=n(5),u=n(14),p=n(76),l=n(77),h=n(72),f=n(82),d=n(85),y=n(86),v=n(45),m=n(71),g=function(){function e(){}return e.prototype.getHostElement=function(e){var t=l.internalView(e);if(t.proto.type!==p.ViewType.HOST)throw new u.BaseException("This operation is only allowed on host views");return t.elementRefs[t.elementOffset]},e}();t.AppViewManager=g;var _=function(e){function t(t,n,r,i,o){e.call(this),this._viewPool=t,this._viewListener=n,this._utils=r,this._renderer=i,this._createRootHostViewScope=v.wtfCreateScope("AppViewManager#createRootHostView()"),this._destroyRootHostViewScope=v.wtfCreateScope("AppViewManager#destroyRootHostView()"),this._createEmbeddedViewInContainerScope=v.wtfCreateScope("AppViewManager#createEmbeddedViewInContainer()"),this._createHostViewInContainerScope=v.wtfCreateScope("AppViewManager#createHostViewInContainer()"),this._destroyViewInContainerScope=v.wtfCreateScope("AppViewMananger#destroyViewInContainer()"),this._attachViewInContainerScope=v.wtfCreateScope("AppViewMananger#attachViewInContainer()"),this._detachViewInContainerScope=v.wtfCreateScope("AppViewMananger#detachViewInContainer()"),this._protoViewFactory=o}return r(t,e),t.prototype.getViewContainer=function(e){var t=l.internalView(e.parentView);return t.elementInjectors[e.boundElementIndex].getViewContainerRef()},t.prototype.getNamedElementInComponentView=function(e,t){var n=l.internalView(e.parentView),r=e.boundElementIndex,i=n.getNestedView(r);if(c.isBlank(i))throw new u.BaseException("There is no component directive at element "+r);var o=i.proto.variableLocations.get(t);if(c.isBlank(o))throw new u.BaseException("Could not find variable "+t);return i.elementRefs[i.elementOffset+o]},t.prototype.getComponent=function(e){var t=l.internalView(e.parentView),n=e.boundElementIndex;return this._utils.getComponentInstance(t,n)},t.prototype.createRootHostView=function(e,t,n){var r=this._createRootHostViewScope(),i=l.internalProtoView(e);this._protoViewFactory.initializeProtoViewIfNeeded(i);var o=t;c.isBlank(o)&&(o=i.elementBinders[0].componentDirective.metadata.selector);var s=this._renderer.createRootHostView(i.render,i.mergeInfo.embeddedViewCount+1,o),a=this._createMainView(i,s);return this._renderer.hydrateView(a.render),this._utils.hydrateRootHostView(a,n),v.wtfLeave(r,a.ref)},t.prototype.destroyRootHostView=function(e){var t=this._destroyRootHostViewScope(),n=l.internalView(e);this._renderer.detachFragment(n.renderFragment),this._renderer.dehydrateView(n.render),this._viewDehydrateRecurse(n),this._viewListener.onViewDestroyed(n),this._renderer.destroyView(n.render),v.wtfLeave(t)},t.prototype.createEmbeddedViewInContainer=function(e,t,n){var r=this._createEmbeddedViewInContainerScope(),i=l.internalProtoView(n.protoViewRef);if(i.type!==p.ViewType.EMBEDDED)throw new u.BaseException("This method can only be called with embedded ProtoViews!");return this._protoViewFactory.initializeProtoViewIfNeeded(i),v.wtfLeave(r,this._createViewInContainer(e,t,i,n.elementRef,null))},t.prototype.createHostViewInContainer=function(e,t,n,r){var i=this._createHostViewInContainerScope(),o=l.internalProtoView(n);if(o.type!==p.ViewType.HOST)throw new u.BaseException("This method can only be called with host ProtoViews!");return this._protoViewFactory.initializeProtoViewIfNeeded(o),v.wtfLeave(i,this._createViewInContainer(e,t,o,e,r))},t.prototype._createViewInContainer=function(e,t,n,r,i){var o,s=l.internalView(e.parentView),a=e.boundElementIndex,u=l.internalView(r.parentView),h=r.boundElementIndex,f=u.getNestedView(h);n.type===p.ViewType.EMBEDDED&&c.isPresent(f)&&!f.hydrated()?(o=f,this._attachRenderView(s,a,t,o)):(o=this._createPooledView(n),this._attachRenderView(s,a,t,o),this._renderer.hydrateView(o.render)),this._utils.attachViewInContainer(s,a,u,h,t,o);try{this._utils.hydrateViewInContainer(s,a,u,h,t,i)}catch(d){throw this._utils.detachViewInContainer(s,a,t),d}return o.ref},t.prototype._attachRenderView=function(e,t,n,r){var i=e.elementRefs[t];if(0===n)this._renderer.attachFragmentAfterElement(i,r.renderFragment);else{var o=e.viewContainers[t].views[n-1];this._renderer.attachFragmentAfterFragment(o.renderFragment,r.renderFragment)}},t.prototype.destroyViewInContainer=function(e,t){var n=this._destroyViewInContainerScope(),r=l.internalView(e.parentView),i=e.boundElementIndex;this._destroyViewInContainer(r,i,t),v.wtfLeave(n)},t.prototype.attachViewInContainer=function(e,t,n){var r=this._attachViewInContainerScope(),i=l.internalView(n),o=l.internalView(e.parentView),s=e.boundElementIndex;return this._utils.attachViewInContainer(o,s,null,null,t,i),this._attachRenderView(o,s,t,i),v.wtfLeave(r,n)},t.prototype.detachViewInContainer=function(e,t){var n=this._detachViewInContainerScope(),r=l.internalView(e.parentView),i=e.boundElementIndex,o=r.viewContainers[i],s=o.views[t];return this._utils.detachViewInContainer(r,i,t),this._renderer.detachFragment(s.renderFragment),v.wtfLeave(n,s.ref)},t.prototype._createMainView=function(e,t){var n=this._utils.createView(e,t,this,this._renderer);return this._renderer.setEventDispatcher(n.render,n),this._viewListener.onViewCreated(n),n},t.prototype._createPooledView=function(e){var t=this._viewPool.getView(e);return c.isBlank(t)&&(t=this._createMainView(e,this._renderer.createView(e.render,e.mergeInfo.embeddedViewCount+1))),t},t.prototype._destroyPooledView=function(e){var t=this._viewPool.returnView(e);t||(this._viewListener.onViewDestroyed(e),this._renderer.destroyView(e.render))},t.prototype._destroyViewInContainer=function(e,t,n){var r=e.viewContainers[t],i=r.views[n];this._viewDehydrateRecurse(i),this._utils.detachViewInContainer(e,t,n),i.viewOffset>0?this._renderer.detachFragment(i.renderFragment):(this._renderer.dehydrateView(i.render),this._renderer.detachFragment(i.renderFragment),this._destroyPooledView(i))},t.prototype._viewDehydrateRecurse=function(e){e.hydrated()&&this._utils.dehydrateView(e);for(var t=e.viewContainers,n=e.viewOffset,r=e.viewOffset+e.proto.mergeInfo.viewCount-1,i=e.elementOffset,o=n;r>=o;o++)for(var s=e.views[o],a=0;a=0;p--)this._destroyViewInContainer(s,i,p)}},t=i([a.Injectable(),s(4,a.Inject(a.forwardRef(function(){return m.ProtoViewFactory}))),o("design:paramtypes",[d.AppViewPool,y.AppViewListener,f.AppViewManagerUtils,h.Renderer,Object])],t)}(g);t.AppViewManager_=_},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(12),a=n(80),c=n(5),u=n(76),p=n(83),l=n(84),h=n(74),f=function(){function e(){}return e.prototype.getComponentInstance=function(e,t){var n=e.elementInjectors[t];return n.getComponent()},e.prototype.createView=function(e,t,n,r){for(var i=t.fragmentRefs,o=t.viewRef,h=e.mergeInfo.elementCount,f=e.mergeInfo.viewCount,d=s.ListWrapper.createFixedSize(h),y=s.ListWrapper.createFixedSize(h),v=s.ListWrapper.createFixedSize(h),m=s.ListWrapper.createFixedSize(h),g=s.ListWrapper.createFixedSize(f),_=0,b=0,C=0,P=s.ListWrapper.createFixedSize(f),w=0;f>w;w++){var R=P[w],E=c.isPresent(R)?m[R]:null,O=c.isPresent(E)?v[R].view:null,S=c.isPresent(R)?O.proto.elementBinders[R-O.elementOffset].nestedProtoView:e,D=null;(0===w||S.type===u.ViewType.EMBEDDED)&&(D=i[C++]);var T=new u.AppView(r,S,w,_,b,S.protoLocals,o,D,E);g[w]=T,c.isPresent(R)&&(v[R].nestedView=T);for(var A=[],I=w+1,x=0;x=0;l--)c.isPresent(p.parent)&&o.rootElementInjectors[l].link(p.parent);p.traverseAndSetQueriesAsDirty()},e.prototype.detachViewInContainer=function(e,t,n){var r=e.viewContainers[t],i=r.views[n];e.elementInjectors[t].traverseAndSetQueriesAsDirty(),i.changeDetector.remove(),s.ListWrapper.removeAt(r.views,n);for(var o=0;o=o;){var a=e.views[o],p=a.proto;if(a!==e&&a.proto.type===u.ViewType.EMBEDDED)o+=a.proto.mergeInfo.viewCount;else{a!==e&&(t=null,i=null,n=a.containerElementInjector,r=n.getComponent()),a.context=r,a.locals.parent=i;for(var l=p.elementBinders,f=0;f=n;n++){var r=e.views[n];if(r.hydrated()){c.isPresent(r.locals)&&r.locals.clearValues(),r.context=null,r.changeDetector.dehydrate();for(var i=r.proto.elementBinders,o=0;oo?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(6),a=n(5),c=n(12);t.APP_VIEW_POOL_CAPACITY=a.CONST_EXPR(new s.OpaqueToken("AppViewPool.viewPoolCapacity"));var u=function(){function e(e){this._pooledViewsPerProtoView=new c.Map,this._poolCapacityPerProtoView=e}return e.prototype.getView=function(e){var t=this._pooledViewsPerProtoView.get(e);return a.isPresent(t)&&t.length>0?t.pop():null},e.prototype.returnView=function(e){var t=e.proto,n=this._pooledViewsPerProtoView.get(t);a.isBlank(n)&&(n=[],this._pooledViewsPerProtoView.set(t,n));var r=n.lengtho?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=function(){function e(){}return e.prototype.onViewCreated=function(e){},e.prototype.onViewDestroyed=function(e){},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.AppViewListener=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(12),o=n(14),s=n(5),a=n(77),c=function(){function e(){}return e.prototype.clear=function(){for(var e=this.length-1;e>=0;e--)this.remove(e)},Object.defineProperty(e.prototype,"length",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ViewContainerRef=c;var u=function(e){function t(t,n){e.call(this),this.viewManager=t,this.element=n}return r(t,e),t.prototype._getViews=function(){var e=this.element,t=a.internalView(e.parentView).viewContainers[e.boundElementIndex];return s.isPresent(t)?t.views:[]},t.prototype.get=function(e){return this._getViews()[e].ref},Object.defineProperty(t.prototype,"length",{get:function(){return this._getViews().length},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(e,t){return void 0===t&&(t=-1),-1==t&&(t=this.length),this.viewManager.createEmbeddedViewInContainer(this.element,t,e)},t.prototype.createHostView=function(e,t,n){return void 0===e&&(e=null),void 0===t&&(t=-1),void 0===n&&(n=null),-1==t&&(t=this.length),this.viewManager.createHostViewInContainer(this.element,t,e,n)},t.prototype.insert=function(e,t){return void 0===t&&(t=-1),-1==t&&(t=this.length),this.viewManager.attachViewInContainer(this.element,t,e)},t.prototype.indexOf=function(e){return i.ListWrapper.indexOf(this._getViews(),a.internalView(e))},t.prototype.remove=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1),this.viewManager.destroyViewInContainer(this.element,e)},t.prototype.detach=function(e){return void 0===e&&(e=-1),-1==e&&(e=this.length-1),this.viewManager.detachViewInContainer(this.element,e)},t}(c);t.ViewContainerRef_=u},function(e,t,n){function r(e,t){if(!(t instanceof i.Type))return!1;var n=t.prototype;switch(e){case o.LifecycleHooks.AfterContentInit:return!!n.ngAfterContentInit;case o.LifecycleHooks.AfterContentChecked:return!!n.ngAfterContentChecked;case o.LifecycleHooks.AfterViewInit:return!!n.ngAfterViewInit;case o.LifecycleHooks.AfterViewChecked:return!!n.ngAfterViewChecked;case o.LifecycleHooks.OnChanges:return!!n.ngOnChanges;case o.LifecycleHooks.DoCheck:return!!n.ngDoCheck;case o.LifecycleHooks.OnDestroy:return!!n.ngOnDestroy;case o.LifecycleHooks.OnInit:return!!n.ngOnInit;default:return!1}}var i=n(5),o=n(89);t.hasLifecycleHook=r},function(e,t){!function(e){e[e.OnInit=0]="OnInit",e[e.OnDestroy=1]="OnDestroy",e[e.DoCheck=2]="DoCheck",e[e.OnChanges=3]="OnChanges",e[e.AfterContentInit=4]="AfterContentInit",e[e.AfterContentChecked=5]="AfterContentChecked",e[e.AfterViewInit=6]="AfterViewInit",e[e.AfterViewChecked=7]="AfterViewChecked"}(t.LifecycleHooks||(t.LifecycleHooks={}));var n=t.LifecycleHooks;t.LIFECYCLE_HOOKS_VALUES=[n.OnInit,n.OnDestroy,n.DoCheck,n.OnChanges,n.AfterContentInit,n.AfterContentChecked,n.AfterViewInit,n.AfterViewChecked]},function(e,t,n){var r=n(12),i=n(5),o=n(60),s=function(){function e(){this._results=[],this._emitter=new o.EventEmitter}return Object.defineProperty(e.prototype,"changes",{get:function(){return this._emitter},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return this._results.length},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"first",{get:function(){return r.ListWrapper.first(this._results)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"last",{get:function(){return r.ListWrapper.last(this._results)},enumerable:!0,configurable:!0}),e.prototype.map=function(e){return this._results.map(e)},e.prototype.filter=function(e){return this._results.filter(e); -},e.prototype.reduce=function(e,t){return this._results.reduce(e,t)},e.prototype.toArray=function(){return r.ListWrapper.clone(this._results)},e.prototype[i.getSymbolIterator()]=function(){return this._results[i.getSymbolIterator()]()},e.prototype.toString=function(){return this._results.toString()},e.prototype.reset=function(e){this._results=e},e.prototype.notifyOnChanges=function(){this._emitter.emit(this)},e}();t.QueryList=s},function(e,t){t.EVENT_TARGET_SEPARATOR=":";var n=function(){function e(e,t,n){this.fieldName=e,this.eventName=t,this.isLongForm=n}return e.parse=function(n){var r=n,i=n,o=!1,s=n.indexOf(t.EVENT_TARGET_SEPARATOR);return s>-1&&(r=n.substring(0,s).trim(),i=n.substring(s+1).trim(),o=!0),new e(r,i,o)},e.prototype.getFullName=function(){return this.isLongForm?""+this.fieldName+t.EVENT_TARGET_SEPARATOR+this.eventName:this.eventName},e}();t.EventConfig=n},function(e,t,n){function r(e){return e instanceof p.DirectiveMetadata}var i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(5),c=n(14),u=n(12),p=n(3),l=n(16),h=function(){function e(){}return e.prototype.resolve=function(e){var t=l.reflector.annotations(s.resolveForwardRef(e));if(a.isPresent(t)){var n=t.find(r);if(a.isPresent(n)){var i=l.reflector.propMetadata(e);return this._mergeWithPropertyMetadata(n,i)}}throw new c.BaseException("No Directive annotation found on "+a.stringify(e))},e.prototype._mergeWithPropertyMetadata=function(e,t){var n=[],r=[],i={},o={};return u.StringMapWrapper.forEach(t,function(e,t){e.forEach(function(e){if(e instanceof p.InputMetadata&&(a.isPresent(e.bindingPropertyName)?n.push(t+": "+e.bindingPropertyName):n.push(t)),e instanceof p.OutputMetadata&&(a.isPresent(e.bindingPropertyName)?r.push(t+": "+e.bindingPropertyName):r.push(t)),e instanceof p.HostBindingMetadata&&(a.isPresent(e.hostPropertyName)?i["["+e.hostPropertyName+"]"]=t:i["["+t+"]"]=t),e instanceof p.HostListenerMetadata){var s=a.isPresent(e.args)?e.args.join(", "):"";i["("+e.eventName+")"]=t+"("+s+")"}e instanceof p.ContentChildrenMetadata&&(o[t]=e),e instanceof p.ViewChildrenMetadata&&(o[t]=e),e instanceof p.ContentChildMetadata&&(o[t]=e),e instanceof p.ViewChildMetadata&&(o[t]=e)})}),this._merge(e,n,r,i,o)},e.prototype._merge=function(e,t,n,r,i){var o=a.isPresent(e.inputs)?u.ListWrapper.concat(e.inputs,t):t,s=a.isPresent(e.outputs)?u.ListWrapper.concat(e.outputs,n):n,c=a.isPresent(e.host)?u.StringMapWrapper.merge(e.host,r):r,l=a.isPresent(e.queries)?u.StringMapWrapper.merge(e.queries,i):i;return e instanceof p.ComponentMetadata?new p.ComponentMetadata({selector:e.selector,inputs:o,outputs:s,host:c,exportAs:e.exportAs,moduleId:e.moduleId,queries:l,changeDetection:e.changeDetection,providers:e.providers,viewProviders:e.viewProviders}):new p.DirectiveMetadata({selector:e.selector,inputs:o,outputs:s,host:c,exportAs:e.exportAs,queries:l,providers:e.providers})},e=i([s.Injectable(),o("design:paramtypes",[])],e)}();t.DirectiveResolver=h},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(56),a=n(23),c=n(5),u=n(14),p=n(12),l=n(16),h=function(){function e(){this._cache=new p.Map}return e.prototype.resolve=function(e){var t=this._cache.get(e);return c.isBlank(t)&&(t=this._resolve(e),this._cache.set(e,t)),t},e.prototype._resolve=function(e){var t,n;if(l.reflector.annotations(e).forEach(function(e){e instanceof s.ViewMetadata&&(n=e),e instanceof a.ComponentMetadata&&(t=e)}),!c.isPresent(t)){if(c.isBlank(n))throw new u.BaseException("No View decorator found on component '"+c.stringify(e)+"'");return n}if(c.isBlank(t.template)&&c.isBlank(t.templateUrl)&&c.isBlank(n))throw new u.BaseException("Component '"+c.stringify(e)+"' must have either 'template', 'templateUrl', or '@View' set.");if(c.isPresent(t.template)&&c.isPresent(n))this._throwMixingViewAndComponent("template",e);else if(c.isPresent(t.templateUrl)&&c.isPresent(n))this._throwMixingViewAndComponent("templateUrl",e);else if(c.isPresent(t.directives)&&c.isPresent(n))this._throwMixingViewAndComponent("directives",e);else if(c.isPresent(t.pipes)&&c.isPresent(n))this._throwMixingViewAndComponent("pipes",e);else if(c.isPresent(t.encapsulation)&&c.isPresent(n))this._throwMixingViewAndComponent("encapsulation",e);else if(c.isPresent(t.styles)&&c.isPresent(n))this._throwMixingViewAndComponent("styles",e);else{if(!c.isPresent(t.styleUrls)||!c.isPresent(n))return c.isPresent(n)?n:new s.ViewMetadata({templateUrl:t.templateUrl,template:t.template,directives:t.directives,pipes:t.pipes,encapsulation:t.encapsulation,styles:t.styles,styleUrls:t.styleUrls});this._throwMixingViewAndComponent("styleUrls",e)}return null},e.prototype._throwMixingViewAndComponent=function(e,t){throw new u.BaseException("Component '"+c.stringify(t)+"' cannot have both '"+e+"' and '@View' set at the same time\"")},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.ViewResolver=h},function(e,t,n){function r(e){return e instanceof u.PipeMetadata}var i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(5),c=n(14),u=n(3),p=n(16),l=function(){function e(){}return e.prototype.resolve=function(e){var t=p.reflector.annotations(s.resolveForwardRef(e));if(a.isPresent(t)){var n=t.find(r);if(a.isPresent(n))return n}throw new c.BaseException("No Pipe decorator found on "+a.stringify(e))},e=i([s.Injectable(),o("design:paramtypes",[])],e)}();t.PipeResolver=l},function(e,t,n){var r=n(6),i=n(5);t.PLATFORM_DIRECTIVES=i.CONST_EXPR(new r.OpaqueToken("Platform Directives")),t.PLATFORM_PIPES=i.CONST_EXPR(new r.OpaqueToken("Platform Pipes"))},function(e,t,n){function r(e,t,n){void 0===n&&(n=null);for(var r=0;ro?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=n(5),c=n(14),u=n(72),p=(n(3),n(3));t.ViewEncapsulation=p.ViewEncapsulation;var l=function(){function e(e){this.template=e}return e=o([a.CONST(),s("design:paramtypes",[h])],e)}();t.CompiledHostTemplate=l;var h=function(){function e(e,t,n,r){this.id=e,this.changeDetectorFactory=t,this.commands=n,this.styles=r}return e=o([a.CONST(),s("design:paramtypes",[String,Function,Array,Array])],e)}();t.CompiledComponentTemplate=h;var f=a.CONST_EXPR([]),d=function(){function e(e,t,n){this.value=e,this.isBound=t,this.ngContentIndex=n}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e=o([a.CONST(),s("design:paramtypes",[String,Boolean,Number])],e)}();t.TextCmd=d;var y=function(){function e(e,t){this.index=e,this.ngContentIndex=t,this.isBound=!1}return e.prototype.visit=function(e,t){return e.visitNgContent(this,t)},e=o([a.CONST(),s("design:paramtypes",[Number,Number])],e)}();t.NgContentCmd=y;var v=function(e){function t(){e.apply(this,arguments)}return i(t,e),Object.defineProperty(t.prototype,"variableNameAndValues",{get:function(){return c.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"eventTargetAndNames",{get:function(){return c.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"directives",{get:function(){return c.unimplemented()},enumerable:!0,configurable:!0}),t}(u.RenderBeginElementCmd);t.IBeginElementCmd=v;var m=function(){function e(e,t,n,r,i,o,s){this.name=e,this.attrNameAndValues=t,this.eventTargetAndNames=n,this.variableNameAndValues=r,this.directives=i,this.isBound=o,this.ngContentIndex=s}return e.prototype.visit=function(e,t){return e.visitBeginElement(this,t)},e=o([a.CONST(),s("design:paramtypes",[String,Array,Array,Array,Array,Boolean,Number])],e)}();t.BeginElementCmd=m;var g=function(){function e(){}return e.prototype.visit=function(e,t){return e.visitEndElement(t)},e=o([a.CONST(),s("design:paramtypes",[])],e)}();t.EndElementCmd=g;var _=function(){function e(e,t,n,r,i,o,s,a){this.name=e,this.attrNameAndValues=t,this.eventTargetAndNames=n,this.variableNameAndValues=r,this.directives=i,this.encapsulation=o,this.ngContentIndex=s,this.templateGetter=a,this.isBound=!0}return Object.defineProperty(e.prototype,"templateId",{get:function(){return this.templateGetter().id},enumerable:!0,configurable:!0}),e.prototype.visit=function(e,t){return e.visitBeginComponent(this,t)},e=o([a.CONST(),s("design:paramtypes",[String,Array,Array,Array,Array,Number,Number,Function])],e)}();t.BeginComponentCmd=_;var b=function(){function e(){}return e.prototype.visit=function(e,t){return e.visitEndComponent(t)},e=o([a.CONST(),s("design:paramtypes",[])],e)}();t.EndComponentCmd=b;var C=function(){function e(e,t,n,r,i,o,s){this.attrNameAndValues=e,this.variableNameAndValues=t,this.directives=n,this.isMerged=r,this.ngContentIndex=i,this.changeDetectorFactory=o,this.children=s,this.isBound=!0,this.name=null,this.eventTargetAndNames=f}return e.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},e=o([a.CONST(),s("design:paramtypes",[Array,Array,Array,Boolean,Number,Function,Array])],e)}();t.EmbeddedTemplateCmd=C,t.visitAllCommands=r},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(5),a=function(){function e(){}return e.prototype.log=function(e){s.print(e)},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.Console=a},function(e,t,n){var r=n(66);t.NgZone=r.NgZone,t.NgZoneError=r.NgZoneError},function(e,t,n){var r=n(72);t.Renderer=r.Renderer,t.RenderViewRef=r.RenderViewRef,t.RenderProtoViewRef=r.RenderProtoViewRef,t.RenderFragmentRef=r.RenderFragmentRef,t.RenderViewWithFragments=r.RenderViewWithFragments,t.RenderTemplateCmd=r.RenderTemplateCmd,t.RenderTextCmd=r.RenderTextCmd,t.RenderNgContentCmd=r.RenderNgContentCmd,t.RenderBeginElementCmd=r.RenderBeginElementCmd,t.RenderBeginComponentCmd=r.RenderBeginComponentCmd,t.RenderEmbeddedTemplateCmd=r.RenderEmbeddedTemplateCmd,t.RenderBeginCmd=r.RenderBeginCmd,t.RenderComponentTemplate=r.RenderComponentTemplate},function(e,t,n){var r=n(92);t.DirectiveResolver=r.DirectiveResolver;var i=n(93);t.ViewResolver=i.ViewResolver;var o=n(70);t.Compiler=o.Compiler;var s=n(81);t.AppViewManager=s.AppViewManager;var a=n(90);t.QueryList=a.QueryList;var c=n(69);t.DynamicComponentLoader=c.DynamicComponentLoader;var u=n(83);t.ElementRef=u.ElementRef;var p=n(84);t.TemplateRef=p.TemplateRef;var l=n(77);t.ViewRef=l.ViewRef,t.ProtoViewRef=l.ProtoViewRef;var h=n(87);t.ViewContainerRef=h.ViewContainerRef;var f=n(69);t.ComponentRef=f.ComponentRef},function(e,t,n){function r(e){return new l(u.internalView(e.parentView),e.boundElementIndex)}function i(e){return e.map(function(e){return e.nativeElement})}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=n(5),a=n(14),c=n(76),u=n(77),p=function(){function e(){}return Object.defineProperty(e.prototype,"componentInstance",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nativeElement",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"elementRef",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"children",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentViewChildren",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),e.prototype.query=function(e,t){void 0===t&&(t=h.all);var n=this.queryAll(e,t);return n.length>0?n[0]:null},e.prototype.queryAll=function(e,t){void 0===t&&(t=h.all);var n=t(this);return n.filter(e)},e}();t.DebugElement=p;var l=function(e){function t(t,n){e.call(this),this._parentView=t,this._boundElementIndex=n,this._elementInjector=this._parentView.elementInjectors[this._boundElementIndex]}return o(t,e),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return s.isPresent(this._elementInjector)?this._elementInjector.getComponent():null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nativeElement",{get:function(){return this.elementRef.nativeElement},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"elementRef",{get:function(){return this._parentView.elementRefs[this._boundElementIndex]},enumerable:!0,configurable:!0}),t.prototype.getDirectiveInstance=function(e){return this._elementInjector.getDirectiveAtIndex(e)},Object.defineProperty(t.prototype,"children",{get:function(){return this._getChildElements(this._parentView,this._boundElementIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentViewChildren",{get:function(){var e=this._parentView.getNestedView(this._boundElementIndex);return s.isPresent(e)&&e.proto.type===c.ViewType.COMPONENT?this._getChildElements(e,null):[]},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this._parentView.triggerEventHandlers(e,t,this._boundElementIndex)},t.prototype.hasDirective=function(e){return s.isPresent(this._elementInjector)?this._elementInjector.hasDirective(e):!1},t.prototype.inject=function(e){return s.isPresent(this._elementInjector)?this._elementInjector.get(e):null},t.prototype.getLocal=function(e){return this._parentView.locals.get(e)},t.prototype._getChildElements=function(e,n){var r=this,i=[],o=null;s.isPresent(n)&&(o=e.proto.elementBinders[n-e.elementOffset]);for(var a=0;ao?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(60),a=n(2),c=n(107),u=function(){function e(){}return e.prototype.createSubscription=function(e,t){return s.ObservableWrapper.subscribe(e,t,function(e){throw e})},e.prototype.dispose=function(e){s.ObservableWrapper.dispose(e)},e.prototype.onDestroy=function(e){s.ObservableWrapper.dispose(e)},e}(),p=function(){function e(){}return e.prototype.createSubscription=function(e,t){return e.then(t)},e.prototype.dispose=function(e){},e.prototype.onDestroy=function(e){},e}(),l=new p,h=new u,f=function(){function e(e){this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=e}return e.prototype.ngOnDestroy=function(){o.isPresent(this._subscription)&&this._dispose()},e.prototype.transform=function(e,t){return o.isBlank(this._obj)?(o.isPresent(e)&&this._subscribe(e),this._latestValue):e!==this._obj?(this._dispose(),this.transform(e)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,a.WrappedValue.wrap(this._latestValue))},e.prototype._subscribe=function(e){var t=this;this._obj=e,this._strategy=this._selectStrategy(e),this._subscription=this._strategy.createSubscription(e,function(n){return t._updateLatestValue(e,n)})},e.prototype._selectStrategy=function(t){if(o.isPromise(t))return l;if(s.ObservableWrapper.isObservable(t))return h;throw new c.InvalidPipeArgumentException(e,t)},e.prototype._dispose=function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null},e.prototype._updateLatestValue=function(e,t){e===this._obj&&(this._latestValue=t,this._ref.markForCheck())},e=r([a.Pipe({name:"async",pure:!1}),a.Injectable(),i("design:paramtypes",[a.ChangeDetectorRef])],e)}();t.AsyncPipe=f},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(5),o=n(14),s=function(e){function t(t,n){e.call(this,"Invalid argument '"+n+"' for pipe '"+i.stringify(t)+"'")}return r(t,e),t}(o.BaseException);t.InvalidPipeArgumentException=s},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(2),a=n(107),c=function(){function e(){}return e.prototype.transform=function(t,n){if(void 0===n&&(n=null),o.isBlank(t))return t;if(!o.isString(t))throw new a.InvalidPipeArgumentException(e,t);return t.toUpperCase()},e=r([o.CONST(),s.Pipe({name:"uppercase"}),s.Injectable(),i("design:paramtypes",[])],e)}();t.UpperCasePipe=c},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(2),a=n(107),c=function(){function e(){}return e.prototype.transform=function(t,n){if(void 0===n&&(n=null),o.isBlank(t))return t;if(!o.isString(t))throw new a.InvalidPipeArgumentException(e,t);return t.toLowerCase()},e=r([o.CONST(),s.Pipe({name:"lowercase"}),s.Injectable(),i("design:paramtypes",[])],e)}();t.LowerCasePipe=c},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(2),a=function(){function e(){}return e.prototype.transform=function(e,t){return void 0===t&&(t=null),o.Json.stringify(e)},e=r([o.CONST(),s.Pipe({name:"json",pure:!1}),s.Injectable(),i("design:paramtypes",[])],e)}();t.JsonPipe=a},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(14),a=n(12),c=n(2),u=n(107),p=function(){function e(){}return e.prototype.transform=function(t,n){if(void 0===n&&(n=null),o.isBlank(n)||0==n.length)throw new s.BaseException("Slice pipe requires one argument");if(!this.supports(t))throw new u.InvalidPipeArgumentException(e,t);if(o.isBlank(t))return t;var r=n[0],i=n.length>1?n[1]:null;return o.isString(t)?o.StringWrapper.slice(t,r,i):a.ListWrapper.slice(t,r,i)},e.prototype.supports=function(e){return o.isString(e)||o.isArray(e)},e=r([c.Pipe({name:"slice",pure:!1}),c.Injectable(),i("design:paramtypes",[])],e)}();t.SlicePipe=p},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(113),a=n(2),c=n(12),u=n(107),p="en-US",l=function(){function e(){}return e.prototype.transform=function(t,n){if(o.isBlank(t))return null;if(!this.supports(t))throw new u.InvalidPipeArgumentException(e,t);var r=o.isPresent(n)&&n.length>0?n[0]:"mediumDate";return o.isNumber(t)&&(t=o.DateWrapper.fromMillis(t)),c.StringMapWrapper.contains(e._ALIASES,r)&&(r=c.StringMapWrapper.get(e._ALIASES,r)),s.DateFormatter.format(t,p,r)},e.prototype.supports=function(e){return o.isDate(e)||o.isNumber(e)},e._ALIASES={medium:"yMMMdjms","short":"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},e=r([o.CONST(),a.Pipe({name:"date",pure:!0}),a.Injectable(),i("design:paramtypes",[])],e)}();t.DatePipe=l},function(e,t){function n(e){return 2==e?"2-digit":"numeric"}function r(e){return 4>e?"short":"long"}function i(e){for(var t,i={},o=0;o=3?i.month=r(s):i.month=n(s);break;case"d":i.day=n(s);break;case"E":i.weekday=r(s);break;case"j":i.hour=n(s);break;case"h":i.hour=n(s),i.hour12=!0;break;case"H":i.hour=n(s),i.hour12=!1;break;case"m":i.minute=n(s);break;case"s":i.second=n(s);break;case"z":i.timeZoneName="long";break;case"Z":i.timeZoneName="short"}o=t}return i}!function(e){e[e.Decimal=0]="Decimal",e[e.Percent=1]="Percent",e[e.Currency=2]="Currency"}(t.NumberFormatStyle||(t.NumberFormatStyle={}));var o=t.NumberFormatStyle,s=function(){function e(){}return e.format=function(e,t,n,r){var i=void 0===r?{}:r,s=i.minimumIntegerDigits,a=void 0===s?1:s,c=i.minimumFractionDigits,u=void 0===c?0:c,p=i.maximumFractionDigits,l=void 0===p?3:p,h=i.currency,f=i.currencyAsSymbol,d=void 0===f?!1:f,y={minimumIntegerDigits:a,minimumFractionDigits:u,maximumFractionDigits:l};return y.style=o[n].toLowerCase(),n==o.Currency&&(y.currency=h,y.currencyDisplay=d?"symbol":"code"),new Intl.NumberFormat(t,y).format(e)},e}();t.NumberFormatter=s;var a=new Map,c=function(){function e(){}return e.format=function(e,t,n){var r=t+n;if(a.has(r))return a.get(r).format(e);var o=new Intl.DateTimeFormat(t,i(n));return a.set(r,o),o.format(e)},e}();t.DateFormatter=c},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(14),c=n(113),u=n(2),p=n(12),l=n(107),h="en-US",f=s.RegExpWrapper.create("^(\\d+)?\\.((\\d+)(\\-(\\d+))?)?$"),d=function(){function e(){}return e._format=function(t,n,r,i,o){if(void 0===i&&(i=null),void 0===o&&(o=!1),s.isBlank(t))return null;if(!s.isNumber(t))throw new l.InvalidPipeArgumentException(e,t);var u=1,p=0,d=3;if(s.isPresent(r)){var y=s.RegExpWrapper.firstMatch(f,r);if(s.isBlank(y))throw new a.BaseException(r+" is not a valid digit info for number pipes");s.isPresent(y[1])&&(u=s.NumberWrapper.parseIntAutoRadix(y[1])),s.isPresent(y[3])&&(p=s.NumberWrapper.parseIntAutoRadix(y[3])),s.isPresent(y[5])&&(d=s.NumberWrapper.parseIntAutoRadix(y[5]))}return c.NumberFormatter.format(t,h,n,{minimumIntegerDigits:u,minimumFractionDigits:p,maximumFractionDigits:d,currency:i,currencyAsSymbol:o})},e=i([s.CONST(),u.Injectable(),o("design:paramtypes",[])],e)}();t.NumberPipe=d;var y=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.transform=function(e,t){var n=p.ListWrapper.first(t);return d._format(e,c.NumberFormatStyle.Decimal,n)},t=i([s.CONST(),u.Pipe({name:"number"}),u.Injectable(),o("design:paramtypes",[])],t)}(d);t.DecimalPipe=y;var v=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.transform=function(e,t){var n=p.ListWrapper.first(t);return d._format(e,c.NumberFormatStyle.Percent,n)},t=i([s.CONST(),u.Pipe({name:"percent"}),u.Injectable(),o("design:paramtypes",[])],t)}(d);t.PercentPipe=v;var m=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.transform=function(e,t){var n=s.isPresent(t)&&t.length>0?t[0]:"USD",r=s.isPresent(t)&&t.length>1?t[1]:!1,i=s.isPresent(t)&&t.length>2?t[2]:null;return d._format(e,c.NumberFormatStyle.Currency,i,n,r)},t=i([s.CONST(),u.Pipe({name:"currency"}),u.Injectable(),o("design:paramtypes",[])],t)}(d);t.CurrencyPipe=m},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(116);t.NgClass=i.NgClass;var o=n(117);t.NgFor=o.NgFor;var s=n(118);t.NgIf=s.NgIf;var a=n(119);t.NgStyle=a.NgStyle;var c=n(120);t.NgSwitch=c.NgSwitch,t.NgSwitchWhen=c.NgSwitchWhen,t.NgSwitchDefault=c.NgSwitchDefault,r(n(121));var u=n(122);t.CORE_DIRECTIVES=u.CORE_DIRECTIVES},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=n(2),a=n(12),c=function(){function e(e,t,n,r){this._iterableDiffers=e,this._keyValueDiffers=t,this._ngEl=n,this._renderer=r,this._initialClasses=[]}return Object.defineProperty(e.prototype,"initialClasses",{set:function(e){this._applyInitialClasses(!0),this._initialClasses=o.isPresent(e)&&o.isString(e)?e.split(" "):[],this._applyInitialClasses(!1),this._applyClasses(this._rawClass,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawClass",{set:function(e){this._cleanupClasses(this._rawClass),o.isString(e)&&(e=e.split(" ")),this._rawClass=e,o.isPresent(e)?a.isListLikeIterable(e)?(this._differ=this._iterableDiffers.find(e).create(null),this._mode="iterable"):(this._differ=this._keyValueDiffers.find(e).create(null),this._mode="keyValue"):this._differ=null},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(o.isPresent(this._differ)){var e=this._differ.diff(this._rawClass);o.isPresent(e)&&("iterable"==this._mode?this._applyIterableChanges(e):this._applyKeyValueChanges(e))}},e.prototype.ngOnDestroy=function(){this._cleanupClasses(this._rawClass)},e.prototype._cleanupClasses=function(e){this._applyClasses(e,!0),this._applyInitialClasses(!1)},e.prototype._applyKeyValueChanges=function(e){var t=this;e.forEachAddedItem(function(e){t._toggleClass(e.key,e.currentValue)}),e.forEachChangedItem(function(e){t._toggleClass(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){e.previousValue&&t._toggleClass(e.key,!1)})},e.prototype._applyIterableChanges=function(e){ -var t=this;e.forEachAddedItem(function(e){t._toggleClass(e.item,!0)}),e.forEachRemovedItem(function(e){t._toggleClass(e.item,!1)})},e.prototype._applyInitialClasses=function(e){var t=this;this._initialClasses.forEach(function(n){return t._toggleClass(n,!e)})},e.prototype._applyClasses=function(e,t){var n=this;o.isPresent(e)&&(o.isArray(e)?e.forEach(function(e){return n._toggleClass(e,!t)}):e instanceof Set?e.forEach(function(e){return n._toggleClass(e,!t)}):a.StringMapWrapper.forEach(e,function(e,r){e&&n._toggleClass(r,!t)}))},e.prototype._toggleClass=function(e,t){if(e=e.trim(),e.length>0)if(e.indexOf(" ")>-1)for(var n=e.split(/\s+/g),r=0,i=n.length;i>r;r++)this._renderer.setElementClass(this._ngEl,n[r],t);else this._renderer.setElementClass(this._ngEl,e,t)},e=r([s.Directive({selector:"[ngClass]",inputs:["rawClass: ngClass","initialClasses: class"]}),i("design:paramtypes",[s.IterableDiffers,s.KeyValueDiffers,s.ElementRef,s.Renderer])],e)}();t.NgClass=c},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(5),a=function(){function e(e,t,n,r){this._viewContainer=e,this._templateRef=t,this._iterableDiffers=n,this._cdr=r}return Object.defineProperty(e.prototype,"ngForOf",{set:function(e){this._ngForOf=e,s.isBlank(this._differ)&&s.isPresent(e)&&(this._differ=this._iterableDiffers.find(e).create(this._cdr))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTemplate",{set:function(e){s.isPresent(e)&&(this._templateRef=e)},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(s.isPresent(this._differ)){var e=this._differ.diff(this._ngForOf);s.isPresent(e)&&this._applyChanges(e)}},e.prototype._applyChanges=function(e){var t=[];e.forEachRemovedItem(function(e){return t.push(new c(e,null))}),e.forEachMovedItem(function(e){return t.push(new c(e,null))});var n=this._bulkRemove(t);e.forEachAddedItem(function(e){return n.push(new c(e,null))}),this._bulkInsert(n);for(var r=0;rr;r++)this._viewContainer.get(r).setLocal("last",r===i-1)},e.prototype._perViewChange=function(e,t){e.setLocal("$implicit",t.item),e.setLocal("index",t.currentIndex),e.setLocal("even",t.currentIndex%2==0),e.setLocal("odd",t.currentIndex%2==1)},e.prototype._bulkRemove=function(e){e.sort(function(e,t){return e.record.previousIndex-t.record.previousIndex});for(var t=[],n=e.length-1;n>=0;n--){var r=e[n];s.isPresent(r.record.currentIndex)?(r.view=this._viewContainer.detach(r.record.previousIndex),t.push(r)):this._viewContainer.remove(r.record.previousIndex)}return t},e.prototype._bulkInsert=function(e){e.sort(function(e,t){return e.record.currentIndex-t.record.currentIndex});for(var t=0;to?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(5),a=function(){function e(e,t){this._viewContainer=e,this._templateRef=t,this._prevCondition=null}return Object.defineProperty(e.prototype,"ngIf",{set:function(e){!e||!s.isBlank(this._prevCondition)&&this._prevCondition?e||!s.isBlank(this._prevCondition)&&!this._prevCondition||(this._prevCondition=!1,this._viewContainer.clear()):(this._prevCondition=!0,this._viewContainer.createEmbeddedView(this._templateRef))},enumerable:!0,configurable:!0}),e=r([o.Directive({selector:"[ngIf]",inputs:["ngIf"]}),i("design:paramtypes",[o.ViewContainerRef,o.TemplateRef])],e)}();t.NgIf=a},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(5),a=function(){function e(e,t,n){this._differs=e,this._ngEl=t,this._renderer=n}return Object.defineProperty(e.prototype,"rawStyle",{set:function(e){this._rawStyle=e,s.isBlank(this._differ)&&s.isPresent(e)&&(this._differ=this._differs.find(this._rawStyle).create(null))},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(s.isPresent(this._differ)){var e=this._differ.diff(this._rawStyle);s.isPresent(e)&&this._applyChanges(e)}},e.prototype._applyChanges=function(e){var t=this;e.forEachAddedItem(function(e){t._setStyle(e.key,e.currentValue)}),e.forEachChangedItem(function(e){t._setStyle(e.key,e.currentValue)}),e.forEachRemovedItem(function(e){t._setStyle(e.key,null)})},e.prototype._setStyle=function(e,t){this._renderer.setElementStyle(this._ngEl,e,t)},e=r([o.Directive({selector:"[ngStyle]",inputs:["rawStyle: ngStyle"]}),i("design:paramtypes",[o.KeyValueDiffers,o.ElementRef,o.Renderer])],e)}();t.NgStyle=a},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(2),a=n(5),c=n(12),u=a.CONST_EXPR(new Object),p=function(){function e(e,t){this._viewContainerRef=e,this._templateRef=t}return e.prototype.create=function(){this._viewContainerRef.createEmbeddedView(this._templateRef)},e.prototype.destroy=function(){this._viewContainerRef.clear()},e}(),l=function(){function e(){this._useDefault=!1,this._valueViews=new c.Map,this._activeViews=[]}return Object.defineProperty(e.prototype,"ngSwitch",{set:function(e){this._emptyAllActiveViews(),this._useDefault=!1;var t=this._valueViews.get(e);a.isBlank(t)&&(this._useDefault=!0,t=a.normalizeBlank(this._valueViews.get(u))),this._activateViews(t),this._switchValue=e},enumerable:!0,configurable:!0}),e.prototype._onWhenValueChanged=function(e,t,n){this._deregisterView(e,n),this._registerView(t,n),e===this._switchValue?(n.destroy(),c.ListWrapper.remove(this._activeViews,n)):t===this._switchValue&&(this._useDefault&&(this._useDefault=!1,this._emptyAllActiveViews()),n.create(),this._activeViews.push(n)),0!==this._activeViews.length||this._useDefault||(this._useDefault=!0,this._activateViews(this._valueViews.get(u)))},e.prototype._emptyAllActiveViews=function(){for(var e=this._activeViews,t=0;to?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(5),c=n(60),u=n(2),p=n(126),l=n(128),h=n(129),f=n(130),d=n(131),y=a.CONST_EXPR(new u.Provider(l.NgControl,{useExisting:u.forwardRef(function(){return v})})),v=function(e){function t(t,n,r,i){e.call(this),this._parent=t,this._validators=n,this._asyncValidators=r,this.update=new c.EventEmitter,this._added=!1,this.valueAccessor=f.selectValueAccessor(this,i)}return r(t,e),t.prototype.ngOnChanges=function(e){this._added||(this.formDirective.addControl(this),this._added=!0),f.isPropertyUpdated(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},t.prototype.ngOnDestroy=function(){this.formDirective.removeControl(this)},t.prototype.viewToModelUpdate=function(e){this.viewModel=e,c.ObservableWrapper.callEmit(this.update,e)},Object.defineProperty(t.prototype,"path",{get:function(){return f.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return f.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return f.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.formDirective.getControl(this)},enumerable:!0,configurable:!0}),t=i([u.Directive({selector:"[ngControl]",bindings:[y],inputs:["name: ngControl","model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),s(0,u.Host()),s(0,u.SkipSelf()),s(1,u.Optional()),s(1,u.Self()),s(1,u.Inject(d.NG_VALIDATORS)),s(2,u.Optional()),s(2,u.Self()),s(2,u.Inject(d.NG_ASYNC_VALIDATORS)),s(3,u.Optional()),s(3,u.Self()),s(3,u.Inject(h.NG_VALUE_ACCESSOR)),o("design:paramtypes",[p.ControlContainer,Array,Array,Array])],t)}(l.NgControl);t.NgControlName=v},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(125),o=n(14),s=function(e){function t(){e.apply(this,arguments),this.name=null,this.valueAccessor=null}return r(t,e),Object.defineProperty(t.prototype,"validator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),t}(i.AbstractControlDirective);t.NgControl=s},function(e,t,n){var r=n(2),i=n(5);t.NG_VALUE_ACCESSOR=i.CONST_EXPR(new r.OpaqueToken("NgValueAccessor"))},function(e,t,n){function r(e,t){var n=l.ListWrapper.clone(t.path);return n.push(e),n}function i(e,t){h.isBlank(e)&&s(t,"Cannot find control"),h.isBlank(t.valueAccessor)&&s(t,"No value accessor for"),e.validator=d.Validators.compose([e.validator,t.validator]),e.asyncValidator=d.Validators.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),t.valueAccessor.registerOnChange(function(n){t.viewToModelUpdate(n),e.updateValue(n,{emitModelToViewChange:!1}),e.markAsDirty()}),e.registerOnChange(function(e){return t.valueAccessor.writeValue(e)}),t.valueAccessor.registerOnTouched(function(){return e.markAsTouched()})}function o(e,t){h.isBlank(e)&&s(t,"Cannot find control"),e.validator=d.Validators.compose([e.validator,t.validator]),e.asyncValidator=d.Validators.composeAsync([e.asyncValidator,t.asyncValidator])}function s(e,t){var n=e.path.join(" -> ");throw new f.BaseException(t+" '"+n+"'")}function a(e){return h.isPresent(e)?d.Validators.compose(e.map(_.normalizeValidator)):null}function c(e){return h.isPresent(e)?d.Validators.composeAsync(e.map(_.normalizeValidator)):null}function u(e,t){if(!l.StringMapWrapper.contains(e,"model"))return!1;var n=e.model;return n.isFirstChange()?!0:!h.looseIdentical(t,n.currentValue)}function p(e,t){if(h.isBlank(t))return null;var n,r,i;return t.forEach(function(t){t instanceof y.DefaultValueAccessor?n=t:t instanceof m.CheckboxControlValueAccessor||t instanceof v.NumberValueAccessor||t instanceof g.SelectControlValueAccessor?(h.isPresent(r)&&s(e,"More than one built-in value accessor matches"),r=t):(h.isPresent(i)&&s(e,"More than one custom value accessor matches"),i=t)}),h.isPresent(i)?i:h.isPresent(r)?r:h.isPresent(n)?n:(s(e,"No valid value accessor for"),null)}var l=n(12),h=n(5),f=n(14),d=n(131),y=n(132),v=n(133),m=n(134),g=n(135),_=n(136);t.controlPath=r,t.setUpControl=i,t.setUpControlGroup=o,t.composeValidators=a,t.composeAsyncValidators=c,t.isPropertyUpdated=u,t.selectValueAccessor=p},function(e,t,n){function r(e){return a.PromiseWrapper.isPromise(e)?e:c.ObservableWrapper.toPromise(e)}function i(e,t){return t.map(function(t){return t(e)})}function o(e){var t=e.reduce(function(e,t){return s.isPresent(t)?u.StringMapWrapper.merge(e,t):e},{});return u.StringMapWrapper.isEmpty(t)?null:t}var s=n(5),a=n(61),c=n(60),u=n(12),p=n(2);t.NG_VALIDATORS=s.CONST_EXPR(new p.OpaqueToken("NgValidators")),t.NG_ASYNC_VALIDATORS=s.CONST_EXPR(new p.OpaqueToken("NgAsyncValidators"));var l=function(){function e(){}return e.required=function(e){return s.isBlank(e.value)||""==e.value?{required:!0}:null},e.minLength=function(t){return function(n){if(s.isPresent(e.required(n)))return null;var r=n.value;return r.lengtht?{maxlength:{requiredLength:t,actualLength:r.length}}:null}},e.nullValidator=function(e){return null},e.compose=function(e){if(s.isBlank(e))return null;var t=e.filter(s.isPresent);return 0==t.length?null:function(e){return o(i(e,t))}},e.composeAsync=function(e){if(s.isBlank(e))return null;var t=e.filter(s.isPresent);return 0==t.length?null:function(e){var n=i(e,t).map(r);return a.PromiseWrapper.all(n).then(o)}},e}();t.Validators=l},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(129),a=n(5),c=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return u}),multi:!0})),u=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){var t=a.isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef,"value",t)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=r([o.Directive({selector:"input:not([type=checkbox])[ngControl],textarea[ngControl],input:not([type=checkbox])[ngFormControl],textarea[ngFormControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[c]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],e)}();t.DefaultValueAccessor=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(129),a=n(5),c=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return u}),multi:!0})),u=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setElementProperty(this._elementRef,"value",e)},e.prototype.registerOnChange=function(e){this.onChange=function(t){e(a.NumberWrapper.parseFloat(t))}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=r([o.Directive({selector:"input[type=number][ngControl],input[type=number][ngFormControl],input[type=number][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[c]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],e)}();t.NumberValueAccessor=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(129),a=n(5),c=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return u}),multi:!0})),u=function(){function e(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this._renderer.setElementProperty(this._elementRef,"checked",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e=r([o.Directive({selector:"input[type=checkbox][ngControl],input[type=checkbox][ngFormControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},bindings:[c]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],e)}();t.CheckboxControlValueAccessor=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0; -},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(2),a=n(60),c=n(129),u=n(5),p=u.CONST_EXPR(new s.Provider(c.NG_VALUE_ACCESSOR,{useExisting:s.forwardRef(function(){return h}),multi:!0})),l=function(){function e(){}return e=r([s.Directive({selector:"option"}),i("design:paramtypes",[])],e)}();t.NgSelectOption=l;var h=function(){function e(e,t,n){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){},this._updateValueWhenListOfOptionsChanges(n)}return e.prototype.writeValue=function(e){this.value=e,this._renderer.setElementProperty(this._elementRef,"value",e)},e.prototype.registerOnChange=function(e){this.onChange=e},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype._updateValueWhenListOfOptionsChanges=function(e){var t=this;a.ObservableWrapper.subscribe(e.changes,function(e){return t.writeValue(t.value)})},e=r([s.Directive({selector:"select[ngControl],select[ngFormControl],select[ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[p]}),o(2,s.Query(l,{descendants:!0})),i("design:paramtypes",[s.Renderer,s.ElementRef,s.QueryList])],e)}();t.SelectControlValueAccessor=h},function(e,t){function n(e){return void 0!==e.validate?function(t){return e.validate(t)}:e}t.normalizeValidator=n},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(5),c=n(12),u=n(60),p=n(2),l=n(128),h=n(131),f=n(129),d=n(130),y=a.CONST_EXPR(new p.Provider(l.NgControl,{useExisting:p.forwardRef(function(){return v})})),v=function(e){function t(t,n,r){e.call(this),this._validators=t,this._asyncValidators=n,this.update=new u.EventEmitter,this.valueAccessor=d.selectValueAccessor(this,r)}return r(t,e),t.prototype.ngOnChanges=function(e){this._isControlChanged(e)&&(d.setUpControl(this.form,this),this.form.updateValueAndValidity({emitEvent:!1})),d.isPropertyUpdated(e,this.viewModel)&&(this.form.updateValue(this.model),this.viewModel=this.model)},Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return d.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return d.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),t.prototype.viewToModelUpdate=function(e){this.viewModel=e,u.ObservableWrapper.callEmit(this.update,e)},t.prototype._isControlChanged=function(e){return c.StringMapWrapper.contains(e,"form")},t=i([p.Directive({selector:"[ngFormControl]",bindings:[y],inputs:["form: ngFormControl","model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),s(0,p.Optional()),s(0,p.Self()),s(0,p.Inject(h.NG_VALIDATORS)),s(1,p.Optional()),s(1,p.Self()),s(1,p.Inject(h.NG_ASYNC_VALIDATORS)),s(2,p.Optional()),s(2,p.Self()),s(2,p.Inject(f.NG_VALUE_ACCESSOR)),o("design:paramtypes",[Array,Array,Array])],t)}(l.NgControl);t.NgFormControl=v},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(5),c=n(60),u=n(2),p=n(129),l=n(128),h=n(124),f=n(131),d=n(130),y=a.CONST_EXPR(new u.Provider(l.NgControl,{useExisting:u.forwardRef(function(){return v})})),v=function(e){function t(t,n,r){e.call(this),this._validators=t,this._asyncValidators=n,this._control=new h.Control,this._added=!1,this.update=new c.EventEmitter,this.valueAccessor=d.selectValueAccessor(this,r)}return r(t,e),t.prototype.ngOnChanges=function(e){this._added||(d.setUpControl(this._control,this),this._control.updateValueAndValidity({emitEvent:!1}),this._added=!0),d.isPropertyUpdated(e,this.viewModel)&&(this._control.updateValue(this.model),this.viewModel=this.model)},Object.defineProperty(t.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return d.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return d.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),t.prototype.viewToModelUpdate=function(e){this.viewModel=e,c.ObservableWrapper.callEmit(this.update,e)},t=i([u.Directive({selector:"[ngModel]:not([ngControl]):not([ngFormControl])",bindings:[y],inputs:["model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),s(0,u.Optional()),s(0,u.Self()),s(0,u.Inject(f.NG_VALIDATORS)),s(1,u.Optional()),s(1,u.Self()),s(1,u.Inject(f.NG_ASYNC_VALIDATORS)),s(2,u.Optional()),s(2,u.Self()),s(2,u.Inject(p.NG_VALUE_ACCESSOR)),o("design:paramtypes",[Array,Array,Array])],t)}(l.NgControl);t.NgModel=v},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(2),c=n(5),u=n(126),p=n(130),l=n(131),h=c.CONST_EXPR(new a.Provider(u.ControlContainer,{useExisting:a.forwardRef(function(){return f})})),f=function(e){function t(t,n,r){e.call(this),this._validators=n,this._asyncValidators=r,this._parent=t}return r(t,e),t.prototype.ngOnInit=function(){this.formDirective.addControlGroup(this)},t.prototype.ngOnDestroy=function(){this.formDirective.removeControlGroup(this)},Object.defineProperty(t.prototype,"control",{get:function(){return this.formDirective.getControlGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return p.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"validator",{get:function(){return p.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"asyncValidator",{get:function(){return p.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),t=i([a.Directive({selector:"[ngControlGroup]",providers:[h],inputs:["name: ngControlGroup"],exportAs:"ngForm"}),s(0,a.Host()),s(0,a.SkipSelf()),s(1,a.Optional()),s(1,a.Self()),s(1,a.Inject(l.NG_VALIDATORS)),s(2,a.Optional()),s(2,a.Self()),s(2,a.Inject(l.NG_ASYNC_VALIDATORS)),o("design:paramtypes",[u.ControlContainer,Array,Array])],t)}(u.ControlContainer);t.NgControlGroup=f},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(5),c=n(12),u=n(60),p=n(2),l=n(126),h=n(130),f=n(131),d=a.CONST_EXPR(new p.Provider(l.ControlContainer,{useExisting:p.forwardRef(function(){return y})})),y=function(e){function t(t,n){e.call(this),this._validators=t,this._asyncValidators=n,this.form=null,this.directives=[],this.ngSubmit=new u.EventEmitter}return r(t,e),t.prototype.ngOnChanges=function(e){if(c.StringMapWrapper.contains(e,"form")){var t=h.composeValidators(this._validators);this.form.validator=f.Validators.compose([this.form.validator,t]);var n=h.composeAsyncValidators(this._asyncValidators);this.form.asyncValidator=f.Validators.composeAsync([this.form.asyncValidator,n]),this.form.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}this._updateDomValue()},Object.defineProperty(t.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),t.prototype.addControl=function(e){var t=this.form.find(e.path);h.setUpControl(t,e),t.updateValueAndValidity({emitEvent:!1}),this.directives.push(e)},t.prototype.getControl=function(e){return this.form.find(e.path)},t.prototype.removeControl=function(e){c.ListWrapper.remove(this.directives,e)},t.prototype.addControlGroup=function(e){var t=this.form.find(e.path);h.setUpControlGroup(t,e),t.updateValueAndValidity({emitEvent:!1})},t.prototype.removeControlGroup=function(e){},t.prototype.getControlGroup=function(e){return this.form.find(e.path)},t.prototype.updateModel=function(e,t){var n=this.form.find(e.path);n.updateValue(t)},t.prototype.onSubmit=function(){return u.ObservableWrapper.callEmit(this.ngSubmit,null),!1},t.prototype._updateDomValue=function(){var e=this;this.directives.forEach(function(t){var n=e.form.find(t.path);t.valueAccessor.writeValue(n.value)})},t=i([p.Directive({selector:"[ngFormModel]",bindings:[d],inputs:["form: ngFormModel"],host:{"(submit)":"onSubmit()"},outputs:["ngSubmit"],exportAs:"ngForm"}),s(0,p.Optional()),s(0,p.Self()),s(0,p.Inject(f.NG_VALIDATORS)),s(1,p.Optional()),s(1,p.Self()),s(1,p.Inject(f.NG_ASYNC_VALIDATORS)),o("design:paramtypes",[Array,Array])],t)}(l.ControlContainer);t.NgFormModel=y},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(60),c=n(12),u=n(5),p=n(2),l=n(126),h=n(124),f=n(130),d=n(131),y=u.CONST_EXPR(new p.Provider(l.ControlContainer,{useExisting:p.forwardRef(function(){return v})})),v=function(e){function t(t,n){e.call(this),this.ngSubmit=new a.EventEmitter,this.form=new h.ControlGroup({},null,f.composeValidators(t),f.composeAsyncValidators(n))}return r(t,e),Object.defineProperty(t.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),t.prototype.addControl=function(e){var t=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=t._findContainer(e.path),r=new h.Control;f.setUpControl(r,e),n.addControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})},t.prototype.getControl=function(e){return this.form.find(e.path)},t.prototype.removeControl=function(e){var t=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=t._findContainer(e.path);u.isPresent(n)&&(n.removeControl(e.name),n.updateValueAndValidity({emitEvent:!1}))})},t.prototype.addControlGroup=function(e){var t=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=t._findContainer(e.path),r=new h.ControlGroup({});f.setUpControlGroup(r,e),n.addControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})},t.prototype.removeControlGroup=function(e){var t=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=t._findContainer(e.path);u.isPresent(n)&&(n.removeControl(e.name),n.updateValueAndValidity({emitEvent:!1}))})},t.prototype.getControlGroup=function(e){return this.form.find(e.path)},t.prototype.updateModel=function(e,t){var n=this;a.PromiseWrapper.scheduleMicrotask(function(){var r=n.form.find(e.path);r.updateValue(t)})},t.prototype.onSubmit=function(){return a.ObservableWrapper.callEmit(this.ngSubmit,null),!1},t.prototype._findContainer=function(e){return e.pop(),c.ListWrapper.isEmpty(e)?this.form:this.form.find(e)},t=i([p.Directive({selector:"form:not([ngNoForm]):not([ngFormModel]),ngForm,[ngForm]",bindings:[y],host:{"(submit)":"onSubmit()"},outputs:["ngSubmit"],exportAs:"ngForm"}),s(0,p.Optional()),s(0,p.Self()),s(0,p.Inject(d.NG_VALIDATORS)),s(1,p.Optional()),s(1,p.Self()),s(1,p.Inject(d.NG_ASYNC_VALIDATORS)),o("design:paramtypes",[Array,Array])],t)}(l.ControlContainer);t.NgForm=v},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(2),a=n(128),c=n(5),u=function(){function e(e){this._cd=e}return Object.defineProperty(e.prototype,"ngClassUntouched",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.untouched:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassTouched",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.touched:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassPristine",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.pristine:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassDirty",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.dirty:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassValid",{get:function(){return c.isPresent(this._cd.control)?this._cd.control.valid:!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngClassInvalid",{get:function(){return c.isPresent(this._cd.control)?!this._cd.control.valid:!1},enumerable:!0,configurable:!0}),e=r([s.Directive({selector:"[ngControl],[ngModel],[ngFormControl]",host:{"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid"}}),o(0,s.Self()),i("design:paramtypes",[a.NgControl])],e)}();t.NgControlStatus=u},function(e,t,n){var r=n(5),i=n(127),o=n(137),s=n(138),a=n(139),c=n(140),u=n(141),p=n(132),l=n(134),h=n(133),f=n(142),d=n(135),y=n(144),v=n(127);t.NgControlName=v.NgControlName;var m=n(137);t.NgFormControl=m.NgFormControl;var g=n(138);t.NgModel=g.NgModel;var _=n(139);t.NgControlGroup=_.NgControlGroup;var b=n(140);t.NgFormModel=b.NgFormModel;var C=n(141);t.NgForm=C.NgForm;var P=n(132);t.DefaultValueAccessor=P.DefaultValueAccessor;var w=n(134);t.CheckboxControlValueAccessor=w.CheckboxControlValueAccessor;var R=n(133);t.NumberValueAccessor=R.NumberValueAccessor;var E=n(142);t.NgControlStatus=E.NgControlStatus;var O=n(135);t.SelectControlValueAccessor=O.SelectControlValueAccessor,t.NgSelectOption=O.NgSelectOption;var S=n(144);t.RequiredValidator=S.RequiredValidator,t.MinLengthValidator=S.MinLengthValidator,t.MaxLengthValidator=S.MaxLengthValidator;var D=n(128);t.NgControl=D.NgControl,t.FORM_DIRECTIVES=r.CONST_EXPR([i.NgControlName,a.NgControlGroup,o.NgFormControl,s.NgModel,c.NgFormModel,u.NgForm,d.NgSelectOption,p.DefaultValueAccessor,h.NumberValueAccessor,l.CheckboxControlValueAccessor,d.SelectControlValueAccessor,f.NgControlStatus,y.RequiredValidator,y.MinLengthValidator,y.MaxLengthValidator])},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(2),a=n(5),c=n(131),u=n(5),p=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useValue:c.Validators.required,multi:!0})),l=function(){function e(){}return e=r([s.Directive({selector:"[required][ngControl],[required][ngFormControl],[required][ngModel]",providers:[p]}),i("design:paramtypes",[])],e)}();t.RequiredValidator=l;var h=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return f}),multi:!0})),f=function(){function e(e){this._validator=c.Validators.minLength(u.NumberWrapper.parseInt(e,10))}return e.prototype.validate=function(e){return this._validator(e)},e=r([s.Directive({selector:"[minlength][ngControl],[minlength][ngFormControl],[minlength][ngModel]",providers:[h]}),o(0,s.Attribute("minlength")),i("design:paramtypes",[String])],e)}();t.MinLengthValidator=f;var d=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return y}),multi:!0})),y=function(){function e(e){this._validator=c.Validators.maxLength(u.NumberWrapper.parseInt(e,10))}return e.prototype.validate=function(e){return this._validator(e)},e=r([s.Directive({selector:"[maxlength][ngControl],[maxlength][ngFormControl],[maxlength][ngModel]",providers:[d]}),o(0,s.Attribute("maxlength")),i("design:paramtypes",[String])],e)}();t.MaxLengthValidator=y},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(12),a=n(5),c=n(124),u=function(){function e(){}return e.prototype.group=function(e,t){void 0===t&&(t=null);var n=this._reduceControls(e),r=a.isPresent(t)?s.StringMapWrapper.get(t,"optionals"):null,i=a.isPresent(t)?s.StringMapWrapper.get(t,"validator"):null,o=a.isPresent(t)?s.StringMapWrapper.get(t,"asyncValidator"):null;return new c.ControlGroup(n,r,i,o)},e.prototype.control=function(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),new c.Control(e,t,n)},e.prototype.array=function(e,t,n){var r=this;void 0===t&&(t=null),void 0===n&&(n=null);var i=e.map(function(e){return r._createControl(e)});return new c.ControlArray(i,t,n)},e.prototype._reduceControls=function(e){var t=this,n={};return s.StringMapWrapper.forEach(e,function(e,r){n[r]=t._createControl(e)}),n},e.prototype._createControl=function(e){if(e instanceof c.Control||e instanceof c.ControlGroup||e instanceof c.ControlArray)return e;if(a.isArray(e)){var t=e[0],n=e.length>1?e[1]:null,r=e.length>2?e[2]:null;return this.control(t,n,r)}return this.control(e)},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.FormBuilder=u,t.FORM_PROVIDERS=a.CONST_EXPR([u]),t.FORM_BINDINGS=t.FORM_PROVIDERS},function(e,t,n){var r=n(5),i=n(123),o=n(115);t.COMMON_DIRECTIVES=r.CONST_EXPR([o.CORE_DIRECTIVES,i.FORM_DIRECTIVES])},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(148)),r(n(149)),r(n(150))},function(e,t,n){function r(){return new m}function i(e){var t=s(e);return t&&t[g.Scheme]||""}function o(e,t,n,r,i,o,s){var a=[];return d.isPresent(e)&&a.push(e+":"),d.isPresent(n)&&(a.push("//"),d.isPresent(t)&&a.push(t+"@"),a.push(n),d.isPresent(r)&&a.push(":"+r)),d.isPresent(i)&&a.push(i),d.isPresent(o)&&a.push("?"+o),d.isPresent(s)&&a.push("#"+s),a.join("")}function s(e){return d.RegExpWrapper.firstMatch(_,e)}function a(e){if("/"==e)return"/";for(var t="/"==e[0]?"/":"",n="/"===e[e.length-1]?"/":"",r=e.split("/"),i=[],o=0,s=0;s0?i.pop():o++;break;default:i.push(a)}}if(""==t){for(;o-->0;)i.unshift("..");0===i.length&&i.push(".")}return t+i.join("/")+n}function c(e){var t=e[g.Path];return t=d.isBlank(t)?"":a(t),e[g.Path]=t,o(e[g.Scheme],e[g.UserInfo],e[g.Domain],e[g.Port],t,e[g.QueryData],e[g.Fragment])}function u(e,t){var n=s(encodeURI(t)),r=s(e);if(d.isPresent(n[g.Scheme]))return c(n);n[g.Scheme]=r[g.Scheme];for(var i=g.Scheme;i<=g.Port;i++)d.isBlank(n[i])&&(n[i]=r[i]);if("/"==n[g.Path][0])return c(n);var o=r[g.Path];d.isBlank(o)&&(o="/");var a=o.lastIndexOf("/");return o=o.substring(0,a+1)+n[g.Path],n[g.Path]=o,c(n)}var p=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},l=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},h=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},f=n(6),d=n(5),y=n(67),v=n(6);t.createWithoutPackagePrefix=r,t.DEFAULT_PACKAGE_URL_PROVIDER=new v.Provider(y.PACKAGE_ROOT_URL,{useValue:"/"});var m=function(){function e(e){void 0===e&&(e=null),d.isPresent(e)&&(this._packagePrefix=d.StringWrapper.stripRight(e,"/")+"/")}return e.prototype.resolve=function(e,t){var n=t;return d.isPresent(e)&&e.length>0&&(n=u(e,n)),d.isPresent(this._packagePrefix)&&"package"==i(n)&&(n=n.replace("package:",this._packagePrefix)),n},e=p([f.Injectable(),h(0,f.Inject(y.PACKAGE_ROOT_URL)),l("design:paramtypes",[String])],e)}();t.UrlResolver=m,t.getUrlScheme=i;var g,_=d.RegExpWrapper.create("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");!function(e){e[e.Scheme=1]="Scheme",e[e.UserInfo=2]="UserInfo",e[e.Domain=3]="Domain",e[e.Port=4]="Port",e[e.Path=5]="Path",e[e.QueryData=6]="QueryData",e[e.Fragment=7]="Fragment"}(g||(g={}))},function(e,t){var n=function(){function e(){}return e.prototype.get=function(e){return null},e}();t.XHR=n},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function i(){return new C.ChangeDetectorGenConfig(l.assertionsEnabled(),!1,!0)}var o=n(151),s=n(152);t.TemplateCompiler=s.TemplateCompiler;var a=n(153);t.CompileDirectiveMetadata=a.CompileDirectiveMetadata,t.CompileTypeMetadata=a.CompileTypeMetadata,t.CompileTemplateMetadata=a.CompileTemplateMetadata;var c=n(156);t.SourceModule=c.SourceModule,t.SourceWithImports=c.SourceWithImports;var u=n(95);t.PLATFORM_DIRECTIVES=u.PLATFORM_DIRECTIVES,t.PLATFORM_PIPES=u.PLATFORM_PIPES,r(n(159));var p=n(167);t.TEMPLATE_TRANSFORMS=p.TEMPLATE_TRANSFORMS;var l=n(5),h=n(6),f=n(167),d=n(168),y=n(175),v=n(176),m=n(157),g=n(161),_=n(166),b=n(152),C=n(25),P=n(70),w=n(151),R=n(173),E=n(177),O=n(148),S=n(25);t.COMPILER_PROVIDERS=l.CONST_EXPR([S.Lexer,S.Parser,d.HtmlParser,f.TemplateParser,y.TemplateNormalizer,v.RuntimeMetadataResolver,O.DEFAULT_PACKAGE_URL_PROVIDER,g.StyleCompiler,_.CommandCompiler,m.ChangeDetectionCompiler,new h.Provider(C.ChangeDetectorGenConfig,{useFactory:i,deps:[]}),b.TemplateCompiler,new h.Provider(w.RuntimeCompiler,{useClass:o.RuntimeCompiler_}),new h.Provider(P.Compiler,{useExisting:w.RuntimeCompiler}),E.DomElementSchemaRegistry,new h.Provider(R.ElementSchemaRegistry,{useExisting:E.DomElementSchemaRegistry}),O.UrlResolver])},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(70),a=n(71),c=n(152),u=n(6),p=function(e){function t(){e.apply(this,arguments)}return r(t,e),t}(s.Compiler);t.RuntimeCompiler=p;var l=function(e){function t(t,n){e.call(this,t),this._templateCompiler=n}return r(t,e),t.prototype.compileInHost=function(e){var t=this;return this._templateCompiler.compileHostComponentRuntime(e).then(function(e){return s.internalCreateProtoView(t,e)})},t.prototype.clearCache=function(){e.prototype.clearCache.call(this),this._templateCompiler.clearCache()},t=i([u.Injectable(),o("design:paramtypes",[a.ProtoViewFactory,c.TemplateCompiler])],t)}(s.Compiler_);t.RuntimeCompiler_=l},function(e,t,n){function r(e){if(!e.isComponent)throw new f.BaseException("Could not compile '"+e.type.name+"' because it is not a component.")}function i(e){return e.name+"Template"}function o(e){return i(e)+"Getter"}function s(e){var t=e.substring(0,e.length-S.MODULE_SUFFIX.length);return t+".template"+S.MODULE_SUFFIX}function a(e,t){for(var n=0;n0;n||t.push(e)}),t}var p=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},l=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},h=n(5),f=n(14),d=n(12),y=n(60),v=n(96),m=n(153),g=n(6),_=n(156),b=n(157),C=n(161),P=n(166),w=n(167),R=n(175),E=n(176),O=n(166),S=n(155),D=function(){function e(e,t,n,r,i,o){this._runtimeMetadataResolver=e,this._templateNormalizer=t,this._templateParser=n,this._styleCompiler=r,this._commandCompiler=i,this._cdCompiler=o,this._hostCacheKeys=new Map,this._compiledTemplateCache=new Map,this._compiledTemplateDone=new Map,this._nextTemplateId=0}return e.prototype.normalizeDirectiveMetadata=function(e){return e.isComponent?this._templateNormalizer.normalizeTemplate(e.type,e.template).then(function(t){return new m.CompileDirectiveMetadata({type:e.type,isComponent:e.isComponent,dynamicLoadable:e.dynamicLoadable,selector:e.selector,exportAs:e.exportAs,changeDetection:e.changeDetection,inputs:e.inputs,outputs:e.outputs,hostListeners:e.hostListeners,hostProperties:e.hostProperties,hostAttributes:e.hostAttributes,lifecycleHooks:e.lifecycleHooks,template:t})}):y.PromiseWrapper.resolve(e)},e.prototype.compileHostComponentRuntime=function(e){var t=this._hostCacheKeys.get(e);if(h.isBlank(t)){t=new Object,this._hostCacheKeys.set(e,t);var n=this._runtimeMetadataResolver.getMetadata(e);r(n);var i=m.createHostComponentMeta(n.type,n.selector);this._compileComponentRuntime(t,i,[n],new Set)}return this._compiledTemplateDone.get(t).then(function(e){return new v.CompiledHostTemplate(e)})},e.prototype.clearCache=function(){this._hostCacheKeys.clear(),this._styleCompiler.clearCache(),this._compiledTemplateCache.clear(),this._compiledTemplateDone.clear()},e.prototype._compileComponentRuntime=function(e,t,n,r){var i=this,o=u(n),s=this._compiledTemplateCache.get(e),a=this._compiledTemplateDone.get(e);if(h.isBlank(s)){var c,p=[],l=[],f=h.stringify(t.type.runtime)+"Template"+this._nextTemplateId++;s=new v.CompiledComponentTemplate(f,function(e){return c(e)},l,p),this._compiledTemplateCache.set(e,s),r.add(e),a=y.PromiseWrapper.all([this._styleCompiler.compileComponentRuntime(t.template)].concat(o.map(function(e){return i.normalizeDirectiveMetadata(e)}))).then(function(e){var n=[],o=e.slice(1),s=i._templateParser.parse(t.template.template,o,t.type.name),a=i._cdCompiler.compileComponentRuntime(t.type,t.changeDetection,s);c=a[0];var u=e[0];u.forEach(function(e){return p.push(e)});var h=i._compileCommandsRuntime(t,s,a,r,n);return h.forEach(function(e){return l.push(e)}),y.PromiseWrapper.all(n)}).then(function(t){return d.SetWrapper["delete"](r,e),s}),this._compiledTemplateDone.set(e,a)}return s},e.prototype._compileCommandsRuntime=function(e,t,n,r,i){var o=this,s=this._commandCompiler.compileComponentRuntime(e,t,n,function(e){var t=e.type.runtime,n=o._runtimeMetadataResolver.getViewDirectivesMetadata(e.type.runtime),s=d.SetWrapper.has(r,t),a=o._compileComponentRuntime(t,e,n,r);return s||i.push(o._compiledTemplateDone.get(t)),function(){return a}});return s.forEach(function(e){e instanceof v.BeginComponentCmd&&e.templateGetter()}),s},e.prototype.compileTemplatesCodeGen=function(e){var t=this;if(0===e.length)throw new f.BaseException("No components given");var n=[],a=[],c=[];e.forEach(function(e){var i=e.component;if(r(i),c.push(i),t._processTemplateCodeGen(i,e.directives,n,a),i.dynamicLoadable){var o=m.createHostComponentMeta(i.type,i.selector);c.push(o),t._processTemplateCodeGen(o,[i],n,a)}}),d.ListWrapper.forEachWithIndex(c,function(e,t){var r,s=e.type.moduleUrl+"|"+e.type.name,c=h.IS_DART?"const":"new",u=c+" "+O.TEMPLATE_COMMANDS_MODULE_REF+"CompiledComponentTemplate('"+s+"',"+a[t].join(",")+")"; -r=e.type.isHost?c+" "+O.TEMPLATE_COMMANDS_MODULE_REF+"CompiledHostTemplate("+u+")":u;var p=i(e.type);n.push(""+S.codeGenExportVariable(p)+r+";"),n.push(S.codeGenValueFn([],p,o(e.type))+";")});var u=e[0].component.type.moduleUrl;return new _.SourceModule(""+s(u),n.join("\n"))},e.prototype.compileStylesheetCodeGen=function(e,t){return this._styleCompiler.compileStylesheetCodeGen(e,t)},e.prototype._processTemplateCodeGen=function(e,t,n,r){var i=u(t),o=this._styleCompiler.compileComponentCodeGen(e.template),s=this._templateParser.parse(e.template.template,i,e.type.name),p=this._cdCompiler.compileComponentCodeGen(e.type,e.changeDetection,s),l=this._commandCompiler.compileComponentCodeGen(e,s,p.expressions,c);a(o.declarations,n),a(p.declarations,n),a(l.declarations,n),r.push([p.expressions[0],l.expression,o.expression])},e=p([g.Injectable(),l("design:paramtypes",[E.RuntimeMetadataResolver,R.TemplateNormalizer,w.TemplateParser,C.StyleCompiler,P.CommandCompiler,b.ChangeDetectionCompiler])],e)}();t.TemplateCompiler=D;var T=function(){function e(e,t){this.component=e,this.directives=t}return e}();t.NormalizedComponentWithViewDirectives=T},function(e,t,n){function r(e,t){var n=c.CssSelector.parse(t)[0].getMatchingElementTemplate();return d.create({type:new h({runtime:Object,name:"Host"+e.name,moduleUrl:e.moduleUrl,isHost:!0}),template:new f({template:n,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[]}),changeDetection:s.ChangeDetectionStrategy.Default,inputs:[],outputs:[],host:{},lifecycleHooks:[],isComponent:!0,dynamicLoadable:!1,selector:"*"})}var i=n(5),o=n(12),s=n(25),a=n(56),c=n(154),u=n(155),p=n(89),l=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))$/g,h=function(){function e(e){var t=void 0===e?{}:e,n=t.runtime,r=t.name,o=t.moduleUrl,s=t.isHost;this.runtime=n,this.name=r,this.moduleUrl=o,this.isHost=i.normalizeBool(s)}return e.fromJson=function(t){return new e({name:t.name,moduleUrl:t.moduleUrl,isHost:t.isHost})},e.prototype.toJson=function(){return{name:this.name,moduleUrl:this.moduleUrl,isHost:this.isHost}},e}();t.CompileTypeMetadata=h;var f=function(){function e(e){var t=void 0===e?{}:e,n=t.encapsulation,r=t.template,o=t.templateUrl,s=t.styles,c=t.styleUrls,u=t.ngContentSelectors;this.encapsulation=i.isPresent(n)?n:a.ViewEncapsulation.Emulated,this.template=r,this.templateUrl=o,this.styles=i.isPresent(s)?s:[],this.styleUrls=i.isPresent(c)?c:[],this.ngContentSelectors=i.isPresent(u)?u:[]}return e.fromJson=function(t){return new e({encapsulation:i.isPresent(t.encapsulation)?a.VIEW_ENCAPSULATION_VALUES[t.encapsulation]:t.encapsulation,template:t.template,templateUrl:t.templateUrl,styles:t.styles,styleUrls:t.styleUrls,ngContentSelectors:t.ngContentSelectors})},e.prototype.toJson=function(){return{encapsulation:i.isPresent(this.encapsulation)?i.serializeEnum(this.encapsulation):this.encapsulation,template:this.template,templateUrl:this.templateUrl,styles:this.styles,styleUrls:this.styleUrls,ngContentSelectors:this.ngContentSelectors}},e}();t.CompileTemplateMetadata=f;var d=function(){function e(e){var t=void 0===e?{}:e,n=t.type,r=t.isComponent,i=t.dynamicLoadable,o=t.selector,s=t.exportAs,a=t.changeDetection,c=t.inputs,u=t.outputs,p=t.hostListeners,l=t.hostProperties,h=t.hostAttributes,f=t.lifecycleHooks,d=t.template;this.type=n,this.isComponent=r,this.dynamicLoadable=i,this.selector=o,this.exportAs=s,this.changeDetection=a,this.inputs=c,this.outputs=u,this.hostListeners=p,this.hostProperties=l,this.hostAttributes=h,this.lifecycleHooks=f,this.template=d}return e.create=function(t){var n=void 0===t?{}:t,r=n.type,s=n.isComponent,a=n.dynamicLoadable,c=n.selector,p=n.exportAs,h=n.changeDetection,f=n.inputs,d=n.outputs,y=n.host,v=n.lifecycleHooks,m=n.template,g={},_={},b={};i.isPresent(y)&&o.StringMapWrapper.forEach(y,function(e,t){var n=i.RegExpWrapper.firstMatch(l,t);i.isBlank(n)?b[t]=e:i.isPresent(n[1])?_[n[1]]=e:i.isPresent(n[2])&&(g[n[2]]=e)});var C={};i.isPresent(f)&&f.forEach(function(e){var t=u.splitAtColon(e,[e,e]);C[t[0]]=t[1]});var P={};return i.isPresent(d)&&d.forEach(function(e){var t=u.splitAtColon(e,[e,e]);P[t[0]]=t[1]}),new e({type:r,isComponent:i.normalizeBool(s),dynamicLoadable:i.normalizeBool(a),selector:c,exportAs:p,changeDetection:h,inputs:C,outputs:P,hostListeners:g,hostProperties:_,hostAttributes:b,lifecycleHooks:i.isPresent(v)?v:[],template:m})},e.fromJson=function(t){return new e({isComponent:t.isComponent,dynamicLoadable:t.dynamicLoadable,selector:t.selector,exportAs:t.exportAs,type:i.isPresent(t.type)?h.fromJson(t.type):t.type,changeDetection:i.isPresent(t.changeDetection)?s.CHANGE_DETECTION_STRATEGY_VALUES[t.changeDetection]:t.changeDetection,inputs:t.inputs,outputs:t.outputs,hostListeners:t.hostListeners,hostProperties:t.hostProperties,hostAttributes:t.hostAttributes,lifecycleHooks:t.lifecycleHooks.map(function(e){return p.LIFECYCLE_HOOKS_VALUES[e]}),template:i.isPresent(t.template)?f.fromJson(t.template):t.template})},e.prototype.toJson=function(){return{isComponent:this.isComponent,dynamicLoadable:this.dynamicLoadable,selector:this.selector,exportAs:this.exportAs,type:i.isPresent(this.type)?this.type.toJson():this.type,changeDetection:i.isPresent(this.changeDetection)?i.serializeEnum(this.changeDetection):this.changeDetection,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,lifecycleHooks:this.lifecycleHooks.map(function(e){return i.serializeEnum(e)}),template:i.isPresent(this.template)?this.template.toJson():this.template}},e}();t.CompileDirectiveMetadata=d,t.createHostComponentMeta=r},function(e,t,n){var r=n(12),i=n(5),o=n(14),s="",a=i.RegExpWrapper.create("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-\\w*]+)(?:=([^\\]]*))?\\])|(\\))|(\\s*,\\s*)"),c=function(){function e(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return e.parse=function(t){for(var n,s=[],c=function(e,t){t.notSelectors.length>0&&i.isBlank(t.element)&&r.ListWrapper.isEmpty(t.classNames)&&r.ListWrapper.isEmpty(t.attrs)&&(t.element="*"),e.push(t)},u=new e,p=i.RegExpWrapper.matcher(a,t),l=u,h=!1;i.isPresent(n=i.RegExpMatcherWrapper.next(p));){if(i.isPresent(n[1])){if(h)throw new o.BaseException("Nesting :not is not allowed in a selector");h=!0,l=new e,u.notSelectors.push(l)}if(i.isPresent(n[2])&&l.setElement(n[2]),i.isPresent(n[3])&&l.addClassName(n[3]),i.isPresent(n[4])&&l.addAttribute(n[4],n[5]),i.isPresent(n[6])&&(h=!1,l=u),i.isPresent(n[7])){if(h)throw new o.BaseException("Multiple selectors in :not are not supported");c(s,u),u=l=new e}}return c(s,u),s},e.prototype.isElementSelector=function(){return i.isPresent(this.element)&&r.ListWrapper.isEmpty(this.classNames)&&r.ListWrapper.isEmpty(this.attrs)&&0===this.notSelectors.length},e.prototype.setElement=function(e){void 0===e&&(e=null),this.element=e},e.prototype.getMatchingElementTemplate=function(){for(var e=i.isPresent(this.element)?this.element:"div",t=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",n="",r=0;r"},e.prototype.addAttribute=function(e,t){void 0===t&&(t=s),this.attrs.push(e),t=i.isPresent(t)?t.toLowerCase():s,this.attrs.push(t)},e.prototype.addClassName=function(e){this.classNames.push(e.toLowerCase())},e.prototype.toString=function(){var e="";if(i.isPresent(this.element)&&(e+=this.element),i.isPresent(this.classNames))for(var t=0;t0&&(e+="="+r),e+="]"}return this.notSelectors.forEach(function(t){return e+=":not("+t+")"}),e},e}();t.CssSelector=c;var u=function(){function e(){this._elementMap=new r.Map,this._elementPartialMap=new r.Map,this._classMap=new r.Map,this._classPartialMap=new r.Map,this._attrValueMap=new r.Map,this._attrValuePartialMap=new r.Map,this._listContexts=[]}return e.createNotMatcher=function(t){var n=new e;return n.addSelectables(t,null),n},e.prototype.addSelectables=function(e,t){var n=null;e.length>1&&(n=new p(e),this._listContexts.push(n));for(var r=0;r0&&(i.isBlank(this.listContext)||!this.listContext.alreadyMatched)){var r=u.createNotMatcher(this.notSelectors);n=!r.match(e,null)}return n&&i.isPresent(t)&&(i.isBlank(this.listContext)||!this.listContext.alreadyMatched)&&(i.isPresent(this.listContext)&&(this.listContext.alreadyMatched=!0),t(this.selector,this.cbContext)),n},e}();t.SelectorContext=l},function(e,t,n){function r(e){return f.StringWrapper.replaceAllMapped(e,d,function(e){return"-"+e[1].toLowerCase()})}function i(e){return f.StringWrapper.replaceAllMapped(e,y,function(e){return e[1].toUpperCase()})}function o(e){return f.isBlank(e)?null:"'"+a(e,v)+"'"}function s(e){return f.isBlank(e)?null:'"'+a(e,m)+'"'}function a(e,t){return f.StringWrapper.replaceAllMapped(e,t,function(e){return"$"==e[0]?f.IS_DART?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]})}function c(e){return f.IS_DART?"const "+e+" = ":"var "+e+" = exports['"+e+"'] = "}function u(e){return f.IS_DART?"const "+e:"new "+e}function p(e,t,n){return void 0===n&&(n=""),f.IS_DART?n+"("+e.join(",")+") => "+t:"function "+n+"("+e.join(",")+") { return "+t+"; }"}function l(e){return f.IS_DART?"'${"+e+"}'":e}function h(e,t){var n=f.StringWrapper.split(e.trim(),/\s*:\s*/g);return n.length>1?n:t}var f=n(5),d=/([A-Z])/g,y=/-([a-z])/g,v=/'|\\|\n|\r|\$/g,m=/"|\\|\n|\r|\$/g;t.MODULE_SUFFIX=f.IS_DART?".dart":".js",t.camelCaseToDashCase=r,t.dashCaseToCamelCase=i,t.escapeSingleQuoteString=o,t.escapeDoubleQuoteString=s,t.codeGenExportVariable=c,t.codeGenConstConstructorCall=u,t.codeGenValueFn=p,t.codeGenToString=l,t.splitAtColon=h},function(e,t,n){function r(e){return"#MODULE["+e+"]"}var i=n(5),o=/#MODULE\[([^\]]*)\]/g;t.moduleRef=r;var s=function(){function e(e,t){this.moduleUrl=e,this.sourceWithModuleRefs=t}return e.prototype.getSourceWithImports=function(){var e=this,t={},n=[],r=i.StringWrapper.replaceAllMapped(this.sourceWithModuleRefs,o,function(r){var o=r[1],s=t[o];return i.isBlank(s)&&(o==e.moduleUrl?s="":(s="import"+n.length,n.push([o,s])),t[o]=s),s.length>0?s+".":""});return new u(r,n)},e}();t.SourceModule=s;var a=function(){function e(e,t){this.declarations=e,this.expression=t}return e}();t.SourceExpression=a;var c=function(){function e(e,t){this.declarations=e,this.expressions=t}return e}();t.SourceExpressions=c;var u=function(){function e(e,t){this.source=e,this.imports=t}return e}();t.SourceWithImports=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(156),s=n(52),a=n(158),c=n(5),u=n(25),p=n(160),l=n(155),h=n(6),f="AbstractChangeDetector",d="ChangeDetectionUtil",y="ChangeDetectorState",v=o.moduleRef("package:angular2/src/core/change_detection/abstract_change_detector"+l.MODULE_SUFFIX),m=o.moduleRef("package:angular2/src/core/change_detection/change_detection_util"+l.MODULE_SUFFIX),g=o.moduleRef("package:angular2/src/core/change_detection/pregen_proto_change_detector"+l.MODULE_SUFFIX),_=o.moduleRef("package:angular2/src/core/change_detection/constants"+l.MODULE_SUFFIX),b=function(){function e(e){this._genConfig=e}return e.prototype.compileComponentRuntime=function(e,t,n){var r=this,i=a.createChangeDetectorDefinitions(e,t,this._genConfig,n);return i.map(function(e){return r._createChangeDetectorFactory(e)})},e.prototype._createChangeDetectorFactory=function(e){if(c.IS_DART||!this._genConfig.useJit){var t=new u.DynamicProtoChangeDetector(e);return function(e){return t.instantiate(e)}}return new s.ChangeDetectorJITGenerator(e,d,f,y).generate()},e.prototype.compileComponentCodeGen=function(e,t,n){var r=a.createChangeDetectorDefinitions(e,t,this._genConfig,n),i=[],u=0,l=r.map(function(t){var n,r;if(c.IS_DART){n=new p.Codegen(g);var a="_"+t.id,l=0===u&&e.isHost?"dynamic":""+o.moduleRef(e.moduleUrl)+e.name;n.generate(l,a,t),i.push(a+".newChangeDetector"),r=n.toString()}else n=new s.ChangeDetectorJITGenerator(t,""+m+d,""+v+f,""+_+y),i.push("function(dispatcher) { return new "+n.typeName+"(dispatcher); }"),r=n.generateSource();return u++,r});return new o.SourceExpressions(l,i)},e=r([h.Injectable(),i("design:paramtypes",[u.ChangeDetectorGenConfig])],e)}();t.ChangeDetectionCompiler=b},function(e,t,n){function r(e,t,n,r){var o=[],s=new h(null,o,t);return p.templateVisitAll(s,r),i(o,e,n)}function i(e,t,n){var r=o(e);return e.map(function(e){var i=t.name+"_"+e.viewIndex;return new u.ChangeDetectorDefinition(i,e.strategy,r[e.viewIndex],e.bindingRecords,e.eventRecords,e.directiveRecords,n)})}function o(e){var t=s.ListWrapper.createFixedSize(e.length);return e.forEach(function(e){var n=a.isPresent(e.parent)?t[e.parent.viewIndex]:[];t[e.viewIndex]=n.concat(e.variableNames)}),t}var s=n(12),a=n(5),c=n(16),u=n(25),p=n(159),l=n(89);t.createChangeDetectorDefinitions=r;var h=function(){function e(e,t,n){this.parent=e,this.allVisitors=t,this.strategy=n,this.boundTextCount=0,this.boundElementCount=0,this.variableNames=[],this.bindingRecords=[],this.eventRecords=[],this.directiveRecords=[],this.viewIndex=t.length,t.push(this)}return e.prototype.visitEmbeddedTemplate=function(t,n){this.boundElementCount++,p.templateVisitAll(this,t.outputs);for(var r=0;r0||this.outputs.length>0||this.exportAsVars.length>0||this.directives.length>0},e.prototype.getComponent=function(){return this.directives.length>0&&this.directives[0].directive.isComponent?this.directives[0].directive:null},e}();t.ElementAst=l;var h=function(){function e(e,t,n,r,i,o,s){this.attrs=e,this.outputs=t,this.vars=n,this.directives=r,this.children=i,this.ngContentIndex=o,this.sourceSpan=s}return e.prototype.visit=function(e,t){return e.visitEmbeddedTemplate(this,t)},e}();t.EmbeddedTemplateAst=h;var f=function(){function e(e,t,n,r){this.directiveName=e,this.templateName=t,this.value=n,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitDirectiveProperty(this,t)},e}();t.BoundDirectivePropertyAst=f;var d=function(){function e(e,t,n,r,i,o){this.directive=e,this.inputs=t,this.hostProperties=n,this.hostEvents=r,this.exportAsVars=i,this.sourceSpan=o}return e.prototype.visit=function(e,t){return e.visitDirective(this,t)},e}();t.DirectiveAst=d;var y=function(){function e(e,t,n){this.index=e,this.ngContentIndex=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitNgContent(this,t)},e}();t.NgContentAst=y,function(e){e[e.Property=0]="Property",e[e.Attribute=1]="Attribute",e[e.Class=2]="Class",e[e.Style=3]="Style"}(t.PropertyBindingType||(t.PropertyBindingType={}));t.PropertyBindingType;t.templateVisitAll=r},function(e,t){var n=function(){function e(e){}return e.prototype.generate=function(e,t,n){throw"Not implemented in JS"},e.prototype.toString=function(){throw"Not implemented in JS"},e}();t.Codegen=n},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(156),s=n(56),a=n(149),c=n(5),u=n(60),p=n(162),l=n(148),h=n(163),f=n(155),d=n(6),y=n(164),v=function(){function e(e,t){this._xhr=e,this._urlResolver=t,this._styleCache=new Map,this._shadowCss=new p.ShadowCss}return e.prototype.compileComponentRuntime=function(e){var t=e.styles,n=e.styleUrls;return this._loadStyles(t,n,e.encapsulation===s.ViewEncapsulation.Emulated)},e.prototype.compileComponentCodeGen=function(e){var t=e.encapsulation===s.ViewEncapsulation.Emulated;return this._styleCodeGen(e.styles,e.styleUrls,t)},e.prototype.compileStylesheetCodeGen=function(e,t){var n=h.extractStyleUrls(this._urlResolver,e,t);return[this._styleModule(e,!1,this._styleCodeGen([n.style],n.styleUrls,!1)),this._styleModule(e,!0,this._styleCodeGen([n.style],n.styleUrls,!0))]},e.prototype.clearCache=function(){this._styleCache.clear()},e.prototype._loadStyles=function(e,t,n){var r=this,i=t.map(function(e){var t=""+e+(n?".shim":""),i=r._styleCache.get(t);return c.isBlank(i)&&(i=r._xhr.get(e).then(function(t){var i=h.extractStyleUrls(r._urlResolver,e,t);return r._loadStyles([i.style],i.styleUrls,n)}),r._styleCache.set(t,i)),i});return u.PromiseWrapper.all(i).then(function(t){var i=e.map(function(e){return r._shimIfNeeded(e,n)});return t.forEach(function(e){return i.push(e)}),i})},e.prototype._styleCodeGen=function(e,t,n){for(var r=this,i=c.IS_DART?"const":"",s=e.map(function(e){return f.escapeSingleQuoteString(r._shimIfNeeded(e,n))}),a=0;a0?o.push(c):(o.length>0&&(r.push(o.join("")),n.push(D),o=[]),n.push(c)),c==O&&i++}return o.length>0&&(r.push(o.join("")),n.push(D)),new A(n.join(""),r)}var s=n(12),a=n(5),c=function(){function e(){this.strictStyling=!0}return e.prototype.shimCssText=function(e,t,n){return void 0===n&&(n=""),e=r(e),e=this._insertDirectives(e),this._scopeCssText(e,t,n)},e.prototype._insertDirectives=function(e){return e=this._insertPolyfillDirectivesInCssText(e),this._insertPolyfillRulesInCssText(e)},e.prototype._insertPolyfillDirectivesInCssText=function(e){return a.StringWrapper.replaceAllMapped(e,u,function(e){return e[1]+"{"})},e.prototype._insertPolyfillRulesInCssText=function(e){return a.StringWrapper.replaceAllMapped(e,p,function(e){var t=e[0];return t=a.StringWrapper.replace(t,e[1],""),t=a.StringWrapper.replace(t,e[2],""),e[3]+t})},e.prototype._scopeCssText=function(e,t,n){var r=this._extractUnscopedRulesFromCssText(e);return e=this._insertPolyfillHostInCssText(e),e=this._convertColonHost(e),e=this._convertColonHostContext(e),e=this._convertShadowDOMSelectors(e),a.isPresent(t)&&(e=this._scopeSelectors(e,t,n)),e=e+"\n"+r,e.trim()},e.prototype._extractUnscopedRulesFromCssText=function(e){for(var t,n="",r=a.RegExpWrapper.matcher(l,e);a.isPresent(t=a.RegExpMatcherWrapper.next(r));){var i=t[0];i=a.StringWrapper.replace(i,t[2],""),i=a.StringWrapper.replace(i,t[1],t[3]),n+=i+"\n\n"}return n},e.prototype._convertColonHost=function(e){return this._convertColonRule(e,y,this._colonHostPartReplacer)},e.prototype._convertColonHostContext=function(e){return this._convertColonRule(e,v,this._colonHostContextPartReplacer)},e.prototype._convertColonRule=function(e,t,n){return a.StringWrapper.replaceAllMapped(e,t,function(e){if(a.isPresent(e[2])){for(var t=e[2].split(","),r=[],i=0;i","+","~"],i=e,o="["+t+"]",c=0;c0&&!s.ListWrapper.contains(r,t)&&!a.StringWrapper.contains(t,o)){var n=/([^:]*)(:*)(.*)/g,i=a.RegExpWrapper.firstMatch(n,t);a.isPresent(i)&&(e=i[1]+o+i[2]+i[3])}return e}).join(u)}return i},e.prototype._insertPolyfillHostInCssText=function(e){return e=a.StringWrapper.replaceAll(e,P,f),e=a.StringWrapper.replaceAll(e,C,h)},e}();t.ShadowCss=c;var u=/polyfill-next-selector[^}]*content:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,p=/(polyfill-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,l=/(polyfill-unscoped-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,h="-shadowcsshost",f="-shadowcsscontext",d=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",y=a.RegExpWrapper.create("("+h+d,"im"),v=a.RegExpWrapper.create("("+f+d,"im"),m=h+"-no-combinator",g=[/>>>/g,/::shadow/g,/::content/g,/\/deep\//g,/\/shadow-deep\//g,/\/shadow\//g],_="([>\\s~+[.,{:][\\s\\S]*)?$",b=a.RegExpWrapper.create(h,"im"),C=/:host/gim,P=/:host-context/gim,w=/\/\*[\s\S]*?\*\//g,R=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,E=/([{}])/g,O="{",S="}",D="%BLOCK%",T=function(){function e(e,t){this.selector=e,this.content=t}return e}();t.CssRule=T,t.processRules=i;var A=function(){function e(e,t){this.escapedString=e,this.blocks=t}return e}()},function(e,t,n){function r(e){if(o.isBlank(e)||0===e.length||"/"==e[0])return!1;var t=o.RegExpWrapper.firstMatch(c,e);return o.isBlank(t)||"package"==t[1]||"asset"==t[1]}function i(e,t,n){var i=[],c=o.StringWrapper.replaceAllMapped(n,a,function(n){var s=o.isPresent(n[1])?n[1]:n[2];return r(s)?(i.push(e.resolve(t,s)),""):n[0]});return new s(c,i)}var o=n(5),s=function(){function e(e,t){this.style=e,this.styleUrls=t}return e}();t.StyleWithImports=s,t.isStyleUrlResolvable=r,t.extractStyleUrls=i;var a=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,c=/^([a-zA-Z\-\+\.]+):/g},function(e,t,n){function r(e){var t=e.styles;if(e.encapsulation===l.ViewEncapsulation.Emulated){t=h.ListWrapper.createFixedSize(e.styles.length);for(var n=0;ni.length){var f,d=h.ListWrapper.createFixedSize(p);for(f=0;fo?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},f=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},d=n(5),y=n(12),v=n(96),m=n(159),g=n(156),_=n(155),b=n(6);t.TEMPLATE_COMMANDS_MODULE_REF=g.moduleRef("package:angular2/src/core/linker/template_commands"+_.MODULE_SUFFIX);var C="$implicit",P="class",w="style",R=function(){function e(){}return e.prototype.compileComponentRuntime=function(e,t,n,r){var i=new S(new E(e,r,n),0);return m.templateVisitAll(i,t),i.result},e.prototype.compileComponentCodeGen=function(e,t,n,r){var i=new S(new O(e,r,n),0);return m.templateVisitAll(i,t),new g.SourceExpression([],u(i.result))},e=h([b.Injectable(),f("design:paramtypes",[])],e)}();t.CommandCompiler=R;var E=function(){function e(e,t,n){this.component=e,this.componentTemplateFactory=t,this.changeDetectorFactories=n}return e.prototype._mapDirectives=function(e){return e.map(function(e){return e.type.runtime})},e.prototype.createText=function(e,t,n){return new v.TextCmd(e,t,n)},e.prototype.createNgContent=function(e,t){return new v.NgContentCmd(e,t)},e.prototype.createBeginElement=function(e,t,n,r,i,o,s){return new v.BeginElementCmd(e,t,n,r,this._mapDirectives(i),o,s)},e.prototype.createEndElement=function(){return new v.EndElementCmd},e.prototype.createBeginComponent=function(e,t,n,r,i,o,s){var a=this.componentTemplateFactory(i[0]);return new v.BeginComponentCmd(e,t,n,r,this._mapDirectives(i),o,s,a)},e.prototype.createEndComponent=function(){return new v.EndComponentCmd},e.prototype.createEmbeddedTemplate=function(e,t,n,r,i,o,s){return new v.EmbeddedTemplateCmd(t,n,this._mapDirectives(r),i,o,this.changeDetectorFactories[e],s)},e}(),O=function(){function e(e,t,n){this.component=e,this.componentTemplateFactory=t,this.changeDetectorFactoryExpressions=n}return e.prototype.createText=function(e,n,r){return new T(_.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"TextCmd")+"("+_.escapeSingleQuoteString(e)+", "+n+", "+r+")")},e.prototype.createNgContent=function(e,n){return new T(_.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"NgContentCmd")+"("+e+", "+n+")")},e.prototype.createBeginElement=function(e,n,r,i,o,s,a){var c=u(n);return new T(_.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"BeginElementCmd")+"("+_.escapeSingleQuoteString(e)+", "+c+", "+(u(r)+", "+u(i)+", "+p(o)+", "+s+", "+a+")"))},e.prototype.createEndElement=function(){return new T(_.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"EndElementCmd")+"()")},e.prototype.createBeginComponent=function(e,n,r,i,o,s,a){var c=u(n);return new T(_.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"BeginComponentCmd")+"("+_.escapeSingleQuoteString(e)+", "+c+", "+(u(r)+", "+u(i)+", "+p(o)+", "+l(s)+", "+a+", "+this.componentTemplateFactory(o[0])+")"))},e.prototype.createEndComponent=function(){return new T(_.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"EndComponentCmd")+"()")},e.prototype.createEmbeddedTemplate=function(e,n,r,i,o,s,a){return new T(_.codeGenConstConstructorCall(t.TEMPLATE_COMMANDS_MODULE_REF+"EmbeddedTemplateCmd")+"("+u(n)+", "+u(r)+", "+(p(i)+", "+o+", "+s+", "+this.changeDetectorFactoryExpressions[e]+", "+u(a)+")"))},e}(),S=function(){function e(e,t){this.commandFactory=e,this.embeddedTemplateIndex=t,this.result=[],this.transitiveNgContentCount=0}return e.prototype._readAttrNameAndValues=function(e,t){var n=o(r(this,t,[]));return e.forEach(function(e){y.StringMapWrapper.forEach(e.hostAttributes,function(e,t){var r=n[t];n[t]=d.isPresent(r)?a(t,r,e):e})}),s(n)},e.prototype.visitNgContent=function(e,t){return this.transitiveNgContentCount++,this.result.push(this.commandFactory.createNgContent(e.index,e.ngContentIndex)),null},e.prototype.visitEmbeddedTemplate=function(t,n){var r=this;this.embeddedTemplateIndex++;var i=new e(this.commandFactory,this.embeddedTemplateIndex);m.templateVisitAll(i,t.children);var o=i.transitiveNgContentCount>0,s=[];t.vars.forEach(function(e){s.push(e.name),s.push(e.value.length>0?e.value:C)});var a=[];return y.ListWrapper.forEachWithIndex(t.directives,function(e,t){e.visit(r,new D(t,[],[],a))}),this.result.push(this.commandFactory.createEmbeddedTemplate(this.embeddedTemplateIndex,this._readAttrNameAndValues(a,t.attrs),s,a,o,t.ngContentIndex,i.result)),this.transitiveNgContentCount+=i.transitiveNgContentCount,this.embeddedTemplateIndex=i.embeddedTemplateIndex,null},e.prototype.visitElement=function(e,t){var n=this,o=e.getComponent(),s=r(this,e.outputs,[]),a=[];d.isBlank(o)&&e.exportAsVars.forEach(function(e){a.push(e.name),a.push(null)});var c=[];y.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(n,new D(t,s,a,c))}),s=i(s);var u=this._readAttrNameAndValues(c,e.attrs);return d.isPresent(o)?(this.result.push(this.commandFactory.createBeginComponent(e.name,u,s,a,c,o.template.encapsulation,e.ngContentIndex)),m.templateVisitAll(this,e.children),this.result.push(this.commandFactory.createEndComponent())):(this.result.push(this.commandFactory.createBeginElement(e.name,u,s,a,c,e.isBound(),e.ngContentIndex)),m.templateVisitAll(this,e.children),this.result.push(this.commandFactory.createEndElement())),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return t.push(e.name),t.push(e.value),null},e.prototype.visitBoundText=function(e,t){return this.result.push(this.commandFactory.createText(null,!0,e.ngContentIndex)),null},e.prototype.visitText=function(e,t){return this.result.push(this.commandFactory.createText(e.value,!1,e.ngContentIndex)),null},e.prototype.visitDirective=function(e,t){return t.targetDirectives.push(e.directive),m.templateVisitAll(this,e.hostEvents,t.eventTargetAndNames),e.exportAsVars.forEach(function(e){t.targetVariableNameAndValues.push(e.name),t.targetVariableNameAndValues.push(t.index)}),null},e.prototype.visitEvent=function(e,t){return t.push(e.target),t.push(e.name),null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}(),D=function(){function e(e,t,n,r){this.index=e,this.eventTargetAndNames=t,this.targetVariableNameAndValues=n,this.targetDirectives=r}return e}(),T=function(){function e(e){this.value=e}return e}()},function(e,t,n){function r(e){return p.StringWrapper.split(e.trim(),/\s+/g)}function i(e,t){var n=new _.CssSelector,i=v.splitNsName(e)[1];n.setElement(i);for(var o=0;oo?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},u=n(12),p=n(5),l=n(2),h=n(5),f=n(14),d=n(25),y=n(168),v=n(172),m=n(171),g=n(159),_=n(154),b=n(173),C=n(174),P=n(163),w=n(169),R=n(155),E=/^(?:(?:(?:(bind-)|(var-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g,O="template",S="template",D="*",T="class",A=".",I="attr",x="class",N="style",k=_.CssSelector.parse("*")[0];t.TEMPLATE_TRANSFORMS=h.CONST_EXPR(new l.OpaqueToken("TemplateTransforms"));var j=function(e){function t(t,n){e.call(this,n,t)}return o(t,e),t}(m.ParseError);t.TemplateParseError=j;var V=function(){function e(e,t,n,r){this._exprParser=e,this._schemaRegistry=t,this._htmlParser=n,this.transforms=r}return e.prototype.parse=function(e,t,n){var r=new M(t,this._exprParser,this._schemaRegistry),i=this._htmlParser.parse(e,n),o=w.htmlVisitAll(r,i.rootNodes,W),s=i.errors.concat(r.errors);if(s.length>0){var a=s.join("\n");throw new f.BaseException("Template parse errors:\n"+a)}return p.isPresent(this.transforms)&&this.transforms.forEach(function(e){o=g.templateVisitAll(e,o)}),o},e=s([l.Injectable(),c(3,l.Optional()),c(3,l.Inject(t.TEMPLATE_TRANSFORMS)),a("design:paramtypes",[d.Parser,b.ElementSchemaRegistry,y.HtmlParser,Array])],e)}();t.TemplateParser=V;var M=function(){function e(e,t,n){var r=this;this._exprParser=t,this._schemaRegistry=n,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new _.SelectorMatcher,u.ListWrapper.forEachWithIndex(e,function(e,t){var n=_.CssSelector.parse(e.selector);r.selectorMatcher.addSelectables(n,e),r.directivesIndex.set(e,t)})}return e.prototype._reportError=function(e,t){this.errors.push(new j(e,t.start))},e.prototype._parseInterpolation=function(e,t){var n=t.start.toString();try{return this._exprParser.parseInterpolation(e,n)}catch(r){return this._reportError(""+r,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._parseAction=function(e,t){var n=t.start.toString();try{return this._exprParser.parseAction(e,n)}catch(r){return this._reportError(""+r,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._parseBinding=function(e,t){var n=t.start.toString();try{return this._exprParser.parseBinding(e,n)}catch(r){return this._reportError(""+r,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._parseTemplateBindings=function(e,t){var n=t.start.toString();try{return this._exprParser.parseTemplateBindings(e,n)}catch(r){return this._reportError(""+r,t),[]}},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(k),r=this._parseInterpolation(e.value,e.sourceSpan);return p.isPresent(r)?new g.BoundTextAst(r,n,e.sourceSpan):new g.TextAst(e.value,n,e.sourceSpan)},e.prototype.visitAttr=function(e,t){return new g.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitElement=function(e,t){var n=this,r=e.name,o=C.preparseElement(e);if(o.type===C.PreparsedElementType.SCRIPT||o.type===C.PreparsedElementType.STYLE)return null;if(o.type===C.PreparsedElementType.STYLESHEET&&P.isStyleUrlResolvable(o.hrefAttr))return null;var s=[],a=[],c=[],u=[],l=[],h=[],f=[],d=!1,y=[];e.attrs.forEach(function(e){s.push([e.name,e.value]);var t=n._parseAttr(e,s,a,u,c),r=n._parseInlineTemplateBinding(e,f,l,h);t||r||y.push(n.visitAttr(e,null)),r&&(d=!0)});var m,_=v.splitNsName(r.toLowerCase())[1],b=_==O,R=i(r,s),E=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,R),a,b?[]:c,e.sourceSpan),S=this._createElementPropertyAsts(e.name,a,E),D=w.htmlVisitAll(o.nonBindable?U:this,e.children,F.create(E)),T=d?null:t.findNgContentIndex(R);if(o.type===C.PreparsedElementType.NG_CONTENT)p.isPresent(e.children)&&e.children.length>0&&this._reportError(" element cannot have content. must be immediately followed by ",e.sourceSpan),m=new g.NgContentAst(this.ngContentCount++,T,e.sourceSpan);else if(b)this._assertAllEventsPublishedByDirectives(E,u),this._assertNoComponentsNorElementBindingsOnTemplate(E,S,e.sourceSpan),m=new g.EmbeddedTemplateAst(y,u,c,E,D,T,e.sourceSpan);else{this._assertOnlyOneComponent(E,e.sourceSpan);var A=c.filter(function(e){return 0===e.value.length});m=new g.ElementAst(r,y,S,u,A,E,D,T,e.sourceSpan)}if(d){var I=i(O,f),x=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,I),l,[],e.sourceSpan),N=this._createElementPropertyAsts(e.name,l,x);this._assertNoComponentsNorElementBindingsOnTemplate(x,N,e.sourceSpan),m=new g.EmbeddedTemplateAst([],[],h,x,[m],t.findNgContentIndex(I),e.sourceSpan)}return m},e.prototype._parseInlineTemplateBinding=function(e,t,n,r){var i=null;if(e.name==S)i=e.value;else if(e.name.startsWith(D)){var o=e.name.substring(D.length);i=0==e.value.length?o:o+" "+e.value}if(p.isPresent(i)){for(var s=this._parseTemplateBindings(i,e.sourceSpan),a=0;a-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new g.VariableAst(e,t,n))},e.prototype._parseProperty=function(e,t,n,r,i){this._parsePropertyAst(e,this._parseBinding(t,n),n,r,i)},e.prototype._parsePropertyInterpolation=function(e,t,n,r,i){var o=this._parseInterpolation(t,n);return p.isPresent(o)?(this._parsePropertyAst(e,o,n,r,i),!0):!1},e.prototype._parsePropertyAst=function(e,t,n,r,i){r.push([e,t.source]),i.push(new L(e,t,!1,n))},e.prototype._parseAssignmentEvent=function(e,t,n,r,i){this._parseEvent(e+"Change",t+"=$event",n,r,i)},e.prototype._parseEvent=function(e,t,n,r,i){var o=R.splitAtColon(e,[null,e]),s=o[0],a=o[1];i.push(new g.BoundEventAst(a,s,this._parseAction(t,n),n))},e.prototype._parseLiteralAttr=function(e,t,n,r){r.push(new L(e,this._exprParser.wrapLiteralPrimitive(t,""),!0,n))},e.prototype._parseDirectives=function(e,t){var n=this,r=[];return e.match(t,function(e,t){r.push(t)}),u.ListWrapper.sort(r,function(e,t){var r=e.isComponent,i=t.isComponent;return r&&!i?-1:!r&&i?1:n.directivesIndex.get(e)-n.directivesIndex.get(t)}),r},e.prototype._createDirectiveAsts=function(e,t,n,r,i){var o=this,s=new Set,a=t.map(function(t){var a=[],c=[],u=[];o._createDirectiveHostPropertyAsts(e,t.hostProperties,i,a),o._createDirectiveHostEventAsts(t.hostListeners,i,c),o._createDirectivePropertyAsts(t.inputs,n,u);var p=[];return r.forEach(function(e){(0===e.value.length&&t.isComponent||t.exportAs==e.value)&&(p.push(e),s.add(e.name))}),new g.DirectiveAst(t,u,a,c,p,i)});return r.forEach(function(e){e.value.length>0&&!u.SetWrapper.has(s,e.name)&&o._reportError('There is no directive with "exportAs" set to "'+e.value+'"',e.sourceSpan)}),a},e.prototype._createDirectiveHostPropertyAsts=function(e,t,n,r){var i=this;p.isPresent(t)&&u.StringMapWrapper.forEach(t,function(t,o){var s=i._parseBinding(t,n);r.push(i._createElementPropertyAst(e,o,s,n))})},e.prototype._createDirectiveHostEventAsts=function(e,t,n){var r=this;p.isPresent(e)&&u.StringMapWrapper.forEach(e,function(e,i){r._parseEvent(i,e,t,[],n)})},e.prototype._createDirectivePropertyAsts=function(e,t,n){if(p.isPresent(e)){var r=new Map;t.forEach(function(e){var t=r.get(e.name);(p.isBlank(t)||t.isLiteral)&&r.set(e.name,e)}),u.StringMapWrapper.forEach(e,function(e,t){var i=r.get(e);p.isPresent(i)&&n.push(new g.BoundDirectivePropertyAst(t,i.name,i.expression,i.sourceSpan))})}},e.prototype._createElementPropertyAsts=function(e,t,n){var r=this,i=[],o=new Map;return n.forEach(function(e){e.inputs.forEach(function(e){o.set(e.templateName,e)})}),t.forEach(function(t){!t.isLiteral&&p.isBlank(o.get(t.name))&&i.push(r._createElementPropertyAst(e,t.name,t.expression,t.sourceSpan))}),i},e.prototype._createElementPropertyAst=function(e,t,n,r){var i,o,s=null,a=t.split(A);return 1===a.length?(o=this._schemaRegistry.getMappedPropName(a[0]),i=g.PropertyBindingType.Property,this._schemaRegistry.hasProperty(e,o)||this._reportError("Can't bind to '"+o+"' since it isn't a known native property",r)):a[0]==I?(o=a[1],i=g.PropertyBindingType.Attribute):a[0]==x?(o=a[1],i=g.PropertyBindingType.Class):a[0]==N?(s=a.length>2?a[2]:null,o=a[1],i=g.PropertyBindingType.Style):(this._reportError("Invalid property name '"+t+"'",r),i=null),new g.BoundElementPropertyAst(o,i,n,s,r)},e.prototype._findComponentDirectiveNames=function(e){var t=[];return e.forEach(function(e){var n=e.directive.type.name;e.directive.isComponent&&t.push(n)}),t},e.prototype._assertOnlyOneComponent=function(e,t){var n=this._findComponentDirectiveNames(e);n.length>1&&this._reportError("More than one component: "+n.join(","),t)},e.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(e,t,n){var r=this,i=this._findComponentDirectiveNames(e);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),t.forEach(function(e){r._reportError("Property binding "+e.name+" not used by any directive on an embedded template",n)})},e.prototype._assertAllEventsPublishedByDirectives=function(e,t){var n=this,r=new Set;e.forEach(function(e){u.StringMapWrapper.forEach(e.directive.outputs,function(e,t){r.add(e)})}),t.forEach(function(e){(p.isPresent(e.target)||!u.SetWrapper.has(r,e.name))&&n._reportError("Event binding "+e.fullName+" not emitted by any directive on an embedded template",e.sourceSpan)})},e}(),B=function(){function e(){}return e.prototype.visitElement=function(e,t){var n=C.preparseElement(e);if(n.type===C.PreparsedElementType.SCRIPT||n.type===C.PreparsedElementType.STYLE||n.type===C.PreparsedElementType.STYLESHEET)return null;var r=e.attrs.map(function(e){return[e.name,e.value]}),o=i(e.name,r),s=t.findNgContentIndex(o),a=w.htmlVisitAll(this,e.children,W);return new g.ElementAst(e.name,w.htmlVisitAll(this,e.attrs),[],[],[],[],a,s,e.sourceSpan)},e.prototype.visitAttr=function(e,t){return new g.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(k);return new g.TextAst(e.value,n,e.sourceSpan)},e}(),L=function(){function e(e,t,n,r){this.name=e,this.expression=t,this.isLiteral=n,this.sourceSpan=r}return e}();t.splitClasses=r;var F=function(){function e(e,t){this.ngContentIndexMatcher=e,this.wildcardNgContentIndex=t}return e.create=function(t){if(0===t.length||!t[0].directive.isComponent)return W;for(var n=new _.SelectorMatcher,r=t[0].directive.template.ngContentSelectors,i=null,o=0;o0?t[0]:null},e}(),W=new F(new _.SelectorMatcher,null),U=new B},function(e,t,n){function r(e,t){return c.isPresent(e)?"@"+e+":"+t:t}function i(e,t,n){return c.isBlank(e)&&(e=d.getHtmlTagDefinition(t).implicitNamespacePrefix,c.isBlank(e)&&c.isPresent(n)&&(e=d.getNsPrefix(n.name))),r(e,t)}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=n(5),u=n(12),p=n(169),l=n(6),h=n(170),f=n(171),d=n(172),y=function(e){function t(t,n,r){e.call(this,n,r),this.elementName=t}return o(t,e),t.create=function(e,n,r){return new t(e,n,r)},t}(f.ParseError);t.HtmlTreeError=y;var v=function(){function e(e,t){this.rootNodes=e,this.errors=t}return e}();t.HtmlParseTreeResult=v;var m=function(){function e(){}return e.prototype.parse=function(e,t){var n=h.tokenizeHtml(e,t),r=new g(n.tokens).build();return new v(r.rootNodes,n.errors.concat(r.errors))},e=s([l.Injectable(),a("design:paramtypes",[])],e)}();t.HtmlParser=m;var g=function(){function e(e){this.tokens=e,this.index=-1,this.rootNodes=[],this.errors=[],this.elementStack=[],this._advance()}return e.prototype.build=function(){for(;this.peek.type!==h.HtmlTokenType.EOF;)this.peek.type===h.HtmlTokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this.peek.type===h.HtmlTokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this.peek.type===h.HtmlTokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this.peek.type===h.HtmlTokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this.peek.type===h.HtmlTokenType.TEXT||this.peek.type===h.HtmlTokenType.RAW_TEXT||this.peek.type===h.HtmlTokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._advance();return new v(this.rootNodes,this.errors)},e.prototype._advance=function(){var e=this.peek;return this.index0&&"\n"==t[0]){var n=this._getParentElement();c.isPresent(n)&&0==n.children.length&&d.getHtmlTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new p.HtmlTextAst(t,e.sourceSpan))},e.prototype._closeVoidElement=function(){if(this.elementStack.length>0){var e=u.ListWrapper.last(this.elementStack);d.getHtmlTagDefinition(e.name).isVoid&&this.elementStack.pop()}},e.prototype._consumeStartTag=function(e){for(var t=e.parts[0],n=e.parts[1],r=[];this.peek.type===h.HtmlTokenType.ATTR_NAME;)r.push(this._consumeAttr(this._advance()));var o=i(t,n,this._getParentElement()),s=!1;this.peek.type===h.HtmlTokenType.TAG_OPEN_END_VOID?(this._advance(),s=!0,null!=d.getNsPrefix(o)||d.getHtmlTagDefinition(o).isVoid||this.errors.push(y.create(o,e.sourceSpan.start,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))):this.peek.type===h.HtmlTokenType.TAG_OPEN_END&&(this._advance(),s=!1);var a=this.peek.sourceSpan.start,c=new p.HtmlElementAst(o,r,[],new f.ParseSourceSpan(e.sourceSpan.start,a));this._pushElement(c),s&&this._popElement(o)},e.prototype._pushElement=function(e){if(this.elementStack.length>0){var t=u.ListWrapper.last(this.elementStack);d.getHtmlTagDefinition(t.name).isClosedByChild(e.name)&&this.elementStack.pop()}var n=d.getHtmlTagDefinition(e.name),t=this._getParentElement();if(n.requireExtraParent(c.isPresent(t)?t.name:null)){var r=new p.HtmlElementAst(n.parentToAdd,[],[e],e.sourceSpan);this._addToParent(r),this.elementStack.push(r),this.elementStack.push(e)}else this._addToParent(e),this.elementStack.push(e)},e.prototype._consumeEndTag=function(e){var t=i(e.parts[0],e.parts[1],this._getParentElement());d.getHtmlTagDefinition(t).isVoid?this.errors.push(y.create(t,e.sourceSpan.start,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this.errors.push(y.create(t,e.sourceSpan.start,'Unexpected closing tag "'+e.parts[1]+'"')); -},e.prototype._popElement=function(e){for(var t=this.elementStack.length-1;t>=0;t--){var n=this.elementStack[t];if(n.name==e)return u.ListWrapper.splice(this.elementStack,t,this.elementStack.length-t),!0;if(!d.getHtmlTagDefinition(n.name).closedByParent)return!1}return!1},e.prototype._consumeAttr=function(e){var t=r(e.parts[0],e.parts[1]),n=e.sourceSpan.end,i="";if(this.peek.type===h.HtmlTokenType.ATTR_VALUE){var o=this._advance();i=o.parts[0],n=o.sourceSpan.end}return new p.HtmlAttrAst(t,i,new f.ParseSourceSpan(e.sourceSpan.start,n))},e.prototype._getParentElement=function(){return this.elementStack.length>0?u.ListWrapper.last(this.elementStack):null},e.prototype._addToParent=function(e){var t=this._getParentElement();c.isPresent(t)?t.children.push(e):this.rootNodes.push(e)},e}()},function(e,t,n){function r(e,t,n){void 0===n&&(n=null);var r=[];return t.forEach(function(t){var o=t.visit(e,n);i.isPresent(o)&&r.push(o)}),r}var i=n(5),o=function(){function e(e,t){this.value=e,this.sourceSpan=t}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}();t.HtmlTextAst=o;var s=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitAttr(this,t)},e}();t.HtmlAttrAst=s;var a=function(){function e(e,t,n,r){this.name=e,this.attrs=t,this.children=n,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitElement(this,t)},e}();t.HtmlElementAst=a,t.htmlVisitAll=r},function(e,t,n){function r(e,t){return new te(new _.ParseSourceFile(e,t)).tokenize()}function i(e){var t=e===E?"EOF":m.StringWrapper.fromCharCode(e);return'Unexpected character "'+t+'"'}function o(e){return'Unknown entity "'+e+'" - use the "&#;" or "&#x;" syntax'}function s(e){return!a(e)||e===E}function a(e){return e>=O&&T>=e||e===Z}function c(e){return a(e)||e===H||e===V||e===k||e===I||e===U}function u(e){return($>e||e>Q)&&(q>e||e>G)&&(M>e||e>L)}function p(e){return e==B||e==E||!d(e)}function l(e){return e==B||e==E||!f(e)}function h(e){return e===W||e===E}function f(e){return e>=$&&Q>=e}function d(e){return e>=$&&X>=e||e>=M&&L>=e}function y(e){for(var t,n=[],r=0;r=this.length)throw this._createError(i(E),this._getLocation());this.peek===S?(this.line++,this.column=0):this.peek!==S&&this.peek!==D&&this.column++,this.index++,this.peek=this.index>=this.length?E:m.StringWrapper.charCodeAt(this.inputLowercase,this.index)},e.prototype._attemptChar=function(e){return this.peek===e?(this._advance(),!0):!1},e.prototype._requireChar=function(e){var t=this._getLocation();if(!this._attemptChar(e))throw this._createError(i(this.peek),t)},e.prototype._attemptChars=function(e){for(var t=0;tr.offset&&o.push(this.input.substring(r.offset,this.index));this.peek!==t;)o.push(this._readChar(e))}return this._endToken([this._processCarriageReturns(o.join(""))],r)},e.prototype._consumeComment=function(e){var t=this;this._beginToken(C.COMMENT_START,e),this._requireChar(j),this._endToken([]);var n=this._consumeRawText(!1,j,function(){return t._attemptChars("->")});this._beginToken(C.COMMENT_END,n.sourceSpan.end),this._endToken([])},e.prototype._consumeCdata=function(e){var t=this;this._beginToken(C.CDATA_START,e),this._requireChars("cdata["),this._endToken([]);var n=this._consumeRawText(!1,K,function(){return t._attemptChars("]>")});this._beginToken(C.CDATA_END,n.sourceSpan.end),this._endToken([])},e.prototype._consumeDocType=function(e){this._beginToken(C.DOC_TYPE,e),this._attemptUntilChar(H),this._advance(),this._endToken([this.input.substring(e.offset+2,this.index-1)])},e.prototype._consumePrefixAndName=function(){for(var e=this.index,t=null;this.peek!==F&&!u(this.peek);)this._advance();var n;this.peek===F?(this._advance(),t=this.input.substring(e,this.index-1),n=this.index):n=e,this._requireUntilFn(c,this.index===n?1:0);var r=this.input.substring(n,this.index);return[t,r]},e.prototype._consumeTagOpen=function(e){var t,n=this._savePosition();try{if(!f(this.peek))throw this._createError(i(this.peek),this._getLocation());var r=this.index;for(this._consumeTagOpenStart(e),t=this.inputLowercase.substring(r,this.index),this._attemptUntilFn(s);this.peek!==V&&this.peek!==H;)this._consumeAttributeName(),this._attemptUntilFn(s),this._attemptChar(U)&&(this._attemptUntilFn(s),this._consumeAttributeValue()),this._attemptUntilFn(s);this._consumeTagOpenEnd()}catch(o){if(o instanceof ee)return this._restorePosition(n),this._beginToken(C.TEXT,e),void this._endToken(["<"]);throw o}var a=b.getHtmlTagDefinition(t).contentType;a===b.HtmlTagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(t,!1):a===b.HtmlTagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(t,!0)},e.prototype._consumeRawTextWithTagClose=function(e,t){var n=this,r=this._consumeRawText(t,W,function(){return n._attemptChar(V)?(n._attemptUntilFn(s),n._attemptChars(e)?(n._attemptUntilFn(s),n._attemptChar(H)?!0:!1):!1):!1});this._beginToken(C.TAG_CLOSE,r.sourceSpan.end),this._endToken([null,e])},e.prototype._consumeTagOpenStart=function(e){this._beginToken(C.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)},e.prototype._consumeAttributeName=function(){this._beginToken(C.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)},e.prototype._consumeAttributeValue=function(){this._beginToken(C.ATTR_VALUE);var e;if(this.peek===k||this.peek===I){var t=this.peek;this._advance();for(var n=[];this.peek!==t;)n.push(this._readChar(!0));e=n.join(""),this._advance()}else{var r=this.index;this._requireUntilFn(c,1),e=this.input.substring(r,this.index)}this._endToken([this._processCarriageReturns(e)])},e.prototype._consumeTagOpenEnd=function(){var e=this._attemptChar(V)?C.TAG_OPEN_END_VOID:C.TAG_OPEN_END;this._beginToken(e),this._requireChar(H),this._endToken([])},e.prototype._consumeTagClose=function(e){this._beginToken(C.TAG_CLOSE,e),this._attemptUntilFn(s);var t;t=this._consumePrefixAndName(),this._attemptUntilFn(s),this._requireChar(H),this._endToken(t)},e.prototype._consumeText=function(){var e=this._getLocation();this._beginToken(C.TEXT,e);for(var t=[this._readChar(!0)];!h(this.peek);)t.push(this._readChar(!0));this._endToken([this._processCarriageReturns(t.join(""))])},e.prototype._savePosition=function(){return[this.peek,this.index,this.column,this.line,this.tokens.length]},e.prototype._restorePosition=function(e){this.peek=e[0],this.index=e[1],this.column=e[2],this.line=e[3];var t=e[4];te.length-1&&(t=e.length-1);for(var n=t,r=0,i=0;100>r&&t>0&&(t--,r++,"\n"!=e[t]||3!=++i););for(r=0,i=0;100>r&&n]"+e.substring(this.location.offset,n+1);return this.msg+' ("'+o+'"): '+this.location},e}();t.ParseError=i;var o=function(){function e(e,t){this.start=e,this.end=t}return e.prototype.toString=function(){return this.start.file.content.substring(this.start.offset,this.end.offset)},e}();t.ParseSourceSpan=o},function(e,t,n){function r(e){var t=u[e.toLowerCase()];return s.isPresent(t)?t:p}function i(e){if("@"!=e[0])return[null,e];var t=s.RegExpWrapper.firstMatch(l,e);return[t[1],t[2]]}function o(e){return i(e)[0]}var s=n(5);t.NAMED_ENTITIES=s.CONST_EXPR({Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",alefsym:"ℵ",Alpha:"Α",alpha:"α",amp:"&",and:"∧",ang:"∠",apos:"'",Aring:"Å",aring:"å",asymp:"≈",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",bdquo:"„",Beta:"Β",beta:"β",brvbar:"¦",bull:"•",cap:"∩",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",Chi:"Χ",chi:"χ",circ:"ˆ",clubs:"♣",cong:"≅",copy:"©",crarr:"↵",cup:"∪",curren:"¤",dagger:"†",Dagger:"‡",darr:"↓",dArr:"⇓",deg:"°",Delta:"Δ",delta:"δ",diams:"♦",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",empty:"∅",emsp:" ",ensp:" ",Epsilon:"Ε",epsilon:"ε",equiv:"≡",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",exist:"∃",fnof:"ƒ",forall:"∀",frac12:"½",frac14:"¼",frac34:"¾",frasl:"⁄",Gamma:"Γ",gamma:"γ",ge:"≥",gt:">",harr:"↔",hArr:"⇔",hearts:"♥",hellip:"…",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",image:"ℑ",infin:"∞","int":"∫",Iota:"Ι",iota:"ι",iquest:"¿",isin:"∈",Iuml:"Ï",iuml:"ï",Kappa:"Κ",kappa:"κ",Lambda:"Λ",lambda:"λ",lang:"⟨",laquo:"«",larr:"←",lArr:"⇐",lceil:"⌈",ldquo:"“",le:"≤",lfloor:"⌊",lowast:"∗",loz:"◊",lrm:"‎",lsaquo:"‹",lsquo:"‘",lt:"<",macr:"¯",mdash:"—",micro:"µ",middot:"·",minus:"−",Mu:"Μ",mu:"μ",nabla:"∇",nbsp:" ",ndash:"–",ne:"≠",ni:"∋",not:"¬",notin:"∉",nsub:"⊄",Ntilde:"Ñ",ntilde:"ñ",Nu:"Ν",nu:"ν",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",OElig:"Œ",oelig:"œ",Ograve:"Ò",ograve:"ò",oline:"‾",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",oplus:"⊕",or:"∨",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",otimes:"⊗",Ouml:"Ö",ouml:"ö",para:"¶",permil:"‰",perp:"⊥",Phi:"Φ",phi:"φ",Pi:"Π",pi:"π",piv:"ϖ",plusmn:"±",pound:"£",prime:"′",Prime:"″",prod:"∏",prop:"∝",Psi:"Ψ",psi:"ψ",quot:'"',radic:"√",rang:"⟩",raquo:"»",rarr:"→",rArr:"⇒",rceil:"⌉",rdquo:"”",real:"ℜ",reg:"®",rfloor:"⌋",Rho:"Ρ",rho:"ρ",rlm:"‏",rsaquo:"›",rsquo:"’",sbquo:"‚",Scaron:"Š",scaron:"š",sdot:"⋅",sect:"§",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sim:"∼",spades:"♠",sub:"⊂",sube:"⊆",sum:"∑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supe:"⊇",szlig:"ß",Tau:"Τ",tau:"τ",there4:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thinsp:" ",THORN:"Þ",thorn:"þ",tilde:"˜",times:"×",trade:"™",Uacute:"Ú",uacute:"ú",uarr:"↑",uArr:"⇑",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",Uuml:"Ü",uuml:"ü",weierp:"℘",Xi:"Ξ",xi:"ξ",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",Yuml:"Ÿ",Zeta:"Ζ",zeta:"ζ",zwj:"‍",zwnj:"‌"}),function(e){e[e.RAW_TEXT=0]="RAW_TEXT",e[e.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",e[e.PARSABLE_DATA=2]="PARSABLE_DATA"}(t.HtmlTagContentType||(t.HtmlTagContentType={}));var a=t.HtmlTagContentType,c=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.closedByChildren,i=n.requiredParents,o=n.implicitNamespacePrefix,c=n.contentType,u=n.closedByParent,p=n.isVoid,l=n.ignoreFirstLf;this.closedByChildren={},this.closedByParent=!1,s.isPresent(r)&&r.length>0&&r.forEach(function(e){return t.closedByChildren[e]=!0}),this.isVoid=s.normalizeBool(p),this.closedByParent=s.normalizeBool(u)||this.isVoid,s.isPresent(i)&&i.length>0&&(this.requiredParents={},this.parentToAdd=i[0],i.forEach(function(e){return t.requiredParents[e]=!0})),this.implicitNamespacePrefix=o,this.contentType=s.isPresent(c)?c:a.PARSABLE_DATA,this.ignoreFirstLf=s.normalizeBool(l)}return e.prototype.requireExtraParent=function(e){if(s.isBlank(this.requiredParents))return!1;if(s.isBlank(e))return!0;var t=e.toLowerCase();return 1!=this.requiredParents[t]&&"template"!=t},e.prototype.isClosedByChild=function(e){return this.isVoid||s.normalizeBool(this.closedByChildren[e.toLowerCase()])},e}();t.HtmlTagDefinition=c;var u={area:new c({isVoid:!0}),embed:new c({isVoid:!0}),link:new c({isVoid:!0}),img:new c({isVoid:!0}),input:new c({isVoid:!0}),param:new c({isVoid:!0}),hr:new c({isVoid:!0}),br:new c({isVoid:!0}),source:new c({isVoid:!0}),track:new c({isVoid:!0}),wbr:new c({isVoid:!0}),p:new c({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new c({closedByChildren:["tbody","tfoot"]}),tbody:new c({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new c({closedByChildren:["tbody"],closedByParent:!0}),tr:new c({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new c({closedByChildren:["td","th"],closedByParent:!0}),th:new c({closedByChildren:["td","th"],closedByParent:!0}),col:new c({requiredParents:["colgroup"],isVoid:!0}),svg:new c({implicitNamespacePrefix:"svg"}),math:new c({implicitNamespacePrefix:"math"}),li:new c({closedByChildren:["li"],closedByParent:!0}),dt:new c({closedByChildren:["dt","dd"]}),dd:new c({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new c({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new c({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new c({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new c({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new c({closedByChildren:["optgroup"],closedByParent:!0}),option:new c({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new c({ignoreFirstLf:!0}),listing:new c({ignoreFirstLf:!0}),style:new c({contentType:a.RAW_TEXT}),script:new c({contentType:a.RAW_TEXT}),title:new c({contentType:a.ESCAPABLE_RAW_TEXT}),textarea:new c({contentType:a.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},p=new c;t.getHtmlTagDefinition=r;var l=/^@([^:]+):(.+)/g;t.splitNsName=i,t.getNsPrefix=o},function(e,t){var n=function(){function e(){}return e.prototype.hasProperty=function(e,t){return!0},e.prototype.getMappedPropName=function(e){return e},e}();t.ElementSchemaRegistry=n},function(e,t,n){function r(e){var t=null,n=null,r=null,o=!1;e.attrs.forEach(function(e){var i=e.name.toLowerCase();i==a?t=e.value:i==l?n=e.value:i==p?r=e.value:e.name==y&&(o=!0)}),t=i(t);var g=e.name.toLowerCase(),_=v.OTHER;return s.splitNsName(g)[1]==c?_=v.NG_CONTENT:g==f?_=v.STYLE:g==d?_=v.SCRIPT:g==u&&r==h&&(_=v.STYLESHEET),new m(_,t,n,o)}function i(e){return o.isBlank(e)||0===e.length?"*":e}var o=n(5),s=n(172),a="select",c="ng-content",u="link",p="rel",l="href",h="stylesheet",f="style",d="script",y="ngNonBindable";t.preparseElement=r,function(e){e[e.NG_CONTENT=0]="NG_CONTENT",e[e.STYLE=1]="STYLE",e[e.STYLESHEET=2]="STYLESHEET",e[e.SCRIPT=3]="SCRIPT",e[e.OTHER=4]="OTHER"}(t.PreparsedElementType||(t.PreparsedElementType={}));var v=t.PreparsedElementType,m=function(){function e(e,t,n,r){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=r}return e}();t.PreparsedElement=m},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(153),s=n(5),a=n(14),c=n(60),u=n(149),p=n(148),l=n(163),h=n(6),f=n(56),d=n(169),y=n(168),v=n(174),m=function(){function e(e,t,n){this._xhr=e,this._urlResolver=t,this._htmlParser=n}return e.prototype.normalizeTemplate=function(e,t){var n=this;if(s.isPresent(t.template))return c.PromiseWrapper.resolve(this.normalizeLoadedTemplate(e,t,t.template,e.moduleUrl));if(s.isPresent(t.templateUrl)){var r=this._urlResolver.resolve(e.moduleUrl,t.templateUrl);return this._xhr.get(r).then(function(i){return n.normalizeLoadedTemplate(e,t,i,r)})}throw new a.BaseException("No template specified for component "+e.name)},e.prototype.normalizeLoadedTemplate=function(e,t,n,r){var i=this,s=this._htmlParser.parse(n,e.name);if(s.errors.length>0){var c=s.errors.join("\n");throw new a.BaseException("Template parse errors:\n"+c)}var u=new g;d.htmlVisitAll(u,s.rootNodes);var p=t.styles.concat(u.styles),h=u.styleUrls.filter(l.isStyleUrlResolvable).map(function(e){return i._urlResolver.resolve(r,e)}).concat(t.styleUrls.filter(l.isStyleUrlResolvable).map(function(t){return i._urlResolver.resolve(e.moduleUrl,t)})),y=p.map(function(e){var t=l.extractStyleUrls(i._urlResolver,r,e);return t.styleUrls.forEach(function(e){return h.push(e)}),t.style}),v=t.encapsulation;return v===f.ViewEncapsulation.Emulated&&0===y.length&&0===h.length&&(v=f.ViewEncapsulation.None),new o.CompileTemplateMetadata({encapsulation:v,template:n,templateUrl:r,styles:y,styleUrls:h,ngContentSelectors:u.ngContentSelectors})},e=r([h.Injectable(),i("design:paramtypes",[u.XHR,p.UrlResolver,y.HtmlParser])],e)}();t.TemplateNormalizer=m;var g=function(){function e(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return e.prototype.visitElement=function(e,t){var n=v.preparseElement(e);switch(n.type){case v.PreparsedElementType.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(n.selectAttr);break;case v.PreparsedElementType.STYLE:var r="";e.children.forEach(function(e){e instanceof d.HtmlTextAst&&(r+=e.value)}),this.styles.push(r);break;case v.PreparsedElementType.STYLESHEET:this.styleUrls.push(n.hrefAttr)}return n.nonBindable&&this.ngNonBindableStackCount++,d.htmlVisitAll(this,e.children),n.nonBindable&&this.ngNonBindableStackCount--,null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e}()},function(e,t,n){function r(e,t){var n=[];return l.isPresent(t)&&i(t,n),l.isPresent(e.directives)&&i(e.directives,n),n}function i(e,t){for(var n=0;n0?n:"package:"+n+P.MODULE_SUFFIX}return _.reflector.importUri(e)}var a=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},c=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},u=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},p=n(6),l=n(5),h=n(14),f=n(153),d=n(23),y=n(92),v=n(93),m=n(88),g=n(89),_=n(16),b=n(6),C=n(95),P=n(155),w=n(148),R=function(){function e(e,t,n){this._directiveResolver=e,this._viewResolver=t,this._platformDirectives=n,this._cache=new Map}return e.prototype.getMetadata=function(e){var t=this._cache.get(e);if(l.isBlank(t)){var n=this._directiveResolver.resolve(e),r=null,i=null,o=null;if(n instanceof d.ComponentMetadata){var a=n;r=s(e,a);var c=this._viewResolver.resolve(e);i=new f.CompileTemplateMetadata({encapsulation:c.encapsulation,template:c.template,templateUrl:c.templateUrl,styles:c.styles,styleUrls:c.styleUrls}),o=a.changeDetection}t=f.CompileDirectiveMetadata.create({selector:n.selector,exportAs:n.exportAs,isComponent:l.isPresent(i),dynamicLoadable:!0,type:new f.CompileTypeMetadata({name:l.stringify(e),moduleUrl:r,runtime:e}),template:i,changeDetection:o,inputs:n.inputs,outputs:n.outputs,host:n.host,lifecycleHooks:g.LIFECYCLE_HOOKS_VALUES.filter(function(t){return m.hasLifecycleHook(t,e)})}),this._cache.set(e,t)}return t},e.prototype.getViewDirectivesMetadata=function(e){for(var t=this,n=this._viewResolver.resolve(e),i=r(n,this._platformDirectives),s=0;so?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(6),a=n(5),c=n(12),u=n(178),p=n(172),l=n(173),h=a.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),f=function(e){function t(){e.apply(this,arguments),this._protoElements=new Map}return r(t,e),t.prototype._getProtoElement=function(e){var t=this._protoElements.get(e);if(a.isBlank(t)){var n=p.splitNsName(e);t=a.isPresent(n[0])?u.DOM.createElementNS(h[n[0]],n[1]):u.DOM.createElement(n[1]),this._protoElements.set(e,t)}return t},t.prototype.hasProperty=function(e,t){if(-1!==e.indexOf("-"))return!0;var n=this._getProtoElement(e);return u.DOM.hasProperty(n,t)},t.prototype.getMappedPropName=function(e){var t=c.StringMapWrapper.get(u.DOM.attrToPropMap,e);return a.isPresent(t)?t:e},t=i([s.Injectable(),o("design:paramtypes",[])],t)}(l.ElementSchemaRegistry);t.DomElementSchemaRegistry=f},function(e,t,n){function r(e){i.isBlank(t.DOM)&&(t.DOM=e)}var i=n(5);t.DOM=null,t.setRootDomAdapter=r;var o=function(){function e(){}return e}();t.DomAdapter=o},function(e,t,n){function r(e,n){u.reflector.reflectionCapabilities=new p.ReflectionCapabilities;var r=s.isPresent(n)?[t.BROWSER_APP_PROVIDERS,n]:t.BROWSER_APP_PROVIDERS;return u.platform(a.BROWSER_PROVIDERS).application(r).bootstrap(e)}var i=n(180);t.AngularEntrypoint=i.AngularEntrypoint;var o=n(181);t.BROWSER_PROVIDERS=o.BROWSER_PROVIDERS,t.ELEMENT_PROBE_BINDINGS=o.ELEMENT_PROBE_BINDINGS,t.ELEMENT_PROBE_PROVIDERS=o.ELEMENT_PROBE_PROVIDERS,t.inspectNativeElement=o.inspectNativeElement,t.BrowserDomAdapter=o.BrowserDomAdapter,t.By=o.By,t.Title=o.Title,t.DOCUMENT=o.DOCUMENT,t.enableDebugTools=o.enableDebugTools,t.disableDebugTools=o.disableDebugTools;var s=n(5),a=n(181),c=n(147),u=n(2),p=n(18),l=n(199),h=n(147),f=n(6);t.BROWSER_APP_PROVIDERS=s.CONST_EXPR([a.BROWSER_APP_COMMON_PROVIDERS,c.COMPILER_PROVIDERS,new f.Provider(h.XHR,{useClass:l.XHRImpl})]),t.bootstrap=r},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this.name=e}return e=r([o.CONST(),i("design:paramtypes",[String])],e)}();t.AngularEntrypoint=s},function(e,t,n){function r(){return new c.ExceptionHandler(l.DOM,!s.IS_DART)}function i(){return l.DOM.defaultDoc()}function o(){C.BrowserDomAdapter.makeCurrent(),w.wtfInit(),P.BrowserGetTestability.init()}var s=n(5),a=n(6),c=n(2),u=n(104),p=n(68),l=n(178),h=n(182),f=n(184),d=n(185),y=n(187),v=n(188),m=n(196),g=n(196),_=n(195),b=n(189),C=n(197),P=n(200),w=n(201),R=n(183),E=n(187);t.DOCUMENT=E.DOCUMENT;var O=n(202);t.Title=O.Title;var S=n(203);t.DebugElementViewListener=S.DebugElementViewListener,t.ELEMENT_PROBE_PROVIDERS=S.ELEMENT_PROBE_PROVIDERS,t.ELEMENT_PROBE_BINDINGS=S.ELEMENT_PROBE_BINDINGS,t.inspectNativeElement=S.inspectNativeElement,t.By=S.By;var D=n(197);t.BrowserDomAdapter=D.BrowserDomAdapter;var T=n(206);t.enableDebugTools=T.enableDebugTools,t.disableDebugTools=T.disableDebugTools,t.BROWSER_PROVIDERS=s.CONST_EXPR([c.PLATFORM_COMMON_PROVIDERS,new a.Provider(c.PLATFORM_INITIALIZER,{useValue:o,multi:!0})]),t.BROWSER_APP_COMMON_PROVIDERS=s.CONST_EXPR([c.APPLICATION_COMMON_PROVIDERS,u.FORM_PROVIDERS,new a.Provider(c.PLATFORM_PIPES,{useValue:u.COMMON_PIPES,multi:!0}),new a.Provider(c.PLATFORM_DIRECTIVES,{useValue:u.COMMON_DIRECTIVES,multi:!0}),new a.Provider(c.ExceptionHandler,{useFactory:r,deps:[]}),new a.Provider(y.DOCUMENT,{useFactory:i,deps:[]}),new a.Provider(R.EVENT_MANAGER_PLUGINS,{useClass:h.DomEventsPlugin,multi:!0}),new a.Provider(R.EVENT_MANAGER_PLUGINS,{useClass:f.KeyEventsPlugin,multi:!0}),new a.Provider(R.EVENT_MANAGER_PLUGINS,{useClass:d.HammerGesturesPlugin,multi:!0}),new a.Provider(v.DomRenderer,{useClass:v.DomRenderer_}),new a.Provider(c.Renderer,{useExisting:v.DomRenderer}),new a.Provider(g.SharedStylesHost,{useExisting:m.DomSharedStylesHost}),m.DomSharedStylesHost,p.Testability,_.BrowserDetails,b.AnimationBuilder,R.EventManager]),t.initDomAdapter=o},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(178),a=n(2),c=n(183),u=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.supports=function(e){return!0},t.prototype.addEventListener=function(e,t,n){var r=this.manager.getZone(),i=function(e){return r.run(function(){return n(e)})};this.manager.getZone().runOutsideAngular(function(){s.DOM.on(e,t,i)})},t.prototype.addGlobalEventListener=function(e,t,n){var r=s.DOM.getGlobalEventTarget(e),i=this.manager.getZone(),o=function(e){return i.run(function(){return n(e)})};return this.manager.getZone().runOutsideAngular(function(){return s.DOM.onAndCancel(r,t,o)})},t=i([a.Injectable(),o("design:paramtypes",[])],t)}(c.EventManagerPlugin);t.DomEventsPlugin=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(5),a=n(14),c=n(6),u=n(66),p=n(12);t.EVENT_MANAGER_PLUGINS=s.CONST_EXPR(new c.OpaqueToken("EventManagerPlugins"));var l=function(){function e(e,t){var n=this;this._zone=t,e.forEach(function(e){return e.manager=n}),this._plugins=p.ListWrapper.reversed(e)}return e.prototype.addEventListener=function(e,t,n){var r=this._findPluginFor(t);r.addEventListener(e,t,n)},e.prototype.addGlobalEventListener=function(e,t,n){var r=this._findPluginFor(t);return r.addGlobalEventListener(e,t,n)},e.prototype.getZone=function(){return this._zone},e.prototype._findPluginFor=function(e){for(var t=this._plugins,n=0;no?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(178),a=n(5),c=n(12),u=n(183),p=n(6),l=["alt","control","meta","shift"],h={alt:function(e){return e.altKey},control:function(e){return e.ctrlKey},meta:function(e){return e.metaKey},shift:function(e){return e.shiftKey}},f=function(e){function t(){e.call(this)}return r(t,e),t.prototype.supports=function(e){return a.isPresent(t.parseEventName(e))},t.prototype.addEventListener=function(e,n,r){var i=t.parseEventName(n),o=t.eventCallback(e,c.StringMapWrapper.get(i,"fullKey"),r,this.manager.getZone());this.manager.getZone().runOutsideAngular(function(){s.DOM.on(e,c.StringMapWrapper.get(i,"domEventName"),o)})},t.parseEventName=function(e){var n=e.toLowerCase().split("."),r=n.shift();if(0===n.length||!a.StringWrapper.equals(r,"keydown")&&!a.StringWrapper.equals(r,"keyup"))return null;var i=t._normalizeKey(n.pop()),o="";if(l.forEach(function(e){c.ListWrapper.contains(n,e)&&(c.ListWrapper.remove(n,e),o+=e+".")}),o+=i,0!=n.length||0===i.length)return null;var s=c.StringMapWrapper.create();return c.StringMapWrapper.set(s,"domEventName",r),c.StringMapWrapper.set(s,"fullKey",o),s},t.getEventFullKey=function(e){var t="",n=s.DOM.getEventKey(e);return n=n.toLowerCase(),a.StringWrapper.equals(n," ")?n="space":a.StringWrapper.equals(n,".")&&(n="dot"),l.forEach(function(r){if(r!=n){var i=c.StringMapWrapper.get(h,r);i(e)&&(t+=r+".")}}),t+=n},t.eventCallback=function(e,n,r,i){return function(e){a.StringWrapper.equals(t.getEventFullKey(e),n)&&i.run(function(){return r(e)})}},t._normalizeKey=function(e){switch(e){case"esc":return"escape";default:return e}},t=i([p.Injectable(),o("design:paramtypes",[])],t)}(u.EventManagerPlugin);t.KeyEventsPlugin=f},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(186),a=n(5),c=n(14),u=n(6),p=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.supports=function(t){if(!e.prototype.supports.call(this,t))return!1;if(!a.isPresent(window.Hammer))throw new c.BaseException("Hammer.js is not loaded, can not bind "+t+" event");return!0},t.prototype.addEventListener=function(e,t,n){var r=this.manager.getZone();t=t.toLowerCase(),r.runOutsideAngular(function(){var i=new Hammer(e);i.get("pinch").set({enable:!0}),i.get("rotate").set({enable:!0}),i.on(t,function(e){r.run(function(){n(e)})})})},t=i([u.Injectable(),o("design:paramtypes",[])],t)}(s.HammerGesturesPluginCommon);t.HammerGesturesPlugin=p},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(183),o=n(12),s={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},a=function(e){function t(){e.call(this)}return r(t,e),t.prototype.supports=function(e){return e=e.toLowerCase(),o.StringMapWrapper.contains(s,e)},t}(i.EventManagerPlugin);t.HammerGesturesPluginCommon=a},function(e,t,n){var r=n(6),i=n(5);t.DOCUMENT=i.CONST_EXPR(new r.OpaqueToken("DocumentToken"))},function(e,t,n){function r(e){return e}function i(e){return e.nodes}function o(e,t){var n=R.DOM.parentElement(e);if(t.length>0&&d.isPresent(n)){var r=R.DOM.nextSibling(e);if(d.isPresent(r))for(var i=0;io?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},p=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},l=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},h=n(6),f=n(189),d=n(5),y=n(14),v=n(196),m=n(45),g=n(2),_=n(183),b=n(187),C=n(164),P=n(165),w=n(3),R=n(178),E=n(194),O=d.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),S="template bindings={}",D=/^template bindings=(.*)$/g,T=function(e){function t(){e.apply(this,arguments)}return c(t,e),t.prototype.getNativeElementSync=function(e){return r(e.renderView).boundElements[e.boundElementIndex]},t.prototype.getRootNodes=function(e){return i(e)},t.prototype.attachFragmentAfterFragment=function(e,t){var n=i(e);if(n.length>0){var r=n[n.length-1],s=i(t);o(r,s),this.animateNodesEnter(s)}},t.prototype.animateNodesEnter=function(e){for(var t=0;to?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(190),a=n(195),c=function(){function e(e){this.browserDetails=e}return e.prototype.css=function(){return new s.CssAnimationBuilder(this.browserDetails)},e=r([o.Injectable(),i("design:paramtypes",[a.BrowserDetails])],e)}();t.AnimationBuilder=c},function(e,t,n){var r=n(191),i=n(192),o=function(){function e(e){this.browserDetails=e,this.data=new r.CssAnimationOptions}return e.prototype.addAnimationClass=function(e){return this.data.animationClasses.push(e),this},e.prototype.addClass=function(e){return this.data.classesToAdd.push(e),this},e.prototype.removeClass=function(e){return this.data.classesToRemove.push(e),this},e.prototype.setDuration=function(e){return this.data.duration=e,this},e.prototype.setDelay=function(e){return this.data.delay=e,this},e.prototype.setStyles=function(e,t){return this.setFromStyles(e).setToStyles(t)},e.prototype.setFromStyles=function(e){return this.data.fromStyles=e,this},e.prototype.setToStyles=function(e){return this.data.toStyles=e,this},e.prototype.start=function(e){return new i.Animation(e,this.data,this.browserDetails)},e}();t.CssAnimationBuilder=o},function(e,t){var n=function(){function e(){this.classesToAdd=[],this.classesToRemove=[],this.animationClasses=[]}return e}();t.CssAnimationOptions=n},function(e,t,n){var r=n(5),i=n(193),o=n(194),s=n(12),a=n(178),c=function(){function e(e,t,n){var i=this;this.element=e,this.data=t,this.browserDetails=n,this.callbacks=[],this.eventClearFunctions=[],this.completed=!1,this._stringPrefix="",this.startTime=r.DateWrapper.toMillis(r.DateWrapper.now()),this._stringPrefix=a.DOM.getAnimationPrefix(),this.setup(),this.wait(function(e){return i.start()})}return Object.defineProperty(e.prototype,"totalTime",{get:function(){var e=null!=this.computedDelay?this.computedDelay:0,t=null!=this.computedDuration?this.computedDuration:0;return e+t},enumerable:!0,configurable:!0}),e.prototype.wait=function(e){this.browserDetails.raf(e,2)},e.prototype.setup=function(){null!=this.data.fromStyles&&this.applyStyles(this.data.fromStyles),null!=this.data.duration&&this.applyStyles({transitionDuration:this.data.duration.toString()+"ms"}),null!=this.data.delay&&this.applyStyles({transitionDelay:this.data.delay.toString()+"ms"})},e.prototype.start=function(){this.addClasses(this.data.classesToAdd),this.addClasses(this.data.animationClasses),this.removeClasses(this.data.classesToRemove),null!=this.data.toStyles&&this.applyStyles(this.data.toStyles);var e=a.DOM.getComputedStyle(this.element);this.computedDelay=i.Math.max(this.parseDurationString(e.getPropertyValue(this._stringPrefix+"transition-delay")),this.parseDurationString(this.element.style.getPropertyValue(this._stringPrefix+"transition-delay"))),this.computedDuration=i.Math.max(this.parseDurationString(e.getPropertyValue(this._stringPrefix+"transition-duration")),this.parseDurationString(this.element.style.getPropertyValue(this._stringPrefix+"transition-duration"))),this.addEvents()},e.prototype.applyStyles=function(e){var t=this;s.StringMapWrapper.forEach(e,function(e,n){var i=o.camelCaseToDashCase(n);r.isPresent(a.DOM.getStyle(t.element,i))?a.DOM.setStyle(t.element,i,e.toString()):a.DOM.setStyle(t.element,t._stringPrefix+i,e.toString())})},e.prototype.addClasses=function(e){for(var t=0,n=e.length;n>t;t++)a.DOM.addClass(this.element,e[t])},e.prototype.removeClasses=function(e){for(var t=0,n=e.length;n>t;t++)a.DOM.removeClass(this.element,e[t])},e.prototype.addEvents=function(){var e=this;this.totalTime>0?this.eventClearFunctions.push(a.DOM.onAndCancel(this.element,a.DOM.getTransitionEnd(),function(t){return e.handleAnimationEvent(t)})):this.handleAnimationCompleted()},e.prototype.handleAnimationEvent=function(e){var t=i.Math.round(1e3*e.elapsedTime);this.browserDetails.elapsedTimeIncludesDelay||(t+=this.computedDelay),e.stopPropagation(),t>=this.totalTime&&this.handleAnimationCompleted()},e.prototype.handleAnimationCompleted=function(){this.removeClasses(this.data.animationClasses),this.callbacks.forEach(function(e){return e()}),this.callbacks=[],this.eventClearFunctions.forEach(function(e){return e()}),this.eventClearFunctions=[],this.completed=!0},e.prototype.onComplete=function(e){return this.completed?e():this.callbacks.push(e),this},e.prototype.parseDurationString=function(e){var t=0;if(null==e||e.length<2)return t;if("ms"==e.substring(e.length-2)){var n=r.NumberWrapper.parseInt(this.stripLetters(e),10);n>t&&(t=n)}else if("s"==e.substring(e.length-1)){var o=1e3*r.NumberWrapper.parseFloat(this.stripLetters(e)),n=i.Math.floor(o);n>t&&(t=n)}return t},e.prototype.stripLetters=function(e){return r.StringWrapper.replaceAll(e,r.RegExpWrapper.create("[^0-9]+$",""),"")},e}();t.Animation=c},function(e,t,n){var r=n(5);t.Math=r.global.Math,t.NaN=typeof t.NaN},function(e,t,n){function r(e){return o.StringWrapper.replaceAllMapped(e,s,function(e){return"-"+e[1].toLowerCase()})}function i(e){return o.StringWrapper.replaceAllMapped(e,a,function(e){return e[1].toUpperCase()})}var o=n(5),s=/([A-Z])/g,a=/-([a-z])/g;t.camelCaseToDashCase=r,t.dashCaseToCamelCase=i},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(6),s=n(193),a=n(178),c=function(){function e(){this.elapsedTimeIncludesDelay=!1,this.doesElapsedTimeIncludesDelay()}return e.prototype.doesElapsedTimeIncludesDelay=function(){var e=this,t=a.DOM.createElement("div");a.DOM.setAttribute(t,"style","position: absolute; top: -9999px; left: -9999px; width: 1px;\n height: 1px; transition: all 1ms linear 1ms;"),this.raf(function(n){a.DOM.on(t,"transitionend",function(n){var r=s.Math.round(1e3*n.elapsedTime);e.elapsedTimeIncludesDelay=2==r,a.DOM.remove(t)}),a.DOM.setStyle(t,"width","2px")},2)},e.prototype.raf=function(e,t){void 0===t&&(t=1);var n=new u(e,t);return function(){return n.cancel()}},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.BrowserDetails=c;var u=function(){function e(e,t){this.callback=e,this.frames=t,this._raf()}return e.prototype._raf=function(){var e=this;this.currentFrameId=a.DOM.requestAnimationFrame(function(t){return e._nextFrame(t)})},e.prototype._nextFrame=function(e){this.frames--,this.frames>0?this._raf():this.callback(e)},e.prototype.cancel=function(){a.DOM.cancelAnimationFrame(this.currentFrameId),this.currentFrameId=null},e}()},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(178),c=n(6),u=n(12),p=n(187),l=function(){function e(){this._styles=[],this._stylesSet=new Set}return e.prototype.addStyles=function(e){var t=this,n=[];e.forEach(function(e){u.SetWrapper.has(t._stylesSet,e)||(t._stylesSet.add(e),t._styles.push(e),n.push(e))}),this.onStylesAdded(n)},e.prototype.onStylesAdded=function(e){},e.prototype.getAllStyles=function(){return this._styles},e=i([c.Injectable(),o("design:paramtypes",[])],e)}();t.SharedStylesHost=l;var h=function(e){function t(t){e.call(this),this._hostNodes=new Set,this._hostNodes.add(t.head)}return r(t,e),t.prototype._addStylesToHost=function(e,t){for(var n=0;n0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,n=e.attributes,r=0;r=200&&300>=i?t.resolve(r):t.reject("Failed to load "+e,null)},n.onerror=function(){t.reject("Failed to load "+e,null)},n.send(),t.promise},t}(s.XHR);t.XHRImpl=a},function(e,t,n){var r=n(5),i=n(178),o=n(2),s=function(){function e(e){this._testability=e}return e.prototype.isStable=function(){return this._testability.isStable()},e.prototype.whenStable=function(e){this._testability.whenStable(e)},e.prototype.findBindings=function(e,t,n){return this.findProviders(e,t,n)},e.prototype.findProviders=function(e,t,n){return this._testability.findBindings(e,t,n)},e}(),a=function(){function e(){}return e.init=function(){o.setTestabilityGetter(new e)},e.prototype.addToWindow=function(e){r.global.getAngularTestability=function(t,n){void 0===n&&(n=!0);var r=e.findTestabilityInTree(t,n);if(null==r)throw new Error("Could not find testability for element.");return new s(r)},r.global.getAllAngularTestabilities=function(){var t=e.getAllTestabilities();return t.map(function(e){return new s(e)})}},e.prototype.findTestabilityInTree=function(e,t,n){if(null==t)return null;var o=e.getTestability(t);return r.isPresent(o)?o:n?i.DOM.isShadowRoot(t)?this.findTestabilityInTree(e,i.DOM.getHost(t),!0):this.findTestabilityInTree(e,i.DOM.parentElement(t),!0):null},e}();t.BrowserGetTestability=a},function(e,t){function n(){}t.wtfInit=n},function(e,t,n){var r=n(178),i=function(){function e(){}return e.prototype.getTitle=function(){return r.DOM.getTitle()},e.prototype.setTitle=function(e){r.DOM.setTitle(e)},e}();t.Title=i},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(178);t.DOM=i.DOM,t.setRootDomAdapter=i.setRootDomAdapter,t.DomAdapter=i.DomAdapter;var o=n(188);t.DomRenderer=o.DomRenderer;var s=n(187);t.DOCUMENT=s.DOCUMENT;var a=n(196);t.SharedStylesHost=a.SharedStylesHost,t.DomSharedStylesHost=a.DomSharedStylesHost;var c=n(182);t.DomEventsPlugin=c.DomEventsPlugin;var u=n(183);t.EVENT_MANAGER_PLUGINS=u.EVENT_MANAGER_PLUGINS,t.EventManager=u.EventManager,t.EventManagerPlugin=u.EventManagerPlugin,r(n(204)),r(n(205))},function(e,t,n){var r=n(5),i=n(178),o=function(){function e(){}return e.all=function(){return function(e){return!0}},e.css=function(e){return function(t){return r.isPresent(t.nativeElement)?i.DOM.elementMatches(t.nativeElement,e):!1}},e.directive=function(e){return function(t){return t.hasDirective(e)}},e}();t.By=o},function(e,t,n){function r(e,t){c.isPresent(e)&&h.DOM.isElementNode(e)&&h.DOM.setData(e,y,t.join(m))}function i(e){var t=h.DOM.getData(e,y);return c.isPresent(t)?t.split(m).map(function(e){return c.NumberWrapper.parseInt(e,10)}):null}function o(e){var t=i(e);if(c.isPresent(t)){var n=_.get(t[0]);if(c.isPresent(n))return new d.DebugElement_(n,t[1])}return null}var s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=n(5),u=n(12),p=n(6),l=n(86),h=n(178),f=n(72),d=n(101),y="ngid",v="ng.probe",m="#",g=new u.Map,_=new u.Map,b=0;t.inspectNativeElement=o;var C=function(){function e(e){this._renderer=e,h.DOM.setGlobalVar(v,o)}return e.prototype.onViewCreated=function(e){var t=b++;_.set(t,e),g.set(e,t);for(var n=0;nc||s.DOM.performanceNow()-a<500;)this.appRef.tick(),c++;var u=s.DOM.performanceNow();t&&r&&o.window.console.profileEnd(n);var p=(u-a)/c;o.window.console.log("ran "+c+" change detection cycles"),o.window.console.log(i.NumberWrapper.toFixed(p,2)+" ms per check")},e}();t.AngularProfiler=c},function(e,t){var n=window;t.window=n,t.document=window.document,t.location=window.location,t.gc=window.gc?function(){return window.gc()}:function(){return null},t.performance=window.performance?window.performance:null,t.Event=window.Event,t.MouseEvent=window.MouseEvent,t.KeyboardEvent=window.KeyboardEvent,t.EventTarget=window.EventTarget,t.History=window.History,t.Location=window.Location,t.EventListener=window.EventListener},function(e,t,n){var r=n(2),i=n(210),o=n(218),s=n(222),a=n(221),c=n(223),u=n(216),p=n(220),l=n(212);t.Request=l.Request;var h=n(219);t.Response=h.Response;var f=n(211);t.Connection=f.Connection,t.ConnectionBackend=f.ConnectionBackend;var d=n(221);t.BrowserXhr=d.BrowserXhr;var y=n(216);t.BaseRequestOptions=y.BaseRequestOptions,t.RequestOptions=y.RequestOptions;var v=n(220);t.BaseResponseOptions=v.BaseResponseOptions,t.ResponseOptions=v.ResponseOptions;var m=n(218);t.XHRBackend=m.XHRBackend,t.XHRConnection=m.XHRConnection;var g=n(222);t.JSONPBackend=g.JSONPBackend,t.JSONPConnection=g.JSONPConnection;var _=n(210);t.Http=_.Http,t.Jsonp=_.Jsonp;var b=n(213);t.Headers=b.Headers;var C=n(215);t.ResponseType=C.ResponseType,t.ReadyState=C.ReadyState,t.RequestMethod=C.RequestMethod;var P=n(217);t.URLSearchParams=P.URLSearchParams,t.HTTP_PROVIDERS=[r.provide(i.Http,{useFactory:function(e,t){return new i.Http(e,t)},deps:[o.XHRBackend,u.RequestOptions]}),a.BrowserXhr,r.provide(u.RequestOptions,{useClass:u.BaseRequestOptions}),r.provide(p.ResponseOptions,{useClass:p.BaseResponseOptions}),o.XHRBackend],t.HTTP_BINDINGS=t.HTTP_PROVIDERS,t.JSONP_PROVIDERS=[r.provide(i.Jsonp,{useFactory:function(e,t){return new i.Jsonp(e,t)},deps:[s.JSONPBackend,u.RequestOptions]}),c.BrowserJsonp,r.provide(u.RequestOptions,{useClass:u.BaseRequestOptions}),r.provide(p.ResponseOptions,{useClass:p.BaseResponseOptions}),r.provide(s.JSONPBackend,{useClass:s.JSONPBackend_})],t.JSON_BINDINGS=t.JSONP_PROVIDERS},function(e,t,n){function r(e,t){return e.createConnection(t).response}function i(e,t,n,r){var i=e;return c.isPresent(t)?i.merge(new f.RequestOptions({method:t.method||n,url:t.url||r,search:t.search,headers:t.headers,body:t.body})):c.isPresent(n)?i.merge(new f.RequestOptions({method:n,url:r})):i.merge(new f.RequestOptions({url:r}))}var o=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=n(5),u=n(14),p=n(2),l=n(211),h=n(212),f=n(216),d=n(215),y=function(){function e(e,t){this._backend=e,this._defaultOptions=t}return e.prototype.request=function(e,t){var n;if(c.isString(e))n=r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Get,e)));else{if(!(e instanceof h.Request))throw u.makeTypeError("First argument must be a url string or Request instance.");n=r(this._backend,e)}return n},e.prototype.get=function(e,t){return r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Get,e)))},e.prototype.post=function(e,t,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:t})),n,d.RequestMethod.Post,e)))},e.prototype.put=function(e,t,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:t})),n,d.RequestMethod.Put,e)))},e.prototype["delete"]=function(e,t){return r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Delete,e)))},e.prototype.patch=function(e,t,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:t})),n,d.RequestMethod.Patch,e)))},e.prototype.head=function(e,t){return r(this._backend,new h.Request(i(this._defaultOptions,t,d.RequestMethod.Head,e)))},e=s([p.Injectable(),a("design:paramtypes",[l.ConnectionBackend,f.RequestOptions])],e)}();t.Http=y;var v=function(e){function t(t,n){e.call(this,t,n)}return o(t,e),t.prototype.request=function(e,t){var n;if(c.isString(e)&&(e=new h.Request(i(this._defaultOptions,t,d.RequestMethod.Get,e))),!(e instanceof h.Request))throw u.makeTypeError("First argument must be a url string or Request instance.");return e.method!==d.RequestMethod.Get&&u.makeTypeError("JSONP requests must use GET request method."),n=r(this._backend,e)},t=s([p.Injectable(),a("design:paramtypes",[l.ConnectionBackend,f.RequestOptions])],t)}(y);t.Jsonp=v},function(e,t){var n=function(){function e(){}return e}();t.ConnectionBackend=n;var r=function(){function e(){}return e}();t.Connection=r},function(e,t,n){var r=n(213),i=n(214),o=n(5),s=function(){function e(e){var t=e.url;if(this.url=e.url,o.isPresent(e.search)){var n=e.search.toString();if(n.length>0){var s="?";o.StringWrapper.contains(this.url,"?")&&(s="&"==this.url[this.url.length-1]?"":"&"),this.url=t+s+n}}this._body=e.body,this.method=i.normalizeMethodName(e.method),this.headers=new r.Headers(e.headers)}return e.prototype.text=function(){return o.isPresent(this._body)?this._body.toString():""},e}();t.Request=s},function(e,t,n){var r=n(5),i=n(14),o=n(12),s=function(){function e(t){var n=this;return t instanceof e?void(this._headersMap=t._headersMap):(this._headersMap=new o.Map,void(r.isBlank(t)||o.StringMapWrapper.forEach(t,function(e,t){n._headersMap.set(t,o.isListLikeIterable(e)?e:[e])})))}return e.fromResponseHeaderString=function(t){return t.trim().split("\n").map(function(e){return e.split(":")}).map(function(e){var t=e[0],n=e.slice(1);return[t.trim(),n.join(":").trim()]}).reduce(function(e,t){var n=t[0],r=t[1];return!e.set(n,r)&&e},new e)},e.prototype.append=function(e,t){var n=this._headersMap.get(e),r=o.isListLikeIterable(n)?n:[];r.push(t),this._headersMap.set(e,r)},e.prototype["delete"]=function(e){this._headersMap["delete"](e)},e.prototype.forEach=function(e){this._headersMap.forEach(e)},e.prototype.get=function(e){return o.ListWrapper.first(this._headersMap.get(e))},e.prototype.has=function(e){return this._headersMap.has(e)},e.prototype.keys=function(){return o.MapWrapper.keys(this._headersMap)},e.prototype.set=function(e,t){var n=[];if(o.isListLikeIterable(t)){var r=t.join(",");n.push(r)}else n.push(t);this._headersMap.set(e,n)},e.prototype.values=function(){return o.MapWrapper.values(this._headersMap)},e.prototype.toJSON=function(){return r.Json.stringify(this.values())},e.prototype.getAll=function(e){var t=this._headersMap.get(e);return o.isListLikeIterable(t)?t:[]},e.prototype.entries=function(){throw new i.BaseException('"entries" method is not implemented on Headers class')},e}();t.Headers=s},function(e,t,n){function r(e){if(o.isString(e)){var t=e;if(e=e.replace(/(\w)(\w*)/g,function(e,t,n){return t.toUpperCase()+n.toLowerCase()}),e=s.RequestMethod[e],"number"!=typeof e)throw a.makeTypeError('Invalid request method. The method "'+t+'" is not supported.')}return e}function i(e){return"responseURL"in e?e.responseURL:/^X-Request-URL:/m.test(e.getAllResponseHeaders())?e.getResponseHeader("X-Request-URL"):void 0}var o=n(5),s=n(215),a=n(14);t.normalizeMethodName=r,t.isSuccess=function(e){return e>=200&&300>e},t.getResponseURL=i;var c=n(5);t.isJsObject=c.isJsObject},function(e,t){!function(e){e[e.Get=0]="Get",e[e.Post=1]="Post",e[e.Put=2]="Put",e[e.Delete=3]="Delete",e[e.Options=4]="Options",e[e.Head=5]="Head",e[e.Patch=6]="Patch"}(t.RequestMethod||(t.RequestMethod={}));t.RequestMethod;!function(e){e[e.Unsent=0]="Unsent",e[e.Open=1]="Open",e[e.HeadersReceived=2]="HeadersReceived",e[e.Loading=3]="Loading",e[e.Done=4]="Done",e[e.Cancelled=5]="Cancelled"}(t.ReadyState||(t.ReadyState={}));t.ReadyState;!function(e){e[e.Basic=0]="Basic",e[e.Cors=1]="Cors",e[e.Default=2]="Default",e[e.Error=3]="Error",e[e.Opaque=4]="Opaque"}(t.ResponseType||(t.ResponseType={}));t.ResponseType},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(5),a=n(213),c=n(215),u=n(2),p=n(217),l=n(214),h=function(){function e(e){var t=void 0===e?{}:e,n=t.method,r=t.headers,i=t.body,o=t.url,a=t.search;this.method=s.isPresent(n)?l.normalizeMethodName(n):null,this.headers=s.isPresent(r)?r:null,this.body=s.isPresent(i)?i:null,this.url=s.isPresent(o)?o:null,this.search=s.isPresent(a)?s.isString(a)?new p.URLSearchParams(a):a:null}return e.prototype.merge=function(t){return new e({method:s.isPresent(t)&&s.isPresent(t.method)?t.method:this.method,headers:s.isPresent(t)&&s.isPresent(t.headers)?t.headers:this.headers,body:s.isPresent(t)&&s.isPresent(t.body)?t.body:this.body,url:s.isPresent(t)&&s.isPresent(t.url)?t.url:this.url,search:s.isPresent(t)&&s.isPresent(t.search)?s.isString(t.search)?new p.URLSearchParams(t.search):t.search.clone():this.search})},e}();t.RequestOptions=h;var f=function(e){function t(){e.call(this,{method:c.RequestMethod.Get,headers:new a.Headers})}return r(t,e),t=i([u.Injectable(),o("design:paramtypes",[])],t)}(h);t.BaseRequestOptions=f},function(e,t,n){function r(e){void 0===e&&(e="");var t=new o.Map;if(e.length>0){var n=e.split("&");n.forEach(function(e){var n=e.split("="),r=n[0],o=n[1],s=i.isPresent(t.get(r))?t.get(r):[];s.push(o),t.set(r,s)})}return t}var i=n(5),o=n(12),s=function(){function e(e){void 0===e&&(e=""),this.rawParams=e,this.paramsMap=r(e)}return e.prototype.clone=function(){var t=new e;return t.appendAll(this),t},e.prototype.has=function(e){return this.paramsMap.has(e)},e.prototype.get=function(e){var t=this.paramsMap.get(e);return o.isListLikeIterable(t)?o.ListWrapper.first(t):null},e.prototype.getAll=function(e){var t=this.paramsMap.get(e);return i.isPresent(t)?t:[]},e.prototype.set=function(e,t){var n=this.paramsMap.get(e),r=i.isPresent(n)?n:[];o.ListWrapper.clear(r),r.push(t),this.paramsMap.set(e,r)},e.prototype.setAll=function(e){var t=this;e.paramsMap.forEach(function(e,n){var r=t.paramsMap.get(n),s=i.isPresent(r)?r:[];o.ListWrapper.clear(s),s.push(e[0]),t.paramsMap.set(n,s)})},e.prototype.append=function(e,t){var n=this.paramsMap.get(e),r=i.isPresent(n)?n:[];r.push(t),this.paramsMap.set(e,r)},e.prototype.appendAll=function(e){var t=this;e.paramsMap.forEach(function(e,n){for(var r=t.paramsMap.get(n),o=i.isPresent(r)?r:[],s=0;so?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(215),s=n(219),a=n(213),c=n(220),u=n(2),p=n(221),l=n(5),h=n(62),f=n(214),d=function(){function e(e,t,n){var r=this;this.request=e,this.response=new h.Observable(function(i){var u=t.build();u.open(o.RequestMethod[e.method].toUpperCase(),e.url);var p=function(){var e=l.isPresent(u.response)?u.response:u.responseText,t=a.Headers.fromResponseHeaderString(u.getAllResponseHeaders()),r=f.getResponseURL(u),o=1223===u.status?204:u.status;0===o&&(o=e?200:0);var p=new c.ResponseOptions({body:e,status:o,headers:t,url:r});l.isPresent(n)&&(p=n.merge(p));var h=new s.Response(p);return f.isSuccess(o)?(i.next(h),void i.complete()):void i.error(h)},h=function(e){var t=new c.ResponseOptions({body:e,type:o.ResponseType.Error});l.isPresent(n)&&(t=n.merge(t)),i.error(new s.Response(t))};return l.isPresent(e.headers)&&e.headers.forEach(function(e,t){return u.setRequestHeader(t,e.join(","))}),u.addEventListener("load",p),u.addEventListener("error",h),u.send(r.request.text()),function(){u.removeEventListener("load",p),u.removeEventListener("error",h),u.abort()}})}return e}();t.XHRConnection=d;var y=function(){function e(e,t){this._browserXHR=e,this._baseResponseOptions=t}return e.prototype.createConnection=function(e){return new d(e,this._browserXHR,this._baseResponseOptions)},e=r([u.Injectable(),i("design:paramtypes",[p.BrowserXhr,c.ResponseOptions])],e)}();t.XHRBackend=y},function(e,t,n){var r=n(5),i=n(14),o=n(214),s=function(){function e(e){this._body=e.body,this.status=e.status,this.statusText=e.statusText,this.headers=e.headers,this.type=e.type,this.url=e.url}return e.prototype.blob=function(){throw new i.BaseException('"blob()" method not implemented on Response superclass')},e.prototype.json=function(){var e;return o.isJsObject(this._body)?e=this._body:r.isString(this._body)&&(e=r.Json.parse(this._body)),e},e.prototype.text=function(){return this._body.toString()},e.prototype.arrayBuffer=function(){throw new i.BaseException('"arrayBuffer()" method not implemented on Response superclass')},e}();t.Response=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(2),a=n(5),c=n(213),u=n(215),p=function(){function e(e){var t=void 0===e?{}:e,n=t.body,r=t.status,i=t.headers,o=t.statusText,s=t.type,c=t.url;this.body=a.isPresent(n)?n:null,this.status=a.isPresent(r)?r:null,this.headers=a.isPresent(i)?i:null,this.statusText=a.isPresent(o)?o:null,this.type=a.isPresent(s)?s:null,this.url=a.isPresent(c)?c:null}return e.prototype.merge=function(t){return new e({body:a.isPresent(t)&&a.isPresent(t.body)?t.body:this.body,status:a.isPresent(t)&&a.isPresent(t.status)?t.status:this.status,headers:a.isPresent(t)&&a.isPresent(t.headers)?t.headers:this.headers,statusText:a.isPresent(t)&&a.isPresent(t.statusText)?t.statusText:this.statusText,type:a.isPresent(t)&&a.isPresent(t.type)?t.type:this.type,url:a.isPresent(t)&&a.isPresent(t.url)?t.url:this.url})},e}();t.ResponseOptions=p;var l=function(e){function t(){e.call(this,{status:200,statusText:"Ok",type:u.ResponseType.Default,headers:new c.Headers})}return r(t,e),t=i([s.Injectable(),o("design:paramtypes",[])],t)}(p);t.BaseResponseOptions=l},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=function(){function e(){}return e.prototype.build=function(){return new XMLHttpRequest},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.BrowserXhr=s},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(211),a=n(215),c=n(219),u=n(220),p=n(2),l=n(223),h=n(14),f=n(5),d=n(62),y="JSONP injected script did not invoke callback.",v="JSONP requests must use GET request method.",m=function(){function e(){}return e}();t.JSONPConnection=m;var g=function(e){function t(t,n,r){var i=this;if(e.call(this),this._dom=n,this.baseResponseOptions=r,this._finished=!1,t.method!==a.RequestMethod.Get)throw h.makeTypeError(v);this.request=t,this.response=new d.Observable(function(e){i.readyState=a.ReadyState.Loading;var o=i._id=n.nextRequestID();n.exposeConnection(o,i);var s=n.requestCallback(i._id),p=t.url;p.indexOf("=JSONP_CALLBACK&")>-1?p=f.StringWrapper.replace(p,"=JSONP_CALLBACK&","="+s+"&"):p.lastIndexOf("=JSONP_CALLBACK")===p.length-"=JSONP_CALLBACK".length&&(p=p.substring(0,p.length-"=JSONP_CALLBACK".length)+("="+s));var l=i._script=n.build(p),h=function(t){if(i.readyState!==a.ReadyState.Cancelled){if(i.readyState=a.ReadyState.Done,n.cleanup(l),!i._finished){var o=new u.ResponseOptions({body:y,type:a.ResponseType.Error,url:p});return f.isPresent(r)&&(o=r.merge(o)),void e.error(new c.Response(o))}var s=new u.ResponseOptions({body:i._responseData,url:p});f.isPresent(i.baseResponseOptions)&&(s=i.baseResponseOptions.merge(s)),e.next(new c.Response(s)),e.complete()}},d=function(t){if(i.readyState!==a.ReadyState.Cancelled){i.readyState=a.ReadyState.Done,n.cleanup(l);var o=new u.ResponseOptions({body:t.message,type:a.ResponseType.Error});f.isPresent(r)&&(o=r.merge(o)),e.error(new c.Response(o))}};return l.addEventListener("load",h),l.addEventListener("error",d),n.send(l),function(){i.readyState=a.ReadyState.Cancelled,l.removeEventListener("load",h),l.removeEventListener("error",d),f.isPresent(l)&&i._dom.cleanup(l)}})}return r(t,e),t.prototype.finished=function(e){this._finished=!0,this._dom.removeConnection(this._id),this.readyState!==a.ReadyState.Cancelled&&(this._responseData=e)},t}(m);t.JSONPConnection_=g;var _=function(e){function t(){e.apply(this,arguments)}return r(t,e),t}(s.ConnectionBackend);t.JSONPBackend=_;var b=function(e){function t(t,n){e.call(this),this._browserJSONP=t,this._baseResponseOptions=n}return r(t,e),t.prototype.createConnection=function(e){return new g(e,this._browserJSONP,this._baseResponseOptions)},t=i([p.Injectable(),o("design:paramtypes",[l.BrowserJsonp,u.ResponseOptions])],t)}(_);t.JSONPBackend_=b},function(e,t,n){function r(){return null===u&&(u=a.global[t.JSONP_HOME]={}),u}var i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=n(2),a=n(5),c=0;t.JSONP_HOME="__ng_jsonp__";var u=null,p=function(){function e(){}return e.prototype.build=function(e){var t=document.createElement("script");return t.src=e,t},e.prototype.nextRequestID=function(){return"__req"+c++},e.prototype.requestCallback=function(e){return t.JSONP_HOME+"."+e+".finished"},e.prototype.exposeConnection=function(e,t){var n=r();n[e]=t},e.prototype.removeConnection=function(e){var t=r();t[e]=null},e.prototype.send=function(e){document.body.appendChild(e)},e.prototype.cleanup=function(e){e.parentNode&&e.parentNode.removeChild(e)},e=i([s.Injectable(),o("design:paramtypes",[])],e)}();t.BrowserJsonp=p},function(e,t,n){function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}function i(e,t,n,r){var i=new P.RootRouter(e,t,n);return r.registerDisposeListener(function(){return i.dispose()}),i}function o(e){if(0==e.componentTypes.length)throw new T.BaseException("Bootstrap at least one component before injecting Router.");return e.componentTypes[0]}var s=n(225);t.Router=s.Router;var a=n(241);t.RouterOutlet=a.RouterOutlet;var c=n(243);t.RouterLink=c.RouterLink;var u=n(229);t.RouteParams=u.RouteParams,t.RouteData=u.RouteData;var p=n(244);t.PlatformLocation=p.PlatformLocation;var l=n(226);t.RouteRegistry=l.RouteRegistry,t.ROUTER_PRIMARY_COMPONENT=l.ROUTER_PRIMARY_COMPONENT;var h=n(238);t.LocationStrategy=h.LocationStrategy,t.APP_BASE_HREF=h.APP_BASE_HREF;var f=n(245);t.HashLocationStrategy=f.HashLocationStrategy;var d=n(246);t.PathLocationStrategy=d.PathLocationStrategy;var y=n(237);t.Location=y.Location,r(n(236)),r(n(247));var v=n(242);t.CanActivate=v.CanActivate;var m=n(229);t.Instruction=m.Instruction,t.ComponentInstruction=m.ComponentInstruction;var g=n(2);t.OpaqueToken=g.OpaqueToken;var _=n(244),b=n(238),C=n(246),P=n(225),w=n(241),R=n(243),E=n(226),O=n(237),S=n(2),D=n(5),T=n(14);t.ROUTER_DIRECTIVES=D.CONST_EXPR([w.RouterOutlet,R.RouterLink]),t.ROUTER_PROVIDERS=D.CONST_EXPR([E.RouteRegistry,D.CONST_EXPR(new S.Provider(b.LocationStrategy,{useClass:C.PathLocationStrategy})),_.PlatformLocation,O.Location,D.CONST_EXPR(new S.Provider(P.Router,{useFactory:i,deps:D.CONST_EXPR([E.RouteRegistry,O.Location,E.ROUTER_PRIMARY_COMPONENT,S.ApplicationRef])})),D.CONST_EXPR(new S.Provider(E.ROUTER_PRIMARY_COMPONENT,{useFactory:o,deps:D.CONST_EXPR([S.ApplicationRef])}))]),t.ROUTER_BINDINGS=t.ROUTER_PROVIDERS},function(e,t,n){function r(e,t){var n=v;return p.isPresent(e.child)&&(n=r(e.child,p.isPresent(t)?t.child:null)),n.then(function(n){if(0==n)return!1;if(e.component.reuse)return!0;var r=y.getCanActivateHook(e.component.componentType);return p.isPresent(r)?r(e.component,p.isPresent(t)?t.component:null):!0})}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},c=n(60),u=n(12),p=n(5),l=n(14),h=n(2),f=n(226),d=n(237),y=n(239),v=c.PromiseWrapper.resolve(!0),m=c.PromiseWrapper.resolve(!1),g=function(){function e(e,t,n){this.registry=e,this.parent=t,this.hostComponent=n,this.navigating=!1,this._currentInstruction=null,this._currentNavigation=v,this._outlet=null,this._auxRouters=new u.Map,this._subject=new c.EventEmitter}return e.prototype.childRouter=function(e){return this._childRouter=new b(this,e)},e.prototype.auxRouter=function(e){return new b(this,e)},e.prototype.registerPrimaryOutlet=function(e){if(p.isPresent(e.name))throw new l.BaseException("registerPrimaryOutlet expects to be called with an unnamed outlet.");return this._outlet=e,p.isPresent(this._currentInstruction)?this.commit(this._currentInstruction,!1):v},e.prototype.registerAuxOutlet=function(e){var t=e.name;if(p.isBlank(t))throw new l.BaseException("registerAuxOutlet expects to be called with an outlet with a name.");var n=this.auxRouter(this.hostComponent);this._auxRouters.set(t,n),n._outlet=e;var r;return p.isPresent(this._currentInstruction)&&p.isPresent(r=this._currentInstruction.auxInstruction[t])?n.commit(r):v},e.prototype.isRouteActive=function(e){for(var t=this;p.isPresent(t.parent)&&p.isPresent(e.child);)t=t.parent,e=e.child;return p.isPresent(this._currentInstruction)&&this._currentInstruction.component==e.component},e.prototype.config=function(e){var t=this;return e.forEach(function(e){t.registry.config(t.hostComponent,e)}),this.renavigate()},e.prototype.navigate=function(e){var t=this.generate(e);return this.navigateByInstruction(t,!1)},e.prototype.navigateByUrl=function(e,t){var n=this;return void 0===t&&(t=!1),this._currentNavigation=this._currentNavigation.then(function(r){return n.lastNavigationAttempt=e,n._startNavigating(),n._afterPromiseFinishNavigating(n.recognize(e).then(function(e){return p.isBlank(e)?!1:n._navigate(e,t)}))})},e.prototype.navigateByInstruction=function(e,t){var n=this;return void 0===t&&(t=!1),p.isBlank(e)?m:this._currentNavigation=this._currentNavigation.then(function(r){return n._startNavigating(),n._afterPromiseFinishNavigating(n._navigate(e,t))})},e.prototype._navigate=function(e,t){var n=this;return this._settleInstruction(e).then(function(t){return n._routerCanReuse(e)}).then(function(t){return n._canActivate(e)}).then(function(r){return r?n._routerCanDeactivate(e).then(function(r){return r?n.commit(e,t).then(function(t){return n._emitNavigationFinish(e.toRootUrl()),!0}):void 0}):!1})},e.prototype._settleInstruction=function(e){var t=this;return e.resolveComponent().then(function(n){e.component.reuse=!1;var r=[];return p.isPresent(e.child)&&r.push(t._settleInstruction(e.child)),u.StringMapWrapper.forEach(e.auxInstruction,function(e,n){r.push(t._settleInstruction(e))}), -c.PromiseWrapper.all(r)})},e.prototype._emitNavigationFinish=function(e){c.ObservableWrapper.callEmit(this._subject,e)},e.prototype._afterPromiseFinishNavigating=function(e){var t=this;return c.PromiseWrapper.catchError(e.then(function(e){return t._finishNavigating()}),function(e){throw t._finishNavigating(),e})},e.prototype._routerCanReuse=function(e){var t=this;return p.isBlank(this._outlet)?m:this._outlet.routerCanReuse(e.component).then(function(n){return e.component.reuse=n,n&&p.isPresent(t._childRouter)&&p.isPresent(e.child)?t._childRouter._routerCanReuse(e.child):void 0})},e.prototype._canActivate=function(e){return r(e,this._currentInstruction)},e.prototype._routerCanDeactivate=function(e){var t=this;if(p.isBlank(this._outlet))return v;var n,r=null,i=!1,o=null;return p.isPresent(e)&&(r=e.child,o=e.component,i=e.component.reuse),n=i?v:this._outlet.routerCanDeactivate(o),n.then(function(e){return 0==e?!1:p.isPresent(t._childRouter)?t._childRouter._routerCanDeactivate(r):!0})},e.prototype.commit=function(e,t){var n=this;void 0===t&&(t=!1),this._currentInstruction=e;var r=v;if(p.isPresent(this._outlet)){var i=e.component;r=i.reuse?this._outlet.reuse(i):this.deactivate(e).then(function(e){return n._outlet.activate(i)}),p.isPresent(e.child)&&(r=r.then(function(t){return p.isPresent(n._childRouter)?n._childRouter.commit(e.child):void 0}))}var o=[];return this._auxRouters.forEach(function(t,n){p.isPresent(e.auxInstruction[n])&&o.push(t.commit(e.auxInstruction[n]))}),r.then(function(e){return c.PromiseWrapper.all(o)})},e.prototype._startNavigating=function(){this.navigating=!0},e.prototype._finishNavigating=function(){this.navigating=!1},e.prototype.subscribe=function(e){return c.ObservableWrapper.subscribe(this._subject,e)},e.prototype.deactivate=function(e){var t=this,n=null,r=null;p.isPresent(e)&&(n=e.child,r=e.component);var i=v;return p.isPresent(this._childRouter)&&(i=this._childRouter.deactivate(n)),p.isPresent(this._outlet)&&(i=i.then(function(e){return t._outlet.deactivate(r)})),i},e.prototype.recognize=function(e){var t=this._getAncestorInstructions();return this.registry.recognize(e,t)},e.prototype._getAncestorInstructions=function(){for(var e=[],t=this;p.isPresent(t.parent)&&p.isPresent(t.parent._currentInstruction);)t=t.parent,e.unshift(t._currentInstruction);return e},e.prototype.renavigate=function(){return p.isBlank(this.lastNavigationAttempt)?this._currentNavigation:this.navigateByUrl(this.lastNavigationAttempt)},e.prototype.generate=function(e){var t=this._getAncestorInstructions();return this.registry.generate(e,t)},e}();t.Router=g;var _=function(e){function t(t,n,r){var i=this;e.call(this,t,null,r),this._location=n,this._locationSub=this._location.subscribe(function(e){i.recognize(e.url).then(function(t){i.navigateByInstruction(t,p.isPresent(e.pop)).then(function(n){if(!p.isPresent(e.pop)||"hashchange"==e.type){var r=t.toUrlPath(),o=t.toUrlQuery();r.length>0&&(r="/"+r),"hashchange"==e.type?t.toRootUrl()!=i._location.path()&&i._location.replaceState(r,o):i._location.go(r,o)}})})}),this.registry.configFromComponent(r),this.navigateByUrl(n.path())}return i(t,e),t.prototype.commit=function(t,n){var r=this;void 0===n&&(n=!1);var i=t.toUrlPath(),o=t.toUrlQuery();i.length>0&&(i="/"+i);var s=e.prototype.commit.call(this,t);return n||(s=s.then(function(e){r._location.go(i,o)})),s},t.prototype.dispose=function(){p.isPresent(this._locationSub)&&(c.ObservableWrapper.dispose(this._locationSub),this._locationSub=null)},t=o([h.Injectable(),a(2,h.Inject(f.ROUTER_PRIMARY_COMPONENT)),s("design:paramtypes",[f.RouteRegistry,d.Location,p.Type])],t)}(g);t.RootRouter=_;var b=function(e){function t(t,n){e.call(this,t.registry,t,n),this.parent=t}return i(t,e),t.prototype.navigateByUrl=function(e,t){return void 0===t&&(t=!1),this.parent.navigateByUrl(e,t)},t.prototype.navigateByInstruction=function(e,t){return void 0===t&&(t=!1),this.parent.navigateByInstruction(e,t)},t}(g)},function(e,t,n){function r(e){return e.reduce(function(e,t){if(l.isString(t)){var n=t;return e.concat(n.split("/"))}return e.push(t),e},[])}function i(e){return u.ListWrapper.maximum(e,function(e){return e.specificity})}function o(e,t){if(l.isType(e)){var n=f.reflector.annotations(e);if(l.isPresent(n))for(var r=0;ro?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},u=n(12),p=n(60),l=n(5),h=n(14),f=n(16),d=n(2),y=n(227),v=n(228),m=n(232),g=n(229),_=n(235),b=n(231),C=p.PromiseWrapper.resolve(null);t.ROUTER_PRIMARY_COMPONENT=l.CONST_EXPR(new d.OpaqueToken("RouterPrimaryComponent"));var P=function(){function e(e){this._rootComponent=e,this._rules=new u.Map}return e.prototype.config=function(e,t){t=_.normalizeRouteConfig(t,this),t instanceof y.Route?_.assertComponentExists(t.component,t.path):t instanceof y.AuxRoute&&_.assertComponentExists(t.component,t.path);var n=this._rules.get(e);l.isBlank(n)&&(n=new m.ComponentRecognizer,this._rules.set(e,n));var r=n.config(t);t instanceof y.Route&&(r?o(t.component,t.path):this.configFromComponent(t.component))},e.prototype.configFromComponent=function(e){var t=this;if(l.isType(e)&&!this._rules.has(e)){var n=f.reflector.annotations(e);if(l.isPresent(n))for(var r=0;r0?t[t.length-1].component.componentType:this._rootComponent,s=this._rules.get(o);if(l.isBlank(s))return C;var a=n?s.recognizeAuxiliary(e):s.recognize(e),c=a.map(function(e){return e.then(function(e){if(e instanceof v.PathMatch){var n=t.length>0?[t[t.length-1]]:[],i=r._auxRoutesToUnresolved(e.remainingAux,n),o=new g.ResolvedInstruction(e.instruction,null,i);if(e.instruction.terminal)return o;var s=t.concat([o]);return r._recognize(e.remaining,s).then(function(e){return l.isBlank(e)?null:e instanceof g.RedirectInstruction?e:(o.child=e,o)})}if(e instanceof v.RedirectMatch){var o=r.generate(e.redirectTo,t);return new g.RedirectInstruction(o.component,o.child,o.auxInstruction)}})});return!l.isBlank(e)&&""!=e.path||0!=a.length?p.PromiseWrapper.all(c).then(i):p.PromiseWrapper.resolve(this.generateDefault(o))},e.prototype._auxRoutesToUnresolved=function(e,t){var n=this,r={};return e.forEach(function(e){r[e.path]=new g.UnresolvedInstruction(function(){return n._recognize(e,t,!0)})}),r},e.prototype.generate=function(e,t,n){void 0===n&&(n=!1);var i=r(e),o=u.ListWrapper.first(i),s=u.ListWrapper.slice(i,1);if(""==o)t=[];else if(".."==o){for(t.pop();".."==u.ListWrapper.first(s);)if(s=u.ListWrapper.slice(s,1),t.pop(),t.length<=0)throw new h.BaseException('Link "'+u.ListWrapper.toJSON(e)+'" has too many "../" segments.')}else if("."!=o){var a=this._rootComponent,c=null;t.length>1?(a=t[t.length-1].component.componentType,c=t[t.length-2].component.componentType):1==t.length&&(a=t[0].component.componentType,c=this._rootComponent);var p=this.hasRoute(o,a),f=l.isPresent(c)&&this.hasRoute(o,c);if(f&&p){var d='Link "'+u.ListWrapper.toJSON(e)+'" is ambiguous, use "./" or "../" to disambiguate.';throw new h.BaseException(d)}f&&t.pop(),s=e}if(""==s[s.length-1]&&s.pop(),s.length<1){var d='Link "'+u.ListWrapper.toJSON(e)+'" must include a route name.';throw new h.BaseException(d)}for(var y=this._generate(s,t,n),v=t.length-1;v>=0;v--){var m=t[v];y=m.replaceChild(y)}return y},e.prototype._generate=function(e,t,n){var r=this;void 0===n&&(n=!1);var i=t.length>0?t[t.length-1].component.componentType:this._rootComponent;if(0==e.length)return this.generateDefault(i);var o=0,s=e[o];if(!l.isString(s))throw new h.BaseException('Unexpected segment "'+s+'" in link DSL. Expected a string.');if(""==s||"."==s||".."==s)throw new h.BaseException('"'+s+'/" is only allowed at the beginning of a link DSL.');var a={};if(o+10?[t[t.length-1]]:[],y=this._generate(p,d,!0);f[y.component.urlPath]=y,o+=1}var v=this._rules.get(i);if(l.isBlank(v))throw new h.BaseException('Component "'+l.getTypeNameForDebugging(i)+'" has no route config.');var m=(n?v.auxNames:v.names).get(s);if(!l.isPresent(m))throw new h.BaseException('Component "'+l.getTypeNameForDebugging(i)+'" has no route named "'+s+'".');if(!l.isPresent(m.handler.componentType)){var _=m.generateComponentPathValues(a);return new g.UnresolvedInstruction(function(){return m.handler.resolveComponentType().then(function(i){return r._generate(e,t,n)})},_.urlPath,_.urlParams)}var b=n?v.generateAuxiliary(s,a):v.generate(s,a),C=e.slice(o+1),P=new g.ResolvedInstruction(b,null,f);if(l.isPresent(b.componentType)){var w=null;if(o+1o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this.configs=e}return e=r([o.CONST(),i("design:paramtypes",[Array])],e)}();t.RouteConfig=s;var a=function(){function e(e){var t=e.path,n=e.component,r=e.name,i=e.data,o=e.useAsDefault;this.aux=null,this.loader=null,this.redirectTo=null,this.path=t,this.component=n,this.name=r,this.data=i,this.useAsDefault=o}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.Route=a;var c=function(){function e(e){var t=e.path,n=e.component,r=e.name;this.data=null,this.aux=null,this.loader=null,this.redirectTo=null,this.useAsDefault=!1,this.path=t,this.component=n,this.name=r}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.AuxRoute=c;var u=function(){function e(e){var t=e.path,n=e.loader,r=e.name,i=e.data,o=e.useAsDefault;this.aux=null,this.path=t,this.loader=n,this.name=r,this.data=i,this.useAsDefault=o}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.AsyncRoute=u;var p=function(){function e(e){var t=e.path,n=e.redirectTo;this.name=null,this.loader=null,this.data=null,this.aux=null,this.useAsDefault=!1,this.path=t,this.redirectTo=n}return e=r([o.CONST(),i("design:paramtypes",[Object])],e)}();t.Redirect=p},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(5),o=n(14),s=n(61),a=n(12),c=n(229),u=n(230),p=function(){function e(){}return e}();t.RouteMatch=p;var l=function(e){function t(t,n,r){e.call(this),this.instruction=t,this.remaining=n,this.remainingAux=r}return r(t,e),t}(p);t.PathMatch=l;var h=function(e){function t(t,n){e.call(this),this.redirectTo=t,this.specificity=n}return r(t,e),t}(p);t.RedirectMatch=h;var f=function(){function e(e,t){this.path=e,this.redirectTo=t,this._pathRecognizer=new u.PathRecognizer(e),this.hash=this._pathRecognizer.hash}return e.prototype.recognize=function(e){var t=null;return i.isPresent(this._pathRecognizer.recognize(e))&&(t=new h(this.redirectTo,this._pathRecognizer.specificity)),s.PromiseWrapper.resolve(t)},e.prototype.generate=function(e){throw new o.BaseException("Tried to generate a redirect.")},e}();t.RedirectRecognizer=f;var d=function(){function e(e,t){this.path=e,this.handler=t,this.terminal=!0,this._cache=new a.Map,this._pathRecognizer=new u.PathRecognizer(e),this.specificity=this._pathRecognizer.specificity,this.hash=this._pathRecognizer.hash,this.terminal=this._pathRecognizer.terminal}return e.prototype.recognize=function(e){var t=this,n=this._pathRecognizer.recognize(e);return i.isBlank(n)?null:this.handler.resolveComponentType().then(function(e){var r=t._getInstruction(n.urlPath,n.urlParams,n.allParams);return new l(r,n.nextSegment,n.auxiliary)})},e.prototype.generate=function(e){var t=this._pathRecognizer.generate(e),n=t.urlPath,r=t.urlParams;return this._getInstruction(n,r,e)},e.prototype.generateComponentPathValues=function(e){return this._pathRecognizer.generate(e)},e.prototype._getInstruction=function(e,t,n){if(i.isBlank(this.handler.componentType))throw new o.BaseException("Tried to get instruction before the type was loaded.");var r=e+"?"+t.join("?");if(this._cache.has(r))return this._cache.get(r);var s=new c.ComponentInstruction(e,t,this.handler.data,this.handler.componentType,this.terminal,this.specificity,n);return this._cache.set(r,s),s},e}();t.RouteRecognizer=d},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=n(12),o=n(5),s=n(60),a=function(){function e(e){this.params=e}return e.prototype.get=function(e){return o.normalizeBlank(i.StringMapWrapper.get(this.params,e))},e}();t.RouteParams=a;var c=function(){function e(e){void 0===e&&(e=o.CONST_EXPR({})),this.data=e}return e.prototype.get=function(e){return o.normalizeBlank(i.StringMapWrapper.get(this.data,e))},e}();t.RouteData=c,t.BLANK_ROUTE_DATA=new c;var u=function(){function e(){this.auxInstruction={}}return Object.defineProperty(e.prototype,"urlPath",{get:function(){return this.component.urlPath},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlParams",{get:function(){return this.component.urlParams},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specificity",{get:function(){var e=0;return o.isPresent(this.component)&&(e+=this.component.specificity),o.isPresent(this.child)&&(e+=this.child.specificity),e},enumerable:!0,configurable:!0}),e.prototype.toRootUrl=function(){return this.toUrlPath()+this.toUrlQuery()},e.prototype._toNonRootUrl=function(){return this._stringifyPathMatrixAuxPrefixed()+(o.isPresent(this.child)?this.child._toNonRootUrl():"")},e.prototype.toUrlQuery=function(){return this.urlParams.length>0?"?"+this.urlParams.join("&"):""},e.prototype.replaceChild=function(e){return new p(this.component,e,this.auxInstruction)},e.prototype.toUrlPath=function(){return this.urlPath+this._stringifyAux()+(o.isPresent(this.child)?this.child._toNonRootUrl():"")},e.prototype.toLinkUrl=function(){return this.urlPath+this._stringifyAux()+(o.isPresent(this.child)?this.child._toLinkUrl():"")},e.prototype._toLinkUrl=function(){return this._stringifyPathMatrixAuxPrefixed()+(o.isPresent(this.child)?this.child._toLinkUrl():"")},e.prototype._stringifyPathMatrixAuxPrefixed=function(){var e=this._stringifyPathMatrixAux();return e.length>0&&(e="/"+e),e},e.prototype._stringifyMatrixParams=function(){return this.urlParams.length>0?";"+this.component.urlParams.join(";"):""},e.prototype._stringifyPathMatrixAux=function(){return o.isBlank(this.component)?"":this.urlPath+this._stringifyMatrixParams()+this._stringifyAux()},e.prototype._stringifyAux=function(){var e=[];return i.StringMapWrapper.forEach(this.auxInstruction,function(t,n){e.push(t._stringifyPathMatrixAux())}),e.length>0?"("+e.join("//")+")":""},e}();t.Instruction=u;var p=function(e){function t(t,n,r){e.call(this),this.component=t,this.child=n,this.auxInstruction=r}return r(t,e),t.prototype.resolveComponent=function(){return s.PromiseWrapper.resolve(this.component)},t}(u);t.ResolvedInstruction=p;var l=function(e){function t(t,n){e.call(this),this.component=t,this.child=n}return r(t,e),t.prototype.resolveComponent=function(){return s.PromiseWrapper.resolve(this.component)},t.prototype.toLinkUrl=function(){return""},t.prototype._toLinkUrl=function(){return""},t}(u);t.DefaultInstruction=l;var h=function(e){function t(t,n,r){void 0===n&&(n=""),void 0===r&&(r=o.CONST_EXPR([])),e.call(this),this._resolver=t,this._urlPath=n,this._urlParams=r}return r(t,e),Object.defineProperty(t.prototype,"urlPath",{get:function(){return o.isPresent(this.component)?this.component.urlPath:o.isPresent(this._urlPath)?this._urlPath:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"urlParams",{get:function(){return o.isPresent(this.component)?this.component.urlParams:o.isPresent(this._urlParams)?this._urlParams:[]},enumerable:!0,configurable:!0}),t.prototype.resolveComponent=function(){var e=this;return o.isPresent(this.component)?s.PromiseWrapper.resolve(this.component):this._resolver().then(function(t){return e.child=t.child,e.component=t.component})},t}(u);t.UnresolvedInstruction=h;var f=function(e){function t(t,n,r){e.call(this,t,n,r)}return r(t,e),t}(p);t.RedirectInstruction=f;var d=function(){function e(e,n,r,i,s,a,c){void 0===c&&(c=null),this.urlPath=e,this.urlParams=n,this.componentType=i,this.terminal=s,this.specificity=a,this.params=c,this.reuse=!1,this.routeData=o.isPresent(r)?r:t.BLANK_ROUTE_DATA}return e}();t.ComponentInstruction=d},function(e,t,n){function r(e){return c.isBlank(e)?null:e.toString()}function i(e){e.startsWith("/")&&(e=e.substring(1));var t=s(e),n=[],r=0;if(t.length>98)throw new u.BaseException("'"+e+"' has more than the maximum supported number of segments.");for(var i=t.length-1,o=0;i>=o;o++){var a,l=t[o];if(c.isPresent(a=c.RegExpWrapper.firstMatch(m,l)))n.push(new y(a[1])),r+=100-o;else if(c.isPresent(a=c.RegExpWrapper.firstMatch(g,l)))n.push(new v(a[1]));else if("..."==l){if(i>o)throw new u.BaseException('Unexpected "..." before the end of the path for "'+e+'".');n.push(new f)}else n.push(new d(l)),r+=100*(100-o)}var h=p.StringMapWrapper.create();return p.StringMapWrapper.set(h,"segments",n),p.StringMapWrapper.set(h,"specificity",r),h}function o(e){return e.map(function(e){return e instanceof v?"*":e instanceof f?"...":e instanceof y?":":e instanceof d?e.path:void 0}).join("/")}function s(e){return e.split("/")}function a(e){if(c.StringWrapper.contains(e,"#"))throw new u.BaseException('Path "'+e+'" should not include "#". Use "HashLocationStrategy" instead.');var t=c.RegExpWrapper.firstMatch(_,e);if(c.isPresent(t))throw new u.BaseException('Path "'+e+'" contains "'+t[0]+'" which is not allowed in a route config.')}var c=n(5),u=n(14),p=n(12),l=n(231),h=function(){function e(e){var t=this;this.map={},this.keys={},c.isPresent(e)&&p.StringMapWrapper.forEach(e,function(e,n){t.map[n]=c.isPresent(e)?e.toString():null,t.keys[n]=!0})}return e.prototype.get=function(e){return p.StringMapWrapper["delete"](this.keys,e),this.map[e]},e.prototype.getUnused=function(){var e=this,t={},n=p.StringMapWrapper.keys(this.keys);return n.forEach(function(n){return t[n]=p.StringMapWrapper.get(e.map,n)}),t},e}(),f=function(){function e(){this.name=""}return e.prototype.generate=function(e){return""},e.prototype.match=function(e){return!0},e}(),d=function(){function e(e){this.path=e,this.name=""}return e.prototype.match=function(e){return e==this.path},e.prototype.generate=function(e){return this.path},e}(),y=function(){function e(e){this.name=e}return e.prototype.match=function(e){return e.length>0},e.prototype.generate=function(e){if(!p.StringMapWrapper.contains(e.map,this.name))throw new u.BaseException("Route generator for '"+this.name+"' was not included in parameters passed.");return r(e.get(this.name))},e}(),v=function(){function e(e){this.name=e}return e.prototype.match=function(e){return!0},e.prototype.generate=function(e){return r(e.get(this.name))},e}(),m=/^:([^\/]+)$/g,g=/^\*([^\/]+)$/g,_=c.RegExpWrapper.create("//|\\(|\\)|;|\\?|="),b=function(){function e(e){this.path=e,this.terminal=!0,a(e);var t=i(e);this._segments=t.segments,this.specificity=t.specificity,this.hash=o(this._segments);var n=this._segments[this._segments.length-1];this.terminal=!(n instanceof f)}return e.prototype.recognize=function(e){for(var t,n=e,r={},i=[],o=0;o=0;n-=1)t=new p(e[n],t);return t}function i(e){var t=c.RegExpWrapper.firstMatch(h,e);return c.isPresent(t)?t[0]:""}function o(e){var t=[];return c.isPresent(e)&&a.StringMapWrapper.forEach(e,function(e,n){1==e?t.push(n):t.push(n+"="+e)}),t}var s=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},a=n(12),c=n(5),u=n(14),p=function(){function e(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=c.CONST_EXPR([])),void 0===r&&(r=null),this.path=e,this.child=t,this.auxiliary=n,this.params=r}return e.prototype.toString=function(){return this.path+this._matrixParamsToString()+this._auxToString()+this._childString()},e.prototype.segmentToString=function(){return this.path+this._matrixParamsToString()},e.prototype._auxToString=function(){return this.auxiliary.length>0?"("+this.auxiliary.map(function(e){return e.toString()}).join("//")+")":""},e.prototype._matrixParamsToString=function(){return c.isBlank(this.params)?"":";"+o(this.params).join(";")},e.prototype._childString=function(){return c.isPresent(this.child)?"/"+this.child.toString():""},e}();t.Url=p;var l=function(e){function t(t,n,r,i){void 0===n&&(n=null),void 0===r&&(r=c.CONST_EXPR([])),void 0===i&&(i=null),e.call(this,t,n,r,i)}return s(t,e),t.prototype.toString=function(){return this.path+this._auxToString()+this._childString()+this._queryParamsToString()},t.prototype.segmentToString=function(){return this.path+this._queryParamsToString()},t.prototype._queryParamsToString=function(){return c.isBlank(this.params)?"":"?"+o(this.params).join("&")},t}(p);t.RootUrl=l,t.pathSegmentsToUrl=r;var h=c.RegExpWrapper.create("^[^\\/\\(\\)\\?;=&#]+"),f=function(){function e(){}return e.prototype.peekStartsWith=function(e){return this._remaining.startsWith(e)},e.prototype.capture=function(e){if(!this._remaining.startsWith(e))throw new u.BaseException('Expected "'+e+'".');this._remaining=this._remaining.substring(e.length)},e.prototype.parse=function(e){return this._remaining=e,""==e||"/"==e?new p(""):this.parseRoot()},e.prototype.parseRoot=function(){this.peekStartsWith("/")&&this.capture("/");var e=i(this._remaining);this.capture(e);var t=[];this.peekStartsWith("(")&&(t=this.parseAuxiliaryRoutes()),this.peekStartsWith(";")&&this.parseMatrixParams();var n=null;this.peekStartsWith("/")&&!this.peekStartsWith("//")&&(this.capture("/"),n=this.parseSegment());var r=null;return this.peekStartsWith("?")&&(r=this.parseQueryParams()),new l(e,n,t,r)},e.prototype.parseSegment=function(){if(0==this._remaining.length)return null;this.peekStartsWith("/")&&this.capture("/");var e=i(this._remaining);this.capture(e);var t=null;this.peekStartsWith(";")&&(t=this.parseMatrixParams());var n=[];this.peekStartsWith("(")&&(n=this.parseAuxiliaryRoutes());var r=null;return this.peekStartsWith("/")&&!this.peekStartsWith("//")&&(this.capture("/"),r=this.parseSegment()),new p(e,r,n,t)},e.prototype.parseQueryParams=function(){var e={};for(this.capture("?"),this.parseParam(e);this._remaining.length>0&&this.peekStartsWith("&");)this.capture("&"),this.parseParam(e);return e},e.prototype.parseMatrixParams=function(){for(var e={};this._remaining.length>0&&this.peekStartsWith(";");)this.capture(";"),this.parseParam(e);return e},e.prototype.parseParam=function(e){var t=i(this._remaining);if(!c.isBlank(t)){this.capture(t);var n=!0;if(this.peekStartsWith("=")){this.capture("=");var r=i(this._remaining);c.isPresent(r)&&(n=r,this.capture(n))}e[t]=n}},e.prototype.parseAuxiliaryRoutes=function(){var e=[];for(this.capture("(");!this.peekStartsWith(")")&&this._remaining.length>0;)e.push(this.parseSegment()),this.peekStartsWith("//")&&this.capture("//");return this.capture(")"),e},e}();t.UrlParser=f,t.parser=new f,t.serializeParams=o},function(e,t,n){var r=n(5),i=n(14),o=n(12),s=n(60),a=n(228),c=n(227),u=n(233),p=n(234),l=function(){function e(){this.names=new o.Map,this.auxNames=new o.Map,this.auxRoutes=new o.Map,this.matchers=[],this.defaultRoute=null}return e.prototype.config=function(e){var t;if(r.isPresent(e.name)&&e.name[0].toUpperCase()!=e.name[0]){var n=e.name[0].toUpperCase()+e.name.substring(1);throw new i.BaseException('Route "'+e.path+'" with name "'+e.name+'" does not begin with an uppercase letter. Route names should be CamelCase like "'+n+'".')}if(e instanceof c.AuxRoute){t=new p.SyncRouteHandler(e.component,e.data);var o=e.path.startsWith("/")?e.path.substring(1):e.path,s=new a.RouteRecognizer(e.path,t);return this.auxRoutes.set(o,s),r.isPresent(e.name)&&this.auxNames.set(e.name,s),s.terminal}var l=!1;if(e instanceof c.Redirect){var h=new a.RedirectRecognizer(e.path,e.redirectTo);return this._assertNoHashCollision(h.hash,e.path),this.matchers.push(h),!0}e instanceof c.Route?(t=new p.SyncRouteHandler(e.component,e.data),l=r.isPresent(e.useAsDefault)&&e.useAsDefault):e instanceof c.AsyncRoute&&(t=new u.AsyncRouteHandler(e.loader,e.data),l=r.isPresent(e.useAsDefault)&&e.useAsDefault);var s=new a.RouteRecognizer(e.path,t);if(this._assertNoHashCollision(s.hash,e.path),l){if(r.isPresent(this.defaultRoute))throw new i.BaseException("Only one route can be default");this.defaultRoute=s}return this.matchers.push(s),r.isPresent(e.name)&&this.names.set(e.name,s),s.terminal},e.prototype._assertNoHashCollision=function(e,t){this.matchers.forEach(function(n){if(e==n.hash)throw new i.BaseException("Configuration '"+t+"' conflicts with existing route '"+n.path+"'")})},e.prototype.recognize=function(e){var t=[];return this.matchers.forEach(function(n){var i=n.recognize(e);r.isPresent(i)&&t.push(i)}),t},e.prototype.recognizeAuxiliary=function(e){var t=this.auxRoutes.get(e.path);return r.isPresent(t)?[t.recognize(e)]:[s.PromiseWrapper.resolve(null)]},e.prototype.hasRoute=function(e){return this.names.has(e)},e.prototype.componentLoaded=function(e){return this.hasRoute(e)&&r.isPresent(this.names.get(e).handler.componentType)},e.prototype.loadComponent=function(e){return this.names.get(e).handler.resolveComponentType()},e.prototype.generate=function(e,t){var n=this.names.get(e);return r.isBlank(n)?null:n.generate(t)},e.prototype.generateAuxiliary=function(e,t){var n=this.auxNames.get(e);return r.isBlank(n)?null:n.generate(t)},e}();t.ComponentRecognizer=l},function(e,t,n){var r=n(5),i=n(229),o=function(){function e(e,t){void 0===t&&(t=null),this._loader=e,this._resolvedComponent=null,this.data=r.isPresent(t)?new i.RouteData(t):i.BLANK_ROUTE_DATA}return e.prototype.resolveComponentType=function(){var e=this;return r.isPresent(this._resolvedComponent)?this._resolvedComponent:this._resolvedComponent=this._loader().then(function(t){return e.componentType=t,t})},e}();t.AsyncRouteHandler=o},function(e,t,n){var r=n(60),i=n(5),o=n(229),s=function(){function e(e,t){this.componentType=e,this._resolvedComponent=null,this._resolvedComponent=r.PromiseWrapper.resolve(e),this.data=i.isPresent(t)?new o.RouteData(t):o.BLANK_ROUTE_DATA}return e.prototype.resolveComponentType=function(){return this._resolvedComponent},e}();t.SyncRouteHandler=s},function(e,t,n){function r(e,t){if(e instanceof s.AsyncRoute){var n=i(e.loader,t);return new s.AsyncRoute({path:e.path,loader:n,name:e.name,data:e.data,useAsDefault:e.useAsDefault})}if(e instanceof s.Route||e instanceof s.Redirect||e instanceof s.AuxRoute)return e;if(+!!e.component+ +!!e.redirectTo+ +!!e.loader!=1)throw new c.BaseException('Route config should contain exactly one "component", "loader", or "redirectTo" property.');if(e.as&&e.name)throw new c.BaseException('Route config should contain exactly one "as" or "name" property.');if(e.as&&(e.name=e.as),e.loader){var n=i(e.loader,t);return new s.AsyncRoute({path:e.path,loader:n,name:e.name,useAsDefault:e.useAsDefault})}if(e.aux)return new s.AuxRoute({path:e.aux,component:e.component,name:e.name});if(e.component){if("object"==typeof e.component){var r=e.component;if("constructor"==r.type)return new s.Route({path:e.path,component:r.constructor,name:e.name,data:e.data,useAsDefault:e.useAsDefault});if("loader"==r.type)return new s.AsyncRoute({path:e.path,loader:r.loader,name:e.name,useAsDefault:e.useAsDefault});throw new c.BaseException('Invalid component type "'+r.type+'". Valid types are "constructor" and "loader".')}return new s.Route(e)}return e.redirectTo?new s.Redirect({path:e.path,redirectTo:e.redirectTo}):e}function i(e,t){return function(){return e().then(function(e){return t.configFromComponent(e),e})}}function o(e,t){if(!a.isType(e))throw new c.BaseException('Component for route "'+t+'" is not defined, or is not a class.')}var s=n(236),a=n(5),c=n(14);t.normalizeRouteConfig=r,t.assertComponentExists=o},function(e,t,n){var r=n(227),i=n(9),o=n(227);t.Route=o.Route,t.Redirect=o.Redirect,t.AuxRoute=o.AuxRoute,t.AsyncRoute=o.AsyncRoute,t.RouteConfig=i.makeDecorator(r.RouteConfig)},function(e,t,n){function r(e,t){return e.length>0&&t.startsWith(e)?t.substring(e.length):t}function i(e){return/\/index.html$/g.test(e)?e.substring(0,e.length-11):e}function o(e){return/\/$/g.test(e)&&(e=e.substring(0,e.length-1)),e}var s=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},a=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},c=n(238),u=n(60),p=n(2),l=function(){function e(e){ -var t=this;this.platformStrategy=e,this._subject=new u.EventEmitter;var n=this.platformStrategy.getBaseHref();this._baseHref=o(i(n)),this.platformStrategy.onPopState(function(e){u.ObservableWrapper.callEmit(t._subject,{url:t.path(),pop:!0,type:e.type})})}return e.prototype.path=function(){return this.normalize(this.platformStrategy.path())},e.prototype.normalize=function(e){return o(r(this._baseHref,i(e)))},e.prototype.prepareExternalUrl=function(e){return e.length>0&&!e.startsWith("/")&&(e="/"+e),this.platformStrategy.prepareExternalUrl(e)},e.prototype.go=function(e,t){void 0===t&&(t=""),this.platformStrategy.pushState(null,"",e,t)},e.prototype.replaceState=function(e,t){void 0===t&&(t=""),this.platformStrategy.replaceState(null,"",e,t)},e.prototype.forward=function(){this.platformStrategy.forward()},e.prototype.back=function(){this.platformStrategy.back()},e.prototype.subscribe=function(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),u.ObservableWrapper.subscribe(this._subject,e,t,n)},e=s([p.Injectable(),a("design:paramtypes",[c.LocationStrategy])],e)}();t.Location=l},function(e,t,n){function r(e){return e.length>0&&"?"!=e.substring(0,1)?"?"+e:e}function i(e,t){if(0==e.length)return t;if(0==t.length)return e;var n=0;return e.endsWith("/")&&n++,t.startsWith("/")&&n++,2==n?e+t.substring(1):1==n?e+t:e+"/"+t}var o=n(5),s=n(2),a=function(){function e(){}return e}();t.LocationStrategy=a,t.APP_BASE_HREF=o.CONST_EXPR(new s.OpaqueToken("appBaseHref")),t.normalizeQueryParams=r,t.joinWithSlash=i},function(e,t,n){function r(e,t){return t instanceof o.Type?e.name in t.prototype:!1}function i(e){for(var t=a.reflector.annotations(e),n=0;no?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(5),s=function(){function e(e){this.name=e}return e=r([o.CONST(),i("design:paramtypes",[String])],e)}();t.RouteLifecycleHook=s;var a=function(){function e(e){this.fn=e}return e=r([o.CONST(),i("design:paramtypes",[Function])],e)}();t.CanActivate=a,t.routerCanReuse=o.CONST_EXPR(new s("routerCanReuse")),t.routerCanDeactivate=o.CONST_EXPR(new s("routerCanDeactivate")),t.routerOnActivate=o.CONST_EXPR(new s("routerOnActivate")),t.routerOnReuse=o.CONST_EXPR(new s("routerOnReuse")),t.routerOnDeactivate=o.CONST_EXPR(new s("routerOnDeactivate"))},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},s=n(60),a=n(12),c=n(5),u=n(14),p=n(2),l=n(225),h=n(229),f=n(242),d=n(239),y=s.PromiseWrapper.resolve(!0),v=function(){function e(e,t,n,r){this._elementRef=e,this._loader=t,this._parentRouter=n,this.name=null,this._componentRef=null,this._currentInstruction=null,c.isPresent(r)?(this.name=r,this._parentRouter.registerAuxOutlet(this)):this._parentRouter.registerPrimaryOutlet(this)}return e.prototype.activate=function(e){var t=this,n=this._currentInstruction;this._currentInstruction=e;var r=e.componentType,i=this._parentRouter.childRouter(r),o=p.Injector.resolve([p.provide(h.RouteData,{useValue:e.routeData}),p.provide(h.RouteParams,{useValue:new h.RouteParams(e.params)}),p.provide(l.Router,{useValue:i})]);return this._loader.loadNextToLocation(r,this._elementRef,o).then(function(i){return t._componentRef=i,d.hasLifecycleHook(f.routerOnActivate,r)?t._componentRef.instance.routerOnActivate(e,n):void 0})},e.prototype.reuse=function(e){var t=this._currentInstruction;if(this._currentInstruction=e,c.isBlank(this._componentRef))throw new u.BaseException("Cannot reuse an outlet that does not contain a component.");return s.PromiseWrapper.resolve(d.hasLifecycleHook(f.routerOnReuse,this._currentInstruction.componentType)?this._componentRef.instance.routerOnReuse(e,t):!0)},e.prototype.deactivate=function(e){var t=this,n=y;return c.isPresent(this._componentRef)&&c.isPresent(this._currentInstruction)&&d.hasLifecycleHook(f.routerOnDeactivate,this._currentInstruction.componentType)&&(n=s.PromiseWrapper.resolve(this._componentRef.instance.routerOnDeactivate(e,this._currentInstruction))),n.then(function(e){c.isPresent(t._componentRef)&&(t._componentRef.dispose(),t._componentRef=null)})},e.prototype.routerCanDeactivate=function(e){return c.isBlank(this._currentInstruction)?y:d.hasLifecycleHook(f.routerCanDeactivate,this._currentInstruction.componentType)?s.PromiseWrapper.resolve(this._componentRef.instance.routerCanDeactivate(e,this._currentInstruction)):y},e.prototype.routerCanReuse=function(e){var t;return t=c.isBlank(this._currentInstruction)||this._currentInstruction.componentType!=e.componentType?!1:d.hasLifecycleHook(f.routerCanReuse,this._currentInstruction.componentType)?this._componentRef.instance.routerCanReuse(e,this._currentInstruction):e==this._currentInstruction||c.isPresent(e.params)&&c.isPresent(this._currentInstruction.params)&&a.StringMapWrapper.equals(e.params,this._currentInstruction.params),s.PromiseWrapper.resolve(t)},e=r([p.Directive({selector:"router-outlet"}),o(3,p.Attribute("name")),i("design:paramtypes",[p.ElementRef,p.DynamicComponentLoader,l.Router,String])],e)}();t.RouterOutlet=v},function(e,t,n){var r=n(9),i=n(240),o=n(240);t.routerCanReuse=o.routerCanReuse,t.routerCanDeactivate=o.routerCanDeactivate,t.routerOnActivate=o.routerOnActivate,t.routerOnReuse=o.routerOnReuse,t.routerOnDeactivate=o.routerOnDeactivate,t.CanActivate=r.makeDecorator(i.CanActivate)},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(2),s=n(5),a=n(225),c=n(237),u=function(){function e(e,t){this._router=e,this._location=t}return Object.defineProperty(e.prototype,"isRouteActive",{get:function(){return this._router.isRouteActive(this._navigationInstruction)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"routeParams",{set:function(e){this._routeParams=e,this._navigationInstruction=this._router.generate(this._routeParams);var t=this._navigationInstruction.toLinkUrl();this.visibleHref=this._location.prepareExternalUrl(t)},enumerable:!0,configurable:!0}),e.prototype.onClick=function(){return s.isString(this.target)&&"_self"!=this.target?!0:(this._router.navigateByInstruction(this._navigationInstruction),!1)},e=r([o.Directive({selector:"[routerLink]",inputs:["routeParams: routerLink","target: target"],host:{"(click)":"onClick()","[attr.href]":"visibleHref","[class.router-link-active]":"isRouteActive"}}),i("design:paramtypes",[a.Router,c.Location])],e)}();t.RouterLink=u},function(e,t,n){var r=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},i=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},o=n(178),s=n(2),a=function(){function e(){this._init()}return e.prototype._init=function(){this._location=o.DOM.getLocation(),this._history=o.DOM.getHistory()},e.prototype.getBaseHrefFromDOM=function(){return o.DOM.getBaseHref()},e.prototype.onPopState=function(e){o.DOM.getGlobalEventTarget("window").addEventListener("popstate",e,!1)},e.prototype.onHashChange=function(e){o.DOM.getGlobalEventTarget("window").addEventListener("hashchange",e,!1)},Object.defineProperty(e.prototype,"pathname",{get:function(){return this._location.pathname},set:function(e){this._location.pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{get:function(){return this._location.search},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){return this._location.hash},enumerable:!0,configurable:!0}),e.prototype.pushState=function(e,t,n){this._history.pushState(e,t,n)},e.prototype.replaceState=function(e,t,n){this._history.replaceState(e,t,n)},e.prototype.forward=function(){this._history.forward()},e.prototype.back=function(){this._history.back()},e=r([s.Injectable(),i("design:paramtypes",[])],e)}();t.PlatformLocation=a},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(2),c=n(238),u=n(5),p=n(244),l=function(e){function t(t,n){e.call(this),this._platformLocation=t,this._baseHref="",u.isPresent(n)&&(this._baseHref=n)}return r(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.path=function(){var e=this._platformLocation.hash;return(e.length>0?e.substring(1):e)+c.normalizeQueryParams(this._platformLocation.search)},t.prototype.prepareExternalUrl=function(e){var t=c.joinWithSlash(this._baseHref,e);return t.length>0?"#"+t:t},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+c.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t=i([a.Injectable(),s(1,a.Optional()),s(1,a.Inject(c.APP_BASE_HREF)),o("design:paramtypes",[p.PlatformLocation,String])],t)}(c.LocationStrategy);t.HashLocationStrategy=l},function(e,t,n){var r=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},i=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},o=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},s=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},a=n(2),c=n(5),u=n(14),p=n(238),l=n(244),h=function(e){function t(t,n){if(e.call(this),this._platformLocation=t,c.isBlank(n)&&(n=this._platformLocation.getBaseHrefFromDOM()),c.isBlank(n))throw new u.BaseException("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=n}return r(t,e),t.prototype.onPopState=function(e){this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e)},t.prototype.getBaseHref=function(){return this._baseHref},t.prototype.prepareExternalUrl=function(e){return p.joinWithSlash(this._baseHref,e)},t.prototype.path=function(){return this._platformLocation.pathname+p.normalizeQueryParams(this._platformLocation.search)},t.prototype.pushState=function(e,t,n,r){var i=this.prepareExternalUrl(n+p.normalizeQueryParams(r));this._platformLocation.pushState(e,t,i)},t.prototype.replaceState=function(e,t,n,r){var i=this.prepareExternalUrl(n+p.normalizeQueryParams(r));this._platformLocation.replaceState(e,t,i)},t.prototype.forward=function(){this._platformLocation.forward()},t.prototype.back=function(){this._platformLocation.back()},t=i([a.Injectable(),s(1,a.Optional()),s(1,a.Inject(p.APP_BASE_HREF)),o("design:paramtypes",[l.PlatformLocation,String])],t)}(p.LocationStrategy);t.PathLocationStrategy=h},function(e,t){},function(e,t,n){var r=n(147),i=n(2),o=n(249),s=n(5),a=n(249);t.RouterLinkTransform=a.RouterLinkTransform,t.ROUTER_LINK_DSL_PROVIDER=s.CONST_EXPR(new i.Provider(r.TEMPLATE_TRANSFORMS,{useClass:o.RouterLinkTransform,multi:!0}))},function(e,t,n){function r(e,t){var n=new v(e,t.trim()).tokenize();return new m(n).generate()}var i=this&&this.__extends||function(e,t){function n(){this.constructor=e}for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=this&&this.__decorate||function(e,t,n,r){var i,o=arguments.length,s=3>o?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,n,r);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(3>o?i(s):o>3?i(t,n,s):i(t,n))||s);return o>3&&s&&Object.defineProperty(t,n,s),s},s=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},a=n(147),c=n(30),u=n(14),p=n(2),l=n(32),h=function(){function e(e){this.value=e}return e}(),f=function(){function e(){}return e}(),d=function(){function e(){}return e}(),y=function(){function e(e){this.ast=e}return e}(),v=function(){function e(e,t){this.parser=e,this.exp=t,this.index=0}return e.prototype.tokenize=function(){for(var e=[];this.indexn;n++)t.insertBefore(e[n],this.contentInserctionPoint)},e.prototype.setupOutputs=function(){for(var e=this,t=this.attrs,n=this.info.outputs,r=0;r1)throw new Error("Only support single directive definition for: "+this.name);var n=t[0];n.replace&&this.notSupported("replace"),n.terminal&&this.notSupported("terminal");var r=n.link;return"object"==typeof r&&r.post&&this.notSupported("link.post"),n},e.prototype.notSupported=function(e){throw new Error("Upgraded directive '"+this.name+"' does not support '"+e+"'.")},e.prototype.extractBindings=function(){var e=this.directive.scope;if("object"==typeof e)for(var t in e)if(e.hasOwnProperty(t)){var n=e[t],r=n.charAt(0);n=n.substr(1)||t;var i="output_"+t,o=i+": "+t,s=i+": "+t+"Change",a="input_"+t,c=a+": "+t;switch(r){case"=":this.propertyOutputs.push(i),this.checkProperties.push(n),this.outputs.push(i),this.outputsRename.push(s),this.propertyMap[i]=n;case"@":this.inputs.push(a),this.inputsRename.push(c),this.propertyMap[a]=n;break;case"&":this.outputs.push(i),this.outputsRename.push(o),this.propertyMap[i]=n;break;default:var u=JSON.stringify(e);throw new Error("Unexpected mapping '"+r+"' in '"+u+"' in '"+this.name+"' directive.")}}},e.prototype.compileTemplate=function(e,t,n){function r(t){var n=document.createElement("div");return n.innerHTML=t,e(n.childNodes)}var i=this;if(void 0!==this.directive.template)this.linkFn=r(this.directive.template);else{if(!this.directive.templateUrl)throw new Error("Directive '"+this.name+"' is not a component, it is missing template.");var o=this.directive.templateUrl,s=t.get(o);if(void 0===s)return new Promise(function(e,s){n("GET",o,null,function(n,a){200==n?e(i.linkFn=r(t.put(o,a))):s("GET "+o+" returned "+n+": "+a)})});this.linkFn=r(s)}return null},e.resolve=function(e,t){var n=[],r=t.get(i.NG1_COMPILE),o=t.get(i.NG1_TEMPLATE_CACHE),s=t.get(i.NG1_HTTP_BACKEND),a=t.get(i.NG1_CONTROLLER);for(var c in e)if(e.hasOwnProperty(c)){var u=e[c];u.directive=u.extractDirective(t),u.$controller=a,u.extractBindings();var p=u.compileTemplate(r,o,s);p&&n.push(p)}return Promise.all(n)},e}();t.UpgradeNg1ComponentAdapterBuilder=p;var l=function(){function e(e,t,n,i,a,p,l,h,f,d){this.directive=n,this.inputs=p,this.outputs=l,this.propOuts=h,this.checkProperties=f,this.propertyMap=d,this.destinationObj=null,this.checkLastValues=[];for(var y,v=i.nativeElement,m=[];y=v.firstChild;)v.removeChild(y),m.push(y);var g=t.$new(!!n.scope),_=s.element(v),b=n.controller,C=null;if(b){var P={$scope:g,$element:_};C=a(b,P,null,n.controllerAs),_.data(o.controllerKey(n.name),C)}var w=n.link;if("object"==typeof w&&(w=w.pre),w){var R=u,E=u,O=this.resolveRequired(_,n.require);n.link(g,_,R,O,E)}this.destinationObj=n.bindToController&&C?C:g,e(g,function(e,t){for(var n=0,r=e.length;r>n;n++)v.appendChild(e[n])},{parentBoundTranscludeFn:function(e,t){t(m)}});for(var S=0;So?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(5),a=n(6),u=n(7),c=function(t){function e(e){t.call(this),this.attributeName=e}return r(e,t),Object.defineProperty(e.prototype,"token",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"@Attribute("+s.stringify(this.attributeName)+")"},e=i([s.CONST(),o("design:paramtypes",[String])],e)}(u.DependencyMetadata);e.AttributeMetadata=c;var p=function(t){function e(e,n){var r=void 0===n?{}:n,i=r.descendants,o=void 0===i?!1:i,s=r.first,a=void 0===s?!1:s,u=r.read,c=void 0===u?null:u;t.call(this),this._selector=e,this.descendants=o,this.first=a,this.read=c}return r(e,t),Object.defineProperty(e.prototype,"isViewQuery",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"selector",{get:function(){return a.resolveForwardRef(this._selector)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isVarBindingQuery",{get:function(){return s.isString(this.selector)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"varBindings",{get:function(){return this.selector.split(",")},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"@Query("+s.stringify(this.selector)+")"},e=i([s.CONST(),o("design:paramtypes",[Object,Object])],e)}(u.DependencyMetadata);e.QueryMetadata=p;var l=function(t){function e(e,n){var r=void 0===n?{}:n,i=r.descendants,o=void 0===i?!1:i,s=r.read,a=void 0===s?null:s;t.call(this,e,{descendants:o,read:a})}return r(e,t),e=i([s.CONST(),o("design:paramtypes",[Object,Object])],e)}(p);e.ContentChildrenMetadata=l;var h=function(t){function e(e,n){var r=(void 0===n?{}:n).read,i=void 0===r?null:r;t.call(this,e,{descendants:!0,first:!0,read:i})}return r(e,t),e=i([s.CONST(),o("design:paramtypes",[Object,Object])],e)}(p);e.ContentChildMetadata=h;var f=function(t){function e(e,n){var r=void 0===n?{}:n,i=r.descendants,o=void 0===i?!1:i,s=r.first,a=void 0===s?!1:s,u=r.read,c=void 0===u?null:u;t.call(this,e,{descendants:o,first:a,read:c})}return r(e,t),Object.defineProperty(e.prototype,"isViewQuery",{get:function(){return!0},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"@ViewQuery("+s.stringify(this.selector)+")"},e=i([s.CONST(),o("design:paramtypes",[Object,Object])],e)}(p);e.ViewQueryMetadata=f;var d=function(t){function e(e,n){var r=(void 0===n?{}:n).read,i=void 0===r?null:r;t.call(this,e,{descendants:!0,read:i})}return r(e,t),e=i([s.CONST(),o("design:paramtypes",[Object,Object])],e)}(f);e.ViewChildrenMetadata=d;var v=function(t){function e(e,n){var r=(void 0===n?{}:n).read,i=void 0===r?null:r;t.call(this,e,{descendants:!0,first:!0,read:i})}return r(e,t),e=i([s.CONST(),o("design:paramtypes",[Object,Object])],e)}(f);e.ViewChildMetadata=v},function(t,e){(function(t){"use strict";function n(t){Zone.current.scheduleMicroTask("scheduleMicrotask",t)}function r(t){return t.name?t.name:typeof t}function i(){H=!0}function o(){if(H)throw"Cannot enable prod mode after platform setup.";W=!1}function s(){return W}function a(t){return t}function u(){return function(t){return t}}function c(t){return void 0!==t&&null!==t}function p(t){return void 0===t||null===t}function l(t){return"boolean"==typeof t}function h(t){return"number"==typeof t}function f(t){return"string"==typeof t}function d(t){return"function"==typeof t}function v(t){return d(t)}function y(t){return"object"==typeof t&&null!==t}function m(t){return t instanceof U.Promise}function g(t){return Array.isArray(t)}function _(t){return t instanceof e.Date&&!isNaN(t.valueOf())}function b(){}function P(t){if("string"==typeof t)return t;if(void 0===t||null===t)return""+t;if(t.name)return t.name;if(t.overriddenName)return t.overriddenName;var e=t.toString(),n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function E(t){return t}function w(t,e){return t}function C(t,e){return t[e]}function R(t,e){return t===e||"number"==typeof t&&"number"==typeof e&&isNaN(t)&&isNaN(e)}function S(t){return t}function O(t){return p(t)?null:t}function T(t){return p(t)?!1:t}function x(t){return null!==t&&("function"==typeof t||"object"==typeof t)}function A(t){console.log(t)}function I(t,e,n){for(var r=e.split("."),i=t;r.length>1;){var o=r.shift();i=i.hasOwnProperty(o)&&c(i[o])?i[o]:i[o]={}}(void 0===i||null===i)&&(i={}),i[r.shift()]=n}function M(){if(p(Y))if(c(Symbol)&&c(Symbol.iterator))Y=Symbol.iterator;else for(var t=Object.getOwnPropertyNames(Map.prototype),e=0;e=0&&t[r]==e;r--)n--;t=t.substring(0,n)}return t},t.replace=function(t,e,n){return t.replace(e,n)},t.replaceAll=function(t,e,n){return t.replace(e,n)},t.slice=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=null),t.slice(e,null===n?void 0:n)},t.replaceAllMapped=function(t,e,n){return t.replace(e,function(){for(var t=[],e=0;et?-1:t>e?1:0},t}();e.StringWrapper=X;var q=function(){function t(t){void 0===t&&(t=[]),this.parts=t}return t.prototype.add=function(t){this.parts.push(t)},t.prototype.toString=function(){return this.parts.join("")},t}();e.StringJoiner=q;var G=function(t){function e(e){t.call(this),this.message=e}return F(e,t),e.prototype.toString=function(){return this.message},e}(Error);e.NumberParseError=G;var z=function(){function t(){}return t.toFixed=function(t,e){return t.toFixed(e)},t.equal=function(t,e){return t===e},t.parseIntAutoRadix=function(t){var e=parseInt(t);if(isNaN(e))throw new G("Invalid integer literal when parsing "+t);return e},t.parseInt=function(t,e){if(10==e){if(/^(\-|\+)?[0-9]+$/.test(t))return parseInt(t,e)}else if(16==e){if(/^(\-|\+)?[0-9ABCDEFabcdef]+$/.test(t))return parseInt(t,e)}else{var n=parseInt(t,e);if(!isNaN(n))return n}throw new G("Invalid integer literal when parsing "+t+" in base "+e)},t.parseFloat=function(t){return parseFloat(t)},Object.defineProperty(t,"NaN",{get:function(){return NaN},enumerable:!0,configurable:!0}),t.isNaN=function(t){return isNaN(t)},t.isInteger=function(t){return Number.isInteger(t)},t}();e.NumberWrapper=z,e.RegExp=U.RegExp;var K=function(){function t(){}return t.create=function(t,e){return void 0===e&&(e=""),e=e.replace(/g/g,""),new U.RegExp(t,e+"g")},t.firstMatch=function(t,e){return t.lastIndex=0,t.exec(e)},t.test=function(t,e){return t.lastIndex=0,t.test(e)},t.matcher=function(t,e){return t.lastIndex=0,{re:t,input:e}},t.replaceAll=function(t,e,n){var r=t.exec(e),i="";t.lastIndex=0;for(var o=0;r;)i+=e.substring(o,r.index),i+=n(r),o=r.index+r[0].length,t.lastIndex=o,r=t.exec(e);return i+=e.substring(o)},t}();e.RegExpWrapper=K;var $=function(){function t(){}return t.next=function(t){return t.re.exec(t.input)},t}();e.RegExpMatcherWrapper=$;var Q=function(){function t(){}return t.apply=function(t,e){return t.apply(null,e)},t}();e.FunctionWrapper=Q,e.looseIdentical=R,e.getMapKey=S,e.normalizeBlank=O,e.normalizeBool=T,e.isJsObject=x,e.print=A;var J=function(){function t(){}return t.parse=function(t){return U.JSON.parse(t)},t.stringify=function(t){return U.JSON.stringify(t,null,2)},t}();e.Json=J;var Z=function(){function t(){}return t.create=function(t,n,r,i,o,s,a){return void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),new e.Date(t,n-1,r,i,o,s,a)},t.fromISOString=function(t){return new e.Date(t)},t.fromMillis=function(t){return new e.Date(t)},t.toMillis=function(t){return t.getTime()},t.now=function(){return new e.Date},t.toJson=function(t){return t.toJSON()},t}();e.DateWrapper=Z,e.setValueOnPath=I;var Y=null;e.getSymbolIterator=M,e.evalExpression=k,e.isPrimitive=N,e.hasConstructor=D,e.bitWiseOr=V,e.bitWiseAnd=j,e.escape=L}).call(e,function(){return this}())},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}var i=n(7);e.InjectMetadata=i.InjectMetadata,e.OptionalMetadata=i.OptionalMetadata,e.InjectableMetadata=i.InjectableMetadata,e.SelfMetadata=i.SelfMetadata,e.HostMetadata=i.HostMetadata,e.SkipSelfMetadata=i.SkipSelfMetadata,e.DependencyMetadata=i.DependencyMetadata,r(n(8));var o=n(10);e.forwardRef=o.forwardRef,e.resolveForwardRef=o.resolveForwardRef;var s=n(11);e.Injector=s.Injector;var a=n(16);e.ReflectiveInjector=a.ReflectiveInjector;var u=n(24);e.Binding=u.Binding,e.ProviderBuilder=u.ProviderBuilder,e.bind=u.bind,e.Provider=u.Provider,e.provide=u.provide;var c=n(17);e.ResolvedReflectiveFactory=c.ResolvedReflectiveFactory,e.ReflectiveDependency=c.ReflectiveDependency;var p=n(22);e.ReflectiveKey=p.ReflectiveKey;var l=n(23);e.NoProviderError=l.NoProviderError,e.AbstractProviderError=l.AbstractProviderError,e.CyclicDependencyError=l.CyclicDependencyError,e.InstantiationError=l.InstantiationError,e.InvalidProviderError=l.InvalidProviderError,e.NoAnnotationError=l.NoAnnotationError,e.OutOfBoundsError=l.OutOfBoundsError;var h=n(25);e.OpaqueToken=h.OpaqueToken},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=function(){function t(t){this.token=t}return t.prototype.toString=function(){return"@Inject("+o.stringify(this.token)+")"},t=r([o.CONST(),i("design:paramtypes",[Object])],t)}();e.InjectMetadata=s;var a=function(){function t(){}return t.prototype.toString=function(){return"@Optional()"},t=r([o.CONST(),i("design:paramtypes",[])],t)}();e.OptionalMetadata=a;var u=function(){function t(){}return Object.defineProperty(t.prototype,"token",{get:function(){return null},enumerable:!0,configurable:!0}),t=r([o.CONST(),i("design:paramtypes",[])],t)}();e.DependencyMetadata=u;var c=function(){function t(){}return t=r([o.CONST(),i("design:paramtypes",[])],t)}();e.InjectableMetadata=c;var p=function(){function t(){}return t.prototype.toString=function(){return"@Self()"},t=r([o.CONST(),i("design:paramtypes",[])],t)}();e.SelfMetadata=p;var l=function(){function t(){}return t.prototype.toString=function(){return"@SkipSelf()"},t=r([o.CONST(),i("design:paramtypes",[])],t)}();e.SkipSelfMetadata=l;var h=function(){function t(){}return t.prototype.toString=function(){return"@Host()"},t=r([o.CONST(),i("design:paramtypes",[])],t)}();e.HostMetadata=h},function(t,e,n){"use strict";var r=n(7),i=n(9);e.Inject=i.makeParamDecorator(r.InjectMetadata),e.Optional=i.makeParamDecorator(r.OptionalMetadata),e.Injectable=i.makeDecorator(r.InjectableMetadata),e.Self=i.makeParamDecorator(r.SelfMetadata),e.Host=i.makeParamDecorator(r.HostMetadata),e.SkipSelf=i.makeParamDecorator(r.SkipSelfMetadata)},function(t,e,n){"use strict";function r(t){return c.isFunction(t)&&t.hasOwnProperty("annotation")&&(t=t.annotation),t}function i(t,e){if(t===Object||t===String||t===Function||t===Number||t===Array)throw new Error("Can not use native "+c.stringify(t)+" as constructor");if(c.isFunction(t))return t;if(t instanceof Array){var n=t,i=t[t.length-1];if(!c.isFunction(i))throw new Error("Last position of Class method array must be Function in key "+e+" was '"+c.stringify(i)+"'");var o=n.length-1;if(o!=i.length)throw new Error("Number of annotations ("+o+") does not match number of arguments ("+i.length+") in the function: "+c.stringify(i));for(var s=[],a=0,u=n.length-1;u>a;a++){var p=[];s.push(p);var h=n[a];if(h instanceof Array)for(var f=0;f-1?(t.splice(n,1),!0):!1},t.clear=function(t){t.length=0},t.isEmpty=function(t){return 0==t.length},t.fill=function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=null),t.fill(e,n,null===r?t.length:r)},t.equals=function(t,e){if(t.length!=e.length)return!1;for(var n=0;nr&&(n=o,r=s)}}return n},t.flatten=function(t){var e=[];return r(t,e),e},t.addAll=function(t,e){for(var n=0;n0&&(this.provider0=e[0],this.keyId0=e[0].key.id),n>1&&(this.provider1=e[1],this.keyId1=e[1].key.id),n>2&&(this.provider2=e[2],this.keyId2=e[2].key.id),n>3&&(this.provider3=e[3],this.keyId3=e[3].key.id),n>4&&(this.provider4=e[4],this.keyId4=e[4].key.id),n>5&&(this.provider5=e[5],this.keyId5=e[5].key.id),n>6&&(this.provider6=e[6],this.keyId6=e[6].key.id),n>7&&(this.provider7=e[7],this.keyId7=e[7].key.id),n>8&&(this.provider8=e[8],this.keyId8=e[8].key.id),n>9&&(this.provider9=e[9],this.keyId9=e[9].key.id)}return t.prototype.getProviderAtIndex=function(t){if(0==t)return this.provider0;if(1==t)return this.provider1;if(2==t)return this.provider2;if(3==t)return this.provider3;if(4==t)return this.provider4;if(5==t)return this.provider5;if(6==t)return this.provider6;if(7==t)return this.provider7;if(8==t)return this.provider8;if(9==t)return this.provider9;throw new s.OutOfBoundsError(t)},t.prototype.createInjectorStrategy=function(t){return new m(t,this)},t}();e.ReflectiveProtoInjectorInlineStrategy=d;var v=function(){function t(t,e){this.providers=e;var n=e.length;this.keyIds=i.ListWrapper.createFixedSize(n);for(var r=0;n>r;r++)this.keyIds[r]=e[r].key.id}return t.prototype.getProviderAtIndex=function(t){if(0>t||t>=this.providers.length)throw new s.OutOfBoundsError(t);return this.providers[t]},t.prototype.createInjectorStrategy=function(t){return new g(this,t)},t}();e.ReflectiveProtoInjectorDynamicStrategy=v;var y=function(){function t(t){this.numberOfProviders=t.length,this._strategy=t.length>h?new v(this,t):new d(this,t)}return t.fromResolvedProviders=function(e){return new t(e)},t.prototype.getProviderAtIndex=function(t){return this._strategy.getProviderAtIndex(t); +},t}();e.ReflectiveProtoInjector=y;var m=function(){function t(t,e){this.injector=t,this.protoStrategy=e,this.obj0=f,this.obj1=f,this.obj2=f,this.obj3=f,this.obj4=f,this.obj5=f,this.obj6=f,this.obj7=f,this.obj8=f,this.obj9=f}return t.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},t.prototype.instantiateProvider=function(t){return this.injector._new(t)},t.prototype.getObjByKeyId=function(t){var e=this.protoStrategy,n=this.injector;return e.keyId0===t?(this.obj0===f&&(this.obj0=n._new(e.provider0)),this.obj0):e.keyId1===t?(this.obj1===f&&(this.obj1=n._new(e.provider1)),this.obj1):e.keyId2===t?(this.obj2===f&&(this.obj2=n._new(e.provider2)),this.obj2):e.keyId3===t?(this.obj3===f&&(this.obj3=n._new(e.provider3)),this.obj3):e.keyId4===t?(this.obj4===f&&(this.obj4=n._new(e.provider4)),this.obj4):e.keyId5===t?(this.obj5===f&&(this.obj5=n._new(e.provider5)),this.obj5):e.keyId6===t?(this.obj6===f&&(this.obj6=n._new(e.provider6)),this.obj6):e.keyId7===t?(this.obj7===f&&(this.obj7=n._new(e.provider7)),this.obj7):e.keyId8===t?(this.obj8===f&&(this.obj8=n._new(e.provider8)),this.obj8):e.keyId9===t?(this.obj9===f&&(this.obj9=n._new(e.provider9)),this.obj9):f},t.prototype.getObjAtIndex=function(t){if(0==t)return this.obj0;if(1==t)return this.obj1;if(2==t)return this.obj2;if(3==t)return this.obj3;if(4==t)return this.obj4;if(5==t)return this.obj5;if(6==t)return this.obj6;if(7==t)return this.obj7;if(8==t)return this.obj8;if(9==t)return this.obj9;throw new s.OutOfBoundsError(t)},t.prototype.getMaxNumberOfObjects=function(){return h},t}();e.ReflectiveInjectorInlineStrategy=m;var g=function(){function t(t,e){this.protoStrategy=t,this.injector=e,this.objs=i.ListWrapper.createFixedSize(t.providers.length),i.ListWrapper.fill(this.objs,f)}return t.prototype.resetConstructionCounter=function(){this.injector._constructionCounter=0},t.prototype.instantiateProvider=function(t){return this.injector._new(t)},t.prototype.getObjByKeyId=function(t){for(var e=this.protoStrategy,n=0;nt||t>=this.objs.length)throw new s.OutOfBoundsError(t);return this.objs[t]},t.prototype.getMaxNumberOfObjects=function(){return this.objs.length},t}();e.ReflectiveInjectorDynamicStrategy=g;var _=function(){function t(){}return t.resolve=function(t){return o.resolveReflectiveProviders(t)},t.resolveAndCreate=function(e,n){void 0===n&&(n=null);var r=t.resolve(e);return t.fromResolvedProviders(r,n)},t.fromResolvedProviders=function(t,e){return void 0===e&&(e=null),new b(y.fromResolvedProviders(t),e)},t.fromResolvedBindings=function(e){return t.fromResolvedProviders(e)},Object.defineProperty(t.prototype,"parent",{get:function(){return u.unimplemented()},enumerable:!0,configurable:!0}),t.prototype.debugContext=function(){return null},t.prototype.resolveAndCreateChild=function(t){return u.unimplemented()},t.prototype.createChildFromResolved=function(t){return u.unimplemented()},t.prototype.resolveAndInstantiate=function(t){return u.unimplemented()},t.prototype.instantiateResolved=function(t){return u.unimplemented()},t}();e.ReflectiveInjector=_;var b=function(){function t(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null),this._debugContext=n,this._constructionCounter=0,this._proto=t,this._parent=e,this._strategy=t._strategy.createInjectorStrategy(this)}return t.prototype.debugContext=function(){return this._debugContext()},t.prototype.get=function(t,e){return void 0===e&&(e=l.THROW_IF_NOT_FOUND),this._getByKey(c.ReflectiveKey.get(t),null,null,e)},t.prototype.getAt=function(t){return this._strategy.getObjAtIndex(t)},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"internalStrategy",{get:function(){return this._strategy},enumerable:!0,configurable:!0}),t.prototype.resolveAndCreateChild=function(t){var e=_.resolve(t);return this.createChildFromResolved(e)},t.prototype.createChildFromResolved=function(e){var n=new y(e),r=new t(n);return r._parent=this,r},t.prototype.resolveAndInstantiate=function(t){return this.instantiateResolved(_.resolve([t])[0])},t.prototype.instantiateResolved=function(t){return this._instantiateProvider(t)},t.prototype._new=function(t){if(this._constructionCounter++>this._strategy.getMaxNumberOfObjects())throw new s.CyclicDependencyError(this,t.key);return this._instantiateProvider(t)},t.prototype._instantiateProvider=function(t){if(t.multiProvider){for(var e=i.ListWrapper.createFixedSize(t.resolvedFactories.length),n=0;n0?this._getByReflectiveDependency(t,R[0]):null,r=S>1?this._getByReflectiveDependency(t,R[1]):null,i=S>2?this._getByReflectiveDependency(t,R[2]):null,o=S>3?this._getByReflectiveDependency(t,R[3]):null,a=S>4?this._getByReflectiveDependency(t,R[4]):null,c=S>5?this._getByReflectiveDependency(t,R[5]):null,p=S>6?this._getByReflectiveDependency(t,R[6]):null,l=S>7?this._getByReflectiveDependency(t,R[7]):null,h=S>8?this._getByReflectiveDependency(t,R[8]):null,f=S>9?this._getByReflectiveDependency(t,R[9]):null,d=S>10?this._getByReflectiveDependency(t,R[10]):null,v=S>11?this._getByReflectiveDependency(t,R[11]):null,y=S>12?this._getByReflectiveDependency(t,R[12]):null,m=S>13?this._getByReflectiveDependency(t,R[13]):null,g=S>14?this._getByReflectiveDependency(t,R[14]):null,_=S>15?this._getByReflectiveDependency(t,R[15]):null,b=S>16?this._getByReflectiveDependency(t,R[16]):null,P=S>17?this._getByReflectiveDependency(t,R[17]):null,E=S>18?this._getByReflectiveDependency(t,R[18]):null,w=S>19?this._getByReflectiveDependency(t,R[19]):null}catch(O){throw(O instanceof s.AbstractProviderError||O instanceof s.InstantiationError)&&O.addKey(this,t.key),O}var T;try{switch(S){case 0:T=C();break;case 1:T=C(n);break;case 2:T=C(n,r);break;case 3:T=C(n,r,i);break;case 4:T=C(n,r,i,o);break;case 5:T=C(n,r,i,o,a);break;case 6:T=C(n,r,i,o,a,c);break;case 7:T=C(n,r,i,o,a,c,p);break;case 8:T=C(n,r,i,o,a,c,p,l);break;case 9:T=C(n,r,i,o,a,c,p,l,h);break;case 10:T=C(n,r,i,o,a,c,p,l,h,f);break;case 11:T=C(n,r,i,o,a,c,p,l,h,f,d);break;case 12:T=C(n,r,i,o,a,c,p,l,h,f,d,v);break;case 13:T=C(n,r,i,o,a,c,p,l,h,f,d,v,y);break;case 14:T=C(n,r,i,o,a,c,p,l,h,f,d,v,y,m);break;case 15:T=C(n,r,i,o,a,c,p,l,h,f,d,v,y,m,g);break;case 16:T=C(n,r,i,o,a,c,p,l,h,f,d,v,y,m,g,_);break;case 17:T=C(n,r,i,o,a,c,p,l,h,f,d,v,y,m,g,_,b);break;case 18:T=C(n,r,i,o,a,c,p,l,h,f,d,v,y,m,g,_,b,P);break;case 19:T=C(n,r,i,o,a,c,p,l,h,f,d,v,y,m,g,_,b,P,E);break;case 20:T=C(n,r,i,o,a,c,p,l,h,f,d,v,y,m,g,_,b,P,E,w);break;default:throw new u.BaseException("Cannot instantiate '"+t.key.displayName+"' because it has more than 20 dependencies")}}catch(O){throw new s.InstantiationError(this,O,O.stack,t.key)}return T},t.prototype._getByReflectiveDependency=function(t,e){return this._getByKey(e.key,e.lowerBoundVisibility,e.upperBoundVisibility,e.optional?null:l.THROW_IF_NOT_FOUND)},t.prototype._getByKey=function(t,e,n,r){return t===P?this:n instanceof p.SelfMetadata?this._getByKeySelf(t,r):this._getByKeyDefault(t,r,e)},t.prototype._throwOrNull=function(t,e){if(e!==l.THROW_IF_NOT_FOUND)return e;throw new s.NoProviderError(this,t)},t.prototype._getByKeySelf=function(t,e){var n=this._strategy.getObjByKeyId(t.id);return n!==f?n:this._throwOrNull(t,e)},t.prototype._getByKeyDefault=function(e,n,r){var i;for(i=r instanceof p.SkipSelfMetadata?this._parent:this;i instanceof t;){var o=i,s=o._strategy.getObjByKeyId(e.id);if(s!==f)return s;i=o._parent}return null!==i?i.get(e.token,n):this._throwOrNull(e,n)},Object.defineProperty(t.prototype,"displayName",{get:function(){return"ReflectiveInjector(providers: ["+r(this,function(t){return' "'+t.key.displayName+'" '}).join(", ")+"])"},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.displayName},t}();e.ReflectiveInjector_=b;var P=c.ReflectiveKey.get(l.Injector)},function(t,e,n){"use strict";function r(t){var e,n;if(h.isPresent(t.useClass)){var r=g.resolveForwardRef(t.useClass);e=d.reflector.factory(r),n=c(r)}else h.isPresent(t.useExisting)?(e=function(t){return t},n=[b.fromKey(v.ReflectiveKey.get(t.useExisting))]):h.isPresent(t.useFactory)?(e=t.useFactory,n=u(t.useFactory,t.dependencies)):(e=function(){return t.useValue},n=P);return new w(e,n)}function i(t){return new E(v.ReflectiveKey.get(t.token),[r(t)],t.multi)}function o(t){var e=a(t,[]),n=e.map(i);return f.MapWrapper.values(s(n,new Map))}function s(t,e){for(var n=0;n1){var e=r(s.ListWrapper.reversed(t)),n=e.map(function(t){return a.stringify(t.token)});return" ("+n.join(" -> ")+")"}return""}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},s=n(15),a=n(5),u=n(12),c=function(t){function e(e,n,r){t.call(this,"DI Exception"),this.keys=[n],this.injectors=[e],this.constructResolvingMessage=r,this.message=this.constructResolvingMessage(this.keys)}return o(e,t),e.prototype.addKey=function(t,e){this.injectors.push(t),this.keys.push(e),this.message=this.constructResolvingMessage(this.keys)},Object.defineProperty(e.prototype,"context",{get:function(){return this.injectors[this.injectors.length-1].debugContext()},enumerable:!0,configurable:!0}),e}(u.BaseException);e.AbstractProviderError=c;var p=function(t){function e(e,n){t.call(this,e,n,function(t){var e=a.stringify(s.ListWrapper.first(t).token);return"No provider for "+e+"!"+i(t)})}return o(e,t),e}(c);e.NoProviderError=p;var l=function(t){function e(e,n){t.call(this,e,n,function(t){return"Cannot instantiate cyclic dependency!"+i(t)})}return o(e,t),e}(c);e.CyclicDependencyError=l;var h=function(t){function e(e,n,r,i){t.call(this,"DI Exception",n,r,null),this.keys=[i],this.injectors=[e]}return o(e,t),e.prototype.addKey=function(t,e){this.injectors.push(t),this.keys.push(e)},Object.defineProperty(e.prototype,"wrapperMessage",{get:function(){var t=a.stringify(s.ListWrapper.first(this.keys).token);return"Error during instantiation of "+t+"!"+i(this.keys)+"."},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"causeKey",{get:function(){return this.keys[0]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this.injectors[this.injectors.length-1].debugContext()},enumerable:!0,configurable:!0}),e}(u.WrappedException);e.InstantiationError=h;var f=function(t){function e(e){t.call(this,"Invalid provider - only instances of Provider and Type are allowed, got: "+e.toString())}return o(e,t),e}(u.BaseException);e.InvalidProviderError=f;var d=function(t){function e(n,r){t.call(this,e._genMessage(n,r))}return o(e,t),e._genMessage=function(t,e){for(var n=[],r=0,i=e.length;i>r;r++){var o=e[r];a.isBlank(o)||0==o.length?n.push("?"):n.push(o.map(a.stringify).join(" "))}return"Cannot resolve all parameters for '"+a.stringify(t)+"'("+n.join(", ")+"). Make sure that all the parameters are decorated with Inject or have valid type annotations and that '"+a.stringify(t)+"' is decorated with Injectable."},e}(u.BaseException);e.NoAnnotationError=d;var v=function(t){function e(e){t.call(this,"Index "+e+" is out-of-bounds.")}return o(e,t),e}(u.BaseException);e.OutOfBoundsError=v;var y=function(t){function e(e,n){t.call(this,"Cannot mix multi providers and regular providers, got: "+e.toString()+" "+n.toString())}return o(e,t),e}(u.BaseException);e.MixingMultiProvidersWithRegularProvidersError=y},function(t,e,n){"use strict";function r(t){return new h(t)}function i(t,e){var n=e.useClass,r=e.useValue,i=e.useExisting,o=e.useFactory,s=e.deps,a=e.multi;return new p(t,{useClass:n,useValue:r,useExisting:i,useFactory:o,deps:s,multi:a})}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},s=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},u=n(5),c=n(12),p=function(){function t(t,e){var n=e.useClass,r=e.useValue,i=e.useExisting,o=e.useFactory,s=e.deps,a=e.multi;this.token=t,this.useClass=n,this.useValue=r,this.useExisting=i,this.useFactory=o,this.dependencies=s,this._multi=a}return Object.defineProperty(t.prototype,"multi",{get:function(){return u.normalizeBool(this._multi)},enumerable:!0,configurable:!0}),t=s([u.CONST(),a("design:paramtypes",[Object,Object])],t)}();e.Provider=p;var l=function(t){function e(e,n){var r=n.toClass,i=n.toValue,o=n.toAlias,s=n.toFactory,a=n.deps,u=n.multi;t.call(this,e,{useClass:r,useValue:i,useExisting:o,useFactory:s,deps:a,multi:u})}return o(e,t),Object.defineProperty(e.prototype,"toClass",{get:function(){return this.useClass},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toAlias",{get:function(){return this.useExisting},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toFactory",{get:function(){return this.useFactory},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"toValue",{get:function(){return this.useValue},enumerable:!0,configurable:!0}),e=s([u.CONST(),a("design:paramtypes",[Object,Object])],e)}(p);e.Binding=l,e.bind=r;var h=function(){function t(t){this.token=t}return t.prototype.toClass=function(t){if(!u.isType(t))throw new c.BaseException('Trying to create a class provider but "'+u.stringify(t)+'" is not a class!');return new p(this.token,{useClass:t})},t.prototype.toValue=function(t){return new p(this.token,{useValue:t})},t.prototype.toAlias=function(t){if(u.isBlank(t))throw new c.BaseException("Can not alias "+u.stringify(this.token)+" to a blank value!");return new p(this.token,{useExisting:t})},t.prototype.toFactory=function(t,e){if(!u.isFunction(t))throw new c.BaseException('Trying to create a factory provider but "'+u.stringify(t)+'" is not a function!');return new p(this.token,{useFactory:t,deps:e})},t}();e.ProviderBuilder=h,e.provide=i},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=function(){function t(t){this._desc=t}return t.prototype.toString=function(){return"Token "+this._desc},t=r([o.CONST(),i("design:paramtypes",[String])],t)}();e.OpaqueToken=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(5),a=n(7),u=n(27),c=function(t){function e(e){var n=void 0===e?{}:e,r=n.selector,i=n.inputs,o=n.outputs,s=n.properties,a=n.events,u=n.host,c=n.bindings,p=n.providers,l=n.exportAs,h=n.queries;t.call(this),this.selector=r,this._inputs=i,this._properties=s,this._outputs=o,this._events=a,this.host=u,this.exportAs=l,this.queries=h,this._providers=p,this._bindings=c}return r(e,t),Object.defineProperty(e.prototype,"inputs",{get:function(){return s.isPresent(this._properties)&&this._properties.length>0?this._properties:this._inputs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this.inputs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"outputs",{get:function(){return s.isPresent(this._events)&&this._events.length>0?this._events:this._outputs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){return this.outputs},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"providers",{get:function(){return s.isPresent(this._bindings)&&this._bindings.length>0?this._bindings:this._providers},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bindings",{get:function(){return this.providers},enumerable:!0,configurable:!0}),e=i([s.CONST(),o("design:paramtypes",[Object])],e)}(a.InjectableMetadata);e.DirectiveMetadata=c;var p=function(t){function e(e){var n=void 0===e?{}:e,r=n.selector,i=n.inputs,o=n.outputs,s=n.properties,a=n.events,c=n.host,p=n.exportAs,l=n.moduleId,h=n.bindings,f=n.providers,d=n.viewBindings,v=n.viewProviders,y=n.changeDetection,m=void 0===y?u.ChangeDetectionStrategy.Default:y,g=n.queries,_=n.templateUrl,b=n.template,P=n.styleUrls,E=n.styles,w=n.directives,C=n.pipes,R=n.encapsulation;t.call(this,{selector:r,inputs:i,outputs:o,properties:s,events:a,host:c,exportAs:p,bindings:h,providers:f,queries:g}),this.changeDetection=m,this._viewProviders=v,this._viewBindings=d,this.templateUrl=_,this.template=b,this.styleUrls=P,this.styles=E,this.directives=w,this.pipes=C,this.encapsulation=R,this.moduleId=l}return r(e,t),Object.defineProperty(e.prototype,"viewProviders",{get:function(){return s.isPresent(this._viewBindings)&&this._viewBindings.length>0?this._viewBindings:this._viewProviders},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"viewBindings",{get:function(){return this.viewProviders},enumerable:!0,configurable:!0}),e=i([s.CONST(),o("design:paramtypes",[Object])],e)}(c);e.ComponentMetadata=p;var l=function(t){function e(e){var n=e.name,r=e.pure;t.call(this),this.name=n,this._pure=r}return r(e,t),Object.defineProperty(e.prototype,"pure",{get:function(){return s.isPresent(this._pure)?this._pure:!0},enumerable:!0,configurable:!0}),e=i([s.CONST(),o("design:paramtypes",[Object])],e)}(a.InjectableMetadata);e.PipeMetadata=l;var h=function(){function t(t){this.bindingPropertyName=t}return t=i([s.CONST(),o("design:paramtypes",[String])],t)}();e.InputMetadata=h;var f=function(){function t(t){this.bindingPropertyName=t}return t=i([s.CONST(),o("design:paramtypes",[String])],t)}();e.OutputMetadata=f;var d=function(){function t(t){this.hostPropertyName=t}return t=i([s.CONST(),o("design:paramtypes",[String])],t)}();e.HostBindingMetadata=d;var v=function(){function t(t,e){this.eventName=t,this.args=e}return t=i([s.CONST(),o("design:paramtypes",[String,Array])],t)}();e.HostListenerMetadata=v},function(t,e,n){"use strict";var r=n(28);e.ChangeDetectionStrategy=r.ChangeDetectionStrategy,e.ChangeDetectorRef=r.ChangeDetectorRef,e.WrappedValue=r.WrappedValue,e.SimpleChange=r.SimpleChange,e.IterableDiffers=r.IterableDiffers,e.KeyValueDiffers=r.KeyValueDiffers,e.CollectionChangeRecord=r.CollectionChangeRecord,e.KeyValueChangeRecord=r.KeyValueChangeRecord},function(t,e,n){"use strict";var r=n(29),i=n(30),o=n(31),s=n(32),a=n(5),u=n(32);e.DefaultKeyValueDifferFactory=u.DefaultKeyValueDifferFactory,e.KeyValueChangeRecord=u.KeyValueChangeRecord;var c=n(30);e.DefaultIterableDifferFactory=c.DefaultIterableDifferFactory,e.CollectionChangeRecord=c.CollectionChangeRecord;var p=n(33);e.ChangeDetectionStrategy=p.ChangeDetectionStrategy,e.CHANGE_DETECTION_STRATEGY_VALUES=p.CHANGE_DETECTION_STRATEGY_VALUES,e.ChangeDetectorState=p.ChangeDetectorState,e.CHANGE_DETECTOR_STATE_VALUES=p.CHANGE_DETECTOR_STATE_VALUES,e.isDefaultChangeDetectionStrategy=p.isDefaultChangeDetectionStrategy;var l=n(34);e.ChangeDetectorRef=l.ChangeDetectorRef;var h=n(29);e.IterableDiffers=h.IterableDiffers;var f=n(31);e.KeyValueDiffers=f.KeyValueDiffers;var d=n(35);e.WrappedValue=d.WrappedValue,e.ValueUnwrapper=d.ValueUnwrapper,e.SimpleChange=d.SimpleChange,e.devModeEqual=d.devModeEqual,e.looseIdentical=d.looseIdentical,e.uninitialized=d.uninitialized,e.keyValDiff=a.CONST_EXPR([a.CONST_EXPR(new s.DefaultKeyValueDifferFactory)]),e.iterableDiff=a.CONST_EXPR([a.CONST_EXPR(new i.DefaultIterableDifferFactory)]),e.defaultIterableDiffers=a.CONST_EXPR(new r.IterableDiffers(e.iterableDiff)),e.defaultKeyValueDiffers=a.CONST_EXPR(new o.KeyValueDiffers(e.keyValDiff))},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s); +return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(12),a=n(15),u=n(6),c=function(){function t(t){this.factories=t}return t.create=function(e,n){if(o.isPresent(n)){var r=a.ListWrapper.clone(n.factories);return e=e.concat(r),new t(e)}return new t(e)},t.extend=function(e){return new u.Provider(t,{useFactory:function(n){if(o.isBlank(n))throw new s.BaseException("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new u.SkipSelfMetadata,new u.OptionalMetadata]]})},t.prototype.find=function(t){var e=this.factories.find(function(e){return e.supports(t)});if(o.isPresent(e))return e;throw new s.BaseException("Cannot find a differ supporting object '"+t+"' of type '"+o.getTypeNameForDebugging(t)+"'")},t=r([o.CONST(),i("design:paramtypes",[Array])],t)}();e.IterableDiffers=c},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(12),a=n(15),u=n(5),c=function(){function t(){}return t.prototype.supports=function(t){return a.isListLikeIterable(t)},t.prototype.create=function(t,e){return new l(e)},t=r([o.CONST(),i("design:paramtypes",[])],t)}();e.DefaultIterableDifferFactory=c;var p=function(t,e){return e},l=function(){function t(t){this._trackByFn=t,this._length=null,this._collection=null,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=u.isPresent(this._trackByFn)?this._trackByFn:p}return Object.defineProperty(t.prototype,"collection",{get:function(){return this._collection},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),t.prototype.forEachItem=function(t){var e;for(e=this._itHead;null!==e;e=e._next)t(e)},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousItHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachMovedItem=function(t){var e;for(e=this._movesHead;null!==e;e=e._nextMoved)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.forEachIdentityChange=function(t){var e;for(e=this._identityChangesHead;null!==e;e=e._nextIdentityChange)t(e)},t.prototype.diff=function(t){if(u.isBlank(t)&&(t=[]),!a.isListLikeIterable(t))throw new s.BaseException("Error trying to diff '"+t+"'");return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n,r,i,o=this._itHead,s=!1;if(u.isArray(t)){var c=t;for(this._length=t.length,n=0;n"+u.stringify(this.currentIndex)+"]"},t}();e.CollectionChangeRecord=h;var f=function(){function t(){this._head=null,this._tail=null}return t.prototype.add=function(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)},t.prototype.get=function(t,e){var n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||eo?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(12),a=n(15),u=n(6),c=function(){function t(t){this.factories=t}return t.create=function(e,n){if(o.isPresent(n)){var r=a.ListWrapper.clone(n.factories);return e=e.concat(r),new t(e)}return new t(e)},t.extend=function(e){return new u.Provider(t,{useFactory:function(n){if(o.isBlank(n))throw new s.BaseException("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new u.SkipSelfMetadata,new u.OptionalMetadata]]})},t.prototype.find=function(t){var e=this.factories.find(function(e){return e.supports(t)});if(o.isPresent(e))return e;throw new s.BaseException("Cannot find a differ supporting object '"+t+"'")},t=r([o.CONST(),i("design:paramtypes",[Array])],t)}();e.KeyValueDiffers=c},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(15),s=n(5),a=n(12),u=function(){function t(){}return t.prototype.supports=function(t){return t instanceof Map||s.isJsObject(t)},t.prototype.create=function(t){return new c},t=r([s.CONST(),i("design:paramtypes",[])],t)}();e.DefaultKeyValueDifferFactory=u;var c=function(){function t(){this._records=new Map,this._mapHead=null,this._previousMapHead=null,this._changesHead=null,this._changesTail=null,this._additionsHead=null,this._additionsTail=null,this._removalsHead=null,this._removalsTail=null}return Object.defineProperty(t.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._changesHead||null!==this._removalsHead},enumerable:!0,configurable:!0}),t.prototype.forEachItem=function(t){var e;for(e=this._mapHead;null!==e;e=e._next)t(e)},t.prototype.forEachPreviousItem=function(t){var e;for(e=this._previousMapHead;null!==e;e=e._nextPrevious)t(e)},t.prototype.forEachChangedItem=function(t){var e;for(e=this._changesHead;null!==e;e=e._nextChanged)t(e)},t.prototype.forEachAddedItem=function(t){var e;for(e=this._additionsHead;null!==e;e=e._nextAdded)t(e)},t.prototype.forEachRemovedItem=function(t){var e;for(e=this._removalsHead;null!==e;e=e._nextRemoved)t(e)},t.prototype.diff=function(t){if(s.isBlank(t)&&(t=o.MapWrapper.createFromPairs([])),!(t instanceof Map||s.isJsObject(t)))throw new a.BaseException("Error trying to diff '"+t+"'");return this.check(t)?this:null},t.prototype.onDestroy=function(){},t.prototype.check=function(t){var e=this;this._reset();var n=this._records,r=this._mapHead,i=null,o=null,a=!1;return this._forEach(t,function(t,u){var c;null!==r&&u===r.key?(c=r,s.looseIdentical(t,r.currentValue)||(r.previousValue=r.currentValue,r.currentValue=t,e._addToChanges(r))):(a=!0,null!==r&&(r._next=null,e._removeFromSeq(i,r),e._addToRemovals(r)),n.has(u)?c=n.get(u):(c=new p(u),n.set(u,c),c.currentValue=t,e._addToAdditions(c))),a&&(e._isInRemovals(c)&&e._removeFromRemovals(c),null==o?e._mapHead=c:o._next=c),i=r,o=c,r=null===r?null:r._next}),this._truncate(i,r),this.isDirty},t.prototype._reset=function(){if(this.isDirty){var t;for(t=this._previousMapHead=this._mapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=this._removalsTail=null}},t.prototype._truncate=function(t,e){for(;null!==e;){null===t?this._mapHead=null:t._next=null;var n=e._next;this._addToRemovals(e),t=e,e=n}for(var r=this._removalsHead;null!==r;r=r._nextRemoved)r.previousValue=r.currentValue,r.currentValue=null,this._records["delete"](r.key)},t.prototype._isInRemovals=function(t){return t===this._removalsHead||null!==t._nextRemoved||null!==t._prevRemoved},t.prototype._addToRemovals=function(t){null===this._removalsHead?this._removalsHead=this._removalsTail=t:(this._removalsTail._nextRemoved=t,t._prevRemoved=this._removalsTail,this._removalsTail=t)},t.prototype._removeFromSeq=function(t,e){var n=e._next;null===t?this._mapHead=n:t._next=n},t.prototype._removeFromRemovals=function(t){var e=t._prevRemoved,n=t._nextRemoved;null===e?this._removalsHead=n:e._nextRemoved=n,null===n?this._removalsTail=e:n._prevRemoved=e,t._prevRemoved=t._nextRemoved=null},t.prototype._addToAdditions=function(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)},t.prototype._addToChanges=function(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)},t.prototype.toString=function(){var t,e=[],n=[],r=[],i=[],o=[];for(t=this._mapHead;null!==t;t=t._next)e.push(s.stringify(t));for(t=this._previousMapHead;null!==t;t=t._nextPrevious)n.push(s.stringify(t));for(t=this._changesHead;null!==t;t=t._nextChanged)r.push(s.stringify(t));for(t=this._additionsHead;null!==t;t=t._nextAdded)i.push(s.stringify(t));for(t=this._removalsHead;null!==t;t=t._nextRemoved)o.push(s.stringify(t));return"map: "+e.join(", ")+"\nprevious: "+n.join(", ")+"\nadditions: "+i.join(", ")+"\nchanges: "+r.join(", ")+"\nremovals: "+o.join(", ")+"\n"},t.prototype._forEach=function(t,e){t instanceof Map?t.forEach(e):o.StringMapWrapper.forEach(t,e)},t}();e.DefaultKeyValueDiffer=c;var p=function(){function t(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._nextAdded=null,this._nextRemoved=null,this._prevRemoved=null,this._nextChanged=null}return t.prototype.toString=function(){return s.looseIdentical(this.previousValue,this.currentValue)?s.stringify(this.key):s.stringify(this.key)+"["+s.stringify(this.previousValue)+"->"+s.stringify(this.currentValue)+"]"},t}();e.KeyValueChangeRecord=p},function(t,e,n){"use strict";function r(t){return i.isBlank(t)||t===s.Default}var i=n(5);!function(t){t[t.NeverChecked=0]="NeverChecked",t[t.CheckedBefore=1]="CheckedBefore",t[t.Errored=2]="Errored"}(e.ChangeDetectorState||(e.ChangeDetectorState={}));var o=e.ChangeDetectorState;!function(t){t[t.CheckOnce=0]="CheckOnce",t[t.Checked=1]="Checked",t[t.CheckAlways=2]="CheckAlways",t[t.Detached=3]="Detached",t[t.OnPush=4]="OnPush",t[t.Default=5]="Default"}(e.ChangeDetectionStrategy||(e.ChangeDetectionStrategy={}));var s=e.ChangeDetectionStrategy;e.CHANGE_DETECTION_STRATEGY_VALUES=[s.CheckOnce,s.Checked,s.CheckAlways,s.Detached,s.OnPush,s.Default],e.CHANGE_DETECTOR_STATE_VALUES=[o.NeverChecked,o.CheckedBefore,o.Errored],e.isDefaultChangeDetectionStrategy=r},function(t,e){"use strict";var n=function(){function t(){}return t}();e.ChangeDetectorRef=n},function(t,e,n){"use strict";function r(t,e){return o.isListLikeIterable(t)&&o.isListLikeIterable(e)?o.areIterablesEqual(t,e,r):o.isListLikeIterable(t)||i.isPrimitive(t)||o.isListLikeIterable(e)||i.isPrimitive(e)?i.looseIdentical(t,e):!0}var i=n(5),o=n(15),s=n(5);e.looseIdentical=s.looseIdentical,e.uninitialized=i.CONST_EXPR(new Object),e.devModeEqual=r;var a=function(){function t(t){this.wrapped=t}return t.wrap=function(e){return new t(e)},t}();e.WrappedValue=a;var u=function(){function t(){this.hasWrappedValue=!1}return t.prototype.unwrap=function(t){return t instanceof a?(this.hasWrappedValue=!0,t.wrapped):t},t.prototype.reset=function(){this.hasWrappedValue=!1},t}();e.ValueUnwrapper=u;var c=function(){function t(t,e){this.previousValue=t,this.currentValue=e}return t.prototype.isFirstChange=function(){return this.previousValue===e.uninitialized},t}();e.SimpleChange=c},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5);!function(t){t[t.Emulated=0]="Emulated",t[t.Native=1]="Native",t[t.None=2]="None"}(e.ViewEncapsulation||(e.ViewEncapsulation={}));var s=e.ViewEncapsulation;e.VIEW_ENCAPSULATION_VALUES=[s.Emulated,s.Native,s.None];var a=function(){function t(t){var e=void 0===t?{}:t,n=e.templateUrl,r=e.template,i=e.directives,o=e.pipes,s=e.encapsulation,a=e.styles,u=e.styleUrls;this.templateUrl=n,this.template=r,this.styleUrls=u,this.styles=a,this.directives=i,this.pipes=o,this.encapsulation=s}return t=r([o.CONST(),i("design:paramtypes",[Object])],t)}();e.ViewMetadata=a},function(t,e,n){"use strict";var r=n(9);e.Class=r.Class},function(t,e,n){"use strict";var r=n(5);e.enableProdMode=r.enableProdMode},function(t,e,n){"use strict";var r=n(5);e.Type=r.Type;var i=n(40);e.EventEmitter=i.EventEmitter;var o=n(12);e.WrappedException=o.WrappedException;var s=n(14);e.ExceptionHandler=s.ExceptionHandler},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(5),o=n(41);e.PromiseWrapper=o.PromiseWrapper,e.PromiseCompleter=o.PromiseCompleter;var s=n(42),a=n(43),u=n(58),c=n(42);e.Observable=c.Observable;var p=n(42);e.Subject=p.Subject;var l=function(){function t(){}return t.setTimeout=function(t,e){return i.global.setTimeout(t,e)},t.clearTimeout=function(t){i.global.clearTimeout(t)},t.setInterval=function(t,e){return i.global.setInterval(t,e)},t.clearInterval=function(t){i.global.clearInterval(t)},t}();e.TimerWrapper=l;var h=function(){function t(){}return t.subscribe=function(t,e,n,r){return void 0===r&&(r=function(){}),n="function"==typeof n&&n||i.noop,r="function"==typeof r&&r||i.noop,t.subscribe({next:e,error:n,complete:r})},t.isObservable=function(t){return!!t.subscribe},t.hasSubscribers=function(t){return t.observers.length>0},t.dispose=function(t){t.unsubscribe()},t.callNext=function(t,e){t.next(e)},t.callEmit=function(t,e){t.emit(e)},t.callError=function(t,e){t.error(e)},t.callComplete=function(t){t.complete()},t.fromPromise=function(t){return a.PromiseObservable.create(t)},t.toPromise=function(t){return u.toPromise.call(t)},t}();e.ObservableWrapper=h;var f=function(t){function e(e){void 0===e&&(e=!0),t.call(this),this._isAsync=e}return r(e,t),e.prototype.emit=function(e){t.prototype.next.call(this,e)},e.prototype.next=function(e){t.prototype.next.call(this,e)},e.prototype.subscribe=function(e,n,r){var i,o=function(t){return null},s=function(){return null};return e&&"object"==typeof e?(i=this._isAsync?function(t){setTimeout(function(){return e.next(t)})}:function(t){e.next(t)},e.error&&(o=this._isAsync?function(t){setTimeout(function(){return e.error(t)})}:function(t){e.error(t)}),e.complete&&(s=this._isAsync?function(){setTimeout(function(){return e.complete()})}:function(){e.complete()})):(i=this._isAsync?function(t){setTimeout(function(){return e(t)})}:function(t){e(t)},n&&(o=this._isAsync?function(t){setTimeout(function(){return n(t)})}:function(t){n(t)}),r&&(s=this._isAsync?function(){setTimeout(function(){return r()})}:function(){r()})),t.prototype.subscribe.call(this,i,o,s)},e}(s.Subject);e.EventEmitter=f},function(t,e){"use strict";var n=function(){function t(){var t=this;this.promise=new Promise(function(e,n){t.resolve=e,t.reject=n})}return t}();e.PromiseCompleter=n;var r=function(){function t(){}return t.resolve=function(t){return Promise.resolve(t)},t.reject=function(t,e){return Promise.reject(t)},t.catchError=function(t,e){return t["catch"](e)},t.all=function(t){return 0==t.length?Promise.resolve([]):Promise.all(t)},t.then=function(t,e,n){return t.then(e,n)},t.wrap=function(t){return new Promise(function(e,n){try{e(t())}catch(r){n(r)}})},t.scheduleMicrotask=function(e){t.then(t.resolve(null),e,function(t){})},t.isPromise=function(t){return t instanceof Promise},t.completer=function(){return new n},t}();e.PromiseWrapper=r},function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t){var e=t.value,n=t.subscriber;n.isUnsubscribed||(n.next(e),n.complete())}function i(t){var e=t.err,n=t.subscriber;n.isUnsubscribed||n.error(e)}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},s=n(44),a=n(46),u=function(t){function e(e,n){void 0===n&&(n=null),t.call(this),this.promise=e,this.scheduler=n}return o(e,t),e.create=function(t,n){return void 0===n&&(n=null),new e(t,n)},e.prototype._subscribe=function(t){var e=this,n=this.promise,o=this.scheduler;if(null==o)this._isScalar?t.isUnsubscribed||(t.next(this.value),t.complete()):n.then(function(n){e.value=n,e._isScalar=!0,t.isUnsubscribed||(t.next(n),t.complete())},function(e){t.isUnsubscribed||t.error(e)}).then(null,function(t){s.root.setTimeout(function(){throw t})});else if(this._isScalar){if(!t.isUnsubscribed)return o.schedule(r,0,{value:this.value,subscriber:t})}else n.then(function(n){e.value=n,e._isScalar=!0,t.isUnsubscribed||t.add(o.schedule(r,0,{value:n,subscriber:t}))},function(e){t.isUnsubscribed||t.add(o.schedule(i,0,{err:e,subscriber:t}))}).then(null,function(t){s.root.setTimeout(function(){throw t})})},e}(a.Observable);e.PromiseObservable=u},function(t,e,n){(function(t,n){"use strict";var r={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};e.root=r[typeof self]&&self||r[typeof window]&&window;var i=(r[typeof e]&&e&&!e.nodeType&&e,r[typeof t]&&t&&!t.nodeType&&t,r[typeof n]&&n);!i||i.global!==i&&i.window!==i||(e.root=i)}).call(e,n(45)(t),function(){return this}())},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n){"use strict";var r=n(44),i=n(47),o=n(48),s=n(54),a=n(55),u=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var r=this.operator,i=o.toSubscriber(t,e,n);if(r?i.add(this._subscribe(r.call(i))):i.add(this._subscribe(i)),i.syncErrorThrowable&&(i.syncErrorThrowable=!1,i.syncErrorThrown))throw i.syncErrorValue;return i},t.prototype.forEach=function(t,e,n){if(n||(r.root.Rx&&r.root.Rx.config&&r.root.Rx.config.Promise?n=r.root.Rx.config.Promise:r.root.Promise&&(n=r.root.Promise)),!n)throw new Error("no Promise impl found");var i=this;return new n(function(n,r){i.subscribe(function(n){var i=s.tryCatch(t).call(e,n);i===a.errorObject&&r(a.errorObject.e)},r,n)})},t.prototype._subscribe=function(t){return this.source.subscribe(t)},t.prototype[i.SymbolShim.observable]=function(){return this},t.create=function(e){return new t(e)},t}();e.Observable=u},function(t,e,n){"use strict";function r(t){var e=o(t);return a(e,t),u(e),i(e),e}function i(t){t["for"]||(t["for"]=s)}function o(t){return t.Symbol||(t.Symbol=function(t){return"@@Symbol("+t+"):"+p++}),t.Symbol}function s(t){return"@@"+t}function a(t,e){if(!t.iterator)if("function"==typeof t["for"])t.iterator=t["for"]("iterator");else if(e.Set&&"function"==typeof(new e.Set)["@@iterator"])t.iterator="@@iterator";else if(e.Map)for(var n=Object.getOwnPropertyNames(e.Map.prototype),r=0;ro?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},h=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},f=n(60),d=n(5),v=n(6),y=n(62),m=n(40),g=n(15),_=n(63),b=n(64),P=n(12),E=n(75),w=n(71);e.createNgZone=r;var C,R=!1;e.createPlatform=i,e.assertPlatform=o,e.disposePlatform=s,e.getPlatform=a,e.coreBootstrap=u,e.coreLoadAndBootstrap=c;var S=function(){function t(){}return Object.defineProperty(t.prototype,"injector",{get:function(){throw P.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"disposed",{get:function(){throw P.unimplemented()},enumerable:!0,configurable:!0}),t}();e.PlatformRef=S;var O=function(t){function e(e){if(t.call(this),this._injector=e,this._applications=[],this._disposeListeners=[],this._disposed=!1,!R)throw new P.BaseException("Platforms have to be created via `createPlatform`!");var n=e.get(y.PLATFORM_INITIALIZER,null);d.isPresent(n)&&n.forEach(function(t){return t()})}return p(e,t),e.prototype.registerDisposeListener=function(t){this._disposeListeners.push(t)},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"disposed",{get:function(){return this._disposed},enumerable:!0,configurable:!0}),e.prototype.addApplication=function(t){this._applications.push(t)},e.prototype.dispose=function(){g.ListWrapper.clone(this._applications).forEach(function(t){return t.dispose()}),this._disposeListeners.forEach(function(t){return t()}),this._disposed=!0},e.prototype._applicationDisposed=function(t){g.ListWrapper.remove(this._applications,t)},e=l([v.Injectable(),h("design:paramtypes",[v.Injector])],e)}(S);e.PlatformRef_=O;var T=function(){function t(){}return Object.defineProperty(t.prototype,"injector",{get:function(){return P.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"zone",{get:function(){return P.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentTypes",{get:function(){return P.unimplemented()},enumerable:!0,configurable:!0}),t}();e.ApplicationRef=T;var x=function(t){function e(e,n,r){var i=this;t.call(this),this._platform=e,this._zone=n,this._injector=r,this._bootstrapListeners=[],this._disposeListeners=[],this._rootComponents=[],this._rootComponentTypes=[],this._changeDetectorRefs=[],this._runningTick=!1,this._enforceNoNewChanges=!1;var o=r.get(f.NgZone);this._enforceNoNewChanges=d.assertionsEnabled(),o.run(function(){i._exceptionHandler=r.get(P.ExceptionHandler)}),this._asyncInitDonePromise=this.run(function(){var t,e=r.get(y.APP_INITIALIZER,null),n=[];if(d.isPresent(e))for(var o=0;o0?(t=m.PromiseWrapper.all(n).then(function(t){return i._asyncInitDone=!0}),i._asyncInitDone=!1):(i._asyncInitDone=!0,t=m.PromiseWrapper.resolve(!0)),t}),m.ObservableWrapper.subscribe(o.onError,function(t){i._exceptionHandler.call(t.error,t.stackTrace)}),m.ObservableWrapper.subscribe(this._zone.onMicrotaskEmpty,function(t){i._zone.run(function(){i.tick()})})}return p(e,t),e.prototype.registerBootstrapListener=function(t){this._bootstrapListeners.push(t)},e.prototype.registerDisposeListener=function(t){this._disposeListeners.push(t)},e.prototype.registerChangeDetector=function(t){this._changeDetectorRefs.push(t)},e.prototype.unregisterChangeDetector=function(t){g.ListWrapper.remove(this._changeDetectorRefs,t)},e.prototype.waitForAsyncInitializers=function(){return this._asyncInitDonePromise},e.prototype.run=function(t){var e,n=this,r=this.injector.get(f.NgZone),i=m.PromiseWrapper.completer();return r.run(function(){try{e=t(),d.isPromise(e)&&m.PromiseWrapper.then(e,function(t){i.resolve(t)},function(t,e){i.reject(t,e),n._exceptionHandler.call(t,e)})}catch(r){throw n._exceptionHandler.call(r,r.stack),r}}),d.isPromise(e)?i.promise:e},e.prototype.bootstrap=function(t){var e=this;if(!this._asyncInitDone)throw new P.BaseException("Cannot bootstrap as there are still asynchronous initializers running. Wait for them using waitForAsyncInitializers().");return this.run(function(){e._rootComponentTypes.push(t.componentType);var n=t.create(e._injector,[],t.selector);n.onDestroy(function(){e._unloadComponent(n)});var r=n.injector.get(_.Testability,null);d.isPresent(r)&&n.injector.get(_.TestabilityRegistry).registerApplication(n.location.nativeElement,r),e._loadComponent(n);var i=e._injector.get(E.Console);return d.assertionsEnabled()&&i.log("Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode."),n})},e.prototype._loadComponent=function(t){this._changeDetectorRefs.push(t.changeDetectorRef),this.tick(),this._rootComponents.push(t),this._bootstrapListeners.forEach(function(e){return e(t)})},e.prototype._unloadComponent=function(t){g.ListWrapper.contains(this._rootComponents,t)&&(this.unregisterChangeDetector(t.changeDetectorRef),g.ListWrapper.remove(this._rootComponents,t))},Object.defineProperty(e.prototype,"injector",{get:function(){return this._injector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"zone",{get:function(){return this._zone},enumerable:!0,configurable:!0}),e.prototype.tick=function(){if(this._runningTick)throw new P.BaseException("ApplicationRef.tick is called recursively");var t=e._tickScope();try{this._runningTick=!0,this._changeDetectorRefs.forEach(function(t){return t.detectChanges()}),this._enforceNoNewChanges&&this._changeDetectorRefs.forEach(function(t){return t.checkNoChanges()})}finally{this._runningTick=!1,w.wtfLeave(t)}},e.prototype.dispose=function(){g.ListWrapper.clone(this._rootComponents).forEach(function(t){return t.destroy()}),this._disposeListeners.forEach(function(t){return t()}),this._platform._applicationDisposed(this)},Object.defineProperty(e.prototype,"componentTypes",{get:function(){return this._rootComponentTypes},enumerable:!0,configurable:!0}),e._tickScope=w.wtfCreateScope("ApplicationRef#tick()"),e=l([v.Injectable(),h("design:paramtypes",[O,f.NgZone,v.Injector])],e)}(T);e.ApplicationRef_=x,e.PLATFORM_CORE_PROVIDERS=d.CONST_EXPR([O,d.CONST_EXPR(new v.Provider(S,{useExisting:O}))]),e.APPLICATION_CORE_PROVIDERS=d.CONST_EXPR([d.CONST_EXPR(new v.Provider(f.NgZone,{useFactory:r,deps:d.CONST_EXPR([])})),x,d.CONST_EXPR(new v.Provider(T,{useExisting:x}))])},function(t,e,n){"use strict";var r=n(40),i=n(61),o=n(12),s=n(61);e.NgZoneError=s.NgZoneError;var a=function(){function t(t){var e=this,n=t.enableLongStackTrace,o=void 0===n?!1:n;this._hasPendingMicrotasks=!1,this._hasPendingMacrotasks=!1,this._isStable=!0,this._nesting=0,this._onUnstable=new r.EventEmitter(!1),this._onMicrotaskEmpty=new r.EventEmitter(!1),this._onStable=new r.EventEmitter(!1),this._onErrorEvents=new r.EventEmitter(!1),this._zoneImpl=new i.NgZoneImpl({trace:o,onEnter:function(){e._nesting++,e._isStable&&(e._isStable=!1,e._onUnstable.emit(null))},onLeave:function(){e._nesting--,e._checkStable()},setMicrotask:function(t){e._hasPendingMicrotasks=t,e._checkStable()},setMacrotask:function(t){e._hasPendingMacrotasks=t},onError:function(t){return e._onErrorEvents.emit(t)}})}return t.isInAngularZone=function(){return i.NgZoneImpl.isInAngularZone()},t.assertInAngularZone=function(){if(!i.NgZoneImpl.isInAngularZone())throw new o.BaseException("Expected to be in Angular Zone, but it is not!")},t.assertNotInAngularZone=function(){if(i.NgZoneImpl.isInAngularZone())throw new o.BaseException("Expected to not be in Angular Zone, but it is!")},t.prototype._checkStable=function(){var t=this;if(0==this._nesting&&!this._hasPendingMicrotasks&&!this._isStable)try{this._nesting++,this._onMicrotaskEmpty.emit(null)}finally{if(this._nesting--,!this._hasPendingMicrotasks)try{this.runOutsideAngular(function(){return t._onStable.emit(null)})}finally{this._isStable=!0}}},Object.defineProperty(t.prototype,"onUnstable",{get:function(){return this._onUnstable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onMicrotaskEmpty",{get:function(){return this._onMicrotaskEmpty},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onStable",{get:function(){return this._onStable},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onError",{get:function(){return this._onErrorEvents},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasPendingMicrotasks",{get:function(){return this._hasPendingMicrotasks},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasPendingMacrotasks",{get:function(){return this._hasPendingMacrotasks},enumerable:!0,configurable:!0}),t.prototype.run=function(t){return this._zoneImpl.runInner(t)},t.prototype.runGuarded=function(t){return this._zoneImpl.runInnerGuarded(t)},t.prototype.runOutsideAngular=function(t){return this._zoneImpl.runOuter(t)},t}();e.NgZone=a},function(t,e){"use strict";var n=function(){function t(t,e){this.error=t,this.stackTrace=e}return t}();e.NgZoneError=n;var r=function(){function t(t){var e=this,r=t.trace,i=t.onEnter,o=t.onLeave,s=t.setMicrotask,a=t.setMacrotask,u=t.onError;if(this.onEnter=i,this.onLeave=o,this.setMicrotask=s,this.setMacrotask=a,this.onError=u,!Zone)throw new Error("Angular2 needs to be run with Zone.js polyfill.");this.outer=this.inner=Zone.current,Zone.wtfZoneSpec&&(this.inner=this.inner.fork(Zone.wtfZoneSpec)),r&&Zone.longStackTraceZoneSpec&&(this.inner=this.inner.fork(Zone.longStackTraceZoneSpec)),this.inner=this.inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:function(t,n,r,i,o,s){try{return e.onEnter(),t.invokeTask(r,i,o,s)}finally{e.onLeave()}},onInvoke:function(t,n,r,i,o,s,a){try{return e.onEnter(),t.invoke(r,i,o,s,a)}finally{e.onLeave()}},onHasTask:function(t,n,r,i){t.hasTask(r,i),n==r&&("microTask"==i.change?e.setMicrotask(i.microTask):"macroTask"==i.change&&e.setMacrotask(i.macroTask))},onHandleError:function(t,r,i,o){return t.handleError(i,o),e.onError(new n(o,o.stack)),!1}})}return t.isInAngularZone=function(){return Zone.current.get("isAngularZone")===!0},t.prototype.runInner=function(t){return this.inner.run(t)},t.prototype.runInnerGuarded=function(t){return this.inner.runGuarded(t)},t.prototype.runOuter=function(t){return this.outer.run(t)},t}();e.NgZoneImpl=r},function(t,e,n){"use strict";function r(){return""+i()+i()+i()}function i(){return s.StringWrapper.fromCharCode(97+s.Math.floor(25*s.Math.random()))}var o=n(6),s=n(5);e.APP_ID=s.CONST_EXPR(new o.OpaqueToken("AppId")),e.APP_ID_RANDOM_PROVIDER=s.CONST_EXPR(new o.Provider(e.APP_ID,{useFactory:r,deps:[]})),e.PLATFORM_INITIALIZER=s.CONST_EXPR(new o.OpaqueToken("Platform Initializer")),e.APP_INITIALIZER=s.CONST_EXPR(new o.OpaqueToken("Application Initializer")),e.PACKAGE_ROOT_URL=s.CONST_EXPR(new o.OpaqueToken("Application Packages Root URL"))},function(t,e,n){"use strict";function r(t){v=t}var i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(6),a=n(15),u=n(5),c=n(12),p=n(60),l=n(40),h=function(){function t(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents()}return t.prototype._watchAngularEvents=function(){var t=this;l.ObservableWrapper.subscribe(this._ngZone.onUnstable,function(e){t._didWork=!0,t._isZoneStable=!1}),this._ngZone.runOutsideAngular(function(){l.ObservableWrapper.subscribe(t._ngZone.onStable,function(e){p.NgZone.assertNotInAngularZone(),u.scheduleMicroTask(function(){t._isZoneStable=!0,t._runCallbacksIfReady()})})})},t.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount},t.prototype.decreasePendingRequestCount=function(){if(this._pendingCount-=1,this._pendingCount<0)throw new c.BaseException("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount},t.prototype.isStable=function(){return this._isZoneStable&&0==this._pendingCount&&!this._ngZone.hasPendingMacrotasks},t.prototype._runCallbacksIfReady=function(){var t=this;this.isStable()?u.scheduleMicroTask(function(){for(;0!==t._callbacks.length;)t._callbacks.pop()(t._didWork);t._didWork=!1}):this._didWork=!0},t.prototype.whenStable=function(t){this._callbacks.push(t),this._runCallbacksIfReady()},t.prototype.getPendingRequestCount=function(){return this._pendingCount},t.prototype.findBindings=function(t,e,n){return[]},t.prototype.findProviders=function(t,e,n){return[]},t=i([s.Injectable(),o("design:paramtypes",[p.NgZone])],t)}();e.Testability=h;var f=function(){function t(){this._applications=new a.Map,v.addToWindow(this)}return t.prototype.registerApplication=function(t,e){this._applications.set(t,e)},t.prototype.getTestability=function(t){return this._applications.get(t)},t.prototype.getAllTestabilities=function(){return a.MapWrapper.values(this._applications)},t.prototype.getAllRootElements=function(){return a.MapWrapper.keys(this._applications)},t.prototype.findTestabilityInTree=function(t,e){return void 0===e&&(e=!0),v.findTestabilityInTree(this,t,e)},t=i([s.Injectable(),o("design:paramtypes",[])],t)}();e.TestabilityRegistry=f;var d=function(){function t(){}return t.prototype.addToWindow=function(t){},t.prototype.findTestabilityInTree=function(t,e,n){return null},t=i([u.CONST(),o("design:paramtypes",[])],t)}();e.setTestabilityGetter=r;var v=u.CONST_EXPR(new d)},function(t,e,n){"use strict";function r(t){return t instanceof h.ComponentFactory}var i=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},s=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},a=n(6),u=n(5),c=n(12),p=n(40),l=n(18),h=n(65),f=function(){function t(){}return t}();e.ComponentResolver=f;var d=function(t){function e(){t.apply(this,arguments)}return i(e,t),e.prototype.resolveComponent=function(t){var e=l.reflector.annotations(t),n=e.find(r);if(u.isBlank(n))throw new c.BaseException("No precompiled component "+u.stringify(t)+" found");return p.PromiseWrapper.resolve(n)},e.prototype.clearCache=function(){},e=o([a.Injectable(),s("design:paramtypes",[])],e)}(f);e.ReflectorComponentResolver=d},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(5),a=n(12),u=n(66),c=function(){function t(){}return Object.defineProperty(t.prototype,"location",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"instance",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hostView",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"changeDetectorRef",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentType",{get:function(){return a.unimplemented()},enumerable:!0,configurable:!0}),t}();e.ComponentRef=c;var p=function(t){function e(e,n){t.call(this),this._hostElement=e,this._componentType=n}return r(e,t),Object.defineProperty(e.prototype,"location",{get:function(){return this._hostElement.elementRef},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"injector",{get:function(){return this._hostElement.injector},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"instance",{get:function(){return this._hostElement.component},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hostView",{get:function(){return this._hostElement.parentView.ref},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return this.hostView},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"componentType",{get:function(){return this._componentType},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._hostElement.parentView.destroy()},e.prototype.onDestroy=function(t){this.hostView.onDestroy(t)},e}(c);e.ComponentRef_=p;var l=function(){function t(t,e,n){this.selector=t,this._viewFactory=e,this._componentType=n}return Object.defineProperty(t.prototype,"componentType",{get:function(){return this._componentType},enumerable:!0,configurable:!0}),t.prototype.create=function(t,e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.get(u.ViewUtils);s.isBlank(e)&&(e=[]);var i=this._viewFactory(r,t,null),o=i.create(e,n);return new p(o,this._componentType)},t=i([s.CONST(),o("design:paramtypes",[String,Function,s.Type])],t)}();e.ComponentFactory=l},function(t,e,n){"use strict";function r(t){return i(t,[])}function i(t,e){for(var n=0;ni;i++)n[i]=r>i?t[i]:D}else n=t;return n}function s(t,e,n,r,i,o,s,u,c,p,l,h,f,d,v,y,m,g,_,b){switch(t){case 1:return e+a(n)+r;case 2:return e+a(n)+r+a(i)+o;case 3:return e+a(n)+r+a(i)+o+a(s)+u;case 4:return e+a(n)+r+a(i)+o+a(s)+u+a(c)+p;case 5:return e+a(n)+r+a(i)+o+a(s)+u+a(c)+p+a(l)+h;case 6:return e+a(n)+r+a(i)+o+a(s)+u+a(c)+p+a(l)+h+a(f)+d;case 7:return e+a(n)+r+a(i)+o+a(s)+u+a(c)+p+a(l)+h+a(f)+d+a(v)+y;case 8:return e+a(n)+r+a(i)+o+a(s)+u+a(c)+p+a(l)+h+a(f)+d+a(v)+y+a(m)+g;case 9:return e+a(n)+r+a(i)+o+a(s)+u+a(c)+p+a(l)+h+a(f)+d+a(v)+y+a(m)+g+a(_)+b;default:throw new O.BaseException("Does not support more than 9 expressions")}}function a(t){return null!=t?t.toString():""}function u(t,e,n){if(t){if(!A.devModeEqual(e,n))throw new x.ExpressionChangedAfterItHasBeenCheckedException(e,n,null);return!1}return!R.looseIdentical(e,n)}function c(t,e){if(t.length!=e.length)return!1;for(var n=0;no?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},w=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},C=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},R=n(5),S=n(15),O=n(12),T=n(67),x=n(73),A=n(28),I=n(6),M=n(74),k=n(62),N=function(){function t(t,e){this._renderer=t,this._appId=e,this._nextCompTypeId=0}return t.prototype.createRenderComponentType=function(t,e,n,r){return new M.RenderComponentType(this._appId+"-"+this._nextCompTypeId++,t,e,n,r)},t.prototype.renderComponent=function(t){return this._renderer.renderComponent(t)},t=E([I.Injectable(),C(1,I.Inject(k.APP_ID)),w("design:paramtypes",[M.RootRenderer,String])],t)}();e.ViewUtils=N,e.flattenNestedViewRenderNodes=r;var D=R.CONST_EXPR([]);e.ensureSlotCount=o,e.MAX_INTERPOLATION_VALUES=9,e.interpolate=s,e.checkBinding=u,e.arrayLooseIdentical=c,e.mapLooseIdentical=p,e.castByValue=l,e.pureProxy1=h,e.pureProxy2=f,e.pureProxy3=d,e.pureProxy4=v,e.pureProxy5=y,e.pureProxy6=m,e.pureProxy7=g,e.pureProxy8=_,e.pureProxy9=b,e.pureProxy10=P},function(t,e,n){"use strict";var r=n(5),i=n(15),o=n(12),s=n(68),a=n(69),u=n(70),c=function(){function t(t,e,n,r){this.index=t,this.parentIndex=e,this.parentView=n,this.nativeElement=r,this.nestedViews=null,this.componentView=null}return Object.defineProperty(t.prototype,"elementRef",{get:function(){return new a.ElementRef(this.nativeElement)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"vcRef",{get:function(){return new u.ViewContainerRef_(this)},enumerable:!0,configurable:!0}),t.prototype.initComponent=function(t,e,n){this.component=t,this.componentConstructorViewQueries=e,this.componentView=n},Object.defineProperty(t.prototype,"parentInjector",{get:function(){return this.parentView.injector(this.parentIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return this.parentView.injector(this.index)},enumerable:!0,configurable:!0}),t.prototype.mapNestedViews=function(t,e){var n=[];return r.isPresent(this.nestedViews)&&this.nestedViews.forEach(function(r){r.clazz===t&&n.push(e(r))}),n},t.prototype.attachView=function(t,e){if(t.type===s.ViewType.COMPONENT)throw new o.BaseException("Component views can't be moved!");var n=this.nestedViews;null==n&&(n=[],this.nestedViews=n),i.ListWrapper.insert(n,e,t);var a;if(e>0){var u=n[e-1];a=u.lastRootNode}else a=this.nativeElement;r.isPresent(a)&&t.renderer.attachViewAfter(a,t.flatRootNodes),t.addToContentChildren(this)},t.prototype.detachView=function(t){var e=i.ListWrapper.removeAt(this.nestedViews,t);if(e.type===s.ViewType.COMPONENT)throw new o.BaseException("Component views can't be moved!");return e.renderer.detachView(e.flatRootNodes),e.removeFromContentChildren(this),e},t}();e.AppElement=c},function(t,e){"use strict";!function(t){t[t.HOST=0]="HOST",t[t.COMPONENT=1]="COMPONENT",t[t.EMBEDDED=2]="EMBEDDED"}(e.ViewType||(e.ViewType={}));e.ViewType},function(t,e){"use strict";var n=function(){function t(t){this.nativeElement=t}return t}();e.ElementRef=n},function(t,e,n){"use strict";var r=n(15),i=n(12),o=n(5),s=n(71),a=function(){function t(){}return Object.defineProperty(t.prototype,"element",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),t}();e.ViewContainerRef=a;var u=function(){function t(t){this._element=t,this._createComponentInContainerScope=s.wtfCreateScope("ViewContainerRef#createComponent()"),this._insertScope=s.wtfCreateScope("ViewContainerRef#insert()"),this._removeScope=s.wtfCreateScope("ViewContainerRef#remove()"),this._detachScope=s.wtfCreateScope("ViewContainerRef#detach()")}return t.prototype.get=function(t){return this._element.nestedViews[t].ref},Object.defineProperty(t.prototype,"length",{get:function(){var t=this._element.nestedViews;return o.isPresent(t)?t.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element.elementRef},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return this._element.injector},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentInjector",{get:function(){return this._element.parentInjector},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(t,e){void 0===e&&(e=-1);var n=t.createEmbeddedView();return this.insert(n,e),n},t.prototype.createComponent=function(t,e,n,r){void 0===e&&(e=-1),void 0===n&&(n=null),void 0===r&&(r=null);var i=this._createComponentInContainerScope(),a=o.isPresent(n)?n:this._element.parentInjector,u=t.create(a,r);return this.insert(u.hostView,e),s.wtfLeave(i,u)},t.prototype.insert=function(t,e){void 0===e&&(e=-1);var n=this._insertScope();-1==e&&(e=this.length);var r=t;return this._element.attachView(r.internalView,e),s.wtfLeave(n,r)},t.prototype.indexOf=function(t){return r.ListWrapper.indexOf(this._element.nestedViews,t.internalView)},t.prototype.remove=function(t){void 0===t&&(t=-1);var e=this._removeScope();-1==t&&(t=this.length-1);var n=this._element.detachView(t);n.destroy(),s.wtfLeave(e)},t.prototype.detach=function(t){void 0===t&&(t=-1);var e=this._detachScope();-1==t&&(t=this.length-1);var n=this._element.detachView(t);return s.wtfLeave(e,n.ref)},t.prototype.clear=function(){for(var t=this.length-1;t>=0;t--)this.remove(t)},t}();e.ViewContainerRef_=u},function(t,e,n){"use strict";function r(t,e){return null}var i=n(72);e.wtfEnabled=i.detectWTF(),e.wtfCreateScope=e.wtfEnabled?i.createScope:function(t,e){return r},e.wtfLeave=e.wtfEnabled?i.leave:function(t,e){return e},e.wtfStartTimeRange=e.wtfEnabled?i.startTimeRange:function(t,e){return null},e.wtfEndTimeRange=e.wtfEnabled?i.endTimeRange:function(t){return null}},function(t,e,n){"use strict";function r(){var t=p.global.wtf;return t&&(u=t.trace)?(c=u.events,!0):!1}function i(t,e){return void 0===e&&(e=null),c.createScope(t,e)}function o(t,e){return u.leaveScope(t,e),e}function s(t,e){return u.beginTimeRange(t,e)}function a(t){u.endTimeRange(t)}var u,c,p=n(5);e.detectWTF=r,e.createScope=i,e.leave=o,e.startTimeRange=s,e.endTimeRange=a},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(12),o=function(t){function e(e,n,r){t.call(this,"Expression has changed after it was checked. "+("Previous value: '"+e+"'. Current value: '"+n+"'"))}return r(e,t),e}(i.BaseException);e.ExpressionChangedAfterItHasBeenCheckedException=o;var s=function(t){function e(e,n,r){t.call(this,"Error in "+r.source,e,n,r)}return r(e,t),e}(i.WrappedException);e.ViewWrappedException=s;var a=function(t){function e(e){t.call(this,"Attempt to use a destroyed view: "+e)}return r(e,t),e}(i.BaseException);e.ViewDestroyedException=a},function(t,e,n){"use strict";var r=n(12),i=function(){function t(t,e,n,r,i){this.id=t,this.templateUrl=e,this.slotCount=n,this.encapsulation=r,this.styles=i}return t}();e.RenderComponentType=i;var o=function(){function t(){}return Object.defineProperty(t.prototype,"injector",{get:function(){return r.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){ +return r.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return r.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"locals",{get:function(){return r.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return r.unimplemented()},enumerable:!0,configurable:!0}),t}();e.RenderDebugInfo=o;var s=function(){function t(){}return t}();e.Renderer=s;var a=function(){function t(){}return t}();e.RootRenderer=a},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(6),s=n(5),a=function(){function t(){}return t.prototype.log=function(t){s.print(t)},t=r([o.Injectable(),i("design:paramtypes",[])],t)}();e.Console=a},function(t,e,n){"use strict";var r=n(60);e.NgZone=r.NgZone,e.NgZoneError=r.NgZoneError},function(t,e,n){"use strict";var r=n(74);e.RootRenderer=r.RootRenderer,e.Renderer=r.Renderer,e.RenderComponentType=r.RenderComponentType},function(t,e,n){"use strict";var r=n(64);e.ComponentResolver=r.ComponentResolver;var i=n(79);e.QueryList=i.QueryList;var o=n(80);e.DynamicComponentLoader=o.DynamicComponentLoader;var s=n(69);e.ElementRef=s.ElementRef;var a=n(81);e.TemplateRef=a.TemplateRef;var u=n(82);e.EmbeddedViewRef=u.EmbeddedViewRef,e.ViewRef=u.ViewRef;var c=n(70);e.ViewContainerRef=c.ViewContainerRef;var p=n(65);e.ComponentRef=p.ComponentRef,e.ComponentFactory=p.ComponentFactory;var l=n(73);e.ExpressionChangedAfterItHasBeenCheckedException=l.ExpressionChangedAfterItHasBeenCheckedException},function(t,e,n){"use strict";var r=n(15),i=n(5),o=n(40),s=function(){function t(){this._dirty=!0,this._results=[],this._emitter=new o.EventEmitter}return Object.defineProperty(t.prototype,"changes",{get:function(){return this._emitter},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"length",{get:function(){return this._results.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"first",{get:function(){return r.ListWrapper.first(this._results)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"last",{get:function(){return r.ListWrapper.last(this._results)},enumerable:!0,configurable:!0}),t.prototype.map=function(t){return this._results.map(t)},t.prototype.filter=function(t){return this._results.filter(t)},t.prototype.reduce=function(t,e){return this._results.reduce(t,e)},t.prototype.forEach=function(t){this._results.forEach(t)},t.prototype.toArray=function(){return r.ListWrapper.clone(this._results)},t.prototype[i.getSymbolIterator()]=function(){return this._results[i.getSymbolIterator()]()},t.prototype.toString=function(){return this._results.toString()},t.prototype.reset=function(t){this._results=r.ListWrapper.flatten(t),this._dirty=!1},t.prototype.notifyOnChanges=function(){this._emitter.emit(this)},t.prototype.setDirty=function(){this._dirty=!0},Object.defineProperty(t.prototype,"dirty",{get:function(){return this._dirty},enumerable:!0,configurable:!0}),t}();e.QueryList=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(6),a=n(64),u=n(5),c=function(){function t(){}return t}();e.DynamicComponentLoader=c;var p=function(t){function e(e){t.call(this),this._compiler=e}return r(e,t),e.prototype.loadAsRoot=function(t,e,n,r,i){return this._compiler.resolveComponent(t).then(function(t){var o=t.create(n,i,u.isPresent(e)?e:t.selector);return u.isPresent(r)&&o.onDestroy(r),o})},e.prototype.loadNextToLocation=function(t,e,n,r){return void 0===n&&(n=null),void 0===r&&(r=null),this._compiler.resolveComponent(t).then(function(t){var i=e.parentInjector,o=u.isPresent(n)&&n.length>0?s.ReflectiveInjector.fromResolvedProviders(n,i):i;return e.createComponent(t,e.length,o,r)})},e=i([s.Injectable(),o("design:paramtypes",[a.ComponentResolver])],e)}(c);e.DynamicComponentLoader_=p},function(t,e){"use strict";var n=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},r=function(){function t(){}return Object.defineProperty(t.prototype,"elementRef",{get:function(){return null},enumerable:!0,configurable:!0}),t}();e.TemplateRef=r;var i=function(t){function e(e,n){t.call(this),this._appElement=e,this._viewFactory=n}return n(e,t),e.prototype.createEmbeddedView=function(){var t=this._viewFactory(this._appElement.parentView.viewUtils,this._appElement.parentInjector,this._appElement);return t.create(null,null),t.ref},Object.defineProperty(e.prototype,"elementRef",{get:function(){return this._appElement.elementRef},enumerable:!0,configurable:!0}),e}(r);e.TemplateRef_=i},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(12),o=n(34),s=n(33),a=function(t){function e(){t.apply(this,arguments)}return r(e,t),Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"destroyed",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),e}(o.ChangeDetectorRef);e.ViewRef=a;var u=function(t){function e(){t.apply(this,arguments)}return r(e,t),Object.defineProperty(e.prototype,"rootNodes",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),e}(a);e.EmbeddedViewRef=u;var c=function(){function t(t){this._view=t,this._view=t}return Object.defineProperty(t.prototype,"internalView",{get:function(){return this._view},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"changeDetectorRef",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rootNodes",{get:function(){return this._view.flatRootNodes},enumerable:!0,configurable:!0}),t.prototype.setLocal=function(t,e){this._view.setLocal(t,e)},t.prototype.hasLocal=function(t){return this._view.hasLocal(t)},Object.defineProperty(t.prototype,"destroyed",{get:function(){return this._view.destroyed},enumerable:!0,configurable:!0}),t.prototype.markForCheck=function(){this._view.markPathToRootAsCheckOnce()},t.prototype.detach=function(){this._view.cdMode=s.ChangeDetectionStrategy.Detached},t.prototype.detectChanges=function(){this._view.detectChanges(!1)},t.prototype.checkNoChanges=function(){this._view.detectChanges(!0)},t.prototype.reattach=function(){this._view.cdMode=s.ChangeDetectionStrategy.CheckAlways,this.markForCheck()},t.prototype.onDestroy=function(t){this._view.disposables.push(t)},t.prototype.destroy=function(){this._view.destroy()},t}();e.ViewRef_=c},function(t,e,n){"use strict";function r(t){return t.map(function(t){return t.nativeElement})}function i(t,e,n){t.childNodes.forEach(function(t){t instanceof v&&(e(t)&&n.push(t),i(t,e,n))})}function o(t,e,n){t instanceof v&&t.childNodes.forEach(function(t){e(t)&&n.push(t),t instanceof v&&o(t,e,n)})}function s(t){return y.get(t)}function a(){return h.MapWrapper.values(y)}function u(t){y.set(t.nativeNode,t)}function c(t){y["delete"](t.nativeNode)}var p=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},l=n(5),h=n(15),f=function(){function t(t,e){this.name=t,this.callback=e}return t}();e.EventListener=f;var d=function(){function t(t,e,n){this._debugInfo=n,this.nativeNode=t,l.isPresent(e)&&e instanceof v?e.addChild(this):this.parent=null,this.listeners=[]}return Object.defineProperty(t.prototype,"injector",{get:function(){return l.isPresent(this._debugInfo)?this._debugInfo.injector:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentInstance",{get:function(){return l.isPresent(this._debugInfo)?this._debugInfo.component:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"locals",{get:function(){return l.isPresent(this._debugInfo)?this._debugInfo.locals:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){return l.isPresent(this._debugInfo)?this._debugInfo.providerTokens:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return l.isPresent(this._debugInfo)?this._debugInfo.source:null},enumerable:!0,configurable:!0}),t.prototype.inject=function(t){return this.injector.get(t)},t.prototype.getLocal=function(t){return this.locals[t]},t}();e.DebugNode=d;var v=function(t){function e(e,n,r){t.call(this,e,n,r),this.properties={},this.attributes={},this.childNodes=[],this.nativeElement=e}return p(e,t),e.prototype.addChild=function(t){l.isPresent(t)&&(this.childNodes.push(t),t.parent=this)},e.prototype.removeChild=function(t){var e=this.childNodes.indexOf(t);-1!==e&&(t.parent=null,this.childNodes.splice(e,1))},e.prototype.insertChildrenAfter=function(t,e){var n=this.childNodes.indexOf(t);if(-1!==n){var r=this.childNodes.slice(0,n+1),i=this.childNodes.slice(n+1);this.childNodes=h.ListWrapper.concat(h.ListWrapper.concat(r,e),i);for(var o=0;o0?e[0]:null},e.prototype.queryAll=function(t){var e=[];return i(this,t,e),e},e.prototype.queryAllNodes=function(t){var e=[];return o(this,t,e),e},Object.defineProperty(e.prototype,"children",{get:function(){var t=[];return this.childNodes.forEach(function(n){n instanceof e&&t.push(n)}),t},enumerable:!0,configurable:!0}),e.prototype.triggerEventHandler=function(t,e){this.listeners.forEach(function(n){n.name==t&&n.callback(e)})},e}(d);e.DebugElement=v,e.asNativeElements=r;var y=new Map;e.getDebugNode=s,e.getAllDebugNodes=a,e.indexDebugNode=u,e.removeDebugNodeFromIndex=c},function(t,e,n){"use strict";var r=n(6),i=n(5);e.PLATFORM_DIRECTIVES=i.CONST_EXPR(new r.OpaqueToken("Platform Directives")),e.PLATFORM_PIPES=i.CONST_EXPR(new r.OpaqueToken("Platform Pipes"))},function(t,e,n){"use strict";function r(){return a.reflector}var i=n(5),o=n(6),s=n(75),a=n(18),u=n(20),c=n(63),p=n(59);e.PLATFORM_COMMON_PROVIDERS=i.CONST_EXPR([p.PLATFORM_CORE_PROVIDERS,new o.Provider(a.Reflector,{useFactory:r,deps:[]}),new o.Provider(u.ReflectorReader,{useExisting:a.Reflector}),c.TestabilityRegistry,s.Console])},function(t,e,n){"use strict";var r=n(5),i=n(6),o=n(62),s=n(59),a=n(28),u=n(66),c=n(64),p=n(64),l=n(80),h=n(80);e.APPLICATION_COMMON_PROVIDERS=r.CONST_EXPR([s.APPLICATION_CORE_PROVIDERS,new i.Provider(c.ComponentResolver,{useClass:p.ReflectorComponentResolver}),o.APP_ID_RANDOM_PROVIDER,u.ViewUtils,new i.Provider(a.IterableDiffers,{useValue:a.defaultIterableDiffers}),new i.Provider(a.KeyValueDiffers,{useValue:a.defaultKeyValueDiffers}),new i.Provider(l.DynamicComponentLoader,{useClass:h.DynamicComponentLoader_})])},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(88)),r(n(102)),r(n(112)),r(n(136))},function(t,e,n){"use strict";var r=n(89);e.AsyncPipe=r.AsyncPipe;var i=n(91);e.DatePipe=i.DatePipe;var o=n(93);e.JsonPipe=o.JsonPipe;var s=n(94);e.SlicePipe=s.SlicePipe;var a=n(95);e.LowerCasePipe=a.LowerCasePipe;var u=n(96);e.NumberPipe=u.NumberPipe,e.DecimalPipe=u.DecimalPipe,e.PercentPipe=u.PercentPipe,e.CurrencyPipe=u.CurrencyPipe;var c=n(97);e.UpperCasePipe=c.UpperCasePipe;var p=n(98);e.ReplacePipe=p.ReplacePipe;var l=n(99);e.I18nPluralPipe=l.I18nPluralPipe;var h=n(100);e.I18nSelectPipe=h.I18nSelectPipe;var f=n(101);e.COMMON_PIPES=f.COMMON_PIPES},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(40),a=n(2),u=n(90),c=function(){function t(){}return t.prototype.createSubscription=function(t,e){return s.ObservableWrapper.subscribe(t,e,function(t){throw t})},t.prototype.dispose=function(t){s.ObservableWrapper.dispose(t)},t.prototype.onDestroy=function(t){s.ObservableWrapper.dispose(t)},t}(),p=function(){function t(){}return t.prototype.createSubscription=function(t,e){return t.then(e)},t.prototype.dispose=function(t){},t.prototype.onDestroy=function(t){},t}(),l=new p,h=new c,f=function(){function t(t){this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null,this._strategy=null,this._ref=t}return t.prototype.ngOnDestroy=function(){o.isPresent(this._subscription)&&this._dispose()},t.prototype.transform=function(t){return o.isBlank(this._obj)?(o.isPresent(t)&&this._subscribe(t),this._latestReturnedValue=this._latestValue,this._latestValue):t!==this._obj?(this._dispose(),this.transform(t)):this._latestValue===this._latestReturnedValue?this._latestReturnedValue:(this._latestReturnedValue=this._latestValue,a.WrappedValue.wrap(this._latestValue))},t.prototype._subscribe=function(t){var e=this;this._obj=t,this._strategy=this._selectStrategy(t),this._subscription=this._strategy.createSubscription(t,function(n){return e._updateLatestValue(t,n)})},t.prototype._selectStrategy=function(e){if(o.isPromise(e))return l;if(s.ObservableWrapper.isObservable(e))return h;throw new u.InvalidPipeArgumentException(t,e)},t.prototype._dispose=function(){this._strategy.dispose(this._subscription),this._latestValue=null,this._latestReturnedValue=null,this._subscription=null,this._obj=null},t.prototype._updateLatestValue=function(t,e){t===this._obj&&(this._latestValue=e,this._ref.markForCheck())},t=r([a.Pipe({name:"async",pure:!1}),a.Injectable(),i("design:paramtypes",[a.ChangeDetectorRef])],t)}();e.AsyncPipe=f},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(5),o=n(12),s=function(t){function e(e,n){t.call(this,"Invalid argument '"+n+"' for pipe '"+i.stringify(e)+"'")}return r(e,t),e}(o.BaseException);e.InvalidPipeArgumentException=s},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(92),a=n(2),u=n(15),c=n(90),p="en-US",l=function(){function t(){}return t.prototype.transform=function(e,n){if(void 0===n&&(n="mediumDate"),o.isBlank(e))return null;if(!this.supports(e))throw new c.InvalidPipeArgumentException(t,e);return o.isNumber(e)&&(e=o.DateWrapper.fromMillis(e)),u.StringMapWrapper.contains(t._ALIASES,n)&&(n=u.StringMapWrapper.get(t._ALIASES,n)),s.DateFormatter.format(e,p,n)},t.prototype.supports=function(t){return o.isDate(t)||o.isNumber(t)},t._ALIASES={medium:"yMMMdjms","short":"yMdjm",fullDate:"yMMMMEEEEd",longDate:"yMMMMd",mediumDate:"yMMMd",shortDate:"yMd",mediumTime:"jms",shortTime:"jm"},t=r([o.CONST(),a.Pipe({name:"date",pure:!0}),a.Injectable(),i("design:paramtypes",[])],t)}();e.DatePipe=l},function(t,e){"use strict";function n(t){return 2==t?"2-digit":"numeric"}function r(t){return 4>t?"short":"long"}function i(t){for(var e,i={},o=0;o=3?i.month=r(s):i.month=n(s);break;case"d":i.day=n(s);break;case"E":i.weekday=r(s);break;case"j":i.hour=n(s);break;case"h":i.hour=n(s),i.hour12=!0;break;case"H":i.hour=n(s),i.hour12=!1;break;case"m":i.minute=n(s);break;case"s":i.second=n(s);break;case"z":i.timeZoneName="long";break;case"Z":i.timeZoneName="short"}o=e}return i}!function(t){t[t.Decimal=0]="Decimal",t[t.Percent=1]="Percent",t[t.Currency=2]="Currency"}(e.NumberFormatStyle||(e.NumberFormatStyle={}));var o=e.NumberFormatStyle,s=function(){function t(){}return t.format=function(t,e,n,r){var i=void 0===r?{}:r,s=i.minimumIntegerDigits,a=void 0===s?1:s,u=i.minimumFractionDigits,c=void 0===u?0:u,p=i.maximumFractionDigits,l=void 0===p?3:p,h=i.currency,f=i.currencyAsSymbol,d=void 0===f?!1:f,v={minimumIntegerDigits:a,minimumFractionDigits:c,maximumFractionDigits:l};return v.style=o[n].toLowerCase(),n==o.Currency&&(v.currency=h,v.currencyDisplay=d?"symbol":"code"),new Intl.NumberFormat(e,v).format(t)},t}();e.NumberFormatter=s;var a=new Map,u=function(){function t(){}return t.format=function(t,e,n){var r=e+n;if(a.has(r))return a.get(r).format(t);var o=new Intl.DateTimeFormat(e,i(n));return a.set(r,o),o.format(t)},t}();e.DateFormatter=u},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(2),a=function(){function t(){}return t.prototype.transform=function(t){return o.Json.stringify(t)},t=r([o.CONST(),s.Pipe({name:"json",pure:!1}),s.Injectable(),i("design:paramtypes",[])],t)}();e.JsonPipe=a},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(15),a=n(2),u=n(90),c=function(){function t(){}return t.prototype.transform=function(e,n,r){if(void 0===r&&(r=null),!this.supports(e))throw new u.InvalidPipeArgumentException(t,e);return o.isBlank(e)?e:o.isString(e)?o.StringWrapper.slice(e,n,r):s.ListWrapper.slice(e,n,r)},t.prototype.supports=function(t){return o.isString(t)||o.isArray(t)},t=r([a.Pipe({name:"slice",pure:!1}),a.Injectable(),i("design:paramtypes",[])],t)}();e.SlicePipe=c},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(2),a=n(90),u=function(){function t(){}return t.prototype.transform=function(e){if(o.isBlank(e))return e;if(!o.isString(e))throw new a.InvalidPipeArgumentException(t,e);return e.toLowerCase()},t=r([o.CONST(),s.Pipe({name:"lowercase"}),s.Injectable(),i("design:paramtypes",[])],t)}();e.LowerCasePipe=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(5),a=n(12),u=n(92),c=n(2),p=n(90),l="en-US",h=s.RegExpWrapper.create("^(\\d+)?\\.((\\d+)(\\-(\\d+))?)?$"),f=function(){function t(){}return t._format=function(e,n,r,i,o){if(void 0===i&&(i=null),void 0===o&&(o=!1),s.isBlank(e))return null;if(!s.isNumber(e))throw new p.InvalidPipeArgumentException(t,e);var c=1,f=0,d=3;if(s.isPresent(r)){var v=s.RegExpWrapper.firstMatch(h,r);if(s.isBlank(v))throw new a.BaseException(r+" is not a valid digit info for number pipes");s.isPresent(v[1])&&(c=s.NumberWrapper.parseIntAutoRadix(v[1])),s.isPresent(v[3])&&(f=s.NumberWrapper.parseIntAutoRadix(v[3])),s.isPresent(v[5])&&(d=s.NumberWrapper.parseIntAutoRadix(v[5]))}return u.NumberFormatter.format(e,l,n,{minimumIntegerDigits:c,minimumFractionDigits:f,maximumFractionDigits:d,currency:i,currencyAsSymbol:o})},t=i([s.CONST(),c.Injectable(),o("design:paramtypes",[])],t)}();e.NumberPipe=f;var d=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.transform=function(t,e){return void 0===e&&(e=null),f._format(t,u.NumberFormatStyle.Decimal,e)},e=i([s.CONST(),c.Pipe({name:"number"}),c.Injectable(),o("design:paramtypes",[])],e)}(f);e.DecimalPipe=d;var v=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.transform=function(t,e){return void 0===e&&(e=null),f._format(t,u.NumberFormatStyle.Percent,e)},e=i([s.CONST(),c.Pipe({name:"percent"}),c.Injectable(),o("design:paramtypes",[])],e)}(f);e.PercentPipe=v;var y=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.transform=function(t,e,n,r){return void 0===e&&(e="USD"),void 0===n&&(n=!1),void 0===r&&(r=null),f._format(t,u.NumberFormatStyle.Currency,r,e,n)},e=i([s.CONST(),c.Pipe({name:"currency"}),c.Injectable(),o("design:paramtypes",[])],e)}(f);e.CurrencyPipe=y},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(2),a=n(90),u=function(){function t(){}return t.prototype.transform=function(e){if(o.isBlank(e))return e;if(!o.isString(e))throw new a.InvalidPipeArgumentException(t,e);return e.toUpperCase()},t=r([o.CONST(),s.Pipe({name:"uppercase"}),s.Injectable(),i("design:paramtypes",[])],t)}();e.UpperCasePipe=u},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(2),a=n(90),u=function(){function t(){}return t.prototype.transform=function(e,n,r){if(o.isBlank(e))return e;if(!this._supportedInput(e))throw new a.InvalidPipeArgumentException(t,e);var i=e.toString();if(!this._supportedPattern(n))throw new a.InvalidPipeArgumentException(t,n);if(!this._supportedReplacement(r))throw new a.InvalidPipeArgumentException(t,r);if(o.isFunction(r)){var s=o.isString(n)?o.RegExpWrapper.create(n):n;return o.StringWrapper.replaceAllMapped(i,s,r)}return n instanceof RegExp?o.StringWrapper.replaceAll(i,n,r):o.StringWrapper.replace(i,n,r)},t.prototype._supportedInput=function(t){return o.isString(t)||o.isNumber(t)},t.prototype._supportedPattern=function(t){return o.isString(t)||t instanceof RegExp},t.prototype._supportedReplacement=function(t){return o.isString(t)||o.isFunction(t)},t=r([s.Pipe({name:"replace"}),s.Injectable(),i("design:paramtypes",[])],t)}();e.ReplacePipe=u},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(2),a=n(90),u=o.RegExpWrapper.create("#"),c=function(){function t(){}return t.prototype.transform=function(e,n){var r,i;if(!o.isStringMap(n))throw new a.InvalidPipeArgumentException(t,n);return r=0===e||1===e?"="+e:"other",i=o.isPresent(e)?e.toString():"",o.StringWrapper.replaceAll(n[r],u,i)},t=r([o.CONST(),s.Pipe({name:"i18nPlural",pure:!0}),s.Injectable(),i("design:paramtypes",[])],t)}();e.I18nPluralPipe=c},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(15),a=n(2),u=n(90),c=function(){function t(){}return t.prototype.transform=function(e,n){if(!o.isStringMap(n))throw new u.InvalidPipeArgumentException(t,n);return s.StringMapWrapper.contains(n,e)?n[e]:n.other},t=r([o.CONST(),a.Pipe({name:"i18nSelect",pure:!0}),a.Injectable(),i("design:paramtypes",[])],t)}();e.I18nSelectPipe=c},function(t,e,n){"use strict";var r=n(89),i=n(97),o=n(95),s=n(93),a=n(94),u=n(91),c=n(96),p=n(98),l=n(99),h=n(100),f=n(5);e.COMMON_PIPES=f.CONST_EXPR([r.AsyncPipe,i.UpperCasePipe,o.LowerCasePipe,s.JsonPipe,a.SlicePipe,c.DecimalPipe,c.PercentPipe,c.CurrencyPipe,u.DatePipe,p.ReplacePipe,l.I18nPluralPipe,h.I18nSelectPipe])},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}var i=n(103);e.NgClass=i.NgClass;var o=n(104);e.NgFor=o.NgFor;var s=n(105);e.NgIf=s.NgIf;var a=n(106);e.NgTemplateOutlet=a.NgTemplateOutlet;var u=n(107);e.NgStyle=u.NgStyle;var c=n(108);e.NgSwitch=c.NgSwitch,e.NgSwitchWhen=c.NgSwitchWhen,e.NgSwitchDefault=c.NgSwitchDefault;var p=n(109);e.NgPlural=p.NgPlural,e.NgPluralCase=p.NgPluralCase,e.NgLocalization=p.NgLocalization,r(n(110));var l=n(111);e.CORE_DIRECTIVES=l.CORE_DIRECTIVES},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(2),a=n(15),u=function(){function t(t,e,n,r){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=r,this._initialClasses=[]}return Object.defineProperty(t.prototype,"initialClasses",{set:function(t){this._applyInitialClasses(!0),this._initialClasses=o.isPresent(t)&&o.isString(t)?t.split(" "):[],this._applyInitialClasses(!1),this._applyClasses(this._rawClass,!1)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawClass",{set:function(t){this._cleanupClasses(this._rawClass),o.isString(t)&&(t=t.split(" ")),this._rawClass=t,this._iterableDiffer=null,this._keyValueDiffer=null,o.isPresent(t)&&(a.isListLikeIterable(t)?this._iterableDiffer=this._iterableDiffers.find(t).create(null):this._keyValueDiffer=this._keyValueDiffers.find(t).create(null))},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(o.isPresent(this._iterableDiffer)){var t=this._iterableDiffer.diff(this._rawClass);o.isPresent(t)&&this._applyIterableChanges(t)}if(o.isPresent(this._keyValueDiffer)){var t=this._keyValueDiffer.diff(this._rawClass);o.isPresent(t)&&this._applyKeyValueChanges(t)}},t.prototype.ngOnDestroy=function(){this._cleanupClasses(this._rawClass)},t.prototype._cleanupClasses=function(t){this._applyClasses(t,!0),this._applyInitialClasses(!1)},t.prototype._applyKeyValueChanges=function(t){var e=this;t.forEachAddedItem(function(t){e._toggleClass(t.key,t.currentValue)}),t.forEachChangedItem(function(t){e._toggleClass(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){t.previousValue&&e._toggleClass(t.key,!1)})},t.prototype._applyIterableChanges=function(t){var e=this;t.forEachAddedItem(function(t){e._toggleClass(t.item,!0)}),t.forEachRemovedItem(function(t){e._toggleClass(t.item,!1)})},t.prototype._applyInitialClasses=function(t){var e=this;this._initialClasses.forEach(function(n){return e._toggleClass(n,!t)})},t.prototype._applyClasses=function(t,e){var n=this;o.isPresent(t)&&(o.isArray(t)?t.forEach(function(t){return n._toggleClass(t,!e)}):t instanceof Set?t.forEach(function(t){return n._toggleClass(t,!e)}):a.StringMapWrapper.forEach(t,function(t,r){o.isPresent(t)&&n._toggleClass(r,!e)}))},t.prototype._toggleClass=function(t,e){if(t=t.trim(),t.length>0)if(t.indexOf(" ")>-1)for(var n=t.split(/\s+/g),r=0,i=n.length;i>r;r++)this._renderer.setElementClass(this._ngEl.nativeElement,n[r],e);else this._renderer.setElementClass(this._ngEl.nativeElement,t,e)},t=r([s.Directive({selector:"[ngClass]",inputs:["rawClass: ngClass","initialClasses: class"]}),i("design:paramtypes",[s.IterableDiffers,s.KeyValueDiffers,s.ElementRef,s.Renderer])],t)}();e.NgClass=u},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(5),a=n(12),u=function(){function t(t,e,n,r){this._viewContainer=t,this._templateRef=e,this._iterableDiffers=n,this._cdr=r}return Object.defineProperty(t.prototype,"ngForOf",{ +set:function(t){if(this._ngForOf=t,s.isBlank(this._differ)&&s.isPresent(t))try{this._differ=this._iterableDiffers.find(t).create(this._cdr,this._ngForTrackBy)}catch(e){throw new a.BaseException("Cannot find a differ supporting object '"+t+"' of type '"+s.getTypeNameForDebugging(t)+"'. NgFor only supports binding to Iterables such as Arrays.")}},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTemplate",{set:function(t){s.isPresent(t)&&(this._templateRef=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngForTrackBy",{set:function(t){this._ngForTrackBy=t},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(s.isPresent(this._differ)){var t=this._differ.diff(this._ngForOf);s.isPresent(t)&&this._applyChanges(t)}},t.prototype._applyChanges=function(t){var e=this,n=[];t.forEachRemovedItem(function(t){return n.push(new c(t,null))}),t.forEachMovedItem(function(t){return n.push(new c(t,null))});var r=this._bulkRemove(n);t.forEachAddedItem(function(t){return r.push(new c(t,null))}),this._bulkInsert(r);for(var i=0;ii;i++){var s=this._viewContainer.get(i);s.setLocal("first",0===i),s.setLocal("last",i===o-1)}t.forEachIdentityChange(function(t){var n=e._viewContainer.get(t.currentIndex);n.setLocal("$implicit",t.item)})},t.prototype._perViewChange=function(t,e){t.setLocal("$implicit",e.item),t.setLocal("index",e.currentIndex),t.setLocal("even",e.currentIndex%2==0),t.setLocal("odd",e.currentIndex%2==1)},t.prototype._bulkRemove=function(t){t.sort(function(t,e){return t.record.previousIndex-e.record.previousIndex});for(var e=[],n=t.length-1;n>=0;n--){var r=t[n];s.isPresent(r.record.currentIndex)?(r.view=this._viewContainer.detach(r.record.previousIndex),e.push(r)):this._viewContainer.remove(r.record.previousIndex)}return e},t.prototype._bulkInsert=function(t){t.sort(function(t,e){return t.record.currentIndex-e.record.currentIndex});for(var e=0;eo?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(5),a=function(){function t(t,e){this._viewContainer=t,this._templateRef=e,this._prevCondition=null}return Object.defineProperty(t.prototype,"ngIf",{set:function(t){!t||!s.isBlank(this._prevCondition)&&this._prevCondition?t||!s.isBlank(this._prevCondition)&&!this._prevCondition||(this._prevCondition=!1,this._viewContainer.clear()):(this._prevCondition=!0,this._viewContainer.createEmbeddedView(this._templateRef))},enumerable:!0,configurable:!0}),t=r([o.Directive({selector:"[ngIf]",inputs:["ngIf"]}),i("design:paramtypes",[o.ViewContainerRef,o.TemplateRef])],t)}();e.NgIf=a},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(5),a=function(){function t(t){this._viewContainerRef=t}return Object.defineProperty(t.prototype,"ngTemplateOutlet",{set:function(t){s.isPresent(this._insertedViewRef)&&this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._insertedViewRef)),s.isPresent(t)&&(this._insertedViewRef=this._viewContainerRef.createEmbeddedView(t))},enumerable:!0,configurable:!0}),r([o.Input(),i("design:type",o.TemplateRef),i("design:paramtypes",[o.TemplateRef])],t.prototype,"ngTemplateOutlet",null),t=r([o.Directive({selector:"[ngTemplateOutlet]"}),i("design:paramtypes",[o.ViewContainerRef])],t)}();e.NgTemplateOutlet=a},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(5),a=function(){function t(t,e,n){this._differs=t,this._ngEl=e,this._renderer=n}return Object.defineProperty(t.prototype,"rawStyle",{set:function(t){this._rawStyle=t,s.isBlank(this._differ)&&s.isPresent(t)&&(this._differ=this._differs.find(this._rawStyle).create(null))},enumerable:!0,configurable:!0}),t.prototype.ngDoCheck=function(){if(s.isPresent(this._differ)){var t=this._differ.diff(this._rawStyle);s.isPresent(t)&&this._applyChanges(t)}},t.prototype._applyChanges=function(t){var e=this;t.forEachAddedItem(function(t){e._setStyle(t.key,t.currentValue)}),t.forEachChangedItem(function(t){e._setStyle(t.key,t.currentValue)}),t.forEachRemovedItem(function(t){e._setStyle(t.key,null)})},t.prototype._setStyle=function(t,e){this._renderer.setElementStyle(this._ngEl.nativeElement,t,e)},t=r([o.Directive({selector:"[ngStyle]",inputs:["rawStyle: ngStyle"]}),i("design:paramtypes",[o.KeyValueDiffers,o.ElementRef,o.Renderer])],t)}();e.NgStyle=a},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},s=n(2),a=n(5),u=n(15),c=a.CONST_EXPR(new Object),p=function(){function t(t,e){this._viewContainerRef=t,this._templateRef=e}return t.prototype.create=function(){this._viewContainerRef.createEmbeddedView(this._templateRef)},t.prototype.destroy=function(){this._viewContainerRef.clear()},t}();e.SwitchView=p;var l=function(){function t(){this._useDefault=!1,this._valueViews=new u.Map,this._activeViews=[]}return Object.defineProperty(t.prototype,"ngSwitch",{set:function(t){this._emptyAllActiveViews(),this._useDefault=!1;var e=this._valueViews.get(t);a.isBlank(e)&&(this._useDefault=!0,e=a.normalizeBlank(this._valueViews.get(c))),this._activateViews(e),this._switchValue=t},enumerable:!0,configurable:!0}),t.prototype._onWhenValueChanged=function(t,e,n){this._deregisterView(t,n),this._registerView(e,n),t===this._switchValue?(n.destroy(),u.ListWrapper.remove(this._activeViews,n)):e===this._switchValue&&(this._useDefault&&(this._useDefault=!1,this._emptyAllActiveViews()),n.create(),this._activeViews.push(n)),0!==this._activeViews.length||this._useDefault||(this._useDefault=!0,this._activateViews(this._valueViews.get(c)))},t.prototype._emptyAllActiveViews=function(){for(var t=this._activeViews,e=0;eo?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},s=n(2),a=n(5),u=n(15),c=n(108),p="other",l=function(){function t(){}return t}();e.NgLocalization=l;var h=function(){function t(t,e,n){this.value=t,this._view=new c.SwitchView(n,e)}return t=r([s.Directive({selector:"[ngPluralCase]"}),o(0,s.Attribute("ngPluralCase")),i("design:paramtypes",[String,s.TemplateRef,s.ViewContainerRef])],t)}();e.NgPluralCase=h;var f=function(){function t(t){this._localization=t,this._caseViews=new u.Map,this.cases=null}return Object.defineProperty(t.prototype,"ngPlural",{set:function(t){this._switchValue=t,this._updateView()},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this.cases.forEach(function(e){t._caseViews.set(t._formatValue(e),e._view)}),this._updateView()},t.prototype._updateView=function(){this._clearViews();var t=this._caseViews.get(this._switchValue);a.isPresent(t)||(t=this._getCategoryView(this._switchValue)),this._activateView(t)},t.prototype._clearViews=function(){a.isPresent(this._activeView)&&this._activeView.destroy()},t.prototype._activateView=function(t){a.isPresent(t)&&(this._activeView=t,this._activeView.create())},t.prototype._getCategoryView=function(t){var e=this._localization.getPluralCategory(t),n=this._caseViews.get(e);return a.isPresent(n)?n:this._caseViews.get(p)},t.prototype._isValueView=function(t){return"="===t.value[0]},t.prototype._formatValue=function(t){return this._isValueView(t)?this._stripValue(t.value):t.value},t.prototype._stripValue=function(t){return a.NumberWrapper.parseInt(t.substring(1),10)},r([s.ContentChildren(h),i("design:type",s.QueryList)],t.prototype,"cases",void 0),r([s.Input(),i("design:type",Number),i("design:paramtypes",[Number])],t.prototype,"ngPlural",null),t=r([s.Directive({selector:"[ngPlural]"}),i("design:paramtypes",[l])],t)}();e.NgPlural=f},function(t,e){"use strict"},function(t,e,n){"use strict";var r=n(5),i=n(103),o=n(104),s=n(105),a=n(106),u=n(107),c=n(108),p=n(109);e.CORE_DIRECTIVES=r.CONST_EXPR([i.NgClass,o.NgFor,s.NgIf,a.NgTemplateOutlet,u.NgStyle,c.NgSwitch,c.NgSwitchWhen,c.NgSwitchDefault,p.NgPlural,p.NgPluralCase])},function(t,e,n){"use strict";var r=n(113);e.AbstractControl=r.AbstractControl,e.Control=r.Control,e.ControlGroup=r.ControlGroup,e.ControlArray=r.ControlArray;var i=n(114);e.AbstractControlDirective=i.AbstractControlDirective;var o=n(115);e.ControlContainer=o.ControlContainer;var s=n(116);e.NgControlName=s.NgControlName;var a=n(127);e.NgFormControl=a.NgFormControl;var u=n(128);e.NgModel=u.NgModel;var c=n(117);e.NgControl=c.NgControl;var p=n(129);e.NgControlGroup=p.NgControlGroup;var l=n(130);e.NgFormModel=l.NgFormModel;var h=n(131);e.NgForm=h.NgForm;var f=n(118);e.NG_VALUE_ACCESSOR=f.NG_VALUE_ACCESSOR;var d=n(121);e.DefaultValueAccessor=d.DefaultValueAccessor;var v=n(132);e.NgControlStatus=v.NgControlStatus;var y=n(123);e.CheckboxControlValueAccessor=y.CheckboxControlValueAccessor;var m=n(124);e.NgSelectOption=m.NgSelectOption,e.SelectControlValueAccessor=m.SelectControlValueAccessor;var g=n(133);e.FORM_DIRECTIVES=g.FORM_DIRECTIVES,e.RadioButtonState=g.RadioButtonState;var _=n(120);e.NG_VALIDATORS=_.NG_VALIDATORS,e.NG_ASYNC_VALIDATORS=_.NG_ASYNC_VALIDATORS,e.Validators=_.Validators;var b=n(134);e.RequiredValidator=b.RequiredValidator,e.MinLengthValidator=b.MinLengthValidator,e.MaxLengthValidator=b.MaxLengthValidator,e.PatternValidator=b.PatternValidator;var P=n(135);e.FormBuilder=P.FormBuilder;var E=n(135),w=n(125),C=n(5);e.FORM_PROVIDERS=C.CONST_EXPR([E.FormBuilder,w.RadioControlRegistry]),e.FORM_BINDINGS=e.FORM_PROVIDERS},function(t,e,n){"use strict";function r(t){return t instanceof l}function i(t,e){return a.isBlank(e)?null:(e instanceof Array||(e=e.split("/")),e instanceof Array&&p.ListWrapper.isEmpty(e)?null:e.reduce(function(t,e){if(t instanceof f)return a.isPresent(t.controls[e])?t.controls[e]:null;if(t instanceof d){var n=e;return a.isPresent(t.at(n))?t.at(n):null}return null},t))}function o(t){return c.PromiseWrapper.isPromise(t)?u.ObservableWrapper.fromPromise(t):t}var s=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},a=n(5),u=n(40),c=n(41),p=n(15);e.VALID="VALID",e.INVALID="INVALID",e.PENDING="PENDING",e.isControl=r;var l=function(){function t(t,e){this.validator=t,this.asyncValidator=e,this._pristine=!0,this._touched=!1}return Object.defineProperty(t.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this._status===e.VALID},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return this._errors},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pristine",{get:function(){return this._pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touched",{get:function(){return this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return!this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valueChanges",{get:function(){return this._valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"statusChanges",{get:function(){return this._statusChanges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pending",{get:function(){return this._status==e.PENDING},enumerable:!0,configurable:!0}),t.prototype.markAsTouched=function(){this._touched=!0},t.prototype.markAsDirty=function(t){var e=(void 0===t?{}:t).onlySelf;e=a.normalizeBool(e),this._pristine=!1,a.isPresent(this._parent)&&!e&&this._parent.markAsDirty({onlySelf:e})},t.prototype.markAsPending=function(t){var n=(void 0===t?{}:t).onlySelf;n=a.normalizeBool(n),this._status=e.PENDING,a.isPresent(this._parent)&&!n&&this._parent.markAsPending({onlySelf:n})},t.prototype.setParent=function(t){this._parent=t},t.prototype.updateValueAndValidity=function(t){var n=void 0===t?{}:t,r=n.onlySelf,i=n.emitEvent;r=a.normalizeBool(r),i=a.isPresent(i)?i:!0,this._updateValue(),this._errors=this._runValidator(),this._status=this._calculateStatus(),(this._status==e.VALID||this._status==e.PENDING)&&this._runAsyncValidator(i),i&&(u.ObservableWrapper.callEmit(this._valueChanges,this._value),u.ObservableWrapper.callEmit(this._statusChanges,this._status)),a.isPresent(this._parent)&&!r&&this._parent.updateValueAndValidity({onlySelf:r,emitEvent:i})},t.prototype._runValidator=function(){return a.isPresent(this.validator)?this.validator(this):null},t.prototype._runAsyncValidator=function(t){var n=this;if(a.isPresent(this.asyncValidator)){this._status=e.PENDING,this._cancelExistingSubscription();var r=o(this.asyncValidator(this));this._asyncValidationSubscription=u.ObservableWrapper.subscribe(r,function(e){return n.setErrors(e,{emitEvent:t})})}},t.prototype._cancelExistingSubscription=function(){a.isPresent(this._asyncValidationSubscription)&&u.ObservableWrapper.dispose(this._asyncValidationSubscription)},t.prototype.setErrors=function(t,e){var n=(void 0===e?{}:e).emitEvent;n=a.isPresent(n)?n:!0,this._errors=t,this._status=this._calculateStatus(),n&&u.ObservableWrapper.callEmit(this._statusChanges,this._status),a.isPresent(this._parent)&&this._parent._updateControlsErrors()},t.prototype.find=function(t){return i(this,t)},t.prototype.getError=function(t,e){void 0===e&&(e=null);var n=a.isPresent(e)&&!p.ListWrapper.isEmpty(e)?this.find(e):this;return a.isPresent(n)&&a.isPresent(n._errors)?p.StringMapWrapper.get(n._errors,t):null},t.prototype.hasError=function(t,e){return void 0===e&&(e=null),a.isPresent(this.getError(t,e))},Object.defineProperty(t.prototype,"root",{get:function(){for(var t=this;a.isPresent(t._parent);)t=t._parent;return t},enumerable:!0,configurable:!0}),t.prototype._updateControlsErrors=function(){this._status=this._calculateStatus(),a.isPresent(this._parent)&&this._parent._updateControlsErrors()},t.prototype._initObservables=function(){this._valueChanges=new u.EventEmitter,this._statusChanges=new u.EventEmitter},t.prototype._calculateStatus=function(){return a.isPresent(this._errors)?e.INVALID:this._anyControlsHaveStatus(e.PENDING)?e.PENDING:this._anyControlsHaveStatus(e.INVALID)?e.INVALID:e.VALID},t}();e.AbstractControl=l;var h=function(t){function e(e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),t.call(this,n,r),this._value=e,this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}return s(e,t),e.prototype.updateValue=function(t,e){var n=void 0===e?{}:e,r=n.onlySelf,i=n.emitEvent,o=n.emitModelToViewChange;o=a.isPresent(o)?o:!0,this._value=t,a.isPresent(this._onChange)&&o&&this._onChange(this._value),this.updateValueAndValidity({onlySelf:r,emitEvent:i})},e.prototype._updateValue=function(){},e.prototype._anyControlsHaveStatus=function(t){return!1},e.prototype.registerOnChange=function(t){this._onChange=t},e}(l);e.Control=h;var f=function(t){function e(e,n,r,i){void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),t.call(this,r,i),this.controls=e,this._optionals=a.isPresent(n)?n:{},this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return s(e,t),e.prototype.addControl=function(t,e){this.controls[t]=e,e.setParent(this)},e.prototype.removeControl=function(t){p.StringMapWrapper["delete"](this.controls,t)},e.prototype.include=function(t){p.StringMapWrapper.set(this._optionals,t,!0),this.updateValueAndValidity()},e.prototype.exclude=function(t){p.StringMapWrapper.set(this._optionals,t,!1),this.updateValueAndValidity()},e.prototype.contains=function(t){var e=p.StringMapWrapper.contains(this.controls,t);return e&&this._included(t)},e.prototype._setParentForControls=function(){var t=this;p.StringMapWrapper.forEach(this.controls,function(e,n){e.setParent(t)})},e.prototype._updateValue=function(){this._value=this._reduceValue()},e.prototype._anyControlsHaveStatus=function(t){var e=this,n=!1;return p.StringMapWrapper.forEach(this.controls,function(r,i){n=n||e.contains(i)&&r.status==t}),n},e.prototype._reduceValue=function(){return this._reduceChildren({},function(t,e,n){return t[n]=e.value,t})},e.prototype._reduceChildren=function(t,e){var n=this,r=t;return p.StringMapWrapper.forEach(this.controls,function(t,i){n._included(i)&&(r=e(r,t,i))}),r},e.prototype._included=function(t){var e=p.StringMapWrapper.contains(this._optionals,t);return!e||p.StringMapWrapper.get(this._optionals,t)},e}(l);e.ControlGroup=f;var d=function(t){function e(e,n,r){void 0===n&&(n=null),void 0===r&&(r=null),t.call(this,n,r),this.controls=e,this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return s(e,t),e.prototype.at=function(t){return this.controls[t]},e.prototype.push=function(t){this.controls.push(t),t.setParent(this),this.updateValueAndValidity()},e.prototype.insert=function(t,e){p.ListWrapper.insert(this.controls,t,e),e.setParent(this),this.updateValueAndValidity()},e.prototype.removeAt=function(t){p.ListWrapper.removeAt(this.controls,t),this.updateValueAndValidity()},Object.defineProperty(e.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),e.prototype._updateValue=function(){this._value=this.controls.map(function(t){return t.value})},e.prototype._anyControlsHaveStatus=function(t){return this.controls.some(function(e){return e.status==t})},e.prototype._setParentForControls=function(){var t=this;this.controls.forEach(function(e){e.setParent(t)})},e}(l);e.ControlArray=d},function(t,e,n){"use strict";var r=n(5),i=n(12),o=function(){function t(){}return Object.defineProperty(t.prototype,"control",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return r.isPresent(this.control)?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return r.isPresent(this.control)?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors",{get:function(){return r.isPresent(this.control)?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"pristine",{get:function(){return r.isPresent(this.control)?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dirty",{get:function(){return r.isPresent(this.control)?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"touched",{get:function(){return r.isPresent(this.control)?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"untouched",{get:function(){return r.isPresent(this.control)?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t}();e.AbstractControlDirective=o},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(114),o=function(t){function e(){t.apply(this,arguments)}return r(e,t),Object.defineProperty(e.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e}(i.AbstractControlDirective);e.ControlContainer=o},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(5),u=n(40),c=n(2),p=n(115),l=n(117),h=n(118),f=n(119),d=n(120),v=a.CONST_EXPR(new c.Provider(l.NgControl,{useExisting:c.forwardRef(function(){return y})})),y=function(t){function e(e,n,r,i){t.call(this),this._parent=e,this._validators=n,this._asyncValidators=r,this.update=new u.EventEmitter,this._added=!1,this.valueAccessor=f.selectValueAccessor(this,i)}return r(e,t),e.prototype.ngOnChanges=function(t){this._added||(this.formDirective.addControl(this),this._added=!0),f.isPropertyUpdated(t,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))},e.prototype.ngOnDestroy=function(){this.formDirective.removeControl(this)},e.prototype.viewToModelUpdate=function(t){this.viewModel=t,u.ObservableWrapper.callEmit(this.update,t)},Object.defineProperty(e.prototype,"path",{get:function(){return f.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return f.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return f.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getControl(this)},enumerable:!0,configurable:!0}),e=i([c.Directive({selector:"[ngControl]",bindings:[v],inputs:["name: ngControl","model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),s(0,c.Host()),s(0,c.SkipSelf()),s(1,c.Optional()),s(1,c.Self()),s(1,c.Inject(d.NG_VALIDATORS)),s(2,c.Optional()),s(2,c.Self()),s(2,c.Inject(d.NG_ASYNC_VALIDATORS)),s(3,c.Optional()),s(3,c.Self()),s(3,c.Inject(h.NG_VALUE_ACCESSOR)),o("design:paramtypes",[p.ControlContainer,Array,Array,Array])],e)}(l.NgControl);e.NgControlName=y},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(114),o=n(12),s=function(t){function e(){t.apply(this,arguments),this.name=null,this.valueAccessor=null}return r(e,t),Object.defineProperty(e.prototype,"validator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),e}(i.AbstractControlDirective);e.NgControl=s},function(t,e,n){"use strict";var r=n(2),i=n(5);e.NG_VALUE_ACCESSOR=i.CONST_EXPR(new r.OpaqueToken("NgValueAccessor"))},function(t,e,n){"use strict";function r(t,e){var n=l.ListWrapper.clone(e.path);return n.push(t),n}function i(t,e){h.isBlank(t)&&s(e,"Cannot find control"),h.isBlank(e.valueAccessor)&&s(e,"No value accessor for"),t.validator=d.Validators.compose([t.validator,e.validator]),t.asyncValidator=d.Validators.composeAsync([t.asyncValidator,e.asyncValidator]),e.valueAccessor.writeValue(t.value),e.valueAccessor.registerOnChange(function(n){e.viewToModelUpdate(n),t.updateValue(n,{emitModelToViewChange:!1}),t.markAsDirty()}),t.registerOnChange(function(t){return e.valueAccessor.writeValue(t)}),e.valueAccessor.registerOnTouched(function(){return t.markAsTouched()})}function o(t,e){h.isBlank(t)&&s(e,"Cannot find control"),t.validator=d.Validators.compose([t.validator,e.validator]),t.asyncValidator=d.Validators.composeAsync([t.asyncValidator,e.asyncValidator])}function s(t,e){var n=t.path.join(" -> ");throw new f.BaseException(e+" '"+n+"'")}function a(t){return h.isPresent(t)?d.Validators.compose(t.map(b.normalizeValidator)):null}function u(t){return h.isPresent(t)?d.Validators.composeAsync(t.map(b.normalizeAsyncValidator)):null}function c(t,e){if(!l.StringMapWrapper.contains(t,"model"))return!1;var n=t.model;return n.isFirstChange()?!0:!h.looseIdentical(e,n.currentValue)}function p(t,e){if(h.isBlank(e))return null;var n,r,i;return e.forEach(function(e){h.hasConstructor(e,v.DefaultValueAccessor)?n=e:h.hasConstructor(e,m.CheckboxControlValueAccessor)||h.hasConstructor(e,y.NumberValueAccessor)||h.hasConstructor(e,g.SelectControlValueAccessor)||h.hasConstructor(e,_.RadioControlValueAccessor)?(h.isPresent(r)&&s(t,"More than one built-in value accessor matches"),r=e):(h.isPresent(i)&&s(t,"More than one custom value accessor matches"),i=e)}),h.isPresent(i)?i:h.isPresent(r)?r:h.isPresent(n)?n:(s(t,"No valid value accessor for"),null)}var l=n(15),h=n(5),f=n(12),d=n(120),v=n(121),y=n(122),m=n(123),g=n(124),_=n(125),b=n(126);e.controlPath=r,e.setUpControl=i,e.setUpControlGroup=o,e.composeValidators=a,e.composeAsyncValidators=u,e.isPropertyUpdated=c,e.selectValueAccessor=p},function(t,e,n){"use strict";function r(t){return u.PromiseWrapper.isPromise(t)?t:c.ObservableWrapper.toPromise(t)}function i(t,e){return e.map(function(e){return e(t)})}function o(t,e){return e.map(function(e){return e(t)})}function s(t){var e=t.reduce(function(t,e){return a.isPresent(e)?p.StringMapWrapper.merge(t,e):t},{});return p.StringMapWrapper.isEmpty(e)?null:e}var a=n(5),u=n(41),c=n(40),p=n(15),l=n(2);e.NG_VALIDATORS=a.CONST_EXPR(new l.OpaqueToken("NgValidators")),e.NG_ASYNC_VALIDATORS=a.CONST_EXPR(new l.OpaqueToken("NgAsyncValidators"));var h=function(){function t(){}return t.required=function(t){return a.isBlank(t.value)||a.isString(t.value)&&""==t.value?{required:!0}:null},t.minLength=function(e){return function(n){if(a.isPresent(t.required(n)))return null;var r=n.value;return r.lengthe?{maxlength:{requiredLength:e,actualLength:r.length}}:null}},t.pattern=function(e){return function(n){if(a.isPresent(t.required(n)))return null;var r=new RegExp("^"+e+"$"),i=n.value;return r.test(i)?null:{pattern:{requiredPattern:"^"+e+"$",actualValue:i}}}},t.nullValidator=function(t){return null},t.compose=function(t){if(a.isBlank(t))return null;var e=t.filter(a.isPresent);return 0==e.length?null:function(t){return s(i(t,e))}},t.composeAsync=function(t){if(a.isBlank(t))return null;var e=t.filter(a.isPresent);return 0==e.length?null:function(t){var n=o(t,e).map(r);return u.PromiseWrapper.all(n).then(s)}},t}();e.Validators=h},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(118),a=n(5),u=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return c}),multi:!0})),c=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){var e=a.isBlank(t)?"":t;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",e)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t=r([o.Directive({selector:"input:not([type=checkbox])[ngControl],textarea[ngControl],input:not([type=checkbox])[ngFormControl],textarea[ngFormControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]", +host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[u]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],t)}();e.DefaultValueAccessor=c},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(118),a=n(5),u=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return c}),multi:!0})),c=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},t.prototype.registerOnChange=function(t){this.onChange=function(e){t(""==e?null:a.NumberWrapper.parseFloat(e))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t=r([o.Directive({selector:"input[type=number][ngControl],input[type=number][ngFormControl],input[type=number][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},bindings:[u]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],t)}();e.NumberValueAccessor=c},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(118),a=n(5),u=a.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return c}),multi:!0})),c=function(){function t(t,e){this._renderer=t,this._elementRef=e,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",t)},t.prototype.registerOnChange=function(t){this.onChange=t},t.prototype.registerOnTouched=function(t){this.onTouched=t},t=r([o.Directive({selector:"input[type=checkbox][ngControl],input[type=checkbox][ngFormControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[u]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],t)}();e.CheckboxControlValueAccessor=c},function(t,e,n){"use strict";function r(t,e){return p.isBlank(t)?""+e:(p.isPrimitive(e)||(e="Object"),p.StringWrapper.slice(t+": "+e,0,50))}function i(t){return t.split(":")[0]}var o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},s=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},a=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},u=n(2),c=n(118),p=n(5),l=n(15),h=p.CONST_EXPR(new u.Provider(c.NG_VALUE_ACCESSOR,{useExisting:u.forwardRef(function(){return f}),multi:!0})),f=function(){function t(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=function(t){},this.onTouched=function(){}}return t.prototype.writeValue=function(t){this.value=t;var e=r(this._getOptionId(t),t);this._renderer.setElementProperty(this._elementRef.nativeElement,"value",e)},t.prototype.registerOnChange=function(t){var e=this;this.onChange=function(n){t(e._getOptionValue(n))}},t.prototype.registerOnTouched=function(t){this.onTouched=t},t.prototype._registerOption=function(){return(this._idCounter++).toString()},t.prototype._getOptionId=function(t){for(var e=0,n=l.MapWrapper.keys(this._optionMap);eo?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(118),a=n(117),u=n(5),c=n(15),p=u.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return f}),multi:!0})),l=function(){function t(){this._accessors=[]}return t.prototype.add=function(t,e){this._accessors.push([t,e])},t.prototype.remove=function(t){for(var e=-1,n=0;no?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(5),u=n(15),c=n(40),p=n(2),l=n(117),h=n(120),f=n(118),d=n(119),v=a.CONST_EXPR(new p.Provider(l.NgControl,{useExisting:p.forwardRef(function(){return y})})),y=function(t){function e(e,n,r){t.call(this),this._validators=e,this._asyncValidators=n,this.update=new c.EventEmitter,this.valueAccessor=d.selectValueAccessor(this,r)}return r(e,t),e.prototype.ngOnChanges=function(t){this._isControlChanged(t)&&(d.setUpControl(this.form,this),this.form.updateValueAndValidity({emitEvent:!1})),d.isPropertyUpdated(t,this.viewModel)&&(this.form.updateValue(this.model),this.viewModel=this.model)},Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return d.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return d.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,c.ObservableWrapper.callEmit(this.update,t)},e.prototype._isControlChanged=function(t){return u.StringMapWrapper.contains(t,"form")},e=i([p.Directive({selector:"[ngFormControl]",bindings:[v],inputs:["form: ngFormControl","model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),s(0,p.Optional()),s(0,p.Self()),s(0,p.Inject(h.NG_VALIDATORS)),s(1,p.Optional()),s(1,p.Self()),s(1,p.Inject(h.NG_ASYNC_VALIDATORS)),s(2,p.Optional()),s(2,p.Self()),s(2,p.Inject(f.NG_VALUE_ACCESSOR)),o("design:paramtypes",[Array,Array,Array])],e)}(l.NgControl);e.NgFormControl=y},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(5),u=n(40),c=n(2),p=n(118),l=n(117),h=n(113),f=n(120),d=n(119),v=a.CONST_EXPR(new c.Provider(l.NgControl,{useExisting:c.forwardRef(function(){return y})})),y=function(t){function e(e,n,r){t.call(this),this._validators=e,this._asyncValidators=n,this._control=new h.Control,this._added=!1,this.update=new u.EventEmitter,this.valueAccessor=d.selectValueAccessor(this,r)}return r(e,t),e.prototype.ngOnChanges=function(t){this._added||(d.setUpControl(this._control,this),this._control.updateValueAndValidity({emitEvent:!1}),this._added=!0),d.isPropertyUpdated(t,this.viewModel)&&(this._control.updateValue(this.model),this.viewModel=this.model)},Object.defineProperty(e.prototype,"control",{get:function(){return this._control},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return d.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return d.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),e.prototype.viewToModelUpdate=function(t){this.viewModel=t,u.ObservableWrapper.callEmit(this.update,t)},e=i([c.Directive({selector:"[ngModel]:not([ngControl]):not([ngFormControl])",bindings:[v],inputs:["model: ngModel"],outputs:["update: ngModelChange"],exportAs:"ngForm"}),s(0,c.Optional()),s(0,c.Self()),s(0,c.Inject(f.NG_VALIDATORS)),s(1,c.Optional()),s(1,c.Self()),s(1,c.Inject(f.NG_ASYNC_VALIDATORS)),s(2,c.Optional()),s(2,c.Self()),s(2,c.Inject(p.NG_VALUE_ACCESSOR)),o("design:paramtypes",[Array,Array,Array])],e)}(l.NgControl);e.NgModel=y},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(2),u=n(5),c=n(115),p=n(119),l=n(120),h=u.CONST_EXPR(new a.Provider(c.ControlContainer,{useExisting:a.forwardRef(function(){return f})})),f=function(t){function e(e,n,r){t.call(this),this._validators=n,this._asyncValidators=r,this._parent=e}return r(e,t),e.prototype.ngOnInit=function(){this.formDirective.addControlGroup(this)},e.prototype.ngOnDestroy=function(){this.formDirective.removeControlGroup(this)},Object.defineProperty(e.prototype,"control",{get:function(){return this.formDirective.getControlGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return p.controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this._parent.formDirective},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"validator",{get:function(){return p.composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"asyncValidator",{get:function(){return p.composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),e=i([a.Directive({selector:"[ngControlGroup]",providers:[h],inputs:["name: ngControlGroup"],exportAs:"ngForm"}),s(0,a.Host()),s(0,a.SkipSelf()),s(1,a.Optional()),s(1,a.Self()),s(1,a.Inject(l.NG_VALIDATORS)),s(2,a.Optional()),s(2,a.Self()),s(2,a.Inject(l.NG_ASYNC_VALIDATORS)),o("design:paramtypes",[c.ControlContainer,Array,Array])],e)}(c.ControlContainer);e.NgControlGroup=f},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(5),u=n(15),c=n(12),p=n(40),l=n(2),h=n(115),f=n(119),d=n(120),v=a.CONST_EXPR(new l.Provider(h.ControlContainer,{useExisting:l.forwardRef(function(){return y})})),y=function(t){function e(e,n){t.call(this),this._validators=e,this._asyncValidators=n,this.form=null,this.directives=[],this.ngSubmit=new p.EventEmitter}return r(e,t),e.prototype.ngOnChanges=function(t){if(this._checkFormPresent(),u.StringMapWrapper.contains(t,"form")){var e=f.composeValidators(this._validators);this.form.validator=d.Validators.compose([this.form.validator,e]);var n=f.composeAsyncValidators(this._asyncValidators);this.form.asyncValidator=d.Validators.composeAsync([this.form.asyncValidator,n]),this.form.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}this._updateDomValue()},Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this.form.find(t.path);f.setUpControl(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t)},e.prototype.getControl=function(t){return this.form.find(t.path)},e.prototype.removeControl=function(t){u.ListWrapper.remove(this.directives,t)},e.prototype.addControlGroup=function(t){var e=this.form.find(t.path);f.setUpControlGroup(e,t),e.updateValueAndValidity({emitEvent:!1})},e.prototype.removeControlGroup=function(t){},e.prototype.getControlGroup=function(t){return this.form.find(t.path)},e.prototype.updateModel=function(t,e){var n=this.form.find(t.path);n.updateValue(e)},e.prototype.onSubmit=function(){return p.ObservableWrapper.callEmit(this.ngSubmit,null),!1},e.prototype._updateDomValue=function(){var t=this;this.directives.forEach(function(e){var n=t.form.find(e.path);e.valueAccessor.writeValue(n.value)})},e.prototype._checkFormPresent=function(){if(a.isBlank(this.form))throw new c.BaseException('ngFormModel expects a form. Please pass one in. Example:
')},e=i([l.Directive({selector:"[ngFormModel]",bindings:[v],inputs:["form: ngFormModel"],host:{"(submit)":"onSubmit()"},outputs:["ngSubmit"],exportAs:"ngForm"}),s(0,l.Optional()),s(0,l.Self()),s(0,l.Inject(d.NG_VALIDATORS)),s(1,l.Optional()),s(1,l.Self()),s(1,l.Inject(d.NG_ASYNC_VALIDATORS)),o("design:paramtypes",[Array,Array])],e)}(h.ControlContainer);e.NgFormModel=y},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(40),u=n(15),c=n(5),p=n(2),l=n(115),h=n(113),f=n(119),d=n(120),v=c.CONST_EXPR(new p.Provider(l.ControlContainer,{useExisting:p.forwardRef(function(){return y})})),y=function(t){function e(e,n){t.call(this),this.ngSubmit=new a.EventEmitter,this.form=new h.ControlGroup({},null,f.composeValidators(e),f.composeAsyncValidators(n))}return r(e,t),Object.defineProperty(e.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),e.prototype.addControl=function(t){var e=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=e._findContainer(t.path),r=new h.Control;f.setUpControl(r,t),n.addControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})},e.prototype.getControl=function(t){return this.form.find(t.path)},e.prototype.removeControl=function(t){var e=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=e._findContainer(t.path);c.isPresent(n)&&(n.removeControl(t.name),n.updateValueAndValidity({emitEvent:!1}))})},e.prototype.addControlGroup=function(t){var e=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=e._findContainer(t.path),r=new h.ControlGroup({});f.setUpControlGroup(r,t),n.addControl(t.name,r),r.updateValueAndValidity({emitEvent:!1})})},e.prototype.removeControlGroup=function(t){var e=this;a.PromiseWrapper.scheduleMicrotask(function(){var n=e._findContainer(t.path);c.isPresent(n)&&(n.removeControl(t.name),n.updateValueAndValidity({emitEvent:!1}))})},e.prototype.getControlGroup=function(t){return this.form.find(t.path)},e.prototype.updateModel=function(t,e){var n=this;a.PromiseWrapper.scheduleMicrotask(function(){var r=n.form.find(t.path);r.updateValue(e)})},e.prototype.onSubmit=function(){return a.ObservableWrapper.callEmit(this.ngSubmit,null),!1},e.prototype._findContainer=function(t){return t.pop(),u.ListWrapper.isEmpty(t)?this.form:this.form.find(t)},e=i([p.Directive({selector:"form:not([ngNoForm]):not([ngFormModel]),ngForm,[ngForm]",bindings:[v],host:{"(submit)":"onSubmit()"},outputs:["ngSubmit"],exportAs:"ngForm"}),s(0,p.Optional()),s(0,p.Self()),s(0,p.Inject(d.NG_VALIDATORS)),s(1,p.Optional()),s(1,p.Self()),s(1,p.Inject(d.NG_ASYNC_VALIDATORS)),o("design:paramtypes",[Array,Array])],e)}(l.ControlContainer);e.NgForm=y},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},s=n(2),a=n(117),u=n(5),c=function(){function t(t){this._cd=t}return Object.defineProperty(t.prototype,"ngClassUntouched",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.untouched:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassTouched",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.touched:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassPristine",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.pristine:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassDirty",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.dirty:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassValid",{get:function(){return u.isPresent(this._cd.control)?this._cd.control.valid:!1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"ngClassInvalid",{get:function(){return u.isPresent(this._cd.control)?!this._cd.control.valid:!1},enumerable:!0,configurable:!0}),t=r([s.Directive({selector:"[ngControl],[ngModel],[ngFormControl]",host:{"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid"}}),o(0,s.Self()),i("design:paramtypes",[a.NgControl])],t)}();e.NgControlStatus=c},function(t,e,n){"use strict";var r=n(5),i=n(116),o=n(127),s=n(128),a=n(129),u=n(130),c=n(131),p=n(121),l=n(123),h=n(122),f=n(125),d=n(132),v=n(124),y=n(134),m=n(116);e.NgControlName=m.NgControlName;var g=n(127);e.NgFormControl=g.NgFormControl;var _=n(128);e.NgModel=_.NgModel;var b=n(129);e.NgControlGroup=b.NgControlGroup;var P=n(130);e.NgFormModel=P.NgFormModel;var E=n(131);e.NgForm=E.NgForm;var w=n(121);e.DefaultValueAccessor=w.DefaultValueAccessor;var C=n(123);e.CheckboxControlValueAccessor=C.CheckboxControlValueAccessor;var R=n(125);e.RadioControlValueAccessor=R.RadioControlValueAccessor,e.RadioButtonState=R.RadioButtonState;var S=n(122);e.NumberValueAccessor=S.NumberValueAccessor;var O=n(132);e.NgControlStatus=O.NgControlStatus;var T=n(124);e.SelectControlValueAccessor=T.SelectControlValueAccessor,e.NgSelectOption=T.NgSelectOption;var x=n(134);e.RequiredValidator=x.RequiredValidator,e.MinLengthValidator=x.MinLengthValidator,e.MaxLengthValidator=x.MaxLengthValidator,e.PatternValidator=x.PatternValidator;var A=n(117);e.NgControl=A.NgControl,e.FORM_DIRECTIVES=r.CONST_EXPR([i.NgControlName,a.NgControlGroup,o.NgFormControl,s.NgModel,u.NgFormModel,c.NgForm,v.NgSelectOption,p.DefaultValueAccessor,h.NumberValueAccessor,l.CheckboxControlValueAccessor,v.SelectControlValueAccessor,f.RadioControlValueAccessor,d.NgControlStatus,y.RequiredValidator,y.MinLengthValidator,y.MaxLengthValidator,y.PatternValidator])},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},s=n(2),a=n(5),u=n(120),c=n(5),p=u.Validators.required,l=a.CONST_EXPR(new s.Provider(u.NG_VALIDATORS,{useValue:p,multi:!0})),h=function(){function t(){}return t=r([s.Directive({selector:"[required][ngControl],[required][ngFormControl],[required][ngModel]",providers:[l]}),i("design:paramtypes",[])],t)}();e.RequiredValidator=h;var f=a.CONST_EXPR(new s.Provider(u.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return d}),multi:!0})),d=function(){function t(t){this._validator=u.Validators.minLength(c.NumberWrapper.parseInt(t,10))}return t.prototype.validate=function(t){return this._validator(t)},t=r([s.Directive({selector:"[minlength][ngControl],[minlength][ngFormControl],[minlength][ngModel]",providers:[f]}),o(0,s.Attribute("minlength")),i("design:paramtypes",[String])],t)}();e.MinLengthValidator=d;var v=a.CONST_EXPR(new s.Provider(u.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return y}),multi:!0})),y=function(){function t(t){this._validator=u.Validators.maxLength(c.NumberWrapper.parseInt(t,10))}return t.prototype.validate=function(t){return this._validator(t)},t=r([s.Directive({selector:"[maxlength][ngControl],[maxlength][ngFormControl],[maxlength][ngModel]",providers:[v]}),o(0,s.Attribute("maxlength")),i("design:paramtypes",[String])],t)}();e.MaxLengthValidator=y;var m=a.CONST_EXPR(new s.Provider(u.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return g}),multi:!0})),g=function(){function t(t){this._validator=u.Validators.pattern(t)}return t.prototype.validate=function(t){return this._validator(t)},t=r([s.Directive({selector:"[pattern][ngControl],[pattern][ngFormControl],[pattern][ngModel]",providers:[m]}),o(0,s.Attribute("pattern")),i("design:paramtypes",[String])],t)}();e.PatternValidator=g},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(15),a=n(5),u=n(113),c=function(){function t(){}return t.prototype.group=function(t,e){void 0===e&&(e=null);var n=this._reduceControls(t),r=a.isPresent(e)?s.StringMapWrapper.get(e,"optionals"):null,i=a.isPresent(e)?s.StringMapWrapper.get(e,"validator"):null,o=a.isPresent(e)?s.StringMapWrapper.get(e,"asyncValidator"):null;return new u.ControlGroup(n,r,i,o)},t.prototype.control=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),new u.Control(t,e,n)},t.prototype.array=function(t,e,n){var r=this;void 0===e&&(e=null),void 0===n&&(n=null);var i=t.map(function(t){return r._createControl(t)});return new u.ControlArray(i,e,n)},t.prototype._reduceControls=function(t){var e=this,n={};return s.StringMapWrapper.forEach(t,function(t,r){n[r]=e._createControl(t)}),n},t.prototype._createControl=function(t){if(t instanceof u.Control||t instanceof u.ControlGroup||t instanceof u.ControlArray)return t;if(a.isArray(t)){var e=t[0],n=t.length>1?t[1]:null,r=t.length>2?t[2]:null;return this.control(e,n,r)}return this.control(t)},t=r([o.Injectable(),i("design:paramtypes",[])],t)}();e.FormBuilder=c},function(t,e,n){"use strict";var r=n(5),i=n(112),o=n(102);e.COMMON_DIRECTIVES=r.CONST_EXPR([o.CORE_DIRECTIVES,i.FORM_DIRECTIVES])},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}var i=n(138);e.PLATFORM_DIRECTIVES=i.PLATFORM_DIRECTIVES,e.PLATFORM_PIPES=i.PLATFORM_PIPES,e.COMPILER_PROVIDERS=i.COMPILER_PROVIDERS,e.TEMPLATE_TRANSFORMS=i.TEMPLATE_TRANSFORMS,e.CompilerConfig=i.CompilerConfig,e.RenderTypes=i.RenderTypes,e.UrlResolver=i.UrlResolver,e.DEFAULT_PACKAGE_URL_PROVIDER=i.DEFAULT_PACKAGE_URL_PROVIDER,e.createOfflineCompileUrlResolver=i.createOfflineCompileUrlResolver,e.XHR=i.XHR,e.ViewResolver=i.ViewResolver,e.DirectiveResolver=i.DirectiveResolver,e.PipeResolver=i.PipeResolver,e.SourceModule=i.SourceModule,e.NormalizedComponentWithViewDirectives=i.NormalizedComponentWithViewDirectives,e.OfflineCompiler=i.OfflineCompiler,e.CompileMetadataWithIdentifier=i.CompileMetadataWithIdentifier,e.CompileMetadataWithType=i.CompileMetadataWithType,e.CompileIdentifierMetadata=i.CompileIdentifierMetadata,e.CompileDiDependencyMetadata=i.CompileDiDependencyMetadata,e.CompileProviderMetadata=i.CompileProviderMetadata,e.CompileFactoryMetadata=i.CompileFactoryMetadata,e.CompileTokenMetadata=i.CompileTokenMetadata,e.CompileTypeMetadata=i.CompileTypeMetadata,e.CompileQueryMetadata=i.CompileQueryMetadata,e.CompileTemplateMetadata=i.CompileTemplateMetadata,e.CompileDirectiveMetadata=i.CompileDirectiveMetadata,e.CompilePipeMetadata=i.CompilePipeMetadata,r(n(139))},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}function i(){return new b.CompilerConfig(h.assertionsEnabled(),!1,!0)}var o=n(84);e.PLATFORM_DIRECTIVES=o.PLATFORM_DIRECTIVES,e.PLATFORM_PIPES=o.PLATFORM_PIPES,r(n(139));var s=n(140);e.TEMPLATE_TRANSFORMS=s.TEMPLATE_TRANSFORMS;var a=n(162);e.CompilerConfig=a.CompilerConfig,e.RenderTypes=a.RenderTypes,r(n(155)),r(n(163));var u=n(165);e.RuntimeCompiler=u.RuntimeCompiler,r(n(157)),r(n(184));var c=n(188);e.ViewResolver=c.ViewResolver;var p=n(186); +e.DirectiveResolver=p.DirectiveResolver;var l=n(187);e.PipeResolver=l.PipeResolver;var h=n(5),f=n(6),d=n(140),v=n(144),y=n(183),m=n(185),g=n(166),_=n(168),b=n(162),P=n(64),E=n(165),w=n(150),C=n(199),R=n(157),S=n(142),O=n(143),T=n(188),x=n(186),A=n(187);e.COMPILER_PROVIDERS=h.CONST_EXPR([O.Lexer,S.Parser,v.HtmlParser,d.TemplateParser,y.DirectiveNormalizer,m.RuntimeMetadataResolver,R.DEFAULT_PACKAGE_URL_PROVIDER,g.StyleCompiler,_.ViewCompiler,new f.Provider(b.CompilerConfig,{useFactory:i,deps:[]}),E.RuntimeCompiler,new f.Provider(P.ComponentResolver,{useExisting:E.RuntimeCompiler}),C.DomElementSchemaRegistry,new f.Provider(w.ElementSchemaRegistry,{useExisting:C.DomElementSchemaRegistry}),R.UrlResolver,T.ViewResolver,x.DirectiveResolver,A.PipeResolver])},function(t,e,n){"use strict";function r(t,e,n){void 0===n&&(n=null);var r=[];return e.forEach(function(e){var o=e.visit(t,n);i.isPresent(o)&&r.push(o)}),r}var i=n(5),o=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitText(this,e)},t}();e.TextAst=o;var s=function(){function t(t,e,n){this.value=t,this.ngContentIndex=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitBoundText(this,e)},t}();e.BoundTextAst=s;var a=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitAttr(this,e)},t}();e.AttrAst=a;var u=function(){function t(t,e,n,r,i){this.name=t,this.type=e,this.value=n,this.unit=r,this.sourceSpan=i}return t.prototype.visit=function(t,e){return t.visitElementProperty(this,e)},t}();e.BoundElementPropertyAst=u;var c=function(){function t(t,e,n,r){this.name=t,this.target=e,this.handler=n,this.sourceSpan=r}return t.prototype.visit=function(t,e){return t.visitEvent(this,e)},Object.defineProperty(t.prototype,"fullName",{get:function(){return i.isPresent(this.target)?this.target+":"+this.name:this.name},enumerable:!0,configurable:!0}),t}();e.BoundEventAst=c;var p=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitVariable(this,e)},t}();e.VariableAst=p;var l=function(){function t(t,e,n,r,i,o,s,a,u,c,p){this.name=t,this.attrs=e,this.inputs=n,this.outputs=r,this.exportAsVars=i,this.directives=o,this.providers=s,this.hasViewContainer=a,this.children=u,this.ngContentIndex=c,this.sourceSpan=p}return t.prototype.visit=function(t,e){return t.visitElement(this,e)},t.prototype.isBound=function(){return this.inputs.length>0||this.outputs.length>0||this.exportAsVars.length>0||this.directives.length>0},t.prototype.getComponent=function(){for(var t=0;t0;n||e.push(t)}),e}var s=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},a=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},u=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},c=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},p=n(15),l=n(5),h=n(2),f=n(5),d=n(12),v=n(141),y=n(142),m=n(144),g=n(148),_=n(147),b=n(66),P=n(139),E=n(149),w=n(150),C=n(151),R=n(152),S=n(145),O=n(153),T=n(154),x=/^(?:(?:(?:(bind-)|(var-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g,A="template",I="template",M="*",k="class",N=".",D="attr",V="class",j="style",L=E.CssSelector.parse("*")[0];e.TEMPLATE_TRANSFORMS=f.CONST_EXPR(new h.OpaqueToken("TemplateTransforms"));var B=function(t){function e(e,n){t.call(this,n,e)}return s(e,t),e}(_.ParseError);e.TemplateParseError=B;var F=function(){function t(t,e){this.templateAst=t,this.errors=e}return t}();e.TemplateParseResult=F;var U=function(){function t(t,e,n,r){this._exprParser=t,this._schemaRegistry=e,this._htmlParser=n,this.transforms=r}return t.prototype.parse=function(t,e,n,r,i){var o=this.tryParse(t,e,n,r,i);if(l.isPresent(o.errors)){var s=o.errors.join("\n");throw new d.BaseException("Template parse errors:\n"+s)}return o.templateAst},t.prototype.tryParse=function(t,e,n,r,i){var s,a=this._htmlParser.parse(e,i),u=a.errors;if(a.rootNodes.length>0){var c=o(n),p=o(r),h=new T.ProviderViewContext(t,a.rootNodes[0].sourceSpan),f=new W(h,c,p,this._exprParser,this._schemaRegistry);s=S.htmlVisitAll(f,a.rootNodes,G),u=u.concat(f.errors).concat(h.errors)}else s=[];return u.length>0?new F(s,u):(l.isPresent(this.transforms)&&this.transforms.forEach(function(t){s=P.templateVisitAll(t,s)}),new F(s))},t=a([h.Injectable(),c(3,h.Optional()),c(3,h.Inject(e.TEMPLATE_TRANSFORMS)),u("design:paramtypes",[y.Parser,w.ElementSchemaRegistry,m.HtmlParser,Array])],t)}();e.TemplateParser=U;var W=function(){function t(t,e,n,r,i){var o=this;this.providerViewContext=t,this._exprParser=r,this._schemaRegistry=i,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new E.SelectorMatcher,p.ListWrapper.forEachWithIndex(e,function(t,e){var n=E.CssSelector.parse(t.selector);o.selectorMatcher.addSelectables(n,t),o.directivesIndex.set(t,e)}),this.pipesByName=new Map,n.forEach(function(t){return o.pipesByName.set(t.name,t)})}return t.prototype._reportError=function(t,e){this.errors.push(new B(t,e))},t.prototype._parseInterpolation=function(t,e){var n=e.start.toString();try{var r=this._exprParser.parseInterpolation(t,n);if(this._checkPipes(r,e),l.isPresent(r)&&r.ast.expressions.length>b.MAX_INTERPOLATION_VALUES)throw new d.BaseException("Only support at most "+b.MAX_INTERPOLATION_VALUES+" interpolation values!");return r}catch(i){return this._reportError(""+i,e),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},t.prototype._parseAction=function(t,e){var n=e.start.toString();try{var r=this._exprParser.parseAction(t,n);return this._checkPipes(r,e),r}catch(i){return this._reportError(""+i,e),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},t.prototype._parseBinding=function(t,e){var n=e.start.toString();try{var r=this._exprParser.parseBinding(t,n);return this._checkPipes(r,e),r}catch(i){return this._reportError(""+i,e),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},t.prototype._parseTemplateBindings=function(t,e){var n=this,r=e.start.toString();try{var i=this._exprParser.parseTemplateBindings(t,r);return i.forEach(function(t){l.isPresent(t.expression)&&n._checkPipes(t.expression,e)}),i}catch(o){return this._reportError(""+o,e),[]}},t.prototype._checkPipes=function(t,e){var n=this;if(l.isPresent(t)){var r=new K;t.visit(r),r.pipes.forEach(function(t){n.pipesByName.has(t)||n._reportError("The pipe '"+t+"' could not be found",e)})}},t.prototype.visitExpansion=function(t,e){return null},t.prototype.visitExpansionCase=function(t,e){return null},t.prototype.visitText=function(t,e){var n=e.findNgContentIndex(L),r=this._parseInterpolation(t.value,t.sourceSpan);return l.isPresent(r)?new P.BoundTextAst(r,n,t.sourceSpan):new P.TextAst(t.value,n,t.sourceSpan)},t.prototype.visitAttr=function(t,e){return new P.AttrAst(t.name,t.value,t.sourceSpan)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitElement=function(t,e){var n=this,r=t.name,o=C.preparseElement(t);if(o.type===C.PreparsedElementType.SCRIPT||o.type===C.PreparsedElementType.STYLE)return null;if(o.type===C.PreparsedElementType.STYLESHEET&&R.isStyleUrlResolvable(o.hrefAttr))return null;var s=[],a=[],u=[],c=[],p=[],h=[],f=[],d=!1,v=[];t.attrs.forEach(function(t){var e=n._parseAttr(t,s,a,c,u),r=n._parseInlineTemplateBinding(t,f,p,h);e||r||(v.push(n.visitAttr(t,null)),s.push([t.name,t.value])),r&&(d=!0)});var y=g.splitNsName(r.toLowerCase())[1],m=y==A,_=i(r,s),b=this._parseDirectives(this.selectorMatcher,_),w=this._createDirectiveAsts(t.name,b,a,m?[]:u,t.sourceSpan),O=this._createElementPropertyAsts(t.name,a,w),x=e.isTemplateElement||d,I=new T.ProviderElementContext(this.providerViewContext,e.providerContext,x,w,v,u,t.sourceSpan),M=S.htmlVisitAll(o.nonBindable?z:this,t.children,q.create(m,w,m?e.providerContext:I));I.afterElement();var k,N=l.isPresent(o.projectAs)?E.CssSelector.parse(o.projectAs)[0]:_,D=e.findNgContentIndex(N);if(o.type===C.PreparsedElementType.NG_CONTENT)l.isPresent(t.children)&&t.children.length>0&&this._reportError(" element cannot have content. must be immediately followed by ",t.sourceSpan),k=new P.NgContentAst(this.ngContentCount++,d?null:D,t.sourceSpan);else if(m)this._assertAllEventsPublishedByDirectives(w,c),this._assertNoComponentsNorElementBindingsOnTemplate(w,O,t.sourceSpan),k=new P.EmbeddedTemplateAst(v,c,u,I.transformedDirectiveAsts,I.transformProviders,I.transformedHasViewContainer,M,d?null:D,t.sourceSpan);else{this._assertOnlyOneComponent(w,t.sourceSpan);var V=u.filter(function(t){return 0===t.value.length}),j=d?null:e.findNgContentIndex(N);k=new P.ElementAst(r,v,O,c,V,I.transformedDirectiveAsts,I.transformProviders,I.transformedHasViewContainer,M,d?null:j,t.sourceSpan)}if(d){var L=i(A,f),B=this._parseDirectives(this.selectorMatcher,L),F=this._createDirectiveAsts(t.name,B,p,[],t.sourceSpan),U=this._createElementPropertyAsts(t.name,p,F);this._assertNoComponentsNorElementBindingsOnTemplate(F,U,t.sourceSpan);var W=new T.ProviderElementContext(this.providerViewContext,e.providerContext,e.isTemplateElement,F,[],h,t.sourceSpan);W.afterElement(),k=new P.EmbeddedTemplateAst([],[],h,W.transformedDirectiveAsts,W.transformProviders,W.transformedHasViewContainer,[k],D,t.sourceSpan)}return k},t.prototype._parseInlineTemplateBinding=function(t,e,n,r){var i=null;if(t.name==I)i=t.value;else if(t.name.startsWith(M)){var o=t.name.substring(M.length);i=0==t.value.length?o:o+" "+t.value}if(l.isPresent(i)){for(var s=this._parseTemplateBindings(i,t.sourceSpan),a=0;a-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new P.VariableAst(t,e,n))},t.prototype._parseProperty=function(t,e,n,r,i){this._parsePropertyAst(t,this._parseBinding(e,n),n,r,i)},t.prototype._parsePropertyInterpolation=function(t,e,n,r,i){var o=this._parseInterpolation(e,n);return l.isPresent(o)?(this._parsePropertyAst(t,o,n,r,i),!0):!1},t.prototype._parsePropertyAst=function(t,e,n,r,i){r.push([t,e.source]),i.push(new X(t,e,!1,n))},t.prototype._parseAssignmentEvent=function(t,e,n,r,i){this._parseEvent(t+"Change",e+"=$event",n,r,i)},t.prototype._parseEvent=function(t,e,n,r,i){var o=O.splitAtColon(t,[null,t]),s=o[0],a=o[1],u=this._parseAction(e,n);r.push([t,u.source]),i.push(new P.BoundEventAst(a,s,u,n))},t.prototype._parseLiteralAttr=function(t,e,n,r){r.push(new X(t,this._exprParser.wrapLiteralPrimitive(e,""),!0,n))},t.prototype._parseDirectives=function(t,e){var n=this,r=[];return t.match(e,function(t,e){r.push(e)}),p.ListWrapper.sort(r,function(t,e){var r=t.isComponent,i=e.isComponent;return r&&!i?-1:!r&&i?1:n.directivesIndex.get(t)-n.directivesIndex.get(e)}),r},t.prototype._createDirectiveAsts=function(t,e,n,r,i){var o=this,s=new Set,a=e.map(function(e){var a=[],u=[],c=[];o._createDirectiveHostPropertyAsts(t,e.hostProperties,i,a),o._createDirectiveHostEventAsts(e.hostListeners,i,u),o._createDirectivePropertyAsts(e.inputs,n,c);var p=[];return r.forEach(function(t){(0===t.value.length&&e.isComponent||e.exportAs==t.value)&&(p.push(t),s.add(t.name))}),new P.DirectiveAst(e,c,a,u,p,i)});return r.forEach(function(t){t.value.length>0&&!p.SetWrapper.has(s,t.name)&&o._reportError('There is no directive with "exportAs" set to "'+t.value+'"',t.sourceSpan)}),a},t.prototype._createDirectiveHostPropertyAsts=function(t,e,n,r){var i=this;l.isPresent(e)&&p.StringMapWrapper.forEach(e,function(e,o){var s=i._parseBinding(e,n);r.push(i._createElementPropertyAst(t,o,s,n))})},t.prototype._createDirectiveHostEventAsts=function(t,e,n){var r=this;l.isPresent(t)&&p.StringMapWrapper.forEach(t,function(t,i){r._parseEvent(i,t,e,[],n)})},t.prototype._createDirectivePropertyAsts=function(t,e,n){if(l.isPresent(t)){var r=new Map;e.forEach(function(t){var e=r.get(t.name);(l.isBlank(e)||e.isLiteral)&&r.set(t.name,t)}),p.StringMapWrapper.forEach(t,function(t,e){var i=r.get(t);l.isPresent(i)&&n.push(new P.BoundDirectivePropertyAst(e,i.name,i.expression,i.sourceSpan))})}},t.prototype._createElementPropertyAsts=function(t,e,n){var r=this,i=[],o=new Map;return n.forEach(function(t){t.inputs.forEach(function(t){o.set(t.templateName,t)})}),e.forEach(function(e){!e.isLiteral&&l.isBlank(o.get(e.name))&&i.push(r._createElementPropertyAst(t,e.name,e.expression,e.sourceSpan))}),i},t.prototype._createElementPropertyAst=function(t,e,n,r){var i,o,s=null,a=e.split(N);if(1===a.length)o=this._schemaRegistry.getMappedPropName(a[0]),i=P.PropertyBindingType.Property,this._schemaRegistry.hasProperty(t,o)||this._reportError("Can't bind to '"+o+"' since it isn't a known native property",r);else if(a[0]==D){o=a[1];var u=o.indexOf(":");if(u>-1){var c=o.substring(0,u),p=o.substring(u+1);o=g.mergeNsAndName(c,p)}i=P.PropertyBindingType.Attribute}else a[0]==V?(o=a[1],i=P.PropertyBindingType.Class):a[0]==j?(s=a.length>2?a[2]:null,o=a[1],i=P.PropertyBindingType.Style):(this._reportError("Invalid property name '"+e+"'",r),i=null);return new P.BoundElementPropertyAst(o,i,n,s,r)},t.prototype._findComponentDirectiveNames=function(t){var e=[];return t.forEach(function(t){var n=t.directive.type.name;t.directive.isComponent&&e.push(n)}),e},t.prototype._assertOnlyOneComponent=function(t,e){var n=this._findComponentDirectiveNames(t);n.length>1&&this._reportError("More than one component: "+n.join(","),e)},t.prototype._assertNoComponentsNorElementBindingsOnTemplate=function(t,e,n){var r=this,i=this._findComponentDirectiveNames(t);i.length>0&&this._reportError("Components on an embedded template: "+i.join(","),n),e.forEach(function(t){r._reportError("Property binding "+t.name+" not used by any directive on an embedded template",n)})},t.prototype._assertAllEventsPublishedByDirectives=function(t,e){var n=this,r=new Set;t.forEach(function(t){p.StringMapWrapper.forEach(t.directive.outputs,function(t,e){r.add(t)})}),e.forEach(function(t){(l.isPresent(t.target)||!p.SetWrapper.has(r,t.name))&&n._reportError("Event binding "+t.fullName+" not emitted by any directive on an embedded template",t.sourceSpan)})},t}(),H=function(){function t(){}return t.prototype.visitElement=function(t,e){var n=C.preparseElement(t);if(n.type===C.PreparsedElementType.SCRIPT||n.type===C.PreparsedElementType.STYLE||n.type===C.PreparsedElementType.STYLESHEET)return null;var r=t.attrs.map(function(t){return[t.name,t.value]}),o=i(t.name,r),s=e.findNgContentIndex(o),a=S.htmlVisitAll(this,t.children,G);return new P.ElementAst(t.name,S.htmlVisitAll(this,t.attrs),[],[],[],[],[],!1,a,s,t.sourceSpan)},t.prototype.visitComment=function(t,e){return null},t.prototype.visitAttr=function(t,e){return new P.AttrAst(t.name,t.value,t.sourceSpan)},t.prototype.visitText=function(t,e){var n=e.findNgContentIndex(L);return new P.TextAst(t.value,n,t.sourceSpan)},t.prototype.visitExpansion=function(t,e){return t},t.prototype.visitExpansionCase=function(t,e){return t},t}(),X=function(){function t(t,e,n,r){this.name=t,this.expression=e,this.isLiteral=n,this.sourceSpan=r}return t}();e.splitClasses=r;var q=function(){function t(t,e,n,r){this.isTemplateElement=t,this._ngContentIndexMatcher=e,this._wildcardNgContentIndex=n,this.providerContext=r}return t.create=function(e,n,r){var i=new E.SelectorMatcher,o=null;if(n.length>0&&n[0].directive.isComponent)for(var s=n[0].directive.template.ngContentSelectors,a=0;a0?e[0]:null},t}(),G=new q(!0,new E.SelectorMatcher,null,null),z=new H,K=function(t){function e(){t.apply(this,arguments),this.pipes=new Set}return s(e,t),e.prototype.visitPipe=function(t,e){return this.pipes.add(t.name),t.exp.visit(this),this.visitAll(t.args,e),null},e}(v.RecursiveAstVisitor);e.PipeCollector=K},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(15),o=function(){function t(){}return t.prototype.visit=function(t,e){return void 0===e&&(e=null),null},t.prototype.toString=function(){return"AST"},t}();e.AST=o;var s=function(t){function e(e,n,r){t.call(this),this.prefix=e,this.uninterpretedExpression=n,this.location=r}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitQuote(this,e)},e.prototype.toString=function(){return"Quote"},e}(o);e.Quote=s;var a=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.visit=function(t,e){void 0===e&&(e=null)},e}(o);e.EmptyExpr=a;var u=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitImplicitReceiver(this,e)},e}(o);e.ImplicitReceiver=u;var c=function(t){function e(e){t.call(this),this.expressions=e}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitChain(this,e)},e}(o);e.Chain=c;var p=function(t){function e(e,n,r){t.call(this),this.condition=e,this.trueExp=n,this.falseExp=r}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitConditional(this,e)},e}(o);e.Conditional=p;var l=function(t){function e(e,n){t.call(this),this.receiver=e,this.name=n}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPropertyRead(this,e)},e}(o);e.PropertyRead=l;var h=function(t){function e(e,n,r){t.call(this),this.receiver=e,this.name=n,this.value=r}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPropertyWrite(this,e)},e}(o);e.PropertyWrite=h;var f=function(t){function e(e,n){t.call(this),this.receiver=e,this.name=n}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitSafePropertyRead(this,e)},e}(o);e.SafePropertyRead=f;var d=function(t){function e(e,n){t.call(this),this.obj=e,this.key=n}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitKeyedRead(this,e)},e}(o);e.KeyedRead=d;var v=function(t){function e(e,n,r){t.call(this),this.obj=e,this.key=n,this.value=r}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitKeyedWrite(this,e)},e}(o);e.KeyedWrite=v;var y=function(t){function e(e,n,r){t.call(this),this.exp=e,this.name=n,this.args=r}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPipe(this,e)},e}(o);e.BindingPipe=y;var m=function(t){function e(e){t.call(this),this.value=e}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralPrimitive(this,e)},e}(o);e.LiteralPrimitive=m;var g=function(t){function e(e){t.call(this),this.expressions=e}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralArray(this,e)},e}(o);e.LiteralArray=g;var _=function(t){function e(e,n){t.call(this),this.keys=e,this.values=n}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitLiteralMap(this,e)},e}(o);e.LiteralMap=_;var b=function(t){function e(e,n){t.call(this),this.strings=e,this.expressions=n}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitInterpolation(this,e)},e}(o);e.Interpolation=b;var P=function(t){function e(e,n,r){t.call(this),this.operation=e,this.left=n,this.right=r}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitBinary(this,e)},e}(o);e.Binary=P;var E=function(t){function e(e){t.call(this),this.expression=e}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitPrefixNot(this,e)},e}(o);e.PrefixNot=E;var w=function(t){function e(e,n,r){t.call(this),this.receiver=e,this.name=n,this.args=r}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitMethodCall(this,e)},e}(o);e.MethodCall=w;var C=function(t){function e(e,n,r){t.call(this),this.receiver=e,this.name=n,this.args=r}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitSafeMethodCall(this,e)},e}(o);e.SafeMethodCall=C;var R=function(t){function e(e,n){t.call(this),this.target=e,this.args=n}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),t.visitFunctionCall(this,e)},e}(o);e.FunctionCall=R;var S=function(t){function e(e,n,r){t.call(this),this.ast=e,this.source=n,this.location=r}return r(e,t),e.prototype.visit=function(t,e){return void 0===e&&(e=null),this.ast.visit(t,e)},e.prototype.toString=function(){return this.source+" in "+this.location},e}(o);e.ASTWithSource=S;var O=function(){function t(t,e,n,r){this.key=t,this.keyIsVar=e,this.name=n,this.expression=r}return t}();e.TemplateBinding=O;var T=function(){function t(){}return t.prototype.visitBinary=function(t,e){return t.left.visit(this),t.right.visit(this),null},t.prototype.visitChain=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitConditional=function(t,e){return t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this),null},t.prototype.visitPipe=function(t,e){return t.exp.visit(this),this.visitAll(t.args,e),null},t.prototype.visitFunctionCall=function(t,e){return t.target.visit(this),this.visitAll(t.args,e),null},t.prototype.visitImplicitReceiver=function(t,e){return null},t.prototype.visitInterpolation=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitKeyedRead=function(t,e){return t.obj.visit(this),t.key.visit(this),null},t.prototype.visitKeyedWrite=function(t,e){return t.obj.visit(this),t.key.visit(this),t.value.visit(this),null},t.prototype.visitLiteralArray=function(t,e){return this.visitAll(t.expressions,e)},t.prototype.visitLiteralMap=function(t,e){return this.visitAll(t.values,e)},t.prototype.visitLiteralPrimitive=function(t,e){return null},t.prototype.visitMethodCall=function(t,e){return t.receiver.visit(this),this.visitAll(t.args,e)},t.prototype.visitPrefixNot=function(t,e){return t.expression.visit(this),null},t.prototype.visitPropertyRead=function(t,e){return t.receiver.visit(this),null},t.prototype.visitPropertyWrite=function(t,e){return t.receiver.visit(this),t.value.visit(this),null},t.prototype.visitSafePropertyRead=function(t,e){return t.receiver.visit(this),null},t.prototype.visitSafeMethodCall=function(t,e){return t.receiver.visit(this),this.visitAll(t.args,e)},t.prototype.visitAll=function(t,e){var n=this;return t.forEach(function(t){return t.visit(n,e)}),null},t.prototype.visitQuote=function(t,e){return null},t}();e.RecursiveAstVisitor=T;var x=function(){function t(){}return t.prototype.visitImplicitReceiver=function(t,e){return t},t.prototype.visitInterpolation=function(t,e){return new b(t.strings,this.visitAll(t.expressions))},t.prototype.visitLiteralPrimitive=function(t,e){return new m(t.value)},t.prototype.visitPropertyRead=function(t,e){return new l(t.receiver.visit(this),t.name)},t.prototype.visitPropertyWrite=function(t,e){return new h(t.receiver.visit(this),t.name,t.value)},t.prototype.visitSafePropertyRead=function(t,e){return new f(t.receiver.visit(this),t.name)},t.prototype.visitMethodCall=function(t,e){return new w(t.receiver.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitSafeMethodCall=function(t,e){return new C(t.receiver.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitFunctionCall=function(t,e){return new R(t.target.visit(this),this.visitAll(t.args))},t.prototype.visitLiteralArray=function(t,e){return new g(this.visitAll(t.expressions))},t.prototype.visitLiteralMap=function(t,e){return new _(t.keys,this.visitAll(t.values))},t.prototype.visitBinary=function(t,e){return new P(t.operation,t.left.visit(this),t.right.visit(this))},t.prototype.visitPrefixNot=function(t,e){return new E(t.expression.visit(this))},t.prototype.visitConditional=function(t,e){return new p(t.condition.visit(this),t.trueExp.visit(this),t.falseExp.visit(this))},t.prototype.visitPipe=function(t,e){return new y(t.exp.visit(this),t.name,this.visitAll(t.args))},t.prototype.visitKeyedRead=function(t,e){return new d(t.obj.visit(this),t.key.visit(this))},t.prototype.visitKeyedWrite=function(t,e){return new v(t.obj.visit(this),t.key.visit(this),t.value.visit(this))},t.prototype.visitAll=function(t){for(var e=i.ListWrapper.createFixedSize(t.length),n=0;no?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(8),a=n(5),u=n(12),c=n(15),p=n(143),l=n(141),h=new l.ImplicitReceiver,f=/\{\{([\s\S]*?)\}\}/g,d=function(t){function e(e,n,r,i){t.call(this,"Parser Error: "+e+" "+r+" ["+n+"] in "+i)}return r(e,t),e}(u.BaseException),v=function(){function t(t,e){this.strings=t,this.expressions=e}return t}();e.SplitInterpolation=v;var y=function(){function t(t){this._lexer=t}return t.prototype.parseAction=function(t,e){this._checkNoInterpolation(t,e);var n=this._lexer.tokenize(this._stripComments(t)),r=new m(t,e,n,!0).parseChain();return new l.ASTWithSource(r,t,e)},t.prototype.parseBinding=function(t,e){var n=this._parseBindingAst(t,e);return new l.ASTWithSource(n,t,e)},t.prototype.parseSimpleBinding=function(t,e){var n=this._parseBindingAst(t,e);if(!g.check(n))throw new d("Host binding expression can only contain field access and constants",t,e);return new l.ASTWithSource(n,t,e)},t.prototype._parseBindingAst=function(t,e){var n=this._parseQuote(t,e);if(a.isPresent(n))return n;this._checkNoInterpolation(t,e);var r=this._lexer.tokenize(this._stripComments(t));return new m(t,e,r,!1).parseChain()},t.prototype._parseQuote=function(t,e){if(a.isBlank(t))return null;var n=t.indexOf(":");if(-1==n)return null;var r=t.substring(0,n).trim();if(!p.isIdentifier(r))return null;var i=t.substring(n+1);return new l.Quote(r,i,e)},t.prototype.parseTemplateBindings=function(t,e){var n=this._lexer.tokenize(t);return new m(t,e,n,!1).parseTemplateBindings()},t.prototype.parseInterpolation=function(t,e){var n=this.splitInterpolation(t,e);if(null==n)return null;for(var r=[],i=0;i0))throw new d("Blank expressions are not allowed in interpolated strings",t,"at column "+this._findInterpolationErrorColumn(n,o)+" in",e);i.push(s)}}return new v(r,i)},t.prototype.wrapLiteralPrimitive=function(t,e){return new l.ASTWithSource(new l.LiteralPrimitive(t),t,e)},t.prototype._stripComments=function(t){var e=this._commentStart(t);return a.isPresent(e)?t.substring(0,e).trim():t},t.prototype._commentStart=function(t){for(var e=null,n=0;n1)throw new d("Got interpolation ({{}}) where expression was expected",t,"at column "+this._findInterpolationErrorColumn(n,1)+" in",e)},t.prototype._findInterpolationErrorColumn=function(t,e){for(var n="",r=0;e>r;r++)n+=r%2===0?t[r]:"{{"+t[r]+"}}";return n.length},t=i([s.Injectable(),o("design:paramtypes",[p.Lexer])],t)}();e.Parser=y;var m=function(){function t(t,e,n,r){this.input=t,this.location=e,this.tokens=n,this.parseAction=r,this.index=0}return t.prototype.peek=function(t){var e=this.index+t;return e"))t=new l.Binary(">",t,this.parseAdditive());else if(this.optionalOperator("<="))t=new l.Binary("<=",t,this.parseAdditive());else{if(!this.optionalOperator(">="))return t;t=new l.Binary(">=",t,this.parseAdditive())}},t.prototype.parseAdditive=function(){for(var t=this.parseMultiplicative();;)if(this.optionalOperator("+"))t=new l.Binary("+",t,this.parseMultiplicative());else{if(!this.optionalOperator("-"))return t;t=new l.Binary("-",t,this.parseMultiplicative())}},t.prototype.parseMultiplicative=function(){for(var t=this.parsePrefix();;)if(this.optionalOperator("*"))t=new l.Binary("*",t,this.parsePrefix());else if(this.optionalOperator("%"))t=new l.Binary("%",t,this.parsePrefix());else{if(!this.optionalOperator("/"))return t;t=new l.Binary("/",t,this.parsePrefix())}},t.prototype.parsePrefix=function(){return this.optionalOperator("+")?this.parsePrefix():this.optionalOperator("-")?new l.Binary("-",new l.LiteralPrimitive(0),this.parsePrefix()):this.optionalOperator("!")?new l.PrefixNot(this.parsePrefix()):this.parseCallChain()},t.prototype.parseCallChain=function(){for(var t=this.parsePrimary();;)if(this.optionalCharacter(p.$PERIOD))t=this.parseAccessMemberOrMethodCall(t,!1);else if(this.optionalOperator("?."))t=this.parseAccessMemberOrMethodCall(t,!0);else if(this.optionalCharacter(p.$LBRACKET)){var e=this.parsePipe();if(this.expectCharacter(p.$RBRACKET),this.optionalOperator("=")){var n=this.parseConditional();t=new l.KeyedWrite(t,e,n)}else t=new l.KeyedRead(t,e)}else{if(!this.optionalCharacter(p.$LPAREN))return t;var r=this.parseCallArguments();this.expectCharacter(p.$RPAREN),t=new l.FunctionCall(t,r)}},t.prototype.parsePrimary=function(){if(this.optionalCharacter(p.$LPAREN)){var t=this.parsePipe();return this.expectCharacter(p.$RPAREN),t}if(this.next.isKeywordNull()||this.next.isKeywordUndefined())return this.advance(),new l.LiteralPrimitive(null);if(this.next.isKeywordTrue())return this.advance(),new l.LiteralPrimitive(!0);if(this.next.isKeywordFalse())return this.advance(),new l.LiteralPrimitive(!1);if(this.optionalCharacter(p.$LBRACKET)){var e=this.parseExpressionList(p.$RBRACKET);return this.expectCharacter(p.$RBRACKET),new l.LiteralArray(e)}if(this.next.isCharacter(p.$LBRACE))return this.parseLiteralMap();if(this.next.isIdentifier())return this.parseAccessMemberOrMethodCall(h,!1);if(this.next.isNumber()){var n=this.next.toNumber();return this.advance(),new l.LiteralPrimitive(n)}if(this.next.isString()){var r=this.next.toString();return this.advance(),new l.LiteralPrimitive(r)}throw this.index>=this.tokens.length?this.error("Unexpected end of expression: "+this.input):this.error("Unexpected token "+this.next),new u.BaseException("Fell through all cases in parsePrimary")},t.prototype.parseExpressionList=function(t){var e=[];if(!this.next.isCharacter(t))do e.push(this.parsePipe());while(this.optionalCharacter(p.$COMMA));return e},t.prototype.parseLiteralMap=function(){var t=[],e=[];if(this.expectCharacter(p.$LBRACE),!this.optionalCharacter(p.$RBRACE)){do{var n=this.expectIdentifierOrKeywordOrString();t.push(n),this.expectCharacter(p.$COLON),e.push(this.parsePipe())}while(this.optionalCharacter(p.$COMMA));this.expectCharacter(p.$RBRACE)}return new l.LiteralMap(t,e)},t.prototype.parseAccessMemberOrMethodCall=function(t,e){void 0===e&&(e=!1);var n=this.expectIdentifierOrKeyword();if(this.optionalCharacter(p.$LPAREN)){var r=this.parseCallArguments();return this.expectCharacter(p.$RPAREN),e?new l.SafeMethodCall(t,n,r):new l.MethodCall(t,n,r)}if(!e){if(this.optionalOperator("=")){this.parseAction||this.error("Bindings cannot contain assignments");var i=this.parseConditional();return new l.PropertyWrite(t,n,i)}return new l.PropertyRead(t,n)}return this.optionalOperator("=")?(this.error("The '?.' operator cannot be used in the assignment"),null):new l.SafePropertyRead(t,n)},t.prototype.parseCallArguments=function(){if(this.next.isCharacter(p.$RPAREN))return[];var t=[];do t.push(this.parsePipe());while(this.optionalCharacter(p.$COMMA));return t},t.prototype.parseBlockContent=function(){this.parseAction||this.error("Binding expression cannot contain chained expression");for(var t=[];this.index=e.$TAB&&t<=e.$SPACE||t==X}function p(t){return t>=D&&H>=t||t>=A&&M>=t||t==N||t==e.$$}function l(t){if(0==t.length)return!1;var n=new G(t);if(!p(n.peek))return!1;for(n.advance();n.peek!==e.$EOF;){if(!h(n.peek))return!1;n.advance()}return!0}function h(t){return t>=D&&H>=t||t>=A&&M>=t||t>=T&&x>=t||t==N||t==e.$$}function f(t){return t>=T&&x>=t}function d(t){return t==V||t==I}function v(t){return t==e.$MINUS||t==e.$PLUS}function y(t){return t===e.$SQ||t===e.$DQ||t===e.$BT}function m(t){switch(t){case L:return e.$LF;case j:return e.$FF;case B:return e.$CR;case F:return e.$TAB;case W:return e.$VTAB;default:return t}}var g=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},_=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},b=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},P=n(8),E=n(15),w=n(5),C=n(12);!function(t){t[t.Character=0]="Character",t[t.Identifier=1]="Identifier",t[t.Keyword=2]="Keyword",t[t.String=3]="String",t[t.Operator=4]="Operator",t[t.Number=5]="Number"}(e.TokenType||(e.TokenType={}));var R=e.TokenType,S=function(){function t(){}return t.prototype.tokenize=function(t){for(var e=new G(t),n=[],r=e.scanToken();null!=r;)n.push(r),r=e.scanToken();return n},t=_([P.Injectable(),b("design:paramtypes",[])],t)}();e.Lexer=S;var O=function(){function t(t,e,n,r){this.index=t,this.type=e,this.numValue=n,this.strValue=r}return t.prototype.isCharacter=function(t){return this.type==R.Character&&this.numValue==t},t.prototype.isNumber=function(){return this.type==R.Number},t.prototype.isString=function(){return this.type==R.String},t.prototype.isOperator=function(t){return this.type==R.Operator&&this.strValue==t},t.prototype.isIdentifier=function(){return this.type==R.Identifier},t.prototype.isKeyword=function(){return this.type==R.Keyword},t.prototype.isKeywordVar=function(){return this.type==R.Keyword&&"var"==this.strValue},t.prototype.isKeywordNull=function(){return this.type==R.Keyword&&"null"==this.strValue},t.prototype.isKeywordUndefined=function(){return this.type==R.Keyword&&"undefined"==this.strValue},t.prototype.isKeywordTrue=function(){return this.type==R.Keyword&&"true"==this.strValue},t.prototype.isKeywordFalse=function(){return this.type==R.Keyword&&"false"==this.strValue},t.prototype.toNumber=function(){return this.type==R.Number?this.numValue:-1},t.prototype.toString=function(){switch(this.type){case R.Character:case R.Identifier:case R.Keyword:case R.Operator:case R.String:return this.strValue;case R.Number:return this.numValue.toString();default:return null}},t}();e.Token=O,e.EOF=new O(-1,R.Character,0,""),e.$EOF=0,e.$TAB=9,e.$LF=10,e.$VTAB=11,e.$FF=12,e.$CR=13,e.$SPACE=32,e.$BANG=33,e.$DQ=34,e.$HASH=35,e.$$=36,e.$PERCENT=37,e.$AMPERSAND=38,e.$SQ=39,e.$LPAREN=40,e.$RPAREN=41,e.$STAR=42,e.$PLUS=43,e.$COMMA=44,e.$MINUS=45,e.$PERIOD=46,e.$SLASH=47,e.$COLON=58,e.$SEMICOLON=59,e.$LT=60,e.$EQ=61,e.$GT=62,e.$QUESTION=63;var T=48,x=57,A=65,I=69,M=90;e.$LBRACKET=91,e.$BACKSLASH=92,e.$RBRACKET=93;var k=94,N=95;e.$BT=96;var D=97,V=101,j=102,L=110,B=114,F=116,U=117,W=118,H=122;e.$LBRACE=123,e.$BAR=124,e.$RBRACE=125;var X=160,q=function(t){function e(e){t.call(this),this.message=e}return g(e,t),e.prototype.toString=function(){return this.message},e}(C.BaseException);e.ScannerError=q;var G=function(){function t(t){this.input=t,this.peek=0,this.index=-1,this.length=t.length,this.advance()}return t.prototype.advance=function(){this.peek=++this.index>=this.length?e.$EOF:w.StringWrapper.charCodeAt(this.input,this.index)},t.prototype.scanToken=function(){for(var t=this.input,n=this.length,i=this.peek,o=this.index;i<=e.$SPACE;){if(++o>=n){i=e.$EOF;break}i=w.StringWrapper.charCodeAt(t,o)}if(this.peek=i,this.index=o,o>=n)return null;if(p(i))return this.scanIdentifier();if(f(i))return this.scanNumber(o);var s=o;switch(i){case e.$PERIOD:return this.advance(),f(this.peek)?this.scanNumber(s):r(s,e.$PERIOD);case e.$LPAREN:case e.$RPAREN:case e.$LBRACE:case e.$RBRACE:case e.$LBRACKET:case e.$RBRACKET:case e.$COMMA:case e.$COLON:case e.$SEMICOLON:return this.scanCharacter(s,i);case e.$SQ:case e.$DQ:return this.scanString();case e.$HASH:case e.$PLUS:case e.$MINUS:case e.$STAR:case e.$SLASH:case e.$PERCENT:case k:return this.scanOperator(s,w.StringWrapper.fromCharCode(i));case e.$QUESTION:return this.scanComplexOperator(s,"?",e.$PERIOD,".");case e.$LT:case e.$GT:return this.scanComplexOperator(s,w.StringWrapper.fromCharCode(i),e.$EQ,"=");case e.$BANG:case e.$EQ:return this.scanComplexOperator(s,w.StringWrapper.fromCharCode(i),e.$EQ,"=",e.$EQ,"=");case e.$AMPERSAND:return this.scanComplexOperator(s,"&",e.$AMPERSAND,"&");case e.$BAR:return this.scanComplexOperator(s,"|",e.$BAR,"|");case X:for(;c(this.peek);)this.advance();return this.scanToken()}return this.error("Unexpected character ["+w.StringWrapper.fromCharCode(i)+"]",0),null},t.prototype.scanCharacter=function(t,e){return this.advance(),r(t,e)},t.prototype.scanOperator=function(t,e){return this.advance(),s(t,e)},t.prototype.scanComplexOperator=function(t,e,n,r,i,o){this.advance();var a=e;return this.peek==n&&(this.advance(),a+=r),w.isPresent(i)&&this.peek==i&&(this.advance(),a+=o),s(t,a)},t.prototype.scanIdentifier=function(){var t=this.index;for(this.advance();h(this.peek);)this.advance();var e=this.input.substring(t,this.index);return E.SetWrapper.has(z,e)?o(t,e):i(t,e)},t.prototype.scanNumber=function(t){var n=this.index===t;for(this.advance();;){if(f(this.peek));else if(this.peek==e.$PERIOD)n=!1;else{if(!d(this.peek))break;this.advance(),v(this.peek)&&this.advance(),f(this.peek)||this.error("Invalid exponent",-1),n=!1}this.advance()}var r=this.input.substring(t,this.index),i=n?w.NumberWrapper.parseIntAutoRadix(r):w.NumberWrapper.parseFloat(r);return u(t,i)},t.prototype.scanString=function(){var t=this.index,n=this.peek;this.advance();for(var r,i=this.index,o=this.input;this.peek!=n;)if(this.peek==e.$BACKSLASH){null==r&&(r=new w.StringJoiner),r.add(o.substring(i,this.index)),this.advance();var s;if(this.peek==U){var u=o.substring(this.index+1,this.index+5);try{s=w.NumberWrapper.parseInt(u,16)}catch(c){this.error("Invalid unicode escape [\\u"+u+"]",0)}for(var p=0;5>p;p++)this.advance()}else s=m(this.peek),this.advance();r.add(w.StringWrapper.fromCharCode(s)),i=this.index}else this.peek==e.$EOF?this.error("Unterminated quote",0):this.advance();var l=o.substring(i,this.index);this.advance();var h=l;return null!=r&&(r.add(l),h=r.toString()),a(t,h)},t.prototype.error=function(t,e){var n=this.index+e;throw new q("Lexer Error: "+t+" at column "+n+" in expression ["+this.input+"]")},t}();e.isIdentifier=l,e.isQuote=y;var z=(E.SetWrapper.createFromList(["+","-","*","/","%","^","=","==","!=","===","!==","<",">","<=",">=","&&","||","&","|","!","?","#","?."]),E.SetWrapper.createFromList(["var","null","undefined","true","false","if","else"]))},function(t,e,n){"use strict";function r(t,e,n){return u.isBlank(t)&&(t=d.getHtmlTagDefinition(e).implicitNamespacePrefix,u.isBlank(t)&&u.isPresent(n)&&(t=d.getNsPrefix(n.name))),d.mergeNsAndName(t,e)}function i(t,e){return t.length>0&&t[t.length-1]===e}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},s=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},u=n(5),c=n(15),p=n(145),l=n(6),h=n(146),f=n(147),d=n(148),v=function(t){function e(e,n,r){t.call(this,n,r),this.elementName=e}return o(e,t),e.create=function(t,n,r){return new e(t,n,r)},e}(f.ParseError);e.HtmlTreeError=v;var y=function(){function t(t,e){this.rootNodes=t,this.errors=e}return t}();e.HtmlParseTreeResult=y;var m=function(){function t(){}return t.prototype.parse=function(t,e,n){void 0===n&&(n=!1);var r=h.tokenizeHtml(t,e,n),i=new g(r.tokens).build();return new y(i.rootNodes,r.errors.concat(i.errors))},t=s([l.Injectable(),a("design:paramtypes",[])],t)}();e.HtmlParser=m;var g=function(){function t(t){this.tokens=t,this.index=-1,this.rootNodes=[],this.errors=[],this.elementStack=[],this._advance()}return t.prototype.build=function(){for(;this.peek.type!==h.HtmlTokenType.EOF;)this.peek.type===h.HtmlTokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this.peek.type===h.HtmlTokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this.peek.type===h.HtmlTokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this.peek.type===h.HtmlTokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this.peek.type===h.HtmlTokenType.TEXT||this.peek.type===h.HtmlTokenType.RAW_TEXT||this.peek.type===h.HtmlTokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this.peek.type===h.HtmlTokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._advance();return new y(this.rootNodes,this.errors)},t.prototype._advance=function(){var t=this.peek;return this.index0)return this.errors=this.errors.concat(o.errors),null;var s=new f.ParseSourceSpan(e.sourceSpan.start,i.sourceSpan.end),a=new f.ParseSourceSpan(n.sourceSpan.start,i.sourceSpan.end);return new p.HtmlExpansionCaseAst(e.parts[0],o.rootNodes,s,e.sourceSpan,a)},t.prototype._collectExpansionExpTokens=function(t){for(var e=[],n=[h.HtmlTokenType.EXPANSION_CASE_EXP_START];;){if((this.peek.type===h.HtmlTokenType.EXPANSION_FORM_START||this.peek.type===h.HtmlTokenType.EXPANSION_CASE_EXP_START)&&n.push(this.peek.type),this.peek.type===h.HtmlTokenType.EXPANSION_CASE_EXP_END){if(!i(n,h.HtmlTokenType.EXPANSION_CASE_EXP_START))return this.errors.push(v.create(null,t.sourceSpan,"Invalid expansion form. Missing '}'.")),null;if(n.pop(),0==n.length)return e}if(this.peek.type===h.HtmlTokenType.EXPANSION_FORM_END){if(!i(n,h.HtmlTokenType.EXPANSION_FORM_START))return this.errors.push(v.create(null,t.sourceSpan,"Invalid expansion form. Missing '}'.")),null;n.pop()}if(this.peek.type===h.HtmlTokenType.EOF)return this.errors.push(v.create(null,t.sourceSpan,"Invalid expansion form. Missing '}'.")),null;e.push(this._advance())}},t.prototype._consumeText=function(t){var e=t.parts[0];if(e.length>0&&"\n"==e[0]){var n=this._getParentElement();u.isPresent(n)&&0==n.children.length&&d.getHtmlTagDefinition(n.name).ignoreFirstLf&&(e=e.substring(1))}e.length>0&&this._addToParent(new p.HtmlTextAst(e,t.sourceSpan))},t.prototype._closeVoidElement=function(){if(this.elementStack.length>0){var t=c.ListWrapper.last(this.elementStack);d.getHtmlTagDefinition(t.name).isVoid&&this.elementStack.pop()}},t.prototype._consumeStartTag=function(t){for(var e=t.parts[0],n=t.parts[1],i=[];this.peek.type===h.HtmlTokenType.ATTR_NAME;)i.push(this._consumeAttr(this._advance()));var o=r(e,n,this._getParentElement()),s=!1;this.peek.type===h.HtmlTokenType.TAG_OPEN_END_VOID?(this._advance(),s=!0,null!=d.getNsPrefix(o)||d.getHtmlTagDefinition(o).isVoid||this.errors.push(v.create(o,t.sourceSpan,'Only void and foreign elements can be self closed "'+t.parts[1]+'"'))):this.peek.type===h.HtmlTokenType.TAG_OPEN_END&&(this._advance(),s=!1);var a=this.peek.sourceSpan.start,u=new f.ParseSourceSpan(t.sourceSpan.start,a),c=new p.HtmlElementAst(o,i,[],u,u,null);this._pushElement(c),s&&(this._popElement(o),c.endSourceSpan=u)},t.prototype._pushElement=function(t){if(this.elementStack.length>0){var e=c.ListWrapper.last(this.elementStack);d.getHtmlTagDefinition(e.name).isClosedByChild(t.name)&&this.elementStack.pop()}var n=d.getHtmlTagDefinition(t.name),e=this._getParentElement();if(n.requireExtraParent(u.isPresent(e)?e.name:null)){var r=new p.HtmlElementAst(n.parentToAdd,[],[t],t.sourceSpan,t.startSourceSpan,t.endSourceSpan);this._addToParent(r),this.elementStack.push(r),this.elementStack.push(t)}else this._addToParent(t),this.elementStack.push(t)},t.prototype._consumeEndTag=function(t){var e=r(t.parts[0],t.parts[1],this._getParentElement());this._getParentElement().endSourceSpan=t.sourceSpan,d.getHtmlTagDefinition(e).isVoid?this.errors.push(v.create(e,t.sourceSpan,'Void elements do not have end tags "'+t.parts[1]+'"')):this._popElement(e)||this.errors.push(v.create(e,t.sourceSpan,'Unexpected closing tag "'+t.parts[1]+'"'))},t.prototype._popElement=function(t){for(var e=this.elementStack.length-1;e>=0;e--){var n=this.elementStack[e];if(n.name==t)return c.ListWrapper.splice(this.elementStack,e,this.elementStack.length-e),!0;if(!d.getHtmlTagDefinition(n.name).closedByParent)return!1}return!1},t.prototype._consumeAttr=function(t){var e=d.mergeNsAndName(t.parts[0],t.parts[1]),n=t.sourceSpan.end,r="";if(this.peek.type===h.HtmlTokenType.ATTR_VALUE){var i=this._advance();r=i.parts[0],n=i.sourceSpan.end}return new p.HtmlAttrAst(e,r,new f.ParseSourceSpan(t.sourceSpan.start,n))},t.prototype._getParentElement=function(){return this.elementStack.length>0?c.ListWrapper.last(this.elementStack):null},t.prototype._addToParent=function(t){var e=this._getParentElement();u.isPresent(e)?e.children.push(t):this.rootNodes.push(t)},t}()},function(t,e,n){"use strict";function r(t,e,n){void 0===n&&(n=null);var r=[];return e.forEach(function(e){var o=e.visit(t,n);i.isPresent(o)&&r.push(o)}),r}var i=n(5),o=function(){function t(t,e){this.value=t,this.sourceSpan=e}return t.prototype.visit=function(t,e){return t.visitText(this,e)},t}();e.HtmlTextAst=o;var s=function(){function t(t,e,n,r,i){this.switchValue=t,this.type=e,this.cases=n,this.sourceSpan=r,this.switchValueSourceSpan=i}return t.prototype.visit=function(t,e){return t.visitExpansion(this,e)},t}();e.HtmlExpansionAst=s;var a=function(){function t(t,e,n,r,i){this.value=t,this.expression=e,this.sourceSpan=n,this.valueSourceSpan=r,this.expSourceSpan=i}return t.prototype.visit=function(t,e){return t.visitExpansionCase(this,e)},t}();e.HtmlExpansionCaseAst=a;var u=function(){function t(t,e,n){this.name=t,this.value=e,this.sourceSpan=n}return t.prototype.visit=function(t,e){return t.visitAttr(this,e)},t}();e.HtmlAttrAst=u;var c=function(){function t(t,e,n,r,i,o){this.name=t,this.attrs=e,this.children=n,this.sourceSpan=r,this.startSourceSpan=i,this.endSourceSpan=o}return t.prototype.visit=function(t,e){return t.visitElement(this,e)},t}();e.HtmlElementAst=c;var p=function(){function t(t,e){this.value=t,this.sourceSpan=e}return t.prototype.visit=function(t,e){return t.visitComment(this,e)},t}();e.HtmlCommentAst=p,e.htmlVisitAll=r},function(t,e,n){"use strict";function r(t,e,n){return void 0===n&&(n=!1),new ut(new P.ParseSourceFile(t,e),n).tokenize()}function i(t){var e=t===O?"EOF":_.StringWrapper.fromCharCode(t);return'Unexpected character "'+e+'"'}function o(t){return'Unknown entity "'+t+'" - use the "&#;" or "&#x;" syntax'}function s(t){return!a(t)||t===O}function a(t){return t>=T&&I>=t||t===ot}function u(t){return a(t)||t===q||t===L||t===V||t===k||t===X}function c(t){return(et>t||t>rt)&&(J>t||t>tt)&&(B>t||t>U)}function p(t){return t==F||t==O||!d(t)}function l(t){return t==F||t==O||!f(t)}function h(t,e){return t===K&&e!=K}function f(t){return t>=et&&rt>=t||t>=J&&tt>=t}function d(t){return t>=et&&nt>=t||t>=J&&Z>=t||t>=B&&U>=t}function v(t,e){return y(t)==y(e)}function y(t){return t>=et&&rt>=t?t-et+J:t}function m(t){for(var e,n=[],r=0;r=this.length)throw this._createError(i(O),this._getSpan());this.peek===x?(this.line++,this.column=0):this.peek!==x&&this.peek!==A&&this.column++,this.index++,this.peek=this.index>=this.length?O:_.StringWrapper.charCodeAt(this.input,this.index),this.nextPeek=this.index+1>=this.length?O:_.StringWrapper.charCodeAt(this.input,this.index+1)},t.prototype._attemptCharCode=function(t){return this.peek===t?(this._advance(),!0):!1},t.prototype._attemptCharCodeCaseInsensitive=function(t){return v(this.peek,t)?(this._advance(),!0):!1},t.prototype._requireCharCode=function(t){var e=this._getLocation();if(!this._attemptCharCode(t))throw this._createError(i(this.peek),this._getSpan(e,e))},t.prototype._attemptStr=function(t){for(var e=0;er.offset&&o.push(this.input.substring(r.offset,this.index));this.peek!==e;)o.push(this._readChar(t))}return this._endToken([this._processCarriageReturns(o.join(""))],r)},t.prototype._consumeComment=function(t){var e=this;this._beginToken(w.COMMENT_START,t),this._requireCharCode(j),this._endToken([]);var n=this._consumeRawText(!1,j,function(){return e._attemptStr("->")});this._beginToken(w.COMMENT_END,n.sourceSpan.end),this._endToken([])},t.prototype._consumeCdata=function(t){var e=this;this._beginToken(w.CDATA_START,t),this._requireStr("CDATA["),this._endToken([]);var n=this._consumeRawText(!1,z,function(){return e._attemptStr("]>")});this._beginToken(w.CDATA_END,n.sourceSpan.end),this._endToken([])},t.prototype._consumeDocType=function(t){this._beginToken(w.DOC_TYPE,t),this._attemptUntilChar(q),this._advance(),this._endToken([this.input.substring(t.offset+2,this.index-1)])},t.prototype._consumePrefixAndName=function(){for(var t=this.index,e=null;this.peek!==W&&!c(this.peek);)this._advance();var n;this.peek===W?(this._advance(),e=this.input.substring(t,this.index-1),n=this.index):n=t,this._requireCharCodeUntilFn(u,this.index===n?1:0);var r=this.input.substring(n,this.index);return[e,r]},t.prototype._consumeTagOpen=function(t){var e,n=this._savePosition();try{if(!f(this.peek))throw this._createError(i(this.peek),this._getSpan());var r=this.index;for(this._consumeTagOpenStart(t),e=this.input.substring(r,this.index).toLowerCase(),this._attemptCharCodeUntilFn(s);this.peek!==L&&this.peek!==q;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(s),this._attemptCharCode(X)&&(this._attemptCharCodeUntilFn(s),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(s);this._consumeTagOpenEnd()}catch(o){if(o instanceof at)return this._restorePosition(n),this._beginToken(w.TEXT,t),void this._endToken(["<"]);throw o}var a=E.getHtmlTagDefinition(e).contentType;a===E.HtmlTagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(e,!1):a===E.HtmlTagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(e,!0)},t.prototype._consumeRawTextWithTagClose=function(t,e){var n=this,r=this._consumeRawText(e,H,function(){return n._attemptCharCode(L)?(n._attemptCharCodeUntilFn(s),n._attemptStrCaseInsensitive(t)?(n._attemptCharCodeUntilFn(s),n._attemptCharCode(q)?!0:!1):!1):!1});this._beginToken(w.TAG_CLOSE,r.sourceSpan.end),this._endToken([null,t])},t.prototype._consumeTagOpenStart=function(t){this._beginToken(w.TAG_OPEN_START,t);var e=this._consumePrefixAndName();this._endToken(e)},t.prototype._consumeAttributeName=function(){this._beginToken(w.ATTR_NAME);var t=this._consumePrefixAndName();this._endToken(t)},t.prototype._consumeAttributeValue=function(){this._beginToken(w.ATTR_VALUE);var t;if(this.peek===V||this.peek===k){var e=this.peek;this._advance();for(var n=[];this.peek!==e;)n.push(this._readChar(!0));t=n.join(""),this._advance()}else{var r=this.index;this._requireCharCodeUntilFn(u,1),t=this.input.substring(r,this.index)}this._endToken([this._processCarriageReturns(t)])},t.prototype._consumeTagOpenEnd=function(){var t=this._attemptCharCode(L)?w.TAG_OPEN_END_VOID:w.TAG_OPEN_END;this._beginToken(t),this._requireCharCode(q),this._endToken([])},t.prototype._consumeTagClose=function(t){this._beginToken(w.TAG_CLOSE,t),this._attemptCharCodeUntilFn(s);var e;e=this._consumePrefixAndName(),this._attemptCharCodeUntilFn(s),this._requireCharCode(q),this._endToken(e)},t.prototype._consumeExpansionFormStart=function(){this._beginToken(w.EXPANSION_FORM_START,this._getLocation()),this._requireCharCode(K),this._endToken([]),this._beginToken(w.RAW_TEXT,this._getLocation());var t=this._readUntil(Q);this._endToken([t],this._getLocation()),this._requireCharCode(Q),this._attemptCharCodeUntilFn(s),this._beginToken(w.RAW_TEXT,this._getLocation());var e=this._readUntil(Q);this._endToken([e],this._getLocation()),this._requireCharCode(Q),this._attemptCharCodeUntilFn(s),this.expansionCaseStack.push(w.EXPANSION_FORM_START)},t.prototype._consumeExpansionCaseStart=function(){this._requireCharCode(X),this._beginToken(w.EXPANSION_CASE_VALUE,this._getLocation());var t=this._readUntil(K).trim();this._endToken([t],this._getLocation()),this._attemptCharCodeUntilFn(s),this._beginToken(w.EXPANSION_CASE_EXP_START,this._getLocation()),this._requireCharCode(K),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(s),this.expansionCaseStack.push(w.EXPANSION_CASE_EXP_START)},t.prototype._consumeExpansionCaseEnd=function(){this._beginToken(w.EXPANSION_CASE_EXP_END,this._getLocation()),this._requireCharCode($),this._endToken([],this._getLocation()),this._attemptCharCodeUntilFn(s),this.expansionCaseStack.pop()},t.prototype._consumeExpansionFormEnd=function(){this._beginToken(w.EXPANSION_FORM_END,this._getLocation()),this._requireCharCode($),this._endToken([]),this.expansionCaseStack.pop()},t.prototype._consumeText=function(){var t=this._getLocation();this._beginToken(w.TEXT,t);var e=[],n=!1;for(this.peek===K&&this.nextPeek===K?(e.push(this._readChar(!0)),e.push(this._readChar(!0)),n=!0):e.push(this._readChar(!0));!this.isTextEnd(n);)this.peek===K&&this.nextPeek===K?(e.push(this._readChar(!0)),e.push(this._readChar(!0)),n=!0):this.peek===$&&this.nextPeek===$&&n?(e.push(this._readChar(!0)),e.push(this._readChar(!0)),n=!1):e.push(this._readChar(!0));this._endToken([this._processCarriageReturns(e.join(""))])},t.prototype.isTextEnd=function(t){if(this.peek===H||this.peek===O)return!0;if(this.tokenizeExpansionForms){if(h(this.peek,this.nextPeek))return!0;if(this.peek===$&&!t&&(this.isInExpansionCase()||this.isInExpansionForm()))return!0}return!1},t.prototype._savePosition=function(){return[this.peek,this.index,this.column,this.line,this.tokens.length]},t.prototype._readUntil=function(t){var e=this.index;return this._attemptUntilChar(t),this.input.substring(e,this.index)},t.prototype._restorePosition=function(t){this.peek=t[0],this.index=t[1],this.column=t[2],this.line=t[3];var e=t[4];e0&&this.expansionCaseStack[this.expansionCaseStack.length-1]===w.EXPANSION_CASE_EXP_START},t.prototype.isInExpansionForm=function(){return this.expansionCaseStack.length>0&&this.expansionCaseStack[this.expansionCaseStack.length-1]===w.EXPANSION_FORM_START},t}()},function(t,e){"use strict";var n=function(){function t(t,e,n,r){this.file=t,this.offset=e,this.line=n,this.col=r}return t.prototype.toString=function(){return this.file.url+"@"+this.line+":"+this.col},t}();e.ParseLocation=n;var r=function(){function t(t,e){this.content=t,this.url=e}return t}();e.ParseSourceFile=r;var i=function(){function t(t,e){this.start=t,this.end=e}return t.prototype.toString=function(){return this.start.file.content.substring(this.start.offset,this.end.offset)},t}();e.ParseSourceSpan=i;var o=function(){function t(t,e){this.span=t,this.msg=e}return t.prototype.toString=function(){var t=this.span.start.file.content,e=this.span.start.offset;e>t.length-1&&(e=t.length-1);for(var n=e,r=0,i=0;100>r&&e>0&&(e--,r++,"\n"!=t[e]||3!=++i););for(r=0,i=0;100>r&&n]"+t.substring(this.span.start.offset,n+1);return this.msg+' ("'+o+'"): '+this.span.start},t}();e.ParseError=o},function(t,e,n){"use strict";function r(t){var e=p[t.toLowerCase()];return a.isPresent(e)?e:l}function i(t){if("@"!=t[0])return[null,t];var e=a.RegExpWrapper.firstMatch(h,t);return[e[1],e[2]]}function o(t){return i(t)[0]}function s(t,e){return a.isPresent(t)?"@"+t+":"+e:e}var a=n(5);e.NAMED_ENTITIES=a.CONST_EXPR({Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",alefsym:"ℵ",Alpha:"Α",alpha:"α",amp:"&",and:"∧",ang:"∠",apos:"'",Aring:"Å",aring:"å",asymp:"≈",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",bdquo:"„",Beta:"Β",beta:"β",brvbar:"¦",bull:"•",cap:"∩",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",Chi:"Χ",chi:"χ",circ:"ˆ",clubs:"♣",cong:"≅",copy:"©",crarr:"↵",cup:"∪",curren:"¤",dagger:"†",Dagger:"‡",darr:"↓",dArr:"⇓",deg:"°",Delta:"Δ",delta:"δ",diams:"♦",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",empty:"∅",emsp:" ",ensp:" ",Epsilon:"Ε",epsilon:"ε",equiv:"≡",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",exist:"∃",fnof:"ƒ",forall:"∀",frac12:"½",frac14:"¼",frac34:"¾",frasl:"⁄",Gamma:"Γ",gamma:"γ",ge:"≥",gt:">",harr:"↔",hArr:"⇔",hearts:"♥",hellip:"…",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",image:"ℑ",infin:"∞","int":"∫",Iota:"Ι",iota:"ι",iquest:"¿",isin:"∈",Iuml:"Ï",iuml:"ï",Kappa:"Κ",kappa:"κ",Lambda:"Λ",lambda:"λ",lang:"⟨",laquo:"«",larr:"←",lArr:"⇐",lceil:"⌈",ldquo:"“",le:"≤",lfloor:"⌊",lowast:"∗",loz:"◊",lrm:"‎",lsaquo:"‹",lsquo:"‘",lt:"<",macr:"¯",mdash:"—",micro:"µ",middot:"·",minus:"−",Mu:"Μ",mu:"μ",nabla:"∇",nbsp:" ",ndash:"–",ne:"≠",ni:"∋",not:"¬",notin:"∉",nsub:"⊄",Ntilde:"Ñ",ntilde:"ñ",Nu:"Ν",nu:"ν",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",OElig:"Œ",oelig:"œ",Ograve:"Ò",ograve:"ò",oline:"‾",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",oplus:"⊕",or:"∨",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",otimes:"⊗",Ouml:"Ö",ouml:"ö",para:"¶",permil:"‰",perp:"⊥",Phi:"Φ",phi:"φ",Pi:"Π",pi:"π",piv:"ϖ",plusmn:"±",pound:"£",prime:"′",Prime:"″",prod:"∏",prop:"∝",Psi:"Ψ",psi:"ψ",quot:'"',radic:"√",rang:"⟩",raquo:"»",rarr:"→",rArr:"⇒",rceil:"⌉",rdquo:"”",real:"ℜ",reg:"®",rfloor:"⌋",Rho:"Ρ",rho:"ρ",rlm:"‏",rsaquo:"›",rsquo:"’",sbquo:"‚",Scaron:"Š",scaron:"š",sdot:"⋅",sect:"§",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sim:"∼",spades:"♠",sub:"⊂",sube:"⊆",sum:"∑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supe:"⊇",szlig:"ß",Tau:"Τ",tau:"τ",there4:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thinsp:" ",THORN:"Þ",thorn:"þ",tilde:"˜",times:"×",trade:"™",Uacute:"Ú",uacute:"ú",uarr:"↑",uArr:"⇑",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",Uuml:"Ü",uuml:"ü",weierp:"℘",Xi:"Ξ",xi:"ξ",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ",Yuml:"Ÿ",Zeta:"Ζ",zeta:"ζ",zwj:"‍",zwnj:"‌"}),function(t){t[t.RAW_TEXT=0]="RAW_TEXT",t[t.ESCAPABLE_RAW_TEXT=1]="ESCAPABLE_RAW_TEXT",t[t.PARSABLE_DATA=2]="PARSABLE_DATA"}(e.HtmlTagContentType||(e.HtmlTagContentType={}));var u=e.HtmlTagContentType,c=function(){function t(t){var e=this,n=void 0===t?{}:t,r=n.closedByChildren,i=n.requiredParents,o=n.implicitNamespacePrefix,s=n.contentType,c=n.closedByParent,p=n.isVoid,l=n.ignoreFirstLf;this.closedByChildren={},this.closedByParent=!1,a.isPresent(r)&&r.length>0&&r.forEach(function(t){return e.closedByChildren[t]=!0}),this.isVoid=a.normalizeBool(p),this.closedByParent=a.normalizeBool(c)||this.isVoid,a.isPresent(i)&&i.length>0&&(this.requiredParents={},this.parentToAdd=i[0],i.forEach(function(t){return e.requiredParents[t]=!0})),this.implicitNamespacePrefix=o,this.contentType=a.isPresent(s)?s:u.PARSABLE_DATA,this.ignoreFirstLf=a.normalizeBool(l)}return t.prototype.requireExtraParent=function(t){if(a.isBlank(this.requiredParents))return!1;if(a.isBlank(t))return!0;var e=t.toLowerCase();return 1!=this.requiredParents[e]&&"template"!=e},t.prototype.isClosedByChild=function(t){return this.isVoid||a.normalizeBool(this.closedByChildren[t.toLowerCase()])},t}();e.HtmlTagDefinition=c;var p={base:new c({isVoid:!0}),meta:new c({isVoid:!0}),area:new c({isVoid:!0}),embed:new c({isVoid:!0}),link:new c({isVoid:!0}),img:new c({isVoid:!0}),input:new c({isVoid:!0}),param:new c({isVoid:!0}),hr:new c({isVoid:!0}),br:new c({isVoid:!0}),source:new c({isVoid:!0}),track:new c({isVoid:!0}),wbr:new c({isVoid:!0}),p:new c({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new c({closedByChildren:["tbody","tfoot"]}),tbody:new c({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new c({closedByChildren:["tbody"],closedByParent:!0}),tr:new c({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new c({closedByChildren:["td","th"],closedByParent:!0}),th:new c({closedByChildren:["td","th"],closedByParent:!0}),col:new c({requiredParents:["colgroup"],isVoid:!0}),svg:new c({implicitNamespacePrefix:"svg"}),math:new c({implicitNamespacePrefix:"math"}),li:new c({closedByChildren:["li"],closedByParent:!0}),dt:new c({closedByChildren:["dt","dd"]}),dd:new c({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new c({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new c({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new c({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new c({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new c({closedByChildren:["optgroup"],closedByParent:!0}),option:new c({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new c({ignoreFirstLf:!0}),listing:new c({ignoreFirstLf:!0}),style:new c({contentType:u.RAW_TEXT}),script:new c({contentType:u.RAW_TEXT}),title:new c({contentType:u.ESCAPABLE_RAW_TEXT}),textarea:new c({contentType:u.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},l=new c;e.getHtmlTagDefinition=r;var h=/^@([^:]+):(.+)/g;e.splitNsName=i,e.getNsPrefix=o,e.mergeNsAndName=s},function(t,e,n){"use strict";var r=n(15),i=n(5),o=n(12),s="",a=i.RegExpWrapper.create("(\\:not\\()|([-\\w]+)|(?:\\.([-\\w]+))|(?:\\[([-\\w*]+)(?:=([^\\]]*))?\\])|(\\))|(\\s*,\\s*)"),u=function(){function t(){this.element=null,this.classNames=[],this.attrs=[],this.notSelectors=[]}return t.parse=function(e){for(var n,s=[],u=function(t,e){e.notSelectors.length>0&&i.isBlank(e.element)&&r.ListWrapper.isEmpty(e.classNames)&&r.ListWrapper.isEmpty(e.attrs)&&(e.element="*"),t.push(e)},c=new t,p=i.RegExpWrapper.matcher(a,e),l=c,h=!1;i.isPresent(n=i.RegExpMatcherWrapper.next(p));){if(i.isPresent(n[1])){if(h)throw new o.BaseException("Nesting :not is not allowed in a selector");h=!0,l=new t,c.notSelectors.push(l)}if(i.isPresent(n[2])&&l.setElement(n[2]),i.isPresent(n[3])&&l.addClassName(n[3]),i.isPresent(n[4])&&l.addAttribute(n[4],n[5]),i.isPresent(n[6])&&(h=!1,l=c),i.isPresent(n[7])){if(h)throw new o.BaseException("Multiple selectors in :not are not supported");u(s,c),c=l=new t}}return u(s,c),s},t.prototype.isElementSelector=function(){return i.isPresent(this.element)&&r.ListWrapper.isEmpty(this.classNames)&&r.ListWrapper.isEmpty(this.attrs)&&0===this.notSelectors.length},t.prototype.setElement=function(t){void 0===t&&(t=null),this.element=t},t.prototype.getMatchingElementTemplate=function(){for(var t=i.isPresent(this.element)?this.element:"div",e=this.classNames.length>0?' class="'+this.classNames.join(" ")+'"':"",n="",r=0;r"},t.prototype.addAttribute=function(t,e){void 0===e&&(e=s),this.attrs.push(t),e=i.isPresent(e)?e.toLowerCase():s,this.attrs.push(e)},t.prototype.addClassName=function(t){this.classNames.push(t.toLowerCase())},t.prototype.toString=function(){var t="";if(i.isPresent(this.element)&&(t+=this.element),i.isPresent(this.classNames))for(var e=0;e0&&(t+="="+r),t+="]"}return this.notSelectors.forEach(function(e){return t+=":not("+e+")"}),t},t}();e.CssSelector=u;var c=function(){function t(){this._elementMap=new r.Map,this._elementPartialMap=new r.Map,this._classMap=new r.Map,this._classPartialMap=new r.Map,this._attrValueMap=new r.Map,this._attrValuePartialMap=new r.Map,this._listContexts=[]}return t.createNotMatcher=function(e){var n=new t;return n.addSelectables(e,null),n},t.prototype.addSelectables=function(t,e){var n=null;t.length>1&&(n=new p(t),this._listContexts.push(n));for(var r=0;r0&&(i.isBlank(this.listContext)||!this.listContext.alreadyMatched)){var r=c.createNotMatcher(this.notSelectors);n=!r.match(t,null)}return n&&i.isPresent(e)&&(i.isBlank(this.listContext)||!this.listContext.alreadyMatched)&&(i.isPresent(this.listContext)&&(this.listContext.alreadyMatched=!0),e(this.selector,this.cbContext)),n},t}();e.SelectorContext=l},function(t,e){"use strict";var n=function(){function t(){}return t.prototype.hasProperty=function(t,e){return!0},t.prototype.getMappedPropName=function(t){return t},t}();e.ElementSchemaRegistry=n},function(t,e,n){"use strict";function r(t){var e=null,n=null,r=null,o=!1,_=null;t.attrs.forEach(function(t){var i=t.name.toLowerCase();i==a?e=t.value:i==l?n=t.value:i==p?r=t.value:t.name==v?o=!0:t.name==y&&t.value.length>0&&(_=t.value)}),e=i(e);var b=t.name.toLowerCase(),P=m.OTHER;return s.splitNsName(b)[1]==u?P=m.NG_CONTENT:b==f?P=m.STYLE:b==d?P=m.SCRIPT:b==c&&r==h&&(P=m.STYLESHEET),new g(P,e,n,o,_)}function i(t){return o.isBlank(t)||0===t.length?"*":t}var o=n(5),s=n(148),a="select",u="ng-content",c="link",p="rel",l="href",h="stylesheet",f="style",d="script",v="ngNonBindable",y="ngProjectAs";e.preparseElement=r,function(t){t[t.NG_CONTENT=0]="NG_CONTENT",t[t.STYLE=1]="STYLE",t[t.STYLESHEET=2]="STYLESHEET",t[t.SCRIPT=3]="SCRIPT",t[t.OTHER=4]="OTHER"}(e.PreparsedElementType||(e.PreparsedElementType={}));var m=e.PreparsedElementType,g=function(){function t(t,e,n,r,i){this.type=t,this.selectAttr=e,this.hrefAttr=n,this.nonBindable=r,this.projectAs=i}return t}();e.PreparsedElement=g},function(t,e,n){"use strict";function r(t){if(o.isBlank(t)||0===t.length||"/"==t[0])return!1;var e=o.RegExpWrapper.firstMatch(u,t);return o.isBlank(e)||"package"==e[1]||"asset"==e[1]}function i(t,e,n){var i=[],u=o.StringWrapper.replaceAllMapped(n,a,function(n){var s=o.isPresent(n[1])?n[1]:n[2];return r(s)?(i.push(t.resolve(e,s)),""):n[0]});return new s(u,i)}var o=n(5),s=function(){function t(t,e){this.style=t,this.styleUrls=e}return t}();e.StyleWithImports=s,e.isStyleUrlResolvable=r,e.extractStyleUrls=i;var a=/@import\s+(?:url\()?\s*(?:(?:['"]([^'"]*))|([^;\)\s]*))[^;]*;?/g,u=/^([a-zA-Z\-\+\.]+):/g},function(t,e,n){"use strict";function r(t){return a.StringWrapper.replaceAllMapped(t,u,function(t){return"-"+t[1].toLowerCase()})}function i(t){return a.StringWrapper.replaceAllMapped(t,c,function(t){return t[1].toUpperCase()})}function o(t,e){var n=a.StringWrapper.split(t.trim(),/\s*:\s*/g);return n.length>1?n:e}function s(t){return a.StringWrapper.replaceAll(t,/\W/g,"_")}var a=n(5);e.MODULE_SUFFIX=a.IS_DART?".dart":"";var u=/([A-Z])/g,c=/-([a-z])/g;e.camelCaseToDashCase=r,e.dashCaseToCamelCase=i,e.splitAtColon=o,e.sanitizeIdentifier=s},function(t,e,n){"use strict";function r(t,e){var n=e.useExisting,r=e.useValue,i=e.deps;return new v.CompileProviderMetadata({token:t.token,useClass:t.useClass,useExisting:n,useFactory:t.useFactory,useValue:r,deps:i,multi:t.multi})}function i(t,e){var n=e.eager,r=e.providers;return new d.ProviderAst(t.token,t.multiProvider,t.eager||n,r,t.providerType,t.sourceSpan)}function o(t,e,n,r){return void 0===r&&(r=null),h.isBlank(r)&&(r=[]),h.isPresent(t)&&t.forEach(function(t){if(h.isArray(t))o(t,e,n,r);else{var i;t instanceof v.CompileProviderMetadata?i=t:t instanceof v.CompileTypeMetadata?i=new v.CompileProviderMetadata({token:new v.CompileTokenMetadata({identifier:t}),useClass:t}):n.push(new g("Unknown provider type "+t,e)),h.isPresent(i)&&r.push(i)}}),r}function s(t,e,n){var r=new v.CompileTokenMap;t.forEach(function(t){var i=new v.CompileProviderMetadata({token:new v.CompileTokenMetadata({identifier:t.type}),useClass:t.type});a([i],t.isComponent?d.ProviderAstType.Component:d.ProviderAstType.Directive,!0,e,n,r)});var i=t.filter(function(t){return t.isComponent}).concat(t.filter(function(t){return!t.isComponent}));return i.forEach(function(t){a(o(t.providers,e,n),d.ProviderAstType.PublicService,!1,e,n,r),a(o(t.viewProviders,e,n),d.ProviderAstType.PrivateService,!1,e,n,r)}),r}function a(t,e,n,r,i,o){t.forEach(function(t){var s=o.get(t.token);h.isPresent(s)&&s.multiProvider!==t.multi&&i.push(new g("Mixing multi and non multi provider is not possible for token "+s.token.name,r)),h.isBlank(s)?(s=new d.ProviderAst(t.token,t.multi,n,[t],e,r),o.add(t.token,s)):(t.multi||f.ListWrapper.clear(s.providers),s.providers.push(t))})}function u(t){var e=new v.CompileTokenMap;return h.isPresent(t.viewQueries)&&t.viewQueries.forEach(function(t){return p(e,t)}),t.type.diDeps.forEach(function(t){h.isPresent(t.viewQuery)&&p(e,t.viewQuery)}),e}function c(t){var e=new v.CompileTokenMap;return t.forEach(function(t){h.isPresent(t.queries)&&t.queries.forEach(function(t){return p(e,t)}),t.type.diDeps.forEach(function(t){h.isPresent(t.query)&&p(e,t.query)})}),e}function p(t,e){e.selectors.forEach(function(n){var r=t.get(n);h.isBlank(r)&&(r=[],t.add(n,r)),r.push(e)})}var l=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},h=n(5),f=n(15),d=n(139),v=n(155),y=n(158),m=n(147),g=function(t){function e(e,n){t.call(this,n,e)}return l(e,t),e}(m.ParseError);e.ProviderError=g;var _=function(){function t(t,e){var n=this;this.component=t,this.sourceSpan=e,this.errors=[],this.viewQueries=u(t),this.viewProviders=new v.CompileTokenMap,o(t.viewProviders,e,this.errors).forEach(function(t){h.isBlank(n.viewProviders.get(t.token))&&n.viewProviders.add(t.token,!0)})}return t}();e.ProviderViewContext=_;var b=function(){function t(t,e,n,r,i,o,a){var u=this;this._viewContext=t,this._parent=e,this._isViewRoot=n,this._directiveAsts=r,this._sourceSpan=a,this._transformedProviders=new v.CompileTokenMap,this._seenProviders=new v.CompileTokenMap,this._hasViewContainer=!1,this._attrs={},i.forEach(function(t){return u._attrs[t.name]=t.value});var p=r.map(function(t){return t.directive});this._allProviders=s(p,a,t.errors),this._contentQueries=c(p);var l=new v.CompileTokenMap;this._allProviders.values().forEach(function(t){u._addQueryReadsTo(t.token,l)}),o.forEach(function(t){var e=new v.CompileTokenMetadata({value:t.name});u._addQueryReadsTo(e,l)}),h.isPresent(l.get(y.identifierToken(y.Identifiers.ViewContainerRef)))&&(this._hasViewContainer=!0),this._allProviders.values().forEach(function(t){var e=t.eager||h.isPresent(l.get(t.token));e&&u._getOrCreateLocalProvider(t.providerType,t.token,!0)})}return t.prototype.afterElement=function(){var t=this;this._allProviders.values().forEach(function(e){t._getOrCreateLocalProvider(e.providerType,e.token,!1)})},Object.defineProperty(t.prototype,"transformProviders",{get:function(){return this._transformedProviders.values()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"transformedDirectiveAsts",{get:function(){var t=this._transformedProviders.values().map(function(t){return t.token.identifier}),e=f.ListWrapper.clone(this._directiveAsts);return f.ListWrapper.sort(e,function(e,n){return t.indexOf(e.directive.type)-t.indexOf(n.directive.type)}),e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"transformedHasViewContainer",{get:function(){return this._hasViewContainer},enumerable:!0,configurable:!0}),t.prototype._addQueryReadsTo=function(t,e){this._getQueriesFor(t).forEach(function(n){var r=h.isPresent(n.read)?n.read:t;h.isBlank(e.get(r))&&e.add(r,!0)})},t.prototype._getQueriesFor=function(t){for(var e,n=[],r=this,i=0;null!==r;)e=r._contentQueries.get(t),h.isPresent(e)&&f.ListWrapper.addAll(n,e.filter(function(t){return t.descendants||1>=i})),r._directiveAsts.length>0&&i++,r=r._parent;return e=this._viewContext.viewQueries.get(t),h.isPresent(e)&&f.ListWrapper.addAll(n,e),n},t.prototype._getOrCreateLocalProvider=function(t,e,n){var o=this,s=this._allProviders.get(e);if(h.isBlank(s)||(t===d.ProviderAstType.Directive||t===d.ProviderAstType.PublicService)&&s.providerType===d.ProviderAstType.PrivateService||(t===d.ProviderAstType.PrivateService||t===d.ProviderAstType.PublicService)&&s.providerType===d.ProviderAstType.Builtin)return null;var a=this._transformedProviders.get(e);if(h.isPresent(a))return a;if(h.isPresent(this._seenProviders.get(e)))return this._viewContext.errors.push(new g("Cannot instantiate cyclic dependency! "+e.name,this._sourceSpan)),null;this._seenProviders.add(e,!0);var u=s.providers.map(function(t){var e,i=t.useValue,a=t.useExisting;if(h.isPresent(t.useExisting)){var u=o._getDependency(s.providerType,new v.CompileDiDependencyMetadata({token:t.useExisting}),n);h.isPresent(u.token)?a=u.token:(a=null,i=u.value)}else if(h.isPresent(t.useFactory)){var c=h.isPresent(t.deps)?t.deps:t.useFactory.diDeps;e=c.map(function(t){return o._getDependency(s.providerType,t,n)})}else if(h.isPresent(t.useClass)){var c=h.isPresent(t.deps)?t.deps:t.useClass.diDeps;e=c.map(function(t){return o._getDependency(s.providerType,t,n)})}return r(t,{useExisting:a,useValue:i,deps:e})});return a=i(s,{eager:n,providers:u}),this._transformedProviders.add(e,a),a},t.prototype._getLocalDependency=function(t,e,n){if(void 0===n&&(n=null),e.isAttribute){var r=this._attrs[e.token.value];return new v.CompileDiDependencyMetadata({isValue:!0,value:h.normalizeBlank(r)})}if(h.isPresent(e.query)||h.isPresent(e.viewQuery))return e;if(h.isPresent(e.token)){if(t===d.ProviderAstType.Directive||t===d.ProviderAstType.Component){if(e.token.equalsTo(y.identifierToken(y.Identifiers.Renderer))||e.token.equalsTo(y.identifierToken(y.Identifiers.ElementRef))||e.token.equalsTo(y.identifierToken(y.Identifiers.ChangeDetectorRef))||e.token.equalsTo(y.identifierToken(y.Identifiers.TemplateRef)))return e;e.token.equalsTo(y.identifierToken(y.Identifiers.ViewContainerRef))&&(this._hasViewContainer=!0)}if(e.token.equalsTo(y.identifierToken(y.Identifiers.Injector)))return e;if(h.isPresent(this._getOrCreateLocalProvider(t,e.token,n)))return e}return null},t.prototype._getDependency=function(t,e,n){void 0===n&&(n=null);var r=this,i=n,o=null;if(e.isSkipSelf||(o=this._getLocalDependency(t,e,n)),e.isSelf)h.isBlank(o)&&e.isOptional&&(o=new v.CompileDiDependencyMetadata({isValue:!0,value:null}));else{for(;h.isBlank(o)&&h.isPresent(r._parent);){var s=r;r=r._parent,s._isViewRoot&&(i=!1),o=r._getLocalDependency(d.ProviderAstType.PublicService,e,i)}h.isBlank(o)&&(o=!e.isHost||this._viewContext.component.type.isHost||y.identifierToken(this._viewContext.component.type).equalsTo(e.token)||h.isPresent(this._viewContext.viewProviders.get(e.token))?e:e.isOptional?o=new v.CompileDiDependencyMetadata({ +isValue:!0,value:null}):null)}return h.isBlank(o)&&this._viewContext.errors.push(new g("No provider for "+e.token.name,this._sourceSpan)),o},t}();e.ProviderElementContext=b},function(t,e,n){"use strict";function r(t){return N[t["class"]](t)}function i(t,e){var n=y.CssSelector.parse(e)[0].getMatchingElementTemplate();return M.create({type:new x({runtime:Object,name:t.name+"_Host",moduleUrl:t.moduleUrl,isHost:!0}),template:new I({template:n,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[]}),changeDetection:d.ChangeDetectionStrategy.Default,inputs:[],outputs:[],host:{},lifecycleHooks:[],isComponent:!0,selector:"*",providers:[],viewProviders:[],queries:[],viewQueries:[]})}function o(t,e){return l.isBlank(t)?null:t.map(function(t){return a(t,e)})}function s(t){return l.isBlank(t)?null:t.map(u)}function a(t,e){return l.isArray(t)?o(t,e):l.isString(t)||l.isBlank(t)||l.isBoolean(t)||l.isNumber(t)?t:e(t)}function u(t){return l.isArray(t)?s(t):l.isString(t)||l.isBlank(t)||l.isBoolean(t)||l.isNumber(t)?t:t.toJson()}function c(t){return l.isPresent(t)?t:[]}var p=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},l=n(5),h=n(12),f=n(15),d=n(28),v=n(36),y=n(149),m=n(153),g=n(156),_=n(157),b=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))$/g,P=function(){function t(){}return Object.defineProperty(t.prototype,"identifier",{get:function(){return h.unimplemented()},enumerable:!0,configurable:!0}),t}();e.CompileMetadataWithIdentifier=P;var E=function(t){function e(){t.apply(this,arguments)}return p(e,t),Object.defineProperty(e.prototype,"type",{get:function(){return h.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"identifier",{get:function(){return h.unimplemented()},enumerable:!0,configurable:!0}),e}(P);e.CompileMetadataWithType=E,e.metadataFromJson=r;var w=function(){function t(t){var e=void 0===t?{}:t,n=e.runtime,r=e.name,i=e.moduleUrl,o=e.prefix,s=e.value;this.runtime=n,this.name=r,this.prefix=o,this.moduleUrl=i,this.value=s}return t.fromJson=function(e){var n=l.isArray(e.value)?o(e.value,r):a(e.value,r);return new t({name:e.name,prefix:e.prefix,moduleUrl:e.moduleUrl,value:n})},t.prototype.toJson=function(){var t=l.isArray(this.value)?s(this.value):u(this.value);return{"class":"Identifier",name:this.name,moduleUrl:this.moduleUrl,prefix:this.prefix,value:t}},Object.defineProperty(t.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),t}();e.CompileIdentifierMetadata=w;var C=function(){function t(t){var e=void 0===t?{}:t,n=e.isAttribute,r=e.isSelf,i=e.isHost,o=e.isSkipSelf,s=e.isOptional,a=e.isValue,u=e.query,c=e.viewQuery,p=e.token,h=e.value;this.isAttribute=l.normalizeBool(n),this.isSelf=l.normalizeBool(r),this.isHost=l.normalizeBool(i),this.isSkipSelf=l.normalizeBool(o),this.isOptional=l.normalizeBool(s),this.isValue=l.normalizeBool(a),this.query=u,this.viewQuery=c,this.token=p,this.value=h}return t.fromJson=function(e){return new t({token:a(e.token,O.fromJson),query:a(e.query,A.fromJson),viewQuery:a(e.viewQuery,A.fromJson),value:e.value,isAttribute:e.isAttribute,isSelf:e.isSelf,isHost:e.isHost,isSkipSelf:e.isSkipSelf,isOptional:e.isOptional,isValue:e.isValue})},t.prototype.toJson=function(){return{token:u(this.token),query:u(this.query),viewQuery:u(this.viewQuery),value:this.value,isAttribute:this.isAttribute,isSelf:this.isSelf,isHost:this.isHost,isSkipSelf:this.isSkipSelf,isOptional:this.isOptional,isValue:this.isValue}},t}();e.CompileDiDependencyMetadata=C;var R=function(){function t(t){var e=t.token,n=t.useClass,r=t.useValue,i=t.useExisting,o=t.useFactory,s=t.deps,a=t.multi;this.token=e,this.useClass=n,this.useValue=r,this.useExisting=i,this.useFactory=o,this.deps=l.normalizeBlank(s),this.multi=l.normalizeBool(a)}return t.fromJson=function(e){return new t({token:a(e.token,O.fromJson),useClass:a(e.useClass,x.fromJson),useExisting:a(e.useExisting,O.fromJson),useValue:a(e.useValue,w.fromJson),useFactory:a(e.useFactory,S.fromJson),multi:e.multi,deps:o(e.deps,C.fromJson)})},t.prototype.toJson=function(){return{"class":"Provider",token:u(this.token),useClass:u(this.useClass),useExisting:u(this.useExisting),useValue:u(this.useValue),useFactory:u(this.useFactory),multi:this.multi,deps:s(this.deps)}},t}();e.CompileProviderMetadata=R;var S=function(){function t(t){var e=t.runtime,n=t.name,r=t.moduleUrl,i=t.prefix,o=t.diDeps,s=t.value;this.runtime=e,this.name=n,this.prefix=i,this.moduleUrl=r,this.diDeps=c(o),this.value=s}return Object.defineProperty(t.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),t.fromJson=function(e){return new t({name:e.name,prefix:e.prefix,moduleUrl:e.moduleUrl,value:e.value,diDeps:o(e.diDeps,C.fromJson)})},t.prototype.toJson=function(){return{"class":"Factory",name:this.name,prefix:this.prefix,moduleUrl:this.moduleUrl,value:this.value,diDeps:s(this.diDeps)}},t}();e.CompileFactoryMetadata=S;var O=function(){function t(t){var e=t.value,n=t.identifier,r=t.identifierIsInstance;this.value=e,this.identifier=n,this.identifierIsInstance=l.normalizeBool(r)}return t.fromJson=function(e){return new t({value:e.value,identifier:a(e.identifier,w.fromJson),identifierIsInstance:e.identifierIsInstance})},t.prototype.toJson=function(){return{value:this.value,identifier:u(this.identifier),identifierIsInstance:this.identifierIsInstance}},Object.defineProperty(t.prototype,"runtimeCacheKey",{get:function(){return l.isPresent(this.identifier)?this.identifier.runtime:this.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"assetCacheKey",{get:function(){return l.isPresent(this.identifier)?l.isPresent(this.identifier.moduleUrl)&&l.isPresent(_.getUrlScheme(this.identifier.moduleUrl))?this.identifier.name+"|"+this.identifier.moduleUrl+"|"+this.identifierIsInstance:null:this.value},enumerable:!0,configurable:!0}),t.prototype.equalsTo=function(t){var e=this.runtimeCacheKey,n=this.assetCacheKey;return l.isPresent(e)&&e==t.runtimeCacheKey||l.isPresent(n)&&n==t.assetCacheKey},Object.defineProperty(t.prototype,"name",{get:function(){return l.isPresent(this.value)?m.sanitizeIdentifier(this.value):this.identifier.name},enumerable:!0,configurable:!0}),t}();e.CompileTokenMetadata=O;var T=function(){function t(){this._valueMap=new Map,this._values=[]}return t.prototype.add=function(t,e){var n=this.get(t);if(l.isPresent(n))throw new h.BaseException("Can only add to a TokenMap! Token: "+t.name);this._values.push(e);var r=t.runtimeCacheKey;l.isPresent(r)&&this._valueMap.set(r,e);var i=t.assetCacheKey;l.isPresent(i)&&this._valueMap.set(i,e)},t.prototype.get=function(t){var e,n=t.runtimeCacheKey,r=t.assetCacheKey;return l.isPresent(n)&&(e=this._valueMap.get(n)),l.isBlank(e)&&l.isPresent(r)&&(e=this._valueMap.get(r)),e},t.prototype.values=function(){return this._values},Object.defineProperty(t.prototype,"size",{get:function(){return this._values.length},enumerable:!0,configurable:!0}),t}();e.CompileTokenMap=T;var x=function(){function t(t){var e=void 0===t?{}:t,n=e.runtime,r=e.name,i=e.moduleUrl,o=e.prefix,s=e.isHost,a=e.value,u=e.diDeps;this.runtime=n,this.name=r,this.moduleUrl=i,this.prefix=o,this.isHost=l.normalizeBool(s),this.value=a,this.diDeps=c(u)}return t.fromJson=function(e){return new t({name:e.name,moduleUrl:e.moduleUrl,prefix:e.prefix,isHost:e.isHost,value:e.value,diDeps:o(e.diDeps,C.fromJson)})},Object.defineProperty(t.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"type",{get:function(){return this},enumerable:!0,configurable:!0}),t.prototype.toJson=function(){return{"class":"Type",name:this.name,moduleUrl:this.moduleUrl,prefix:this.prefix,isHost:this.isHost,value:this.value,diDeps:s(this.diDeps)}},t}();e.CompileTypeMetadata=x;var A=function(){function t(t){var e=void 0===t?{}:t,n=e.selectors,r=e.descendants,i=e.first,o=e.propertyName,s=e.read;this.selectors=n,this.descendants=l.normalizeBool(r),this.first=l.normalizeBool(i),this.propertyName=o,this.read=s}return t.fromJson=function(e){return new t({selectors:o(e.selectors,O.fromJson),descendants:e.descendants,first:e.first,propertyName:e.propertyName,read:a(e.read,O.fromJson)})},t.prototype.toJson=function(){return{selectors:s(this.selectors),descendants:this.descendants,first:this.first,propertyName:this.propertyName,read:u(this.read)}},t}();e.CompileQueryMetadata=A;var I=function(){function t(t){var e=void 0===t?{}:t,n=e.encapsulation,r=e.template,i=e.templateUrl,o=e.styles,s=e.styleUrls,a=e.ngContentSelectors;this.encapsulation=l.isPresent(n)?n:v.ViewEncapsulation.Emulated,this.template=r,this.templateUrl=i,this.styles=l.isPresent(o)?o:[],this.styleUrls=l.isPresent(s)?s:[],this.ngContentSelectors=l.isPresent(a)?a:[]}return t.fromJson=function(e){return new t({encapsulation:l.isPresent(e.encapsulation)?v.VIEW_ENCAPSULATION_VALUES[e.encapsulation]:e.encapsulation,template:e.template,templateUrl:e.templateUrl,styles:e.styles,styleUrls:e.styleUrls,ngContentSelectors:e.ngContentSelectors})},t.prototype.toJson=function(){return{encapsulation:l.isPresent(this.encapsulation)?l.serializeEnum(this.encapsulation):this.encapsulation,template:this.template,templateUrl:this.templateUrl,styles:this.styles,styleUrls:this.styleUrls,ngContentSelectors:this.ngContentSelectors}},t}();e.CompileTemplateMetadata=I;var M=function(){function t(t){var e=void 0===t?{}:t,n=e.type,r=e.isComponent,i=e.selector,o=e.exportAs,s=e.changeDetection,a=e.inputs,u=e.outputs,p=e.hostListeners,l=e.hostProperties,h=e.hostAttributes,f=e.lifecycleHooks,d=e.providers,v=e.viewProviders,y=e.queries,m=e.viewQueries,g=e.template;this.type=n,this.isComponent=r,this.selector=i,this.exportAs=o,this.changeDetection=s,this.inputs=a,this.outputs=u,this.hostListeners=p,this.hostProperties=l,this.hostAttributes=h,this.lifecycleHooks=c(f),this.providers=c(d),this.viewProviders=c(v),this.queries=c(y),this.viewQueries=c(m),this.template=g}return t.create=function(e){var n=void 0===e?{}:e,r=n.type,i=n.isComponent,o=n.selector,s=n.exportAs,a=n.changeDetection,u=n.inputs,c=n.outputs,p=n.host,h=n.lifecycleHooks,d=n.providers,v=n.viewProviders,y=n.queries,g=n.viewQueries,_=n.template,P={},E={},w={};l.isPresent(p)&&f.StringMapWrapper.forEach(p,function(t,e){var n=l.RegExpWrapper.firstMatch(b,e);l.isBlank(n)?w[e]=t:l.isPresent(n[1])?E[n[1]]=t:l.isPresent(n[2])&&(P[n[2]]=t)});var C={};l.isPresent(u)&&u.forEach(function(t){var e=m.splitAtColon(t,[t,t]);C[e[0]]=e[1]});var R={};return l.isPresent(c)&&c.forEach(function(t){var e=m.splitAtColon(t,[t,t]);R[e[0]]=e[1]}),new t({type:r,isComponent:l.normalizeBool(i),selector:o,exportAs:s,changeDetection:a,inputs:C,outputs:R,hostListeners:P,hostProperties:E,hostAttributes:w,lifecycleHooks:l.isPresent(h)?h:[],providers:d,viewProviders:v,queries:y,viewQueries:g,template:_})},Object.defineProperty(t.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),t.fromJson=function(e){return new t({isComponent:e.isComponent,selector:e.selector,exportAs:e.exportAs,type:l.isPresent(e.type)?x.fromJson(e.type):e.type,changeDetection:l.isPresent(e.changeDetection)?d.CHANGE_DETECTION_STRATEGY_VALUES[e.changeDetection]:e.changeDetection,inputs:e.inputs,outputs:e.outputs,hostListeners:e.hostListeners,hostProperties:e.hostProperties,hostAttributes:e.hostAttributes,lifecycleHooks:e.lifecycleHooks.map(function(t){return g.LIFECYCLE_HOOKS_VALUES[t]}),template:l.isPresent(e.template)?I.fromJson(e.template):e.template,providers:o(e.providers,r),viewProviders:o(e.viewProviders,r),queries:o(e.queries,A.fromJson),viewQueries:o(e.viewQueries,A.fromJson)})},t.prototype.toJson=function(){return{"class":"Directive",isComponent:this.isComponent,selector:this.selector,exportAs:this.exportAs,type:l.isPresent(this.type)?this.type.toJson():this.type,changeDetection:l.isPresent(this.changeDetection)?l.serializeEnum(this.changeDetection):this.changeDetection,inputs:this.inputs,outputs:this.outputs,hostListeners:this.hostListeners,hostProperties:this.hostProperties,hostAttributes:this.hostAttributes,lifecycleHooks:this.lifecycleHooks.map(function(t){return l.serializeEnum(t)}),template:l.isPresent(this.template)?this.template.toJson():this.template,providers:s(this.providers),viewProviders:s(this.viewProviders),queries:s(this.queries),viewQueries:s(this.viewQueries)}},t}();e.CompileDirectiveMetadata=M,e.createHostComponentMeta=i;var k=function(){function t(t){var e=void 0===t?{}:t,n=e.type,r=e.name,i=e.pure,o=e.lifecycleHooks;this.type=n,this.name=r,this.pure=l.normalizeBool(i),this.lifecycleHooks=c(o)}return Object.defineProperty(t.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),t.fromJson=function(e){return new t({type:l.isPresent(e.type)?x.fromJson(e.type):e.type,name:e.name,pure:e.pure})},t.prototype.toJson=function(){return{"class":"Pipe",type:l.isPresent(this.type)?this.type.toJson():null,name:this.name,pure:this.pure}},t}();e.CompilePipeMetadata=k;var N={Directive:M.fromJson,Pipe:k.fromJson,Type:x.fromJson,Provider:R.fromJson,Identifier:w.fromJson,Factory:S.fromJson}},function(t,e){"use strict";!function(t){t[t.OnInit=0]="OnInit",t[t.OnDestroy=1]="OnDestroy",t[t.DoCheck=2]="DoCheck",t[t.OnChanges=3]="OnChanges",t[t.AfterContentInit=4]="AfterContentInit",t[t.AfterContentChecked=5]="AfterContentChecked",t[t.AfterViewInit=6]="AfterViewInit",t[t.AfterViewChecked=7]="AfterViewChecked"}(e.LifecycleHooks||(e.LifecycleHooks={}));var n=e.LifecycleHooks;e.LIFECYCLE_HOOKS_VALUES=[n.OnInit,n.OnDestroy,n.DoCheck,n.OnChanges,n.AfterContentInit,n.AfterContentChecked,n.AfterViewInit,n.AfterViewChecked]},function(t,e,n){"use strict";function r(){return new _}function i(){return new _(g)}function o(t){var e=a(t);return e&&e[b.Scheme]||""}function s(t,e,n,r,i,o,s){var a=[];return v.isPresent(t)&&a.push(t+":"),v.isPresent(n)&&(a.push("//"),v.isPresent(e)&&a.push(e+"@"),a.push(n),v.isPresent(r)&&a.push(":"+r)),v.isPresent(i)&&a.push(i),v.isPresent(o)&&a.push("?"+o),v.isPresent(s)&&a.push("#"+s),a.join("")}function a(t){return v.RegExpWrapper.firstMatch(P,t)}function u(t){if("/"==t)return"/";for(var e="/"==t[0]?"/":"",n="/"===t[t.length-1]?"/":"",r=t.split("/"),i=[],o=0,s=0;s0?i.pop():o++;break;default:i.push(a)}}if(""==e){for(;o-- >0;)i.unshift("..");0===i.length&&i.push(".")}return e+i.join("/")+n}function c(t){var e=t[b.Path];return e=v.isBlank(e)?"":u(e),t[b.Path]=e,s(t[b.Scheme],t[b.UserInfo],t[b.Domain],t[b.Port],e,t[b.QueryData],t[b.Fragment])}function p(t,e){var n=a(encodeURI(e)),r=a(t);if(v.isPresent(n[b.Scheme]))return c(n);n[b.Scheme]=r[b.Scheme];for(var i=b.Scheme;i<=b.Port;i++)v.isBlank(n[i])&&(n[i]=r[i]);if("/"==n[b.Path][0])return c(n);var o=r[b.Path];v.isBlank(o)&&(o="/");var s=o.lastIndexOf("/");return o=o.substring(0,s+1)+n[b.Path],n[b.Path]=o,c(n)}var l=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},h=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},f=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},d=n(6),v=n(5),y=n(62),m=n(6),g="asset:";e.createUrlResolverWithoutPackagePrefix=r,e.createOfflineCompileUrlResolver=i,e.DEFAULT_PACKAGE_URL_PROVIDER=new m.Provider(y.PACKAGE_ROOT_URL,{useValue:"/"});var _=function(){function t(t){void 0===t&&(t=null),this._packagePrefix=t}return t.prototype.resolve=function(t,e){var n=e;v.isPresent(t)&&t.length>0&&(n=p(t,n));var r=a(n),i=this._packagePrefix;if(v.isPresent(i)&&v.isPresent(r)&&"package"==r[b.Scheme]){var o=r[b.Path];if(this._packagePrefix!==g)return i=v.StringWrapper.stripRight(i,"/"),o=v.StringWrapper.stripLeft(o,"/"),i+"/"+o;var s=o.split(/\//);n="asset:"+s[0]+"/lib/"+s.slice(1).join("/")}return n},t=l([d.Injectable(),f(0,d.Inject(y.PACKAGE_ROOT_URL)),h("design:paramtypes",[String])],t)}();e.UrlResolver=_,e.getUrlScheme=o;var b,P=v.RegExpWrapper.create("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([\\w\\d\\-\\u0100-\\uffff.%]*)(?::([0-9]+))?)?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");!function(t){t[t.Scheme=1]="Scheme",t[t.UserInfo=2]="UserInfo",t[t.Domain=3]="Domain",t[t.Port=4]="Port",t[t.Path=5]="Path",t[t.QueryData=6]="QueryData",t[t.Fragment=7]="Fragment"}(b||(b={}))},function(t,e,n){"use strict";function r(t){return new i.CompileTokenMetadata({identifier:t})}var i=n(155),o=n(159),s=n(160),a=n(66),u=n(28),c=n(67),p=n(69),l=n(70),h=n(74),f=n(36),d=n(68),v=n(78),y=n(11),m=n(81),g=n(153),_="asset:angular2/lib/src/core/linker/view"+g.MODULE_SUFFIX,b="asset:angular2/lib/src/core/linker/view_utils"+g.MODULE_SUFFIX,P="asset:angular2/lib/src/core/change_detection/change_detection"+g.MODULE_SUFFIX,E=a.ViewUtils,w=o.AppView,C=s.DebugContext,R=c.AppElement,S=p.ElementRef,O=l.ViewContainerRef,T=u.ChangeDetectorRef,x=h.RenderComponentType,A=v.QueryList,I=m.TemplateRef,M=m.TemplateRef_,k=u.ValueUnwrapper,N=y.Injector,D=f.ViewEncapsulation,V=d.ViewType,j=u.ChangeDetectionStrategy,L=s.StaticNodeDebugInfo,B=h.Renderer,F=u.SimpleChange,U=u.uninitialized,W=u.ChangeDetectorState,H=a.flattenNestedViewRenderNodes,X=u.devModeEqual,q=a.interpolate,G=a.checkBinding,z=a.castByValue,K=function(){function t(){}return t.ViewUtils=new i.CompileIdentifierMetadata({name:"ViewUtils",moduleUrl:"asset:angular2/lib/src/core/linker/view_utils"+g.MODULE_SUFFIX,runtime:E}),t.AppView=new i.CompileIdentifierMetadata({name:"AppView",moduleUrl:_,runtime:w}),t.AppElement=new i.CompileIdentifierMetadata({name:"AppElement",moduleUrl:"asset:angular2/lib/src/core/linker/element"+g.MODULE_SUFFIX,runtime:R}),t.ElementRef=new i.CompileIdentifierMetadata({name:"ElementRef",moduleUrl:"asset:angular2/lib/src/core/linker/element_ref"+g.MODULE_SUFFIX,runtime:S}),t.ViewContainerRef=new i.CompileIdentifierMetadata({name:"ViewContainerRef",moduleUrl:"asset:angular2/lib/src/core/linker/view_container_ref"+g.MODULE_SUFFIX,runtime:O}),t.ChangeDetectorRef=new i.CompileIdentifierMetadata({name:"ChangeDetectorRef",moduleUrl:"asset:angular2/lib/src/core/change_detection/change_detector_ref"+g.MODULE_SUFFIX,runtime:T}),t.RenderComponentType=new i.CompileIdentifierMetadata({name:"RenderComponentType",moduleUrl:"asset:angular2/lib/src/core/render/api"+g.MODULE_SUFFIX,runtime:x}),t.QueryList=new i.CompileIdentifierMetadata({name:"QueryList",moduleUrl:"asset:angular2/lib/src/core/linker/query_list"+g.MODULE_SUFFIX,runtime:A}),t.TemplateRef=new i.CompileIdentifierMetadata({name:"TemplateRef",moduleUrl:"asset:angular2/lib/src/core/linker/template_ref"+g.MODULE_SUFFIX,runtime:I}),t.TemplateRef_=new i.CompileIdentifierMetadata({name:"TemplateRef_",moduleUrl:"asset:angular2/lib/src/core/linker/template_ref"+g.MODULE_SUFFIX,runtime:M}),t.ValueUnwrapper=new i.CompileIdentifierMetadata({name:"ValueUnwrapper",moduleUrl:P,runtime:k}),t.Injector=new i.CompileIdentifierMetadata({name:"Injector",moduleUrl:"asset:angular2/lib/src/core/di/injector"+g.MODULE_SUFFIX,runtime:N}),t.ViewEncapsulation=new i.CompileIdentifierMetadata({name:"ViewEncapsulation",moduleUrl:"asset:angular2/lib/src/core/metadata/view"+g.MODULE_SUFFIX,runtime:D}),t.ViewType=new i.CompileIdentifierMetadata({name:"ViewType",moduleUrl:"asset:angular2/lib/src/core/linker/view_type"+g.MODULE_SUFFIX,runtime:V}),t.ChangeDetectionStrategy=new i.CompileIdentifierMetadata({name:"ChangeDetectionStrategy",moduleUrl:P,runtime:j}),t.StaticNodeDebugInfo=new i.CompileIdentifierMetadata({name:"StaticNodeDebugInfo",moduleUrl:"asset:angular2/lib/src/core/linker/debug_context"+g.MODULE_SUFFIX,runtime:L}),t.DebugContext=new i.CompileIdentifierMetadata({name:"DebugContext",moduleUrl:"asset:angular2/lib/src/core/linker/debug_context"+g.MODULE_SUFFIX,runtime:C}),t.Renderer=new i.CompileIdentifierMetadata({name:"Renderer",moduleUrl:"asset:angular2/lib/src/core/render/api"+g.MODULE_SUFFIX,runtime:B}),t.SimpleChange=new i.CompileIdentifierMetadata({name:"SimpleChange",moduleUrl:P,runtime:F}),t.uninitialized=new i.CompileIdentifierMetadata({name:"uninitialized",moduleUrl:P,runtime:U}),t.ChangeDetectorState=new i.CompileIdentifierMetadata({name:"ChangeDetectorState",moduleUrl:P,runtime:W}),t.checkBinding=new i.CompileIdentifierMetadata({name:"checkBinding",moduleUrl:b,runtime:G}),t.flattenNestedViewRenderNodes=new i.CompileIdentifierMetadata({name:"flattenNestedViewRenderNodes",moduleUrl:b,runtime:H}),t.devModeEqual=new i.CompileIdentifierMetadata({name:"devModeEqual",moduleUrl:P,runtime:X}),t.interpolate=new i.CompileIdentifierMetadata({name:"interpolate",moduleUrl:b,runtime:q}),t.castByValue=new i.CompileIdentifierMetadata({name:"castByValue",moduleUrl:b,runtime:z}),t.pureProxies=[null,new i.CompileIdentifierMetadata({name:"pureProxy1",moduleUrl:b,runtime:a.pureProxy1}),new i.CompileIdentifierMetadata({name:"pureProxy2",moduleUrl:b,runtime:a.pureProxy2}),new i.CompileIdentifierMetadata({name:"pureProxy3",moduleUrl:b,runtime:a.pureProxy3}),new i.CompileIdentifierMetadata({name:"pureProxy4",moduleUrl:b,runtime:a.pureProxy4}),new i.CompileIdentifierMetadata({name:"pureProxy5",moduleUrl:b,runtime:a.pureProxy5}),new i.CompileIdentifierMetadata({name:"pureProxy6",moduleUrl:b,runtime:a.pureProxy6}),new i.CompileIdentifierMetadata({name:"pureProxy7",moduleUrl:b,runtime:a.pureProxy7}),new i.CompileIdentifierMetadata({name:"pureProxy8",moduleUrl:b,runtime:a.pureProxy8}),new i.CompileIdentifierMetadata({name:"pureProxy9",moduleUrl:b,runtime:a.pureProxy9}),new i.CompileIdentifierMetadata({name:"pureProxy10",moduleUrl:b,runtime:a.pureProxy10})],t}();e.Identifiers=K,e.identifierToken=r},function(t,e,n){"use strict";function r(t){var e;if(t instanceof o.AppElement){var n=t;if(e=n.nativeElement,s.isPresent(n.nestedViews))for(var i=n.nestedViews.length-1;i>=0;i--){var a=n.nestedViews[i];a.rootNodesOrAppElements.length>0&&(e=r(a.rootNodesOrAppElements[a.rootNodesOrAppElements.length-1]))}}else e=t;return e}var i=n(15),o=n(67),s=n(5),a=n(40),u=n(82),c=n(68),p=n(66),l=n(28),h=n(71),f=n(73),d=n(160),v=n(161),y=s.CONST_EXPR(new Object),m=h.wtfCreateScope("AppView#check(ascii id)"),g=function(){function t(t,e,n,r,i,o,s,a,p){this.clazz=t,this.componentType=e,this.type=n,this.locals=r,this.viewUtils=i,this.parentInjector=o,this.declarationAppElement=s,this.cdMode=a,this.staticNodeDebugInfos=p,this.contentChildren=[],this.viewChildren=[],this.viewContainerElement=null,this.cdState=l.ChangeDetectorState.NeverChecked,this.context=null,this.destroyed=!1,this._currentDebugContext=null,this.ref=new u.ViewRef_(this),n===c.ViewType.COMPONENT||n===c.ViewType.HOST?this.renderer=i.renderComponent(e):this.renderer=s.parentView.renderer}return t.prototype.create=function(t,e){var n,r;switch(this.type){case c.ViewType.COMPONENT:n=this.declarationAppElement.component,r=p.ensureSlotCount(t,this.componentType.slotCount);break;case c.ViewType.EMBEDDED:n=this.declarationAppElement.parentView.context,r=this.declarationAppElement.parentView.projectableNodes;break;case c.ViewType.HOST:n=y,r=t}if(this._hasExternalHostElement=s.isPresent(e),this.context=n,this.projectableNodes=r,!this.debugMode)return this.createInternal(e);this._resetDebug();try{return this.createInternal(e)}catch(i){throw this._rethrowWithContext(i,i.stack),i}},t.prototype.createInternal=function(t){return null},t.prototype.init=function(t,e,n,r){this.rootNodesOrAppElements=t,this.allNodes=e,this.disposables=n,this.subscriptions=r,this.type===c.ViewType.COMPONENT&&(this.declarationAppElement.parentView.viewChildren.push(this),this.renderParent=this.declarationAppElement.parentView,this.dirtyParentQueriesInternal())},t.prototype.selectOrCreateHostElement=function(t,e,n){var r;return r=s.isPresent(e)?this.renderer.selectRootElement(e,n):this.renderer.createElement(null,t,n)},t.prototype.injectorGet=function(t,e,n){if(!this.debugMode)return this.injectorGetInternal(t,e,n);this._resetDebug();try{return this.injectorGetInternal(t,e,n)}catch(r){throw this._rethrowWithContext(r,r.stack),r}},t.prototype.injectorGetInternal=function(t,e,n){return n},t.prototype.injector=function(t){return s.isPresent(t)?new v.ElementInjector(this,t):this.parentInjector},t.prototype.destroy=function(){this._hasExternalHostElement?this.renderer.detachView(this.flatRootNodes):s.isPresent(this.viewContainerElement)&&this.viewContainerElement.detachView(this.viewContainerElement.nestedViews.indexOf(this)),this._destroyRecurse()},t.prototype._destroyRecurse=function(){if(!this.destroyed){for(var t=this.contentChildren,e=0;e0?this.rootNodesOrAppElements[this.rootNodesOrAppElements.length-1]:null;return r(t)},enumerable:!0,configurable:!0}),t.prototype.hasLocal=function(t){return i.StringMapWrapper.contains(this.locals,t)},t.prototype.setLocal=function(t,e){this.locals[t]=e},t.prototype.dirtyParentQueriesInternal=function(){},t.prototype.addRenderContentChild=function(t){this.contentChildren.push(t),t.renderParent=this,t.dirtyParentQueriesInternal()},t.prototype.removeContentChild=function(t){i.ListWrapper.remove(this.contentChildren,t),t.dirtyParentQueriesInternal(),t.renderParent=null},t.prototype.detectChanges=function(t){var e=m(this.clazz);if(this.cdMode!==l.ChangeDetectionStrategy.Detached&&this.cdMode!==l.ChangeDetectionStrategy.Checked&&this.cdState!==l.ChangeDetectorState.Errored){if(this.destroyed&&this.throwDestroyedError("detectChanges"),this.debugMode){this._resetDebug();try{this.detectChangesInternal(t)}catch(n){throw this._rethrowWithContext(n,n.stack),n}}else this.detectChangesInternal(t);this.cdMode===l.ChangeDetectionStrategy.CheckOnce&&(this.cdMode=l.ChangeDetectionStrategy.Checked),this.cdState=l.ChangeDetectorState.CheckedBefore,h.wtfLeave(e)}},t.prototype.detectChangesInternal=function(t){this.detectContentChildrenChanges(t),this.detectViewChildrenChanges(t)},t.prototype.detectContentChildrenChanges=function(t){for(var e=0;eo?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=n(15),a=n(68),u=function(){function t(t,e,n){this.providerTokens=t,this.componentToken=e,this.varTokens=n}return t=r([o.CONST(),i("design:paramtypes",[Array,Object,Object])],t)}();e.StaticNodeDebugInfo=u;var c=function(){function t(t,e,n,r){this._view=t,this._nodeIndex=e,this._tplRow=n,this._tplCol=r}return Object.defineProperty(t.prototype,"_staticNodeInfo",{get:function(){return o.isPresent(this._nodeIndex)?this._view.staticNodeDebugInfos[this._nodeIndex]:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return this._view.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"component",{get:function(){var t=this._staticNodeInfo;return o.isPresent(t)&&o.isPresent(t.componentToken)?this.injector.get(t.componentToken):null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"componentRenderElement",{get:function(){for(var t=this._view;o.isPresent(t.declarationAppElement)&&t.type!==a.ViewType.COMPONENT;)t=t.declarationAppElement.parentView;return o.isPresent(t.declarationAppElement)?t.declarationAppElement.nativeElement:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"injector",{get:function(){return this._view.injector(this._nodeIndex)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderNode",{get:function(){return o.isPresent(this._nodeIndex)&&o.isPresent(this._view.allNodes)?this._view.allNodes[this._nodeIndex]:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"providerTokens",{get:function(){var t=this._staticNodeInfo;return o.isPresent(t)?t.providerTokens:null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"source",{get:function(){return this._view.componentType.templateUrl+":"+this._tplRow+":"+this._tplCol},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"locals",{get:function(){var t=this,e={};return s.ListWrapper.forEachWithIndex(this._view.staticNodeDebugInfos,function(n,r){var i=n.varTokens;s.StringMapWrapper.forEach(i,function(n,i){var s;s=o.isBlank(n)?o.isPresent(t._view.allNodes)?t._view.allNodes[r]:null:t._view.injectorGet(n,r,null), +e[i]=s})}),s.StringMapWrapper.forEach(this._view.locals,function(t,n){e[n]=t}),e},enumerable:!0,configurable:!0}),t}();e.DebugContext=c},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(5),o=n(11),s=i.CONST_EXPR(new Object),a=function(t){function e(e,n){t.call(this),this._view=e,this._nodeIndex=n}return r(e,t),e.prototype.get=function(t,e){void 0===e&&(e=o.THROW_IF_NOT_FOUND);var n=s;return n===s&&(n=this._view.injectorGet(t,this._nodeIndex,s)),n===s&&(n=this._view.parentInjector.get(t,e)),n},e}(o.Injector);e.ElementInjector=a},function(t,e,n){"use strict";var r=n(5),i=n(12),o=n(158),s=function(){function t(t,e,n,i){void 0===i&&(i=null),this.genDebugInfo=t,this.logBindingUpdate=e,this.useJit=n,r.isBlank(i)&&(i=new u),this.renderTypes=i}return t}();e.CompilerConfig=s;var a=function(){function t(){}return Object.defineProperty(t.prototype,"renderer",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderText",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderElement",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderComment",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderNode",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"renderEvent",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),t}();e.RenderTypes=a;var u=function(){function t(){this.renderer=o.Identifiers.Renderer,this.renderText=null,this.renderElement=null,this.renderComment=null,this.renderNode=null,this.renderEvent=null}return t}();e.DefaultRenderTypes=u},function(t,e,n){"use strict";function r(t){return t.dependencies.forEach(function(t){t.factoryPlaceholder.moduleUrl=o(t.comp)}),t.statements}function i(t){return t.dependencies.forEach(function(t){t.valuePlaceholder.moduleUrl=s(t.sourceUrl,t.isShimmed)}),t.statements}function o(t){var e=t.type.moduleUrl,n=e.substring(0,e.length-f.MODULE_SUFFIX.length);return n+".ngfactory"+f.MODULE_SUFFIX}function s(t,e){return e?t+".shim"+f.MODULE_SUFFIX:""+t+f.MODULE_SUFFIX}function a(t){if(!t.isComponent)throw new c.BaseException("Could not compile '"+t.type.name+"' because it is not a component.")}var u=n(155),c=n(12),p=n(15),l=n(164),h=n(65),f=n(153),d=new u.CompileIdentifierMetadata({name:"ComponentFactory",runtime:h.ComponentFactory,moduleUrl:"asset:angular2/lib/src/core/linker/component_factory"+f.MODULE_SUFFIX}),v=function(){function t(t,e){this.moduleUrl=t,this.source=e}return t}();e.SourceModule=v;var y=function(){function t(t,e,n){this.component=t,this.directives=e,this.pipes=n}return t}();e.NormalizedComponentWithViewDirectives=y;var m=function(){function t(t,e,n,r,i){this._directiveNormalizer=t,this._templateParser=e,this._styleCompiler=n,this._viewCompiler=r,this._outputEmitter=i}return t.prototype.normalizeDirectiveMetadata=function(t){return this._directiveNormalizer.normalizeDirective(t)},t.prototype.compileTemplates=function(t){var e=this;if(0===t.length)throw new c.BaseException("No components given");var n=[],r=[],i=o(t[0].component);return t.forEach(function(t){var i=t.component;a(i);var o=e._compileComponent(i,t.directives,t.pipes,n);r.push(o);var s=u.createHostComponentMeta(i.type,i.selector),c=e._compileComponent(s,[i],[],n),p=i.type.name+"NgFactory";n.push(l.variable(p).set(l.importExpr(d).instantiate([l.literal(i.selector),l.variable(c),l.importExpr(i.type)],l.importType(d,null,[l.TypeModifier.Const]))).toDeclStmt(null,[l.StmtModifier.Final])),r.push(p)}),this._codegenSourceModule(i,n,r)},t.prototype.compileStylesheet=function(t,e){var n=this._styleCompiler.compileStylesheet(t,e,!1),r=this._styleCompiler.compileStylesheet(t,e,!0);return[this._codegenSourceModule(s(t,!1),i(n),[n.stylesVar]),this._codegenSourceModule(s(t,!0),i(r),[r.stylesVar])]},t.prototype._compileComponent=function(t,e,n,o){var s=this._styleCompiler.compileComponent(t),a=this._templateParser.parse(t,t.template.template,e,n,t.type.name),u=this._viewCompiler.compileComponent(t,a,l.variable(s.stylesVar),n);return p.ListWrapper.addAll(o,i(s)),p.ListWrapper.addAll(o,r(u)),u.viewFactoryVar},t.prototype._codegenSourceModule=function(t,e,n){return new v(t,this._outputEmitter.emitStatements(t,e,n))},t}();e.OfflineCompiler=m},function(t,e,n){"use strict";function r(t,e,n){var r=new ot(t,e);return n.visitExpression(r,null)}function i(t){var e=new st;return e.visitAllStatements(t,null),e.varNames}function o(t,e){return void 0===e&&(e=null),new C(t,e)}function s(t,e){return void 0===e&&(e=null),new M(t,null,e)}function a(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),d.isPresent(t)?new g(t,e,n):null}function u(t,e){return void 0===e&&(e=null),new I(t,e)}function c(t,e){return void 0===e&&(e=null),new U(t,e)}function p(t,e){return void 0===e&&(e=null),new W(t,e)}function l(t){return new N(t)}function h(t,e,n){return void 0===n&&(n=null),new j(t,e,n)}var f=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},d=n(5);!function(t){t[t.Const=0]="Const"}(e.TypeModifier||(e.TypeModifier={}));var v=(e.TypeModifier,function(){function t(t){void 0===t&&(t=null),this.modifiers=t,d.isBlank(t)&&(this.modifiers=[])}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}());e.Type=v,function(t){t[t.Dynamic=0]="Dynamic",t[t.Bool=1]="Bool",t[t.String=2]="String",t[t.Int=3]="Int",t[t.Number=4]="Number",t[t.Function=5]="Function"}(e.BuiltinTypeName||(e.BuiltinTypeName={}));var y=e.BuiltinTypeName,m=function(t){function e(e,n){void 0===n&&(n=null),t.call(this,n),this.name=e}return f(e,t),e.prototype.visitType=function(t,e){return t.visitBuiltintType(this,e)},e}(v);e.BuiltinType=m;var g=function(t){function e(e,n,r){void 0===n&&(n=null),void 0===r&&(r=null),t.call(this,r),this.value=e,this.typeParams=n}return f(e,t),e.prototype.visitType=function(t,e){return t.visitExternalType(this,e)},e}(v);e.ExternalType=g;var _=function(t){function e(e,n){void 0===n&&(n=null),t.call(this,n),this.of=e}return f(e,t),e.prototype.visitType=function(t,e){return t.visitArrayType(this,e)},e}(v);e.ArrayType=_;var b=function(t){function e(e,n){void 0===n&&(n=null),t.call(this,n),this.valueType=e}return f(e,t),e.prototype.visitType=function(t,e){return t.visitMapType(this,e)},e}(v);e.MapType=b,e.DYNAMIC_TYPE=new m(y.Dynamic),e.BOOL_TYPE=new m(y.Bool),e.INT_TYPE=new m(y.Int),e.NUMBER_TYPE=new m(y.Number),e.STRING_TYPE=new m(y.String),e.FUNCTION_TYPE=new m(y.Function),function(t){t[t.Equals=0]="Equals",t[t.NotEquals=1]="NotEquals",t[t.Identical=2]="Identical",t[t.NotIdentical=3]="NotIdentical",t[t.Minus=4]="Minus",t[t.Plus=5]="Plus",t[t.Divide=6]="Divide",t[t.Multiply=7]="Multiply",t[t.Modulo=8]="Modulo",t[t.And=9]="And",t[t.Or=10]="Or",t[t.Lower=11]="Lower",t[t.LowerEquals=12]="LowerEquals",t[t.Bigger=13]="Bigger",t[t.BiggerEquals=14]="BiggerEquals"}(e.BinaryOperator||(e.BinaryOperator={}));var P=e.BinaryOperator,E=function(){function t(t){this.type=t}return t.prototype.prop=function(t){return new B(this,t)},t.prototype.key=function(t,e){return void 0===e&&(e=null),new F(this,t,e)},t.prototype.callMethod=function(t,e){return new T(this,t,e)},t.prototype.callFn=function(t){return new x(this,t)},t.prototype.instantiate=function(t,e){return void 0===e&&(e=null),new A(this,t,e)},t.prototype.conditional=function(t,e){return void 0===e&&(e=null),new k(this,t,e)},t.prototype.equals=function(t){return new L(P.Equals,this,t)},t.prototype.notEquals=function(t){return new L(P.NotEquals,this,t)},t.prototype.identical=function(t){return new L(P.Identical,this,t)},t.prototype.notIdentical=function(t){return new L(P.NotIdentical,this,t)},t.prototype.minus=function(t){return new L(P.Minus,this,t)},t.prototype.plus=function(t){return new L(P.Plus,this,t)},t.prototype.divide=function(t){return new L(P.Divide,this,t)},t.prototype.multiply=function(t){return new L(P.Multiply,this,t)},t.prototype.modulo=function(t){return new L(P.Modulo,this,t)},t.prototype.and=function(t){return new L(P.And,this,t)},t.prototype.or=function(t){return new L(P.Or,this,t)},t.prototype.lower=function(t){return new L(P.Lower,this,t)},t.prototype.lowerEquals=function(t){return new L(P.LowerEquals,this,t)},t.prototype.bigger=function(t){return new L(P.Bigger,this,t)},t.prototype.biggerEquals=function(t){return new L(P.BiggerEquals,this,t)},t.prototype.isBlank=function(){return this.equals(e.NULL_EXPR)},t.prototype.cast=function(t){return new D(this,t)},t.prototype.toStmt=function(){return new G(this)},t}();e.Expression=E,function(t){t[t.This=0]="This",t[t.Super=1]="Super",t[t.CatchError=2]="CatchError",t[t.CatchStack=3]="CatchStack"}(e.BuiltinVar||(e.BuiltinVar={}));var w=e.BuiltinVar,C=function(t){function e(e,n){void 0===n&&(n=null),t.call(this,n),d.isString(e)?(this.name=e,this.builtin=null):(this.name=null,this.builtin=e)}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitReadVarExpr(this,e)},e.prototype.set=function(t){return new R(this.name,t)},e}(E);e.ReadVarExpr=C;var R=function(t){function e(e,n,r){void 0===r&&(r=null),t.call(this,d.isPresent(r)?r:n.type),this.name=e,this.value=n}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitWriteVarExpr(this,e)},e.prototype.toDeclStmt=function(t,e){return void 0===t&&(t=null),void 0===e&&(e=null),new X(this.name,this.value,t,e)},e}(E);e.WriteVarExpr=R;var S=function(t){function e(e,n,r,i){void 0===i&&(i=null),t.call(this,d.isPresent(i)?i:r.type),this.receiver=e,this.index=n,this.value=r}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitWriteKeyExpr(this,e)},e}(E);e.WriteKeyExpr=S;var O=function(t){function e(e,n,r,i){void 0===i&&(i=null),t.call(this,d.isPresent(i)?i:r.type),this.receiver=e,this.name=n,this.value=r}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitWritePropExpr(this,e)},e}(E);e.WritePropExpr=O,function(t){t[t.ConcatArray=0]="ConcatArray",t[t.SubscribeObservable=1]="SubscribeObservable",t[t.bind=2]="bind"}(e.BuiltinMethod||(e.BuiltinMethod={}));var T=(e.BuiltinMethod,function(t){function e(e,n,r,i){void 0===i&&(i=null),t.call(this,i),this.receiver=e,this.args=r,d.isString(n)?(this.name=n,this.builtin=null):(this.name=null,this.builtin=n)}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitInvokeMethodExpr(this,e)},e}(E));e.InvokeMethodExpr=T;var x=function(t){function e(e,n,r){void 0===r&&(r=null),t.call(this,r),this.fn=e,this.args=n}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitInvokeFunctionExpr(this,e)},e}(E);e.InvokeFunctionExpr=x;var A=function(t){function e(e,n,r){t.call(this,r),this.classExpr=e,this.args=n}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitInstantiateExpr(this,e)},e}(E);e.InstantiateExpr=A;var I=function(t){function e(e,n){void 0===n&&(n=null),t.call(this,n),this.value=e}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitLiteralExpr(this,e)},e}(E);e.LiteralExpr=I;var M=function(t){function e(e,n,r){void 0===n&&(n=null),void 0===r&&(r=null),t.call(this,n),this.value=e,this.typeParams=r}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitExternalExpr(this,e)},e}(E);e.ExternalExpr=M;var k=function(t){function e(e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),t.call(this,d.isPresent(i)?i:n.type),this.condition=e,this.falseCase=r,this.trueCase=n}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitConditionalExpr(this,e)},e}(E);e.ConditionalExpr=k;var N=function(t){function n(n){t.call(this,e.BOOL_TYPE),this.condition=n}return f(n,t),n.prototype.visitExpression=function(t,e){return t.visitNotExpr(this,e)},n}(E);e.NotExpr=N;var D=function(t){function e(e,n){t.call(this,n),this.value=e}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitCastExpr(this,e)},e}(E);e.CastExpr=D;var V=function(){function t(t,e){void 0===e&&(e=null),this.name=t,this.type=e}return t}();e.FnParam=V;var j=function(t){function e(e,n,r){void 0===r&&(r=null),t.call(this,r),this.params=e,this.statements=n}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitFunctionExpr(this,e)},e.prototype.toDeclStmt=function(t,e){return void 0===e&&(e=null),new q(t,this.params,this.statements,this.type,e)},e}(E);e.FunctionExpr=j;var L=function(t){function e(e,n,r,i){void 0===i&&(i=null),t.call(this,d.isPresent(i)?i:n.type),this.operator=e,this.rhs=r,this.lhs=n}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitBinaryOperatorExpr(this,e)},e}(E);e.BinaryOperatorExpr=L;var B=function(t){function e(e,n,r){void 0===r&&(r=null),t.call(this,r),this.receiver=e,this.name=n}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitReadPropExpr(this,e)},e.prototype.set=function(t){return new O(this.receiver,this.name,t)},e}(E);e.ReadPropExpr=B;var F=function(t){function e(e,n,r){void 0===r&&(r=null),t.call(this,r),this.receiver=e,this.index=n}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitReadKeyExpr(this,e)},e.prototype.set=function(t){return new S(this.receiver,this.index,t)},e}(E);e.ReadKeyExpr=F;var U=function(t){function e(e,n){void 0===n&&(n=null),t.call(this,n),this.entries=e}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitLiteralArrayExpr(this,e)},e}(E);e.LiteralArrayExpr=U;var W=function(t){function e(e,n){void 0===n&&(n=null),t.call(this,n),this.entries=e,this.valueType=null,d.isPresent(n)&&(this.valueType=n.valueType)}return f(e,t),e.prototype.visitExpression=function(t,e){return t.visitLiteralMapExpr(this,e)},e}(E);e.LiteralMapExpr=W,e.THIS_EXPR=new C(w.This),e.SUPER_EXPR=new C(w.Super),e.CATCH_ERROR_VAR=new C(w.CatchError),e.CATCH_STACK_VAR=new C(w.CatchStack),e.NULL_EXPR=new I(null,null),function(t){t[t.Final=0]="Final",t[t.Private=1]="Private"}(e.StmtModifier||(e.StmtModifier={}));var H=(e.StmtModifier,function(){function t(t){void 0===t&&(t=null),this.modifiers=t,d.isBlank(t)&&(this.modifiers=[])}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}());e.Statement=H;var X=function(t){function e(e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),t.call(this,i),this.name=e,this.value=n,this.type=d.isPresent(r)?r:n.type}return f(e,t),e.prototype.visitStatement=function(t,e){return t.visitDeclareVarStmt(this,e)},e}(H);e.DeclareVarStmt=X;var q=function(t){function e(e,n,r,i,o){void 0===i&&(i=null),void 0===o&&(o=null),t.call(this,o),this.name=e,this.params=n,this.statements=r,this.type=i}return f(e,t),e.prototype.visitStatement=function(t,e){return t.visitDeclareFunctionStmt(this,e)},e}(H);e.DeclareFunctionStmt=q;var G=function(t){function e(e){t.call(this),this.expr=e}return f(e,t),e.prototype.visitStatement=function(t,e){return t.visitExpressionStmt(this,e)},e}(H);e.ExpressionStatement=G;var z=function(t){function e(e){t.call(this),this.value=e}return f(e,t),e.prototype.visitStatement=function(t,e){return t.visitReturnStmt(this,e)},e}(H);e.ReturnStatement=z;var K=function(){function t(t,e){void 0===t&&(t=null),this.type=t,this.modifiers=e,d.isBlank(e)&&(this.modifiers=[])}return t.prototype.hasModifier=function(t){return-1!==this.modifiers.indexOf(t)},t}();e.AbstractClassPart=K;var $=function(t){function e(e,n,r){void 0===n&&(n=null),void 0===r&&(r=null),t.call(this,n,r),this.name=e}return f(e,t),e}(K);e.ClassField=$;var Q=function(t){function e(e,n,r,i,o){void 0===i&&(i=null),void 0===o&&(o=null),t.call(this,i,o),this.name=e,this.params=n,this.body=r}return f(e,t),e}(K);e.ClassMethod=Q;var J=function(t){function e(e,n,r,i){void 0===r&&(r=null),void 0===i&&(i=null),t.call(this,r,i),this.name=e,this.body=n}return f(e,t),e}(K);e.ClassGetter=J;var Z=function(t){function e(e,n,r,i,o,s,a){void 0===a&&(a=null),t.call(this,a),this.name=e,this.parent=n,this.fields=r,this.getters=i,this.constructorMethod=o,this.methods=s}return f(e,t),e.prototype.visitStatement=function(t,e){return t.visitDeclareClassStmt(this,e)},e}(H);e.ClassStmt=Z;var Y=function(t){function e(e,n,r){void 0===r&&(r=d.CONST_EXPR([])),t.call(this),this.condition=e,this.trueCase=n,this.falseCase=r}return f(e,t),e.prototype.visitStatement=function(t,e){return t.visitIfStmt(this,e)},e}(H);e.IfStmt=Y;var tt=function(t){function e(e){t.call(this),this.comment=e}return f(e,t),e.prototype.visitStatement=function(t,e){return t.visitCommentStmt(this,e)},e}(H);e.CommentStmt=tt;var et=function(t){function e(e,n){t.call(this),this.bodyStmts=e,this.catchStmts=n}return f(e,t),e.prototype.visitStatement=function(t,e){return t.visitTryCatchStmt(this,e)},e}(H);e.TryCatchStmt=et;var nt=function(t){function e(e){t.call(this),this.error=e}return f(e,t),e.prototype.visitStatement=function(t,e){return t.visitThrowStmt(this,e)},e}(H);e.ThrowStmt=nt;var rt=function(){function t(){}return t.prototype.visitReadVarExpr=function(t,e){return t},t.prototype.visitWriteVarExpr=function(t,e){return new R(t.name,t.value.visitExpression(this,e))},t.prototype.visitWriteKeyExpr=function(t,e){return new S(t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.value.visitExpression(this,e))},t.prototype.visitWritePropExpr=function(t,e){return new O(t.receiver.visitExpression(this,e),t.name,t.value.visitExpression(this,e))},t.prototype.visitInvokeMethodExpr=function(t,e){var n=d.isPresent(t.builtin)?t.builtin:t.name;return new T(t.receiver.visitExpression(this,e),n,this.visitAllExpressions(t.args,e),t.type)},t.prototype.visitInvokeFunctionExpr=function(t,e){return new x(t.fn.visitExpression(this,e),this.visitAllExpressions(t.args,e),t.type)},t.prototype.visitInstantiateExpr=function(t,e){return new A(t.classExpr.visitExpression(this,e),this.visitAllExpressions(t.args,e),t.type)},t.prototype.visitLiteralExpr=function(t,e){return t},t.prototype.visitExternalExpr=function(t,e){return t},t.prototype.visitConditionalExpr=function(t,e){return new k(t.condition.visitExpression(this,e),t.trueCase.visitExpression(this,e),t.falseCase.visitExpression(this,e))},t.prototype.visitNotExpr=function(t,e){return new N(t.condition.visitExpression(this,e))},t.prototype.visitCastExpr=function(t,e){return new D(t.value.visitExpression(this,e),e)},t.prototype.visitFunctionExpr=function(t,e){return t},t.prototype.visitBinaryOperatorExpr=function(t,e){return new L(t.operator,t.lhs.visitExpression(this,e),t.rhs.visitExpression(this,e),t.type)},t.prototype.visitReadPropExpr=function(t,e){return new B(t.receiver.visitExpression(this,e),t.name,t.type)},t.prototype.visitReadKeyExpr=function(t,e){return new F(t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.type)},t.prototype.visitLiteralArrayExpr=function(t,e){return new U(this.visitAllExpressions(t.entries,e))},t.prototype.visitLiteralMapExpr=function(t,e){var n=this;return new W(t.entries.map(function(t){return[t[0],t[1].visitExpression(n,e)]}))},t.prototype.visitAllExpressions=function(t,e){var n=this;return t.map(function(t){return t.visitExpression(n,e)})},t.prototype.visitDeclareVarStmt=function(t,e){return new X(t.name,t.value.visitExpression(this,e),t.type,t.modifiers)},t.prototype.visitDeclareFunctionStmt=function(t,e){return t},t.prototype.visitExpressionStmt=function(t,e){return new G(t.expr.visitExpression(this,e))},t.prototype.visitReturnStmt=function(t,e){return new z(t.value.visitExpression(this,e))},t.prototype.visitDeclareClassStmt=function(t,e){return t},t.prototype.visitIfStmt=function(t,e){return new Y(t.condition.visitExpression(this,e),this.visitAllStatements(t.trueCase,e),this.visitAllStatements(t.falseCase,e))},t.prototype.visitTryCatchStmt=function(t,e){return new et(this.visitAllStatements(t.bodyStmts,e),this.visitAllStatements(t.catchStmts,e))},t.prototype.visitThrowStmt=function(t,e){return new nt(t.error.visitExpression(this,e))},t.prototype.visitCommentStmt=function(t,e){return t},t.prototype.visitAllStatements=function(t,e){var n=this;return t.map(function(t){return t.visitStatement(n,e)})},t}();e.ExpressionTransformer=rt;var it=function(){function t(){}return t.prototype.visitReadVarExpr=function(t,e){return t},t.prototype.visitWriteVarExpr=function(t,e){return t.value.visitExpression(this,e),t},t.prototype.visitWriteKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t.value.visitExpression(this,e),t},t.prototype.visitWritePropExpr=function(t,e){return t.receiver.visitExpression(this,e),t.value.visitExpression(this,e),t},t.prototype.visitInvokeMethodExpr=function(t,e){return t.receiver.visitExpression(this,e),this.visitAllExpressions(t.args,e),t},t.prototype.visitInvokeFunctionExpr=function(t,e){return t.fn.visitExpression(this,e),this.visitAllExpressions(t.args,e),t},t.prototype.visitInstantiateExpr=function(t,e){return t.classExpr.visitExpression(this,e),this.visitAllExpressions(t.args,e),t},t.prototype.visitLiteralExpr=function(t,e){return t},t.prototype.visitExternalExpr=function(t,e){return t},t.prototype.visitConditionalExpr=function(t,e){return t.condition.visitExpression(this,e),t.trueCase.visitExpression(this,e),t.falseCase.visitExpression(this,e),t},t.prototype.visitNotExpr=function(t,e){return t.condition.visitExpression(this,e),t},t.prototype.visitCastExpr=function(t,e){return t.value.visitExpression(this,e),t},t.prototype.visitFunctionExpr=function(t,e){return t},t.prototype.visitBinaryOperatorExpr=function(t,e){return t.lhs.visitExpression(this,e),t.rhs.visitExpression(this,e),t},t.prototype.visitReadPropExpr=function(t,e){return t.receiver.visitExpression(this,e),t},t.prototype.visitReadKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),t.index.visitExpression(this,e),t},t.prototype.visitLiteralArrayExpr=function(t,e){return this.visitAllExpressions(t.entries,e),t},t.prototype.visitLiteralMapExpr=function(t,e){var n=this;return t.entries.forEach(function(t){return t[1].visitExpression(n,e)}),t},t.prototype.visitAllExpressions=function(t,e){var n=this;t.forEach(function(t){return t.visitExpression(n,e)})},t.prototype.visitDeclareVarStmt=function(t,e){return t.value.visitExpression(this,e),t},t.prototype.visitDeclareFunctionStmt=function(t,e){return t},t.prototype.visitExpressionStmt=function(t,e){return t.expr.visitExpression(this,e),t},t.prototype.visitReturnStmt=function(t,e){return t.value.visitExpression(this,e),t},t.prototype.visitDeclareClassStmt=function(t,e){return t},t.prototype.visitIfStmt=function(t,e){return t.condition.visitExpression(this,e),this.visitAllStatements(t.trueCase,e),this.visitAllStatements(t.falseCase,e),t},t.prototype.visitTryCatchStmt=function(t,e){return this.visitAllStatements(t.bodyStmts,e),this.visitAllStatements(t.catchStmts,e),t},t.prototype.visitThrowStmt=function(t,e){return t.error.visitExpression(this,e),t},t.prototype.visitCommentStmt=function(t,e){return t},t.prototype.visitAllStatements=function(t,e){var n=this;t.forEach(function(t){return t.visitStatement(n,e)})},t}();e.RecursiveExpressionVisitor=it,e.replaceVarInExpression=r;var ot=function(t){function e(e,n){t.call(this),this._varName=e,this._newValue=n}return f(e,t),e.prototype.visitReadVarExpr=function(t,e){return t.name==this._varName?this._newValue:t},e}(rt);e.findReadVarNames=i;var st=function(t){function e(){t.apply(this,arguments),this.varNames=new Set}return f(e,t),e.prototype.visitReadVarExpr=function(t,e){return this.varNames.add(t.name),null},e}(it);e.variable=o,e.importExpr=s,e.importType=a,e.literal=u,e.literalArr=c,e.literalMap=p,e.not=l,e.fn=h},function(t,e,n){"use strict";function r(t){if(!t.isComponent)throw new a.BaseException("Could not compile '"+t.type.name+"' because it is not a component.")}var i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(5),a=n(12),u=n(15),c=n(40),p=n(155),l=n(6),h=n(166),f=n(168),d=n(140),v=n(183),y=n(185),m=n(65),g=n(162),_=n(164),b=n(191),P=n(194),E=n(198),w=n(184),C=function(){function t(t,e,n,r,i,o,s){this._runtimeMetadataResolver=t,this._templateNormalizer=e,this._templateParser=n,this._styleCompiler=r,this._viewCompiler=i,this._xhr=o,this._genConfig=s,this._styleCache=new Map,this._hostCacheKeys=new Map,this._compiledTemplateCache=new Map,this._compiledTemplateDone=new Map}return t.prototype.resolveComponent=function(t){var e=this._runtimeMetadataResolver.getDirectiveMetadata(t),n=this._hostCacheKeys.get(t);if(s.isBlank(n)){n=new Object,this._hostCacheKeys.set(t,n),r(e);var i=p.createHostComponentMeta(e.type,e.selector);this._loadAndCompileComponent(n,i,[e],[],[])}return this._compiledTemplateDone.get(n).then(function(n){return new m.ComponentFactory(e.selector,n.viewFactory,t)})},t.prototype.clearCache=function(){this._styleCache.clear(),this._compiledTemplateCache.clear(),this._compiledTemplateDone.clear(),this._hostCacheKeys.clear()},t.prototype._loadAndCompileComponent=function(t,e,n,r,i){var o=this,a=this._compiledTemplateCache.get(t),u=this._compiledTemplateDone.get(t);return s.isBlank(a)&&(a=new R,this._compiledTemplateCache.set(t,a),u=c.PromiseWrapper.all([this._compileComponentStyles(e)].concat(n.map(function(t){return o._templateNormalizer.normalizeDirective(t)}))).then(function(t){var n=t.slice(1),s=t[0],u=o._templateParser.parse(e,e.template.template,n,r,e.type.name),p=[];return a.init(o._compileComponent(e,u,s,r,i,p)),c.PromiseWrapper.all(p).then(function(t){return a})}),this._compiledTemplateDone.set(t,u)),a},t.prototype._compileComponent=function(t,e,n,r,i,o){var a=this,c=this._viewCompiler.compileComponent(t,e,new _.ExternalExpr(new p.CompileIdentifierMetadata({runtime:n})),r);c.dependencies.forEach(function(t){var e=u.ListWrapper.clone(i),n=t.comp.type.runtime,r=a._runtimeMetadataResolver.getViewDirectivesMetadata(t.comp.type.runtime),s=a._runtimeMetadataResolver.getViewPipesMetadata(t.comp.type.runtime),c=u.ListWrapper.contains(e,n);e.push(n);var p=a._loadAndCompileComponent(t.comp.type.runtime,t.comp,r,s,e);t.factoryPlaceholder.runtime=p.proxyViewFactory,t.factoryPlaceholder.name="viewFactory_"+t.comp.type.name,c||o.push(a._compiledTemplateDone.get(n))});var l;return l=s.IS_DART||!this._genConfig.useJit?P.interpretStatements(c.statements,c.viewFactoryVar,new E.InterpretiveAppViewInstanceFactory):b.jitStatements(t.type.name+".template.js",c.statements,c.viewFactoryVar)},t.prototype._compileComponentStyles=function(t){var e=this._styleCompiler.compileComponent(t);return this._resolveStylesCompileResult(t.type.name,e)},t.prototype._resolveStylesCompileResult=function(t,e){var n=this,r=e.dependencies.map(function(t){return n._loadStylesheetDep(t)});return c.PromiseWrapper.all(r).then(function(t){for(var r=[],i=0;io?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(155),a=n(164),u=n(36),c=n(167),p=n(157),l=n(152),h=n(6),f=n(5),d="%COMP%",v="_nghost-"+d,y="_ngcontent-"+d,m=function(){function t(t,e,n){this.sourceUrl=t,this.isShimmed=e,this.valuePlaceholder=n}return t}();e.StylesCompileDependency=m;var g=function(){function t(t,e,n){this.statements=t,this.stylesVar=e,this.dependencies=n}return t}();e.StylesCompileResult=g;var _=function(){function t(t){this._urlResolver=t,this._shadowCss=new c.ShadowCss}return t.prototype.compileComponent=function(t){var e=t.template.encapsulation===u.ViewEncapsulation.Emulated;return this._compileStyles(r(t),t.template.styles,t.template.styleUrls,e)},t.prototype.compileStylesheet=function(t,e,n){var i=l.extractStyleUrls(this._urlResolver,t,e);return this._compileStyles(r(null),[i.style],i.styleUrls,n)},t.prototype._compileStyles=function(t,e,n,i){for(var o=this,u=e.map(function(t){return a.literal(o._shimIfNeeded(t,i))}),c=[],p=0;p0?o.push(u):(o.length>0&&(r.push(o.join("")),n.push(x),o=[]),n.push(u)),u==O&&i++}return o.length>0&&(r.push(o.join("")),n.push(x)),new I(n.join(""),r)}var s=n(15),a=n(5),u=function(){function t(){this.strictStyling=!0}return t.prototype.shimCssText=function(t,e,n){return void 0===n&&(n=""),t=r(t),t=this._insertDirectives(t),this._scopeCssText(t,e,n)},t.prototype._insertDirectives=function(t){return t=this._insertPolyfillDirectivesInCssText(t),this._insertPolyfillRulesInCssText(t)},t.prototype._insertPolyfillDirectivesInCssText=function(t){return a.StringWrapper.replaceAllMapped(t,c,function(t){return t[1]+"{"})},t.prototype._insertPolyfillRulesInCssText=function(t){return a.StringWrapper.replaceAllMapped(t,p,function(t){var e=t[0];return e=a.StringWrapper.replace(e,t[1],""),e=a.StringWrapper.replace(e,t[2],""),t[3]+e})},t.prototype._scopeCssText=function(t,e,n){var r=this._extractUnscopedRulesFromCssText(t);return t=this._insertPolyfillHostInCssText(t),t=this._convertColonHost(t),t=this._convertColonHostContext(t),t=this._convertShadowDOMSelectors(t), +a.isPresent(e)&&(t=this._scopeSelectors(t,e,n)),t=t+"\n"+r,t.trim()},t.prototype._extractUnscopedRulesFromCssText=function(t){for(var e,n="",r=a.RegExpWrapper.matcher(l,t);a.isPresent(e=a.RegExpMatcherWrapper.next(r));){var i=e[0];i=a.StringWrapper.replace(i,e[2],""),i=a.StringWrapper.replace(i,e[1],e[3]),n+=i+"\n\n"}return n},t.prototype._convertColonHost=function(t){return this._convertColonRule(t,v,this._colonHostPartReplacer)},t.prototype._convertColonHostContext=function(t){return this._convertColonRule(t,y,this._colonHostContextPartReplacer)},t.prototype._convertColonRule=function(t,e,n){return a.StringWrapper.replaceAllMapped(t,e,function(t){if(a.isPresent(t[2])){for(var e=t[2].split(","),r=[],i=0;i","+","~"],i=t,o="["+e+"]",u=0;u0&&!s.ListWrapper.contains(r,e)&&!a.StringWrapper.contains(e,o)){var n=/([^:]*)(:*)(.*)/g,i=a.RegExpWrapper.firstMatch(n,e);a.isPresent(i)&&(t=i[1]+o+i[2]+i[3])}return t}).join(c)}return i},t.prototype._insertPolyfillHostInCssText=function(t){return t=a.StringWrapper.replaceAll(t,w,f),t=a.StringWrapper.replaceAll(t,E,h)},t}();e.ShadowCss=u;var c=/polyfill-next-selector[^}]*content:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim,p=/(polyfill-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,l=/(polyfill-unscoped-rule)[^}]*(content:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim,h="-shadowcsshost",f="-shadowcsscontext",d=")(?:\\(((?:\\([^)(]*\\)|[^)(]*)+?)\\))?([^,{]*)",v=a.RegExpWrapper.create("("+h+d,"im"),y=a.RegExpWrapper.create("("+f+d,"im"),m=h+"-no-combinator",g=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],_=/(?:>>>)|(?:\/deep\/)/g,b="([>\\s~+[.,{:][\\s\\S]*)?$",P=a.RegExpWrapper.create(h,"im"),E=/:host/gim,w=/:host-context/gim,C=/\/\*[\s\S]*?\*\//g,R=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,S=/([{}])/g,O="{",T="}",x="%BLOCK%",A=function(){function t(t,e){this.selector=t,this.content=e}return t}();e.CssRule=A,e.processRules=i;var I=function(){function t(t,e){this.escapedString=t,this.blocks=e}return t}()},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(6),s=n(169),a=n(174),u=n(176),c=n(162),p=function(){function t(t,e,n){this.statements=t,this.viewFactoryVar=e,this.dependencies=n}return t}();e.ViewCompileResult=p;var l=function(){function t(t){this._genConfig=t}return t.prototype.compileComponent=function(t,e,n,r){var i=[],o=[],c=new a.CompileView(t,this._genConfig,r,n,0,s.CompileElement.createNull(),[]);return u.buildView(c,e,o,i),new p(i,c.viewFactory.name,o)},t=r([o.Injectable(),i("design:paramtypes",[c.CompilerConfig])],t)}();e.ViewCompiler=l},function(t,e,n){"use strict";function r(t,e,n,r){var i;return i=e>0?s.literal(t).lowerEquals(u.InjectMethodVars.requestNodeIndex).and(u.InjectMethodVars.requestNodeIndex.lowerEquals(s.literal(t+e))):s.literal(t).identical(u.InjectMethodVars.requestNodeIndex),new s.IfStmt(u.InjectMethodVars.token.identical(f.createDiTokenExpression(n.token)).and(i),[new s.ReturnStatement(r)])}function i(t,e,n,r,i,o){var a,u,p=o.view;if(r?(a=s.literalArr(n),u=new s.ArrayType(s.DYNAMIC_TYPE)):(a=n[0],u=n[0].type),c.isBlank(u)&&(u=s.DYNAMIC_TYPE),i)p.fields.push(new s.ClassField(t,u,[s.StmtModifier.Private])),p.createMethod.addStmt(s.THIS_EXPR.prop(t).set(a).toStmt());else{var l="_"+t;p.fields.push(new s.ClassField(l,u,[s.StmtModifier.Private]));var h=new v.CompileMethod(p);h.resetDebugInfo(o.nodeIndex,o.sourceAst),h.addStmt(new s.IfStmt(s.THIS_EXPR.prop(l).isBlank(),[s.THIS_EXPR.prop(l).set(a).toStmt()])),h.addStmt(new s.ReturnStatement(s.THIS_EXPR.prop(l))),p.getters.push(new s.ClassGetter(t,h.finish(),u))}return s.THIS_EXPR.prop(t)}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},s=n(164),a=n(158),u=n(170),c=n(5),p=n(15),l=n(139),h=n(155),f=n(171),d=n(172),v=n(173),y=function(){function t(t,e,n,r,i){this.parent=t,this.view=e,this.nodeIndex=n,this.renderNode=r,this.sourceAst=i}return t.prototype.isNull=function(){return c.isBlank(this.renderNode)},t.prototype.isRootElement=function(){return this.view!=this.parent.view},t}();e.CompileNode=y;var m=function(t){function e(e,n,r,i,o,u,p,l,f,d,v){t.call(this,e,n,r,i,o),this.component=u,this._directives=p,this._resolvedProvidersArray=l,this.hasViewContainer=f,this.hasEmbeddedView=d,this.variableTokens=v,this._compViewExpr=null,this._instances=new h.CompileTokenMap,this._queryCount=0,this._queries=new h.CompileTokenMap,this._componentConstructorViewQueryLists=[],this.contentNodesByNgContentIndex=null,this.elementRef=s.importExpr(a.Identifiers.ElementRef).instantiate([this.renderNode]),this._instances.add(a.identifierToken(a.Identifiers.ElementRef),this.elementRef),this.injector=s.THIS_EXPR.callMethod("injector",[s.literal(this.nodeIndex)]),this._instances.add(a.identifierToken(a.Identifiers.Injector),this.injector),this._instances.add(a.identifierToken(a.Identifiers.Renderer),s.THIS_EXPR.prop("renderer")),(this.hasViewContainer||this.hasEmbeddedView||c.isPresent(this.component))&&this._createAppElement()}return o(e,t),e.createNull=function(){return new e(null,null,null,null,null,null,[],[],!1,!1,{})},e.prototype._createAppElement=function(){var t="_appEl_"+this.nodeIndex,e=this.isRootElement()?null:this.parent.nodeIndex;this.view.fields.push(new s.ClassField(t,s.importType(a.Identifiers.AppElement),[s.StmtModifier.Private]));var n=s.THIS_EXPR.prop(t).set(s.importExpr(a.Identifiers.AppElement).instantiate([s.literal(this.nodeIndex),s.literal(e),s.THIS_EXPR,this.renderNode])).toStmt();this.view.createMethod.addStmt(n),this.appElement=s.THIS_EXPR.prop(t),this._instances.add(a.identifierToken(a.Identifiers.AppElement),this.appElement)},e.prototype.setComponentView=function(t){this._compViewExpr=t,this.contentNodesByNgContentIndex=p.ListWrapper.createFixedSize(this.component.template.ngContentSelectors.length);for(var e=0;e=i})),r._directives.length>0&&i++,r=r.parent;return e=this.view.componentView.viewQueries.get(t),c.isPresent(e)&&p.ListWrapper.addAll(n,e),n},e.prototype._addQuery=function(t,e){var n="_query_"+t.selectors[0].name+"_"+this.nodeIndex+"_"+this._queryCount++,r=d.createQueryList(t,e,n,this.view),i=new d.CompileQuery(t,r,e,this.view);return d.addQueryToTokenMap(this._queries,i),i},e.prototype._getLocalDependency=function(t,e){var n=null;if(c.isBlank(n)&&c.isPresent(e.query)&&(n=this._addQuery(e.query,null).queryList),c.isBlank(n)&&c.isPresent(e.viewQuery)&&(n=d.createQueryList(e.viewQuery,null,"_viewQuery_"+e.viewQuery.selectors[0].name+"_"+this.nodeIndex+"_"+this._componentConstructorViewQueryLists.length,this.view),this._componentConstructorViewQueryLists.push(n)),c.isPresent(e.token)){if(c.isBlank(n)&&e.token.equalsTo(a.identifierToken(a.Identifiers.ChangeDetectorRef)))return t===l.ProviderAstType.Component?this._compViewExpr.prop("ref"):s.THIS_EXPR.prop("ref");c.isBlank(n)&&(n=this._instances.get(e.token))}return n},e.prototype._getDependency=function(t,e){var n=this,r=null;for(e.isValue&&(r=s.literal(e.value)),c.isBlank(r)&&!e.isSkipSelf&&(r=this._getLocalDependency(t,e));c.isBlank(r)&&!n.parent.isNull();)n=n.parent,r=n._getLocalDependency(l.ProviderAstType.PublicService,new h.CompileDiDependencyMetadata({token:e.token}));return c.isBlank(r)&&(r=f.injectFromViewParentInjector(e.token,e.isOptional)),c.isBlank(r)&&(r=s.NULL_EXPR),f.getPropertyInView(r,this.view,n.view)},e}(y);e.CompileElement=m;var g=function(){function t(t,e){this.query=t,this.read=c.isPresent(t.meta.read)?t.meta.read:e}return t}()},function(t,e,n){"use strict";function r(t,e){if(i.isBlank(e))return c.NULL_EXPR;var n=i.resolveEnumToken(t.runtime,e);return c.importExpr(new o.CompileIdentifierMetadata({name:t.name+"."+n,moduleUrl:t.moduleUrl,runtime:e}))}var i=n(5),o=n(155),s=n(28),a=n(36),u=n(68),c=n(164),p=n(158),l=function(){function t(){}return t.fromValue=function(t){return r(p.Identifiers.ViewType,t)},t.HOST=t.fromValue(u.ViewType.HOST),t.COMPONENT=t.fromValue(u.ViewType.COMPONENT),t.EMBEDDED=t.fromValue(u.ViewType.EMBEDDED),t}();e.ViewTypeEnum=l;var h=function(){function t(){}return t.fromValue=function(t){return r(p.Identifiers.ViewEncapsulation,t)},t.Emulated=t.fromValue(a.ViewEncapsulation.Emulated),t.Native=t.fromValue(a.ViewEncapsulation.Native),t.None=t.fromValue(a.ViewEncapsulation.None),t}();e.ViewEncapsulationEnum=h;var f=function(){function t(){}return t.fromValue=function(t){return r(p.Identifiers.ChangeDetectorState,t)},t.NeverChecked=t.fromValue(s.ChangeDetectorState.NeverChecked),t.CheckedBefore=t.fromValue(s.ChangeDetectorState.CheckedBefore),t.Errored=t.fromValue(s.ChangeDetectorState.Errored),t}();e.ChangeDetectorStateEnum=f;var d=function(){function t(){}return t.fromValue=function(t){return r(p.Identifiers.ChangeDetectionStrategy,t)},t.CheckOnce=t.fromValue(s.ChangeDetectionStrategy.CheckOnce),t.Checked=t.fromValue(s.ChangeDetectionStrategy.Checked),t.CheckAlways=t.fromValue(s.ChangeDetectionStrategy.CheckAlways),t.Detached=t.fromValue(s.ChangeDetectionStrategy.Detached),t.OnPush=t.fromValue(s.ChangeDetectionStrategy.OnPush),t.Default=t.fromValue(s.ChangeDetectionStrategy.Default),t}();e.ChangeDetectionStrategyEnum=d;var v=function(){function t(){}return t.viewUtils=c.variable("viewUtils"),t.parentInjector=c.variable("parentInjector"),t.declarationEl=c.variable("declarationEl"),t}();e.ViewConstructorVars=v;var y=function(){function t(){}return t.renderer=c.THIS_EXPR.prop("renderer"),t.projectableNodes=c.THIS_EXPR.prop("projectableNodes"),t.viewUtils=c.THIS_EXPR.prop("viewUtils"),t}();e.ViewProperties=y;var m=function(){function t(){}return t.event=c.variable("$event"),t}();e.EventHandlerVars=m;var g=function(){function t(){}return t.token=c.variable("token"),t.requestNodeIndex=c.variable("requestNodeIndex"),t.notFoundResult=c.variable("notFoundResult"),t}();e.InjectMethodVars=g;var _=function(){function t(){}return t.throwOnChange=c.variable("throwOnChange"),t.changes=c.variable("changes"),t.changed=c.variable("changed"),t.valUnwrapper=c.variable("valUnwrapper"),t}();e.DetectChangesVars=_},function(t,e,n){"use strict";function r(t,e,n){if(e===n)return t;for(var r=l.THIS_EXPR,i=e;i!==n&&c.isPresent(i.declarationElement.view);)i=i.declarationElement.view,r=r.prop("parent");if(i!==n)throw new p.BaseException("Internal error: Could not calculate a property in a parent view: "+t);if(t instanceof l.ReadPropExpr){var o=t;(n.fields.some(function(t){return t.name==o.name})||n.getters.some(function(t){return t.name==o.name}))&&(r=r.cast(n.classType))}return l.replaceVarInExpression(l.THIS_EXPR.name,r,t)}function i(t,e){var n=[s(t)];return e&&n.push(l.NULL_EXPR),l.THIS_EXPR.prop("parentInjector").callMethod("get",n)}function o(t,e){return"viewFactory_"+t.type.name+e}function s(t){return c.isPresent(t.value)?l.literal(t.value):t.identifierIsInstance?l.importExpr(t.identifier).instantiate([],l.importType(t.identifier,[],[l.TypeModifier.Const])):l.importExpr(t.identifier)}function a(t){for(var e=[],n=l.literalArr([]),r=0;r0&&(n=n.callMethod(l.BuiltinMethod.ConcatArray,[l.literalArr(e)]),e=[]),n=n.callMethod(l.BuiltinMethod.ConcatArray,[i])):e.push(i)}return e.length>0&&(n=n.callMethod(l.BuiltinMethod.ConcatArray,[l.literalArr(e)])),n}function u(t,e,n,r){r.fields.push(new l.ClassField(n.name,null,[l.StmtModifier.Private]));var i=e0?s.values[s.values.length-1]:null;if(e instanceof h&&e.view===t.embeddedView)s=e;else{var n=new h(t.embeddedView,[]);s.values.push(n),s=n}}),s.values.push(t),r.length>0&&e.dirtyParentQueriesMethod.addStmt(o.callMethod("setDirty",[]).toStmt())},t.prototype.afterChildren=function(t){var e=r(this._values),n=[this.queryList.callMethod("reset",[c.literalArr(e)]).toStmt()];if(a.isPresent(this.ownerDirectiveExpression)){var i=this.meta.first?this.queryList.prop("first"):this.queryList;n.push(this.ownerDirectiveExpression.prop(this.meta.propertyName).set(i).toStmt())}this.meta.first||n.push(this.queryList.callMethod("notifyOnChanges",[]).toStmt()),t.addStmt(new c.IfStmt(this.queryList.prop("dirty"),n))},t}();e.CompileQuery=f,e.createQueryList=o,e.addQueryToTokenMap=s},function(t,e,n){"use strict";var r=n(5),i=n(15),o=n(164),s=function(){function t(t,e){this.nodeIndex=t,this.sourceAst=e}return t}(),a=new s(null,null),u=function(){function t(t){this._view=t,this._newState=a,this._currState=a,this._bodyStatements=[],this._debugEnabled=this._view.genConfig.genDebugInfo}return t.prototype._updateDebugContextIfNeeded=function(){if(this._newState.nodeIndex!==this._currState.nodeIndex||this._newState.sourceAst!==this._currState.sourceAst){var t=this._updateDebugContext(this._newState);r.isPresent(t)&&this._bodyStatements.push(t.toStmt())}},t.prototype._updateDebugContext=function(t){if(this._currState=this._newState=t,this._debugEnabled){var e=r.isPresent(t.sourceAst)?t.sourceAst.sourceSpan.start:null;return o.THIS_EXPR.callMethod("debug",[o.literal(t.nodeIndex),r.isPresent(e)?o.literal(e.line):o.NULL_EXPR,r.isPresent(e)?o.literal(e.col):o.NULL_EXPR])}return null},t.prototype.resetDebugInfoExpr=function(t,e){var n=this._updateDebugContext(new s(t,e));return r.isPresent(n)?n:o.NULL_EXPR},t.prototype.resetDebugInfo=function(t,e){this._newState=new s(t,e)},t.prototype.addStmt=function(t){this._updateDebugContextIfNeeded(),this._bodyStatements.push(t)},t.prototype.addStmts=function(t){this._updateDebugContextIfNeeded(),i.ListWrapper.addAll(this._bodyStatements,t)},t.prototype.finish=function(){return this._bodyStatements},t.prototype.isEmpty=function(){return 0===this._bodyStatements.length},t}();e.CompileMethod=u},function(t,e,n){"use strict";function r(t,e){return e>0?l.ViewType.EMBEDDED:t.type.isHost?l.ViewType.HOST:l.ViewType.COMPONENT}var i=n(5),o=n(15),s=n(164),a=n(170),u=n(172),c=n(173),p=n(175),l=n(68),h=n(155),f=n(171),d=function(){function t(t,e,n,a,p,d,v){var y=this;this.component=t,this.genConfig=e,this.pipeMetas=n,this.styles=a,this.viewIndex=p,this.declarationElement=d,this.templateVariableBindings=v,this.nodes=[],this.rootNodesOrAppElements=[],this.bindings=[],this.classStatements=[],this.eventHandlerMethods=[],this.fields=[],this.getters=[],this.disposables=[],this.subscriptions=[],this.purePipes=new Map,this.pipes=[],this.variables=new Map,this.literalArrayCount=0,this.literalMapCount=0,this.pipeCount=0,this.createMethod=new c.CompileMethod(this),this.injectorGetMethod=new c.CompileMethod(this),this.updateContentQueriesMethod=new c.CompileMethod(this),this.dirtyParentQueriesMethod=new c.CompileMethod(this),this.updateViewQueriesMethod=new c.CompileMethod(this),this.detectChangesInInputsMethod=new c.CompileMethod(this),this.detectChangesRenderPropertiesMethod=new c.CompileMethod(this),this.afterContentLifecycleCallbacksMethod=new c.CompileMethod(this),this.afterViewLifecycleCallbacksMethod=new c.CompileMethod(this),this.destroyMethod=new c.CompileMethod(this),this.viewType=r(t,p),this.className="_View_"+t.type.name+p,this.classType=s.importType(new h.CompileIdentifierMetadata({name:this.className})),this.viewFactory=s.variable(f.getViewFactoryName(t,p)),this.viewType===l.ViewType.COMPONENT||this.viewType===l.ViewType.HOST?this.componentView=this:this.componentView=this.declarationElement.view.componentView;var m=new h.CompileTokenMap;if(this.viewType===l.ViewType.COMPONENT){var g=s.THIS_EXPR.prop("context");o.ListWrapper.forEachWithIndex(this.component.viewQueries,function(t,e){var n="_viewQuery_"+t.selectors[0].name+"_"+e,r=u.createQueryList(t,g,n,y),i=new u.CompileQuery(t,r,g,y);u.addQueryToTokenMap(m,i)});var _=0;this.component.type.diDeps.forEach(function(t){if(i.isPresent(t.viewQuery)){var e=s.THIS_EXPR.prop("declarationAppElement").prop("componentConstructorViewQueries").key(s.literal(_++)),n=new u.CompileQuery(t.viewQuery,e,null,y);u.addQueryToTokenMap(m,n)}})}this.viewQueries=m,v.forEach(function(t){y.variables.set(t[1],s.THIS_EXPR.prop("locals").key(s.literal(t[0])))}),this.declarationElement.isNull()||this.declarationElement.setEmbeddedView(this)}return t.prototype.callPipe=function(t,e,n){var r=this.componentView,o=r.purePipes.get(t);return i.isBlank(o)&&(o=new p.CompilePipe(r,t),o.pure&&r.purePipes.set(t,o),r.pipes.push(o)),o.call(this,[e].concat(n))},t.prototype.getVariable=function(t){if(t==a.EventHandlerVars.event.name)return a.EventHandlerVars.event;for(var e=this,n=e.variables.get(t);i.isBlank(n)&&i.isPresent(e.declarationElement.view);)e=e.declarationElement.view,n=e.variables.get(t);return i.isPresent(n)?f.getPropertyInView(n,this,e):null},t.prototype.createLiteralArray=function(t){for(var e=s.THIS_EXPR.prop("_arr_"+this.literalArrayCount++),n=[],r=[],i=0;i=0;r--){var s=t.pipeMetas[r];if(s.name==e){n=s;break}}if(i.isBlank(n))throw new o.BaseException("Illegal state: Could not find pipe "+e+" although the parser should have detected this error!");return n}var i=n(5),o=n(12),s=n(164),a=n(158),u=n(171),c=function(){function t(t,e){this.instance=t,this.argCount=e}return t}(),p=function(){function t(t,e){this.view=t,this._purePipeProxies=[],this.meta=r(t,e),this.instance=s.THIS_EXPR.prop("_pipe_"+e+"_"+t.pipeCount++)}return Object.defineProperty(t.prototype,"pure",{get:function(){return this.meta.pure},enumerable:!0,configurable:!0}),t.prototype.create=function(){var t=this,e=this.meta.type.diDeps.map(function(t){return t.token.equalsTo(a.identifierToken(a.Identifiers.ChangeDetectorRef))?s.THIS_EXPR.prop("ref"):u.injectFromViewParentInjector(t.token,!1)});this.view.fields.push(new s.ClassField(this.instance.name,s.importType(this.meta.type),[s.StmtModifier.Private])),this.view.createMethod.resetDebugInfo(null,null),this.view.createMethod.addStmt(s.THIS_EXPR.prop(this.instance.name).set(s.importExpr(this.meta.type).instantiate(e)).toStmt()),this._purePipeProxies.forEach(function(e){u.createPureProxy(t.instance.prop("transform").callMethod(s.BuiltinMethod.bind,[t.instance]),e.argCount,e.instance,t.view)})},t.prototype.call=function(t,e){if(this.meta.pure){var n=new c(s.THIS_EXPR.prop(this.instance.name+"_"+this._purePipeProxies.length),e.length);return this._purePipeProxies.push(n),u.getPropertyInView(s.importExpr(a.Identifiers.castByValue).callFn([n.instance,this.instance.prop("transform")]),t,this.view).callFn(e)}return u.getPropertyInView(this.instance,t,this.view).callMethod("transform",e)},t}();e.CompilePipe=p},function(t,e,n){"use strict";function r(t,e,n,r){var i=new L(t,n,r);return S.templateVisitAll(i,e,t.declarationElement.isNull()?t.declarationElement:t.declarationElement.parent),I.bindView(t,e),t.afterNodes(),c(t,r),i.nestedViewCount}function i(t,e){var n={};return _.StringMapWrapper.forEach(t,function(t,e){n[e]=t}),e.forEach(function(t){_.StringMapWrapper.forEach(t.hostAttributes,function(t,e){var r=n[e];n[e]=g.isPresent(r)?a(e,r,t):t})}),u(n)}function o(t){var e={};return t.forEach(function(t){e[t.name]=t.value}),e}function s(t,e,n){var r={},i=null;return e.forEach(function(t){t.directive.isComponent&&(i=t.directive),t.exportAsVars.forEach(function(e){r[e.name]=P.identifierToken(t.directive.type)})}),t.forEach(function(t){r[t.name]=g.isPresent(i)?P.identifierToken(i.type):null}),r}function a(t,e,n){return t==k||t==N?e+" "+n:n}function u(t){var e=[];_.StringMapWrapper.forEach(t,function(t,n){e.push([n,t])}),_.ListWrapper.sort(e,function(t,e){return g.StringWrapper.compare(t[0],e[0])});var n=[];return e.forEach(function(t){n.push([t[0],t[1]])}),n}function c(t,e){var n=b.NULL_EXPR;t.genConfig.genDebugInfo&&(n=b.variable("nodeDebugInfos_"+t.component.type.name+t.viewIndex),e.push(n.set(b.literalArr(t.nodes.map(p),new b.ArrayType(new b.ExternalType(P.Identifiers.StaticNodeDebugInfo),[b.TypeModifier.Const]))).toDeclStmt(null,[b.StmtModifier.Final])));var r=b.variable("renderType_"+t.component.type.name);0===t.viewIndex&&e.push(r.set(b.NULL_EXPR).toDeclStmt(b.importType(P.Identifiers.RenderComponentType)));var i=l(t,r,n);e.push(i),e.push(h(t,i,r))}function p(t){var e=t instanceof R.CompileElement?t:null,n=[],r=b.NULL_EXPR,i=[];return g.isPresent(e)&&(n=e.getProviderTokens(),g.isPresent(e.component)&&(r=O.createDiTokenExpression(P.identifierToken(e.component.type))),_.StringMapWrapper.forEach(e.variableTokens,function(t,e){i.push([e,g.isPresent(t)?O.createDiTokenExpression(t):b.NULL_EXPR])})),b.importExpr(P.Identifiers.StaticNodeDebugInfo).instantiate([b.literalArr(n,new b.ArrayType(b.DYNAMIC_TYPE,[b.TypeModifier.Const])),r,b.literalMap(i,new b.MapType(b.DYNAMIC_TYPE,[b.TypeModifier.Const]))],b.importType(P.Identifiers.StaticNodeDebugInfo,null,[b.TypeModifier.Const]))}function l(t,e,n){var r=t.templateVariableBindings.map(function(t){return[t[0],b.NULL_EXPR]}),i=[new b.FnParam(E.ViewConstructorVars.viewUtils.name,b.importType(P.Identifiers.ViewUtils)),new b.FnParam(E.ViewConstructorVars.parentInjector.name,b.importType(P.Identifiers.Injector)),new b.FnParam(E.ViewConstructorVars.declarationEl.name,b.importType(P.Identifiers.AppElement))],o=new b.ClassMethod(null,i,[b.SUPER_EXPR.callFn([b.variable(t.className),e,E.ViewTypeEnum.fromValue(t.viewType),b.literalMap(r),E.ViewConstructorVars.viewUtils,E.ViewConstructorVars.parentInjector,E.ViewConstructorVars.declarationEl,E.ChangeDetectionStrategyEnum.fromValue(m(t)),n]).toStmt()]),s=[new b.ClassMethod("createInternal",[new b.FnParam(V.name,b.STRING_TYPE)],f(t),b.importType(P.Identifiers.AppElement)),new b.ClassMethod("injectorGetInternal",[new b.FnParam(E.InjectMethodVars.token.name,b.DYNAMIC_TYPE),new b.FnParam(E.InjectMethodVars.requestNodeIndex.name,b.NUMBER_TYPE),new b.FnParam(E.InjectMethodVars.notFoundResult.name,b.DYNAMIC_TYPE)],v(t.injectorGetMethod.finish(),E.InjectMethodVars.notFoundResult),b.DYNAMIC_TYPE),new b.ClassMethod("detectChangesInternal",[new b.FnParam(E.DetectChangesVars.throwOnChange.name,b.BOOL_TYPE)],d(t)),new b.ClassMethod("dirtyParentQueriesInternal",[],t.dirtyParentQueriesMethod.finish()),new b.ClassMethod("destroyInternal",[],t.destroyMethod.finish())].concat(t.eventHandlerMethods),a=new b.ClassStmt(t.className,b.importExpr(P.Identifiers.AppView,[y(t)]),t.fields,t.getters,o,s.filter(function(t){return t.body.length>0}));return a}function h(t,e,n){var r,i=[new b.FnParam(E.ViewConstructorVars.viewUtils.name,b.importType(P.Identifiers.ViewUtils)),new b.FnParam(E.ViewConstructorVars.parentInjector.name,b.importType(P.Identifiers.Injector)),new b.FnParam(E.ViewConstructorVars.declarationEl.name,b.importType(P.Identifiers.AppElement))],o=[];return r=t.component.template.templateUrl==t.component.type.moduleUrl?t.component.type.moduleUrl+" class "+t.component.type.name+" - inline template":t.component.template.templateUrl,0===t.viewIndex&&(o=[new b.IfStmt(n.identical(b.NULL_EXPR),[n.set(E.ViewConstructorVars.viewUtils.callMethod("createRenderComponentType",[b.literal(r),b.literal(t.component.template.ngContentSelectors.length),E.ViewEncapsulationEnum.fromValue(t.component.template.encapsulation),t.styles])).toStmt()])]), +b.fn(i,o.concat([new b.ReturnStatement(b.variable(e.name).instantiate(e.constructorMethod.params.map(function(t){return b.variable(t.name)})))]),b.importType(P.Identifiers.AppView,[y(t)])).toDeclStmt(t.viewFactory.name,[b.StmtModifier.Final])}function f(t){var e=b.NULL_EXPR,n=[];t.viewType===T.ViewType.COMPONENT&&(e=E.ViewProperties.renderer.callMethod("createViewRoot",[b.THIS_EXPR.prop("declarationAppElement").prop("nativeElement")]),n=[D.set(e).toDeclStmt(b.importType(t.genConfig.renderTypes.renderNode),[b.StmtModifier.Final])]);var r;return r=t.viewType===T.ViewType.HOST?t.nodes[0].appElement:b.NULL_EXPR,n.concat(t.createMethod.finish()).concat([b.THIS_EXPR.callMethod("init",[O.createFlatArray(t.rootNodesOrAppElements),b.literalArr(t.nodes.map(function(t){return t.renderNode})),b.literalArr(t.disposables),b.literalArr(t.subscriptions)]).toStmt(),new b.ReturnStatement(r)])}function d(t){var e=[];if(t.detectChangesInInputsMethod.isEmpty()&&t.updateContentQueriesMethod.isEmpty()&&t.afterContentLifecycleCallbacksMethod.isEmpty()&&t.detectChangesRenderPropertiesMethod.isEmpty()&&t.updateViewQueriesMethod.isEmpty()&&t.afterViewLifecycleCallbacksMethod.isEmpty())return e;_.ListWrapper.addAll(e,t.detectChangesInInputsMethod.finish()),e.push(b.THIS_EXPR.callMethod("detectContentChildrenChanges",[E.DetectChangesVars.throwOnChange]).toStmt());var n=t.updateContentQueriesMethod.finish().concat(t.afterContentLifecycleCallbacksMethod.finish());n.length>0&&e.push(new b.IfStmt(b.not(E.DetectChangesVars.throwOnChange),n)),_.ListWrapper.addAll(e,t.detectChangesRenderPropertiesMethod.finish()),e.push(b.THIS_EXPR.callMethod("detectViewChildrenChanges",[E.DetectChangesVars.throwOnChange]).toStmt());var r=t.updateViewQueriesMethod.finish().concat(t.afterViewLifecycleCallbacksMethod.finish());r.length>0&&e.push(new b.IfStmt(b.not(E.DetectChangesVars.throwOnChange),r));var i=[],o=b.findReadVarNames(e);return _.SetWrapper.has(o,E.DetectChangesVars.changed.name)&&i.push(E.DetectChangesVars.changed.set(b.literal(!0)).toDeclStmt(b.BOOL_TYPE)),_.SetWrapper.has(o,E.DetectChangesVars.changes.name)&&i.push(E.DetectChangesVars.changes.set(b.NULL_EXPR).toDeclStmt(new b.MapType(b.importType(P.Identifiers.SimpleChange)))),_.SetWrapper.has(o,E.DetectChangesVars.valUnwrapper.name)&&i.push(E.DetectChangesVars.valUnwrapper.set(b.importExpr(P.Identifiers.ValueUnwrapper).instantiate([])).toDeclStmt(null,[b.StmtModifier.Final])),i.concat(e)}function v(t,e){return t.length>0?t.concat([new b.ReturnStatement(e)]):t}function y(t){var e=t.component.type;return e.isHost?b.DYNAMIC_TYPE:b.importType(e)}function m(t){var e;return e=t.viewType===T.ViewType.COMPONENT?w.isDefaultChangeDetectionStrategy(t.component.changeDetection)?w.ChangeDetectionStrategy.CheckAlways:w.ChangeDetectionStrategy.CheckOnce:w.ChangeDetectionStrategy.CheckAlways}var g=n(5),_=n(15),b=n(164),P=n(158),E=n(170),w=n(28),C=n(174),R=n(169),S=n(139),O=n(171),T=n(68),x=n(36),A=n(155),I=n(177),M="$implicit",k="class",N="style",D=b.variable("parentRenderNode"),V=b.variable("rootSelector"),j=function(){function t(t,e){this.comp=t,this.factoryPlaceholder=e}return t}();e.ViewCompileDependency=j,e.buildView=r;var L=function(){function t(t,e,n){this.view=t,this.targetDependencies=e,this.targetStatements=n,this.nestedViewCount=0}return t.prototype._isRootNode=function(t){return t.view!==this.view},t.prototype._addRootNodeAndProject=function(t,e,n){var r=t instanceof R.CompileElement&&t.hasViewContainer?t.appElement:null;this._isRootNode(n)?this.view.viewType!==T.ViewType.COMPONENT&&this.view.rootNodesOrAppElements.push(g.isPresent(r)?r:t.renderNode):g.isPresent(n.component)&&g.isPresent(e)&&n.addContentNode(e,g.isPresent(r)?r:t.renderNode)},t.prototype._getParentRenderNode=function(t){return this._isRootNode(t)?this.view.viewType===T.ViewType.COMPONENT?D:b.NULL_EXPR:g.isPresent(t.component)&&t.component.template.encapsulation!==x.ViewEncapsulation.Native?b.NULL_EXPR:t.renderNode},t.prototype.visitBoundText=function(t,e){return this._visitText(t,"",t.ngContentIndex,e)},t.prototype.visitText=function(t,e){return this._visitText(t,t.value,t.ngContentIndex,e)},t.prototype._visitText=function(t,e,n,r){var i="_text_"+this.view.nodes.length;this.view.fields.push(new b.ClassField(i,b.importType(this.view.genConfig.renderTypes.renderText),[b.StmtModifier.Private]));var o=b.THIS_EXPR.prop(i),s=new R.CompileNode(r,this.view,this.view.nodes.length,o,t),a=b.THIS_EXPR.prop(i).set(E.ViewProperties.renderer.callMethod("createText",[this._getParentRenderNode(r),b.literal(e),this.view.createMethod.resetDebugInfoExpr(this.view.nodes.length,t)])).toStmt();return this.view.nodes.push(s),this.view.createMethod.addStmt(a),this._addRootNodeAndProject(s,n,r),o},t.prototype.visitNgContent=function(t,e){this.view.createMethod.resetDebugInfo(null,t);var n=this._getParentRenderNode(e),r=E.ViewProperties.projectableNodes.key(b.literal(t.index),new b.ArrayType(b.importType(this.view.genConfig.renderTypes.renderNode)));return n!==b.NULL_EXPR?this.view.createMethod.addStmt(E.ViewProperties.renderer.callMethod("projectNodes",[n,b.importExpr(P.Identifiers.flattenNestedViewRenderNodes).callFn([r])]).toStmt()):this._isRootNode(e)?this.view.viewType!==T.ViewType.COMPONENT&&this.view.rootNodesOrAppElements.push(r):g.isPresent(e.component)&&g.isPresent(t.ngContentIndex)&&e.addContentNode(t.ngContentIndex,r),null},t.prototype.visitElement=function(t,e){var n,r=this.view.nodes.length,a=this.view.createMethod.resetDebugInfoExpr(r,t);n=0===r&&this.view.viewType===T.ViewType.HOST?b.THIS_EXPR.callMethod("selectOrCreateHostElement",[b.literal(t.name),V,a]):E.ViewProperties.renderer.callMethod("createElement",[this._getParentRenderNode(e),b.literal(t.name),a]);var u="_el_"+r;this.view.fields.push(new b.ClassField(u,b.importType(this.view.genConfig.renderTypes.renderElement),[b.StmtModifier.Private])),this.view.createMethod.addStmt(b.THIS_EXPR.prop(u).set(n).toStmt());for(var c=b.THIS_EXPR.prop(u),p=t.getComponent(),l=t.directives.map(function(t){return t.directive}),h=s(t.exportAsVars,t.directives,this.view.viewType),f=o(t.attrs),d=i(f,l),v=0;v0?t.value:M,t.name]}),a=t.directives.map(function(t){return t.directive}),u=new R.CompileElement(e,this.view,n,o,t,null,a,t.providers,t.hasViewContainer,!0,{});this.view.nodes.push(u),this.nestedViewCount++;var c=new C.CompileView(this.view.component,this.view.genConfig,this.view.pipeMetas,b.NULL_EXPR,this.view.viewIndex+this.nestedViewCount,u,s);return this.nestedViewCount+=r(c,t.children,this.targetDependencies,this.targetStatements),u.beforeChildren(),this._addRootNodeAndProject(u,t.ngContentIndex,e),u.afterChildren(0),null},t.prototype.visitAttr=function(t,e){return null},t.prototype.visitDirective=function(t,e){return null},t.prototype.visitEvent=function(t,e){return null},t.prototype.visitVariable=function(t,e){return null},t.prototype.visitDirectiveProperty=function(t,e){return null},t.prototype.visitElementProperty=function(t,e){return null},t}()},function(t,e,n){"use strict";function r(t,e){var n=new c(t);o.templateVisitAll(n,e),t.pipes.forEach(function(t){u.bindPipeDestroyLifecycleCallbacks(t.meta,t.instance,t.view)})}var i=n(15),o=n(139),s=n(178),a=n(181),u=n(182);e.bindView=r;var c=function(){function t(t){this.view=t,this._nodeIndex=0}return t.prototype.visitBoundText=function(t,e){var n=this.view.nodes[this._nodeIndex++];return s.bindRenderText(t,n,this.view),null},t.prototype.visitText=function(t,e){return this._nodeIndex++,null},t.prototype.visitNgContent=function(t,e){return null},t.prototype.visitElement=function(t,e){var n=this.view.nodes[this._nodeIndex++],r=a.collectEventListeners(t.outputs,t.directives,n);return s.bindRenderInputs(t.inputs,n),a.bindRenderOutputs(r),i.ListWrapper.forEachWithIndex(t.directives,function(t,e){var i=n.directiveInstances[e];s.bindDirectiveInputs(t,i,n),u.bindDirectiveDetectChangesLifecycleCallbacks(t,i,n),s.bindDirectiveHostProps(t,i,n),a.bindDirectiveOutputs(t,i,r)}),o.templateVisitAll(this,t.children,n),i.ListWrapper.forEachWithIndex(t.directives,function(t,e){var r=n.directiveInstances[e];u.bindDirectiveAfterContentLifecycleCallbacks(t.directive,r,n),u.bindDirectiveAfterViewLifecycleCallbacks(t.directive,r,n),u.bindDirectiveDestroyLifecycleCallbacks(t.directive,r,n)}),null},t.prototype.visitEmbeddedTemplate=function(t,e){var n=this.view.nodes[this._nodeIndex++],r=a.collectEventListeners(t.outputs,t.directives,n);return i.ListWrapper.forEachWithIndex(t.directives,function(t,e){var i=n.directiveInstances[e];s.bindDirectiveInputs(t,i,n),u.bindDirectiveDetectChangesLifecycleCallbacks(t,i,n),a.bindDirectiveOutputs(t,i,r),u.bindDirectiveAfterContentLifecycleCallbacks(t.directive,i,n),u.bindDirectiveAfterViewLifecycleCallbacks(t.directive,i,n),u.bindDirectiveDestroyLifecycleCallbacks(t.directive,i,n)}),null},t.prototype.visitAttr=function(t,e){return null},t.prototype.visitDirective=function(t,e){return null},t.prototype.visitEvent=function(t,e){return null},t.prototype.visitVariable=function(t,e){return null},t.prototype.visitDirectiveProperty=function(t,e){return null},t.prototype.visitElementProperty=function(t,e){return null},t}()},function(t,e,n){"use strict";function r(t){return h.THIS_EXPR.prop("_expr_"+t)}function i(t){return h.variable("currVal_"+t)}function o(t,e,n,r,i,o,s){var a=b.convertCdExpressionToIr(t,i,r,d.DetectChangesVars.valUnwrapper);if(!y.isBlank(a.expression)){if(t.fields.push(new h.ClassField(n.name,null,[h.StmtModifier.Private])),t.createMethod.addStmt(h.THIS_EXPR.prop(n.name).set(h.importExpr(f.Identifiers.uninitialized)).toStmt()),a.needsValueUnwrapper){var u=d.DetectChangesVars.valUnwrapper.callMethod("reset",[]).toStmt();s.addStmt(u)}s.addStmt(e.set(a.expression).toDeclStmt(null,[h.StmtModifier.Final]));var c=h.importExpr(f.Identifiers.checkBinding).callFn([d.DetectChangesVars.throwOnChange,n,e]);a.needsValueUnwrapper&&(c=d.DetectChangesVars.valUnwrapper.prop("hasWrappedValue").or(c)),s.addStmt(new h.IfStmt(c,o.concat([h.THIS_EXPR.prop(n.name).set(e).toStmt()])))}}function s(t,e,n){var s=n.bindings.length;n.bindings.push(new P.CompileBinding(e,t));var a=i(s),u=r(s);n.detectChangesRenderPropertiesMethod.resetDebugInfo(e.nodeIndex,t),o(n,a,u,t.value,h.THIS_EXPR.prop("context"),[h.THIS_EXPR.prop("renderer").callMethod("setText",[e.renderNode,a]).toStmt()],n.detectChangesRenderPropertiesMethod)}function a(t,e,n){var s=n.view,a=n.renderNode;t.forEach(function(t){var u=s.bindings.length;s.bindings.push(new P.CompileBinding(n,t)),s.detectChangesRenderPropertiesMethod.resetDebugInfo(n.nodeIndex,t);var c,p=r(u),f=i(u),d=f,m=[];switch(t.type){case v.PropertyBindingType.Property:c="setElementProperty",s.genConfig.logBindingUpdate&&m.push(l(a,t.name,f));break;case v.PropertyBindingType.Attribute:c="setElementAttribute",d=d.isBlank().conditional(h.NULL_EXPR,d.callMethod("toString",[]));break;case v.PropertyBindingType.Class:c="setElementClass";break;case v.PropertyBindingType.Style:c="setElementStyle";var g=d.callMethod("toString",[]);y.isPresent(t.unit)&&(g=g.plus(h.literal(t.unit))),d=d.isBlank().conditional(h.NULL_EXPR,g)}m.push(h.THIS_EXPR.prop("renderer").callMethod(c,[a,h.literal(t.name),d]).toStmt()),o(s,f,p,t.value,e,m,s.detectChangesRenderPropertiesMethod)})}function u(t,e){a(t,h.THIS_EXPR.prop("context"),e)}function c(t,e,n){a(t.hostProperties,e,n)}function p(t,e,n){if(0!==t.inputs.length){var s=n.view,a=s.detectChangesInInputsMethod;a.resetDebugInfo(n.nodeIndex,n.sourceAst);var u=t.directive.lifecycleHooks,c=-1!==u.indexOf(m.LifecycleHooks.OnChanges),p=t.directive.isComponent&&!g.isDefaultChangeDetectionStrategy(t.directive.changeDetection);c&&a.addStmt(d.DetectChangesVars.changes.set(h.NULL_EXPR).toStmt()),p&&a.addStmt(d.DetectChangesVars.changed.set(h.literal(!1)).toStmt()),t.inputs.forEach(function(t){var u=s.bindings.length;s.bindings.push(new P.CompileBinding(n,t)),a.resetDebugInfo(n.nodeIndex,t);var v=r(u),y=i(u),m=[e.prop(t.directiveName).set(y).toStmt()];c&&(m.push(new h.IfStmt(d.DetectChangesVars.changes.identical(h.NULL_EXPR),[d.DetectChangesVars.changes.set(h.literalMap([],new h.MapType(h.importType(f.Identifiers.SimpleChange)))).toStmt()])),m.push(d.DetectChangesVars.changes.key(h.literal(t.directiveName)).set(h.importExpr(f.Identifiers.SimpleChange).instantiate([v,y])).toStmt())),p&&m.push(d.DetectChangesVars.changed.set(h.literal(!0)).toStmt()),s.genConfig.logBindingUpdate&&m.push(l(n.renderNode,t.directiveName,y)),o(s,y,v,t.value,h.THIS_EXPR.prop("context"),m,a)}),p&&a.addStmt(new h.IfStmt(d.DetectChangesVars.changed,[n.appElement.prop("componentView").callMethod("markAsCheckOnce",[]).toStmt()]))}}function l(t,e,n){return h.THIS_EXPR.prop("renderer").callMethod("setBindingDebugInfo",[t,h.literal("ng-reflect-"+_.camelCaseToDashCase(e)),n.isBlank().conditional(h.NULL_EXPR,n.callMethod("toString",[]))]).toStmt()}var h=n(164),f=n(158),d=n(170),v=n(139),y=n(5),m=n(156),g=n(33),_=n(153),b=n(179),P=n(180);e.bindRenderText=s,e.bindRenderInputs=u,e.bindDirectiveHostProps=c,e.bindDirectiveInputs=p},function(t,e,n){"use strict";function r(t,e,n,r){var i=new y(t,e,r),o=n.visit(i,v.Expression);return new d(o,i.needsValueUnwrapper)}function i(t,e,n){var r=new y(t,e,null),i=[];return u(n.visit(r,v.Statement),i),i}function o(t,e){if(t!==v.Statement)throw new l.BaseException("Expected a statement, but saw "+e)}function s(t,e){if(t!==v.Expression)throw new l.BaseException("Expected an expression, but saw "+e)}function a(t,e){return t===v.Statement?e.toStmt():e}function u(t,e){h.isArray(t)?t.forEach(function(t){return u(t,e)}):e.push(t)}var c=n(164),p=n(158),l=n(12),h=n(5),f=c.variable("#implicit"),d=function(){function t(t,e){this.expression=t,this.needsValueUnwrapper=e}return t}();e.ExpressionWithWrappedValueInfo=d,e.convertCdExpressionToIr=r,e.convertCdStatementToIr=i;var v;!function(t){t[t.Statement=0]="Statement",t[t.Expression=1]="Expression"}(v||(v={}));var y=function(){function t(t,e,n){this._nameResolver=t,this._implicitReceiver=e,this._valueUnwrapper=n,this.needsValueUnwrapper=!1}return t.prototype.visitBinary=function(t,e){var n;switch(t.operation){case"+":n=c.BinaryOperator.Plus;break;case"-":n=c.BinaryOperator.Minus;break;case"*":n=c.BinaryOperator.Multiply;break;case"/":n=c.BinaryOperator.Divide;break;case"%":n=c.BinaryOperator.Modulo;break;case"&&":n=c.BinaryOperator.And;break;case"||":n=c.BinaryOperator.Or;break;case"==":n=c.BinaryOperator.Equals;break;case"!=":n=c.BinaryOperator.NotEquals;break;case"===":n=c.BinaryOperator.Identical;break;case"!==":n=c.BinaryOperator.NotIdentical;break;case"<":n=c.BinaryOperator.Lower;break;case">":n=c.BinaryOperator.Bigger;break;case"<=":n=c.BinaryOperator.LowerEquals;break;case">=":n=c.BinaryOperator.BiggerEquals;break;default:throw new l.BaseException("Unsupported operation "+t.operation)}return a(e,new c.BinaryOperatorExpr(n,t.left.visit(this,v.Expression),t.right.visit(this,v.Expression)))},t.prototype.visitChain=function(t,e){return o(e,t),this.visitAll(t.expressions,e)},t.prototype.visitConditional=function(t,e){var n=t.condition.visit(this,v.Expression);return a(e,n.conditional(t.trueExp.visit(this,v.Expression),t.falseExp.visit(this,v.Expression)))},t.prototype.visitPipe=function(t,e){var n=t.exp.visit(this,v.Expression),r=this.visitAll(t.args,v.Expression),i=this._nameResolver.callPipe(t.name,n,r);return this.needsValueUnwrapper=!0,a(e,this._valueUnwrapper.callMethod("unwrap",[i]))},t.prototype.visitFunctionCall=function(t,e){return a(e,t.target.visit(this,v.Expression).callFn(this.visitAll(t.args,v.Expression)))},t.prototype.visitImplicitReceiver=function(t,e){return s(e,t),f},t.prototype.visitInterpolation=function(t,e){s(e,t);for(var n=[c.literal(t.expressions.length)],r=0;r=0){var a=i[o],c=s(a),p=l.variable("pd_"+this._actionResultExprs.length);this._actionResultExprs.push(p),u.isPresent(c)&&(i[o]=p.set(c.cast(l.DYNAMIC_TYPE).notIdentical(l.literal(!1))).toDeclStmt(null,[l.StmtModifier.Final]))}this._method.addStmts(i)},t.prototype.finishMethod=function(){var t=this._hasComponentHostListener?this.compileElement.appElement.prop("componentView"):l.THIS_EXPR,e=l.literal(!0);this._actionResultExprs.forEach(function(t){e=e.and(t)});var n=[t.callMethod("markPathToRootAsCheckOnce",[]).toStmt()].concat(this._method.finish()).concat([new l.ReturnStatement(e)]);this.compileElement.view.eventHandlerMethods.push(new l.ClassMethod(this._methodName,[this._eventParam],n,l.BOOL_TYPE,[l.StmtModifier.Private]))},t.prototype.listenToRenderer=function(){var t,e=l.THIS_EXPR.callMethod("eventHandler",[l.fn([this._eventParam],[new l.ReturnStatement(l.THIS_EXPR.callMethod(this._methodName,[p.EventHandlerVars.event]))])]);t=u.isPresent(this.eventTarget)?p.ViewProperties.renderer.callMethod("listenGlobal",[l.literal(this.eventTarget),l.literal(this.eventName),e]):p.ViewProperties.renderer.callMethod("listen",[this.compileElement.renderNode,l.literal(this.eventName),e]);var n=l.variable("disposable_"+this.compileElement.view.disposables.length);this.compileElement.view.disposables.push(n),this.compileElement.view.createMethod.addStmt(n.set(t).toDeclStmt(l.FUNCTION_TYPE,[l.StmtModifier.Private]))},t.prototype.listenToDirective=function(t,e){var n=l.variable("subscription_"+this.compileElement.view.subscriptions.length);this.compileElement.view.subscriptions.push(n);var r=l.THIS_EXPR.callMethod("eventHandler",[l.fn([this._eventParam],[l.THIS_EXPR.callMethod(this._methodName,[p.EventHandlerVars.event]).toStmt()])]);this.compileElement.view.createMethod.addStmt(n.set(t.prop(e).callMethod(l.BuiltinMethod.SubscribeObservable,[r])).toDeclStmt(null,[l.StmtModifier.Final]))},t}();e.CompileEventListener=v,e.collectEventListeners=r,e.bindDirectiveOutputs=i,e.bindRenderOutputs=o},function(t,e,n){"use strict";function r(t,e,n){var r=n.view,i=r.detectChangesInInputsMethod,o=t.directive.lifecycleHooks;-1!==o.indexOf(p.LifecycleHooks.OnChanges)&&t.inputs.length>0&&i.addStmt(new u.IfStmt(c.DetectChangesVars.changes.notIdentical(u.NULL_EXPR),[e.callMethod("ngOnChanges",[c.DetectChangesVars.changes]).toStmt()])),-1!==o.indexOf(p.LifecycleHooks.OnInit)&&i.addStmt(new u.IfStmt(l.and(h),[e.callMethod("ngOnInit",[]).toStmt()])),-1!==o.indexOf(p.LifecycleHooks.DoCheck)&&i.addStmt(new u.IfStmt(h,[e.callMethod("ngDoCheck",[]).toStmt()]))}function i(t,e,n){var r=n.view,i=t.lifecycleHooks,o=r.afterContentLifecycleCallbacksMethod;o.resetDebugInfo(n.nodeIndex,n.sourceAst),-1!==i.indexOf(p.LifecycleHooks.AfterContentInit)&&o.addStmt(new u.IfStmt(l,[e.callMethod("ngAfterContentInit",[]).toStmt()])),-1!==i.indexOf(p.LifecycleHooks.AfterContentChecked)&&o.addStmt(e.callMethod("ngAfterContentChecked",[]).toStmt())}function o(t,e,n){var r=n.view,i=t.lifecycleHooks,o=r.afterViewLifecycleCallbacksMethod;o.resetDebugInfo(n.nodeIndex,n.sourceAst),-1!==i.indexOf(p.LifecycleHooks.AfterViewInit)&&o.addStmt(new u.IfStmt(l,[e.callMethod("ngAfterViewInit",[]).toStmt()])),-1!==i.indexOf(p.LifecycleHooks.AfterViewChecked)&&o.addStmt(e.callMethod("ngAfterViewChecked",[]).toStmt())}function s(t,e,n){var r=n.view.destroyMethod;r.resetDebugInfo(n.nodeIndex,n.sourceAst),-1!==t.lifecycleHooks.indexOf(p.LifecycleHooks.OnDestroy)&&r.addStmt(e.callMethod("ngOnDestroy",[]).toStmt())}function a(t,e,n){var r=n.destroyMethod;-1!==t.lifecycleHooks.indexOf(p.LifecycleHooks.OnDestroy)&&r.addStmt(e.callMethod("ngOnDestroy",[]).toStmt())}var u=n(164),c=n(170),p=n(156),l=u.THIS_EXPR.prop("cdState").identical(c.ChangeDetectorStateEnum.NeverChecked),h=u.not(c.DetectChangesVars.throwOnChange);e.bindDirectiveDetectChangesLifecycleCallbacks=r,e.bindDirectiveAfterContentLifecycleCallbacks=i,e.bindDirectiveAfterViewLifecycleCallbacks=o,e.bindDirectiveDestroyLifecycleCallbacks=s,e.bindPipeDestroyLifecycleCallbacks=a},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(155),s=n(5),a=n(12),u=n(40),c=n(184),p=n(157),l=n(152),h=n(6),f=n(36),d=n(145),v=n(144),y=n(151),m=function(){function t(t,e,n){this._xhr=t,this._urlResolver=e,this._htmlParser=n}return t.prototype.normalizeDirective=function(t){return t.isComponent?this.normalizeTemplate(t.type,t.template).then(function(e){return new o.CompileDirectiveMetadata({type:t.type,isComponent:t.isComponent,selector:t.selector,exportAs:t.exportAs,changeDetection:t.changeDetection,inputs:t.inputs,outputs:t.outputs,hostListeners:t.hostListeners,hostProperties:t.hostProperties,hostAttributes:t.hostAttributes,lifecycleHooks:t.lifecycleHooks,providers:t.providers,viewProviders:t.viewProviders,queries:t.queries,viewQueries:t.viewQueries,template:e})}):u.PromiseWrapper.resolve(t)},t.prototype.normalizeTemplate=function(t,e){var n=this;if(s.isPresent(e.template))return u.PromiseWrapper.resolve(this.normalizeLoadedTemplate(t,e,e.template,t.moduleUrl));if(s.isPresent(e.templateUrl)){var r=this._urlResolver.resolve(t.moduleUrl,e.templateUrl);return this._xhr.get(r).then(function(i){return n.normalizeLoadedTemplate(t,e,i,r)})}throw new a.BaseException("No template specified for component "+t.name)},t.prototype.normalizeLoadedTemplate=function(t,e,n,r){var i=this,s=this._htmlParser.parse(n,t.name);if(s.errors.length>0){var u=s.errors.join("\n");throw new a.BaseException("Template parse errors:\n"+u)}var c=new g;d.htmlVisitAll(c,s.rootNodes);var p=e.styles.concat(c.styles),h=c.styleUrls.filter(l.isStyleUrlResolvable).map(function(t){return i._urlResolver.resolve(r,t)}).concat(e.styleUrls.filter(l.isStyleUrlResolvable).map(function(e){return i._urlResolver.resolve(t.moduleUrl,e)})),v=p.map(function(t){var e=l.extractStyleUrls(i._urlResolver,r,t);return e.styleUrls.forEach(function(t){return h.push(t)}),e.style}),y=e.encapsulation;return y===f.ViewEncapsulation.Emulated&&0===v.length&&0===h.length&&(y=f.ViewEncapsulation.None),new o.CompileTemplateMetadata({encapsulation:y,template:n,templateUrl:r,styles:v,styleUrls:h,ngContentSelectors:c.ngContentSelectors})},t=r([h.Injectable(),i("design:paramtypes",[c.XHR,p.UrlResolver,v.HtmlParser])],t)}();e.DirectiveNormalizer=m;var g=function(){function t(){this.ngContentSelectors=[],this.styles=[],this.styleUrls=[],this.ngNonBindableStackCount=0}return t.prototype.visitElement=function(t,e){var n=y.preparseElement(t);switch(n.type){case y.PreparsedElementType.NG_CONTENT:0===this.ngNonBindableStackCount&&this.ngContentSelectors.push(n.selectAttr);break;case y.PreparsedElementType.STYLE:var r="";t.children.forEach(function(t){t instanceof d.HtmlTextAst&&(r+=t.value)}),this.styles.push(r);break;case y.PreparsedElementType.STYLESHEET:this.styleUrls.push(n.hrefAttr)}return n.nonBindable&&this.ngNonBindableStackCount++,d.htmlVisitAll(this,t.children),n.nonBindable&&this.ngNonBindableStackCount--,null},t.prototype.visitComment=function(t,e){return null},t.prototype.visitAttr=function(t,e){return null},t.prototype.visitText=function(t,e){return null},t.prototype.visitExpansion=function(t,e){return null},t.prototype.visitExpansionCase=function(t,e){return null},t}()},function(t,e){"use strict";var n=function(){function t(){}return t.prototype.get=function(t){return null},t}();e.XHR=n},function(t,e,n){"use strict";function r(t,e){var n=[];return h.isPresent(e)&&o(e,n),h.isPresent(t.directives)&&o(t.directives,n),n}function i(t,e){var n=[];return h.isPresent(e)&&o(e,n),h.isPresent(t.pipes)&&o(t.pipes,n),n}function o(t,e){for(var n=0;n0?r:"package:"+r+O.MODULE_SUFFIX}return t.importUri(e)}var u=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},c=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},p=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},l=n(6),h=n(5),f=n(15),d=n(12),v=n(23),y=n(155),m=n(26),g=n(4),_=n(186),b=n(187),P=n(188),E=n(189),w=n(156),C=n(18),R=n(6),S=n(84),O=n(153),T=n(190),x=n(157),A=n(24),I=n(17),M=n(7),k=n(4),N=n(20),D=function(){function t(t,e,n,r,i,o){this._directiveResolver=t,this._pipeResolver=e,this._viewResolver=n,this._platformDirectives=r,this._platformPipes=i,this._directiveCache=new Map,this._pipeCache=new Map,this._anonymousTypes=new Map,this._anonymousTypeIndex=0,h.isPresent(o)?this._reflector=o:this._reflector=C.reflector}return t.prototype.sanitizeTokenName=function(t){var e=h.stringify(t);if(e.indexOf("(")>=0){var n=this._anonymousTypes.get(t);h.isBlank(n)&&(this._anonymousTypes.set(t,this._anonymousTypeIndex++),n=this._anonymousTypes.get(t)),e="anonymous_token_"+n+"_"}return O.sanitizeIdentifier(e)},t.prototype.getDirectiveMetadata=function(t){var e=this._directiveCache.get(t);if(h.isBlank(e)){var n=this._directiveResolver.resolve(t),r=null,i=null,o=null,s=[];if(n instanceof m.ComponentMetadata){T.assertArrayOfStrings("styles",n.styles);var u=n;r=a(this._reflector,t,u);var c=this._viewResolver.resolve(t);T.assertArrayOfStrings("styles",c.styles),i=new y.CompileTemplateMetadata({encapsulation:c.encapsulation,template:c.template,templateUrl:c.templateUrl,styles:c.styles,styleUrls:c.styleUrls}),o=u.changeDetection,h.isPresent(n.viewProviders)&&(s=this.getProvidersMetadata(n.viewProviders))}var p=[];h.isPresent(n.providers)&&(p=this.getProvidersMetadata(n.providers));var l=[],f=[];h.isPresent(n.queries)&&(l=this.getQueriesMetadata(n.queries,!1), +f=this.getQueriesMetadata(n.queries,!0)),e=y.CompileDirectiveMetadata.create({selector:n.selector,exportAs:n.exportAs,isComponent:h.isPresent(i),type:this.getTypeMetadata(t,r),template:i,changeDetection:o,inputs:n.inputs,outputs:n.outputs,host:n.host,lifecycleHooks:w.LIFECYCLE_HOOKS_VALUES.filter(function(e){return E.hasLifecycleHook(e,t)}),providers:p,viewProviders:s,queries:l,viewQueries:f}),this._directiveCache.set(t,e)}return e},t.prototype.getTypeMetadata=function(t,e){return new y.CompileTypeMetadata({name:this.sanitizeTokenName(t),moduleUrl:e,runtime:t,diDeps:this.getDependenciesMetadata(t,null)})},t.prototype.getFactoryMetadata=function(t,e){return new y.CompileFactoryMetadata({name:this.sanitizeTokenName(t),moduleUrl:e,runtime:t,diDeps:this.getDependenciesMetadata(t,null)})},t.prototype.getPipeMetadata=function(t){var e=this._pipeCache.get(t);if(h.isBlank(e)){var n=this._pipeResolver.resolve(t),r=this._reflector.importUri(t);e=new y.CompilePipeMetadata({type:this.getTypeMetadata(t,r),name:n.name,pure:n.pure,lifecycleHooks:w.LIFECYCLE_HOOKS_VALUES.filter(function(e){return E.hasLifecycleHook(e,t)})}),this._pipeCache.set(t,e)}return e},t.prototype.getViewDirectivesMetadata=function(t){for(var e=this,n=this._viewResolver.resolve(t),i=r(n,this._platformDirectives),o=0;oo?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(6),a=n(5),u=n(12),c=n(15),p=n(3),l=n(18),h=n(20),f=function(){function t(t){a.isPresent(t)?this._reflector=t:this._reflector=l.reflector}return t.prototype.resolve=function(t){var e=this._reflector.annotations(s.resolveForwardRef(t));if(a.isPresent(e)){var n=e.find(r);if(a.isPresent(n)){var i=this._reflector.propMetadata(t);return this._mergeWithPropertyMetadata(n,i,t)}}throw new u.BaseException("No Directive annotation found on "+a.stringify(t))},t.prototype._mergeWithPropertyMetadata=function(t,e,n){var r=[],i=[],o={},s={};return c.StringMapWrapper.forEach(e,function(t,e){t.forEach(function(t){if(t instanceof p.InputMetadata&&(a.isPresent(t.bindingPropertyName)?r.push(e+": "+t.bindingPropertyName):r.push(e)),t instanceof p.OutputMetadata&&(a.isPresent(t.bindingPropertyName)?i.push(e+": "+t.bindingPropertyName):i.push(e)),t instanceof p.HostBindingMetadata&&(a.isPresent(t.hostPropertyName)?o["["+t.hostPropertyName+"]"]=e:o["["+e+"]"]=e),t instanceof p.HostListenerMetadata){var n=a.isPresent(t.args)?t.args.join(", "):"";o["("+t.eventName+")"]=e+"("+n+")"}t instanceof p.ContentChildrenMetadata&&(s[e]=t),t instanceof p.ViewChildrenMetadata&&(s[e]=t),t instanceof p.ContentChildMetadata&&(s[e]=t),t instanceof p.ViewChildMetadata&&(s[e]=t)})}),this._merge(t,r,i,o,s,n)},t.prototype._merge=function(t,e,n,r,i,o){var s,l=a.isPresent(t.inputs)?c.ListWrapper.concat(t.inputs,e):e;a.isPresent(t.outputs)?(t.outputs.forEach(function(t){if(c.ListWrapper.contains(n,t))throw new u.BaseException("Output event '"+t+"' defined multiple times in '"+a.stringify(o)+"'")}),s=c.ListWrapper.concat(t.outputs,n)):s=n;var h=a.isPresent(t.host)?c.StringMapWrapper.merge(t.host,r):r,f=a.isPresent(t.queries)?c.StringMapWrapper.merge(t.queries,i):i;return t instanceof p.ComponentMetadata?new p.ComponentMetadata({selector:t.selector,inputs:l,outputs:s,host:h,exportAs:t.exportAs,moduleId:t.moduleId,queries:f,changeDetection:t.changeDetection,providers:t.providers,viewProviders:t.viewProviders}):new p.DirectiveMetadata({selector:t.selector,inputs:l,outputs:s,host:h,exportAs:t.exportAs,queries:f,providers:t.providers})},t=i([s.Injectable(),o("design:paramtypes",[h.ReflectorReader])],t)}();e.DirectiveResolver=f,e.CODEGEN_DIRECTIVE_RESOLVER=new f(l.reflector)},function(t,e,n){"use strict";function r(t){return t instanceof c.PipeMetadata}var i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(6),a=n(5),u=n(12),c=n(3),p=n(20),l=n(18),h=function(){function t(t){a.isPresent(t)?this._reflector=t:this._reflector=l.reflector}return t.prototype.resolve=function(t){var e=this._reflector.annotations(s.resolveForwardRef(t));if(a.isPresent(e)){var n=e.find(r);if(a.isPresent(n))return n}throw new u.BaseException("No Pipe decorator found on "+a.stringify(t))},t=i([s.Injectable(),o("design:paramtypes",[p.ReflectorReader])],t)}();e.PipeResolver=h,e.CODEGEN_PIPE_RESOLVER=new h(l.reflector)},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(6),s=n(36),a=n(26),u=n(5),c=n(12),p=n(15),l=n(20),h=n(18),f=function(){function t(t){this._cache=new p.Map,u.isPresent(t)?this._reflector=t:this._reflector=h.reflector}return t.prototype.resolve=function(t){var e=this._cache.get(t);return u.isBlank(e)&&(e=this._resolve(t),this._cache.set(t,e)),e},t.prototype._resolve=function(t){var e,n;if(this._reflector.annotations(t).forEach(function(t){t instanceof s.ViewMetadata&&(n=t),t instanceof a.ComponentMetadata&&(e=t)}),!u.isPresent(e)){if(u.isBlank(n))throw new c.BaseException("Could not compile '"+u.stringify(t)+"' because it is not a component.");return n}if(u.isBlank(e.template)&&u.isBlank(e.templateUrl)&&u.isBlank(n))throw new c.BaseException("Component '"+u.stringify(t)+"' must have either 'template' or 'templateUrl' set.");if(u.isPresent(e.template)&&u.isPresent(n))this._throwMixingViewAndComponent("template",t);else if(u.isPresent(e.templateUrl)&&u.isPresent(n))this._throwMixingViewAndComponent("templateUrl",t);else if(u.isPresent(e.directives)&&u.isPresent(n))this._throwMixingViewAndComponent("directives",t);else if(u.isPresent(e.pipes)&&u.isPresent(n))this._throwMixingViewAndComponent("pipes",t);else if(u.isPresent(e.encapsulation)&&u.isPresent(n))this._throwMixingViewAndComponent("encapsulation",t);else if(u.isPresent(e.styles)&&u.isPresent(n))this._throwMixingViewAndComponent("styles",t);else{if(!u.isPresent(e.styleUrls)||!u.isPresent(n))return u.isPresent(n)?n:new s.ViewMetadata({templateUrl:e.templateUrl,template:e.template,directives:e.directives,pipes:e.pipes,encapsulation:e.encapsulation,styles:e.styles,styleUrls:e.styleUrls});this._throwMixingViewAndComponent("styleUrls",t)}return null},t.prototype._throwMixingViewAndComponent=function(t,e){throw new c.BaseException("Component '"+u.stringify(e)+"' cannot have both '"+t+"' and '@View' set at the same time\"")},t=r([o.Injectable(),i("design:paramtypes",[l.ReflectorReader])],t)}();e.ViewResolver=f},function(t,e,n){"use strict";function r(t,e){if(!(e instanceof i.Type))return!1;var n=e.prototype;switch(t){case o.LifecycleHooks.AfterContentInit:return!!n.ngAfterContentInit;case o.LifecycleHooks.AfterContentChecked:return!!n.ngAfterContentChecked;case o.LifecycleHooks.AfterViewInit:return!!n.ngAfterViewInit;case o.LifecycleHooks.AfterViewChecked:return!!n.ngAfterViewChecked;case o.LifecycleHooks.OnChanges:return!!n.ngOnChanges;case o.LifecycleHooks.DoCheck:return!!n.ngDoCheck;case o.LifecycleHooks.OnDestroy:return!!n.ngOnDestroy;case o.LifecycleHooks.OnInit:return!!n.ngOnInit;default:return!1}}var i=n(5),o=n(156);e.hasLifecycleHook=r},function(t,e,n){"use strict";function r(t,e){if(i.assertionsEnabled()&&!i.isBlank(e)){if(!i.isArray(e))throw new o.BaseException("Expected '"+t+"' to be an array of strings.");for(var n=0;nn;n++)e+=" ";return e}var o=n(5),s=n(12),a=n(164),u=/'|\\|\n|\r|\$/g;e.CATCH_ERROR_VAR=a.variable("error"),e.CATCH_STACK_VAR=a.variable("stack");var c=function(){function t(){}return t}();e.OutputEmitter=c;var p=function(){function t(t){this.indent=t,this.parts=[]}return t}(),l=function(){function t(t,e){this._exportedVars=t,this._indent=e,this._classes=[],this._lines=[new p(e)]}return t.createRoot=function(e){return new t(e,0)},Object.defineProperty(t.prototype,"_currentLine",{get:function(){return this._lines[this._lines.length-1]},enumerable:!0,configurable:!0}),t.prototype.isExportedVar=function(t){return-1!==this._exportedVars.indexOf(t)},t.prototype.println=function(t){void 0===t&&(t=""),this.print(t,!0)},t.prototype.lineIsEmpty=function(){return 0===this._currentLine.parts.length},t.prototype.print=function(t,e){void 0===e&&(e=!1),t.length>0&&this._currentLine.parts.push(t),e&&this._lines.push(new p(this._indent))},t.prototype.removeEmptyLastLine=function(){this.lineIsEmpty()&&this._lines.pop()},t.prototype.incIndent=function(){this._indent++,this._currentLine.indent=this._indent},t.prototype.decIndent=function(){this._indent--,this._currentLine.indent=this._indent},t.prototype.pushClass=function(t){this._classes.push(t)},t.prototype.popClass=function(){return this._classes.pop()},Object.defineProperty(t.prototype,"currentClass",{get:function(){return this._classes.length>0?this._classes[this._classes.length-1]:null},enumerable:!0,configurable:!0}),t.prototype.toSource=function(){var t=this._lines;return 0===t[t.length-1].parts.length&&(t=t.slice(0,t.length-1)),t.map(function(t){return t.parts.length>0?i(t.indent)+t.parts.join(""):""}).join("\n")},t}();e.EmitterVisitorContext=l;var h=function(){function t(t){this._escapeDollarInStrings=t}return t.prototype.visitExpressionStmt=function(t,e){return t.expr.visitExpression(this,e),e.println(";"),null},t.prototype.visitReturnStmt=function(t,e){return e.print("return "),t.value.visitExpression(this,e),e.println(";"),null},t.prototype.visitIfStmt=function(t,e){e.print("if ("),t.condition.visitExpression(this,e),e.print(") {");var n=o.isPresent(t.falseCase)&&t.falseCase.length>0;return t.trueCase.length<=1&&!n?(e.print(" "),this.visitAllStatements(t.trueCase,e),e.removeEmptyLastLine(),e.print(" ")):(e.println(),e.incIndent(),this.visitAllStatements(t.trueCase,e),e.decIndent(),n&&(e.println("} else {"),e.incIndent(),this.visitAllStatements(t.falseCase,e),e.decIndent())),e.println("}"),null},t.prototype.visitThrowStmt=function(t,e){return e.print("throw "),t.error.visitExpression(this,e),e.println(";"),null},t.prototype.visitCommentStmt=function(t,e){var n=t.comment.split("\n");return n.forEach(function(t){e.println("// "+t)}),null},t.prototype.visitWriteVarExpr=function(t,e){var n=e.lineIsEmpty();return n||e.print("("),e.print(t.name+" = "),t.value.visitExpression(this,e),n||e.print(")"),null},t.prototype.visitWriteKeyExpr=function(t,e){var n=e.lineIsEmpty();return n||e.print("("),t.receiver.visitExpression(this,e),e.print("["),t.index.visitExpression(this,e),e.print("] = "),t.value.visitExpression(this,e),n||e.print(")"),null},t.prototype.visitWritePropExpr=function(t,e){var n=e.lineIsEmpty();return n||e.print("("),t.receiver.visitExpression(this,e),e.print("."+t.name+" = "),t.value.visitExpression(this,e),n||e.print(")"),null},t.prototype.visitInvokeMethodExpr=function(t,e){t.receiver.visitExpression(this,e);var n=t.name;return o.isPresent(t.builtin)&&(n=this.getBuiltinMethodName(t.builtin),o.isBlank(n))?null:(e.print("."+n+"("),this.visitAllExpressions(t.args,e,","),e.print(")"),null)},t.prototype.visitInvokeFunctionExpr=function(t,e){return t.fn.visitExpression(this,e),e.print("("),this.visitAllExpressions(t.args,e,","),e.print(")"),null},t.prototype.visitReadVarExpr=function(t,n){var r=t.name;if(o.isPresent(t.builtin))switch(t.builtin){case a.BuiltinVar.Super:r="super";break;case a.BuiltinVar.This:r="this";break;case a.BuiltinVar.CatchError:r=e.CATCH_ERROR_VAR.name;break;case a.BuiltinVar.CatchStack:r=e.CATCH_STACK_VAR.name;break;default:throw new s.BaseException("Unknown builtin variable "+t.builtin)}return n.print(r),null},t.prototype.visitInstantiateExpr=function(t,e){return e.print("new "),t.classExpr.visitExpression(this,e),e.print("("),this.visitAllExpressions(t.args,e,","),e.print(")"),null},t.prototype.visitLiteralExpr=function(t,e){var n=t.value;return o.isString(n)?e.print(r(n,this._escapeDollarInStrings)):o.isBlank(n)?e.print("null"):e.print(""+n),null},t.prototype.visitConditionalExpr=function(t,e){return t.condition.visitExpression(this,e),e.print("? "),t.trueCase.visitExpression(this,e),e.print(": "),t.falseCase.visitExpression(this,e),null},t.prototype.visitNotExpr=function(t,e){return e.print("!"),t.condition.visitExpression(this,e),null},t.prototype.visitBinaryOperatorExpr=function(t,e){var n;switch(t.operator){case a.BinaryOperator.Equals:n="==";break;case a.BinaryOperator.Identical:n="===";break;case a.BinaryOperator.NotEquals:n="!=";break;case a.BinaryOperator.NotIdentical:n="!==";break;case a.BinaryOperator.And:n="&&";break;case a.BinaryOperator.Or:n="||";break;case a.BinaryOperator.Plus:n="+";break;case a.BinaryOperator.Minus:n="-";break;case a.BinaryOperator.Divide:n="/";break;case a.BinaryOperator.Multiply:n="*";break;case a.BinaryOperator.Modulo:n="%";break;case a.BinaryOperator.Lower:n="<";break;case a.BinaryOperator.LowerEquals:n="<=";break;case a.BinaryOperator.Bigger:n=">";break;case a.BinaryOperator.BiggerEquals:n=">=";break;default:throw new s.BaseException("Unknown operator "+t.operator)}return e.print("("),t.lhs.visitExpression(this,e),e.print(" "+n+" "),t.rhs.visitExpression(this,e),e.print(")"),null},t.prototype.visitReadPropExpr=function(t,e){return t.receiver.visitExpression(this,e),e.print("."),e.print(t.name),null},t.prototype.visitReadKeyExpr=function(t,e){return t.receiver.visitExpression(this,e),e.print("["),t.index.visitExpression(this,e),e.print("]"),null},t.prototype.visitLiteralArrayExpr=function(t,e){var n=t.entries.length>1;return e.print("[",n),e.incIndent(),this.visitAllExpressions(t.entries,e,",",n),e.decIndent(),e.print("]",n),null},t.prototype.visitLiteralMapExpr=function(t,e){var n=this,i=t.entries.length>1;return e.print("{",i),e.incIndent(),this.visitAllObjects(function(t){e.print(r(t[0],n._escapeDollarInStrings)+": "),t[1].visitExpression(n,e)},t.entries,e,",",i),e.decIndent(),e.print("}",i),null},t.prototype.visitAllExpressions=function(t,e,n,r){var i=this;void 0===r&&(r=!1),this.visitAllObjects(function(t){return t.visitExpression(i,e)},t,e,n,r)},t.prototype.visitAllObjects=function(t,e,n,r,i){void 0===i&&(i=!1);for(var o=0;o0&&n.print(r,i),t(e[o]);i&&n.println()},t.prototype.visitAllStatements=function(t,e){var n=this;t.forEach(function(t){return t.visitStatement(n,e)})},t}();e.AbstractEmitterVisitor=h,e.escapeSingleQuoteString=r},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(5),o=n(12),s=n(164),a=n(192),u=function(t){function e(){t.call(this,!1)}return r(e,t),e.prototype.visitDeclareClassStmt=function(t,e){var n=this;return e.pushClass(t),this._visitClassConstructor(t,e),i.isPresent(t.parent)&&(e.print(t.name+".prototype = Object.create("),t.parent.visitExpression(this,e),e.println(".prototype);")),t.getters.forEach(function(r){return n._visitClassGetter(t,r,e)}),t.methods.forEach(function(r){return n._visitClassMethod(t,r,e)}),e.popClass(),null},e.prototype._visitClassConstructor=function(t,e){e.print("function "+t.name+"("),i.isPresent(t.constructorMethod)&&this._visitParams(t.constructorMethod.params,e),e.println(") {"),e.incIndent(),i.isPresent(t.constructorMethod)&&t.constructorMethod.body.length>0&&(e.println("var self = this;"),this.visitAllStatements(t.constructorMethod.body,e)),e.decIndent(),e.println("}")},e.prototype._visitClassGetter=function(t,e,n){n.println("Object.defineProperty("+t.name+".prototype, '"+e.name+"', { get: function() {"),n.incIndent(),e.body.length>0&&(n.println("var self = this;"),this.visitAllStatements(e.body,n)),n.decIndent(),n.println("}});")},e.prototype._visitClassMethod=function(t,e,n){n.print(t.name+".prototype."+e.name+" = function("),this._visitParams(e.params,n),n.println(") {"),n.incIndent(),e.body.length>0&&(n.println("var self = this;"),this.visitAllStatements(e.body,n)),n.decIndent(),n.println("};")},e.prototype.visitReadVarExpr=function(e,n){if(e.builtin===s.BuiltinVar.This)n.print("self");else{if(e.builtin===s.BuiltinVar.Super)throw new o.BaseException("'super' needs to be handled at a parent ast node, not at the variable level!");t.prototype.visitReadVarExpr.call(this,e,n)}return null},e.prototype.visitDeclareVarStmt=function(t,e){return e.print("var "+t.name+" = "),t.value.visitExpression(this,e),e.println(";"),null},e.prototype.visitCastExpr=function(t,e){return t.value.visitExpression(this,e),null},e.prototype.visitInvokeFunctionExpr=function(e,n){var r=e.fn;return r instanceof s.ReadVarExpr&&r.builtin===s.BuiltinVar.Super?(n.currentClass.parent.visitExpression(this,n),n.print(".call(this"),e.args.length>0&&(n.print(", "),this.visitAllExpressions(e.args,n,",")),n.print(")")):t.prototype.visitInvokeFunctionExpr.call(this,e,n),null},e.prototype.visitFunctionExpr=function(t,e){return e.print("function("),this._visitParams(t.params,e),e.println(") {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.print("}"),null},e.prototype.visitDeclareFunctionStmt=function(t,e){return e.print("function "+t.name+"("),this._visitParams(t.params,e),e.println(") {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.println("}"),null},e.prototype.visitTryCatchStmt=function(t,e){e.println("try {"),e.incIndent(),this.visitAllStatements(t.bodyStmts,e),e.decIndent(),e.println("} catch ("+a.CATCH_ERROR_VAR.name+") {"),e.incIndent();var n=[a.CATCH_STACK_VAR.set(a.CATCH_ERROR_VAR.prop("stack")).toDeclStmt(null,[s.StmtModifier.Final])].concat(t.catchStmts);return this.visitAllStatements(n,e),e.decIndent(),e.println("}"),null},e.prototype._visitParams=function(t,e){this.visitAllObjects(function(t){return e.print(t.name)},t,e,",")},e.prototype.getBuiltinMethodName=function(t){var e;switch(t){case s.BuiltinMethod.ConcatArray:e="concat";break;case s.BuiltinMethod.SubscribeObservable:e="subscribe";break;case s.BuiltinMethod.bind:e="bind";break;default:throw new o.BaseException("Unknown builtin method: "+t)}return e},e}(a.AbstractEmitterVisitor);e.AbstractJsEmitterVisitor=u},function(t,e,n){"use strict";function r(t,e,n){var r=t.concat([new c.ReturnStatement(c.variable(e))]),i=new y(null,null,null,null,new Map,new Map,new Map,new Map,n),o=new _,s=o.visitAllStatements(r,i);return a.isPresent(s)?s.value:null}function i(t){return a.IS_DART?t instanceof v:a.isPresent(t)&&a.isPresent(t.props)&&a.isPresent(t.getters)&&a.isPresent(t.methods)}function o(t,e,n,r,i){for(var o=r.createChildWihtLocalVars(),s=0;si();case c.BinaryOperator.BiggerEquals:return r()>=i();default:throw new l.BaseException("Unknown operator "+t.operator)}},t.prototype.visitReadPropExpr=function(t,e){var n,r=t.receiver.visitExpression(this,e);if(i(r)){var o=r;n=o.props.has(t.name)?o.props.get(t.name):o.getters.has(t.name)?o.getters.get(t.name)():o.methods.has(t.name)?o.methods.get(t.name):p.reflector.getter(t.name)(r)}else n=p.reflector.getter(t.name)(r);return n},t.prototype.visitReadKeyExpr=function(t,e){var n=t.receiver.visitExpression(this,e),r=t.index.visitExpression(this,e);return n[r]},t.prototype.visitLiteralArrayExpr=function(t,e){return this.visitAllExpressions(t.entries,e)},t.prototype.visitLiteralMapExpr=function(t,e){var n=this,r={};return t.entries.forEach(function(t){return r[t[0]]=t[1].visitExpression(n,e)}),r},t.prototype.visitAllExpressions=function(t,e){var n=this;return t.map(function(t){return t.visitExpression(n,e)})},t.prototype.visitAllStatements=function(t,e){for(var n=0;n0?i(n[0]):null;a.isPresent(r)&&(e.print(": "),r.visitExpression(this,e),n=n.slice(1)),e.println(" {"),e.incIndent(),this.visitAllStatements(n,e),e.decIndent(),e.println("}")},e.prototype._visitClassMethod=function(t,e){a.isPresent(t.type)?t.type.visitType(this,e):e.print("void"),e.print(" "+t.name+"("),this._visitParams(t.params,e),e.println(") {"),e.incIndent(),this.visitAllStatements(t.body,e),e.decIndent(),e.println("}")},e.prototype.visitFunctionExpr=function(t,e){return e.print("("),this._visitParams(t.params,e),e.println(") {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.print("}"),null},e.prototype.visitDeclareFunctionStmt=function(t,e){return a.isPresent(t.type)?t.type.visitType(this,e):e.print("void"),e.print(" "+t.name+"("),this._visitParams(t.params,e),e.println(") {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.println("}"),null},e.prototype.getBuiltinMethodName=function(t){var e;switch(t){case c.BuiltinMethod.ConcatArray:e=".addAll";break;case c.BuiltinMethod.SubscribeObservable:e="listen";break;case c.BuiltinMethod.bind:e=null;break;default:throw new u.BaseException("Unknown builtin method: "+t)}return e},e.prototype.visitTryCatchStmt=function(t,e){return e.println("try {"),e.incIndent(),this.visitAllStatements(t.bodyStmts,e),e.decIndent(),e.println("} catch ("+p.CATCH_ERROR_VAR.name+", "+p.CATCH_STACK_VAR.name+") {"),e.incIndent(),this.visitAllStatements(t.catchStmts,e),e.decIndent(),e.println("}"),null},e.prototype.visitBinaryOperatorExpr=function(e,n){switch(e.operator){case c.BinaryOperator.Identical:n.print("identical("),e.lhs.visitExpression(this,n),n.print(", "),e.rhs.visitExpression(this,n),n.print(")");break;case c.BinaryOperator.NotIdentical:n.print("!identical("),e.lhs.visitExpression(this,n),n.print(", "),e.rhs.visitExpression(this,n),n.print(")");break;default:t.prototype.visitBinaryOperatorExpr.call(this,e,n)}return null},e.prototype.visitLiteralArrayExpr=function(e,n){return o(e.type)&&n.print("const "),t.prototype.visitLiteralArrayExpr.call(this,e,n)},e.prototype.visitLiteralMapExpr=function(e,n){return o(e.type)&&n.print("const "),a.isPresent(e.valueType)&&(n.print("")),t.prototype.visitLiteralMapExpr.call(this,e,n)},e.prototype.visitInstantiateExpr=function(t,e){return e.print(o(t.type)?"const":"new"),e.print(" "),t.classExpr.visitExpression(this,e),e.print("("),this.visitAllExpressions(t.args,e,","),e.print(")"),null},e.prototype.visitBuiltintType=function(t,e){var n;switch(t.name){case c.BuiltinTypeName.Bool:n="bool";break;case c.BuiltinTypeName.Dynamic:n="dynamic";break;case c.BuiltinTypeName.Function:n="Function";break;case c.BuiltinTypeName.Number:n="num";break;case c.BuiltinTypeName.Int:n="int";break;case c.BuiltinTypeName.String:n="String";break;default:throw new u.BaseException("Unsupported builtin type "+t.name)}return e.print(n),null},e.prototype.visitExternalType=function(t,e){return this._visitIdentifier(t.value,t.typeParams,e),null},e.prototype.visitArrayType=function(t,e){return e.print("List<"),a.isPresent(t.of)?t.of.visitType(this,e):e.print("dynamic"),e.print(">"),null},e.prototype.visitMapType=function(t,e){return e.print("Map"),null},e.prototype._visitParams=function(t,e){var n=this;this.visitAllObjects(function(t){a.isPresent(t.type)&&(t.type.visitType(n,e),e.print(" ")),e.print(t.name)},t,e,",")},e.prototype._visitIdentifier=function(t,e,n){var r=this;if(a.isPresent(t.moduleUrl)&&t.moduleUrl!=this._moduleUrl){var i=this.importsWithPrefixes.get(t.moduleUrl);a.isBlank(i)&&(i="import"+this.importsWithPrefixes.size,this.importsWithPrefixes.set(t.moduleUrl,i)),n.print(i+".")}n.print(t.name),a.isPresent(e)&&e.length>0&&(n.print("<"),this.visitAllObjects(function(t){return t.visitType(r,n)},e,n,","),n.print(">"))},e}(p.AbstractEmitterVisitor)},function(t,e,n){"use strict";function r(t,e,n){var r=n===l.Dart?"package:":"",o=h.parse(t,!1),u=h.parse(e,!0);if(a.isBlank(u))return e;if(o.firstLevelDir==u.firstLevelDir&&o.packageName==u.packageName)return i(o.modulePath,u.modulePath,n);if("lib"==u.firstLevelDir)return""+r+u.packageName+"/"+u.modulePath;throw new s.BaseException("Can't import url "+e+" from "+t)}function i(t,e,n){for(var r=t.split(p),i=e.split(p),s=o(r,i),a=[],u=r.length-1-s,h=0;u>h;h++)a.push("..");0>=u&&n===l.JS&&a.push(".");for(var h=s;hn&&t[n]==e[n];)n++;return n}var s=n(12),a=n(5),u=/asset:([^\/]+)\/([^\/]+)\/(.+)/g,c="/",p=/\//g;!function(t){t[t.Dart=0]="Dart",t[t.JS=1]="JS"}(e.ImportEnv||(e.ImportEnv={}));var l=e.ImportEnv;e.getImportModulePath=r;var h=function(){function t(t,e,n){this.packageName=t,this.firstLevelDir=e,this.modulePath=n}return t.parse=function(e,n){var r=a.RegExpWrapper.firstMatch(u,e);if(a.isPresent(r))return new t(r[1],r[2],r[3]);if(n)return null;throw new s.BaseException("Url "+e+" is not a valid asset: url")},t}();e.getRelativePath=i,e.getLongestPathSegmentPrefix=o},function(t,e,n){"use strict";function r(t){var e,n=new h(p),r=u.EmitterVisitorContext.createRoot([]);return e=s.isArray(t)?t:[t],e.forEach(function(t){if(t instanceof o.Statement)t.visitStatement(n,r);else if(t instanceof o.Expression)t.visitExpression(n,r);else{if(!(t instanceof o.Type))throw new a.BaseException("Don't know how to print debug info for "+t);t.visitType(n,r)}}),r.toSource()}var i=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=n(164),s=n(5),a=n(12),u=n(192),c=n(196),p="asset://debug/lib";e.debugOutputAstAsTypeScript=r;var l=function(){function t(){}return t.prototype.emitStatements=function(t,e,n){var r=new h(t),i=u.EmitterVisitorContext.createRoot(n);r.visitAllStatements(e,i);var o=[];return r.importsWithPrefixes.forEach(function(e,n){o.push("imp"+("ort * as "+e+" from '"+c.getImportModulePath(t,n,c.ImportEnv.JS)+"';"))}),o.push(i.toSource()),o.join("\n")},t}();e.TypeScriptEmitter=l;var h=function(t){function e(e){t.call(this,!1),this._moduleUrl=e,this.importsWithPrefixes=new Map}return i(e,t),e.prototype.visitExternalExpr=function(t,e){return this._visitIdentifier(t.value,t.typeParams,e),null},e.prototype.visitDeclareVarStmt=function(t,e){return e.isExportedVar(t.name)&&e.print("export "),t.hasModifier(o.StmtModifier.Final)?e.print("const"):e.print("var"),e.print(" "+t.name),s.isPresent(t.type)&&(e.print(":"),t.type.visitType(this,e)),e.print(" = "),t.value.visitExpression(this,e),e.println(";"),null},e.prototype.visitCastExpr=function(t,e){return e.print("(<"),t.type.visitType(this,e),e.print(">"),t.value.visitExpression(this,e),e.print(")"),null},e.prototype.visitDeclareClassStmt=function(t,e){var n=this;return e.pushClass(t),e.isExportedVar(t.name)&&e.print("export "),e.print("class "+t.name),s.isPresent(t.parent)&&(e.print(" extends "),t.parent.visitExpression(this,e)),e.println(" {"),e.incIndent(),t.fields.forEach(function(t){return n._visitClassField(t,e)}),s.isPresent(t.constructorMethod)&&this._visitClassConstructor(t,e),t.getters.forEach(function(t){return n._visitClassGetter(t,e)}),t.methods.forEach(function(t){return n._visitClassMethod(t,e)}),e.decIndent(),e.println("}"),e.popClass(),null},e.prototype._visitClassField=function(t,e){t.hasModifier(o.StmtModifier.Private)&&e.print("private "),e.print(t.name),s.isPresent(t.type)?(e.print(":"),t.type.visitType(this,e)):e.print(": any"),e.println(";")},e.prototype._visitClassGetter=function(t,e){t.hasModifier(o.StmtModifier.Private)&&e.print("private "),e.print("get "+t.name+"()"),s.isPresent(t.type)&&(e.print(":"),t.type.visitType(this,e)),e.println(" {"),e.incIndent(),this.visitAllStatements(t.body,e),e.decIndent(),e.println("}")},e.prototype._visitClassConstructor=function(t,e){e.print("constructor("),this._visitParams(t.constructorMethod.params,e),e.println(") {"),e.incIndent(),this.visitAllStatements(t.constructorMethod.body,e),e.decIndent(),e.println("}")},e.prototype._visitClassMethod=function(t,e){t.hasModifier(o.StmtModifier.Private)&&e.print("private "),e.print(t.name+"("),this._visitParams(t.params,e),e.print("):"),s.isPresent(t.type)?t.type.visitType(this,e):e.print("void"),e.println(" {"),e.incIndent(),this.visitAllStatements(t.body,e),e.decIndent(),e.println("}")},e.prototype.visitFunctionExpr=function(t,e){return e.print("("),this._visitParams(t.params,e),e.print("):"),s.isPresent(t.type)?t.type.visitType(this,e):e.print("void"),e.println(" => {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.print("}"),null},e.prototype.visitDeclareFunctionStmt=function(t,e){return e.isExportedVar(t.name)&&e.print("export "),e.print("function "+t.name+"("),this._visitParams(t.params,e),e.print("):"),s.isPresent(t.type)?t.type.visitType(this,e):e.print("void"),e.println(" {"),e.incIndent(),this.visitAllStatements(t.statements,e),e.decIndent(),e.println("}"),null},e.prototype.visitTryCatchStmt=function(t,e){e.println("try {"),e.incIndent(),this.visitAllStatements(t.bodyStmts,e),e.decIndent(),e.println("} catch ("+u.CATCH_ERROR_VAR.name+") {"),e.incIndent();var n=[u.CATCH_STACK_VAR.set(u.CATCH_ERROR_VAR.prop("stack")).toDeclStmt(null,[o.StmtModifier.Final])].concat(t.catchStmts);return this.visitAllStatements(n,e),e.decIndent(),e.println("}"),null},e.prototype.visitBuiltintType=function(t,e){var n;switch(t.name){case o.BuiltinTypeName.Bool:n="boolean";break;case o.BuiltinTypeName.Dynamic:n="any";break;case o.BuiltinTypeName.Function:n="Function";break;case o.BuiltinTypeName.Number:n="number";break;case o.BuiltinTypeName.Int:n="number";break;case o.BuiltinTypeName.String:n="string";break;default:throw new a.BaseException("Unsupported builtin type "+t.name)}return e.print(n),null},e.prototype.visitExternalType=function(t,e){return this._visitIdentifier(t.value,t.typeParams,e),null},e.prototype.visitArrayType=function(t,e){return s.isPresent(t.of)?t.of.visitType(this,e):e.print("any"),e.print("[]"),null},e.prototype.visitMapType=function(t,e){return e.print("{[key: string]:"),s.isPresent(t.valueType)?t.valueType.visitType(this,e):e.print("any"),e.print("}"),null},e.prototype.getBuiltinMethodName=function(t){var e;switch(t){case o.BuiltinMethod.ConcatArray:e="concat";break;case o.BuiltinMethod.SubscribeObservable:e="subscribe";break;case o.BuiltinMethod.bind:e="bind";break;default:throw new a.BaseException("Unknown builtin method: "+t)}return e},e.prototype._visitParams=function(t,e){var n=this;this.visitAllObjects(function(t){e.print(t.name),s.isPresent(t.type)&&(e.print(":"),t.type.visitType(n,e))},t,e,",")},e.prototype._visitIdentifier=function(t,e,n){var r=this;if(s.isPresent(t.moduleUrl)&&t.moduleUrl!=this._moduleUrl){var i=this.importsWithPrefixes.get(t.moduleUrl);s.isBlank(i)&&(i="import"+this.importsWithPrefixes.size,this.importsWithPrefixes.set(t.moduleUrl,i)),n.print(i+".")}n.print(t.name),s.isPresent(e)&&e.length>0&&(n.print("<"),this.visitAllObjects(function(t){return t.visitType(r,n)},e,n,","),n.print(">"))},e}(u.AbstractEmitterVisitor)},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(5),o=n(159),s=n(12),a=function(){function t(){}return t.prototype.createInstance=function(t,e,n,r,i,a){if(t===o.AppView)return new u(n,r,i,a);throw new s.BaseException("Can't instantiate class "+t+" in interpretative mode")},t}();e.InterpretiveAppViewInstanceFactory=a;var u=function(t){function e(e,n,r,i){t.call(this,e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8]),this.props=n,this.getters=r,this.methods=i}return r(e,t),e.prototype.createInternal=function(e){var n=this.methods.get("createInternal");return i.isPresent(n)?n(e):t.prototype.createInternal.call(this,e)},e.prototype.injectorGetInternal=function(e,n,r){var o=this.methods.get("injectorGetInternal");return i.isPresent(o)?o(e,n,r):t.prototype.injectorGet.call(this,e,n,r)},e.prototype.destroyInternal=function(){var e=this.methods.get("destroyInternal");return i.isPresent(e)?e():t.prototype.destroyInternal.call(this)},e.prototype.dirtyParentQueriesInternal=function(){var e=this.methods.get("dirtyParentQueriesInternal");return i.isPresent(e)?e():t.prototype.dirtyParentQueriesInternal.call(this)},e.prototype.detectChangesInternal=function(e){var n=this.methods.get("detectChangesInternal");return i.isPresent(n)?n(e):t.prototype.detectChangesInternal.call(this,e)},e}(o.AppView)},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(6),a=n(5),u=n(15),c=n(200),p=n(148),l=n(150),h=a.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),f=function(t){function e(){t.apply(this,arguments),this._protoElements=new Map}return r(e,t),e.prototype._getProtoElement=function(t){var e=this._protoElements.get(t);if(a.isBlank(e)){var n=p.splitNsName(t);e=a.isPresent(n[0])?c.DOM.createElementNS(h[n[0]],n[1]):c.DOM.createElement(n[1]),this._protoElements.set(t,e)}return e},e.prototype.hasProperty=function(t,e){if(-1!==t.indexOf("-"))return!0;var n=this._getProtoElement(t);return c.DOM.hasProperty(n,e)},e.prototype.getMappedPropName=function(t){var e=u.StringMapWrapper.get(c.DOM.attrToPropMap,t);return a.isPresent(e)?e:t},e=i([s.Injectable(),o("design:paramtypes",[])],e)}(l.ElementSchemaRegistry);e.DomElementSchemaRegistry=f},function(t,e,n){"use strict";function r(t){i.isBlank(e.DOM)&&(e.DOM=t)}var i=n(5);e.DOM=null,e.setRootDomAdapter=r;var o=function(){function t(){}return Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(t){this._attrToPropMap=t},enumerable:!0,configurable:!0}),t}();e.DomAdapter=o},function(t,e,n){"use strict";function r(){return s.isBlank(c.getPlatform())&&c.createPlatform(c.ReflectiveInjector.resolveAndCreate(a.BROWSER_PROVIDERS)),c.assertPlatform(a.BROWSER_PLATFORM_MARKER)}function i(t,n){c.reflector.reflectionCapabilities=new p.ReflectionCapabilities;var i=c.ReflectiveInjector.resolveAndCreate([e.BROWSER_APP_PROVIDERS,s.isPresent(n)?n:[]],r().injector);return c.coreLoadAndBootstrap(i,t)}var o=n(202);e.BROWSER_PROVIDERS=o.BROWSER_PROVIDERS,e.CACHED_TEMPLATE_PROVIDER=o.CACHED_TEMPLATE_PROVIDER,e.ELEMENT_PROBE_PROVIDERS=o.ELEMENT_PROBE_PROVIDERS,e.ELEMENT_PROBE_PROVIDERS_PROD_MODE=o.ELEMENT_PROBE_PROVIDERS_PROD_MODE,e.inspectNativeElement=o.inspectNativeElement,e.BrowserDomAdapter=o.BrowserDomAdapter,e.By=o.By,e.Title=o.Title,e.DOCUMENT=o.DOCUMENT,e.enableDebugTools=o.enableDebugTools,e.disableDebugTools=o.disableDebugTools;var s=n(5),a=n(202),u=n(137),c=n(2),p=n(21),l=n(220),h=n(137),f=n(6);e.BROWSER_APP_PROVIDERS=s.CONST_EXPR([a.BROWSER_APP_COMMON_PROVIDERS,u.COMPILER_PROVIDERS,new f.Provider(h.XHR,{useClass:l.XHRImpl})]),e.browserPlatform=r,e.bootstrap=i},function(t,e,n){"use strict";function r(){return new c.ExceptionHandler(h.DOM,!s.IS_DART)}function i(){return h.DOM.defaultDoc()}function o(){E.BrowserDomAdapter.makeCurrent(),R.wtfInit(),w.BrowserGetTestability.init()}var s=n(5),a=n(6),u=n(184),c=n(2),p=n(87),l=n(63),h=n(200),f=n(203),d=n(205),v=n(206),y=n(208),m=n(209),g=n(217),_=n(217),b=n(216),P=n(210),E=n(218),w=n(221),C=n(222),R=n(223),S=n(204),O=n(206),T=n(224),x=n(208);e.DOCUMENT=x.DOCUMENT;var A=n(228);e.Title=A.Title;var I=n(224);e.ELEMENT_PROBE_PROVIDERS=I.ELEMENT_PROBE_PROVIDERS,e.ELEMENT_PROBE_PROVIDERS_PROD_MODE=I.ELEMENT_PROBE_PROVIDERS_PROD_MODE,e.inspectNativeElement=I.inspectNativeElement,e.By=I.By;var M=n(218);e.BrowserDomAdapter=M.BrowserDomAdapter;var k=n(229);e.enableDebugTools=k.enableDebugTools,e.disableDebugTools=k.disableDebugTools;var N=n(206);e.HAMMER_GESTURE_CONFIG=N.HAMMER_GESTURE_CONFIG,e.HammerGestureConfig=N.HammerGestureConfig,e.BROWSER_PLATFORM_MARKER=s.CONST_EXPR(new a.OpaqueToken("BrowserPlatformMarker")),e.BROWSER_PROVIDERS=s.CONST_EXPR([new a.Provider(e.BROWSER_PLATFORM_MARKER,{useValue:!0}),c.PLATFORM_COMMON_PROVIDERS,new a.Provider(c.PLATFORM_INITIALIZER,{useValue:o,multi:!0})]),e.BROWSER_APP_COMMON_PROVIDERS=s.CONST_EXPR([c.APPLICATION_COMMON_PROVIDERS,p.FORM_PROVIDERS,new a.Provider(c.PLATFORM_PIPES,{useValue:p.COMMON_PIPES,multi:!0}),new a.Provider(c.PLATFORM_DIRECTIVES,{useValue:p.COMMON_DIRECTIVES,multi:!0}),new a.Provider(c.ExceptionHandler,{useFactory:r,deps:[]}),new a.Provider(y.DOCUMENT,{useFactory:i,deps:[]}),new a.Provider(S.EVENT_MANAGER_PLUGINS,{useClass:f.DomEventsPlugin,multi:!0}),new a.Provider(S.EVENT_MANAGER_PLUGINS,{useClass:d.KeyEventsPlugin,multi:!0}),new a.Provider(S.EVENT_MANAGER_PLUGINS,{useClass:v.HammerGesturesPlugin,multi:!0}),new a.Provider(O.HAMMER_GESTURE_CONFIG,{useClass:O.HammerGestureConfig}),new a.Provider(m.DomRootRenderer,{useClass:m.DomRootRenderer_}),new a.Provider(c.RootRenderer,{useExisting:m.DomRootRenderer}),new a.Provider(_.SharedStylesHost,{useExisting:g.DomSharedStylesHost}),g.DomSharedStylesHost,l.Testability,b.BrowserDetails,P.AnimationBuilder,S.EventManager,T.ELEMENT_PROBE_PROVIDERS]),e.CACHED_TEMPLATE_PROVIDER=s.CONST_EXPR([new a.Provider(u.XHR,{useClass:C.CachedXHR})]),e.initDomAdapter=o},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(200),a=n(2),u=n(204),c=function(t){function e(){t.apply(this,arguments)}return r(e,t),e.prototype.supports=function(t){return!0},e.prototype.addEventListener=function(t,e,n){var r=this.manager.getZone(),i=function(t){return r.runGuarded(function(){return n(t)})};return this.manager.getZone().runOutsideAngular(function(){return s.DOM.onAndCancel(t,e,i)})},e.prototype.addGlobalEventListener=function(t,e,n){var r=s.DOM.getGlobalEventTarget(t),i=this.manager.getZone(),o=function(t){return i.runGuarded(function(){return n(t)})};return this.manager.getZone().runOutsideAngular(function(){return s.DOM.onAndCancel(r,e,o)})},e=i([a.Injectable(),o("design:paramtypes",[])],e)}(u.EventManagerPlugin);e.DomEventsPlugin=c},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},s=n(5),a=n(12),u=n(6),c=n(60),p=n(15);e.EVENT_MANAGER_PLUGINS=s.CONST_EXPR(new u.OpaqueToken("EventManagerPlugins"));var l=function(){function t(t,e){var n=this;this._zone=e,t.forEach(function(t){return t.manager=n}),this._plugins=p.ListWrapper.reversed(t)}return t.prototype.addEventListener=function(t,e,n){var r=this._findPluginFor(e);return r.addEventListener(t,e,n)},t.prototype.addGlobalEventListener=function(t,e,n){var r=this._findPluginFor(e);return r.addGlobalEventListener(t,e,n)},t.prototype.getZone=function(){return this._zone},t.prototype._findPluginFor=function(t){for(var e=this._plugins,n=0;no?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(200),a=n(5),u=n(15),c=n(204),p=n(6),l=["alt","control","meta","shift"],h={alt:function(t){return t.altKey},control:function(t){return t.ctrlKey},meta:function(t){return t.metaKey},shift:function(t){return t.shiftKey}},f=function(t){function e(){t.call(this)}return r(e,t),e.prototype.supports=function(t){return a.isPresent(e.parseEventName(t))},e.prototype.addEventListener=function(t,n,r){var i=e.parseEventName(n),o=e.eventCallback(t,u.StringMapWrapper.get(i,"fullKey"),r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(function(){return s.DOM.onAndCancel(t,u.StringMapWrapper.get(i,"domEventName"),o)})},e.parseEventName=function(t){var n=t.toLowerCase().split("."),r=n.shift();if(0===n.length||!a.StringWrapper.equals(r,"keydown")&&!a.StringWrapper.equals(r,"keyup"))return null;var i=e._normalizeKey(n.pop()),o="";if(l.forEach(function(t){u.ListWrapper.contains(n,t)&&(u.ListWrapper.remove(n,t),o+=t+".")}),o+=i,0!=n.length||0===i.length)return null;var s=u.StringMapWrapper.create();return u.StringMapWrapper.set(s,"domEventName",r),u.StringMapWrapper.set(s,"fullKey",o),s},e.getEventFullKey=function(t){var e="",n=s.DOM.getEventKey(t);return n=n.toLowerCase(),a.StringWrapper.equals(n," ")?n="space":a.StringWrapper.equals(n,".")&&(n="dot"),l.forEach(function(r){if(r!=n){var i=u.StringMapWrapper.get(h,r);i(t)&&(e+=r+".")}}),e+=n},e.eventCallback=function(t,n,r,i){return function(t){a.StringWrapper.equals(e.getEventFullKey(t),n)&&i.runGuarded(function(){return r(t)})}},e._normalizeKey=function(t){switch(t){case"esc":return"escape";default:return t}},e=i([p.Injectable(),o("design:paramtypes",[])],e)}(c.EventManagerPlugin);e.KeyEventsPlugin=f},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(207),u=n(5),c=n(12),p=n(2);e.HAMMER_GESTURE_CONFIG=u.CONST_EXPR(new p.OpaqueToken("HammerGestureConfig"));var l=function(){function t(){this.events=[],this.overrides={}}return t.prototype.buildHammer=function(t){var e=new Hammer(t);e.get("pinch").set({enable:!0}),e.get("rotate").set({enable:!0});for(var n in this.overrides)e.get(n).set(this.overrides[n]);return e},t=i([p.Injectable(),o("design:paramtypes",[])],t)}();e.HammerGestureConfig=l;var h=function(t){function n(e){t.call(this),this._config=e}return r(n,t),n.prototype.supports=function(e){if(!t.prototype.supports.call(this,e)&&!this.isCustomEvent(e))return!1;if(!u.isPresent(window.Hammer))throw new c.BaseException("Hammer.js is not loaded, can not bind "+e+" event");return!0},n.prototype.addEventListener=function(t,e,n){var r=this,i=this.manager.getZone();return e=e.toLowerCase(),i.runOutsideAngular(function(){var o=r._config.buildHammer(t),s=function(t){i.runGuarded(function(){n(t)})};return o.on(e,s),function(){o.off(e,s)}})},n.prototype.isCustomEvent=function(t){return this._config.events.indexOf(t)>-1},n=i([p.Injectable(),s(0,p.Inject(e.HAMMER_GESTURE_CONFIG)),o("design:paramtypes",[l])],n)}(a.HammerGesturesPluginCommon);e.HammerGesturesPlugin=h},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(204),o=n(15),s={pan:!0,panstart:!0,panmove:!0,panend:!0,pancancel:!0,panleft:!0,panright:!0,panup:!0,pandown:!0,pinch:!0,pinchstart:!0,pinchmove:!0,pinchend:!0,pinchcancel:!0,pinchin:!0,pinchout:!0,press:!0,pressup:!0,rotate:!0,rotatestart:!0,rotatemove:!0,rotateend:!0,rotatecancel:!0,swipe:!0,swipeleft:!0,swiperight:!0,swipeup:!0,swipedown:!0,tap:!0},a=function(t){function e(){t.call(this)}return r(e,t),e.prototype.supports=function(t){return t=t.toLowerCase(),o.StringMapWrapper.contains(s,t)},e}(i.EventManagerPlugin);e.HammerGesturesPluginCommon=a},function(t,e,n){"use strict";var r=n(6),i=n(5);e.DOCUMENT=i.CONST_EXPR(new r.OpaqueToken("DocumentToken"))},function(t,e,n){"use strict";function r(t,e){var n=E.DOM.parentElement(t);if(e.length>0&&y.isPresent(n)){var r=E.DOM.nextSibling(t);if(y.isPresent(r))for(var i=0;io?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s); +return o>3&&s&&Object.defineProperty(e,n,s),s},h=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},f=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},d=n(6),v=n(210),y=n(5),m=n(12),g=n(217),_=n(204),b=n(208),P=n(3),E=n(200),w=n(215),C=y.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),R="template bindings={}",S=/^template bindings=(.*)$/g,O=function(){function t(t,e,n,r){this.document=t,this.eventManager=e,this.sharedStylesHost=n,this.animate=r,this._registeredComponents=new Map}return t.prototype.renderComponent=function(t){var e=this._registeredComponents.get(t.id);return y.isBlank(e)&&(e=new x(this,t),this._registeredComponents.set(t.id,e)),e},t}();e.DomRootRenderer=O;var T=function(t){function e(e,n,r,i){t.call(this,e,n,r,i)}return p(e,t),e=l([d.Injectable(),f(0,d.Inject(b.DOCUMENT)),h("design:paramtypes",[Object,_.EventManager,g.DomSharedStylesHost,v.AnimationBuilder])],e)}(O);e.DomRootRenderer_=T;var x=function(){function t(t,e){this._rootRenderer=t,this.componentProto=e,this._styles=u(e.id,e.styles,[]),e.encapsulation!==P.ViewEncapsulation.Native&&this._rootRenderer.sharedStylesHost.addStyles(this._styles),this.componentProto.encapsulation===P.ViewEncapsulation.Emulated?(this._contentAttr=s(e.id),this._hostAttr=a(e.id)):(this._contentAttr=null,this._hostAttr=null)}return t.prototype.selectRootElement=function(t,e){var n;if(y.isString(t)){if(n=E.DOM.querySelector(this._rootRenderer.document,t),y.isBlank(n))throw new m.BaseException('The selector "'+t+'" did not match any elements')}else n=t;return E.DOM.clearNodes(n),n},t.prototype.createElement=function(t,e,n){var r=c(e),i=y.isPresent(r[0])?E.DOM.createElementNS(C[r[0]],r[1]):E.DOM.createElement(r[1]);return y.isPresent(this._contentAttr)&&E.DOM.setAttribute(i,this._contentAttr,""),y.isPresent(t)&&E.DOM.appendChild(t,i),i},t.prototype.createViewRoot=function(t){var e;if(this.componentProto.encapsulation===P.ViewEncapsulation.Native){e=E.DOM.createShadowRoot(t),this._rootRenderer.sharedStylesHost.addHost(e);for(var n=0;no?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(6),s=n(211),a=n(216),u=function(){function t(t){this.browserDetails=t}return t.prototype.css=function(){return new s.CssAnimationBuilder(this.browserDetails)},t=r([o.Injectable(),i("design:paramtypes",[a.BrowserDetails])],t)}();e.AnimationBuilder=u},function(t,e,n){"use strict";var r=n(212),i=n(213),o=function(){function t(t){this.browserDetails=t,this.data=new r.CssAnimationOptions}return t.prototype.addAnimationClass=function(t){return this.data.animationClasses.push(t),this},t.prototype.addClass=function(t){return this.data.classesToAdd.push(t),this},t.prototype.removeClass=function(t){return this.data.classesToRemove.push(t),this},t.prototype.setDuration=function(t){return this.data.duration=t,this},t.prototype.setDelay=function(t){return this.data.delay=t,this},t.prototype.setStyles=function(t,e){return this.setFromStyles(t).setToStyles(e)},t.prototype.setFromStyles=function(t){return this.data.fromStyles=t,this},t.prototype.setToStyles=function(t){return this.data.toStyles=t,this},t.prototype.start=function(t){return new i.Animation(t,this.data,this.browserDetails)},t}();e.CssAnimationBuilder=o},function(t,e){"use strict";var n=function(){function t(){this.classesToAdd=[],this.classesToRemove=[],this.animationClasses=[]}return t}();e.CssAnimationOptions=n},function(t,e,n){"use strict";var r=n(5),i=n(214),o=n(215),s=n(15),a=n(200),u=function(){function t(t,e,n){var i=this;this.element=t,this.data=e,this.browserDetails=n,this.callbacks=[],this.eventClearFunctions=[],this.completed=!1,this._stringPrefix="",this.startTime=r.DateWrapper.toMillis(r.DateWrapper.now()),this._stringPrefix=a.DOM.getAnimationPrefix(),this.setup(),this.wait(function(t){return i.start()})}return Object.defineProperty(t.prototype,"totalTime",{get:function(){var t=null!=this.computedDelay?this.computedDelay:0,e=null!=this.computedDuration?this.computedDuration:0;return t+e},enumerable:!0,configurable:!0}),t.prototype.wait=function(t){this.browserDetails.raf(t,2)},t.prototype.setup=function(){null!=this.data.fromStyles&&this.applyStyles(this.data.fromStyles),null!=this.data.duration&&this.applyStyles({transitionDuration:this.data.duration.toString()+"ms"}),null!=this.data.delay&&this.applyStyles({transitionDelay:this.data.delay.toString()+"ms"})},t.prototype.start=function(){this.addClasses(this.data.classesToAdd),this.addClasses(this.data.animationClasses),this.removeClasses(this.data.classesToRemove),null!=this.data.toStyles&&this.applyStyles(this.data.toStyles);var t=a.DOM.getComputedStyle(this.element);this.computedDelay=i.Math.max(this.parseDurationString(t.getPropertyValue(this._stringPrefix+"transition-delay")),this.parseDurationString(this.element.style.getPropertyValue(this._stringPrefix+"transition-delay"))),this.computedDuration=i.Math.max(this.parseDurationString(t.getPropertyValue(this._stringPrefix+"transition-duration")),this.parseDurationString(this.element.style.getPropertyValue(this._stringPrefix+"transition-duration"))),this.addEvents()},t.prototype.applyStyles=function(t){var e=this;s.StringMapWrapper.forEach(t,function(t,n){var i=o.camelCaseToDashCase(n);r.isPresent(a.DOM.getStyle(e.element,i))?a.DOM.setStyle(e.element,i,t.toString()):a.DOM.setStyle(e.element,e._stringPrefix+i,t.toString())})},t.prototype.addClasses=function(t){for(var e=0,n=t.length;n>e;e++)a.DOM.addClass(this.element,t[e])},t.prototype.removeClasses=function(t){for(var e=0,n=t.length;n>e;e++)a.DOM.removeClass(this.element,t[e])},t.prototype.addEvents=function(){var t=this;this.totalTime>0?this.eventClearFunctions.push(a.DOM.onAndCancel(this.element,a.DOM.getTransitionEnd(),function(e){return t.handleAnimationEvent(e)})):this.handleAnimationCompleted()},t.prototype.handleAnimationEvent=function(t){var e=i.Math.round(1e3*t.elapsedTime);this.browserDetails.elapsedTimeIncludesDelay||(e+=this.computedDelay),t.stopPropagation(),e>=this.totalTime&&this.handleAnimationCompleted()},t.prototype.handleAnimationCompleted=function(){this.removeClasses(this.data.animationClasses),this.callbacks.forEach(function(t){return t()}),this.callbacks=[],this.eventClearFunctions.forEach(function(t){return t()}),this.eventClearFunctions=[],this.completed=!0},t.prototype.onComplete=function(t){return this.completed?t():this.callbacks.push(t),this},t.prototype.parseDurationString=function(t){var e=0;if(null==t||t.length<2)return e;if("ms"==t.substring(t.length-2)){var n=r.NumberWrapper.parseInt(this.stripLetters(t),10);n>e&&(e=n)}else if("s"==t.substring(t.length-1)){var o=1e3*r.NumberWrapper.parseFloat(this.stripLetters(t)),n=i.Math.floor(o);n>e&&(e=n)}return e},t.prototype.stripLetters=function(t){return r.StringWrapper.replaceAll(t,r.RegExpWrapper.create("[^0-9]+$",""),"")},t}();e.Animation=u},function(t,e,n){"use strict";var r=n(5);e.Math=r.global.Math,e.NaN=typeof e.NaN},function(t,e,n){"use strict";function r(t){return o.StringWrapper.replaceAllMapped(t,s,function(t){return"-"+t[1].toLowerCase()})}function i(t){return o.StringWrapper.replaceAllMapped(t,a,function(t){return t[1].toUpperCase()})}var o=n(5),s=/([A-Z])/g,a=/-([a-z])/g;e.camelCaseToDashCase=r,e.dashCaseToCamelCase=i},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(6),s=n(214),a=n(200),u=function(){function t(){this.elapsedTimeIncludesDelay=!1,this.doesElapsedTimeIncludesDelay()}return t.prototype.doesElapsedTimeIncludesDelay=function(){var t=this,e=a.DOM.createElement("div");a.DOM.setAttribute(e,"style","position: absolute; top: -9999px; left: -9999px; width: 1px;\n height: 1px; transition: all 1ms linear 1ms;"),this.raf(function(n){a.DOM.on(e,"transitionend",function(n){var r=s.Math.round(1e3*n.elapsedTime);t.elapsedTimeIncludesDelay=2==r,a.DOM.remove(e)}),a.DOM.setStyle(e,"width","2px")},2)},t.prototype.raf=function(t,e){void 0===e&&(e=1);var n=new c(t,e);return function(){return n.cancel()}},t=r([o.Injectable(),i("design:paramtypes",[])],t)}();e.BrowserDetails=u;var c=function(){function t(t,e){this.callback=t,this.frames=e,this._raf()}return t.prototype._raf=function(){var t=this;this.currentFrameId=a.DOM.requestAnimationFrame(function(e){return t._nextFrame(e)})},t.prototype._nextFrame=function(t){this.frames--,this.frames>0?this._raf():this.callback(t)},t.prototype.cancel=function(){a.DOM.cancelAnimationFrame(this.currentFrameId),this.currentFrameId=null},t}()},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(200),u=n(6),c=n(15),p=n(208),l=function(){function t(){this._styles=[],this._stylesSet=new Set}return t.prototype.addStyles=function(t){var e=this,n=[];t.forEach(function(t){c.SetWrapper.has(e._stylesSet,t)||(e._stylesSet.add(t),e._styles.push(t),n.push(t))}),this.onStylesAdded(n)},t.prototype.onStylesAdded=function(t){},t.prototype.getAllStyles=function(){return this._styles},t=i([u.Injectable(),o("design:paramtypes",[])],t)}();e.SharedStylesHost=l;var h=function(t){function e(e){t.call(this),this._hostNodes=new Set,this._hostNodes.add(e.head)}return r(e,t),e.prototype._addStylesToHost=function(t,e){for(var n=0;n0},e.prototype.tagName=function(t){return t.tagName},e.prototype.attributeMap=function(t){for(var e=new Map,n=t.attributes,r=0;r=200&&300>=i?e.resolve(r):e.reject("Failed to load "+t,null)},n.onerror=function(){e.reject("Failed to load "+t,null)},n.send(),e.promise},e}(s.XHR);e.XHRImpl=a},function(t,e,n){"use strict";var r=n(15),i=n(5),o=n(200),s=n(2),a=function(){function t(t){this._testability=t}return t.prototype.isStable=function(){return this._testability.isStable()},t.prototype.whenStable=function(t){this._testability.whenStable(t)},t.prototype.findBindings=function(t,e,n){return this.findProviders(t,e,n)},t.prototype.findProviders=function(t,e,n){return this._testability.findBindings(t,e,n)},t}(),u=function(){function t(){}return t.init=function(){s.setTestabilityGetter(new t)},t.prototype.addToWindow=function(t){i.global.getAngularTestability=function(e,n){void 0===n&&(n=!0);var r=t.findTestabilityInTree(e,n);if(null==r)throw new Error("Could not find testability for element.");return new a(r)},i.global.getAllAngularTestabilities=function(){var e=t.getAllTestabilities();return e.map(function(t){return new a(t)})},i.global.getAllAngularRootElements=function(){return t.getAllRootElements()};var e=function(t){var e=i.global.getAllAngularTestabilities(),n=e.length,r=!1,o=function(e){r=r||e,n--,0==n&&t(r)};e.forEach(function(t){t.whenStable(o)})};i.global.frameworkStabilizers||(i.global.frameworkStabilizers=r.ListWrapper.createGrowableSize(0)),i.global.frameworkStabilizers.push(e)},t.prototype.findTestabilityInTree=function(t,e,n){if(null==e)return null;var r=t.getTestability(e);return i.isPresent(r)?r:n?o.DOM.isShadowRoot(e)?this.findTestabilityInTree(t,o.DOM.getHost(e),!0):this.findTestabilityInTree(t,o.DOM.parentElement(e),!0):null},t}();e.BrowserGetTestability=u},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(184),o=n(12),s=n(5),a=n(41),u=function(t){function e(){if(t.call(this),this._cache=s.global.$templateCache,null==this._cache)throw new o.BaseException("CachedXHR: Template cache was not found in $templateCache.")}return r(e,t),e.prototype.get=function(t){return this._cache.hasOwnProperty(t)?a.PromiseWrapper.resolve(this._cache[t]):a.PromiseWrapper.reject("CachedXHR: Did not find cached template for "+t,null)},e}(i.XHR);e.CachedXHR=u},function(t,e){"use strict";function n(){}e.wtfInit=n},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}var i=n(200);e.DOM=i.DOM,e.setRootDomAdapter=i.setRootDomAdapter,e.DomAdapter=i.DomAdapter;var o=n(209);e.DomRenderer=o.DomRenderer;var s=n(208);e.DOCUMENT=s.DOCUMENT;var a=n(217);e.SharedStylesHost=a.SharedStylesHost,e.DomSharedStylesHost=a.DomSharedStylesHost;var u=n(203);e.DomEventsPlugin=u.DomEventsPlugin;var c=n(204);e.EVENT_MANAGER_PLUGINS=c.EVENT_MANAGER_PLUGINS,e.EventManager=c.EventManager,e.EventManagerPlugin=c.EventManagerPlugin,r(n(225)),r(n(226))},function(t,e,n){"use strict";var r=n(5),i=n(200),o=function(){function t(){}return t.all=function(){return function(t){return!0}},t.css=function(t){return function(e){return r.isPresent(e.nativeElement)?i.DOM.elementMatches(e.nativeElement,t):!1}},t.directive=function(t){return function(e){return-1!==e.providerTokens.indexOf(t)}},t}();e.By=o},function(t,e,n){"use strict";function r(t){return c.getDebugNode(t)}function i(t){return s.assertionsEnabled()?o(t):t}function o(t){return u.DOM.setGlobalVar(d,r),u.DOM.setGlobalVar(v,f),new h.DebugDomRootRenderer(t)}var s=n(5),a=n(6),u=n(200),c=n(83),p=n(209),l=n(2),h=n(227),f=s.CONST_EXPR({ApplicationRef:l.ApplicationRef,NgZone:l.NgZone}),d="ng.probe",v="ng.coreTokens";e.inspectNativeElement=r,e.ELEMENT_PROBE_PROVIDERS=s.CONST_EXPR([new a.Provider(l.RootRenderer,{useFactory:i,deps:[p.DomRootRenderer]})]),e.ELEMENT_PROBE_PROVIDERS_PROD_MODE=s.CONST_EXPR([new a.Provider(l.RootRenderer,{useFactory:o,deps:[p.DomRootRenderer]})])},function(t,e,n){"use strict";var r=n(5),i=n(83),o=function(){function t(t){this._delegate=t}return t.prototype.renderComponent=function(t){return new s(this._delegate.renderComponent(t))},t}();e.DebugDomRootRenderer=o;var s=function(){function t(t){this._delegate=t}return t.prototype.selectRootElement=function(t,e){var n=this._delegate.selectRootElement(t,e),r=new i.DebugElement(n,null,e);return i.indexDebugNode(r),n},t.prototype.createElement=function(t,e,n){var r=this._delegate.createElement(t,e,n),o=new i.DebugElement(r,i.getDebugNode(t),n);return o.name=e,i.indexDebugNode(o),r},t.prototype.createViewRoot=function(t){return this._delegate.createViewRoot(t)},t.prototype.createTemplateAnchor=function(t,e){var n=this._delegate.createTemplateAnchor(t,e),r=new i.DebugNode(n,i.getDebugNode(t),e);return i.indexDebugNode(r),n},t.prototype.createText=function(t,e,n){var r=this._delegate.createText(t,e,n),o=new i.DebugNode(r,i.getDebugNode(t),n);return i.indexDebugNode(o),r},t.prototype.projectNodes=function(t,e){var n=i.getDebugNode(t);if(r.isPresent(n)&&n instanceof i.DebugElement){var o=n;e.forEach(function(t){o.addChild(i.getDebugNode(t))})}this._delegate.projectNodes(t,e)},t.prototype.attachViewAfter=function(t,e){var n=i.getDebugNode(t);if(r.isPresent(n)){var o=n.parent;if(e.length>0&&r.isPresent(o)){var s=[];e.forEach(function(t){return s.push(i.getDebugNode(t))}),o.insertChildrenAfter(n,s)}}this._delegate.attachViewAfter(t,e)},t.prototype.detachView=function(t){t.forEach(function(t){var e=i.getDebugNode(t);r.isPresent(e)&&r.isPresent(e.parent)&&e.parent.removeChild(e)}),this._delegate.detachView(t)},t.prototype.destroyView=function(t,e){e.forEach(function(t){i.removeDebugNodeFromIndex(i.getDebugNode(t))}),this._delegate.destroyView(t,e)},t.prototype.listen=function(t,e,n){var o=i.getDebugNode(t);return r.isPresent(o)&&o.listeners.push(new i.EventListener(e,n)),this._delegate.listen(t,e,n)},t.prototype.listenGlobal=function(t,e,n){return this._delegate.listenGlobal(t,e,n)},t.prototype.setElementProperty=function(t,e,n){ +var o=i.getDebugNode(t);r.isPresent(o)&&o instanceof i.DebugElement&&(o.properties[e]=n),this._delegate.setElementProperty(t,e,n)},t.prototype.setElementAttribute=function(t,e,n){var o=i.getDebugNode(t);r.isPresent(o)&&o instanceof i.DebugElement&&(o.attributes[e]=n),this._delegate.setElementAttribute(t,e,n)},t.prototype.setBindingDebugInfo=function(t,e,n){this._delegate.setBindingDebugInfo(t,e,n)},t.prototype.setElementClass=function(t,e,n){this._delegate.setElementClass(t,e,n)},t.prototype.setElementStyle=function(t,e,n){this._delegate.setElementStyle(t,e,n)},t.prototype.invokeElementMethod=function(t,e,n){this._delegate.invokeElementMethod(t,e,n)},t.prototype.setText=function(t,e){this._delegate.setText(t,e)},t}();e.DebugDomRenderer=s},function(t,e,n){"use strict";var r=n(200),i=function(){function t(){}return t.prototype.getTitle=function(){return r.DOM.getTitle()},t.prototype.setTitle=function(t){r.DOM.setTitle(t)},t}();e.Title=i},function(t,e,n){"use strict";function r(t){a.ng=new s.AngularTools(t)}function i(){delete a.ng}var o=n(5),s=n(230),a=o.global;e.enableDebugTools=r,e.disableDebugTools=i},function(t,e,n){"use strict";var r=n(59),i=n(5),o=n(231),s=n(200),a=function(){function t(t,e){this.msPerTick=t,this.numTicks=e}return t}();e.ChangeDetectionPerfRecord=a;var u=function(){function t(t){this.profiler=new c(t)}return t}();e.AngularTools=u;var c=function(){function t(t){this.appRef=t.injector.get(r.ApplicationRef)}return t.prototype.timeChangeDetection=function(t){var e=i.isPresent(t)&&t.record,n="Change Detection",r=i.isPresent(o.window.console.profile);e&&r&&o.window.console.profile(n);for(var u=s.DOM.performanceNow(),c=0;5>c||s.DOM.performanceNow()-u<500;)this.appRef.tick(),c++;var p=s.DOM.performanceNow();e&&r&&o.window.console.profileEnd(n);var l=(p-u)/c;return o.window.console.log("ran "+c+" change detection cycles"),o.window.console.log(i.NumberWrapper.toFixed(l,2)+" ms per check"),new a(l,c)},t}();e.AngularProfiler=c},function(t,e){"use strict";var n=window;e.window=n,e.document=window.document,e.location=window.location,e.gc=window.gc?function(){return window.gc()}:function(){return null},e.performance=window.performance?window.performance:null,e.Event=window.Event,e.MouseEvent=window.MouseEvent,e.KeyboardEvent=window.KeyboardEvent,e.EventTarget=window.EventTarget,e.History=window.History,e.Location=window.Location,e.EventListener=window.EventListener},function(t,e,n){"use strict";var r=n(2),i=n(233),o=n(241),s=n(245),a=n(244),u=n(246),c=n(239),p=n(243),l=n(235);e.Request=l.Request;var h=n(242);e.Response=h.Response;var f=n(234);e.Connection=f.Connection,e.ConnectionBackend=f.ConnectionBackend;var d=n(244);e.BrowserXhr=d.BrowserXhr;var v=n(239);e.BaseRequestOptions=v.BaseRequestOptions,e.RequestOptions=v.RequestOptions;var y=n(243);e.BaseResponseOptions=y.BaseResponseOptions,e.ResponseOptions=y.ResponseOptions;var m=n(241);e.XHRBackend=m.XHRBackend,e.XHRConnection=m.XHRConnection;var g=n(245);e.JSONPBackend=g.JSONPBackend,e.JSONPConnection=g.JSONPConnection;var _=n(233);e.Http=_.Http,e.Jsonp=_.Jsonp;var b=n(236);e.Headers=b.Headers;var P=n(238);e.ResponseType=P.ResponseType,e.ReadyState=P.ReadyState,e.RequestMethod=P.RequestMethod;var E=n(240);e.URLSearchParams=E.URLSearchParams,e.HTTP_PROVIDERS=[r.provide(i.Http,{useFactory:function(t,e){return new i.Http(t,e)},deps:[o.XHRBackend,c.RequestOptions]}),a.BrowserXhr,r.provide(c.RequestOptions,{useClass:c.BaseRequestOptions}),r.provide(p.ResponseOptions,{useClass:p.BaseResponseOptions}),o.XHRBackend],e.HTTP_BINDINGS=e.HTTP_PROVIDERS,e.JSONP_PROVIDERS=[r.provide(i.Jsonp,{useFactory:function(t,e){return new i.Jsonp(t,e)},deps:[s.JSONPBackend,c.RequestOptions]}),u.BrowserJsonp,r.provide(c.RequestOptions,{useClass:c.BaseRequestOptions}),r.provide(p.ResponseOptions,{useClass:p.BaseResponseOptions}),r.provide(s.JSONPBackend,{useClass:s.JSONPBackend_})],e.JSON_BINDINGS=e.JSONP_PROVIDERS},function(t,e,n){"use strict";function r(t,e){return t.createConnection(e).response}function i(t,e,n,r){var i=t;return u.isPresent(e)?i.merge(new f.RequestOptions({method:e.method||n,url:e.url||r,search:e.search,headers:e.headers,body:e.body})):u.isPresent(n)?i.merge(new f.RequestOptions({method:n,url:r})):i.merge(new f.RequestOptions({url:r}))}var o=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},s=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},a=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},u=n(5),c=n(12),p=n(2),l=n(234),h=n(235),f=n(239),d=n(238),v=function(){function t(t,e){this._backend=t,this._defaultOptions=e}return t.prototype.request=function(t,e){var n;if(u.isString(t))n=r(this._backend,new h.Request(i(this._defaultOptions,e,d.RequestMethod.Get,t)));else{if(!(t instanceof h.Request))throw c.makeTypeError("First argument must be a url string or Request instance.");n=r(this._backend,t)}return n},t.prototype.get=function(t,e){return r(this._backend,new h.Request(i(this._defaultOptions,e,d.RequestMethod.Get,t)))},t.prototype.post=function(t,e,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:e})),n,d.RequestMethod.Post,t)))},t.prototype.put=function(t,e,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:e})),n,d.RequestMethod.Put,t)))},t.prototype["delete"]=function(t,e){return r(this._backend,new h.Request(i(this._defaultOptions,e,d.RequestMethod.Delete,t)))},t.prototype.patch=function(t,e,n){return r(this._backend,new h.Request(i(this._defaultOptions.merge(new f.RequestOptions({body:e})),n,d.RequestMethod.Patch,t)))},t.prototype.head=function(t,e){return r(this._backend,new h.Request(i(this._defaultOptions,e,d.RequestMethod.Head,t)))},t=s([p.Injectable(),a("design:paramtypes",[l.ConnectionBackend,f.RequestOptions])],t)}();e.Http=v;var y=function(t){function e(e,n){t.call(this,e,n)}return o(e,t),e.prototype.request=function(t,e){var n;if(u.isString(t)&&(t=new h.Request(i(this._defaultOptions,e,d.RequestMethod.Get,t))),!(t instanceof h.Request))throw c.makeTypeError("First argument must be a url string or Request instance.");return t.method!==d.RequestMethod.Get&&c.makeTypeError("JSONP requests must use GET request method."),n=r(this._backend,t)},e=s([p.Injectable(),a("design:paramtypes",[l.ConnectionBackend,f.RequestOptions])],e)}(v);e.Jsonp=y},function(t,e){"use strict";var n=function(){function t(){}return t}();e.ConnectionBackend=n;var r=function(){function t(){}return t}();e.Connection=r},function(t,e,n){"use strict";var r=n(236),i=n(237),o=n(5),s=function(){function t(t){var e=t.url;if(this.url=t.url,o.isPresent(t.search)){var n=t.search.toString();if(n.length>0){var s="?";o.StringWrapper.contains(this.url,"?")&&(s="&"==this.url[this.url.length-1]?"":"&"),this.url=e+s+n}}this._body=t.body,this.method=i.normalizeMethodName(t.method),this.headers=new r.Headers(t.headers)}return t.prototype.text=function(){return o.isPresent(this._body)?this._body.toString():""},t}();e.Request=s},function(t,e,n){"use strict";var r=n(5),i=n(12),o=n(15),s=function(){function t(e){var n=this;return e instanceof t?void(this._headersMap=e._headersMap):(this._headersMap=new o.Map,void(r.isBlank(e)||o.StringMapWrapper.forEach(e,function(t,e){n._headersMap.set(e,o.isListLikeIterable(t)?t:[t])})))}return t.fromResponseHeaderString=function(e){return e.trim().split("\n").map(function(t){return t.split(":")}).map(function(t){var e=t[0],n=t.slice(1);return[e.trim(),n.join(":").trim()]}).reduce(function(t,e){var n=e[0],r=e[1];return!t.set(n,r)&&t},new t)},t.prototype.append=function(t,e){var n=this._headersMap.get(t),r=o.isListLikeIterable(n)?n:[];r.push(e),this._headersMap.set(t,r)},t.prototype["delete"]=function(t){this._headersMap["delete"](t)},t.prototype.forEach=function(t){this._headersMap.forEach(t)},t.prototype.get=function(t){return o.ListWrapper.first(this._headersMap.get(t))},t.prototype.has=function(t){return this._headersMap.has(t)},t.prototype.keys=function(){return o.MapWrapper.keys(this._headersMap)},t.prototype.set=function(t,e){var n=[];if(o.isListLikeIterable(e)){var r=e.join(",");n.push(r)}else n.push(e);this._headersMap.set(t,n)},t.prototype.values=function(){return o.MapWrapper.values(this._headersMap)},t.prototype.toJSON=function(){var t={};return this._headersMap.forEach(function(e,n){var r=[];o.iterateListLike(e,function(t){return r=o.ListWrapper.concat(r,t.split(","))}),t[n]=r}),t},t.prototype.getAll=function(t){var e=this._headersMap.get(t);return o.isListLikeIterable(e)?e:[]},t.prototype.entries=function(){throw new i.BaseException('"entries" method is not implemented on Headers class')},t}();e.Headers=s},function(t,e,n){"use strict";function r(t){if(o.isString(t)){var e=t;if(t=t.replace(/(\w)(\w*)/g,function(t,e,n){return e.toUpperCase()+n.toLowerCase()}),t=s.RequestMethod[t],"number"!=typeof t)throw a.makeTypeError('Invalid request method. The method "'+e+'" is not supported.')}return t}function i(t){return"responseURL"in t?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):void 0}var o=n(5),s=n(238),a=n(12);e.normalizeMethodName=r,e.isSuccess=function(t){return t>=200&&300>t},e.getResponseURL=i;var u=n(5);e.isJsObject=u.isJsObject},function(t,e){"use strict";!function(t){t[t.Get=0]="Get",t[t.Post=1]="Post",t[t.Put=2]="Put",t[t.Delete=3]="Delete",t[t.Options=4]="Options",t[t.Head=5]="Head",t[t.Patch=6]="Patch"}(e.RequestMethod||(e.RequestMethod={}));e.RequestMethod;!function(t){t[t.Unsent=0]="Unsent",t[t.Open=1]="Open",t[t.HeadersReceived=2]="HeadersReceived",t[t.Loading=3]="Loading",t[t.Done=4]="Done",t[t.Cancelled=5]="Cancelled"}(e.ReadyState||(e.ReadyState={}));e.ReadyState;!function(t){t[t.Basic=0]="Basic",t[t.Cors=1]="Cors",t[t.Default=2]="Default",t[t.Error=3]="Error",t[t.Opaque=4]="Opaque"}(e.ResponseType||(e.ResponseType={}));e.ResponseType},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(5),a=n(236),u=n(238),c=n(2),p=n(240),l=n(237),h=function(){function t(t){var e=void 0===t?{}:t,n=e.method,r=e.headers,i=e.body,o=e.url,a=e.search;this.method=s.isPresent(n)?l.normalizeMethodName(n):null,this.headers=s.isPresent(r)?r:null,this.body=s.isPresent(i)?i:null,this.url=s.isPresent(o)?o:null,this.search=s.isPresent(a)?s.isString(a)?new p.URLSearchParams(a):a:null}return t.prototype.merge=function(e){return new t({method:s.isPresent(e)&&s.isPresent(e.method)?e.method:this.method,headers:s.isPresent(e)&&s.isPresent(e.headers)?e.headers:this.headers,body:s.isPresent(e)&&s.isPresent(e.body)?e.body:this.body,url:s.isPresent(e)&&s.isPresent(e.url)?e.url:this.url,search:s.isPresent(e)&&s.isPresent(e.search)?s.isString(e.search)?new p.URLSearchParams(e.search):e.search.clone():this.search})},t}();e.RequestOptions=h;var f=function(t){function e(){t.call(this,{method:u.RequestMethod.Get,headers:new a.Headers})}return r(e,t),e=i([c.Injectable(),o("design:paramtypes",[])],e)}(h);e.BaseRequestOptions=f},function(t,e,n){"use strict";function r(t){void 0===t&&(t="");var e=new o.Map;if(t.length>0){var n=t.split("&");n.forEach(function(t){var n=t.split("="),r=n[0],o=n[1],s=i.isPresent(e.get(r))?e.get(r):[];s.push(o),e.set(r,s)})}return e}var i=n(5),o=n(15),s=function(){function t(t){void 0===t&&(t=""),this.rawParams=t,this.paramsMap=r(t)}return t.prototype.clone=function(){var e=new t;return e.appendAll(this),e},t.prototype.has=function(t){return this.paramsMap.has(t)},t.prototype.get=function(t){var e=this.paramsMap.get(t);return o.isListLikeIterable(e)?o.ListWrapper.first(e):null},t.prototype.getAll=function(t){var e=this.paramsMap.get(t);return i.isPresent(e)?e:[]},t.prototype.set=function(t,e){var n=this.paramsMap.get(t),r=i.isPresent(n)?n:[];o.ListWrapper.clear(r),r.push(e),this.paramsMap.set(t,r)},t.prototype.setAll=function(t){var e=this;t.paramsMap.forEach(function(t,n){var r=e.paramsMap.get(n),s=i.isPresent(r)?r:[];o.ListWrapper.clear(s),s.push(t[0]),e.paramsMap.set(n,s)})},t.prototype.append=function(t,e){var n=this.paramsMap.get(t),r=i.isPresent(n)?n:[];r.push(e),this.paramsMap.set(t,r)},t.prototype.appendAll=function(t){var e=this;t.paramsMap.forEach(function(t,n){for(var r=e.paramsMap.get(n),o=i.isPresent(r)?r:[],s=0;so?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(238),s=n(242),a=n(236),u=n(243),c=n(2),p=n(244),l=n(5),h=n(42),f=n(237),d=function(){function t(t,e,n){var r=this;this.request=t,this.response=new h.Observable(function(i){var c=e.build();c.open(o.RequestMethod[t.method].toUpperCase(),t.url);var p=function(){var t=l.isPresent(c.response)?c.response:c.responseText,e=a.Headers.fromResponseHeaderString(c.getAllResponseHeaders()),r=f.getResponseURL(c),o=1223===c.status?204:c.status;0===o&&(o=t?200:0);var p=new u.ResponseOptions({body:t,status:o,headers:e,url:r});l.isPresent(n)&&(p=n.merge(p));var h=new s.Response(p);return f.isSuccess(o)?(i.next(h),void i.complete()):void i.error(h)},h=function(t){var e=new u.ResponseOptions({body:t,type:o.ResponseType.Error});l.isPresent(n)&&(e=n.merge(e)),i.error(new s.Response(e))};return l.isPresent(t.headers)&&t.headers.forEach(function(t,e){return c.setRequestHeader(e,t.join(","))}),c.addEventListener("load",p),c.addEventListener("error",h),c.send(r.request.text()),function(){c.removeEventListener("load",p),c.removeEventListener("error",h),c.abort()}})}return t}();e.XHRConnection=d;var v=function(){function t(t,e){this._browserXHR=t,this._baseResponseOptions=e}return t.prototype.createConnection=function(t){return new d(t,this._browserXHR,this._baseResponseOptions)},t=r([c.Injectable(),i("design:paramtypes",[p.BrowserXhr,u.ResponseOptions])],t)}();e.XHRBackend=v},function(t,e,n){"use strict";var r=n(5),i=n(12),o=n(237),s=function(){function t(t){this._body=t.body,this.status=t.status,this.ok=this.status>=200&&this.status<=299,this.statusText=t.statusText,this.headers=t.headers,this.type=t.type,this.url=t.url}return t.prototype.blob=function(){throw new i.BaseException('"blob()" method not implemented on Response superclass')},t.prototype.json=function(){var t;return o.isJsObject(this._body)?t=this._body:r.isString(this._body)&&(t=r.Json.parse(this._body)),t},t.prototype.text=function(){return this._body.toString()},t.prototype.arrayBuffer=function(){throw new i.BaseException('"arrayBuffer()" method not implemented on Response superclass')},t}();e.Response=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(2),a=n(5),u=n(236),c=n(238),p=function(){function t(t){var e=void 0===t?{}:t,n=e.body,r=e.status,i=e.headers,o=e.statusText,s=e.type,u=e.url;this.body=a.isPresent(n)?n:null,this.status=a.isPresent(r)?r:null,this.headers=a.isPresent(i)?i:null,this.statusText=a.isPresent(o)?o:null,this.type=a.isPresent(s)?s:null,this.url=a.isPresent(u)?u:null}return t.prototype.merge=function(e){return new t({body:a.isPresent(e)&&a.isPresent(e.body)?e.body:this.body,status:a.isPresent(e)&&a.isPresent(e.status)?e.status:this.status,headers:a.isPresent(e)&&a.isPresent(e.headers)?e.headers:this.headers,statusText:a.isPresent(e)&&a.isPresent(e.statusText)?e.statusText:this.statusText,type:a.isPresent(e)&&a.isPresent(e.type)?e.type:this.type,url:a.isPresent(e)&&a.isPresent(e.url)?e.url:this.url})},t}();e.ResponseOptions=p;var l=function(t){function e(){t.call(this,{status:200,statusText:"Ok",type:c.ResponseType.Default,headers:new u.Headers})}return r(e,t),e=i([s.Injectable(),o("design:paramtypes",[])],e)}(p);e.BaseResponseOptions=l},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=function(){function t(){}return t.prototype.build=function(){return new XMLHttpRequest},t=r([o.Injectable(),i("design:paramtypes",[])],t)}();e.BrowserXhr=s},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(234),a=n(238),u=n(242),c=n(243),p=n(2),l=n(246),h=n(12),f=n(5),d=n(42),v="JSONP injected script did not invoke callback.",y="JSONP requests must use GET request method.",m=function(){function t(){}return t}();e.JSONPConnection=m;var g=function(t){function e(e,n,r){var i=this;if(t.call(this),this._dom=n,this.baseResponseOptions=r,this._finished=!1,e.method!==a.RequestMethod.Get)throw h.makeTypeError(y);this.request=e,this.response=new d.Observable(function(t){i.readyState=a.ReadyState.Loading;var o=i._id=n.nextRequestID();n.exposeConnection(o,i);var s=n.requestCallback(i._id),p=e.url;p.indexOf("=JSONP_CALLBACK&")>-1?p=f.StringWrapper.replace(p,"=JSONP_CALLBACK&","="+s+"&"):p.lastIndexOf("=JSONP_CALLBACK")===p.length-"=JSONP_CALLBACK".length&&(p=p.substring(0,p.length-"=JSONP_CALLBACK".length)+("="+s));var l=i._script=n.build(p),h=function(e){if(i.readyState!==a.ReadyState.Cancelled){if(i.readyState=a.ReadyState.Done,n.cleanup(l),!i._finished){var o=new c.ResponseOptions({body:v,type:a.ResponseType.Error,url:p});return f.isPresent(r)&&(o=r.merge(o)),void t.error(new u.Response(o))}var s=new c.ResponseOptions({body:i._responseData,url:p});f.isPresent(i.baseResponseOptions)&&(s=i.baseResponseOptions.merge(s)),t.next(new u.Response(s)),t.complete()}},d=function(e){if(i.readyState!==a.ReadyState.Cancelled){i.readyState=a.ReadyState.Done,n.cleanup(l);var o=new c.ResponseOptions({body:e.message,type:a.ResponseType.Error});f.isPresent(r)&&(o=r.merge(o)),t.error(new u.Response(o))}};return l.addEventListener("load",h),l.addEventListener("error",d),n.send(l),function(){i.readyState=a.ReadyState.Cancelled,l.removeEventListener("load",h),l.removeEventListener("error",d),f.isPresent(l)&&i._dom.cleanup(l)}})}return r(e,t),e.prototype.finished=function(t){this._finished=!0,this._dom.removeConnection(this._id),this.readyState!==a.ReadyState.Cancelled&&(this._responseData=t)},e}(m);e.JSONPConnection_=g;var _=function(t){function e(){t.apply(this,arguments)}return r(e,t),e}(s.ConnectionBackend);e.JSONPBackend=_;var b=function(t){function e(e,n){t.call(this),this._browserJSONP=e,this._baseResponseOptions=n}return r(e,t),e.prototype.createConnection=function(t){return new g(t,this._browserJSONP,this._baseResponseOptions)},e=i([p.Injectable(),o("design:paramtypes",[l.BrowserJsonp,c.ResponseOptions])],e)}(_);e.JSONPBackend_=b},function(t,e,n){"use strict";function r(){return null===c&&(c=a.global[e.JSONP_HOME]={}),c}var i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(2),a=n(5),u=0;e.JSONP_HOME="__ng_jsonp__";var c=null,p=function(){function t(){}return t.prototype.build=function(t){var e=document.createElement("script");return e.src=t,e},t.prototype.nextRequestID=function(){return"__req"+u++},t.prototype.requestCallback=function(t){return e.JSONP_HOME+"."+t+".finished"},t.prototype.exposeConnection=function(t,e){var n=r();n[t]=e},t.prototype.removeConnection=function(t){var e=r();e[t]=null},t.prototype.send=function(t){document.body.appendChild(t)},t.prototype.cleanup=function(t){t.parentNode&&t.parentNode.removeChild(t)},t=i([s.Injectable(),o("design:paramtypes",[])],t)}();e.BrowserJsonp=p},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}var i=n(248);e.Router=i.Router;var o=n(272);e.RouterOutlet=o.RouterOutlet;var s=n(274);e.RouterLink=s.RouterLink;var a=n(260);e.RouteParams=a.RouteParams,e.RouteData=a.RouteData;var u=n(256);e.RouteRegistry=u.RouteRegistry,e.ROUTER_PRIMARY_COMPONENT=u.ROUTER_PRIMARY_COMPONENT,r(n(269));var c=n(273);e.CanActivate=c.CanActivate;var p=n(260);e.Instruction=p.Instruction,e.ComponentInstruction=p.ComponentInstruction;var l=n(2);e.OpaqueToken=l.OpaqueToken;var h=n(275);e.ROUTER_PROVIDERS_COMMON=h.ROUTER_PROVIDERS_COMMON;var f=n(276);e.ROUTER_PROVIDERS=f.ROUTER_PROVIDERS,e.ROUTER_BINDINGS=f.ROUTER_BINDINGS;var d=n(272),v=n(274),y=n(5);e.ROUTER_DIRECTIVES=y.CONST_EXPR([d.RouterOutlet,v.RouterLink])},function(t,e,n){"use strict";function r(t,e){var n=y;return p.isBlank(t.component)?n:(p.isPresent(t.child)&&(n=r(t.child,p.isPresent(e)?e.child:null)),n.then(function(n){if(0==n)return!1;if(t.component.reuse)return!0;var r=v.getCanActivateHook(t.component.componentType);return p.isPresent(r)?r(t.component,p.isPresent(e)?e.component:null):!0}))}var i=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},s=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},a=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},u=n(40),c=n(15),p=n(5),l=n(12),h=n(249),f=n(2),d=n(256),v=n(270),y=u.PromiseWrapper.resolve(!0),m=u.PromiseWrapper.resolve(!1),g=function(){function t(t,e,n,r){this.registry=t,this.parent=e,this.hostComponent=n,this.root=r,this.navigating=!1,this.currentInstruction=null,this._currentNavigation=y,this._outlet=null,this._auxRouters=new c.Map,this._subject=new u.EventEmitter}return t.prototype.childRouter=function(t){return this._childRouter=new b(this,t)},t.prototype.auxRouter=function(t){return new b(this,t)},t.prototype.registerPrimaryOutlet=function(t){if(p.isPresent(t.name))throw new l.BaseException("registerPrimaryOutlet expects to be called with an unnamed outlet.");if(p.isPresent(this._outlet))throw new l.BaseException("Primary outlet is already registered.");return this._outlet=t,p.isPresent(this.currentInstruction)?this.commit(this.currentInstruction,!1):y},t.prototype.unregisterPrimaryOutlet=function(t){if(p.isPresent(t.name))throw new l.BaseException("registerPrimaryOutlet expects to be called with an unnamed outlet.");this._outlet=null},t.prototype.registerAuxOutlet=function(t){var e=t.name;if(p.isBlank(e))throw new l.BaseException("registerAuxOutlet expects to be called with an outlet with a name.");var n=this.auxRouter(this.hostComponent);this._auxRouters.set(e,n),n._outlet=t;var r;return p.isPresent(this.currentInstruction)&&p.isPresent(r=this.currentInstruction.auxInstruction[e])?n.commit(r):y},t.prototype.isRouteActive=function(t){var e=this,n=this;if(p.isBlank(this.currentInstruction))return!1;for(;p.isPresent(n.parent)&&p.isPresent(t.child);)n=n.parent,t=t.child;if(p.isBlank(t.component)||p.isBlank(this.currentInstruction.component)||this.currentInstruction.component.routeName!=t.component.routeName)return!1;var r=!0;return p.isPresent(this.currentInstruction.component.params)&&c.StringMapWrapper.forEach(t.component.params,function(t,n){e.currentInstruction.component.params[n]!==t&&(r=!1)}),r},t.prototype.config=function(t){var e=this;return t.forEach(function(t){e.registry.config(e.hostComponent,t)}),this.renavigate()},t.prototype.navigate=function(t){var e=this.generate(t);return this.navigateByInstruction(e,!1)},t.prototype.navigateByUrl=function(t,e){var n=this;return void 0===e&&(e=!1),this._currentNavigation=this._currentNavigation.then(function(r){return n.lastNavigationAttempt=t,n._startNavigating(),n._afterPromiseFinishNavigating(n.recognize(t).then(function(t){return p.isBlank(t)?!1:n._navigate(t,e)}))})},t.prototype.navigateByInstruction=function(t,e){var n=this;return void 0===e&&(e=!1),p.isBlank(t)?m:this._currentNavigation=this._currentNavigation.then(function(r){return n._startNavigating(),n._afterPromiseFinishNavigating(n._navigate(t,e))})},t.prototype._settleInstruction=function(t){var e=this;return t.resolveComponent().then(function(n){var r=[];return p.isPresent(t.component)&&(t.component.reuse=!1),p.isPresent(t.child)&&r.push(e._settleInstruction(t.child)),c.StringMapWrapper.forEach(t.auxInstruction,function(t,n){r.push(e._settleInstruction(t))}),u.PromiseWrapper.all(r)})},t.prototype._navigate=function(t,e){var n=this;return this._settleInstruction(t).then(function(e){return n._routerCanReuse(t)}).then(function(e){return n._canActivate(t)}).then(function(r){return r?n._routerCanDeactivate(t).then(function(r){return r?n.commit(t,e).then(function(e){return n._emitNavigationFinish(t.toRootUrl()),!0}):void 0}):!1})},t.prototype._emitNavigationFinish=function(t){u.ObservableWrapper.callEmit(this._subject,t)},t.prototype._emitNavigationFail=function(t){u.ObservableWrapper.callError(this._subject,t)},t.prototype._afterPromiseFinishNavigating=function(t){var e=this;return u.PromiseWrapper.catchError(t.then(function(t){return e._finishNavigating()}),function(t){throw e._finishNavigating(),t})},t.prototype._routerCanReuse=function(t){var e=this;return p.isBlank(this._outlet)?m:p.isBlank(t.component)?y:this._outlet.routerCanReuse(t.component).then(function(n){return t.component.reuse=n,n&&p.isPresent(e._childRouter)&&p.isPresent(t.child)?e._childRouter._routerCanReuse(t.child):void 0})},t.prototype._canActivate=function(t){return r(t,this.currentInstruction)},t.prototype._routerCanDeactivate=function(t){var e=this;if(p.isBlank(this._outlet))return y;var n,r=null,i=!1,o=null;return p.isPresent(t)&&(r=t.child,o=t.component,i=p.isBlank(t.component)||t.component.reuse),n=i?y:this._outlet.routerCanDeactivate(o),n.then(function(t){return 0==t?!1:p.isPresent(e._childRouter)?e._childRouter._routerCanDeactivate(r):!0})},t.prototype.commit=function(t,e){var n=this;void 0===e&&(e=!1),this.currentInstruction=t;var r=y;if(p.isPresent(this._outlet)&&p.isPresent(t.component)){var i=t.component;r=i.reuse?this._outlet.reuse(i):this.deactivate(t).then(function(t){return n._outlet.activate(i)}),p.isPresent(t.child)&&(r=r.then(function(e){return p.isPresent(n._childRouter)?n._childRouter.commit(t.child):void 0}))}var o=[];return this._auxRouters.forEach(function(e,n){p.isPresent(t.auxInstruction[n])&&o.push(e.commit(t.auxInstruction[n]))}),r.then(function(t){return u.PromiseWrapper.all(o)})},t.prototype._startNavigating=function(){this.navigating=!0},t.prototype._finishNavigating=function(){this.navigating=!1},t.prototype.subscribe=function(t,e){return u.ObservableWrapper.subscribe(this._subject,t,e)},t.prototype.deactivate=function(t){var e=this,n=null,r=null;p.isPresent(t)&&(n=t.child,r=t.component);var i=y;return p.isPresent(this._childRouter)&&(i=this._childRouter.deactivate(n)),p.isPresent(this._outlet)&&(i=i.then(function(t){return e._outlet.deactivate(r)})),i},t.prototype.recognize=function(t){var e=this._getAncestorInstructions();return this.registry.recognize(t,e)},t.prototype._getAncestorInstructions=function(){for(var t=[this.currentInstruction],e=this;p.isPresent(e=e.parent);)t.unshift(e.currentInstruction);return t},t.prototype.renavigate=function(){return p.isBlank(this.lastNavigationAttempt)?this._currentNavigation:this.navigateByUrl(this.lastNavigationAttempt)},t.prototype.generate=function(t){var e=this._getAncestorInstructions();return this.registry.generate(t,e)},t=o([f.Injectable(),s("design:paramtypes",[d.RouteRegistry,t,Object,t])],t)}();e.Router=g;var _=function(t){function e(e,n,r){var i=this;t.call(this,e,null,r),this.root=this,this._location=n,this._locationSub=this._location.subscribe(function(t){i.recognize(t.url).then(function(e){p.isPresent(e)?i.navigateByInstruction(e,p.isPresent(t.pop)).then(function(n){if(!p.isPresent(t.pop)||"hashchange"==t.type){var r=e.toUrlPath(),o=e.toUrlQuery();r.length>0&&"/"!=r[0]&&(r="/"+r),"hashchange"==t.type?e.toRootUrl()!=i._location.path()&&i._location.replaceState(r,o):i._location.go(r,o)}}):i._emitNavigationFail(t.url)})}),this.registry.configFromComponent(r),this.navigateByUrl(n.path())}return i(e,t),e.prototype.commit=function(e,n){var r=this;void 0===n&&(n=!1);var i=e.toUrlPath(),o=e.toUrlQuery();i.length>0&&"/"!=i[0]&&(i="/"+i);var s=t.prototype.commit.call(this,e);return n||(s=s.then(function(t){ +r._location.go(i,o)})),s},e.prototype.dispose=function(){p.isPresent(this._locationSub)&&(u.ObservableWrapper.dispose(this._locationSub),this._locationSub=null)},e=o([f.Injectable(),a(2,f.Inject(d.ROUTER_PRIMARY_COMPONENT)),s("design:paramtypes",[d.RouteRegistry,h.Location,p.Type])],e)}(g);e.RootRouter=_;var b=function(t){function e(e,n){t.call(this,e.registry,e,n,e.root),this.parent=e}return i(e,t),e.prototype.navigateByUrl=function(t,e){return void 0===e&&(e=!1),this.parent.navigateByUrl(t,e)},e.prototype.navigateByInstruction=function(t,e){return void 0===e&&(e=!1),this.parent.navigateByInstruction(t,e)},e}(g)},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(250))},function(t,e,n){"use strict";function r(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}r(n(251)),r(n(252)),r(n(253)),r(n(255)),r(n(254))},function(t,e){"use strict";var n=function(){function t(){}return Object.defineProperty(t.prototype,"pathname",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"search",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hash",{get:function(){return null},enumerable:!0,configurable:!0}),t}();e.PlatformLocation=n},function(t,e,n){"use strict";var r=n(5),i=n(2),o=function(){function t(){}return t}();e.LocationStrategy=o,e.APP_BASE_HREF=r.CONST_EXPR(new i.OpaqueToken("appBaseHref"))},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(2),u=n(252),c=n(254),p=n(251),l=n(5),h=function(t){function e(e,n){t.call(this),this._platformLocation=e,this._baseHref="",l.isPresent(n)&&(this._baseHref=n)}return r(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.path=function(){var t=this._platformLocation.hash;return l.isPresent(t)||(t="#"),t.length>0?t.substring(1):t},e.prototype.prepareExternalUrl=function(t){var e=c.Location.joinWithSlash(this._baseHref,t);return e.length>0?"#"+e:e},e.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.Location.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.pushState(t,e,i)},e.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+c.Location.normalizeQueryParams(r));0==i.length&&(i=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,i)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e=i([a.Injectable(),s(1,a.Optional()),s(1,a.Inject(u.APP_BASE_HREF)),o("design:paramtypes",[p.PlatformLocation,String])],e)}(u.LocationStrategy);e.HashLocationStrategy=h},function(t,e,n){"use strict";function r(t,e){return t.length>0&&e.startsWith(t)?e.substring(t.length):e}function i(t){return/\/index.html$/g.test(t)?t.substring(0,t.length-11):t}var o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},s=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},a=n(40),u=n(2),c=n(252),p=function(){function t(e){var n=this;this.platformStrategy=e,this._subject=new a.EventEmitter;var r=this.platformStrategy.getBaseHref();this._baseHref=t.stripTrailingSlash(i(r)),this.platformStrategy.onPopState(function(t){a.ObservableWrapper.callEmit(n._subject,{url:n.path(),pop:!0,type:t.type})})}return t.prototype.path=function(){return this.normalize(this.platformStrategy.path())},t.prototype.normalize=function(e){return t.stripTrailingSlash(r(this._baseHref,i(e)))},t.prototype.prepareExternalUrl=function(t){return t.length>0&&!t.startsWith("/")&&(t="/"+t),this.platformStrategy.prepareExternalUrl(t)},t.prototype.go=function(t,e){void 0===e&&(e=""),this.platformStrategy.pushState(null,"",t,e)},t.prototype.replaceState=function(t,e){void 0===e&&(e=""),this.platformStrategy.replaceState(null,"",t,e)},t.prototype.forward=function(){this.platformStrategy.forward()},t.prototype.back=function(){this.platformStrategy.back()},t.prototype.subscribe=function(t,e,n){return void 0===e&&(e=null),void 0===n&&(n=null),a.ObservableWrapper.subscribe(this._subject,t,e,n)},t.normalizeQueryParams=function(t){return t.length>0&&"?"!=t.substring(0,1)?"?"+t:t},t.joinWithSlash=function(t,e){if(0==t.length)return e;if(0==e.length)return t;var n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e},t.stripTrailingSlash=function(t){return/\/$/g.test(t)&&(t=t.substring(0,t.length-1)),t},t=o([u.Injectable(),s("design:paramtypes",[c.LocationStrategy])],t)}();e.Location=p},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},a=n(2),u=n(5),c=n(12),p=n(251),l=n(252),h=n(254),f=function(t){function e(e,n){if(t.call(this),this._platformLocation=e,u.isBlank(n)&&(n=this._platformLocation.getBaseHrefFromDOM()),u.isBlank(n))throw new c.BaseException("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=n}return r(e,t),e.prototype.onPopState=function(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)},e.prototype.getBaseHref=function(){return this._baseHref},e.prototype.prepareExternalUrl=function(t){return h.Location.joinWithSlash(this._baseHref,t)},e.prototype.path=function(){return this._platformLocation.pathname+h.Location.normalizeQueryParams(this._platformLocation.search)},e.prototype.pushState=function(t,e,n,r){var i=this.prepareExternalUrl(n+h.Location.normalizeQueryParams(r));this._platformLocation.pushState(t,e,i)},e.prototype.replaceState=function(t,e,n,r){var i=this.prepareExternalUrl(n+h.Location.normalizeQueryParams(r));this._platformLocation.replaceState(t,e,i)},e.prototype.forward=function(){this._platformLocation.forward()},e.prototype.back=function(){this._platformLocation.back()},e=i([a.Injectable(),s(1,a.Optional()),s(1,a.Inject(l.APP_BASE_HREF)),o("design:paramtypes",[p.PlatformLocation,String])],e)}(l.LocationStrategy);e.PathLocationStrategy=f},function(t,e,n){"use strict";function r(t){var e=[];return t.forEach(function(t){if(h.isString(t)){var n=t;e=e.concat(n.split("/"))}else e.push(t)}),e}function i(t){if(t=t.filter(function(t){return h.isPresent(t)}),0==t.length)return null;if(1==t.length)return t[0];var e=t[0],n=t.slice(1);return n.reduce(function(t,e){return-1==o(e.specificity,t.specificity)?e:t},e)}function o(t,e){for(var n=h.Math.min(t.length,e.length),r=0;n>r;r+=1){var i=h.StringWrapper.charCodeAt(t,r),o=h.StringWrapper.charCodeAt(e,r),s=o-i;if(0!=s)return s}return t.length-e.length}function s(t,e){if(h.isType(t)){var n=d.reflector.annotations(t);if(h.isPresent(n))for(var r=0;ro?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},u=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},c=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},p=n(15),l=n(40),h=n(5),f=n(12),d=n(18),v=n(2),y=n(257),m=n(258),g=n(261),_=n(260),b=n(268),P=n(259),E=l.PromiseWrapper.resolve(null);e.ROUTER_PRIMARY_COMPONENT=h.CONST_EXPR(new v.OpaqueToken("RouterPrimaryComponent"));var w=function(){function t(t){this._rootComponent=t,this._rules=new p.Map}return t.prototype.config=function(t,e){e=b.normalizeRouteConfig(e,this),e instanceof y.Route?b.assertComponentExists(e.component,e.path):e instanceof y.AuxRoute&&b.assertComponentExists(e.component,e.path);var n=this._rules.get(t);h.isBlank(n)&&(n=new g.RuleSet,this._rules.set(t,n));var r=n.config(e);e instanceof y.Route&&(r?s(e.component,e.path):this.configFromComponent(e.component))},t.prototype.configFromComponent=function(t){var e=this;if(h.isType(t)&&!this._rules.has(t)){var n=d.reflector.annotations(t);if(h.isPresent(n))for(var r=0;r0?[p.ListWrapper.last(e)]:[],i=r._auxRoutesToUnresolved(t.remainingAux,n),o=new _.ResolvedInstruction(t.instruction,null,i);if(h.isBlank(t.instruction)||t.instruction.terminal)return o;var s=e.concat([o]);return r._recognize(t.remaining,s).then(function(t){return h.isBlank(t)?null:t instanceof _.RedirectInstruction?t:(o.child=t,o)})}if(t instanceof m.RedirectMatch){var o=r.generate(t.redirectTo,e.concat([null]));return new _.RedirectInstruction(o.component,o.child,o.auxInstruction,t.specificity)}})});return!h.isBlank(t)&&""!=t.path||0!=u.length?l.PromiseWrapper.all(c).then(i):l.PromiseWrapper.resolve(this.generateDefault(s))},t.prototype._auxRoutesToUnresolved=function(t,e){var n=this,r={};return t.forEach(function(t){r[t.path]=new _.UnresolvedInstruction(function(){return n._recognize(t,e,!0)})}),r},t.prototype.generate=function(t,e,n){void 0===n&&(n=!1);var i,o=r(t);if(""==p.ListWrapper.first(o))o.shift(),i=p.ListWrapper.first(e),e=[];else if(i=e.length>0?e.pop():null,"."==p.ListWrapper.first(o))o.shift();else if(".."==p.ListWrapper.first(o))for(;".."==p.ListWrapper.first(o);){if(e.length<=0)throw new f.BaseException('Link "'+p.ListWrapper.toJSON(t)+'" has too many "../" segments.');i=e.pop(),o=p.ListWrapper.slice(o,1)}else{var s=p.ListWrapper.first(o),a=this._rootComponent,u=null;if(e.length>1){var c=e[e.length-1],l=e[e.length-2];a=c.component.componentType,u=l.component.componentType}else 1==e.length&&(a=e[0].component.componentType,u=this._rootComponent);var d=this.hasRoute(s,a),v=h.isPresent(u)&&this.hasRoute(s,u);if(v&&d){var y='Link "'+p.ListWrapper.toJSON(t)+'" is ambiguous, use "./" or "../" to disambiguate.';throw new f.BaseException(y)}v&&(i=e.pop())}if(""==o[o.length-1]&&o.pop(),o.length>0&&""==o[0]&&o.shift(),o.length<1){var y='Link "'+p.ListWrapper.toJSON(t)+'" must include a route name.';throw new f.BaseException(y)}for(var m=this._generate(o,e,i,n,t),g=e.length-1;g>=0;g--){var _=e[g];if(h.isBlank(_))break;m=_.replaceChild(m)}return m},t.prototype._generate=function(t,e,n,r,i){var o=this;void 0===r&&(r=!1);var s=this._rootComponent,a=null,u={},c=p.ListWrapper.last(e);if(h.isPresent(c)&&h.isPresent(c.component)&&(s=c.component.componentType),0==t.length){var l=this.generateDefault(s);if(h.isBlank(l))throw new f.BaseException('Link "'+p.ListWrapper.toJSON(i)+'" does not resolve to a terminal instruction.');return l}h.isPresent(n)&&!r&&(u=p.StringMapWrapper.merge(n.auxInstruction,u),a=n.component);var d=this._rules.get(s);if(h.isBlank(d))throw new f.BaseException('Component "'+h.getTypeNameForDebugging(s)+'" has no route config.');var v=0,y={};if(v=t.length;else{var O=e.concat([R]),T=t.slice(v);S=this._generate(T,O,null,!1,i)}R.child=S}return R},t.prototype.hasRoute=function(t,e){var n=this._rules.get(e);return h.isBlank(n)?!1:n.hasRoute(t)},t.prototype.generateDefault=function(t){var e=this;if(h.isBlank(t))return null;var n=this._rules.get(t);if(h.isBlank(n)||h.isBlank(n.defaultRule))return null;var r=null;if(h.isPresent(n.defaultRule.handler.componentType)){var i=n.defaultRule.generate({});return n.defaultRule.terminal||(r=this.generateDefault(n.defaultRule.handler.componentType)),new _.DefaultInstruction(i,r)}return new _.UnresolvedInstruction(function(){return n.defaultRule.handler.resolveComponentType().then(function(n){return e.generateDefault(t)})})},t=a([v.Injectable(),c(0,v.Inject(e.ROUTER_PRIMARY_COMPONENT)),u("design:paramtypes",[h.Type])],t)}();e.RouteRegistry=w},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(5),a=function(){function t(t){this.configs=t}return t=i([s.CONST(),o("design:paramtypes",[Array])],t)}();e.RouteConfig=a;var u=function(){function t(t){var e=t.name,n=t.useAsDefault,r=t.path,i=t.regex,o=t.serializer,s=t.data;this.name=e,this.useAsDefault=n,this.path=r,this.regex=i,this.serializer=o,this.data=s}return t=i([s.CONST(),o("design:paramtypes",[Object])],t)}();e.AbstractRoute=u;var c=function(t){function e(e){var n=e.name,r=e.useAsDefault,i=e.path,o=e.regex,s=e.serializer,a=e.data,u=e.component;t.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.aux=null,this.component=u}return r(e,t),e=i([s.CONST(),o("design:paramtypes",[Object])],e)}(u);e.Route=c;var p=function(t){function e(e){var n=e.name,r=e.useAsDefault,i=e.path,o=e.regex,s=e.serializer,a=e.data,u=e.component;t.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.component=u}return r(e,t),e=i([s.CONST(),o("design:paramtypes",[Object])],e)}(u);e.AuxRoute=p;var l=function(t){function e(e){var n=e.name,r=e.useAsDefault,i=e.path,o=e.regex,s=e.serializer,a=e.data,u=e.loader;t.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.aux=null,this.loader=u}return r(e,t),e=i([s.CONST(),o("design:paramtypes",[Object])],e)}(u);e.AsyncRoute=l;var h=function(t){function e(e){var n=e.name,r=e.useAsDefault,i=e.path,o=e.regex,s=e.serializer,a=e.data,u=e.redirectTo;t.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.redirectTo=u}return r(e,t),e=i([s.CONST(),o("design:paramtypes",[Object])],e)}(u);e.Redirect=h},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(5),o=n(12),s=n(41),a=n(15),u=n(259),c=n(260),p=function(){function t(){}return t}();e.RouteMatch=p;var l=function(t){function e(e,n,r){t.call(this),this.instruction=e,this.remaining=n,this.remainingAux=r}return r(e,t),e}(p);e.PathMatch=l;var h=function(t){function e(e,n){t.call(this),this.redirectTo=e,this.specificity=n}return r(e,t),e}(p);e.RedirectMatch=h;var f=function(){function t(t,e){this._pathRecognizer=t,this.redirectTo=e,this.hash=this._pathRecognizer.hash}return Object.defineProperty(t.prototype,"path",{get:function(){return this._pathRecognizer.toString()},set:function(t){throw new o.BaseException("you cannot set the path of a RedirectRule directly")},enumerable:!0,configurable:!0}),t.prototype.recognize=function(t){var e=null;return i.isPresent(this._pathRecognizer.matchUrl(t))&&(e=new h(this.redirectTo,this._pathRecognizer.specificity)),s.PromiseWrapper.resolve(e)},t.prototype.generate=function(t){throw new o.BaseException("Tried to generate a redirect.")},t}();e.RedirectRule=f;var d=function(){function t(t,e,n){this._routePath=t,this.handler=e,this._routeName=n,this._cache=new a.Map,this.specificity=this._routePath.specificity,this.hash=this._routePath.hash,this.terminal=this._routePath.terminal}return Object.defineProperty(t.prototype,"path",{get:function(){return this._routePath.toString()},set:function(t){throw new o.BaseException("you cannot set the path of a RouteRule directly")},enumerable:!0,configurable:!0}),t.prototype.recognize=function(t){var e=this,n=this._routePath.matchUrl(t);return i.isBlank(n)?null:this.handler.resolveComponentType().then(function(t){var r=e._getInstruction(n.urlPath,n.urlParams,n.allParams);return new l(r,n.rest,n.auxiliary)})},t.prototype.generate=function(t){var e=this._routePath.generateUrl(t),n=e.urlPath,r=e.urlParams;return this._getInstruction(n,u.convertUrlParamsToArray(r),t)},t.prototype.generateComponentPathValues=function(t){return this._routePath.generateUrl(t)},t.prototype._getInstruction=function(t,e,n){if(i.isBlank(this.handler.componentType))throw new o.BaseException("Tried to get instruction before the type was loaded.");var r=t+"?"+e.join("&");if(this._cache.has(r))return this._cache.get(r);var s=new c.ComponentInstruction(t,e,this.handler.data,this.handler.componentType,this.terminal,this.specificity,n,this._routeName);return this._cache.set(r,s),s},t}();e.RouteRule=d},function(t,e,n){"use strict";function r(t){var e=[];return p.isBlank(t)?[]:(c.StringMapWrapper.forEach(t,function(t,n){e.push(t===!0?n:n+"="+t)}),e)}function i(t,e){return void 0===e&&(e="&"),r(t).join(e)}function o(t){for(var e=new h(t[t.length-1]),n=t.length-2;n>=0;n-=1)e=new h(t[n],e);return e}function s(t){var e=p.RegExpWrapper.firstMatch(d,t);return p.isPresent(e)?e[0]:""}function a(t){var e=p.RegExpWrapper.firstMatch(v,t);return p.isPresent(e)?e[0]:""}var u=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},c=n(15),p=n(5),l=n(12);e.convertUrlParamsToArray=r,e.serializeParams=i;var h=function(){function t(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=p.CONST_EXPR([])),void 0===r&&(r=p.CONST_EXPR({})),this.path=t,this.child=e,this.auxiliary=n,this.params=r}return t.prototype.toString=function(){return this.path+this._matrixParamsToString()+this._auxToString()+this._childString()},t.prototype.segmentToString=function(){return this.path+this._matrixParamsToString()},t.prototype._auxToString=function(){return this.auxiliary.length>0?"("+this.auxiliary.map(function(t){return t.toString()}).join("//")+")":""},t.prototype._matrixParamsToString=function(){var t=i(this.params,";");return t.length>0?";"+t:""},t.prototype._childString=function(){return p.isPresent(this.child)?"/"+this.child.toString():""},t}();e.Url=h;var f=function(t){function e(e,n,r,i){void 0===n&&(n=null),void 0===r&&(r=p.CONST_EXPR([])),void 0===i&&(i=null),t.call(this,e,n,r,i)}return u(e,t),e.prototype.toString=function(){return this.path+this._auxToString()+this._childString()+this._queryParamsToString()},e.prototype.segmentToString=function(){return this.path+this._queryParamsToString()},e.prototype._queryParamsToString=function(){return p.isBlank(this.params)?"":"?"+i(this.params)},e}(h);e.RootUrl=f,e.pathSegmentsToUrl=o;var d=p.RegExpWrapper.create("^[^\\/\\(\\)\\?;=&#]+"),v=p.RegExpWrapper.create("^[^\\(\\)\\?;&#]+"),y=function(){function t(){}return t.prototype.peekStartsWith=function(t){return this._remaining.startsWith(t)},t.prototype.capture=function(t){if(!this._remaining.startsWith(t))throw new l.BaseException('Expected "'+t+'".');this._remaining=this._remaining.substring(t.length)},t.prototype.parse=function(t){return this._remaining=t,""==t||"/"==t?new h(""):this.parseRoot()},t.prototype.parseRoot=function(){this.peekStartsWith("/")&&this.capture("/");var t=s(this._remaining);this.capture(t);var e=[];this.peekStartsWith("(")&&(e=this.parseAuxiliaryRoutes()),this.peekStartsWith(";")&&this.parseMatrixParams();var n=null;this.peekStartsWith("/")&&!this.peekStartsWith("//")&&(this.capture("/"),n=this.parseSegment());var r=null;return this.peekStartsWith("?")&&(r=this.parseQueryParams()),new f(t,n,e,r)},t.prototype.parseSegment=function(){if(0==this._remaining.length)return null;this.peekStartsWith("/")&&this.capture("/");var t=s(this._remaining);this.capture(t);var e=null;this.peekStartsWith(";")&&(e=this.parseMatrixParams());var n=[];this.peekStartsWith("(")&&(n=this.parseAuxiliaryRoutes());var r=null;return this.peekStartsWith("/")&&!this.peekStartsWith("//")&&(this.capture("/"),r=this.parseSegment()),new h(t,r,n,e)},t.prototype.parseQueryParams=function(){var t={};for(this.capture("?"),this.parseQueryParam(t);this._remaining.length>0&&this.peekStartsWith("&");)this.capture("&"),this.parseQueryParam(t);return t},t.prototype.parseMatrixParams=function(){for(var t={};this._remaining.length>0&&this.peekStartsWith(";");)this.capture(";"),this.parseParam(t);return t},t.prototype.parseParam=function(t){var e=s(this._remaining);if(!p.isBlank(e)){this.capture(e);var n=!0;if(this.peekStartsWith("=")){this.capture("=");var r=s(this._remaining);p.isPresent(r)&&(n=r,this.capture(n))}t[e]=n}},t.prototype.parseQueryParam=function(t){var e=s(this._remaining);if(!p.isBlank(e)){this.capture(e);var n=!0;if(this.peekStartsWith("=")){this.capture("=");var r=a(this._remaining);p.isPresent(r)&&(n=r,this.capture(n))}t[e]=n}},t.prototype.parseAuxiliaryRoutes=function(){var t=[];for(this.capture("(");!this.peekStartsWith(")")&&this._remaining.length>0;)t.push(this.parseSegment()),this.peekStartsWith("//")&&this.capture("//");return this.capture(")"),t},t}();e.UrlParser=y,e.parser=new y},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=n(15),o=n(5),s=n(40),a=function(){function t(t){this.params=t}return t.prototype.get=function(t){return o.normalizeBlank(i.StringMapWrapper.get(this.params,t))},t}();e.RouteParams=a;var u=function(){function t(t){void 0===t&&(t=o.CONST_EXPR({})),this.data=t}return t.prototype.get=function(t){return o.normalizeBlank(i.StringMapWrapper.get(this.data,t))},t}();e.RouteData=u,e.BLANK_ROUTE_DATA=new u;var c=function(){function t(t,e,n){this.component=t,this.child=e,this.auxInstruction=n}return Object.defineProperty(t.prototype,"urlPath",{get:function(){return o.isPresent(this.component)?this.component.urlPath:""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"urlParams",{get:function(){return o.isPresent(this.component)?this.component.urlParams:[]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"specificity",{get:function(){var t="";return o.isPresent(this.component)&&(t+=this.component.specificity),o.isPresent(this.child)&&(t+=this.child.specificity),t},enumerable:!0,configurable:!0}),t.prototype.toRootUrl=function(){return this.toUrlPath()+this.toUrlQuery()},t.prototype._toNonRootUrl=function(){return this._stringifyPathMatrixAuxPrefixed()+(o.isPresent(this.child)?this.child._toNonRootUrl():"")},t.prototype.toUrlQuery=function(){return this.urlParams.length>0?"?"+this.urlParams.join("&"):""},t.prototype.replaceChild=function(t){return new p(this.component,t,this.auxInstruction)},t.prototype.toUrlPath=function(){return this.urlPath+this._stringifyAux()+(o.isPresent(this.child)?this.child._toNonRootUrl():"")},t.prototype.toLinkUrl=function(){return this.urlPath+this._stringifyAux()+(o.isPresent(this.child)?this.child._toLinkUrl():"")+this.toUrlQuery()},t.prototype._toLinkUrl=function(){return this._stringifyPathMatrixAuxPrefixed()+(o.isPresent(this.child)?this.child._toLinkUrl():"")},t.prototype._stringifyPathMatrixAuxPrefixed=function(){var t=this._stringifyPathMatrixAux();return t.length>0&&(t="/"+t),t},t.prototype._stringifyMatrixParams=function(){return this.urlParams.length>0?";"+this.urlParams.join(";"):""},t.prototype._stringifyPathMatrixAux=function(){return o.isBlank(this.component)?"":this.urlPath+this._stringifyMatrixParams()+this._stringifyAux()},t.prototype._stringifyAux=function(){var t=[];return i.StringMapWrapper.forEach(this.auxInstruction,function(e,n){t.push(e._stringifyPathMatrixAux())}),t.length>0?"("+t.join("//")+")":""},t}();e.Instruction=c;var p=function(t){function e(e,n,r){t.call(this,e,n,r)}return r(e,t),e.prototype.resolveComponent=function(){return s.PromiseWrapper.resolve(this.component)},e}(c);e.ResolvedInstruction=p;var l=function(t){function e(e,n){t.call(this,e,n,{})}return r(e,t),e.prototype.toLinkUrl=function(){return""},e.prototype._toLinkUrl=function(){return""},e}(p);e.DefaultInstruction=l;var h=function(t){function e(e,n,r){void 0===n&&(n=""),void 0===r&&(r=o.CONST_EXPR([])),t.call(this,null,null,{}),this._resolver=e,this._urlPath=n,this._urlParams=r}return r(e,t),Object.defineProperty(e.prototype,"urlPath",{get:function(){return o.isPresent(this.component)?this.component.urlPath:o.isPresent(this._urlPath)?this._urlPath:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlParams",{get:function(){return o.isPresent(this.component)?this.component.urlParams:o.isPresent(this._urlParams)?this._urlParams:[]},enumerable:!0,configurable:!0}),e.prototype.resolveComponent=function(){var t=this;return o.isPresent(this.component)?s.PromiseWrapper.resolve(this.component):this._resolver().then(function(e){return t.child=o.isPresent(e)?e.child:null,t.component=o.isPresent(e)?e.component:null})},e}(c);e.UnresolvedInstruction=h;var f=function(t){function e(e,n,r,i){t.call(this,e,n,r),this._specificity=i}return r(e,t),Object.defineProperty(e.prototype,"specificity",{get:function(){return this._specificity},enumerable:!0,configurable:!0}),e}(p);e.RedirectInstruction=f;var d=function(){function t(t,n,r,i,s,a,u,c){void 0===u&&(u=null),this.urlPath=t,this.urlParams=n,this.componentType=i,this.terminal=s,this.specificity=a,this.params=u,this.routeName=c,this.reuse=!1,this.routeData=o.isPresent(r)?r:e.BLANK_ROUTE_DATA}return t}();e.ComponentInstruction=d},function(t,e,n){"use strict";var r=n(5),i=n(12),o=n(15),s=n(40),a=n(258),u=n(257),c=n(262),p=n(263),l=n(264),h=n(267),f=function(){function t(){this.rulesByName=new o.Map,this.auxRulesByName=new o.Map,this.auxRulesByPath=new o.Map,this.rules=[],this.defaultRule=null}return t.prototype.config=function(t){var e;if(r.isPresent(t.name)&&t.name[0].toUpperCase()!=t.name[0]){var n=t.name[0].toUpperCase()+t.name.substring(1);throw new i.BaseException('Route "'+t.path+'" with name "'+t.name+'" does not begin with an uppercase letter. Route names should be CamelCase like "'+n+'".')}if(t instanceof u.AuxRoute){e=new p.SyncRouteHandler(t.component,t.data);var o=this._getRoutePath(t),s=new a.RouteRule(o,e,t.name);return this.auxRulesByPath.set(o.toString(),s),r.isPresent(t.name)&&this.auxRulesByName.set(t.name,s),s.terminal}var l=!1;if(t instanceof u.Redirect){var h=this._getRoutePath(t),f=new a.RedirectRule(h,t.redirectTo);return this._assertNoHashCollision(f.hash,t.path),this.rules.push(f),!0}t instanceof u.Route?(e=new p.SyncRouteHandler(t.component,t.data),l=r.isPresent(t.useAsDefault)&&t.useAsDefault):t instanceof u.AsyncRoute&&(e=new c.AsyncRouteHandler(t.loader,t.data),l=r.isPresent(t.useAsDefault)&&t.useAsDefault);var d=this._getRoutePath(t),v=new a.RouteRule(d,e,t.name);if(this._assertNoHashCollision(v.hash,t.path),l){if(r.isPresent(this.defaultRule))throw new i.BaseException("Only one route can be default");this.defaultRule=v}return this.rules.push(v),r.isPresent(t.name)&&this.rulesByName.set(t.name,v),v.terminal},t.prototype.recognize=function(t){var e=[];return this.rules.forEach(function(n){var i=n.recognize(t);r.isPresent(i)&&e.push(i)}),0==e.length&&r.isPresent(t)&&t.auxiliary.length>0?[s.PromiseWrapper.resolve(new a.PathMatch(null,null,t.auxiliary))]:e},t.prototype.recognizeAuxiliary=function(t){var e=this.auxRulesByPath.get(t.path);return r.isPresent(e)?[e.recognize(t)]:[s.PromiseWrapper.resolve(null)]},t.prototype.hasRoute=function(t){return this.rulesByName.has(t)},t.prototype.componentLoaded=function(t){return this.hasRoute(t)&&r.isPresent(this.rulesByName.get(t).handler.componentType)},t.prototype.loadComponent=function(t){return this.rulesByName.get(t).handler.resolveComponentType()},t.prototype.generate=function(t,e){var n=this.rulesByName.get(t);return r.isBlank(n)?null:n.generate(e)},t.prototype.generateAuxiliary=function(t,e){var n=this.auxRulesByName.get(t);return r.isBlank(n)?null:n.generate(e)},t.prototype._assertNoHashCollision=function(t,e){this.rules.forEach(function(n){if(t==n.hash)throw new i.BaseException("Configuration '"+e+"' conflicts with existing route '"+n.path+"'")})},t.prototype._getRoutePath=function(t){if(r.isPresent(t.regex)){if(r.isFunction(t.serializer))return new h.RegexRoutePath(t.regex,t.serializer);throw new i.BaseException("Route provides a regex property, '"+t.regex+"', but no serializer property")}if(r.isPresent(t.path)){var e=t instanceof u.AuxRoute&&t.path.startsWith("/")?t.path.substring(1):t.path;return new l.ParamRoutePath(e)}throw new i.BaseException("Route must provide either a path or regex property")},t}();e.RuleSet=f},function(t,e,n){"use strict";var r=n(5),i=n(260),o=function(){function t(t,e){void 0===e&&(e=null),this._loader=t,this._resolvedComponent=null,this.data=r.isPresent(e)?new i.RouteData(e):i.BLANK_ROUTE_DATA}return t.prototype.resolveComponentType=function(){ +var t=this;return r.isPresent(this._resolvedComponent)?this._resolvedComponent:this._resolvedComponent=this._loader().then(function(e){return t.componentType=e,e})},t}();e.AsyncRouteHandler=o},function(t,e,n){"use strict";var r=n(40),i=n(5),o=n(260),s=function(){function t(t,e){this.componentType=t,this._resolvedComponent=null,this._resolvedComponent=r.PromiseWrapper.resolve(t),this.data=i.isPresent(e)?new o.RouteData(e):o.BLANK_ROUTE_DATA}return t.prototype.resolveComponentType=function(){return this._resolvedComponent},t}();e.SyncRouteHandler=s},function(t,e,n){"use strict";function r(t){return o.isBlank(t)?null:(t=o.StringWrapper.replaceAll(t,y,"%25"),t=o.StringWrapper.replaceAll(t,m,"%2F"),t=o.StringWrapper.replaceAll(t,g,"%28"),t=o.StringWrapper.replaceAll(t,_,"%29"),t=o.StringWrapper.replaceAll(t,b,"%3B"))}function i(t){return o.isBlank(t)?null:(t=o.StringWrapper.replaceAll(t,P,";"),t=o.StringWrapper.replaceAll(t,E,")"),t=o.StringWrapper.replaceAll(t,w,"("),t=o.StringWrapper.replaceAll(t,C,"/"),t=o.StringWrapper.replaceAll(t,R,"%"))}var o=n(5),s=n(12),a=n(15),u=n(265),c=n(259),p=n(266),l=function(){function t(){this.name="",this.specificity="",this.hash="..."}return t.prototype.generate=function(t){return""},t.prototype.match=function(t){return!0},t}(),h=function(){function t(t){this.path=t,this.name="",this.specificity="2",this.hash=t}return t.prototype.match=function(t){return t==this.path},t.prototype.generate=function(t){return this.path},t}(),f=function(){function t(t){this.name=t,this.specificity="1",this.hash=":"}return t.prototype.match=function(t){return t.length>0},t.prototype.generate=function(t){if(!a.StringMapWrapper.contains(t.map,this.name))throw new s.BaseException("Route generator for '"+this.name+"' was not included in parameters passed.");return r(u.normalizeString(t.get(this.name)))},t.paramMatcher=/^:([^\/]+)$/g,t}(),d=function(){function t(t){this.name=t,this.specificity="0",this.hash="*"}return t.prototype.match=function(t){return!0},t.prototype.generate=function(t){return u.normalizeString(t.get(this.name))},t.wildcardMatcher=/^\*([^\/]+)$/g,t}(),v=function(){function t(t){this.routePath=t,this.terminal=!0,this._assertValidPath(t),this._parsePathString(t),this.specificity=this._calculateSpecificity(),this.hash=this._calculateHash();var e=this._segments[this._segments.length-1];this.terminal=!(e instanceof l)}return t.prototype.matchUrl=function(t){for(var e,n=t,r={},s=[],u=0;u=r;r++){var i,a=e[r];if(o.isPresent(i=o.RegExpWrapper.firstMatch(f.paramMatcher,a)))this._segments.push(new f(i[1]));else if(o.isPresent(i=o.RegExpWrapper.firstMatch(d.wildcardMatcher,a)))this._segments.push(new d(i[1]));else if("..."==a){if(n>r)throw new s.BaseException('Unexpected "..." before the end of the path for "'+t+'".');this._segments.push(new l)}else this._segments.push(new h(a))}},t.prototype._calculateSpecificity=function(){var t,e,n=this._segments.length;if(0==n)e+="2";else for(e="",t=0;n>t;t++)e+=this._segments[t].specificity;return e},t.prototype._calculateHash=function(){var t,e=this._segments.length,n=[];for(t=0;e>t;t++)n.push(this._segments[t].hash);return n.join("/")},t.prototype._assertValidPath=function(e){if(o.StringWrapper.contains(e,"#"))throw new s.BaseException('Path "'+e+'" should not include "#". Use "HashLocationStrategy" instead.');var n=o.RegExpWrapper.firstMatch(t.RESERVED_CHARS,e);if(o.isPresent(n))throw new s.BaseException('Path "'+e+'" contains "'+n[0]+'" which is not allowed in a route config.')},t.RESERVED_CHARS=o.RegExpWrapper.create("//|\\(|\\)|;|\\?|="),t}();e.ParamRoutePath=v;var y=/%/g,m=/\//g,g=/\(/g,_=/\)/g,b=/;/g,P=/%3B/gi,E=/%29/gi,w=/%28/gi,C=/%2F/gi,R=/%25/gi},function(t,e,n){"use strict";function r(t){return i.isBlank(t)?null:t.toString()}var i=n(5),o=n(15),s=function(){function t(t){var e=this;this.map={},this.keys={},i.isPresent(t)&&o.StringMapWrapper.forEach(t,function(t,n){e.map[n]=i.isPresent(t)?t.toString():null,e.keys[n]=!0})}return t.prototype.get=function(t){return o.StringMapWrapper["delete"](this.keys,t),this.map[t]},t.prototype.getUnused=function(){var t=this,e={},n=o.StringMapWrapper.keys(this.keys);return n.forEach(function(n){return e[n]=o.StringMapWrapper.get(t.map,n)}),e},t}();e.TouchMap=s,e.normalizeString=r},function(t,e){"use strict";var n=function(){function t(t,e,n,r,i){this.urlPath=t,this.urlParams=e,this.allParams=n,this.auxiliary=r,this.rest=i}return t}();e.MatchedUrl=n;var r=function(){function t(t,e){this.urlPath=t,this.urlParams=e}return t}();e.GeneratedUrl=r},function(t,e,n){"use strict";var r=n(5),i=n(266),o=function(){function t(t,e){this._reString=t,this._serializer=e,this.terminal=!0,this.specificity="2",this.hash=this._reString,this._regex=r.RegExpWrapper.create(this._reString)}return t.prototype.matchUrl=function(t){var e=t.toString(),n={},o=r.RegExpWrapper.matcher(this._regex,e),s=r.RegExpMatcherWrapper.next(o);if(r.isBlank(s))return null;for(var a=0;ao?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(5),s=function(){function t(t){this.name=t}return t=r([o.CONST(),i("design:paramtypes",[String])],t)}();e.RouteLifecycleHook=s;var a=function(){function t(t){this.fn=t}return t=r([o.CONST(),i("design:paramtypes",[Function])],t)}();e.CanActivate=a,e.routerCanReuse=o.CONST_EXPR(new s("routerCanReuse")),e.routerCanDeactivate=o.CONST_EXPR(new s("routerCanDeactivate")),e.routerOnActivate=o.CONST_EXPR(new s("routerOnActivate")),e.routerOnReuse=o.CONST_EXPR(new s("routerOnReuse")),e.routerOnDeactivate=o.CONST_EXPR(new s("routerOnDeactivate"))},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=this&&this.__param||function(t,e){return function(n,r){e(n,r,t)}},s=n(40),a=n(15),u=n(5),c=n(2),p=n(248),l=n(260),h=n(273),f=n(270),d=s.PromiseWrapper.resolve(!0),v=function(){function t(t,e,n,r){this._viewContainerRef=t,this._loader=e,this._parentRouter=n,this.name=null,this._componentRef=null,this._currentInstruction=null,this.activateEvents=new s.EventEmitter,u.isPresent(r)?(this.name=r,this._parentRouter.registerAuxOutlet(this)):this._parentRouter.registerPrimaryOutlet(this)}return t.prototype.activate=function(t){var e=this,n=this._currentInstruction;this._currentInstruction=t;var r=t.componentType,i=this._parentRouter.childRouter(r),o=c.ReflectiveInjector.resolve([c.provide(l.RouteData,{useValue:t.routeData}),c.provide(l.RouteParams,{useValue:new l.RouteParams(t.params)}),c.provide(p.Router,{useValue:i})]);return this._componentRef=this._loader.loadNextToLocation(r,this._viewContainerRef,o),this._componentRef.then(function(i){return e.activateEvents.emit(i.instance),f.hasLifecycleHook(h.routerOnActivate,r)?e._componentRef.then(function(e){return e.instance.routerOnActivate(t,n)}):i})},t.prototype.reuse=function(t){var e=this._currentInstruction;return this._currentInstruction=t,u.isBlank(this._componentRef)?this.activate(t):s.PromiseWrapper.resolve(f.hasLifecycleHook(h.routerOnReuse,this._currentInstruction.componentType)?this._componentRef.then(function(n){return n.instance.routerOnReuse(t,e)}):!0)},t.prototype.deactivate=function(t){var e=this,n=d;return u.isPresent(this._componentRef)&&u.isPresent(this._currentInstruction)&&f.hasLifecycleHook(h.routerOnDeactivate,this._currentInstruction.componentType)&&(n=this._componentRef.then(function(n){return n.instance.routerOnDeactivate(t,e._currentInstruction)})),n.then(function(t){if(u.isPresent(e._componentRef)){var n=e._componentRef.then(function(t){return t.destroy()});return e._componentRef=null,n}})},t.prototype.routerCanDeactivate=function(t){var e=this;return u.isBlank(this._currentInstruction)?d:f.hasLifecycleHook(h.routerCanDeactivate,this._currentInstruction.componentType)?this._componentRef.then(function(n){return n.instance.routerCanDeactivate(t,e._currentInstruction)}):d},t.prototype.routerCanReuse=function(t){var e,n=this;return e=u.isBlank(this._currentInstruction)||this._currentInstruction.componentType!=t.componentType?!1:f.hasLifecycleHook(h.routerCanReuse,this._currentInstruction.componentType)?this._componentRef.then(function(e){return e.instance.routerCanReuse(t,n._currentInstruction)}):t==this._currentInstruction||u.isPresent(t.params)&&u.isPresent(this._currentInstruction.params)&&a.StringMapWrapper.equals(t.params,this._currentInstruction.params),s.PromiseWrapper.resolve(e)},t.prototype.ngOnDestroy=function(){this._parentRouter.unregisterPrimaryOutlet(this)},r([c.Output("activate"),i("design:type",Object)],t.prototype,"activateEvents",void 0),t=r([c.Directive({selector:"router-outlet"}),o(3,c.Attribute("name")),i("design:paramtypes",[c.ViewContainerRef,c.DynamicComponentLoader,p.Router,String])],t)}();e.RouterOutlet=v},function(t,e,n){"use strict";var r=n(9),i=n(271),o=n(271);e.routerCanReuse=o.routerCanReuse,e.routerCanDeactivate=o.routerCanDeactivate,e.routerOnActivate=o.routerOnActivate,e.routerOnReuse=o.routerOnReuse,e.routerOnDeactivate=o.routerOnDeactivate,e.CanActivate=r.makeDecorator(i.CanActivate)},function(t,e,n){"use strict";var r=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},i=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},o=n(2),s=n(249),a=n(5),u=n(248),c=function(){function t(t,e){var n=this;this._router=t,this._location=e,this._router.subscribe(function(t){return n._updateLink()})}return t.prototype._updateLink=function(){this._navigationInstruction=this._router.generate(this._routeParams);var t=this._navigationInstruction.toLinkUrl();this.visibleHref=this._location.prepareExternalUrl(t)},Object.defineProperty(t.prototype,"isRouteActive",{get:function(){return this._router.isRouteActive(this._navigationInstruction)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"routeParams",{set:function(t){this._routeParams=t,this._updateLink()},enumerable:!0,configurable:!0}),t.prototype.onClick=function(){return a.isString(this.target)&&"_self"!=this.target?!0:(this._router.navigateByInstruction(this._navigationInstruction),!1)},t=r([o.Directive({selector:"[routerLink]",inputs:["routeParams: routerLink","target: target"],host:{"(click)":"onClick()","[attr.href]":"visibleHref","[class.router-link-active]":"isRouteActive"}}),i("design:paramtypes",[u.Router,s.Location])],t)}();e.RouterLink=c},function(t,e,n){"use strict";function r(t,e,n,r){var i=new s.RootRouter(t,e,n);return r.registerDisposeListener(function(){return i.dispose()}),i}function i(t){if(0==t.componentTypes.length)throw new p.BaseException("Bootstrap at least one component before injecting Router.");return t.componentTypes[0]}var o=n(249),s=n(248),a=n(256),u=n(5),c=n(2),p=n(12);e.ROUTER_PROVIDERS_COMMON=u.CONST_EXPR([a.RouteRegistry,u.CONST_EXPR(new c.Provider(o.LocationStrategy,{useClass:o.PathLocationStrategy})),o.Location,u.CONST_EXPR(new c.Provider(s.Router,{useFactory:r,deps:u.CONST_EXPR([a.RouteRegistry,o.Location,a.ROUTER_PRIMARY_COMPONENT,c.ApplicationRef])})),u.CONST_EXPR(new c.Provider(a.ROUTER_PRIMARY_COMPONENT,{useFactory:i,deps:u.CONST_EXPR([c.ApplicationRef])}))])},function(t,e,n){"use strict";var r=n(275),i=n(2),o=n(277),s=n(249),a=n(5);e.ROUTER_PROVIDERS=a.CONST_EXPR([r.ROUTER_PROVIDERS_COMMON,a.CONST_EXPR(new i.Provider(s.PlatformLocation,{useClass:o.BrowserPlatformLocation}))]),e.ROUTER_BINDINGS=e.ROUTER_PROVIDERS},function(t,e,n){"use strict";var r=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},i=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},o=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},s=n(8),a=n(251),u=n(200),c=function(t){function e(){t.call(this),this._init()}return r(e,t),e.prototype._init=function(){this._location=u.DOM.getLocation(),this._history=u.DOM.getHistory()},Object.defineProperty(e.prototype,"location",{get:function(){return this._location},enumerable:!0,configurable:!0}),e.prototype.getBaseHrefFromDOM=function(){return u.DOM.getBaseHref()},e.prototype.onPopState=function(t){u.DOM.getGlobalEventTarget("window").addEventListener("popstate",t,!1)},e.prototype.onHashChange=function(t){u.DOM.getGlobalEventTarget("window").addEventListener("hashchange",t,!1)},Object.defineProperty(e.prototype,"pathname",{get:function(){return this._location.pathname},set:function(t){this._location.pathname=t},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{get:function(){return this._location.search},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){return this._location.hash},enumerable:!0,configurable:!0}),e.prototype.pushState=function(t,e,n){this._history.pushState(t,e,n)},e.prototype.replaceState=function(t,e,n){this._history.replaceState(t,e,n)},e.prototype.forward=function(){this._history.forward()},e.prototype.back=function(){this._history.back()},e=i([s.Injectable(),o("design:paramtypes",[])],e)}(a.PlatformLocation);e.BrowserPlatformLocation=c},function(t,e,n){"use strict";var r=n(137),i=n(2),o=n(279),s=n(5),a=n(279);e.RouterLinkTransform=a.RouterLinkTransform,e.ROUTER_LINK_DSL_PROVIDER=s.CONST_EXPR(new i.Provider(r.TEMPLATE_TRANSFORMS,{useClass:o.RouterLinkTransform,multi:!0}))},function(t,e,n){"use strict";function r(t,e){var n=new y(t,e.trim()).tokenize();return new m(n).generate()}var i=this&&this.__extends||function(t,e){function n(){this.constructor=t}for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)},o=this&&this.__decorate||function(t,e,n,r){var i,o=arguments.length,s=3>o?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,r);else for(var a=t.length-1;a>=0;a--)(i=t[a])&&(s=(3>o?i(s):o>3?i(e,n,s):i(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s},s=this&&this.__metadata||function(t,e){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(t,e):void 0},a=n(137),u=n(141),c=n(12),p=n(2),l=n(142),h=function(){function t(t){this.value=t}return t}(),f=function(){function t(){}return t}(),d=function(){function t(){}return t}(),v=function(){function t(t){this.ast=t}return t}(),y=function(){function t(t,e){this.parser=t,this.exp=e,this.index=0}return t.prototype.tokenize=function(){for(var t=[];this.indexn;n++)e.insertBefore(t[n],this.contentInsertionPoint)},t.prototype.setupOutputs=function(){for(var t=this,e=this.attrs,n=this.info.outputs,r=0;r1)throw new Error("Only support single directive definition for: "+this.name);var n=e[0];n.replace&&this.notSupported("replace"),n.terminal&&this.notSupported("terminal");var r=n.link;return"object"==typeof r&&r.post&&this.notSupported("link.post"),n},t.prototype.notSupported=function(t){throw new Error("Upgraded directive '"+this.name+"' does not support '"+t+"'.")},t.prototype.extractBindings=function(){var t="object"==typeof this.directive.bindToController;if(t&&Object.keys(this.directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time are not supported.");var e=t?this.directive.bindToController:this.directive.scope;if("object"==typeof e)for(var n in e)if(e.hasOwnProperty(n)){var r=e[n],i=r.charAt(0);r=r.substr(1)||n;var o="output_"+n,s=o+": "+n,a=o+": "+n+"Change",u="input_"+n,c=u+": "+n;switch(i){case"=":this.propertyOutputs.push(o),this.checkProperties.push(r),this.outputs.push(o),this.outputsRename.push(a),this.propertyMap[o]=r;case"@":case"<":this.inputs.push(u),this.inputsRename.push(c),this.propertyMap[u]=r;break;case"&":this.outputs.push(o),this.outputsRename.push(s),this.propertyMap[o]=r;break;default:var p=JSON.stringify(e);throw new Error("Unexpected mapping '"+i+"' in '"+p+"' in '"+this.name+"' directive.")}}},t.prototype.compileTemplate=function(t,e,n){function r(e){var n=document.createElement("div");return n.innerHTML=e,t(n.childNodes)}var i=this;if(void 0!==this.directive.template)this.linkFn=r(this.directive.template);else{if(!this.directive.templateUrl)throw new Error("Directive '"+this.name+"' is not a component, it is missing template.");var o=this.directive.templateUrl,s=e.get(o);if(void 0===s)return new Promise(function(t,s){n("GET",o,null,function(n,a){200==n?t(i.linkFn=r(e.put(o,a))):s("GET "+o+" returned "+n+": "+a)})});this.linkFn=r(s)}return null},t.resolve=function(t,e){var n=[],r=e.get(i.NG1_COMPILE),o=e.get(i.NG1_TEMPLATE_CACHE),s=e.get(i.NG1_HTTP_BACKEND),a=e.get(i.NG1_CONTROLLER);for(var u in t)if(t.hasOwnProperty(u)){var c=t[u];c.directive=c.extractDirective(e),c.$controller=a,c.extractBindings();var p=c.compileTemplate(r,o,s);p&&n.push(p)}return Promise.all(n)},t}();e.UpgradeNg1ComponentAdapterBuilder=p;var l=function(){function t(t,e,n,i,a,p,l,h,f,d){this.linkFn=t,this.directive=n,this.inputs=p,this.outputs=l,this.propOuts=h,this.checkProperties=f,this.propertyMap=d,this.destinationObj=null,this.checkLastValues=[],this.element=i.nativeElement,this.componentScope=e.$new(!!n.scope);var v=s.element(this.element),y=n.controller,m=null;if(y){var g={$scope:this.componentScope,$element:v};m=a(y,g,null,n.controllerAs),v.data(o.controllerKey(n.name),m)}var _=n.link;if("object"==typeof _&&(_=_.pre),_){var b=c,P=c,E=this.resolveRequired(v,n.require);n.link(this.componentScope,v,b,E,P)}this.destinationObj=n.bindToController&&m?m:this.componentScope;for(var w=0;wr;r++)e.element.appendChild(t[r])},{parentBoundTranscludeFn:function(t,e){e(n)}}),this.destinationObj.$onInit&&this.destinationObj.$onInit()},t.prototype.ngOnChanges=function(t){for(var e in t)if(t.hasOwnProperty(e)){var n=t[e];this.setComponentProperty(e,n.currentValue)}},t.prototype.ngDoCheck=function(){for(var t=0,e=this.destinationObj,n=this.checkLastValues,r=this.checkProperties,i=0;i-1;u&&!a&&(i=Promise.resolve());var s=e("es6-promise").Promise;i&&s._setScheduler(function(e){i.then(e)}),s._setAsap(function(e,t){n.zone.scheduleMicrotask(function(){e(t)})}),t.exports={addMicrotaskSupport:o}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"es6-promise":17}],5:[function(e,t,n){(function(n){"use strict";function r(){o.patchSetClearFunction(n,["timeout","interval","immediate"]),o.patchRequestAnimationFrame(n,["requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame"]),o.patchFunction(n,["alert","prompt"]),c.apply(),f.apply(),i.apply(),u.patchClass("MutationObserver"),u.patchClass("WebKitMutationObserver"),a.apply(),s.apply(),p.apply(),l.apply()}var o=e("./functions"),i=e("./promise"),u=e("./mutation-observer"),a=e("./define-property"),s=e("./register-element"),c=(e("./websocket"),e("./event-target")),f=e("./property-descriptor"),p=e("./geolocation"),l=e("./file-reader");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./define-property":6,"./event-target":7,"./file-reader":8,"./functions":9,"./geolocation":10,"./mutation-observer":11,"./promise":12,"./property-descriptor":13,"./register-element":14,"./websocket":15}],6:[function(e,t,n){"use strict";function r(){Object.defineProperty=function(e,t,n){if(i(e,t))throw new TypeError("Cannot assign to read only property '"+t+"' of "+e);return"prototype"!==t&&(n=u(e,t,n)),s(e,t,n)},Object.defineProperties=function(e,t){return Object.keys(t).forEach(function(n){Object.defineProperty(e,n,t[n])}),e},Object.create=function(e,t){return"object"==typeof t&&Object.keys(t).forEach(function(n){t[n]=u(e,n,t[n])}),f(e,t)},Object.getOwnPropertyDescriptor=function(e,t){var n=c(e,t);return i(e,t)&&(n.configurable=!1),n}}function o(e,t,n){return n=u(e,t,n),s(e,t,n)}function i(e,t){return e&&e[p]&&e[p][t]}function u(e,t,n){return n.configurable=!0,n.configurable||(e[p]||s(e,p,{writable:!0,value:{}}),e[p][t]=!0),n}var a=e("../keys"),s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f=Object.create,p=a.create("unconfigurables");t.exports={apply:r,_redefineProperty:o}},{"../keys":3}],7:[function(e,t,n){(function(n){"use strict";function r(){if(n.EventTarget)o.patchEventTargetMethods(n.EventTarget.prototype);else{var e=["ApplicationCache","EventSource","FileReader","InputMethodContext","MediaController","MessagePort","Node","Performance","SVGElementInstance","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebKitNamedFlow","Worker","WorkerGlobalScope","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];e.forEach(function(e){var t=n[e]&&n[e].prototype;t&&t.addEventListener&&o.patchEventTargetMethods(t)}),"undefined"!=typeof window&&o.patchEventTargetMethods(window)}}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],8:[function(e,t,n){"use strict";function r(){o.patchClass("FileReader")}var o=e("../utils");t.exports={apply:r}},{"../utils":16}],9:[function(e,t,n){(function(n){"use strict";function r(e,t){t.map(function(e){return e[0].toUpperCase()+e.substr(1)}).forEach(function(t){var r="set"+t,o=e[r];if(o){var i="clear"+t,u={},s="setInterval"===r?a.bindArguments:a.bindArgumentsOnce;n.zone[r]=function(t){var n,r=t;arguments[0]=function(){return delete u[n],r.apply(this,arguments)};var i=s(arguments);return n=o.apply(e,i),u[n]=!0,n},e[r]=function(){return n.zone[r].apply(this,arguments)};var c=e[i];n.zone[i]=function(e){return u[e]&&(delete u[e],n.zone.dequeueTask()),c.apply(this,arguments)},e[i]=function(){return n.zone[i].apply(this,arguments)}}})}function o(e,t){t.forEach(function(t){var r=e[t];r&&(n.zone[t]=function(t){var o=n.zone.isRootZone()?n.zone.fork():n.zone;return t&&(arguments[0]=function(){return o.run(t,this,arguments)}),r.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)})})}function i(e,t){t.forEach(function(t){var r=e[t];r&&(n.zone[t]=function(t){arguments[0]=function(){return t.apply(this,arguments)};var n=a.bindArgumentsOnce(arguments);return r.apply(e,n)},e[t]=function(){return zone[t].apply(this,arguments)})})}function u(e,t){t.forEach(function(t){var r=e[t];n.zone[t]=function(){return r.apply(e,arguments)},e[t]=function(){return n.zone[t].apply(this,arguments)}})}var a=e("../utils");t.exports={patchSetClearFunction:r,patchSetFunction:i,patchRequestAnimationFrame:o,patchFunction:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],10:[function(e,t,n){(function(n){"use strict";function r(){n.navigator&&n.navigator.geolocation&&o.patchPrototype(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],11:[function(e,t,n){(function(n){"use strict";function r(e){var t=n[e];if(t){n[e]=function(e){this[i]=new t(n.zone.bind(e,!0)),this[u]=n.zone};var r=new t(function(){});n[e].prototype.disconnect=function(){var e=this[i].disconnect.apply(this[i],arguments);return this[a]&&(this[u].dequeueTask(),this[a]=!1),e},n[e].prototype.observe=function(){return this[a]||(this[u].enqueueTask(),this[a]=!0),this[i].observe.apply(this[i],arguments)};var o;for(o in r)!function(t){"undefined"==typeof n[e].prototype&&("function"==typeof r[t]?n[e].prototype[t]=function(){return this[i][t].apply(this[i],arguments)}:Object.defineProperty(n[e].prototype,t,{set:function(e){"function"==typeof e?this[i][t]=n.zone.bind(e):this[i][t]=e},get:function(){return this[i][t]}}))}(o)}}var o=e("../keys"),i=o.create("originalInstance"),u=o.create("creationZone"),a=o.create("isActive");t.exports={patchClass:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../keys":3}],12:[function(e,t,n){(function(n){"use strict";function r(e,t){var r=n,o=e.every(function(e){return r=r[e]});o&&t.forEach(function(e){var t=r[e];t&&(r[e]=u(t))})}function o(e){var t=e.then;e.then=function(){var n=a.bindArguments(arguments),r=t.apply(e,n);return o(r)};var n=e["catch"];return e["catch"]=function(){var t=a.bindArguments(arguments),r=n.apply(e,t);return o(r)},e}function i(){if(n.Promise){a.patchPrototype(Promise.prototype,["then","catch"]);var e=[[[],["fetch"]],[["Response","prototype"],["arrayBuffer","blob","json","text"]]];e.forEach(function(e){r(e[0],e[1])})}}var u,a=e("../utils");u=n.Promise?function(e){return function(){var t=e.apply(this,arguments);return t instanceof Promise?t:new Promise(function(e,n){t.then(e,n)})}}:function(e){return function(){return o(e.apply(this,arguments))}},t.exports={apply:i,bindPromiseFn:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],13:[function(e,t,n){(function(n){"use strict";function r(){if(!a.isWebWorker()){var e="undefined"!=typeof WebSocket;if(o()){var t=c.map(function(e){return"on"+e});a.patchProperties(HTMLElement.prototype,t),a.patchProperties(XMLHttpRequest.prototype),e&&a.patchProperties(WebSocket.prototype)}else i(),a.patchClass("XMLHttpRequest"),e&&u.apply()}}function o(){if(!Object.getOwnPropertyDescriptor(HTMLElement.prototype,"onclick")&&"undefined"!=typeof Element){var e=Object.getOwnPropertyDescriptor(Element.prototype,"onclick");if(e&&!e.configurable)return!1}Object.defineProperty(HTMLElement.prototype,"onclick",{get:function(){return!0}});var t=document.createElement("div"),n=!!t.onclick;return Object.defineProperty(HTMLElement.prototype,"onclick",{}),n}function i(){c.forEach(function(e){var t="on"+e;document.addEventListener(e,function(e){for(var r,o=e.target;o;)o[t]&&!o[t][f]&&(r=n.zone.bind(o[t]),r[f]=o[t],o[t]=r),o=o.parentElement},!0)})}var u=e("./websocket"),a=e("../utils"),s=e("../keys"),c="copy cut paste abort blur focus canplay canplaythrough change click contextmenu dblclick drag dragend dragenter dragleave dragover dragstart drop durationchange emptied ended input invalid keydown keypress keyup load loadeddata loadedmetadata loadstart message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup pause play playing progress ratechange reset scroll seeked seeking select show stalled submit suspend timeupdate volumechange waiting mozfullscreenchange mozfullscreenerror mozpointerlockchange mozpointerlockerror error webglcontextrestored webglcontextlost webglcontextcreationerror".split(" "),f=s.create("unbound");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../keys":3,"../utils":16,"./websocket":15}],14:[function(e,t,n){(function(n){"use strict";function r(){if(!i.isWebWorker()&&"registerElement"in n.document){var e=document.registerElement,t=["createdCallback","attachedCallback","detachedCallback","attributeChangedCallback"];document.registerElement=function(r,i){return i&&i.prototype&&t.forEach(function(e){if(i.prototype.hasOwnProperty(e)){var t=Object.getOwnPropertyDescriptor(i.prototype,e);t&&t.value?(t.value=n.zone.bind(t.value),o(i.prototype,e,t)):i.prototype[e]=n.zone.bind(i.prototype[e])}else i.prototype[e]&&(i.prototype[e]=n.zone.bind(i.prototype[e]))}),e.apply(document,[r,i])}}}var o=e("./define-property")._redefineProperty,i=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16,"./define-property":6}],15:[function(e,t,n){(function(n){"use strict";function r(){var e=n.WebSocket;o.patchEventTargetMethods(e.prototype),n.WebSocket=function(t,n){var r,i=arguments.length>1?new e(t,n):new e(t),u=Object.getOwnPropertyDescriptor(i,"onmessage");return u&&u.configurable===!1?(r=Object.create(i),["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){return i[e].apply(i,arguments)}})):r=i,o.patchProperties(r,["onclose","onerror","onmessage","onopen"]),r}}var o=e("../utils");t.exports={apply:r}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../utils":16}],16:[function(e,t,n){(function(n){"use strict";function r(e){for(var t=e.length-1;t>=0;t--)"function"==typeof e[t]&&(e[t]=n.zone.bind(e[t]));return e}function o(e){for(var t=e.length-1;t>=0;t--)"function"==typeof e[t]&&(e[t]=n.zone.bindOnce(e[t]));return e}function i(e,t){t.forEach(function(t){var n=e[t];n&&(e[t]=function(){return n.apply(this,r(arguments))})})}function u(){return"undefined"==typeof document}function a(e,t){var n=Object.getOwnPropertyDescriptor(e,t)||{enumerable:!0,configurable:!0};delete n.writable,delete n.value;var r=t.substr(2),o="_"+t;n.set=function(e){this[o]&&this.removeEventListener(r,this[o]),"function"==typeof e?(this[o]=e,this.addEventListener(r,e,!1)):this[o]=null},n.get=function(){return this[o]},Object.defineProperty(e,t,n)}function s(e,t){(t||function(){var t=[];for(var n in e)t.push(n);return t}().filter(function(e){return"on"===e.substr(0,2)})).forEach(function(t){a(e,t)})}function c(e){e[p.common.addEventListener]=e.addEventListener,e.addEventListener=function(e,t,r){if(t&&"[object FunctionWrapper]"!==t.toString()){var o,i=e+(r?"$capturing":"$bubbling");o=t.handleEvent?function(e){return function(){e.handleEvent.apply(e,arguments)}}(t):t,t[l]=o,t[d]=t[d]||{},t[d][i]=t[d][i]||zone.bind(o),arguments[1]=t[d][i]}var u=this||n;return n.zone.addEventListener.apply(u,arguments)},e[p.common.removeEventListener]=e.removeEventListener,e.removeEventListener=function(e,t,r){var o=e+(r?"$capturing":"$bubbling");if(t&&t[d]&&t[d][o]){var i=t[d];arguments[1]=i[o],delete i[o],n.zone.dequeueTask(t[l])}var u=this||n,a=n.zone.removeEventListener.apply(u,arguments);return a}}function f(e){var t=n[e];if(t){n[e]=function(){var e=r(arguments);switch(e.length){case 0:this[h]=new t;break;case 1:this[h]=new t(e[0]);break;case 2:this[h]=new t(e[0],e[1]);break;case 3:this[h]=new t(e[0],e[1],e[2]);break;case 4:this[h]=new t(e[0],e[1],e[2],e[3]);break;default:throw new Error("what are you even doing?")}};var o,i=new t;for(o in i)!function(t){"function"==typeof i[t]?n[e].prototype[t]=function(){return this[h][t].apply(this[h],arguments)}:Object.defineProperty(n[e].prototype,t,{set:function(e){"function"==typeof e?this[h][t]=n.zone.bind(e):this[h][t]=e},get:function(){return this[h][t]}})}(o);for(o in t)"prototype"!==o&&t.hasOwnProperty(o)&&(n[e][o]=t[o])}}var p=e("./keys"),l=p.create("originalFn"),d=p.create("boundFns"),h=p.create("originalInstance");t.exports={bindArguments:r,bindArgumentsOnce:o,patchPrototype:i,patchProperty:a,patchProperties:s,patchEventTargetMethods:c,patchClass:f,isWebWorker:u}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./keys":3}],17:[function(e,t,n){(function(n,r){(function(){"use strict";function o(e){return"function"==typeof e||"object"==typeof e&&null!==e}function i(e){return"function"==typeof e}function u(e){return"object"==typeof e&&null!==e}function a(e){$=e}function s(e){G=e}function c(){return function(){n.nextTick(h)}}function f(){return function(){U(h)}}function p(){var e=0,t=new J(h),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}function l(){var e=new MessageChannel;return e.port1.onmessage=h,function(){e.port2.postMessage(0)}}function d(){return function(){setTimeout(h,1)}}function h(){for(var e=0;B>e;e+=2){var t=te[e],n=te[e+1];t(n),te[e]=void 0,te[e+1]=void 0}B=0}function y(){try{var t=e,n=t("vertx");return U=n.runOnLoop||n.runOnContext,f()}catch(r){return d()}}function v(){}function g(){return new TypeError("You cannot resolve a promise with itself")}function m(){return new TypeError("A promises callback cannot return that same promise.")}function w(e){try{return e.then}catch(t){return ie.error=t,ie}}function b(e,t,n,r){try{e.call(t,n,r)}catch(o){return o}}function _(e,t,n){G(function(e){var r=!1,o=b(n,t,function(n){r||(r=!0,t!==n?O(e,n):j(e,n))},function(t){r||(r=!0,P(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&o&&(r=!0,P(e,o))},e)}function k(e,t){t._state===re?j(e,t._result):t._state===oe?P(e,t._result):x(t,void 0,function(t){O(e,t)},function(t){P(e,t)})}function E(e,t){if(t.constructor===e.constructor)k(e,t);else{var n=w(t);n===ie?P(e,ie.error):void 0===n?j(e,t):i(n)?_(e,t,n):j(e,t)}}function O(e,t){e===t?P(e,g()):o(t)?E(e,t):j(e,t)}function T(e){e._onerror&&e._onerror(e._result),z(e)}function j(e,t){e._state===ne&&(e._result=t,e._state=re,0!==e._subscribers.length&&G(z,e))}function P(e,t){e._state===ne&&(e._state=oe,e._result=t,G(T,e))}function x(e,t,n,r){var o=e._subscribers,i=o.length;e._onerror=null,o[i]=t,o[i+re]=n,o[i+oe]=r,0===i&&e._state&&G(z,e)}function z(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r,o,i=e._result,u=0;uu;u++)x(r.resolve(e[u]),void 0,t,n);return o}function R(e){var t=this;if(e&&"object"==typeof e&&e.constructor===t)return e;var n=new t(v);return O(n,e),n}function W(e){var t=this,n=new t(v);return P(n,e),n}function D(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Z(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function H(e){this._id=le++,this._state=void 0,this._result=void 0,this._subscribers=[],v!==e&&(i(e)||D(),this instanceof H||Z(),S(this,e))}function I(){var e;if("undefined"!=typeof r)e=r;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(t){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=e.Promise;(!n||"[object Promise]"!==Object.prototype.toString.call(n.resolve())||n.cast)&&(e.Promise=de)}var N;N=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var U,$,K,X=N,B=0,G=({}.toString,function(e,t){te[B]=e,te[B+1]=t,B+=2,2===B&&($?$(h):K())}),V="undefined"!=typeof window?window:void 0,Y=V||{},J=Y.MutationObserver||Y.WebKitMutationObserver,Q="undefined"!=typeof n&&"[object process]"==={}.toString.call(n),ee="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3);K=Q?c():J?p():ee?l():void 0===V&&"function"==typeof e?y():d();var ne=void 0,re=1,oe=2,ie=new A,ue=new A;F.prototype._validateInput=function(e){return X(e)},F.prototype._validationError=function(){return new Error("Array Methods must be provided an Array")},F.prototype._init=function(){this._result=new Array(this.length)};var ae=F;F.prototype._enumerate=function(){for(var e=this,t=e.length,n=e.promise,r=e._input,o=0;n._state===ne&&t>o;o++)e._eachEntry(r[o],o)},F.prototype._eachEntry=function(e,t){var n=this,r=n._instanceConstructor;u(e)?e.constructor===r&&e._state!==ne?(e._onerror=null,n._settledAt(e._state,t,e._result)):n._willSettleAt(r.resolve(e),t):(n._remaining--,n._result[t]=e)},F.prototype._settledAt=function(e,t,n){var r=this,o=r.promise;o._state===ne&&(r._remaining--,e===oe?P(o,n):r._result[t]=n),0===r._remaining&&j(o,r._result)},F.prototype._willSettleAt=function(e,t){var n=this;x(e,void 0,function(e){n._settledAt(re,t,e)},function(e){n._settledAt(oe,t,e)})};var se=C,ce=q,fe=R,pe=W,le=0,de=H;H.all=se,H.race=ce,H.resolve=fe,H.reject=pe,H._setScheduler=a,H._setAsap=s,H._asap=G,H.prototype={constructor:H,then:function(e,t){var n=this,r=n._state;if(r===re&&!e||r===oe&&!t)return this;var o=new this.constructor(v),i=n._result;if(r){var u=arguments[r-1];G(function(){L(r,o,u,i)})}else x(n,o,e,t);return o},"catch":function(e){return this.then(null,e)}};var he=I,ye={Promise:de,polyfill:he};"function"==typeof define&&define.amd?define(function(){return ye}):"undefined"!=typeof t&&t.exports?t.exports=ye:"undefined"!=typeof this&&(this.ES6Promise=ye),he()}).call(this)}).call(this,{},"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}]},{},[1]),function t(e,n,r){function o(u,a){if(!n[u]){if(!e[u]){var s="function"==typeof require&&require;if(!a&&s)return s(u,!0);if(i)return i(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var f=n[u]={exports:{}};e[u][0].call(f.exports,function(t){var n=e[u][1][t];return o(n?n:t)},f,f.exports,t,e,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;u0)return!0;var o=q.get(t);return o["delete"](n),o.size>0?!0:(q["delete"](t),!0)}function p(e,t){for(var n=e.length-1;n>=0;--n){var r=e[n],o=r(t);if(!k(o)){if(!T(o))throw new TypeError;t=o}}return t}function l(e,t,n,r){for(var o=e.length-1;o>=0;--o){var i=e[o],u=i(t,n,r);if(!k(u)){if(!O(u))throw new TypeError;r=u}}return r}function d(e,t,n){for(var r=e.length-1;r>=0;--r){var o=e[r];o(t,n)}}function h(e,t,n){var r=q.get(e);if(!r){if(!n)return void 0;r=new S,q.set(e,r)}var o=r.get(t);if(!o){if(!n)return void 0;o=new S,r.set(t,o)}return o}function y(e,t,n){var r=v(e,t,n);if(r)return!0;var o=x(t);return null!==o?y(e,o,n):!1}function v(e,t,n){var r=h(t,n,!1);return void 0===r?!1:Boolean(r.has(e))}function g(e,t,n){var r=v(e,t,n);if(r)return m(e,t,n);var o=x(t);return null!==o?g(e,o,n):void 0}function m(e,t,n){var r=h(t,n,!1);return void 0===r?void 0:r.get(e)}function w(e,t,n,r){var o=h(n,r,!0);o.set(e,t)}function b(e,t){var n=_(e,t),r=x(e);if(null===r)return n;var o=b(r,t);if(o.length<=0)return n;if(n.length<=0)return o;for(var i=new F,u=[],a=0;a=0?(this._cache=e,!0):!1},get:function(e){var t=this._find(e);return t>=0?(this._cache=e,this._values[t]):void 0},set:function(e,t){return this["delete"](e),this._keys.push(e),this._values.push(t),this._cache=e,this},"delete":function(e){var n=this._find(e);return n>=0?(this._keys.splice(n,1),this._values.splice(n,1),this._cache=t,!0):!1},clear:function(){this._keys.length=0,this._values.length=0,this._cache=t},forEach:function(e,t){for(var n=this.size,r=0;n>r;++r){var o=this._keys[r],i=this._values[r];this._cache=o,e.call(this,i,o,this)}},_find:function(e){for(var t=this._keys,n=t.length,r=0;n>r;++r)if(t[r]===e)return r;return-1}},e}function A(){function e(){this._map=new S}return e.prototype={get size(){return this._map.length},has:function(e){return this._map.has(e)},add:function(e){return this._map.set(e,e),this},"delete":function(e){return this._map["delete"](e)},clear:function(){this._map.clear()},forEach:function(e,t){this._map.forEach(e,t)}},e}function M(){function e(){this._key=o()}function t(e,t){for(var n=0;t>n;++n)e[n]=255*Math.random()|0}function n(e){if(s){var n=s.randomBytes(e);return n}if("function"==typeof Uint8Array){var n=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(n):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(n):t(n,e),n}var n=new Array(e);return t(n,e),n}function r(){var e=n(u);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;u>r;++r){var o=e[r];(4===r||6===r||8===r)&&(t+="-"),16>o&&(t+="0"),t+=o.toString(16).toLowerCase()}return t}function o(){var e;do e="@@WeakMap@@"+r();while(c.call(f,e));return f[e]=!0,e}function i(e,t){if(!c.call(e,p)){if(!t)return void 0;Object.defineProperty(e,p,{value:Object.create(null)})}return e[p]}var u=16,a="undefined"!=typeof global&&"[object process]"===Object.prototype.toString.call(global.process),s=a&&require("crypto"),c=Object.prototype.hasOwnProperty,f={},p=o();return e.prototype={has:function(e){var t=i(e,!1);return t?this._key in t:!1},get:function(e){var t=i(e,!1);return t?t[this._key]:void 0},set:function(e,t){var n=i(e,!0);return n[this._key]=t,this},"delete":function(e){var t=i(e,!1);return t&&this._key in t?delete t[this._key]:!1},clear:function(){this._key=o()}},e}var L=Object.getPrototypeOf(Function),S="function"==typeof Map?Map:z(),F="function"==typeof Set?Set:A(),C="function"==typeof WeakMap?WeakMap:M(),q=new C;e.decorate=t,e.metadata=n,e.defineMetadata=r,e.hasMetadata=o,e.hasOwnMetadata=i,e.getMetadata=u,e.getOwnMetadata=a,e.getMetadataKeys=s,e.getOwnMetadataKeys=c,e.deleteMetadata=f,function(t){if("undefined"!=typeof t.Reflect){if(t.Reflect!==e)for(var n in e)t.Reflect[n]=e[n]}else t.Reflect=e}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:"undefined"!=typeof global?global:Function("return this;")())}(Reflect||(Reflect={})); \ No newline at end of file +/** +The MIT License + +Copyright (c) 2014-2017 Google, Inc. http://angular.io + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +**/ +!function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){(function(e){"use strict";function t(e){function t(e){var t=e[v];return t}function n(e){var t=e.data;t.target.addEventListener("readystatechange",function(){t.target.readyState===XMLHttpRequest.DONE&&(t.aborted||e.invoke())});var n=t.target[v];return n||(t.target[v]=e),a.apply(t.target,t.args),e}function r(){}function o(e){var t=e.data;return t.aborted=!0,i.apply(t.target,t.args)}var a=c.patchMethod(e.XMLHttpRequest.prototype,"send",function(){return function(e,t){var a=Zone.current,i={target:e,isPeriodic:!1,delay:null,args:t,aborted:!1};return a.scheduleMacroTask("XMLHttpRequest.send",r,i,n,o)}}),i=c.patchMethod(e.XMLHttpRequest.prototype,"abort",function(e){return function(e,n){var r=t(e);if(r&&"string"==typeof r.type){if(null==r.cancelFn)return;r.zone.cancelTask(r)}}})}n(1);var r=n(2),o=n(4),a=n(5),i=n(6),u=n(8),c=n(3),s="set",l="clear",f=["alert","prompt","confirm"],p="undefined"==typeof window?e:window;u.patchTimer(p,s,l,"Timeout"),u.patchTimer(p,s,l,"Interval"),u.patchTimer(p,s,l,"Immediate"),u.patchTimer(p,"request","cancelMacroTask","AnimationFrame"),u.patchTimer(p,"mozRequest","mozCancel","AnimationFrame"),u.patchTimer(p,"webkitRequest","webkitCancel","AnimationFrame");for(var h=0;h",this._properties=t&&t.properties||{},this._zoneDelegate=new d(this,this._parent&&this._parent._zoneDelegate,t)}return Object.defineProperty(e,"current",{get:function(){return m},enumerable:!0,configurable:!0}),Object.defineProperty(e,"currentTask",{get:function(){return T},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),e.prototype.get=function(e){for(var t=this;t;){if(t._properties.hasOwnProperty(e))return t._properties[e];t=t._parent}},e.prototype.fork=function(e){if(!e)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,e)},e.prototype.wrap=function(e,t){if("function"!=typeof e)throw new Error("Expecting function got: "+e);var n=this._zoneDelegate.intercept(this,e,t),r=this;return function(){return r.runGuarded(n,this,arguments,t)}},e.prototype.run=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null);var o=m;m=this;try{return this._zoneDelegate.invoke(this,e,t,n,r)}finally{m=o}},e.prototype.runGuarded=function(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null);var o=m;m=this;try{try{return this._zoneDelegate.invoke(this,e,t,n,r)}catch(a){if(this._zoneDelegate.handleError(this,a))throw a}}finally{m=o}},e.prototype.runTask=function(e,t,n){if(e.runCount++,e.zone!=this)throw new Error("A task can only be run in the zone which created it! (Creation: "+e.zone.name+"; Execution: "+this.name+")");var r=T;T=e;var o=m;m=this;try{"macroTask"==e.type&&e.data&&!e.data.isPeriodic&&(e.cancelFn=null);try{return this._zoneDelegate.invokeTask(this,e,t,n)}catch(a){if(this._zoneDelegate.handleError(this,a))throw a}}finally{m=o,T=r}},e.prototype.scheduleMicroTask=function(e,t,n,r){return this._zoneDelegate.scheduleTask(this,new v("microTask",this,e,t,n,r,null))},e.prototype.scheduleMacroTask=function(e,t,n,r,o){return this._zoneDelegate.scheduleTask(this,new v("macroTask",this,e,t,n,r,o))},e.prototype.scheduleEventTask=function(e,t,n,r,o){return this._zoneDelegate.scheduleTask(this,new v("eventTask",this,e,t,n,r,o))},e.prototype.cancelTask=function(e){var t=this._zoneDelegate.cancelTask(this,e);return e.runCount=-1,e.cancelFn=null,t},e.__symbol__=t,e}(),d=function(){function e(e,t,n){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this.zone=e,this._parentDelegate=t,this._forkZS=n&&(n&&n.onFork?n:t._forkZS),this._forkDlgt=n&&(n.onFork?t:t._forkDlgt),this._interceptZS=n&&(n.onIntercept?n:t._interceptZS),this._interceptDlgt=n&&(n.onIntercept?t:t._interceptDlgt),this._invokeZS=n&&(n.onInvoke?n:t._invokeZS),this._invokeDlgt=n&&(n.onInvoke?t:t._invokeDlgt),this._handleErrorZS=n&&(n.onHandleError?n:t._handleErrorZS),this._handleErrorDlgt=n&&(n.onHandleError?t:t._handleErrorDlgt),this._scheduleTaskZS=n&&(n.onScheduleTask?n:t._scheduleTaskZS),this._scheduleTaskDlgt=n&&(n.onScheduleTask?t:t._scheduleTaskDlgt),this._invokeTaskZS=n&&(n.onInvokeTask?n:t._invokeTaskZS),this._invokeTaskDlgt=n&&(n.onInvokeTask?t:t._invokeTaskDlgt),this._cancelTaskZS=n&&(n.onCancelTask?n:t._cancelTaskZS),this._cancelTaskDlgt=n&&(n.onCancelTask?t:t._cancelTaskDlgt),this._hasTaskZS=n&&(n.onHasTask?n:t._hasTaskZS),this._hasTaskDlgt=n&&(n.onHasTask?t:t._hasTaskDlgt)}return e.prototype.fork=function(e,t){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,e,t):new h(e,t)},e.prototype.intercept=function(e,t,n){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this.zone,e,t,n):t},e.prototype.invoke=function(e,t,n,r,o){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this.zone,e,t,n,r,o):t.apply(n,r)},e.prototype.handleError=function(e,t){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this.zone,e,t):!0},e.prototype.scheduleTask=function(e,t){try{if(this._scheduleTaskZS)return this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this.zone,e,t);if(t.scheduleFn)t.scheduleFn(t);else{if("microTask"!=t.type)throw new Error("Task is missing scheduleFn.");r(t)}return t}finally{e==this.zone&&this._updateTaskCount(t.type,1)}},e.prototype.invokeTask=function(e,t,n,r){try{return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this.zone,e,t,n,r):t.callback.apply(n,r)}finally{e!=this.zone||"eventTask"==t.type||t.data&&t.data.isPeriodic||this._updateTaskCount(t.type,-1)}},e.prototype.cancelTask=function(e,t){var n;if(this._cancelTaskZS)n=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this.zone,e,t);else{if(!t.cancelFn)throw new Error("Task does not support cancellation, or is already canceled.");n=t.cancelFn(t)}return e==this.zone&&this._updateTaskCount(t.type,-1),n},e.prototype.hasTask=function(e,t){return this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this.zone,e,t)},e.prototype._updateTaskCount=function(e,t){var n=this._taskCounts,r=n[e],o=n[e]=r+t;if(0>o)throw new Error("More tasks executed then were scheduled.");if(0==r||0==o){var a={microTask:n.microTask>0,macroTask:n.macroTask>0,eventTask:n.eventTask>0,change:e};try{this.hasTask(this.zone,a)}finally{this._parentDelegate&&this._parentDelegate._updateTaskCount(e,t)}}},e}(),v=function(){function e(e,t,n,r,o,i,u){this.runCount=0,this.type=e,this.zone=t,this.source=n,this.data=o,this.scheduleFn=i,this.cancelFn=u,this.callback=r;var c=this;this.invoke=function(){try{return t.runTask(c,this,arguments)}finally{a()}}}return e}(),y=t("setTimeout"),g=t("Promise"),k=t("then"),m=new h(null,null),T=null,w=[],_=!1,b=[],E=!1,S=t("state"),O=t("value"),D="Promise.then",P=null,M=!0,z=!1,j=0,C=function(){function e(e){var t=this;t[S]=P,t[O]=[];try{e&&e(s(t,M),s(t,z))}catch(n){l(t,!1,n)}}return e.resolve=function(e){return l(new this(null),M,e)},e.reject=function(e){return l(new this(null),z,e)},e.race=function(e){function t(e){a&&(a=r(e))}function n(e){a&&(a=o(e))}for(var r,o,a=new this(function(e,t){r=e,o=t}),u=0,c=e;u=0;n--)"function"==typeof e[n]&&(e[n]=Zone.current.wrap(e[n],t+"_"+n));return e}function r(e,t){for(var r=e.constructor.name,o=function(o){var a=t[o],i=e[a];i&&(e[a]=function(e){return function(){return e.apply(this,n(arguments,r+"."+a))}}(i))},a=0;a1?new t(e,n):new t(e),i=Object.getOwnPropertyDescriptor(a,"onmessage");return i&&i.configurable===!1?(r=Object.create(a),["addEventListener","removeEventListener","send","close"].forEach(function(e){r[e]=function(){return a[e].apply(a,arguments)}})):r=a,o.patchOnProperties(r,["close","error","message","open"]),r};for(var n in t)e.WebSocket[n]=t[n]}var o=n(3);t.apply=r},function(e,t,n){"use strict";function r(e,t,n,r){function a(t){var n=t.data;return n.args[0]=t.invoke,n.handleId=u.apply(e,n.args),t}function i(e){return c(e.data.handleId)}var u=null,c=null;t+=r,n+=r,u=o.patchMethod(e,t,function(n){return function(o,u){if("function"==typeof u[0]){var c=Zone.current,s={handleId:null,isPeriodic:"Interval"===r,delay:"Timeout"===r||"Interval"===r?u[1]||0:null,args:u};return c.scheduleMacroTask(t,u[0],s,a,i)}return n.apply(e,u)}}),c=o.patchMethod(e,n,function(t){return function(n,r){var o=r[0];o&&"string"==typeof o.type?(o.cancelFn&&o.data.isPeriodic||0===o.runCount)&&o.zone.cancelTask(o):t.apply(e,r)}})}var o=n(3);t.patchTimer=r}]),function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";!function(){function e(){return new Error("STACKTRACE TRACKING")}function t(){try{throw e()}catch(t){return t}}function n(e){return e.stack?e.stack.split(u):[]}function r(e,t){for(var r=n(t),o=0;o0&&(e.push(n((new f).error)),a(e,t-1))}function i(){var e=[];a(e,2);for(var t=e[0],n=e[1],r=0;rthis.longStackTraceLimit&&(a.length=this.longStackTraceLimit),r.data||(r.data={}),r.data[l]=a,e.scheduleTask(n,r)},onHandleError:function(e,t,n,r){var a=Zone.currentTask;if(r instanceof Error&&a){var i=Object.getOwnPropertyDescriptor(r,"stack");if(i){var u=i.get,c=i.value;i={get:function(){return o(a.data&&a.data[l],u?u.apply(this):c)}},Object.defineProperty(r,"stack",i)}else r.stack=o(a.data&&a.data[l],r.stack)}return e.handleError(n,r)}},i()}()}]);var Reflect;!function(e){function t(e,t,n,r){if(_(r)){if(_(n)){if(!b(e))throw new TypeError;if(!S(t))throw new TypeError;return f(e,t)}if(!b(e))throw new TypeError;if(!E(t))throw new TypeError;return n=D(n),h(e,t,n)}if(!b(e))throw new TypeError;if(!E(t))throw new TypeError;if(_(n))throw new TypeError;if(!E(r))throw new TypeError;return n=D(n),p(e,t,n,r)}function n(e,t){function n(n,r){if(_(r)){if(!S(n))throw new TypeError;m(e,t,n,void 0)}else{if(!E(n))throw new TypeError;r=D(r),m(e,t,n,r)}}return n}function r(e,t,n,r){if(!E(n))throw new TypeError;return _(r)||(r=D(r)),m(e,t,n,r)}function o(e,t,n){if(!E(t))throw new TypeError;return _(n)||(n=D(n)),v(e,t,n)}function a(e,t,n){if(!E(t))throw new TypeError;return _(n)||(n=D(n)),y(e,t,n)}function i(e,t,n){if(!E(t))throw new TypeError;return _(n)||(n=D(n)),g(e,t,n)}function u(e,t,n){if(!E(t))throw new TypeError;return _(n)||(n=D(n)),k(e,t,n)}function c(e,t){if(!E(e))throw new TypeError;return _(t)||(t=D(t)),T(e,t)}function s(e,t){if(!E(e))throw new TypeError;return _(t)||(t=D(t)),w(e,t)}function l(e,t,n){if(!E(t))throw new TypeError;_(n)||(n=D(n));var r=d(t,n,!1);if(_(r))return!1;if(!r["delete"](e))return!1;if(r.size>0)return!0;var o=R.get(t);return o["delete"](n),o.size>0?!0:(R["delete"](t),!0)}function f(e,t){for(var n=e.length-1;n>=0;--n){var r=e[n],o=r(t);if(!_(o)){if(!S(o))throw new TypeError;t=o}}return t}function p(e,t,n,r){for(var o=e.length-1;o>=0;--o){var a=e[o],i=a(t,n,r);if(!_(i)){if(!E(i))throw new TypeError;r=i}}return r}function h(e,t,n){for(var r=e.length-1;r>=0;--r){var o=e[r];o(t,n)}}function d(e,t,n){var r=R.get(e);if(!r){if(!n)return;r=new Z,R.set(e,r)}var o=r.get(t);if(!o){if(!n)return;o=new Z,r.set(t,o)}return o}function v(e,t,n){var r=y(e,t,n);if(r)return!0;var o=P(t);return null!==o?v(e,o,n):!1}function y(e,t,n){var r=d(t,n,!1);return void 0===r?!1:Boolean(r.has(e))}function g(e,t,n){var r=y(e,t,n);if(r)return k(e,t,n);var o=P(t);return null!==o?g(e,o,n):void 0}function k(e,t,n){var r=d(t,n,!1);if(void 0!==r)return r.get(e)}function m(e,t,n,r){var o=d(n,r,!0);o.set(e,t)}function T(e,t){var n=w(e,t),r=P(e);if(null===r)return n;var o=T(r,t);if(o.length<=0)return n;if(n.length<=0)return o;for(var a=new I,i=[],u=0;u=0?(this._cache=e,!0):!1},get:function(e){var t=this._find(e);return t>=0?(this._cache=e,this._values[t]):void 0},set:function(e,t){return this["delete"](e),this._keys.push(e),this._values.push(t),this._cache=e,this},"delete":function(e){var n=this._find(e);return n>=0?(this._keys.splice(n,1),this._values.splice(n,1),this._cache=t,!0):!1},clear:function(){this._keys.length=0,this._values.length=0,this._cache=t},forEach:function(e,t){for(var n=this.size,r=0;n>r;++r){var o=this._keys[r],a=this._values[r];this._cache=o,e.call(this,a,o,this)}},_find:function(e){for(var t=this._keys,n=t.length,r=0;n>r;++r)if(t[r]===e)return r;return-1}},e}function z(){function e(){this._map=new Z}return e.prototype={get size(){return this._map.length},has:function(e){return this._map.has(e)},add:function(e){return this._map.set(e,e),this},"delete":function(e){return this._map["delete"](e)},clear:function(){this._map.clear()},forEach:function(e,t){this._map.forEach(e,t)}},e}function j(){function e(){this._key=o()}function t(e,t){for(var n=0;t>n;++n)e[n]=255*Math.random()|0}function n(e){if(c){var n=c.randomBytes(e);return n}if("function"==typeof Uint8Array){var n=new Uint8Array(e);return"undefined"!=typeof crypto?crypto.getRandomValues(n):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(n):t(n,e),n}var n=new Array(e);return t(n,e),n}function r(){var e=n(i);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var t="",r=0;i>r;++r){var o=e[r];(4===r||6===r||8===r)&&(t+="-"),16>o&&(t+="0"),t+=o.toString(16).toLowerCase()}return t}function o(){var e;do e="@@WeakMap@@"+r();while(s.call(l,e));return l[e]=!0,e}function a(e,t){if(!s.call(e,f)){if(!t)return;Object.defineProperty(e,f,{value:Object.create(null)})}return e[f]}var i=16,u="undefined"!=typeof global&&"[object process]"===Object.prototype.toString.call(global.process),c=u&&require("crypto"),s=Object.prototype.hasOwnProperty,l={},f=o();return e.prototype={has:function(e){var t=a(e,!1);return t?this._key in t:!1},get:function(e){var t=a(e,!1);return t?t[this._key]:void 0},set:function(e,t){var n=a(e,!0);return n[this._key]=t,this},"delete":function(e){var t=a(e,!1);return t&&this._key in t?delete t[this._key]:!1},clear:function(){this._key=o()}},e}var C=Object.getPrototypeOf(Function),Z="function"==typeof Map?Map:M(),I="function"==typeof Set?Set:z(),L="function"==typeof WeakMap?WeakMap:j(),R=new L;e.decorate=t,e.metadata=n,e.defineMetadata=r,e.hasMetadata=o,e.hasOwnMetadata=a,e.getMetadata=i,e.getOwnMetadata=u,e.getMetadataKeys=c,e.getOwnMetadataKeys=s,e.deleteMetadata=l,function(t){if("undefined"!=typeof t.Reflect){if(t.Reflect!==e)for(var n in e)t.Reflect[n]=e[n]}else t.Reflect=e}("undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope?self:"undefined"!=typeof global?global:Function("return this;")())}(Reflect||(Reflect={})); \ No newline at end of file