angular2-rails 2.0.0.pre.beta.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +25 -0
  4. data/lib/angular2-rails.rb +9 -0
  5. data/lib/angular2-rails/engine.rb +6 -0
  6. data/lib/angular2-rails/sprockets.rb +3 -0
  7. data/lib/angular2-rails/version.rb +5 -0
  8. data/lib/tasks/angular2/rails_tasks.rake +4 -0
  9. data/vendor/assets/javascripts/Rx.js +11615 -0
  10. data/vendor/assets/javascripts/Rx.min.js +417 -0
  11. data/vendor/assets/javascripts/Rx.min.js.map +1 -0
  12. data/vendor/assets/javascripts/Rx.umd.js +10274 -0
  13. data/vendor/assets/javascripts/Rx.umd.min.js +748 -0
  14. data/vendor/assets/javascripts/Rx.umd.min.js.map +8 -0
  15. data/vendor/assets/javascripts/angular2-all-testing.umd.dev.js +41097 -0
  16. data/vendor/assets/javascripts/angular2-all.umd.dev.js +38827 -0
  17. data/vendor/assets/javascripts/angular2-all.umd.js +38826 -0
  18. data/vendor/assets/javascripts/angular2-all.umd.min.js +20 -0
  19. data/vendor/assets/javascripts/angular2-polyfills.js +2491 -0
  20. data/vendor/assets/javascripts/angular2-polyfills.min.js +1 -0
  21. data/vendor/assets/javascripts/angular2.dev.js +26056 -0
  22. data/vendor/assets/javascripts/angular2.js +26056 -0
  23. data/vendor/assets/javascripts/angular2.min.js +19 -0
  24. data/vendor/assets/javascripts/http.dev.js +1106 -0
  25. data/vendor/assets/javascripts/http.js +1106 -0
  26. data/vendor/assets/javascripts/http.min.js +1 -0
  27. data/vendor/assets/javascripts/overview.md +92 -0
  28. data/vendor/assets/javascripts/router.dev.js +3436 -0
  29. data/vendor/assets/javascripts/router.js +3436 -0
  30. data/vendor/assets/javascripts/router.min.js +3 -0
  31. data/vendor/assets/javascripts/testing.dev.js +2205 -0
  32. data/vendor/assets/javascripts/testing.dev.js.map +1 -0
  33. data/vendor/assets/javascripts/upgrade.dev.js +833 -0
  34. data/vendor/assets/javascripts/upgrade.js +833 -0
  35. data/vendor/assets/javascripts/upgrade.min.js +1 -0
  36. data/vendor/assets/javascripts/web_worker/ui.dev.js +24221 -0
  37. data/vendor/assets/javascripts/web_worker/worker.dev.js +40089 -0
  38. metadata +101 -0
@@ -0,0 +1,20 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Rx"),require("rxjs/operator/toPromise")):"function"==typeof define&&define.amd?define(["Rx","rxjs/operator/toPromise"],t):"object"==typeof exports?exports.ng=t(require("Rx"),require("rxjs/operator/toPromise")):e.ng=t(e.Rx,e.Rx.Observable.prototype)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){e.exports=n(1)},function(e,t,n){t.core=n(2),t.common=n(112),t.compiler=n(161),t.platform={browser:n(195),common_dom:n(219)},t.http=n(227),t.router=n(242),t.router_link_dsl=n(271),t.instrumentation=n(273),t.upgrade=n(274)},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(3)),r(n(76)),r(n(77)),r(n(6)),r(n(78));var i=n(5);t.enableProdMode=i.enableProdMode;var o=n(79);t.platform=o.platform,t.createNgZone=o.createNgZone,t.PlatformRef=o.PlatformRef,t.ApplicationRef=o.ApplicationRef;var s=n(82);t.APP_ID=s.APP_ID,t.APP_COMPONENT=s.APP_COMPONENT,t.APP_INITIALIZER=s.APP_INITIALIZER,t.PACKAGE_ROOT_URL=s.PACKAGE_ROOT_URL,t.PLATFORM_INITIALIZER=s.PLATFORM_INITIALIZER,r(n(101)),r(n(102)),r(n(103));var a=n(106);t.DebugElement=a.DebugElement,t.DebugNode=a.DebugNode,t.asNativeElements=a.asNativeElements,r(n(83)),r(n(25)),r(n(107)),r(n(108)),r(n(109)),r(n(17))},function(e,t,n){"use strict";var r=n(4);t.QueryMetadata=r.QueryMetadata,t.ContentChildrenMetadata=r.ContentChildrenMetadata,t.ContentChildMetadata=r.ContentChildMetadata,t.ViewChildrenMetadata=r.ViewChildrenMetadata,t.ViewQueryMetadata=r.ViewQueryMetadata,t.ViewChildMetadata=r.ViewChildMetadata,t.AttributeMetadata=r.AttributeMetadata;var i=n(24);t.ComponentMetadata=i.ComponentMetadata,t.DirectiveMetadata=i.DirectiveMetadata,t.PipeMetadata=i.PipeMetadata,t.InputMetadata=i.InputMetadata,t.OutputMetadata=i.OutputMetadata,t.HostBindingMetadata=i.HostBindingMetadata,t.HostListenerMetadata=i.HostListenerMetadata;var o=n(75);t.ViewMetadata=o.ViewMetadata,t.ViewEncapsulation=o.ViewEncapsulation;var s=n(4),a=n(24),c=n(75),u=n(9);t.Component=u.makeDecorator(a.ComponentMetadata,function(e){return e.View=p}),t.Directive=u.makeDecorator(a.DirectiveMetadata);var p=u.makeDecorator(c.ViewMetadata,function(e){return e.View=p});t.Attribute=u.makeParamDecorator(s.AttributeMetadata),t.Query=u.makeParamDecorator(s.QueryMetadata),t.ContentChildren=u.makePropDecorator(s.ContentChildrenMetadata),t.ContentChild=u.makePropDecorator(s.ContentChildMetadata),t.ViewChildren=u.makePropDecorator(s.ViewChildrenMetadata),t.ViewChild=u.makePropDecorator(s.ViewChildMetadata),t.ViewQuery=u.makeParamDecorator(s.ViewQueryMetadata),t.Pipe=u.makeDecorator(a.PipeMetadata),t.Input=u.makePropDecorator(a.InputMetadata),t.Output=u.makePropDecorator(a.OutputMetadata),t.HostBinding=u.makePropDecorator(a.HostBindingMetadata),t.HostListener=u.makePropDecorator(a.HostListenerMetadata)},function(e,t,n){"use strict";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(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){"use strict";function n(e){Zone.current.scheduleMicroTask("scheduleMicrotask",e)}function r(e){return e.name?e.name:typeof e}function i(){H=!0}function o(){if(H)throw"Cannot enable prod mode after platform setup.";U=!1}function s(){return U}function a(e){return e}function c(){return function(e){return e}}function u(e){return void 0!==e&&null!==e}function p(e){return void 0===e||null===e}function l(e){return"boolean"==typeof e}function h(e){return"number"==typeof e}function f(e){return"string"==typeof e}function d(e){return"function"==typeof e}function y(e){return d(e)}function v(e){return"object"==typeof e&&null!==e}function g(e){return e instanceof W.Promise}function m(e){return Array.isArray(e)}function _(e){return e instanceof t.Date&&!isNaN(e.valueOf())}function b(){}function P(e){if("string"==typeof e)return e;if(void 0===e||null===e)return""+e;if(e.name)return e.name;if(e.overriddenName)return e.overriddenName;var t=e.toString(),n=t.indexOf("\n");return-1===n?t:t.substring(0,n)}function C(e){return e}function w(e,t){return e}function R(e,t){return e[t]}function E(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function O(e){return e}function S(e){return p(e)?null:e}function A(e){return p(e)?!1:e}function D(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function x(e){console.log(e)}function T(e,t,n){for(var r=t.split("."),i=e;r.length>1;){var o=r.shift();i=i.hasOwnProperty(o)&&u(i[o])?i[o]:i[o]={}}(void 0===i||null===i)&&(i={}),i[r.shift()]=n}function I(){if(p(Y))if(u(Symbol)&&u(Symbol.iterator))Y=Symbol.iterator;else for(var e=Object.getOwnPropertyNames(Map.prototype),t=0;t<e.length;++t){var n=e[t];"entries"!==n&&"size"!==n&&Map.prototype[n]===Map.prototype.entries&&(Y=n)}return Y}function N(e,t,n,r){var i=n+"\nreturn "+t+"\n//# sourceURL="+e,o=[],s=[];for(var a in r)o.push(a),s.push(r[a]);return(new(Function.bind.apply(Function,[void 0].concat(o.concat(i))))).apply(void 0,s)}function k(e){return!D(e)}function M(e,t){return e.constructor===t}function V(e){return e.reduce(function(e,t){return e|t})}function j(e){return e.reduce(function(e,t){return e&t})}function B(e){return W.encodeURI(e)}var L,F=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="undefined"==typeof window?"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:e:window,t.scheduleMicroTask=n,t.IS_DART=!1;var W=L;t.global=W,t.Type=Function,t.getTypeNameForDebugging=r,t.Math=W.Math,t.Date=W.Date;var U=!0,H=!1;t.lockMode=i,t.enableProdMode=o,t.assertionsEnabled=s,W.assert=function(e){},t.CONST_EXPR=a,t.CONST=c,t.isPresent=u,t.isBlank=p,t.isBoolean=l,t.isNumber=h,t.isString=f,t.isFunction=d,t.isType=y,t.isStringMap=v,t.isPromise=g,t.isArray=m,t.isDate=_,t.noop=b,t.stringify=P,t.serializeEnum=C,t.deserializeEnum=w,t.resolveEnumToken=R;var q=function(){function e(){}return e.fromCharCode=function(e){return String.fromCharCode(e)},e.charCodeAt=function(e,t){return e.charCodeAt(t)},e.split=function(e,t){return e.split(t)},e.equals=function(e,t){return e===t},e.stripLeft=function(e,t){if(e&&e.length){for(var n=0,r=0;r<e.length&&e[r]==t;r++)n++;e=e.substring(n)}return e},e.stripRight=function(e,t){if(e&&e.length){for(var n=e.length,r=e.length-1;r>=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;t<arguments.length;t++)e[t-0]=arguments[t];return e.splice(-2,2),n(e)})},e.contains=function(e,t){return-1!=e.indexOf(t)},e.compare=function(e,t){return t>e?-1:e>t?1:0},e}();t.StringWrapper=q;var G=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=G;var z=function(e){function t(t){e.call(this),this.message=t}return F(t,e),t.prototype.toString=function(){return this.message},t}(Error);t.NumberParseError=z;var K=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 z("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 z("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=K,t.RegExp=W.RegExp;var $=function(){function e(){}return e.create=function(e,t){return void 0===t&&(t=""),t=t.replace(/g/g,""),new W.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.replaceAll=function(e,t,n){var r=e.exec(t),i="";e.lastIndex=0;for(var o=0;r;)i+=t.substring(o,r.index),i+=n(r),o=r.index+r[0].length,e.lastIndex=o,r=e.exec(t);return i+=t.substring(o)},e}();t.RegExpWrapper=$;var X=function(){function e(){}return e.next=function(e){return e.re.exec(e.input)},e}();t.RegExpMatcherWrapper=X;var Q=function(){function e(){}return e.apply=function(e,t){return e.apply(null,t)},e}();t.FunctionWrapper=Q,t.looseIdentical=E,t.getMapKey=O,t.normalizeBlank=S,t.normalizeBool=A,t.isJsObject=D,t.print=x;var J=function(){function e(){}return e.parse=function(e){return W.JSON.parse(e)},e.stringify=function(e){return W.JSON.stringify(e,null,2)},e}();t.Json=J;var Z=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=Z,t.setValueOnPath=T;var Y=null;t.getSymbolIterator=I,t.evalExpression=N,t.isPrimitive=k,t.hasConstructor=M,t.bitWiseOr=V,t.bitWiseAnd=j,t.escape=B}).call(t,function(){return this}())},function(e,t,n){"use strict";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(21);t.Key=c.Key;var u=n(22);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(23);t.OpaqueToken=p.OpaqueToken},function(e,t,n){"use strict";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){"use strict";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){"use strict";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 p=[];s.push(p);var h=n[a];if(h instanceof Array)for(var f=0;f<h.length;f++)p.push(r(h[f]));else u.isFunction(h)?p.push(r(h)):p.push(h)}return l.defineMetadata("parameters",s,i),i}throw new Error("Only Function or Array is supported in Class definition for key '"+t+"' is '"+u.stringify(e)+"'")}function o(e){var t=i(e.hasOwnProperty("constructor")?e.constructor:void 0,"constructor"),n=t.prototype;if(e.hasOwnProperty("extends")){if(!u.isFunction(e["extends"]))throw new Error("Class definition 'extends' property must be a constructor function was: "+u.stringify(e["extends"]));t.prototype=n=Object.create(e["extends"].prototype)}for(var r in e)"extends"!=r&&"prototype"!=r&&e.hasOwnProperty(r)&&(n[r]=i(e[r],r));return this&&this.annotations instanceof Array&&l.defineMetadata("annotations",this.annotations,t),t.name||(t.overriddenName="class"+p++),t}function s(e,t){function n(n){var r=new e(n);if(this instanceof e)return r;var i=u.isFunction(this)&&this.annotations instanceof Array?this.annotations:[];i.push(r);var s=function(e){var t=l.getOwnMetadata("annotations",e);return t=t||[],t.push(r),l.defineMetadata("annotations",t,e),e};return s.annotations=i,s.Class=o,t&&t(s),s}return void 0===t&&(t=null),n.prototype=Object.create(e.prototype),n}function a(e){function t(){function t(e,t,n){var r=l.getMetadata("parameters",e);for(r=r||[];r.length<=n;)r.push(null);r[n]=r[n]||[];var o=r[n];return o.push(i),l.defineMetadata("parameters",r,e),e}for(var n=[],r=0;r<arguments.length;r++)n[r-0]=arguments[r];var i=Object.create(e.prototype);return e.apply(i,n),this instanceof e?i:(t.annotation=i,t)}return t.prototype=Object.create(e.prototype),t}function c(e){function t(){for(var t=[],n=0;n<arguments.length;n++)t[n-0]=arguments[n];var r=Object.create(e.prototype);return e.apply(r,t),this instanceof e?r:function(e,t){var n=l.getOwnMetadata("propMetadata",e.constructor);n=n||{},n[t]=n[t]||[],n[t].unshift(r),l.defineMetadata("propMetadata",n,e.constructor)}}return t.prototype=Object.create(e.prototype),t}var u=n(5),p=0;t.Class=o;var l=u.global.Reflect;!function(){if(!l||!l.getMetadata)throw"reflect-metadata shim is required when using class decorators"}(),t.makeDecorator=s,t.makeParamDecorator=a,t.makePropDecorator=c},function(e,t,n){"use strict";function r(e){return e.__forward_ref__=r,e.toString=function(){return o.stringify(this())},e}function i(e){return o.isFunction(e)&&e.hasOwnProperty("__forward_ref__")&&e.__forward_ref__===r?e():e}var o=n(5);t.forwardRef=r,t.resolveForwardRef=i},function(e,t,n){"use strict";function r(e,t){return e===t||t===f.PublicAndPrivate||e===f.PublicAndPrivate}function i(e,t){for(var n=[],r=0;r<e._proto.numberOfProviders;++r)n.push(t(e._proto.getProviderAtIndex(r)));return n}var o=n(12),s=n(13),a=n(22),c=n(5),u=n(14),p=n(21),l=n(7),h=10;t.UNDEFINED=c.CONST_EXPR(new Object),function(e){e[e.Public=0]="Public",e[e.Private=1]="Private",e[e.PublicAndPrivate=2]="PublicAndPrivate"}(t.Visibility||(t.Visibility={}));var f=t.Visibility,d=function(){function e(e,t){this.provider0=null,this.provider1=null,this.provider2=null,this.provider3=null,this.provider4=null,this.provider5=null,this.provider6=null,this.provider7=null,this.provider8=null,this.provider9=null,this.keyId0=null,this.keyId1=null,this.keyId2=null,this.keyId3=null,this.keyId4=null,this.keyId5=null,this.keyId6=null,this.keyId7=null,this.keyId8=null,this.keyId9=null,this.visibility0=null,this.visibility1=null,this.visibility2=null,this.visibility3=null,this.visibility4=null,this.visibility5=null,this.visibility6=null,this.visibility7=null,this.visibility8=null,this.visibility9=null;var n=t.length;n>0&&(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 g(e,this)},e}();t.ProtoInjectorInlineStrategy=d;var y=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=y;var v=function(){function e(e){this.numberOfProviders=e.length,this._strategy=e.length>h?new y(this,e):new d(this,e)}return e.fromResolvedProviders=function(t){var n=t.map(function(e){return new _(e,f.Public)});return new e(n)},e.prototype.getProviderAtIndex=function(e){return this._strategy.getProviderAtIndex(e)},e}();t.ProtoInjector=v;var g=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.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 h},e}();t.InjectorInlineStrategy=g;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.getObjByKeyId=function(e,n){for(var i=this.protoStrategy,o=0;o<i.keyIds.length;o++)if(i.keyIds[o]===e&&r(i.visibilities[o],n))return this.objs[o]===t.UNDEFINED&&(this.objs[o]=this.injector._new(i.providers[o],i.visibilities[o])),this.objs[o];return t.UNDEFINED},e.prototype.getObjAtIndex=function(e){if(0>e||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 _=function(){function e(e,t){this.provider=e,this.visibility=t}return e.prototype.getKeyId=function(){return this.provider.key.id},e}();t.ProviderWithVisibility=_;var b=function(){function e(e,t,n,r,i){void 0===t&&(t=null),void 0===n&&(n=!1),void 0===r&&(r=null),void 0===i&&(i=null),this._isHostBoundary=n,this._depProvider=r,this._debugContext=i,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){return new e(v.fromResolvedProviders(t))},e.fromResolvedBindings=function(t){return e.fromResolvedProviders(t)},Object.defineProperty(e.prototype,"hostBoundary",{get:function(){return this._isHostBoundary},enumerable:!0,configurable:!0}),e.prototype.debugContext=function(){return this._debugContext()},e.prototype.get=function(e){return this._getByKey(p.Key.get(e),null,null,!1,f.PublicAndPrivate)},e.prototype.getOptional=function(e){return this._getByKey(p.Key.get(e),null,null,!0,f.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 _(e,f.Public)}),r=new v(n),i=new e(r);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,f.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;r<e.resolvedFactories.length;++r)n[r]=this._instantiate(e,e.resolvedFactories[r],t);return n}return this._instantiate(e,e.resolvedFactories[0],t)},e.prototype._instantiate=function(e,t,n){var r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b,P,C,w,R,E=t.factory,O=t.dependencies,S=O.length;try{r=S>0?this._getByDependency(e,O[0],n):null,i=S>1?this._getByDependency(e,O[1],n):null,o=S>2?this._getByDependency(e,O[2],n):null,s=S>3?this._getByDependency(e,O[3],n):null,c=S>4?this._getByDependency(e,O[4],n):null,p=S>5?this._getByDependency(e,O[5],n):null,l=S>6?this._getByDependency(e,O[6],n):null,h=S>7?this._getByDependency(e,O[7],n):null,f=S>8?this._getByDependency(e,O[8],n):null,d=S>9?this._getByDependency(e,O[9],n):null,y=S>10?this._getByDependency(e,O[10],n):null,v=S>11?this._getByDependency(e,O[11],n):null,g=S>12?this._getByDependency(e,O[12],n):null,m=S>13?this._getByDependency(e,O[13],n):null,_=S>14?this._getByDependency(e,O[14],n):null,b=S>15?this._getByDependency(e,O[15],n):null,P=S>16?this._getByDependency(e,O[16],n):null,C=S>17?this._getByDependency(e,O[17],n):null,w=S>18?this._getByDependency(e,O[18],n):null,R=S>19?this._getByDependency(e,O[19],n):null}catch(A){throw(A instanceof a.AbstractProviderError||A instanceof a.InstantiationError)&&A.addKey(this,e.key),A}var D;try{switch(S){case 0:D=E();break;case 1:D=E(r);break;case 2:D=E(r,i);break;case 3:D=E(r,i,o);break;case 4:D=E(r,i,o,s);break;case 5:D=E(r,i,o,s,c);break;case 6:D=E(r,i,o,s,c,p);break;case 7:D=E(r,i,o,s,c,p,l);break;case 8:D=E(r,i,o,s,c,p,l,h);break;case 9:D=E(r,i,o,s,c,p,l,h,f);break;case 10:D=E(r,i,o,s,c,p,l,h,f,d);break;case 11:D=E(r,i,o,s,c,p,l,h,f,d,y);break;case 12:D=E(r,i,o,s,c,p,l,h,f,d,y,v);break;case 13:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g);break;case 14:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m);break;case 15:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_);break;case 16:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b);break;case 17:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b,P);break;case 18:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b,P,C);break;case 19:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b,P,C,w);break;case 20:D=E(r,i,o,s,c,p,l,h,f,d,y,v,g,m,_,b,P,C,w,R);break;default:throw new u.BaseException("Cannot instantiate '"+e.key.displayName+"' because it has more than 20 dependencies")}}catch(A){throw new a.InstantiationError(this,A,A.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===P?this:n instanceof l.SelfMetadata?this._getByKeySelf(e,r,i):n instanceof l.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 l.SkipSelfMetadata){if(o._isHostBoundary)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._isHostBoundary)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,f.Private);return i!==t.UNDEFINED?i:this._throwOrNull(e,n)},e.prototype._getByKeyDefault=function(e,n,r,i){var o=this;for(i instanceof l.SkipSelfMetadata&&(r=o._isHostBoundary?f.PublicAndPrivate:f.Public,o=o._parent);null!=o;){var s=o._strategy.getObjByKeyId(e.id,r);if(s!==t.UNDEFINED)return s;r=o._isHostBoundary?f.PublicAndPrivate:f.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=b;var P=p.Key.get(b)},function(e,t,n){"use strict";function r(e){return s.isJsObject(e)?s.isArray(e)||!(e instanceof t.Map)&&s.getSymbolIterator()in e:!1;
2
+ }function i(e,t,n){for(var r=e[s.getSymbolIterator()](),i=t[s.getSymbolIterator()]();;){var o=r.next(),a=i.next();if(o.done&&a.done)return!0;if(o.done||a.done)return!1;if(!n(o.value,a.value))return!1}}function o(e,t){if(s.isArray(e))for(var n=0;n<e.length;n++)t(e[n]);else for(var r,i=e[s.getSymbolIterator()]();!(r=i.next()).done;)t(r.value)}var s=n(5);t.Map=s.global.Map,t.Set=s.global.Set;var a=function(){try{if(1===new t.Map([[1,2]]).size)return function(e){return new t.Map(e)}}catch(e){}return function(e){for(var n=new t.Map,r=0;r<e.length;r++){var i=e[r];n.set(i[0],i[1])}return n}}(),c=function(){try{if(new t.Map(new t.Map))return function(e){return new t.Map(e)}}catch(e){}return function(e){var n=new t.Map;return e.forEach(function(e,t){n.set(t,e)}),n}}(),u=function(){return(new t.Map).keys().next?function(e){for(var t,n=e.keys();!(t=n.next()).done;)e.set(t.value,null)}:function(e){e.forEach(function(t,n){e.set(n,null)})}}(),p=function(){try{if((new t.Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var n=f.createFixedSize(e.size),r=0;return e.forEach(function(e,i){n[r]=t?e:i,r++}),n}}(),l=function(){function e(){}return e.clone=function(e){return c(e)},e.createFromStringMap=function(e){var n=new t.Map;for(var r in e)n.set(r,e[r]);return n},e.toStringMap=function(e){var t={};return e.forEach(function(e,n){return t[n]=e}),t},e.createFromPairs=function(e){return a(e)},e.clearValues=function(e){u(e)},e.iterable=function(e){return e},e.keys=function(e){return p(e,!1)},e.values=function(e){return p(e,!0)},e}();t.MapWrapper=l;var h=function(){function e(){}return e.create=function(){return{}},e.contains=function(e,t){return e.hasOwnProperty(t)},e.get=function(e,t){return e.hasOwnProperty(t)?e[t]:void 0},e.set=function(e,t,n){e[t]=n},e.keys=function(e){return Object.keys(e)},e.values=function(e){return Object.keys(e).reduce(function(t,n){return t.push(e[n]),t},[])},e.isEmpty=function(e){for(var t in e)return!1;return!0},e["delete"]=function(e,t){delete e[t]},e.forEach=function(e,t){for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},e.merge=function(e,t){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]=e[r]);for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n},e.equals=function(e,t){var n=Object.keys(e),r=Object.keys(t);if(n.length!=r.length)return!1;for(var i,o=0;o<n.length;o++)if(i=n[o],e[i]!==t[i])return!1;return!0},e}();t.StringMapWrapper=h;var f=function(){function e(){}return e.createFixedSize=function(e){return new Array(e)},e.createGrowableSize=function(e){return new Array(e)},e.clone=function(e){return e.slice(0)},e.forEachWithIndex=function(e,t){for(var n=0;n<e.length;n++)t(e[n],n)},e.first=function(e){return e?e[0]:null},e.last=function(e){return e&&0!=e.length?e[e.length-1]:null},e.indexOf=function(e,t,n){return void 0===n&&(n=0),e.indexOf(t,n)},e.contains=function(e,t){return-1!==e.indexOf(t)},e.reversed=function(t){var n=e.clone(t);return n.reverse()},e.concat=function(e,t){return e.concat(t)},e.insert=function(e,t,n){e.splice(t,0,n)},e.removeAt=function(e,t){var n=e[t];return e.splice(t,1),n},e.removeAll=function(e,t){for(var n=0;n<t.length;++n){var r=e.indexOf(t[n]);e.splice(r,1)}},e.remove=function(e,t){var n=e.indexOf(t);return 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;n<e.length;++n)if(e[n]!==t[n])return!1;return!0},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.splice=function(e,t,n){return e.splice(t,n)},e.sort=function(e,t){s.isPresent(t)?e.sort(t):e.sort()},e.toString=function(e){return e.toString()},e.toJSON=function(e){return JSON.stringify(e)},e.maximum=function(e,t){if(0==e.length)return null;for(var n=null,r=-(1/0),i=0;i<e.length;i++){var o=e[i];if(!s.isBlank(o)){var a=t(o);a>r&&(n=o,r=a)}}return n},e.flatten=function(e){var t=[];return e.forEach(function(e){return t=t.concat(e)}),t},e}();t.ListWrapper=f,t.isListLikeIterable=r,t.areIterablesEqual=i,t.iterateListLike=o;var d=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;r<e.length;r++)n.add(e[r]);return n}}(),y=function(){function e(){}return e.createFromList=function(e){return d(e)},e.has=function(e,t){return e.has(t)},e["delete"]=function(e,t){e["delete"](t)},e}();t.SetWrapper=y},function(e,t,n){"use strict";function r(e){return new T(e)}function i(e,t){var n=t.useClass,r=t.useValue,i=t.useExisting,o=t.useFactory,s=t.deps,a=t.multi;return new S(e,{useClass:n,useValue:r,useExisting:i,useFactory:o,deps:s,multi:a})}function o(e){var t,n;if(g.isPresent(e.useClass)){var r=R.resolveForwardRef(e.useClass);t=b.reflector.factory(r),n=l(r)}else g.isPresent(e.useExisting)?(t=function(e){return e},n=[E.fromKey(P.Key.get(e.useExisting))]):g.isPresent(e.useFactory)?(t=e.useFactory,n=p(e.useFactory,e.dependencies)):(t=function(){return e.useValue},n=O);return new x(t,n)}function s(e){return new D(P.Key.get(e.token),[o(e)],e.multi)}function a(e){var t=u(e,[]),n=t.map(s);return _.MapWrapper.values(c(n,new Map))}function c(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=t.get(r.key.id);if(g.isPresent(i)){if(r.multiProvider!==i.multiProvider)throw new w.MixingMultiProvidersWithRegularProvidersError(i,r);if(r.multiProvider)for(var o=0;o<r.resolvedFactories.length;o++)i.resolvedFactories.push(r.resolvedFactories[o]);else t.set(r.key.id,r)}else{var s;s=r.multiProvider?new D(r.key,_.ListWrapper.clone(r.resolvedFactories),r.multiProvider):r,t.set(r.key.id,s)}}return t}function u(e,t){return e.forEach(function(e){if(e instanceof g.Type)t.push(i(e,{useClass:e}));else if(e instanceof S)t.push(e);else{if(!(e instanceof Array))throw e instanceof T?new w.InvalidProviderError(e.token):new w.InvalidProviderError(e);u(e,t)}}),t}function p(e,t){if(g.isBlank(t))return l(e);var n=t.map(function(e){return[e]});return t.map(function(t){return h(e,t,n)})}function l(e){var t=b.reflector.parameters(e);if(g.isBlank(t))return[];if(t.some(g.isBlank))throw new w.NoAnnotationError(e,t);return t.map(function(n){return h(e,n,t)})}function h(e,t,n){var r=[],i=null,o=!1;if(!g.isArray(t))return t instanceof C.InjectMetadata?f(t.token,o,null,null,r):f(t,o,null,null,r);for(var s=null,a=null,c=0;c<t.length;++c){var u=t[c];u instanceof g.Type?i=u:u instanceof C.InjectMetadata?i=u.token:u instanceof C.OptionalMetadata?o=!0:u instanceof C.SelfMetadata?a=u:u instanceof C.HostMetadata?a=u:u instanceof C.SkipSelfMetadata?s=u:u instanceof C.DependencyMetadata&&(g.isPresent(u.token)&&(i=u.token),r.push(u))}if(i=R.resolveForwardRef(i),g.isPresent(i))return f(i,o,s,a,r);throw new w.NoAnnotationError(e,n)}function f(e,t,n,r,i){return new E(P.Key.get(e),t,n,r,i)}var d=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)},y=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},v=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},g=n(5),m=n(14),_=n(12),b=n(17),P=n(21),C=n(7),w=n(22),R=n(10),E=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=E;var O=g.CONST_EXPR([]),S=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=y([g.CONST(),v("design:paramtypes",[Object,Object])],e)}();t.Provider=S;var A=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 d(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=y([g.CONST(),v("design:paramtypes",[Object,Object])],t)}(S);t.Binding=A;var D=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_=D;var x=function(){function e(e,t){this.factory=e,this.dependencies=t}return e}();t.ResolvedFactory=x,t.bind=r,t.provide=i;var T=function(){function e(e){this.token=e}return e.prototype.toClass=function(e){if(!g.isType(e))throw new m.BaseException('Trying to create a class provider but "'+g.stringify(e)+'" is not a class!');return new S(this.token,{useClass:e})},e.prototype.toValue=function(e){return new S(this.token,{useValue:e})},e.prototype.toAlias=function(e){if(g.isBlank(e))throw new m.BaseException("Can not alias "+g.stringify(this.token)+" to a blank value!");return new S(this.token,{useExisting:e})},e.prototype.toFactory=function(e,t){if(!g.isFunction(e))throw new m.BaseException('Trying to create a factory provider but "'+g.stringify(e)+'" is not a function!');return new S(this.token,{useFactory:e,deps:t})},e}();t.ProviderBuilder=T,t.resolveFactory=o,t.resolveProvider=s,t.resolveProviders=a,t.mergeResolvedProviders=c},function(e,t,n){"use strict";function r(e){return new TypeError(e)}function i(){throw new u("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(16),c=n(16);t.ExceptionHandler=c.ExceptionHandler;var u=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=u;var p=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 a.ExceptionHandler.exceptionToString(this)},enumerable:!0,configurable:!0}),t.prototype.toString=function(){return this.message},t}(s.BaseWrappedException);t.WrappedException=p,t.makeTypeError=r,t.unimplemented=i},function(e,t){"use strict";var n=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)},r=function(e){function t(t){e.call(this,t)}return n(t,e),Object.defineProperty(t.prototype,"wrapperMessage",{get:function(){return""},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"wrapperStack",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalException",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"originalStack",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"context",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){return""},enumerable:!0,configurable:!0}),t}(Error);t.BaseWrappedException=r},function(e,t,n){"use strict";var r=n(5),i=n(15),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.BaseWrappedException?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.BaseWrappedException?r.isPresent(e.context)?e.context:this._findContext(e.originalException):null}catch(t){return null}},e.prototype._findOriginalException=function(e){if(!(e instanceof i.BaseWrappedException))return null;for(var t=e.originalException;t instanceof i.BaseWrappedException&&r.isPresent(t.originalException);)t=t.originalException;return t},e.prototype._findOriginalStack=function(e){if(!(e instanceof i.BaseWrappedException))return null;for(var t=e,n=e.originalStack;t instanceof i.BaseWrappedException&&r.isPresent(t.originalException);)t=t.originalException,t instanceof i.BaseWrappedException&&r.isPresent(t.originalException)&&(n=t.originalStack);return n},e}();t.ExceptionHandler=a},function(e,t,n){"use strict";var r=n(18),i=n(18);t.Reflector=i.Reflector,t.ReflectionInfo=i.ReflectionInfo;var o=n(20);t.reflector=new r.Reflector(new o.ReflectionCapabilities)},function(e,t,n){"use strict";function r(e,t){a.StringMapWrapper.forEach(t,function(t,n){return e.set(n,t)})}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=n(5),s=n(14),a=n(12),c=n(19),u=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=u;var p=function(e){function t(t){e.call(this),this._injectableInfo=new a.Map,this._getters=new a.Map,this._setters=new a.Map,this._methods=new a.Map,this._usedKeys=null,this.reflectionCapabilities=t}return i(t,e),t.prototype.isReflectionEnabled=function(){return this.reflectionCapabilities.isReflectionEnabled()},t.prototype.trackUsage=function(){this._usedKeys=new a.Set},t.prototype.listUnusedKeys=function(){var e=this;if(null==this._usedKeys)throw new s.BaseException("Usage tracking is disabled");var t=a.MapWrapper.keys(this._injectableInfo);return t.filter(function(t){return!a.SetWrapper.has(e._usedKeys,t)})},t.prototype.registerFunction=function(e,t){this._injectableInfo.set(e,t)},t.prototype.registerType=function(e,t){this._injectableInfo.set(e,t)},t.prototype.registerGetters=function(e){r(this._getters,e)},t.prototype.registerSetters=function(e){r(this._setters,e)},t.prototype.registerMethods=function(e){r(this._methods,e)},t.prototype.factory=function(e){if(this._containsReflectionInfo(e)){var t=this._getReflectionInfo(e).factory;return o.isPresent(t)?t:null}return this.reflectionCapabilities.factory(e)},t.prototype.parameters=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).parameters;return o.isPresent(t)?t:[]}return this.reflectionCapabilities.parameters(e)},t.prototype.annotations=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).annotations;return o.isPresent(t)?t:[]}return this.reflectionCapabilities.annotations(e)},t.prototype.propMetadata=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).propMetadata;return o.isPresent(t)?t:{}}return this.reflectionCapabilities.propMetadata(e)},t.prototype.interfaces=function(e){if(this._injectableInfo.has(e)){var t=this._getReflectionInfo(e).interfaces;return o.isPresent(t)?t:[]}return this.reflectionCapabilities.interfaces(e)},t.prototype.getter=function(e){return this._getters.has(e)?this._getters.get(e):this.reflectionCapabilities.getter(e)},t.prototype.setter=function(e){return this._setters.has(e)?this._setters.get(e):this.reflectionCapabilities.setter(e)},t.prototype.method=function(e){return this._methods.has(e)?this._methods.get(e):this.reflectionCapabilities.method(e)},t.prototype._getReflectionInfo=function(e){return o.isPresent(this._usedKeys)&&this._usedKeys.add(e),this._injectableInfo.get(e)},t.prototype._containsReflectionInfo=function(e){return this._injectableInfo.has(e)},t.prototype.importUri=function(e){return this.reflectionCapabilities.importUri(e)},t}(c.ReflectorReader);t.Reflector=p},function(e,t){"use strict";var n=function(){function e(){}return e}();t.ReflectorReader=n},function(e,t,n){"use strict";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,g){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g)};case 18:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m)};case 19:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m,_){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m,_)};case 20:return function(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m,_,b){return new e(t,n,r,i,o,s,a,c,u,p,l,h,f,d,y,v,g,m,_,b)}}throw new Error("Cannot create a factory for '"+r.stringify(e)+"' because its constructor has more than 20 arguments")},e.prototype._zipTypesAndAnnotations=function(e,t){var n;n="undefined"==typeof e?new Array(t.length):new Array(e.length);for(var i=0;i<n.length;i++)"undefined"==typeof e?n[i]=[]:e[i]!=Object?n[i]=[e[i]]:n[i]=[],r.isPresent(t)&&r.isPresent(t[i])&&(n[i]=n[i].concat(t[i]));return n},e.prototype.parameters=function(e){if(r.isPresent(e.parameters))return e.parameters;if(r.isPresent(this._reflect)&&r.isPresent(this._reflect.getMetadata)){var t=this._reflect.getMetadata("parameters",e),n=this._reflect.getMetadata("design:paramtypes",e);if(r.isPresent(n)||r.isPresent(t))return this._zipTypesAndAnnotations(n,t)}var i=new Array(e.length);return i.fill(void 0),i},e.prototype.annotations=function(e){if(r.isPresent(e.annotations)){var t=e.annotations;return r.isFunction(t)&&t.annotations&&(t=t.annotations),t}if(r.isPresent(this._reflect)&&r.isPresent(this._reflect.getMetadata)){var t=this._reflect.getMetadata("annotations",e);if(r.isPresent(t))return t}return[]},e.prototype.propMetadata=function(e){if(r.isPresent(e.propMetadata)){var t=e.propMetadata;return r.isFunction(t)&&t.propMetadata&&(t=t.propMetadata),t}if(r.isPresent(this._reflect)&&r.isPresent(this._reflect.getMetadata)){var t=this._reflect.getMetadata("propMetadata",e);if(r.isPresent(t))return t}return{}},e.prototype.interfaces=function(e){throw new i.BaseException("JavaScript does not support interfaces")},e.prototype.getter=function(e){return new Function("o","return o."+e+";")},e.prototype.setter=function(e){return new Function("o","v","return o."+e+" = v;")},e.prototype.method=function(e){var t="if (!o."+e+") throw new Error('\""+e+"\" is undefined');\n return o."+e+".apply(o, args);";return new Function("o","args",t)},e.prototype.importUri=function(e){return"./"},e}();t.ReflectionCapabilities=o},function(e,t,n){"use strict";var r=n(5),i=n(14),o=n(10),s=function(){function e(e,t){if(this.token=e,this.id=t,r.isBlank(e))throw new i.BaseException("Token must be defined!")}return Object.defineProperty(e.prototype,"displayName",{get:function(){return r.stringify(this.token)},enumerable:!0,configurable:!0}),e.get=function(e){return c.get(o.resolveForwardRef(e))},Object.defineProperty(e,"numberOfKeys",{get:function(){return c.numberOfKeys},enumerable:!0,configurable:!0}),e}();t.Key=s;var a=function(){function e(){this._allKeys=new Map}return e.prototype.get=function(e){if(e instanceof s)return e;if(this._allKeys.has(e))return this._allKeys.get(e);var t=new s(e,s.numberOfKeys);return this._allKeys.set(e,t),t},Object.defineProperty(e.prototype,"numberOfKeys",{get:function(){return this._allKeys.size},enumerable:!0,configurable:!0}),e}();t.KeyRegistry=a;var c=new a},function(e,t,n){"use strict";function r(e){for(var t=[],n=0;n<e.length;++n){if(s.ListWrapper.contains(t,e[n]))return t.push(e[n]),t;t.push(e[n])}return t}function i(e){if(e.length>1){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 that all the parameters are decorated with Inject or have valid type annotations and that '"+a.stringify(e)+"' is decorated with Injectable."},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){"use strict";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){"use strict";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(25),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,g=void 0===v?c.ChangeDetectionStrategy.Default:v,m=n.queries,_=n.templateUrl,b=n.template,P=n.styleUrls,C=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:m}),this.changeDetection=g,this._viewProviders=y,this._viewBindings=d,this.templateUrl=_,this.template=b,this.styleUrls=P,this.styles=C,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){"use strict";var r=n(26);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,t.CollectionChangeRecord=r.CollectionChangeRecord,t.KeyValueChangeRecord=r.KeyValueChangeRecord},function(e,t,n){"use strict";var r=n(27),i=n(28),o=n(29),s=n(30),a=n(5),c=n(30);t.DefaultKeyValueDifferFactory=c.DefaultKeyValueDifferFactory,t.KeyValueChangeRecord=c.KeyValueChangeRecord;var u=n(28);t.DefaultIterableDifferFactory=u.DefaultIterableDifferFactory,t.CollectionChangeRecord=u.CollectionChangeRecord;
3
+ var p=n(31);t.ASTWithSource=p.ASTWithSource,t.AST=p.AST,t.AstTransformer=p.AstTransformer,t.PropertyRead=p.PropertyRead,t.LiteralArray=p.LiteralArray,t.ImplicitReceiver=p.ImplicitReceiver;var l=n(32);t.Lexer=l.Lexer;var h=n(33);t.Parser=h.Parser;var f=n(34);t.Locals=f.Locals;var d=n(35);t.DehydratedException=d.DehydratedException,t.ExpressionChangedAfterItHasBeenCheckedException=d.ExpressionChangedAfterItHasBeenCheckedException,t.ChangeDetectionError=d.ChangeDetectionError;var y=n(36);t.ChangeDetectorDefinition=y.ChangeDetectorDefinition,t.DebugContext=y.DebugContext,t.ChangeDetectorGenConfig=y.ChangeDetectorGenConfig;var v=n(37);t.ChangeDetectionStrategy=v.ChangeDetectionStrategy,t.CHANGE_DETECTION_STRATEGY_VALUES=v.CHANGE_DETECTION_STRATEGY_VALUES;var g=n(38);t.DynamicProtoChangeDetector=g.DynamicProtoChangeDetector;var m=n(70);t.JitProtoChangeDetector=m.JitProtoChangeDetector;var _=n(41);t.BindingRecord=_.BindingRecord,t.BindingTarget=_.BindingTarget;var b=n(42);t.DirectiveIndex=b.DirectiveIndex,t.DirectiveRecord=b.DirectiveRecord;var P=n(43);t.DynamicChangeDetector=P.DynamicChangeDetector;var C=n(45);t.ChangeDetectorRef=C.ChangeDetectorRef;var w=n(27);t.IterableDiffers=w.IterableDiffers;var R=n(29);t.KeyValueDiffers=R.KeyValueDiffers;var E=n(39);t.WrappedValue=E.WrappedValue,t.SimpleChange=E.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){"use strict";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+"' of type '"+o.getTypeNameForDebugging(e)+"'")},e=r([o.CONST(),i("design:paramtypes",[Array])],e)}();t.IterableDiffers=u},function(e,t,n){"use strict";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,t){return new l(t)},e=r([o.CONST(),i("design:paramtypes",[])],e)}();t.DefaultIterableDifferFactory=u;var p=function(e,t){return t},l=function(){function e(e){this._trackByFn=e,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=c.isPresent(this._trackByFn)?this._trackByFn:p}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.forEachIdentityChange=function(e){var t;for(t=this._identityChangesHead;null!==t;t=t._nextIdentityChange)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,o=this._itHead,s=!1;if(c.isArray(e)){var u=e;for(this._length=e.length,n=0;n<this._length;n++)r=u[n],i=this._trackByFn(n,r),null!==o&&c.looseIdentical(o.trackById,i)?(s&&(o=this._verifyReinsertion(o,r,i,n)),c.looseIdentical(o.item,r)||this._addIdentityChange(o,r)):(o=this._mismatch(o,r,i,n),s=!0),o=o._next}else n=0,a.iterateListLike(e,function(e){i=t._trackByFn(n,e),null!==o&&c.looseIdentical(o.trackById,i)?(s&&(o=t._verifyReinsertion(o,e,i,n)),c.looseIdentical(o.item,e)||t._addIdentityChange(o,e)):(o=t._mismatch(o,e,i,n),s=!0),o=o._next,n++}),this._length=n;return this._truncate(o),this._collection=e,this.isDirty},Object.defineProperty(e.prototype,"isDirty",{get:function(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead},enumerable:!0,configurable:!0}),e.prototype._reset=function(){if(this.isDirty){var e,t;for(e=this._previousItHead=this._itHead;null!==e;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;null!==e;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;null!==e;e=t)e.previousIndex=e.currentIndex,t=e._nextMoved;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}},e.prototype._mismatch=function(e,t,n,r){var i;return null===e?i=this._itTail:(i=e._prev,this._remove(e)),e=null===this._linkedRecords?null:this._linkedRecords.get(n,r),null!==e?(c.looseIdentical(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,i,r)):(e=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n),null!==e?(c.looseIdentical(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,i,r)):e=this._addAfter(new h(t,n),i,r)),e},e.prototype._verifyReinsertion=function(e,t,n,r){var i=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n);return null!==i?e=this._reinsertAfter(i,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e},e.prototype._truncate=function(e){for(;null!==e;){var t=e._next;this._addToRemovals(this._unlink(e)),e=t}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)},e.prototype._reinsertAfter=function(e,t,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(e);var r=e._prevRemoved,i=e._nextRemoved;return null===r?this._removalsHead=i:r._nextRemoved=i,null===i?this._removalsTail=r:i._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._moveAfter=function(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e},e.prototype._addAfter=function(e,t,n){return this._insertAfter(e,t,n),null===this._additionsTail?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e},e.prototype._insertAfter=function(e,t,n){var r=null===t?this._itHead:t._next;return e._next=r,e._prev=t,null===r?this._itTail=e:r._prev=e,null===t?this._itHead=e:t._next=e,null===this._linkedRecords&&(this._linkedRecords=new d),this._linkedRecords.put(e),e.currentIndex=n,e},e.prototype._remove=function(e){return this._addToRemovals(this._unlink(e))},e.prototype._unlink=function(e){null!==this._linkedRecords&&this._linkedRecords.remove(e);var t=e._prev,n=e._next;return null===t?this._itHead=n:t._next=n,null===n?this._itTail=t:n._prev=t,e},e.prototype._addToMoves=function(e,t){return e.previousIndex===t?e:(null===this._movesTail?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e,e)},e.prototype._addToRemovals=function(e){return null===this._unlinkedRecords&&(this._unlinkedRecords=new d),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e},e.prototype._addIdentityChange=function(e,t){return e.item=t,null===this._identityChangesTail?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e},e.prototype.toString=function(){var e=[];this.forEachItem(function(t){return e.push(t)});var t=[];this.forEachPreviousItem(function(e){return t.push(e)});var n=[];this.forEachAddedItem(function(e){return n.push(e)});var r=[];this.forEachMovedItem(function(e){return r.push(e)});var i=[];this.forEachRemovedItem(function(e){return i.push(e)});var o=[];return this.forEachIdentityChange(function(e){return o.push(e)}),"collection: "+e.join(", ")+"\nprevious: "+t.join(", ")+"\nadditions: "+n.join(", ")+"\nmoves: "+r.join(", ")+"\nremovals: "+i.join(", ")+"\nidentityChanges: "+o.join(", ")+"\n"},e}();t.DefaultIterableDiffer=l;var h=function(){function e(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}return e.prototype.toString=function(){return this.previousIndex===this.currentIndex?c.stringify(this.item):c.stringify(this.item)+"["+c.stringify(this.previousIndex)+"->"+c.stringify(this.currentIndex)+"]"},e}();t.CollectionChangeRecord=h;var f=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||t<n.currentIndex)&&c.looseIdentical(n.trackById,e))return n;return null},e.prototype.remove=function(e){var t=e._prevDup,n=e._nextDup;return null===t?this._head=n:t._nextDup=n,null===n?this._tail=t:n._prevDup=t,null===this._head},e}(),d=function(){function e(){this.map=new Map}return e.prototype.put=function(e){var t=c.getMapKey(e.trackById),n=this.map.get(t);c.isPresent(n)||(n=new f,this.map.set(t,n)),n.add(e)},e.prototype.get=function(e,t){void 0===t&&(t=null);var n=c.getMapKey(e),r=this.map.get(n);return c.isBlank(r)?null:r.get(e,t)},e.prototype.remove=function(e){var t=c.getMapKey(e.trackById),n=this.map.get(t);return n.remove(e)&&this.map["delete"](t),e},Object.defineProperty(e.prototype,"isEmpty",{get:function(){return 0===this.map.size},enumerable:!0,configurable:!0}),e.prototype.clear=function(){this.map.clear()},e.prototype.toString=function(){return"_DuplicateMap("+c.stringify(this.map)+")"},e}()},function(e,t,n){"use strict";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 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([o.CONST(),i("design:paramtypes",[Array])],e)}();t.KeyValueDiffers=u},function(e,t,n){"use strict";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.KeyValueChangeRecord=p},function(e,t,n){"use strict";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 g=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=g;var m=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=m;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 P=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=P;var C=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=C;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 A=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=A;var D=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 g(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 m(this.visitAll(e.expressions))},e.prototype.visitLiteralMap=function(e){return new _(e.keys,this.visitAll(e.values))},e.prototype.visitBinary=function(e){return new P(e.operation,e.left.visit(this),e.right.visit(this))},e.prototype.visitPrefixNot=function(e){return new C(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<e.length;++n)t[n]=e[n].visit(this);return t},e.prototype.visitChain=function(e){return new u(this.visitAll(e.expressions))},e.prototype.visitQuote=function(e){return new s(e.prefix,e.uninterpretedExpression,e.location)},e}();t.AstTransformer=D},function(e,t,n){"use strict";function r(e,t){return new O(e,R.Character,t,C.StringWrapper.fromCharCode(t))}function i(e,t){return new O(e,R.Identifier,0,t)}function o(e,t){return new O(e,R.Keyword,0,t)}function s(e,t){return new O(e,R.Operator,0,t)}function a(e,t){return new O(e,R.String,0,t)}function c(e,t){return new O(e,R.Number,t,"")}function u(e){return e>=t.$TAB&&e<=t.$SPACE||e==H}function p(e){return e>=k&&U>=e||e>=D&&T>=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>=D&&T>=e||e>=S&&A>=e||e==N||e==t.$$}function f(e){return e>=S&&A>=e}function d(e){return e==M||e==x}function y(e){return e==t.$MINUS||e==t.$PLUS}function v(e){switch(e){case j: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 g=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)},m=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),P=n(12),C=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=m([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,A=57,D=65,x=69,T=90;t.$LBRACKET=91,t.$BACKSLASH=92,t.$RBRACKET=93;var I=94,N=95,k=97,M=101,V=102,j=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 g(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:C.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=C.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 I:return this.scanOperator(s,C.StringWrapper.fromCharCode(i));case t.$QUESTION:return this.scanComplexOperator(s,"?",t.$PERIOD,".");
4
+ case t.$LT:case t.$GT:return this.scanComplexOperator(s,C.StringWrapper.fromCharCode(i),t.$EQ,"=");case t.$BANG:case t.$EQ:return this.scanComplexOperator(s,C.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 ["+C.StringWrapper.fromCharCode(i)+"]",0),null},e.prototype.scanCharacter=function(e,t){return this.advance(),r(e,t)},e.prototype.scanOperator=function(e,t){return this.advance(),s(e,t)},e.prototype.scanComplexOperator=function(e,t,n,r,i,o){this.advance();var a=t;return this.peek==n&&(this.advance(),a+=r),C.isPresent(i)&&this.peek==i&&(this.advance(),a+=o),s(e,a)},e.prototype.scanIdentifier=function(){var e=this.index;for(this.advance();h(this.peek);)this.advance();var t=this.input.substring(e,this.index);return P.SetWrapper.has(z,t)?o(e,t):i(e,t)},e.prototype.scanNumber=function(e){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?C.NumberWrapper.parseIntAutoRadix(r):C.NumberWrapper.parseFloat(r);return c(e,i)},e.prototype.scanString=function(){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 C.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=C.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(C.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=(P.SetWrapper.createFromList(["+","-","*","/","%","^","=","==","!=","===","!==","<",">","<=",">=","&&","||","&","|","!","?","#","?."]),P.SetWrapper.createFromList(["var","null","undefined","true","false","if","else"]))},function(e,t,n){"use strict";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(32),l=n(17),h=n(31),f=new h.ImplicitReceiver,d=/\{\{([\s\S]*?)\}\}/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){this.strings=e,this.expressions=t}return e}();t.SplitInterpolation=v;var g=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(!_.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=this.splitInterpolation(e,t);if(null==n)return null;for(var r=[],i=0;i<n.expressions.length;++i){var o=this._lexer.tokenize(n.expressions[i]),s=new m(e,t,o,this._reflector,!1).parseChain();r.push(s)}return new h.ASTWithSource(new h.Interpolation(n.strings,r),e,t)},e.prototype.splitInterpolation=function(e,t){var n=a.StringWrapper.split(e,d);if(n.length<=1)return null;for(var r=[],i=[],o=0;o<n.length;o++){var s=n[o];if(o%2===0)r.push(s);else{if(!(s.trim().length>0))throw new y("Blank expressions are not allowed in interpolated strings",e,"at column "+this._findInterpolationErrorColumn(n,o)+" in",t);i.push(s)}}return new v(r,i)},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=g;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<this.tokens.length?this.tokens[t]:p.EOF},Object.defineProperty(e.prototype,"next",{get:function(){return this.peek(0)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"inputIndex",{get:function(){return this.index<this.tokens.length?this.next.index:this.input.length},enumerable:!0,configurable:!0}),e.prototype.advance=function(){this.index++},e.prototype.optionalCharacter=function(e){return this.next.isCharacter(e)?(this.advance(),!0):!1},e.prototype.optionalKeywordVar=function(){return this.peekKeywordVar()?(this.advance(),!0):!1},e.prototype.peekKeywordVar=function(){return this.next.isKeywordVar()||this.next.isOperator("#")},e.prototype.expectCharacter=function(e){this.optionalCharacter(e)||this.error("Missing expected "+a.StringWrapper.fromCharCode(e))},e.prototype.optionalOperator=function(e){return this.next.isOperator(e)?(this.advance(),!0):!1},e.prototype.expectOperator=function(e){this.optionalOperator(e)||this.error("Missing expected operator "+e)},e.prototype.expectIdentifierOrKeyword=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||this.error("Unexpected token "+e+", expected identifier or keyword"),this.advance(),e.toString()},e.prototype.expectIdentifierOrKeywordOrString=function(){var e=this.next;return e.isIdentifier()||e.isKeyword()||e.isString()||this.error("Unexpected token "+e+", expected identifier, keyword, or string"),this.advance(),e.toString()},e.prototype.parseChain=function(){for(var e=[];this.index<this.tokens.length;){var t=this.parsePipe();if(e.push(t),this.optionalCharacter(p.$SEMICOLON))for(this.parseAction||this.error("Binding expression cannot contain chained expression");this.optionalCharacter(p.$SEMICOLON););else this.index<this.tokens.length&&this.error("Unexpected token '"+this.next+"'")}return 0==e.length?new h.EmptyExpr:1==e.length?e[0]:new h.Chain(e)},e.prototype.parsePipe=function(){var e=this.parseExpression();if(this.optionalOperator("|")){this.parseAction&&this.error("Cannot have a pipe in an action expression");do{for(var t=this.expectIdentifierOrKeyword(),n=[];this.optionalCharacter(p.$COLON);)n.push(this.parseExpression());e=new h.BindingPipe(e,t,n)}while(this.optionalOperator("|"))}return e},e.prototype.parseExpression=function(){return this.parseConditional()},e.prototype.parseConditional=function(){var e=this.inputIndex,t=this.parseLogicalOr();if(this.optionalOperator("?")){var n=this.parsePipe();if(!this.optionalCharacter(p.$COLON)){var r=this.inputIndex,i=this.input.substring(e,r);this.error("Conditional expression "+i+" requires all 3 expressions")}var o=this.parsePipe();return new h.Conditional(t,n,o)}return t},e.prototype.parseLogicalOr=function(){for(var e=this.parseLogicalAnd();this.optionalOperator("||");)e=new h.Binary("||",e,this.parseLogicalAnd());return e},e.prototype.parseLogicalAnd=function(){for(var e=this.parseEquality();this.optionalOperator("&&");)e=new h.Binary("&&",e,this.parseEquality());return e},e.prototype.parseEquality=function(){for(var e=this.parseRelational();;)if(this.optionalOperator("=="))e=new h.Binary("==",e,this.parseRelational());else if(this.optionalOperator("==="))e=new h.Binary("===",e,this.parseRelational());else if(this.optionalOperator("!="))e=new h.Binary("!=",e,this.parseRelational());else{if(!this.optionalOperator("!=="))return e;e=new h.Binary("!==",e,this.parseRelational())}},e.prototype.parseRelational=function(){for(var e=this.parseAdditive();;)if(this.optionalOperator("<"))e=new h.Binary("<",e,this.parseAdditive());else if(this.optionalOperator(">"))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<this.tokens.length&&!this.next.isCharacter(p.$RBRACE);){var t=this.parseExpression();if(e.push(t),this.optionalCharacter(p.$SEMICOLON))for(;this.optionalCharacter(p.$SEMICOLON););}return 0==e.length?new h.EmptyExpr:1==e.length?e[0]:new h.Chain(e)},e.prototype.expectTemplateBindingKey=function(){var e="",t=!1;do e+=this.expectIdentifierOrKeywordOrString(),t=this.optionalOperator("-"),t&&(e+="-");while(t);return e.toString()},e.prototype.parseTemplateBindings=function(){for(var e=[],t=null;this.index<this.tokens.length;){var n=this.optionalKeywordVar(),r=this.expectTemplateBindingKey();n||(null==t?t=r:r=t+r[0].toUpperCase()+r.substring(1)),this.optionalCharacter(p.$COLON);var i=null,o=null;if(n)i=this.optionalOperator("=")?this.expectTemplateBindingKey():"$implicit";else if(this.next!==p.EOF&&!this.peekKeywordVar()){var s=this.inputIndex,a=this.parsePipe(),c=this.input.substring(s,this.inputIndex);o=new h.ASTWithSource(a,c,this.location)}e.push(new h.TemplateBinding(r,n,i,o)),this.optionalCharacter(p.$SEMICOLON)||this.optionalCharacter(p.$COMMA)}return e},e.prototype.error=function(e,t){void 0===t&&(t=null),a.isBlank(t)&&(t=this.index);var n=t<this.tokens.length?"at column "+(this.tokens[t].index+1)+" in":"at the end of the expression";throw new y(e,this.input,n,this.location)},e}();t._ParseAST=m;var _=function(){function e(){this.simple=!0}return e.check=function(t){var n=new e;return t.visit(n),n.simple},e.prototype.visitImplicitReceiver=function(e){},e.prototype.visitInterpolation=function(e){this.simple=!1},e.prototype.visitLiteralPrimitive=function(e){},e.prototype.visitPropertyRead=function(e){},e.prototype.visitPropertyWrite=function(e){this.simple=!1},e.prototype.visitSafePropertyRead=function(e){this.simple=!1},e.prototype.visitMethodCall=function(e){this.simple=!1},e.prototype.visitSafeMethodCall=function(e){this.simple=!1},e.prototype.visitFunctionCall=function(e){this.simple=!1},e.prototype.visitLiteralArray=function(e){this.visitAll(e.expressions)},e.prototype.visitLiteralMap=function(e){this.visitAll(e.values)},e.prototype.visitBinary=function(e){this.simple=!1},e.prototype.visitPrefixNot=function(e){this.simple=!1},e.prototype.visitConditional=function(e){this.simple=!1},e.prototype.visitPipe=function(e){this.simple=!1},e.prototype.visitKeyedRead=function(e){this.simple=!1},e.prototype.visitKeyedWrite=function(e){this.simple=!1},e.prototype.visitAll=function(e){for(var t=u.ListWrapper.createFixedSize(e.length),n=0;n<e.length;++n)t[n]=e[n].visit(this);return t},e.prototype.visitChain=function(e){this.simple=!1},e.prototype.visitQuote=function(e){this.simple=!1},e}()},function(e,t,n){"use strict";var r=n(5),i=n(14),o=n(12),s=function(){function e(e,t){this.parent=e,this.current=t}return e.prototype.contains=function(e){return this.current.has(e)?!0:r.isPresent(this.parent)?this.parent.contains(e):!1},e.prototype.get=function(e){if(this.current.has(e))return this.current.get(e);if(r.isPresent(this.parent))return this.parent.get(e);throw new i.BaseException("Cannot find '"+e+"'")},e.prototype.set=function(e,t){if(!this.current.has(e))throw new i.BaseException("Setting of new keys post-construction is not supported. Key: "+e+".");this.current.set(e,t)},e.prototype.clearLocalValues=function(){o.MapWrapper.clearValues(this.current)},e}();t.Locals=s},function(e,t,n){"use strict";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(14),o=function(e){function t(t,n,r,i){e.call(this,"Expression '"+t+"' has changed after it was checked. "+("Previous value: '"+n+"'. Current value: '"+r+"'"))}return r(t,e),t}(i.BaseException);t.ExpressionChangedAfterItHasBeenCheckedException=o;var s=function(e){function t(t,n,r,i){e.call(this,n+" in ["+t+"]",n,r,i),this.location=t}return r(t,e),t}(i.WrappedException);t.ChangeDetectionError=s;var a=function(e){function t(t){e.call(this,"Attempt to use a dehydrated detector: "+t)}return r(t,e),t}(i.BaseException);t.DehydratedException=a;var c=function(e){function t(t,n,r,i){e.call(this,'Error during evaluation of "'+t+'"',n,r,i)}return r(t,e),t}(i.WrappedException);t.EventEvaluationError=c;var u=function(){function e(e,t,n,r,i){this.element=e,this.componentElement=t,this.context=n,this.locals=r,this.injector=i}return e}();t.EventEvaluationErrorContext=u},function(e,t){"use strict";var n=function(){function e(e,t,n,r,i,o){this.element=e,this.componentElement=t,this.directive=n,this.context=r,this.locals=i,this.injector=o}return e}();t.DebugContext=n;var r=function(){function e(e,t,n){this.genDebugInfo=e,this.logBindingUpdate=t,this.useJit=n}return e}();t.ChangeDetectorGenConfig=r;var i=function(){function e(e,t,n,r,i,o,s){this.id=e,this.strategy=t,this.variableNames=n,this.bindingRecords=r,this.eventRecords=i,this.directiveRecords=o,this.genConfig=s}return e}();t.ChangeDetectorDefinition=i},function(e,t,n){"use strict";function r(e){return i.isBlank(e)||e===s.Default}var i=n(5);!function(e){e[e.NeverChecked=0]="NeverChecked",e[e.CheckedBefore=1]="CheckedBefore",e[e.Errored=2]="Errored"}(t.ChangeDetectorState||(t.ChangeDetectorState={}));var o=t.ChangeDetectorState;!function(e){e[e.CheckOnce=0]="CheckOnce",e[e.Checked=1]="Checked",e[e.CheckAlways=2]="CheckAlways",e[e.Detached=3]="Detached",e[e.OnPush=4]="OnPush",e[e.Default=5]="Default"}(t.ChangeDetectionStrategy||(t.ChangeDetectionStrategy={}));var s=t.ChangeDetectionStrategy;t.CHANGE_DETECTION_STRATEGY_VALUES=[s.CheckOnce,s.Checked,s.CheckAlways,s.Detached,s.OnPush,s.Default],t.CHANGE_DETECTOR_STATE_VALUES=[o.NeverChecked,o.CheckedBefore,o.Errored],t.isDefaultChangeDetectionStrategy=r},function(e,t,n){"use strict";function r(e){var t=new C;return f.ListWrapper.forEachWithIndex(e.bindingRecords,function(n,r){return t.add(n,e.variableNames,r)}),_.coalesce(t.records)}function i(e){var t=f.ListWrapper.concat(["$event"],e.variableNames);return e.eventRecords.map(function(e){var n=w.create(e,t),r=e.implicitReceiver instanceof g.DirectiveIndex?e.implicitReceiver:null;return new m.EventBinding(e.target.name,e.target.elementIndex,r,n)})}function o(e){switch(e){case 0:return y.ChangeDetectionUtil.arrayFn0;case 1:return y.ChangeDetectionUtil.arrayFn1;case 2:return y.ChangeDetectionUtil.arrayFn2;case 3:return y.ChangeDetectionUtil.arrayFn3;case 4:return y.ChangeDetectionUtil.arrayFn4;case 5:return y.ChangeDetectionUtil.arrayFn5;case 6:return y.ChangeDetectionUtil.arrayFn6;case 7:return y.ChangeDetectionUtil.arrayFn7;case 8:return y.ChangeDetectionUtil.arrayFn8;case 9:return y.ChangeDetectionUtil.arrayFn9;default:throw new h.BaseException("Does not support literal maps with more than 9 elements")}}function s(e){var t=e.map(function(e){return l.isString(e)?'"'+e+'"':""+e}).join(", ");return"mapFn(["+t+"])"}function a(e){switch(e){case"+":return"operation_add";case"-":return"operation_subtract";case"*":return"operation_multiply";case"/":return"operation_divide";case"%":return"operation_remainder";case"==":return"operation_equals";case"!=":return"operation_not_equals";case"===":return"operation_identical";case"!==":return"operation_not_identical";case"<":return"operation_less_then";case">":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,g){return n+u(e)+r+u(t)+i+u(h)+o+u(f)+s+u(d)+a+u(y)+c+u(v)+p+u(g)+l};case 9:return function(e,t,h,d,y,v,g,m,_){return n+u(e)+r+u(t)+i+u(h)+o+u(d)+s+u(y)+a+u(v)+c+u(g)+p+u(m)+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(31),y=n(39),v=n(43),g=n(42),m=n(68),_=n(69),b=n(67),P=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(){return new v.DynamicChangeDetector(this._definition.id,this._propertyBindingRecords.length,this._propertyBindingTargets,this._directiveIndices,this._definition.strategy,this._propertyBindingRecords,this._eventBindingRecords,this._definition.directiveRecords,this._definition.genConfig)},e}();t.DynamicProtoChangeDetector=P,t.createPropertyRecords=r,t.createEventRecords=i;var C=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;n<this.records.length;++n){var r=this.records[n];r.isPureFunction()&&r.args.forEach(function(e){return t.records[e-1].argumentToPureFunction=!0}),r.mode===b.RecordType.Pipe&&(r.args.forEach(function(e){return t.records[e-1].argumentToPureFunction=!0}),this.records[r.contextIndex-1].argumentToPureFunction=!0)}},e.prototype._appendRecords=function(e,t,n){e.isDirectiveLifecycle()?this.records.push(new b.ProtoRecord(b.RecordType.DirectiveLifecycle,e.lifecycleEvent,null,[],[],-1,null,this.records.length+1,e,!1,!1,!1,!1,null)):w.append(this.records,e,t,n)},e}();t.ProtoRecordBuilder=C;var w=function(){function e(e,t,n,r){this._records=e,this._bindingRecord=t,this._variableNames=n,this._bindingIndex=r}return e.append=function(t,n,r,i){var o=new e(t,n,r,i);n.ast.visit(o)},e.create=function(t,n){var r=[];return e.append(r,t,n,null),r[r.length-1].lastInBinding=!0,r},e.prototype.visitImplicitReceiver=function(e){return this._bindingRecord.implicitReceiver},e.prototype.visitInterpolation=function(e){var t=this._visitAll(e.expressions);return this._addRecord(b.RecordType.Interpolate,"interpolate",p(e.strings),t,e.strings,0)},e.prototype.visitLiteralPrimitive=function(e){return this._addRecord(b.RecordType.Const,"literal",e.value,[],null,0)},e.prototype.visitPropertyRead=function(e){var t=e.receiver.visit(this);return l.isPresent(this._variableNames)&&f.ListWrapper.contains(this._variableNames,e.name)&&e.receiver instanceof d.ImplicitReceiver?this._addRecord(b.RecordType.Local,e.name,e.name,[],null,t):this._addRecord(b.RecordType.PropertyRead,e.name,e.getter,[],null,t)},e.prototype.visitPropertyWrite=function(e){if(l.isPresent(this._variableNames)&&f.ListWrapper.contains(this._variableNames,e.name)&&e.receiver instanceof d.ImplicitReceiver)throw new h.BaseException("Cannot reassign a variable binding "+e.name);var t=e.receiver.visit(this),n=e.value.visit(this);return this._addRecord(b.RecordType.PropertyWrite,e.name,e.setter,[n],null,t)},e.prototype.visitKeyedWrite=function(e){var t=e.obj.visit(this),n=e.key.visit(this),r=e.value.visit(this);return this._addRecord(b.RecordType.KeyedWrite,null,null,[n,r],null,t)},e.prototype.visitSafePropertyRead=function(e){var t=e.receiver.visit(this);return this._addRecord(b.RecordType.SafeProperty,e.name,e.getter,[],null,t)},e.prototype.visitMethodCall=function(e){var t=e.receiver.visit(this),n=this._visitAll(e.args);if(l.isPresent(this._variableNames)&&f.ListWrapper.contains(this._variableNames,e.name)){var r=this._addRecord(b.RecordType.Local,e.name,e.name,[],null,t);return this._addRecord(b.RecordType.InvokeClosure,"closure",null,n,null,r)}return this._addRecord(b.RecordType.InvokeMethod,e.name,e.fn,n,null,t)},e.prototype.visitSafeMethodCall=function(e){var t=e.receiver.visit(this),n=this._visitAll(e.args);return this._addRecord(b.RecordType.SafeMethodInvoke,e.name,e.fn,n,null,t)},e.prototype.visitFunctionCall=function(e){var t=e.target.visit(this),n=this._visitAll(e.args);return this._addRecord(b.RecordType.InvokeClosure,"closure",null,n,null,t)},e.prototype.visitLiteralArray=function(e){var t="arrayFn"+e.expressions.length;return this._addRecord(b.RecordType.CollectionLiteral,t,o(e.expressions.length),this._visitAll(e.expressions),null,0)},e.prototype.visitLiteralMap=function(e){return this._addRecord(b.RecordType.CollectionLiteral,s(e.keys),y.ChangeDetectionUtil.mapFn(e.keys),this._visitAll(e.values),null,0)},e.prototype.visitBinary=function(e){var t=e.left.visit(this);switch(e.operation){case"&&":var n=[null];this._addRecord(b.RecordType.SkipRecordsIfNot,"SkipRecordsIfNot",null,[],n,t);var r=e.right.visit(this);return n[0]=r,this._addRecord(b.RecordType.PrimitiveOp,"cond",y.ChangeDetectionUtil.cond,[t,r,t],null,0);case"||":var n=[null];this._addRecord(b.RecordType.SkipRecordsIf,"SkipRecordsIf",null,[],n,t);var r=e.right.visit(this);return n[0]=r,this._addRecord(b.RecordType.PrimitiveOp,"cond",y.ChangeDetectionUtil.cond,[t,t,r],null,0);default:var r=e.right.visit(this);return this._addRecord(b.RecordType.PrimitiveOp,a(e.operation),c(e.operation),[t,r],null,0)}},e.prototype.visitPrefixNot=function(e){var t=e.expression.visit(this);return this._addRecord(b.RecordType.PrimitiveOp,"operation_negate",y.ChangeDetectionUtil.operation_negate,[t],null,0)},e.prototype.visitConditional=function(e){var t=e.condition.visit(this),n=[null],r=[null];this._addRecord(b.RecordType.SkipRecordsIfNot,"SkipRecordsIfNot",null,[],n,t);var i=e.trueExp.visit(this),o=this._addRecord(b.RecordType.SkipRecords,"SkipRecords",null,[],r,0),s=e.falseExp.visit(this);return n[0]=o,r[0]=s,this._addRecord(b.RecordType.PrimitiveOp,"cond",y.ChangeDetectionUtil.cond,[t,i,s],null,0)},e.prototype.visitPipe=function(e){var t=e.exp.visit(this),n=this._visitAll(e.args);return this._addRecord(b.RecordType.Pipe,e.name,e.name,n,null,t)},e.prototype.visitKeyedRead=function(e){var t=e.obj.visit(this),n=e.key.visit(this);return this._addRecord(b.RecordType.KeyedRead,"keyedAccess",y.ChangeDetectionUtil.keyedAccess,[n],null,t)},e.prototype.visitChain=function(e){var t=this,n=e.expressions.map(function(e){return e.visit(t)});return this._addRecord(b.RecordType.Chain,"chain",null,n,null,0)},e.prototype.visitQuote=function(e){throw new h.BaseException("Caught uninterpreted expression at "+e.location+": "+e.uninterpretedExpression+". "+("Expression prefix "+e.prefix+" did not match a template transformer to interpret the expression."))},e.prototype._visitAll=function(e){for(var t=f.ListWrapper.createFixedSize(e.length),n=0;n<e.length;++n)t[n]=e[n].visit(this);return t},e.prototype._addRecord=function(e,t,n,r,i,o){var s=this._records.length+1;return o instanceof g.DirectiveIndex?this._records.push(new b.ProtoRecord(e,t,n,r,i,-1,o,s,this._bindingRecord,!1,!1,!1,!1,this._bindingIndex)):this._records.push(new b.ProtoRecord(e,t,n,r,i,o,null,s,this._bindingRecord,!1,!1,!1,!1,this._bindingIndex)),s},e}()},function(e,t,n){"use strict";function r(e,t){return new d(e,t)}var i=n(5),o=n(14),s=n(12),a=n(37),c=n(40),u=n(41),p=n(42),l=function(){function e(e){this.wrapped=e}return e.wrap=function(e){var t=h[f++%5];return t.wrapped=e,t},e}();t.WrappedValue=l;var h=[new l(null),new l(null),new l(null),new l(null),new l(null)],f=0,d=function(){function e(e,t){this.previousValue=e,this.currentValue=t}return e.prototype.isFirstChange=function(){return this.previousValue===y.uninitialized},e}();t.SimpleChange=d;var y=function(){function e(){}return e.arrayFn0=function(){return[]},e.arrayFn1=function(e){return[e]},e.arrayFn2=function(e,t){return[e,t]},e.arrayFn3=function(e,t,n){return[e,t,n]},e.arrayFn4=function(e,t,n,r){return[e,t,n,r]},e.arrayFn5=function(e,t,n,r,i){return[e,t,n,r,i]},e.arrayFn6=function(e,t,n,r,i,o){return[e,t,n,r,i,o]},e.arrayFn7=function(e,t,n,r,i,o,s){return[e,t,n,r,i,o,s]},e.arrayFn8=function(e,t,n,r,i,o,s,a){return[e,t,n,r,i,o,s,a]},e.arrayFn9=function(e,t,n,r,i,o,s,a,c){return[e,t,n,r,i,o,s,a,c]},e.operation_negate=function(e){return!e},e.operation_add=function(e,t){return e+t},e.operation_subtract=function(e,t){return e-t},e.operation_multiply=function(e,t){return e*t},e.operation_divide=function(e,t){return e/t},e.operation_remainder=function(e,t){return e%t},e.operation_equals=function(e,t){return e==t},e.operation_not_equals=function(e,t){return e!=t},e.operation_identical=function(e,t){return e===t},e.operation_not_identical=function(e,t){return e!==t},e.operation_less_then=function(e,t){return t>e},e.operation_greater_then=function(e,t){
5
+ 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;r<e.length;++r)s.StringMapWrapper.set(n,e[r],t[r]);return n}switch(e.length){case 0:return function(){return[]};case 1:return function(e){return t([e])};case 2:return function(e,n){return t([e,n])};case 3:return function(e,n,r){return t([e,n,r])};case 4:return function(e,n,r,i){return t([e,n,r,i])};case 5:return function(e,n,r,i,o){return t([e,n,r,i,o])};case 6:return function(e,n,r,i,o,s){return t([e,n,r,i,o,s])};case 7:return function(e,n,r,i,o,s,a){return t([e,n,r,i,o,s,a])};case 8:return function(e,n,r,i,o,s,a,c){return t([e,n,r,i,o,s,a,c])};case 9:return function(e,n,r,i,o,s,a,c,u){return t([e,n,r,i,o,s,a,c,u])};default:throw new o.BaseException("Does not support literal maps with more than 9 elements")}},e.keyedAccess=function(e,t){return e[t[0]]},e.unwrapValue=function(e){return e instanceof l?e.wrapped:e},e.changeDetectionMode=function(e){return a.isDefaultChangeDetectionStrategy(e)?a.ChangeDetectionStrategy.CheckAlways:a.ChangeDetectionStrategy.CheckOnce},e.simpleChange=function(e,t){return r(e,t)},e.isValueBlank=function(e){return i.isBlank(e)},e.s=function(e){return i.isPresent(e)?""+e:""},e.protoByIndex=function(e,t){return 1>t?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.devModeEqual=function(t,n){return s.isListLikeIterable(t)&&s.isListLikeIterable(n)?s.areIterablesEqual(t,n,e.devModeEqual):s.isListLikeIterable(t)||i.isPrimitive(t)||s.isListLikeIterable(n)||i.isPrimitive(n)?i.looseIdentical(t,n):!0},e.uninitialized=i.CONST_EXPR(new Object),e}();t.ChangeDetectionUtil=y},function(e,t){"use strict";function n(e){return e.constructor.prototype.ngOnDestroy}t.implementsOnDestroy=n},function(e,t,n){"use strict";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){"use strict";var r=n(5),i=n(37),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.callOnDestroy,h=t.changeDetection,f=t.outputs;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.callOnDestroy=r.normalizeBool(l),this.changeDetection=h,this.outputs=f}return e.prototype.isDefaultChangeDetection=function(){return i.isDefaultChangeDetectionStrategy(this.changeDetection)},e}();t.DirectiveRecord=s},function(e,t,n){"use strict";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(44),c=n(39),u=n(37),p=n(67),l=n(17),h=n(48),f=function(e){function t(t,n,r,i,o,a,c,u,p){e.call(this,t,n,r,i,o),this._records=a,this._eventBindings=c,this._directiveRecords=u,this._genConfig=p;var l=a.length+1;this.values=s.ListWrapper.createFixedSize(l),this.localPipes=s.ListWrapper.createFixedSize(l),this.prevContexts=s.ListWrapper.createFixedSize(l),this.changes=s.ListWrapper.createFixedSize(l),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<e.records.length;++r){var i=e.records[r];if(i.isSkipRecord())r+=this._computeSkipLength(r,i,n);else{i.lastInBinding&&this._markPathAsCheckOnce(i);var a=this._calculateCurrValue(i,n,t);if(i.lastInBinding)return a;this._writeSelf(i,a,n)}}throw new o.BaseException("Cannot be reached")},t.prototype._computeSkipLength=function(e,t,n){if(t.mode===p.RecordType.SkipRecords)return t.fixedArgs[0]-e-1;if(t.mode===p.RecordType.SkipRecordsIf){var r=this._readContext(t,n);return r?t.fixedArgs[0]-e-1:0}if(t.mode===p.RecordType.SkipRecordsIfNot){var r=this._readContext(t,n);return r?0:t.fixedArgs[0]-e-1}throw new o.BaseException("Cannot be reached")},t.prototype._markPathAsCheckOnce=function(e){if(!e.bindingRecord.isDefaultChangeDetection()){var t=e.bindingRecord.directiveRecord;this._getDetectorFor(t.directiveIndex).markPathToRootAsCheckOnce()}},t.prototype._matchingEventBindings=function(e,t){return this._eventBindings.filter(function(n){return n.eventName==e&&n.elIndex===t})},t.prototype.hydrateDirectives=function(e){var t=this;this.values[0]=this.context,this.dispatcher=e,this.outputSubscriptions=[];for(var n=0;n<this._directiveRecords.length;++n){var r=this._directiveRecords[n];i.isPresent(r.outputs)&&r.outputs.forEach(function(e){var n=t._createEventHandler(r.directiveIndex.elementIndex,e[1]),i=t._getDirectiveFor(r.directiveIndex),o=l.reflector.getter(e[0]);t.outputSubscriptions.push(h.ObservableWrapper.subscribe(o(i),n))})}},t.prototype._createEventHandler=function(e,t){var n=this;return function(r){return n.handleEvent(t,e,r)}},t.prototype.dehydrateDirectives=function(e){e&&(this._destroyPipes(),this._destroyDirectives()),this.values[0]=null,s.ListWrapper.fill(this.values,c.ChangeDetectionUtil.uninitialized,1),s.ListWrapper.fill(this.changes,!1),s.ListWrapper.fill(this.localPipes,null),s.ListWrapper.fill(this.prevContexts,c.ChangeDetectionUtil.uninitialized)},t.prototype._destroyPipes=function(){for(var e=0;e<this.localPipes.length;++e)i.isPresent(this.localPipes[e])&&c.ChangeDetectionUtil.callPipeOnDestroy(this.localPipes[e])},t.prototype._destroyDirectives=function(){for(var e=0;e<this._directiveRecords.length;++e){var t=this._directiveRecords[e];t.callOnDestroy&&this._getDirectiveFor(t.directiveIndex).ngOnDestroy()}},t.prototype.checkNoChanges=function(){this.runDetectChanges(!0)},t.prototype.detectChangesInRecordsInternal=function(e){for(var t=this._records,n=null,r=!1,o=0;o<t.length;++o){var s=t[o],a=s.bindingRecord,c=a.directiveRecord;if(this._firstInBinding(s)&&(this.propertyBindingIndex=s.propertyBindingIndex),s.isLifeCycleRecord())"DoCheck"!==s.name||e?"OnInit"!==s.name||e||this.state!=u.ChangeDetectorState.NeverChecked?"OnChanges"===s.name&&i.isPresent(n)&&!e&&this._getDirectiveFor(c.directiveIndex).ngOnChanges(n):this._getDirectiveFor(c.directiveIndex).ngOnInit():this._getDirectiveFor(c.directiveIndex).ngDoCheck();else if(s.isSkipRecord())o+=this._computeSkipLength(o,s,this.values);else{var p=this._check(s,e,this.values,this.locals);i.isPresent(p)&&(this._updateDirectiveOrElement(p,a),r=!0,n=this._addChange(a,p,n))}s.lastInDirective&&(n=null,r&&!a.isDefaultChangeDetection()&&this._getDetectorFor(c.directiveIndex).markAsCheckOnce(),r=!1)}},t.prototype._firstInBinding=function(e){var t=c.ChangeDetectionUtil.protoByIndex(this._records,e.selfIndex-1);return i.isBlank(t)||t.bindingRecord!==e.bindingRecord},t.prototype.afterContentLifecycleCallbacksInternal=function(){for(var e=this._directiveRecords,t=e.length-1;t>=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.dispatcher.getDirectiveFor(e)},t.prototype._getDetectorFor=function(e){return this.dispatcher.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(e,t,n,r){if(this._pureFuncAndArgsDidNotChange(e))return this._setChanged(e,!1),null;var i=this._calculateCurrValue(e,n,r);if(e.shouldBeChecked()){var o=this._readSelf(e,n),s=t?!c.ChangeDetectionUtil.devModeEqual(o,i):c.ChangeDetectionUtil.looseNotIdentical(o,i);if(s){if(e.lastInBinding){var a=c.ChangeDetectionUtil.simpleChange(o,i);return t&&this.throwOnChangeError(o,i),this._writeSelf(e,i,n),this._setChanged(e,!0),a}return this._writeSelf(e,i,n),this._setChanged(e,!0),null}return this._setChanged(e,!1),null}return this._writeSelf(e,i,n),this._setChanged(e,!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),u=t?!c.ChangeDetectionUtil.devModeEqual(a,s):c.ChangeDetectionUtil.looseNotIdentical(a,s);if(u){if(s=c.ChangeDetectionUtil.unwrapValue(s),e.lastInBinding){var p=c.ChangeDetectionUtil.simpleChange(a,s);return t&&this.throwOnChangeError(a,s),this._writeSelf(e,s,n),this._setChanged(e,!0),p}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;n<t.length;++n)if(this.changes[t[n]])return!0;return!1},t.prototype._argsOrContextChanged=function(e){return this._argsChanged(e)||this.changes[e.contextIndex]},t.prototype._readArgs=function(e,t){for(var n=s.ListWrapper.createFixedSize(e.args.length),r=e.args,i=0;i<r.length;++i)n[i]=t[r[i]];return n},t}(a.AbstractChangeDetector);t.DynamicChangeDetector=f},function(e,t,n){"use strict";var r=n(5),i=n(12),o=n(39),s=n(45),a=n(35),c=n(34),u=n(37),p=n(46),l=n(48),h=p.wtfCreateScope("ChangeDetector#check(ascii id, bool throwOnChange)"),f=function(){function e(e,t,n,r,i,o){this.element=e,this.componentElement=t,this.context=n,this.locals=r,this.injector=i,this.expression=o}return e}(),d=function(){function e(e,t,n,r,i){this.id=e,this.numberOfPropertyProtoRecords=t,this.bindingTargets=n,this.directiveIndices=r,this.strategy=i,this.contentChildren=[],this.viewChildren=[],this.state=u.ChangeDetectorState.NeverChecked,this.locals=null,this.mode=null,this.pipes=null,this.ref=new s.ChangeDetectorRef_(this)}return e.prototype.addContentChild=function(e){this.contentChildren.push(e),e.parent=this},e.prototype.removeContentChild=function(e){i.ListWrapper.remove(this.contentChildren,e)},e.prototype.addViewChild=function(e){this.viewChildren.push(e),e.parent=this},e.prototype.removeViewChild=function(e){i.ListWrapper.remove(this.viewChildren,e)},e.prototype.remove=function(){this.parent.removeContentChild(this)},e.prototype.handleEvent=function(e,t,n){this.hydrated()||this.throwDehydratedError(this.id+" -> "+e);try{var i=new Map;i.set("$event",n);var o=!this.handleEventInternal(e,t,new c.Locals(this.locals,i));return this.markPathToRootAsCheckOnce(),o}catch(s){var u=this.dispatcher.getDebugContext(null,t,null),p=r.isPresent(u)?new a.EventEvaluationErrorContext(u.element,u.componentElement,u.context,u.locals,u.injector):null;throw new a.EventEvaluationError(e,s,s.stack,p)}},e.prototype.handleEventInternal=function(e,t,n){return!1},e.prototype.detectChanges=function(){this.runDetectChanges(!1)},e.prototype.checkNoChanges=function(){r.assertionsEnabled()&&this.runDetectChanges(!0)},e.prototype.runDetectChanges=function(e){if(this.mode!==u.ChangeDetectionStrategy.Detached&&this.mode!==u.ChangeDetectionStrategy.Checked&&this.state!==u.ChangeDetectorState.Errored){var t=h(this.id,e);this.detectChangesInRecords(e),this._detectChangesContentChildren(e),e||this.afterContentLifecycleCallbacks(),this._detectChangesInViewChildren(e),e||this.afterViewLifecycleCallbacks(),this.mode===u.ChangeDetectionStrategy.CheckOnce&&(this.mode=u.ChangeDetectionStrategy.Checked),this.state=u.ChangeDetectorState.CheckedBefore,p.wtfLeave(t)}},e.prototype.detectChangesInRecords=function(e){this.hydrated()||this.throwDehydratedError(this.id);try{this.detectChangesInRecordsInternal(e)}catch(t){t instanceof a.ExpressionChangedAfterItHasBeenCheckedException||(this.state=u.ChangeDetectorState.Errored),this._throwError(t,t.stack)}},e.prototype.detectChangesInRecordsInternal=function(e){},e.prototype.hydrate=function(e,t,n,r){this.dispatcher=n,this.mode=o.ChangeDetectionUtil.changeDetectionMode(this.strategy),this.context=e,this.locals=t,this.pipes=r,this.hydrateDirectives(n),this.state=u.ChangeDetectorState.NeverChecked},e.prototype.hydrateDirectives=function(e){},e.prototype.dehydrate=function(){this.dehydrateDirectives(!0),this._unsubscribeFromOutputs(),this.dispatcher=null,this.context=null,this.locals=null,this.pipes=null},e.prototype.dehydrateDirectives=function(e){},e.prototype.hydrated=function(){return r.isPresent(this.context)},e.prototype.destroyRecursive=function(){this.dispatcher.notifyOnDestroy(),this.dehydrate();for(var e=this.contentChildren,t=0;t<e.length;t++)e[t].destroyRecursive();e=this.viewChildren;for(var t=0;t<e.length;t++)e[t].destroyRecursive()},e.prototype.afterContentLifecycleCallbacks=function(){this.dispatcher.notifyAfterContentChecked(),this.afterContentLifecycleCallbacksInternal()},e.prototype.afterContentLifecycleCallbacksInternal=function(){},e.prototype.afterViewLifecycleCallbacks=function(){this.dispatcher.notifyAfterViewChecked(),this.afterViewLifecycleCallbacksInternal()},e.prototype.afterViewLifecycleCallbacksInternal=function(){},e.prototype._detectChangesContentChildren=function(e){for(var t=this.contentChildren,n=0;n<t.length;++n)t[n].runDetectChanges(e)},e.prototype._detectChangesInViewChildren=function(e){for(var t=this.viewChildren,n=0;n<t.length;++n)t[n].runDetectChanges(e)},e.prototype.markAsCheckOnce=function(){this.mode=u.ChangeDetectionStrategy.CheckOnce},e.prototype.markPathToRootAsCheckOnce=function(){for(var e=this;r.isPresent(e)&&e.mode!==u.ChangeDetectionStrategy.Detached;)e.mode===u.ChangeDetectionStrategy.Checked&&(e.mode=u.ChangeDetectionStrategy.CheckOnce),e=e.parent},e.prototype._unsubscribeFromOutputs=function(){if(r.isPresent(this.outputSubscriptions))for(var e=0;e<this.outputSubscriptions.length;++e)l.ObservableWrapper.dispose(this.outputSubscriptions[e]),this.outputSubscriptions[e]=null},e.prototype.getDirectiveFor=function(e,t){return e.getDirectiveFor(this.directiveIndices[t])},e.prototype.getDetectorFor=function(e,t){return e.getDetectorFor(this.directiveIndices[t])},e.prototype.notifyDispatcher=function(e){this.dispatcher.notifyOnBinding(this._currentBinding(),e)},e.prototype.logBindingUpdate=function(e){this.dispatcher.logBindingUpdate(this._currentBinding(),e)},e.prototype.addChange=function(e,t,n){return r.isBlank(e)&&(e={}),e[this._currentBinding().name]=o.ChangeDetectionUtil.simpleChange(t,n),e},e.prototype._throwError=function(e,t){var n;try{var i=this.dispatcher.getDebugContext(null,this._currentBinding().elementIndex,null),o=r.isPresent(i)?new f(i.element,i.componentElement,i.context,i.locals,i.injector,this._currentBinding().debug):null;n=new a.ChangeDetectionError(this._currentBinding().debug,e,t,o)}catch(s){n=new a.ChangeDetectionError(null,e,t,null)}throw n},e.prototype.throwOnChangeError=function(e,t){throw new a.ExpressionChangedAfterItHasBeenCheckedException(this._currentBinding().debug,e,t,null)},e.prototype.throwDehydratedError=function(e){throw new a.DehydratedException(e)},e.prototype._currentBinding=function(){return this.bindingTargets[this.propertyBindingIndex]},e}();t.AbstractChangeDetector=d},function(e,t,n){"use strict";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(37),o=function(){function e(){}return e}();t.ChangeDetectorRef=o;var s=function(e){function t(t){e.call(this),this._cd=t}return r(t,e),t.prototype.markForCheck=function(){this._cd.markPathToRootAsCheckOnce()},t.prototype.detach=function(){this._cd.mode=i.ChangeDetectionStrategy.Detached},t.prototype.detectChanges=function(){this._cd.detectChanges()},t.prototype.checkNoChanges=function(){this._cd.checkNoChanges()},t.prototype.reattach=function(){this._cd.mode=i.ChangeDetectionStrategy.CheckAlways,this.markForCheck()},t}(o);t.ChangeDetectorRef_=s},function(e,t,n){"use strict";function r(e,t){return null}var i=n(47);t.wtfEnabled=i.detectWTF(),t.wtfCreateScope=t.wtfEnabled?i.createScope:function(e,t){return r},t.wtfLeave=t.wtfEnabled?i.leave:function(e,t){return t},t.wtfStartTimeRange=t.wtfEnabled?i.startTimeRange:function(e,t){return null},t.wtfEndTimeRange=t.wtfEnabled?i.endTimeRange:function(e){return null}},function(e,t,n){"use strict";function r(){var e=p.global.wtf;return e&&(c=e.trace)?(u=c.events,!0):!1}function i(e,t){return void 0===t&&(t=null),u.createScope(e,t)}function o(e,t){return c.leaveScope(e,t),t}function s(e,t){return c.beginTimeRange(e,t)}function a(e){c.endTimeRange(e)}var c,u,p=n(5);t.detectWTF=r,t.createScope=i,t.leave=o,t.startTimeRange=s,t.endTimeRange=a},function(e,t,n){"use strict";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(49);t.PromiseWrapper=o.PromiseWrapper,t.PromiseCompleter=o.PromiseCompleter;var s=n(50),a=n(51),c=n(66),u=n(50);t.Observable=u.Observable;var p=n(50);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){"use strict";var n=function(){function e(){var e=this;this.promise=new Promise(function(t,n){e.resolve=t,e.reject=n})}return e}();t.PromiseCompleter=n;var r=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(){return new n},e}();t.PromiseWrapper=r},function(t,n){t.exports=e},function(e,t,n){"use strict";function r(e){var t=e.value,n=e.subscriber;n.isUnsubscribed||(n.next(t),n.complete())}function i(e){var t=e.err,n=e.subscriber;n.isUnsubscribed||n.error(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=n(52),a=n(54),c=function(e){function t(t,n){void 0===n&&(n=null),e.call(this),this.promise=t,this.scheduler=n}return o(t,e),t.create=function(e,n){return void 0===n&&(n=null),new t(e,n)},t.prototype._subscribe=function(e){var t=this,n=this.promise,o=this.scheduler;if(null==o)this._isScalar?e.isUnsubscribed||(e.next(this.value),e.complete()):n.then(function(n){t.value=n,t._isScalar=!0,e.isUnsubscribed||(e.next(n),e.complete())},function(t){e.isUnsubscribed||e.error(t)}).then(null,function(e){s.root.setTimeout(function(){throw e})});else if(this._isScalar){if(!e.isUnsubscribed)return o.schedule(r,0,{value:this.value,subscriber:e})}else n.then(function(n){t.value=n,t._isScalar=!0,e.isUnsubscribed||e.add(o.schedule(r,0,{value:n,subscriber:e}))},function(t){e.isUnsubscribed||e.add(o.schedule(i,0,{err:t,subscriber:e}))}).then(null,function(e){s.root.setTimeout(function(){throw e})})},t}(a.Observable);t.PromiseObservable=c},function(e,t,n){(function(e,n){"use strict";var r={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1};t.root=r[typeof self]&&self||r[typeof window]&&window;var i=(r[typeof t]&&t&&!t.nodeType&&t,r[typeof e]&&e&&!e.nodeType&&e,r[typeof n]&&n);!i||i.global!==i&&i.window!==i||(t.root=i)}).call(t,n(53)(e),function(){return this}())},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children=[],e.webpackPolyfill=1),e}},function(e,t,n){"use strict";var r=n(52),i=n(55),o=n(56),s=n(62),a=n(63),c=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this.operator,i=o.toSubscriber(e,t,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},e.prototype.forEach=function(e,t,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(e).call(t,n);i===a.errorObject&&r(a.errorObject.e)},r,n)})},e.prototype._subscribe=function(e){return this.source.subscribe(e)},e.prototype[i.SymbolShim.observable]=function(){return this},e.create=function(t){return new e(t)},e}();t.Observable=c},function(e,t,n){"use strict";function r(e){var t=o(e);return a(t,e),c(t),i(t),t}function i(e){e["for"]||(e["for"]=s)}function o(e){return e.Symbol||(e.Symbol=function(e){return"@@Symbol("+e+"):"+p++}),e.Symbol}function s(e){return"@@"+e}function a(e,t){if(!e.iterator)if("function"==typeof e["for"])e.iterator=e["for"]("iterator");else if(t.Set&&"function"==typeof(new t.Set)["@@iterator"])e.iterator="@@iterator";else if(t.Map)for(var n=Object.getOwnPropertyNames(t.Map.prototype),r=0;r<n.length;++r){var i=n[r];if("entries"!==i&&"size"!==i&&t.Map.prototype[i]===t.Map.prototype.entries){e.iterator=i;break}}else e.iterator="@@iterator"}function c(e){e.observable||("function"==typeof e["for"]?e.observable=e["for"]("observable"):e.observable="@@observable")}var u=n(52);t.polyfillSymbol=r,t.ensureFor=i;var p=0;t.ensureSymbol=o,t.symbolForPolyfill=s,t.ensureIterator=a,t.ensureObservable=c,t.SymbolShim=r(u.root)},function(e,t,n){"use strict";function r(e,t,n){if(e&&"object"==typeof e){if(e instanceof i.Subscriber)return e;if("function"==typeof e[o.rxSubscriber])return e[o.rxSubscriber]()}return new i.Subscriber(e,t,n)}var i=n(57),o=n(64);t.toSubscriber=r},function(e,t,n){"use strict";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(58),o=n(59),s=n(64),a=n(65),c=function(e){function t(n,r,i){switch(e.call(this),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a.empty;break;case 1:if(!n){this.destination=a.empty;break}if("object"==typeof n){n instanceof t?this.destination=n:(this.syncErrorThrowable=!0,this.destination=new u(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new u(this,n,r,i)}}return r(t,e),t.create=function(e,n,r){var i=new t(e,n,r);return i.syncErrorThrowable=!1,i},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.isUnsubscribed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype[s.rxSubscriber]=function(){return this},t}(o.Subscription);t.Subscriber=c;var u=function(e){function t(t,n,r,o){e.call(this),this._parent=t;var s,a=this;i.isFunction(n)?s=n:n&&(a=n,s=n.next,r=n.error,o=n.complete),this._context=a,this._next=s,this._error=r,this._complete=o}return r(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parent;t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e);
6
+ }},t.prototype.error=function(e){if(!this.isStopped){var t=this._parent;if(this._error)t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else{if(!t.syncErrorThrowable)throw this.unsubscribe(),e;t.syncErrorValue=e,t.syncErrorThrown=!0,this.unsubscribe()}}},t.prototype.complete=function(){if(!this.isStopped){var e=this._parent;this._complete?e.syncErrorThrowable?(this.__tryOrSetError(e,this._complete),this.unsubscribe()):(this.__tryOrUnsub(this._complete),this.unsubscribe()):this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(n){throw this.unsubscribe(),n}},t.prototype.__tryOrSetError=function(e,t,n){try{t.call(this._context,n)}catch(r){return e.syncErrorValue=r,e.syncErrorThrown=!0,!0}return!1},t.prototype._unsubscribe=function(){var e=this._parent;this._context=null,this._parent=null,e.unsubscribe()},t}(c)},function(e,t){"use strict";function n(e){return"function"==typeof e}t.isFunction=n},function(e,t,n){"use strict";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(60),o=n(61),s=n(58),a=n(62),c=n(63),u=function(){function e(e){this.isUnsubscribed=!1,e&&(this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var e,t=!1;if(!this.isUnsubscribed){this.isUnsubscribed=!0;var n=this,r=n._unsubscribe,u=n._subscriptions;if(this._subscriptions=null,s.isFunction(r)){var l=a.tryCatch(r).call(this);l===c.errorObject&&(t=!0,(e=e||[]).push(c.errorObject.e))}if(i.isArray(u))for(var h=-1,f=u.length;++h<f;){var d=u[h];if(o.isObject(d)){var l=a.tryCatch(d.unsubscribe).call(d);if(l===c.errorObject){t=!0,e=e||[];var y=c.errorObject.e;y instanceof p?e=e.concat(y.errors):e.push(y)}}}if(t)throw new p(e)}},e.prototype.add=function(t){if(t&&t!==this&&t!==e.EMPTY){var n=t;switch(typeof t){case"function":n=new e(t);case"object":if(n.isUnsubscribed||"function"!=typeof n.unsubscribe)break;this.isUnsubscribed?n.unsubscribe():(this._subscriptions||(this._subscriptions=[])).push(n);break;default:throw new Error("Unrecognized subscription "+t+" added to Subscription.")}}},e.prototype.remove=function(t){if(null!=t&&t!==this&&t!==e.EMPTY){var n=this._subscriptions;if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}}},e.EMPTY=function(e){return e.isUnsubscribed=!0,e}(new e),e}();t.Subscription=u;var p=function(e){function t(t){e.call(this,"unsubscriptoin error(s)"),this.errors=t,this.name="UnsubscriptionError"}return r(t,e),t}(Error);t.UnsubscriptionError=p},function(e,t){"use strict";t.isArray=Array.isArray||function(e){return e&&"number"==typeof e.length}},function(e,t){"use strict";function n(e){return null!=e&&"object"==typeof e}t.isObject=n},function(e,t,n){"use strict";function r(){try{return o.apply(this,arguments)}catch(e){return s.errorObject.e=e,s.errorObject}}function i(e){return o=e,r}var o,s=n(63);t.tryCatch=i},function(e,t){"use strict";t.errorObject={e:{}}},function(e,t,n){"use strict";var r=n(55);t.rxSubscriber=r.SymbolShim["for"]("rxSubscriber")},function(e,t){"use strict";t.empty={isUnsubscribed:!0,next:function(e){},error:function(e){throw e},complete:function(){}}},function(e,n){e.exports=t},function(e,t){"use strict";!function(e){e[e.Self=0]="Self",e[e.Const=1]="Const",e[e.PrimitiveOp=2]="PrimitiveOp",e[e.PropertyRead=3]="PropertyRead",e[e.PropertyWrite=4]="PropertyWrite",e[e.Local=5]="Local",e[e.InvokeMethod=6]="InvokeMethod",e[e.InvokeClosure=7]="InvokeClosure",e[e.KeyedRead=8]="KeyedRead",e[e.KeyedWrite=9]="KeyedWrite",e[e.Pipe=10]="Pipe",e[e.Interpolate=11]="Interpolate",e[e.SafeProperty=12]="SafeProperty",e[e.CollectionLiteral=13]="CollectionLiteral",e[e.SafeMethodInvoke=14]="SafeMethodInvoke",e[e.DirectiveLifecycle=15]="DirectiveLifecycle",e[e.Chain=16]="Chain",e[e.SkipRecordsIf=17]="SkipRecordsIf",e[e.SkipRecordsIfNot=18]="SkipRecordsIfNot",e[e.SkipRecords=19]="SkipRecords"}(t.RecordType||(t.RecordType={}));var n=t.RecordType,r=function(){function e(e,t,n,r,i,o,s,a,c,u,p,l,h,f){this.mode=e,this.name=t,this.funcOrValue=n,this.args=r,this.fixedArgs=i,this.contextIndex=o,this.directiveIndex=s,this.selfIndex=a,this.bindingRecord=c,this.lastInBinding=u,this.lastInDirective=p,this.argumentToPureFunction=l,this.referencedBySelf=h,this.propertyBindingIndex=f}return e.prototype.isPureFunction=function(){return this.mode===n.Interpolate||this.mode===n.CollectionLiteral},e.prototype.isUsedByOtherRecord=function(){return!this.lastInBinding||this.referencedBySelf},e.prototype.shouldBeChecked=function(){return this.argumentToPureFunction||this.lastInBinding||this.isPureFunction()||this.isPipeRecord()},e.prototype.isPipeRecord=function(){return this.mode===n.Pipe},e.prototype.isConditionalSkipRecord=function(){return this.mode===n.SkipRecordsIfNot||this.mode===n.SkipRecordsIf},e.prototype.isUnconditionalSkipRecord=function(){return this.mode===n.SkipRecords},e.prototype.isSkipRecord=function(){return this.isConditionalSkipRecord()||this.isUnconditionalSkipRecord()},e.prototype.isLifeCycleRecord=function(){return this.mode===n.DirectiveLifecycle},e}();t.ProtoRecord=r},function(e,t){"use strict";var n=function(){function e(e,t,n,r){this.eventName=e,this.elIndex=t,this.dirIndex=n,this.records=r}return e}();t.EventBinding=n},function(e,t,n){"use strict";function r(e){for(var t=[],n=[],r=new h.Map,s=0,c=h.ListWrapper.createFixedSize(e.length),u=0;u<e.length;u++){var p=c[u];l.isPresent(p)&&(s--,p.fixedArgs[0]=t.length);var f=e[u],d=a(f,t,r);if(d.isSkipRecord())t.push(d),s++,c[d.fixedArgs[0]]=d;else{var y=o(d,t,n,s>0);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;i<e.length;i++){var o=n[i];l.isPresent(o)&&(o.fixedArgs[0]=t.length);var s=e[i];if(s.isSkipRecord()){if(s.isConditionalSkipRecord()&&s.fixedArgs[0]===i+2&&i<e.length-1&&e[i+1].mode===f.RecordType.SkipRecords&&(s.mode=s.mode===f.RecordType.SkipRecordsIf?f.RecordType.SkipRecordsIfNot:f.RecordType.SkipRecordsIf,s.fixedArgs[0]=e[i+1].fixedArgs[0],i++),s.fixedArgs[0]>i+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(67);t.coalesce=r},function(e,t,n){"use strict";var r=n(71),i=function(){function e(e){this.definition=e,this._factory=this._createFactory(e)}return e.isSupported=function(){return!0},e.prototype.instantiate=function(){return this._factory()},e.prototype._createFactory=function(e){return new r.ChangeDetectorJITGenerator(e,"util","AbstractChangeDetector","ChangeDetectorStatus").generate()},e}();t.JitProtoChangeDetector=i},function(e,t,n){"use strict";var r=n(5),i=n(14),o=n(12),s=n(44),a=n(39),c=n(67),u=n(72),p=n(73),l=n(74),h=n(37),f=n(38),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.typeName=u.sanitizeName("ChangeDetector_"+this.id)}return e.prototype.generate=function(){var e="\n "+this.generateSource()+"\n return function() {\n return new "+this.typeName+"();\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+"() {\n "+this.abstractChangeDetectorVarName+".call(\n this, "+JSON.stringify(this.id)+", "+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 r+"\n"+n+"\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(),t=this._logic.genDirectivesOnDestroy(this.directiveRecords),n=this._names.genDehydrateFields();return e||t||n?this.typeName+".prototype.dehydrateDirectives = function(destroyPipes) {\n if (destroyPipes) {\n "+e+"\n "+t+"\n }\n "+n+"\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;n<e.length;n++){var r=void 0,i=e[n];r=i.isLifeCycleRecord()?this._genDirectiveLifecycle(i):i.isPipeRecord()?this._genPipeCheck(i):i.isConditionalSkipRecord()?this._genConditionalSkip(i,this._names.getLocalName(i.contextIndex)):i.isUnconditionalSkipRecord()?this._genUnconditionalSkip(i):this._genReferenceCheck(i),r="\n "+this._maybeFirstInBinding(i)+"\n "+r+"\n "+this._maybeGenLastInDirective(i)+"\n "+this._genEndOfSkipBlock(n)+"\n ",t.push(r)}return t.join("\n")},e.prototype._genConditionalSkip=function(e,t){var n=e.mode===c.RecordType.SkipRecordsIf?"!":"";return this._endOfBlockIdxs.push(e.fixedArgs[0]-1),"if ("+n+t+") {"},e.prototype._genUnconditionalSkip=function(e){return this._endOfBlockIdxs.pop(),this._endOfBlockIdxs.push(e.fixedArgs[0]-1),"} else {"},e.prototype._genEndOfSkipBlock=function(e){if(!o.ListWrapper.isEmpty(this._endOfBlockIdxs)){var t=o.ListWrapper.last(this._endOfBlockIdxs);if(e===t)return this._endOfBlockIdxs.pop(),"}"}return""},e.prototype._genDirectiveLifecycle=function(e){if("DoCheck"===e.name)return this._genOnCheck(e);if("OnInit"===e.name)return this._genOnInit(e);if("OnChanges"===e.name)return this._genOnChange(e);throw new i.BaseException("Unknown lifecycle event '"+e.name+"'")},e.prototype._genPipeCheck=function(e){var t=this,n=this._names.getLocalName(e.contextIndex),r=e.args.map(function(e){return t._names.getLocalName(e)}).join(", "),i=this._names.getFieldName(e.selfIndex),o=this._names.getLocalName(e.selfIndex),s=this._names.getPipeName(e.selfIndex),a=e.name,c="\n if ("+s+" === "+this.changeDetectionUtilVarName+".uninitialized) {\n "+s+" = "+this._names.getPipesAccessorName()+".get('"+a+"');\n }\n ",u=o+" = "+s+".pipe.transform("+n+", ["+r+"]);",p=e.args.map(function(e){return t._names.getChangeName(e)});p.push(this._names.getChangeName(e.contextIndex));var l="!"+s+".pure || ("+p.join(" || ")+")",h="\n "+this._genThrowOnChangeCheck(i,o)+"\n if ("+this.changeDetectionUtilVarName+".looseNotIdentical("+i+", "+o+")) {\n "+o+" = "+this.changeDetectionUtilVarName+".unwrapValue("+o+")\n "+this._genChangeMarker(e)+"\n "+this._genUpdateDirectiveOrElement(e)+"\n "+this._genAddToChanges(e)+"\n "+i+" = "+o+";\n }\n ",f=e.shouldBeChecked()?""+u+h:u;return e.isUsedByOtherRecord()?c+" if ("+l+") { "+f+" } else { "+o+" = "+i+"; }":c+" if ("+l+") { "+f+" }"},e.prototype._genReferenceCheck=function(e){var t=this,n=this._names.getFieldName(e.selfIndex),r=this._names.getLocalName(e.selfIndex),i="\n "+this._logic.genPropertyBindingEvalValue(e)+"\n ",o="\n "+this._genThrowOnChangeCheck(n,r)+"\n if ("+this.changeDetectionUtilVarName+".looseNotIdentical("+n+", "+r+")) {\n "+this._genChangeMarker(e)+"\n "+this._genUpdateDirectiveOrElement(e)+"\n "+this._genAddToChanges(e)+"\n "+n+" = "+r+";\n }\n ",s=e.shouldBeChecked()?""+i+o:i;if(e.isPureFunction()){var a=e.args.map(function(e){return t._names.getChangeName(e)}).join(" || ");return e.isUsedByOtherRecord()?"if ("+a+") { "+s+" } else { "+r+" = "+n+"; }":"if ("+a+") { "+s+" }"}return s},e.prototype._genChangeMarker=function(e){return e.argumentToPureFunction?this._names.getChangeName(e.selfIndex)+" = true":""},e.prototype._genUpdateDirectiveOrElement=function(e){if(!e.lastInBinding)return"";var t=this._names.getLocalName(e.selfIndex),n=this.genConfig.logBindingUpdate?"this.logBindingUpdate("+t+");":"",r=e.bindingRecord;if(r.target.isDirective()){var i=this._names.getDirectiveName(r.directiveRecord.directiveIndex)+"."+r.target.name;return"\n "+i+" = "+t+";\n "+n+"\n "+d+" = true;\n "}return"\n this.notifyDispatcher("+t+");\n "+n+"\n "},e.prototype._genThrowOnChangeCheck=function(e,t){return r.assertionsEnabled()?"\n if (throwOnChange && !"+this.changeDetectionUtilVarName+".devModeEqual("+e+", "+t+")) {\n this.throwOnChangeError("+e+", "+t+");\n }\n ":""},e.prototype._genAddToChanges=function(e){var t=this._names.getLocalName(e.selfIndex),n=this._names.getFieldName(e.selfIndex);return e.bindingRecord.callOnChanges()?y+" = this.addChange("+y+", "+n+", "+t+");":""},e.prototype._maybeFirstInBinding=function(e){var t=a.ChangeDetectionUtil.protoByIndex(this.records,e.selfIndex-1),n=r.isBlank(t)||t.bindingRecord!==e.bindingRecord;return n&&!e.bindingRecord.isDirectiveLifecycle()?this._names.getPropertyBindingIndex()+" = "+e.propertyBindingIndex+";":""},e.prototype._maybeGenLastInDirective=function(e){return e.lastInDirective?"\n "+y+" = null;\n "+this._genNotifyOnPushDetectors(e)+"\n "+d+" = false;\n ":""},e.prototype._genOnCheck=function(e){var t=e.bindingRecord;return"if (!throwOnChange) "+this._names.getDirectiveName(t.directiveRecord.directiveIndex)+".ngDoCheck();"},e.prototype._genOnInit=function(e){var t=e.bindingRecord;return"if (!throwOnChange && "+this._names.getStateName()+" === "+this.changeDetectorStateVarName+".NeverChecked) "+this._names.getDirectiveName(t.directiveRecord.directiveIndex)+".ngOnInit();"},e.prototype._genOnChange=function(e){var t=e.bindingRecord;return"if (!throwOnChange && "+y+") "+this._names.getDirectiveName(t.directiveRecord.directiveIndex)+".ngOnChanges("+y+");"},e.prototype._genNotifyOnPushDetectors=function(e){var t=e.bindingRecord;if(!e.lastInDirective||t.isDefaultChangeDetection())return"";var n="\n if("+d+") {\n "+this._names.getDetectorName(t.directiveRecord.directiveIndex)+".markAsCheckOnce();\n }\n ";return n},e}();t.ChangeDetectorJITGenerator=v},function(e,t,n){"use strict";function r(e){return i.StringWrapper.replaceAll(e,y,"")}var i=n(5),o=n(12),s="state",a="propertyBindingIndex",c="directiveIndices",u="dispatcher",p="locals",l="mode",h="pipes",f="protos";t.CONTEXT_ACCESSOR="context",t.CONTEXT_INDEX=0;var d="this.",y=/\W/g;t.sanitizeName=r;var v=function(){function e(e,n,i,s){this._records=e,this._eventBindings=n,this._directiveRecords=i,this._utilName=s,this._sanitizedEventNames=new o.Map,this._sanitizedNames=o.ListWrapper.createFixedSize(this._records.length+1),this._sanitizedNames[t.CONTEXT_INDEX]=t.CONTEXT_ACCESSOR;for(var a=0,c=this._records.length;c>a;++a)this._sanitizedNames[a+1]=r(""+this._records[a].name+a);for(var u=0;u<n.length;++u){for(var p=n[u],l=[t.CONTEXT_ACCESSOR],a=0,c=p.records.length;c>a;++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;o<r.length;++o)o!==t.CONTEXT_INDEX&&n.push(""+e.getEventLocalName(i,o))}),n.length>1?"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){"use strict";var r=n(5),i=n(74),o=n(67),s=n(14),a=function(){function e(e,t,n){this._names=e,this._utilName=t,this._changeDetectorStateName=n}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,a=-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=a;break;case o.RecordType.Const:r=i.codify(e.funcOrValue);break;case o.RecordType.PropertyRead:r=a+"."+e.name;break;case o.RecordType.SafeProperty:var u=a+"."+e.name;r=this._utilName+".isValueBlank("+a+") ? null : "+u;break;case o.RecordType.PropertyWrite:r=a+"."+e.name+" = "+t(e.args[0]);break;case o.RecordType.Local:r=n+".get("+i.rawString(e.name)+")";break;case o.RecordType.InvokeMethod:r=a+"."+e.name+"("+c+")";break;case o.RecordType.SafeMethodInvoke:var p=a+"."+e.name+"("+c+")";r=this._utilName+".isValueBlank("+a+") ? null : "+p;break;case o.RecordType.InvokeClosure:r=a+"("+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=a+"["+t(e.args[0])+"]";break;case o.RecordType.KeyedWrite:r=a+"["+t(e.args[0])+"] = "+t(e.args[1]);break;case o.RecordType.Chain:r=""+t(e.args[e.args.length-1]);break;default:throw new s.BaseException("Unknown operation "+e.mode)}return t(e.selfIndex)+" = "+r+";"},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<e.args.length;++n)t.push(i.codify(e.fixedArgs[n])),t.push(this._utilName+".s("+this._names.getLocalName(e.args[n])+")");return t.push(i.codify(e.fixedArgs[e.args.length])),i.combineGeneratedStrings(t)},e.prototype.genHydrateDirectives=function(e){for(var t=this,n=[],i=0,o=0;o<e.length;++o){var s=e[o],a=this._names.getDirectiveName(s.directiveIndex);n.push(a+" = "+this._genReadDirective(o)+";"),r.isPresent(s.outputs)&&s.outputs.forEach(function(e){var o=t._genEventHandler(s.directiveIndex.elementIndex,e[1]),c="this.outputSubscriptions["+i++ +"] = "+a+"."+e[0];r.IS_DART?n.push(c+".listen("+o+");"):n.push(c+".subscribe({next: "+o+"});")})}if(i>0){var c="this.outputSubscriptions";r.IS_DART?n.unshift(c+" = new List("+i+");"):n.unshift(c+" = new Array("+i+");")}return n.join("\n")},e.prototype.genDirectivesOnDestroy=function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n];if(r.callOnDestroy){var i=this._names.getDirectiveName(r.directiveIndex);t.push(i+".ngOnDestroy();")}}return t.join("\n")},e.prototype._genEventHandler=function(e,t){return r.IS_DART?"(event) => this.handleEvent('"+t+"', "+e+", event)":"(function(event) { return this.handleEvent('"+t+"', "+e+", event); }).bind(this)"},e.prototype._genReadDirective=function(e){return"this.getDirectiveFor(directives, "+e+")"},e.prototype.genHydrateDetectors=function(e){for(var t=[],n=0;n<e.length;++n){var r=e[n];r.isDefaultChangeDetection()||t.push(this._names.getDetectorName(r.directiveIndex)+" = this.getDetectorFor(directives, "+n+");")}return t.join("\n")},e.prototype.genContentLifecycleCallbacks=function(e){for(var t=[],n=r.IS_DART?"==":"===",i=e.length-1;i>=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=a},function(e,t){"use strict";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){"use strict";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){"use strict";var r=n(9);t.Class=r.Class},function(e,t,n){"use strict";var r=n(5);t.enableProdMode=r.enableProdMode},function(e,t,n){"use strict";var r=n(5);t.Type=r.Type;var i=n(48);t.EventEmitter=i.EventEmitter;var o=n(14);t.WrappedException=o.WrappedException;var s=n(16);t.ExceptionHandler=s.ExceptionHandler},function(e,t,n){"use strict";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){i=e;var t=r.getOptional(g.Testability);return h.isPresent(t)&&r.get(g.TestabilityRegistry).registerApplication(e.location.nativeElement,t),e})},deps:[m.DynamicComponentLoader,S,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(C.lockMode(),h.isPresent(w)){if(v.ListWrapper.equals(R,e))return w;throw new _.BaseException("platform cannot be initialized with different sets of providers.")}return a(e)}function s(){h.isPresent(w)&&(w.dispose(),w=null)}function a(e){R=e;var t=f.Injector.resolveAndCreate(e);return w=new O(t,function(){w=null,R=null}),c(t),w}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),n=[];return h.isPresent(t)&&t.forEach(function(e){var t=e();y.PromiseWrapper.isPromise(t)&&n.push(t)}),n.length>0?y.PromiseWrapper.all(n):null}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(80),h=n(5),f=n(6),d=n(82),y=n(48),v=n(12),g=n(83),m=n(84),_=n(14),b=n(100),P=n(46),C=n(5);t.createNgZone=i;var w,R;t.platform=o,t.disposePlatform=s;var E=function(){function e(){}return Object.defineProperty(e.prototype,"injector",{get:function(){throw _.unimplemented()},enumerable:!0,configurable:!0}),e}();t.PlatformRef=E;var O=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
7
+ }),t.prototype.application=function(e){var t=this._initApp(i(),e);if(y.PromiseWrapper.isPromise(t))throw new _.BaseException("Cannot use asyncronous app initializers with application. Use asyncApplication instead.");return t},t.prototype.asyncApplication=function(e,t){var n=this,r=i(),o=y.PromiseWrapper.completer();return null===e?o.resolve(this._initApp(r,t)):r.run(function(){y.PromiseWrapper.then(e(r),function(e){h.isPresent(t)&&(e=v.ListWrapper.concat(e,t));var i=n._initApp(r,e);o.resolve(i)})}),o.promise},t.prototype._initApp=function(e,t){var n,r,i=this;e.run(function(){t=v.ListWrapper.concat(t,[f.provide(l.NgZone,{useValue:e}),f.provide(S,{useFactory:function(){return r},deps:[]})]);var o;try{n=i.injector.resolveAndCreateChild(t),o=n.get(_.ExceptionHandler),y.ObservableWrapper.subscribe(e.onError,function(e){o.call(e.error,e.stackTrace)})}catch(s){h.isPresent(o)?o.call(s,s.stack):h.print(s.toString())}}),r=new A(this,e,n),this._applications.push(r);var o=u(n);return null!==o?y.PromiseWrapper.then(o,function(e){return r}):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}(E);t.PlatformRef_=O;var S=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=S;var A=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.onMicrotaskEmpty,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);y.PromiseWrapper.then(p,null,function(e,t){i.reject(e,t),s.call(e,t)})}catch(l){s.call(l,l.stack),i.reject(l,l.stack)}}),i.promise.then(function(e){var t=n._injector.get(b.Console);return h.assertionsEnabled()&&t.log("Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode."),e})},t.prototype._loadComponent=function(e){var t=e.location.internalElement.parentView.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(e.location.internalElement.parentView.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}(S);t.ApplicationRef_=A},function(e,t,n){"use strict";var r=n(48),i=n(81),o=n(14),s=n(81);t.NgZoneError=s.NgZoneError;var a=function(){function e(e){var t=this,n=e.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(){t._nesting++,t._isStable&&(t._isStable=!1,t._onUnstable.emit(null))},onLeave:function(){t._nesting--,t._checkStable()},setMicrotask:function(e){t._hasPendingMicrotasks=e,t._checkStable()},setMacrotask:function(e){t._hasPendingMacrotasks=e},onError:function(e){return t._onErrorEvents.emit(e)}})}return e.isInAngularZone=function(){return i.NgZoneImpl.isInAngularZone()},e.assertInAngularZone=function(){if(!i.NgZoneImpl.isInAngularZone())throw new o.BaseException("Expected to be in Angular Zone, but it is not!")},e.assertNotInAngularZone=function(){if(i.NgZoneImpl.isInAngularZone())throw new o.BaseException("Expected to not be in Angular Zone, but it is!")},e.prototype._checkStable=function(){var e=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 e._onStable.emit(null)})}finally{this._isStable=!0}}},Object.defineProperty(e.prototype,"onUnstable",{get:function(){return this._onUnstable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onMicrotaskEmpty",{get:function(){return this._onMicrotaskEmpty},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onStable",{get:function(){return this._onStable},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"onError",{get:function(){return this._onErrorEvents},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingMicrotasks",{get:function(){return this._hasPendingMicrotasks},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hasPendingMacrotasks",{get:function(){return this._hasPendingMacrotasks},enumerable:!0,configurable:!0}),e.prototype.run=function(e){return this._zoneImpl.runInner(e)},e.prototype.runOutsideAngular=function(e){return this._zoneImpl.runOuter(e)},e}();t.NgZone=a},function(e,t){"use strict";var n=function(){function e(e,t){this.error=e,this.stackTrace=t}return e}();t.NgZoneError=n;var r=function(){function e(e){var t=this,r=e.trace,i=e.onEnter,o=e.onLeave,s=e.setMicrotask,a=e.setMacrotask,c=e.onError;if(this.onEnter=i,this.onLeave=o,this.setMicrotask=s,this.setMacrotask=a,this.onError=c,!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(e,n,r,i,o,s){try{return t.onEnter(),e.invokeTask(r,i,o,s)}finally{t.onLeave()}},onInvoke:function(e,n,r,i,o,s,a){try{return t.onEnter(),e.invoke(r,i,o,s,a)}finally{t.onLeave()}},onHasTask:function(e,n,r,i){e.hasTask(r,i),n==r&&("microTask"==i.change?t.setMicrotask(i.microTask):"macroTask"==i.change&&t.setMacrotask(i.macroTask))},onHandleError:function(e,r,i,o){return e.handleError(i,o),t.onError(new n(o,o.stack)),!1}})}return e.isInAngularZone=function(){return Zone.current.get("isAngularZone")===!0},e.prototype.runInner=function(e){return this.inner.runGuarded(e)},e.prototype.runOuter=function(e){return this.outer.run(e)},e}();t.NgZoneImpl=r},function(e,t,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);t.APP_COMPONENT_REF_PROMISE=s.CONST_EXPR(new o.OpaqueToken("Promise<ComponentRef>")),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){"use strict";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(80),l=n(48),h=function(){function e(e){this._ngZone=e,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this._watchAngularEvents()}return e.prototype._watchAngularEvents=function(){var e=this;l.ObservableWrapper.subscribe(this._ngZone.onUnstable,function(t){e._didWork=!0,e._isZoneStable=!1}),this._ngZone.runOutsideAngular(function(){l.ObservableWrapper.subscribe(e._ngZone.onStable,function(t){p.NgZone.assertNotInAngularZone(),c.scheduleMicroTask(function(){e._isZoneStable=!0,e._runCallbacksIfReady()})})})},e.prototype.increasePendingRequestCount=function(){return this._pendingCount+=1,this._didWork=!0,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 this._isZoneStable&&0==this._pendingCount&&!this._ngZone.hasPendingMacrotasks},e.prototype._runCallbacksIfReady=function(){var e=this;this.isStable()?c.scheduleMicroTask(function(){for(;0!==e._callbacks.length;)e._callbacks.pop()(e._didWork);e._didWork=!1}):this._didWork=!0},e.prototype.whenStable=function(e){this._callbacks.push(e),this._runCallbacksIfReady()},e.prototype.getPendingRequestCount=function(){return this._pendingCount},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.getAllRootElements=function(){return a.MapWrapper.keys(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){"use strict";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(85),c=n(5),u=n(99),p=function(){function e(){}return Object.defineProperty(e.prototype,"hostView",{get:function(){return this.location.internalElement.parentView.ref},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,i){var o=this;return this._compiler.compileInHost(e).then(function(s){var a=o._viewManager.createRootHostView(s,t,n,i),u=o._viewManager.getHostElement(a),p=o._viewManager.getComponent(u),h=function(){c.isPresent(r)&&r(),o._viewManager.destroyRootHostView(a)};return new l(u,p,e,n,h)})},t.prototype.loadIntoLocation=function(e,t,n,r,i){return void 0===r&&(r=null),void 0===i&&(i=null),this.loadNextToLocation(e,this._viewManager.getNamedElementInComponentView(t,n),r,i)},t.prototype.loadNextToLocation=function(e,t,n,r){var i=this;return void 0===n&&(n=null),void 0===r&&(r=null),this._compiler.compileInHost(e).then(function(o){var s=i._viewManager.getViewContainer(t),a=s.createHostView(o,s.length,n,r),c=i._viewManager.getHostElement(a),u=i._viewManager.getComponent(c),p=function(){var e=s.indexOf(a);a.destroyed||-1===e||s.remove(e)};return new l(c,u,e,null,p)})},t=i([s.Injectable(),o("design:paramtypes",[a.Compiler,u.AppViewManager])],t)}(h);t.DynamicComponentLoader_=f},function(e,t,n){"use strict";function r(e){return e instanceof h.HostViewFactory}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(6),c=n(5),u=n(14),p=n(48),l=n(17),h=n(86),f=n(95),d=function(){function e(){}return e}();t.Compiler=d;var y=function(e){function t(){e.apply(this,arguments)}return i(t,e),t.prototype.compileInHost=function(e){var t=l.reflector.annotations(e),n=t.find(r);if(c.isBlank(n))throw new u.BaseException("No precompiled component "+c.stringify(e)+" found");return p.PromiseWrapper.resolve(new f.HostViewFactoryRef_(n))},t.prototype.clearCache=function(){},t=o([a.Injectable(),s("design:paramtypes",[])],t)}(d);t.Compiler_=y},function(e,t,n){"use strict";function r(e){for(var t={},n=e;d.isPresent(n);)t=p.StringMapWrapper.merge(t,p.MapWrapper.toStringMap(n.current)),n=n.parent;return t}function i(e){return o(e,[])}function o(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(r instanceof f.AppElement){var i=r;if(t.push(i.nativeElement),d.isPresent(i.nestedViews))for(var s=0;s<i.nestedViews.length;s++)o(i.nestedViews[s].rootNodesOrAppElements,t)}else t.push(r)}return t}function s(e){var t;if(e instanceof f.AppElement){var n=e;if(t=n.nativeElement,d.isPresent(n.nestedViews))for(var r=n.nestedViews.length-1;r>=0;r--){var i=n.nestedViews[r];i.rootNodesOrAppElements.length>0&&(t=s(i.rootNodesOrAppElements[i.rootNodesOrAppElements.length-1]))}}else t=e;return t}function a(e,t,n){var r=d.isPresent(n)?n.length:0;if(t>r)throw new y.BaseException("The component "+e+" has "+t+" <ng-content> elements,"+(" but only "+r+" slots were provided."))}var c=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},u=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},p=n(12),l=n(26),h=n(36),f=n(87),d=n(5),y=n(14),v=n(91),g=n(95),m=n(96),_=n(98),b=n(36);t.DebugContext=b.DebugContext;var P=n(96),C=n(88),w="ng-reflect-",R=d.CONST_EXPR(new Object),E=function(){function e(e,t,n,r,i,o,s,a){this.proto=e,this.renderer=t,this.viewManager=n,this.projectableNodes=r,this.containerAppElement=i,this.changeDetector=a,this.context=null,this.destroyed=!1,this.ref=new g.ViewRef_(this);var c=f.AppElement.getViewParentInjector(this.proto.type,i,o,s);this.parentInjector=c.injector,this.hostInjectorBoundary=c.hostInjectorBoundary;var u,p;switch(e.type){case C.ViewType.COMPONENT:u=new P.Pipes(e.protoPipes,i.getInjector()),p=i.getComponent();break;case C.ViewType.EMBEDDED:u=i.parentView.pipes,p=i.parentView.context;break;case C.ViewType.HOST:u=null,p=R}this.pipes=u,this.context=p}return e.prototype.init=function(e,t,n,r){this.rootNodesOrAppElements=e,this.allNodes=t,this.disposables=n,this.appElements=r;var i=new p.Map;p.StringMapWrapper.forEach(this.proto.templateVariableBindings,function(e,t){i.set(e,null)});for(var o=0;o<r.length;o++){var s=r[o],a=[];if(d.isPresent(s.proto.protoInjector))for(var c=0;c<s.proto.protoInjector.numberOfProviders;c++)a.push(s.proto.protoInjector.getProviderAtIndex(c).key.token);p.StringMapWrapper.forEach(s.proto.directiveVariableBindings,function(e,t){d.isBlank(e)?i.set(t,s.nativeElement):i.set(t,s.getDirectiveAtIndex(e))}),this.renderer.setElementDebugInfo(s.nativeElement,new v.RenderDebugInfo(s.getInjector(),s.getComponent(),a,i))}var u=null;this.proto.type!==C.ViewType.COMPONENT&&(u=d.isPresent(this.containerAppElement)?this.containerAppElement.parentView.locals:null),this.proto.type===C.ViewType.COMPONENT&&(this.containerAppElement.attachComponentView(this),this.containerAppElement.parentView.changeDetector.addViewChild(this.changeDetector)),this.locals=new l.Locals(u,i),this.changeDetector.hydrate(this.context,this.locals,this,this.pipes),this.viewManager.onViewCreated(this)},e.prototype.destroy=function(){if(this.destroyed)throw new y.BaseException("This view has already been destroyed!");this.changeDetector.destroyRecursive()},e.prototype.notifyOnDestroy=function(){this.destroyed=!0;var e=this.proto.type===C.ViewType.COMPONENT?this.containerAppElement.nativeElement:null;this.renderer.destroyView(e,this.allNodes);for(var t=0;t<this.disposables.length;t++)this.disposables[t]();this.viewManager.onViewDestroyed(this)},Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return this.changeDetector.ref},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"flatRootNodes",{get:function(){return i(this.rootNodesOrAppElements)},enumerable:!0,configurable:!0}),e.prototype.hasLocal=function(e){return p.StringMapWrapper.contains(this.proto.templateVariableBindings,e)},e.prototype.setLocal=function(e,t){if(this.hasLocal(e)){var n=this.proto.templateVariableBindings[e];this.locals.set(n,t)}},e.prototype.notifyOnBinding=function(e,t){if(e.isTextNode())this.renderer.setText(this.allNodes[e.elementIndex],t);else{var n=this.appElements[e.elementIndex].nativeElement;if(e.isElementProperty())this.renderer.setElementProperty(n,e.name,t);else if(e.isElementAttribute())this.renderer.setElementAttribute(n,e.name,d.isPresent(t)?""+t:null);else if(e.isElementClass())this.renderer.setElementClass(n,e.name,t);else{if(!e.isElementStyle())throw new y.BaseException("Unsupported directive record");var r=d.isPresent(e.unit)?e.unit:"";this.renderer.setElementStyle(n,e.name,d.isPresent(t)?""+t+r:null)}}},e.prototype.logBindingUpdate=function(e,t){if(e.isDirective()||e.isElementProperty()){var n=this.appElements[e.elementIndex].nativeElement;this.renderer.setBindingDebugInfo(n,""+w+_.camelCaseToDashCase(e.name),""+t)}},e.prototype.notifyAfterContentChecked=function(){for(var e=this.appElements.length,t=e-1;t>=0;t--)this.appElements[t].ngAfterContentChecked()},e.prototype.notifyAfterViewChecked=function(){for(var e=this.appElements.length,t=e-1;t>=0;t--)this.appElements[t].ngAfterViewChecked()},e.prototype.getDebugContext=function(e,t,n){try{d.isBlank(e)&&t<this.appElements.length&&(e=this.appElements[t]);var i=this.containerAppElement,o=d.isPresent(e)?e.nativeElement:null,s=d.isPresent(i)?i.nativeElement:null,a=d.isPresent(n)?e.getDirectiveAtIndex(n):null,c=d.isPresent(e)?e.getInjector():null;return new h.DebugContext(o,s,a,this.context,r(this.locals),c)}catch(u){return null}},e.prototype.getDirectiveFor=function(e){return this.appElements[e.elementIndex].getDirectiveAtIndex(e.directiveIndex)},e.prototype.getDetectorFor=function(e){var t=this.appElements[e.elementIndex].componentView;return d.isPresent(t)?t.changeDetector:null},e.prototype.triggerEventHandlers=function(e,t,n){return this.changeDetector.handleEvent(e,n,t)},e}();t.AppView=E;var O=function(){function e(e,t,n){this.type=e,this.protoPipes=t,this.templateVariableBindings=n}return e.create=function(t,n,r,i){var o=null;if(d.isPresent(r)&&r.length>0){for(var s=p.ListWrapper.createFixedSize(r.length),a=0;a<r.length;a++)s[a]=t.getResolvedPipeMetadata(r[a]);o=m.ProtoPipes.fromProviders(s)}return new e(n,o,i)},e}();t.AppProtoView=O;var S=function(){function e(e,t){this.selector=e,this.viewFactory=t}return e=c([d.CONST(),u("design:paramtypes",[String,Function])],e)}();t.HostViewFactory=S,t.flattenNestedViewRenderNodes=i,t.findLastRenderNode=s,t.checkSlotCount=a},function(e,t,n){"use strict";function r(e,t,n){for(var r=0;r<e.length;r++)n.set(e[r].key.id,t)}var i,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(12),u=n(6),p=n(13),l=n(11),h=n(13),f=n(4),d=n(88),y=n(89),v=n(90),g=n(89),m=n(91),_=n(92),b=n(24),P=n(26),C=n(93),w=n(17),R=n(94),E=n(90),O=function(){function e(){this.templateRefId=u.Key.get(_.TemplateRef).id,this.viewContainerId=u.Key.get(v.ViewContainerRef).id,this.changeDetectorRefId=u.Key.get(P.ChangeDetectorRef).id,this.elementRefId=u.Key.get(g.ElementRef).id,this.rendererId=u.Key.get(m.Renderer).id}return e.instance=function(){return s.isBlank(i)&&(i=new e),i},e}();t.StaticKeys=O;var S=function(e){function t(t,n,r,i,o,s,a){e.call(this,t,n,r,i,o),this.attributeName=s,this.queryDecorator=a,this._verify()}return o(t,e),t.prototype._verify=function(){var e=0;if(s.isPresent(this.queryDecorator)&&e++,s.isPresent(this.attributeName)&&e++,e>1)throw new a.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 f.AttributeMetadata});return s.isPresent(t)?t.attributeName:null},t._query=function(e){return e.find(function(e){return e instanceof f.QueryMetadata})},t}(u.Dependency);t.DirectiveDependency=S;var A=function(e){function t(t,n,r,i,o,s,a){e.call(this,t,[new h.ResolvedFactory(n,r)],!1),this.isComponent=i,this.providers=o,this.viewProviders=s,this.queries=a}return o(t,e),Object.defineProperty(t.prototype,"displayName",{get:function(){return this.key.displayName},enumerable:!0,configurable:!0}),t.createFromType=function(e,n){var r=new u.Provider(e,{useClass:e});s.isBlank(n)&&(n=new b.DirectiveMetadata);var i=h.resolveProvider(r),o=i.resolvedFactories[0],a=o.dependencies.map(S.createFrom),p=n instanceof b.ComponentMetadata,l=s.isPresent(n.providers)?u.Injector.resolve(n.providers):null,f=n instanceof b.ComponentMetadata&&s.isPresent(n.viewProviders)?u.Injector.resolve(n.viewProviders):null,d=[];return s.isPresent(n.queries)&&c.StringMapWrapper.forEach(n.queries,function(e,t){var n=w.reflector.setter(t);d.push(new D(n,e))}),a.forEach(function(e){s.isPresent(e.queryDecorator)&&d.push(new D(null,e.queryDecorator))}),new t(i.key,o.factory,a,p,l,f,d)},t}(h.ResolvedProvider_);t.DirectiveProvider=A;var D=function(){function e(e,t){this.setter=e,this.metadata=t}return e}();t.QueryMetadataWithSetter=D;var x=function(){function e(e,t,n,r,i,o){this.firstProviderIsComponent=e,this.index=t,this.attributes=n,this.protoQueryRefs=i,this.directiveVariableBindings=o;var s=r.length;s>0?this.protoInjector=new l.ProtoInjector(r):(this.protoInjector=null,this.protoQueryRefs=[])}return e.create=function(t,n,i,o,a){for(var u=null,h=new Map,f=new Map,d=c.ListWrapper.createGrowableSize(o.length),y=[],v=0;v<o.length;v++){var g=t.getResolvedDirectiveMetadata(o[v]);d[v]=new l.ProviderWithVisibility(g,g.isComponent?l.Visibility.PublicAndPrivate:l.Visibility.Public),g.isComponent?u=g:s.isPresent(g.providers)&&(p.mergeResolvedProviders(g.providers,h),r(g.providers,l.Visibility.Public,f)),s.isPresent(g.viewProviders)&&(p.mergeResolvedProviders(g.viewProviders,h),r(g.viewProviders,l.Visibility.Private,f));for(var m=0;m<g.queries.length;m++){var _=g.queries[m];y.push(new F(v,_.setter,_.metadata))}}return s.isPresent(u)&&s.isPresent(u.providers)&&(p.mergeResolvedProviders(u.providers,h),r(u.providers,l.Visibility.Public,f)),h.forEach(function(e,t){d.push(new l.ProviderWithVisibility(e,f.get(e.key.id)))}),new e(s.isPresent(u),n,i,d,y,a)},e.prototype.getProviderAtIndex=function(e){return this.protoInjector.getProviderAtIndex(e)},e}();t.AppProtoElement=x;var T=function(){function e(e,t,n){this.element=e,this.componentElement=t,this.injector=n}return e}(),I=function(){function e(e,t){this.injector=e,this.hostInjectorBoundary=t}return e}();t.InjectorWithHostBoundary=I;var N=function(){function e(e,t,n,r,i){var o=this;this.proto=e,this.parentView=t,this.parent=n,this.nativeElement=r,this.embeddedViewFactory=i,this.nestedViews=null,this.componentView=null,this.ref=new y.ElementRef_(this);var a=s.isPresent(n)?n._injector:t.parentInjector;if(s.isPresent(this.proto.protoInjector)){var c;c=s.isPresent(n)&&s.isPresent(n.proto.protoInjector)?!1:t.hostInjectorBoundary,this._queryStrategy=this._buildQueryStrategy(),this._injector=new u.Injector(this.proto.protoInjector,a,c,this,function(){return o._debugContext()});var p=this._injector.internalStrategy;this._strategy=p instanceof l.InjectorInlineStrategy?new B(p,this):new L(p,this),this._strategy.init()}else this._queryStrategy=null,this._injector=a,this._strategy=null}return e.getViewParentInjector=function(e,t,n,r){var i,o;switch(e){case d.ViewType.COMPONENT:i=t._injector,o=!0;break;case d.ViewType.EMBEDDED:i=s.isPresent(t.proto.protoInjector)?t._injector.parent:t._injector,o=t._injector.hostBoundary;break;case d.ViewType.HOST:if(s.isPresent(t))if(i=s.isPresent(t.proto.protoInjector)?t._injector.parent:t._injector,s.isPresent(n)){var a=n.map(function(e){return new l.ProviderWithVisibility(e,l.Visibility.Public)});i=new u.Injector(new l.ProtoInjector(a),i,!0,null,null),o=!1}else o=t._injector.hostBoundary;else i=r,o=!0}return new I(i,o)},e.prototype.attachComponentView=function(e){this.componentView=e},e.prototype._debugContext=function(){var e=this.parentView.getDebugContext(this,null,null);return s.isPresent(e)?new T(e.element,e.componentElement,e.injector):null},e.prototype.hasVariableBinding=function(e){var t=this.proto.directiveVariableBindings;return s.isPresent(t)&&c.StringMapWrapper.contains(t,e)},e.prototype.getVariableBinding=function(e){var t=this.proto.directiveVariableBindings[e];return s.isPresent(t)?this.getDirectiveAtIndex(t):this.getElementRef()},e.prototype.get=function(e){return this._injector.get(e)},e.prototype.hasDirective=function(e){return s.isPresent(this._injector.getOptional(e))},e.prototype.getComponent=function(){return s.isPresent(this._strategy)?this._strategy.getComponent():null},e.prototype.getInjector=function(){return this._injector},e.prototype.getElementRef=function(){return this.ref},e.prototype.getViewContainerRef=function(){return new E.ViewContainerRef_(this)},e.prototype.getTemplateRef=function(){return s.isPresent(this.embeddedViewFactory)?new _.TemplateRef_(this.ref):null},e.prototype.getDependency=function(e,t,n){if(t instanceof A){var r=n;if(s.isPresent(r.attributeName))return this._buildAttribute(r);if(s.isPresent(r.queryDecorator))return this._queryStrategy.findQuery(r.queryDecorator).list;if(r.key.id===O.instance().changeDetectorRefId)return this.proto.firstProviderIsComponent?new U(this):this.parentView.changeDetector.ref;if(r.key.id===O.instance().elementRefId)return this.getElementRef();if(r.key.id===O.instance().viewContainerId)return this.getViewContainerRef();if(r.key.id===O.instance().templateRefId){var i=this.getTemplateRef();if(s.isBlank(i)&&!r.optional)throw new u.NoProviderError(null,r.key);return i}if(r.key.id===O.instance().rendererId)return this.parentView.renderer}else if(t instanceof R.PipeProvider&&n.key.id===O.instance().changeDetectorRefId)return this.proto.firstProviderIsComponent?new U(this):this.parentView.changeDetector;return l.UNDEFINED},e.prototype._buildAttribute=function(e){var t=this.proto.attributes;return s.isPresent(t)&&c.StringMapWrapper.contains(t,e.attributeName)?t[e.attributeName]:null},e.prototype.addDirectivesMatchingQuery=function(e,t){var n=this.getTemplateRef();e.selector===_.TemplateRef&&s.isPresent(n)&&t.push(n),null!=this._strategy&&this._strategy.addDirectivesMatchingQuery(e,t)},e.prototype._buildQueryStrategy=function(){return 0===this.proto.protoQueryRefs.length?M:this.proto.protoQueryRefs.length<=V.NUMBER_OF_SUPPORTED_QUERIES?new V(this):new j(this)},e.prototype.getDirectiveAtIndex=function(e){return this._injector.getAt(e)},e.prototype.ngAfterViewChecked=function(){s.isPresent(this._queryStrategy)&&this._queryStrategy.updateViewQueries()},e.prototype.ngAfterContentChecked=function(){s.isPresent(this._queryStrategy)&&this._queryStrategy.updateContentQueries()},e.prototype.traverseAndSetQueriesAsDirty=function(){for(var e=this;s.isPresent(e);)e._setQueriesAsDirty(),e=s.isBlank(e.parent)&&e.parentView.proto.type===d.ViewType.EMBEDDED?e.parentView.containerAppElement:e.parent},e.prototype._setQueriesAsDirty=function(){s.isPresent(this._queryStrategy)&&this._queryStrategy.setContentQueriesAsDirty(),this.parentView.proto.type===d.ViewType.COMPONENT&&this.parentView.containerAppElement._queryStrategy.setViewQueriesAsDirty()},e}();t.AppElement=N;var k=function(){function e(){}return e.prototype.setContentQueriesAsDirty=function(){},e.prototype.setViewQueriesAsDirty=function(){},e.prototype.updateContentQueries=function(){},e.prototype.updateViewQueries=function(){},e.prototype.findQuery=function(e){throw new a.BaseException("Cannot find query for directive "+e+".");
8
+ },e}(),M=new k,V=function(){function e(e){var t=e.proto.protoQueryRefs;t.length>0&&(this.query0=new W(t[0],e)),t.length>1&&(this.query1=new W(t[1],e)),t.length>2&&(this.query2=new W(t[2],e))}return e.prototype.setContentQueriesAsDirty=function(){s.isPresent(this.query0)&&!this.query0.isViewQuery&&(this.query0.dirty=!0),s.isPresent(this.query1)&&!this.query1.isViewQuery&&(this.query1.dirty=!0),s.isPresent(this.query2)&&!this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.setViewQueriesAsDirty=function(){s.isPresent(this.query0)&&this.query0.isViewQuery&&(this.query0.dirty=!0),s.isPresent(this.query1)&&this.query1.isViewQuery&&(this.query1.dirty=!0),s.isPresent(this.query2)&&this.query2.isViewQuery&&(this.query2.dirty=!0)},e.prototype.updateContentQueries=function(){s.isPresent(this.query0)&&!this.query0.isViewQuery&&this.query0.update(),s.isPresent(this.query1)&&!this.query1.isViewQuery&&this.query1.update(),s.isPresent(this.query2)&&!this.query2.isViewQuery&&this.query2.update()},e.prototype.updateViewQueries=function(){s.isPresent(this.query0)&&this.query0.isViewQuery&&this.query0.update(),s.isPresent(this.query1)&&this.query1.isViewQuery&&this.query1.update(),s.isPresent(this.query2)&&this.query2.isViewQuery&&this.query2.update()},e.prototype.findQuery=function(e){if(s.isPresent(this.query0)&&this.query0.protoQueryRef.query===e)return this.query0;if(s.isPresent(this.query1)&&this.query1.protoQueryRef.query===e)return this.query1;if(s.isPresent(this.query2)&&this.query2.protoQueryRef.query===e)return this.query2;throw new a.BaseException("Cannot find query for directive "+e+".")},e.NUMBER_OF_SUPPORTED_QUERIES=3,e}(),j=function(){function e(e){this.queries=e.proto.protoQueryRefs.map(function(t){return new W(t,e)})}return e.prototype.setContentQueriesAsDirty=function(){for(var e=0;e<this.queries.length;++e){var t=this.queries[e];t.isViewQuery||(t.dirty=!0)}},e.prototype.setViewQueriesAsDirty=function(){for(var e=0;e<this.queries.length;++e){var t=this.queries[e];t.isViewQuery&&(t.dirty=!0)}},e.prototype.updateContentQueries=function(){for(var e=0;e<this.queries.length;++e){var t=this.queries[e];t.isViewQuery||t.update()}},e.prototype.updateViewQueries=function(){for(var e=0;e<this.queries.length;++e){var t=this.queries[e];t.isViewQuery&&t.update()}},e.prototype.findQuery=function(e){for(var t=0;t<this.queries.length;++t){var n=this.queries[t];if(n.protoQueryRef.query===e)return n}throw new a.BaseException("Cannot find query for directive "+e+".")},e}(),B=function(){function e(e,t){this.injectorStrategy=e,this._ei=t}return e.prototype.init=function(){var e=this.injectorStrategy,t=e.protoStrategy;e.resetConstructionCounter(),t.provider0 instanceof A&&s.isPresent(t.keyId0)&&e.obj0===l.UNDEFINED&&(e.obj0=e.instantiateProvider(t.provider0,t.visibility0)),t.provider1 instanceof A&&s.isPresent(t.keyId1)&&e.obj1===l.UNDEFINED&&(e.obj1=e.instantiateProvider(t.provider1,t.visibility1)),t.provider2 instanceof A&&s.isPresent(t.keyId2)&&e.obj2===l.UNDEFINED&&(e.obj2=e.instantiateProvider(t.provider2,t.visibility2)),t.provider3 instanceof A&&s.isPresent(t.keyId3)&&e.obj3===l.UNDEFINED&&(e.obj3=e.instantiateProvider(t.provider3,t.visibility3)),t.provider4 instanceof A&&s.isPresent(t.keyId4)&&e.obj4===l.UNDEFINED&&(e.obj4=e.instantiateProvider(t.provider4,t.visibility4)),t.provider5 instanceof A&&s.isPresent(t.keyId5)&&e.obj5===l.UNDEFINED&&(e.obj5=e.instantiateProvider(t.provider5,t.visibility5)),t.provider6 instanceof A&&s.isPresent(t.keyId6)&&e.obj6===l.UNDEFINED&&(e.obj6=e.instantiateProvider(t.provider6,t.visibility6)),t.provider7 instanceof A&&s.isPresent(t.keyId7)&&e.obj7===l.UNDEFINED&&(e.obj7=e.instantiateProvider(t.provider7,t.visibility7)),t.provider8 instanceof A&&s.isPresent(t.keyId8)&&e.obj8===l.UNDEFINED&&(e.obj8=e.instantiateProvider(t.provider8,t.visibility8)),t.provider9 instanceof A&&s.isPresent(t.keyId9)&&e.obj9===l.UNDEFINED&&(e.obj9=e.instantiateProvider(t.provider9,t.visibility9))},e.prototype.getComponent=function(){return this.injectorStrategy.obj0},e.prototype.isComponentKey=function(e){return this._ei.proto.firstProviderIsComponent&&s.isPresent(e)&&e.id===this.injectorStrategy.protoStrategy.keyId0},e.prototype.addDirectivesMatchingQuery=function(e,t){var n=this.injectorStrategy,r=n.protoStrategy;s.isPresent(r.provider0)&&r.provider0.key.token===e.selector&&(n.obj0===l.UNDEFINED&&(n.obj0=n.instantiateProvider(r.provider0,r.visibility0)),t.push(n.obj0)),s.isPresent(r.provider1)&&r.provider1.key.token===e.selector&&(n.obj1===l.UNDEFINED&&(n.obj1=n.instantiateProvider(r.provider1,r.visibility1)),t.push(n.obj1)),s.isPresent(r.provider2)&&r.provider2.key.token===e.selector&&(n.obj2===l.UNDEFINED&&(n.obj2=n.instantiateProvider(r.provider2,r.visibility2)),t.push(n.obj2)),s.isPresent(r.provider3)&&r.provider3.key.token===e.selector&&(n.obj3===l.UNDEFINED&&(n.obj3=n.instantiateProvider(r.provider3,r.visibility3)),t.push(n.obj3)),s.isPresent(r.provider4)&&r.provider4.key.token===e.selector&&(n.obj4===l.UNDEFINED&&(n.obj4=n.instantiateProvider(r.provider4,r.visibility4)),t.push(n.obj4)),s.isPresent(r.provider5)&&r.provider5.key.token===e.selector&&(n.obj5===l.UNDEFINED&&(n.obj5=n.instantiateProvider(r.provider5,r.visibility5)),t.push(n.obj5)),s.isPresent(r.provider6)&&r.provider6.key.token===e.selector&&(n.obj6===l.UNDEFINED&&(n.obj6=n.instantiateProvider(r.provider6,r.visibility6)),t.push(n.obj6)),s.isPresent(r.provider7)&&r.provider7.key.token===e.selector&&(n.obj7===l.UNDEFINED&&(n.obj7=n.instantiateProvider(r.provider7,r.visibility7)),t.push(n.obj7)),s.isPresent(r.provider8)&&r.provider8.key.token===e.selector&&(n.obj8===l.UNDEFINED&&(n.obj8=n.instantiateProvider(r.provider8,r.visibility8)),t.push(n.obj8)),s.isPresent(r.provider9)&&r.provider9.key.token===e.selector&&(n.obj9===l.UNDEFINED&&(n.obj9=n.instantiateProvider(r.provider9,r.visibility9)),t.push(n.obj9))},e}(),L=function(){function e(e,t){this.injectorStrategy=e,this._ei=t}return e.prototype.init=function(){var e=this.injectorStrategy,t=e.protoStrategy;e.resetConstructionCounter();for(var n=0;n<t.keyIds.length;n++)t.providers[n]instanceof A&&s.isPresent(t.keyIds[n])&&e.objs[n]===l.UNDEFINED&&(e.objs[n]=e.instantiateProvider(t.providers[n],t.visibilities[n]))},e.prototype.getComponent=function(){return this.injectorStrategy.objs[0]},e.prototype.isComponentKey=function(e){var t=this.injectorStrategy.protoStrategy;return this._ei.proto.firstProviderIsComponent&&s.isPresent(e)&&e.id===t.keyIds[0]},e.prototype.addDirectivesMatchingQuery=function(e,t){for(var n=this.injectorStrategy,r=n.protoStrategy,i=0;i<r.providers.length;i++)r.providers[i].key.token===e.selector&&(n.objs[i]===l.UNDEFINED&&(n.objs[i]=n.instantiateProvider(r.providers[i],r.visibilities[i])),t.push(n.objs[i]))},e}(),F=function(){function e(e,t,n){this.dirIndex=e,this.setter=t,this.query=n}return Object.defineProperty(e.prototype,"usesPropertySyntax",{get:function(){return s.isPresent(this.setter)},enumerable:!0,configurable:!0}),e}();t.ProtoQueryRef=F;var W=function(){function e(e,t){this.protoQueryRef=e,this.originator=t,this.list=new C.QueryList,this.dirty=!0}return Object.defineProperty(e.prototype,"isViewQuery",{get:function(){return this.protoQueryRef.query.isViewQuery},enumerable:!0,configurable:!0}),e.prototype.update=function(){if(this.dirty){if(this._update(),this.dirty=!1,this.protoQueryRef.usesPropertySyntax){var e=this.originator.getDirectiveAtIndex(this.protoQueryRef.dirIndex);this.protoQueryRef.query.first?this.protoQueryRef.setter(e,this.list.length>0?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.componentView;s.isPresent(t)&&this._visitView(t,e)}else this._visit(this.originator,e);this.list.reset(e)},e.prototype._visit=function(e,t){for(var n=e.parentView,r=e.proto.index,i=r;i<n.appElements.length;i++){var o=n.appElements[i];if(i>r&&(s.isBlank(o.parent)||o.parent.proto.index<r))break;(this.protoQueryRef.query.descendants||o.parent==this.originator||o==this.originator)&&(this._visitInjector(o,t),this._visitViewContainerViews(o.nestedViews,t))}},e.prototype._visitInjector=function(e,t){this.protoQueryRef.query.isVarBindingQuery?this._aggregateVariableBinding(e,t):this._aggregateDirective(e,t)},e.prototype._visitViewContainerViews=function(e,t){if(s.isPresent(e))for(var n=0;n<e.length;n++)this._visitView(e[n],t)},e.prototype._visitView=function(e,t){for(var n=0;n<e.appElements.length;n++){var r=e.appElements[n];this._visitInjector(r,t),this._visitViewContainerViews(r.nestedViews,t)}},e.prototype._aggregateVariableBinding=function(e,t){for(var n=this.protoQueryRef.query.varBindings,r=0;r<n.length;++r)e.hasVariableBinding(n[r])&&t.push(e.getVariableBinding(n[r]))},e.prototype._aggregateDirective=function(e,t){e.addDirectivesMatchingQuery(this.protoQueryRef.query,t)},e}();t.QueryRef=W;var U=function(e){function t(t){e.call(this),this._appElement=t}return o(t,e),t.prototype.markForCheck=function(){this._appElement.componentView.changeDetector.ref.markForCheck()},t.prototype.detach=function(){this._appElement.componentView.changeDetector.ref.detach()},t.prototype.detectChanges=function(){this._appElement.componentView.changeDetector.ref.detectChanges()},t.prototype.checkNoChanges=function(){this._appElement.componentView.changeDetector.ref.checkNoChanges()},t.prototype.reattach=function(){this._appElement.componentView.changeDetector.ref.reattach()},t}(P.ChangeDetectorRef)},function(e,t){"use strict";!function(e){e[e.HOST=0]="HOST",e[e.COMPONENT=1]="COMPONENT",e[e.EMBEDDED=2]="EMBEDDED"}(t.ViewType||(t.ViewType={}));t.ViewType},function(e,t,n){"use strict";var r=n(14),i=function(){function e(){}return Object.defineProperty(e.prototype,"nativeElement",{get:function(){return r.unimplemented()},enumerable:!0,configurable:!0}),e}();t.ElementRef=i;var o=function(){function e(e){this._appElement=e}return Object.defineProperty(e.prototype,"internalElement",{get:function(){return this._appElement},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"nativeElement",{get:function(){return this._appElement.nativeElement},enumerable:!0,configurable:!0}),e}();t.ElementRef_=o},function(e,t,n){"use strict";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=function(){function e(){}return Object.defineProperty(e.prototype,"element",{get:function(){return o.unimplemented()},enumerable:!0,configurable:!0}),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=a;var c=function(e){function t(t){e.call(this),this._element=t}return r(t,e),t.prototype.get=function(e){return this._element.nestedViews[e].ref},Object.defineProperty(t.prototype,"length",{get:function(){var e=this._element.nestedViews;return s.isPresent(e)?e.length:0},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"element",{get:function(){return this._element.ref},enumerable:!0,configurable:!0}),t.prototype.createEmbeddedView=function(e,t){void 0===t&&(t=-1),-1==t&&(t=this.length);var n=this._element.parentView.viewManager;return n.createEmbeddedViewInContainer(this._element.ref,t,e)},t.prototype.createHostView=function(e,t,n,r){void 0===t&&(t=-1),void 0===n&&(n=null),void 0===r&&(r=null),-1==t&&(t=this.length);var i=this._element.parentView.viewManager;return i.createHostViewInContainer(this._element.ref,t,e,n,r)},t.prototype.insert=function(e,t){void 0===t&&(t=-1),-1==t&&(t=this.length);var n=this._element.parentView.viewManager;return n.attachViewInContainer(this._element.ref,t,e)},t.prototype.indexOf=function(e){return i.ListWrapper.indexOf(this._element.nestedViews,e.internalView)},t.prototype.remove=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1);var t=this._element.parentView.viewManager;return t.destroyViewInContainer(this._element.ref,e)},t.prototype.detach=function(e){void 0===e&&(e=-1),-1==e&&(e=this.length-1);var t=this._element.parentView.viewManager;return t.detachViewInContainer(this._element.ref,e)},t}(a);t.ViewContainerRef_=c},function(e,t){"use strict";var n=function(){function e(e,t,n){this.id=e,this.encapsulation=t,this.styles=n}return e}();t.RenderComponentType=n;var r=function(){function e(e,t,n,r){this.injector=e,this.component=t,this.providerTokens=n,this.locals=r}return e}();t.RenderDebugInfo=r;var i=function(){function e(){}return e}();t.Renderer=i;var o=function(){function e(){}return e}();t.RootRenderer=o},function(e,t){"use strict";var n=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)},r=function(){function e(){}return Object.defineProperty(e.prototype,"elementRef",{get:function(){return null},enumerable:!0,configurable:!0}),e}();t.TemplateRef=r;var i=function(e){function t(t){e.call(this),this._elementRef=t}return n(t,e),Object.defineProperty(t.prototype,"elementRef",{get:function(){return this._elementRef},enumerable:!0,configurable:!0}),t}(r);t.TemplateRef_=i},function(e,t,n){"use strict";var r=n(12),i=n(5),o=n(48),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.forEach=function(e){this._results.forEach(e)},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,n){"use strict";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(13),o=n(6),s=function(e){function t(t,n,r,i,o){e.call(this,r,i,o),this.name=t,this.pure=n}return r(t,e),t.createFromType=function(e,n){var r=new o.Provider(e,{useClass:e}),s=i.resolveProvider(r);return new t(n.name,n.pure,s.key,s.resolvedFactories,s.multiProvider)},t}(i.ResolvedProvider_);t.PipeProvider=s},function(e,t,n){"use strict";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(14),o=function(){function e(){}return 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}();t.ViewRef=o;var s=function(e){function t(){e.apply(this,arguments)}return r(t,e),Object.defineProperty(t.prototype,"rootNodes",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),t}(o);t.HostViewRef=s;var a=function(e){function t(){e.apply(this,arguments)}return r(t,e),Object.defineProperty(t.prototype,"rootNodes",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),t}(o);t.EmbeddedViewRef=a;var c=function(){function e(e){this._view=e,this._view=e}return Object.defineProperty(e.prototype,"internalView",{get:function(){return this._view},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"changeDetectorRef",{get:function(){return this._view.changeDetector.ref},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rootNodes",{get:function(){return this._view.flatRootNodes},enumerable:!0,configurable:!0}),e.prototype.setLocal=function(e,t){this._view.setLocal(e,t)},e.prototype.hasLocal=function(e){return this._view.hasLocal(e)},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._view.destroyed},enumerable:!0,configurable:!0}),e}();t.ViewRef_=c;var u=function(){function e(){}return e}();t.HostViewFactoryRef=u;var p=function(){function e(e){this._hostViewFactory=e}return Object.defineProperty(e.prototype,"internalHostViewFactory",{get:function(){return this._hostViewFactory},enumerable:!0,configurable:!0}),e}();t.HostViewFactoryRef_=p},function(e,t,n){"use strict";var r=n(5),i=n(14),o=n(12),s=n(97),a=function(){function e(e){this.config=e,this.config=e}return e.fromProviders=function(t){var n={};return t.forEach(function(e){return n[e.name]=e}),new e(n)},e.prototype.get=function(e){var t=this.config[e];if(r.isBlank(t))throw new i.BaseException("Cannot find pipe '"+e+"'.");return t},e}();t.ProtoPipes=a;var c=function(){function e(e,t){this.proto=e,this.injector=t,this._config={}}return e.prototype.get=function(e){var t=o.StringMapWrapper.get(this._config,e);if(r.isPresent(t))return t;var n=this.proto.get(e),i=this.injector.instantiateResolved(n),a=new s.SelectedPipe(i,n.pure);return n.pure&&o.StringMapWrapper.set(this._config,e,a),a},e}();t.Pipes=c},function(e,t){"use strict";var n=function(){function e(e,t){this.pipe=e,this.pure=t}return e}();t.SelectedPipe=n},function(e,t,n){"use strict";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){"use strict";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(6),c=n(5),u=n(12),p=n(14),l=n(86),h=n(91),f=n(46),d=n(82),y=n(88),v=function(){function e(){}return e}();t.AppViewManager=v;var g=function(e){function t(t,n){e.call(this),this._renderer=t,this._appId=n,this._nextCompTypeId=0,this._createRootHostViewScope=f.wtfCreateScope("AppViewManager#createRootHostView()"),this._destroyRootHostViewScope=f.wtfCreateScope("AppViewManager#destroyRootHostView()"),this._createEmbeddedViewInContainerScope=f.wtfCreateScope("AppViewManager#createEmbeddedViewInContainer()"),this._createHostViewInContainerScope=f.wtfCreateScope("AppViewManager#createHostViewInContainer()"),this._destroyViewInContainerScope=f.wtfCreateScope("AppViewMananger#destroyViewInContainer()"),this._attachViewInContainerScope=f.wtfCreateScope("AppViewMananger#attachViewInContainer()"),this._detachViewInContainerScope=f.wtfCreateScope("AppViewMananger#detachViewInContainer()")}return r(t,e),t.prototype.getViewContainer=function(e){return e.internalElement.getViewContainerRef()},t.prototype.getHostElement=function(e){var t=e.internalView;if(t.proto.type!==y.ViewType.HOST)throw new p.BaseException("This operation is only allowed on host views");return t.appElements[0].ref},t.prototype.getNamedElementInComponentView=function(e,t){var n=e.internalElement,r=n.componentView;if(c.isBlank(r))throw new p.BaseException("There is no component directive at element "+e);for(var i=0;i<r.appElements.length;i++){var o=r.appElements[i];if(u.StringMapWrapper.contains(o.proto.directiveVariableBindings,t))return o.ref}throw new p.BaseException("Could not find variable "+t)},t.prototype.getComponent=function(e){return e.internalElement.getComponent()},t.prototype.createRootHostView=function(e,t,n,r){void 0===r&&(r=null);var i=this._createRootHostViewScope(),o=e.internalHostViewFactory,s=c.isPresent(t)?t:o.selector,a=o.viewFactory(this._renderer,this,null,r,s,null,n);return f.wtfLeave(i,a.ref)},t.prototype.destroyRootHostView=function(e){var t=this._destroyRootHostViewScope(),n=e.internalView;n.renderer.detachView(l.flattenNestedViewRenderNodes(n.rootNodesOrAppElements)),n.destroy(),f.wtfLeave(t)},t.prototype.createEmbeddedViewInContainer=function(e,t,n){var r=this._createEmbeddedViewInContainerScope(),i=n.elementRef.internalElement,o=i.embeddedViewFactory(i.parentView.renderer,this,i,i.parentView.projectableNodes,null,null,null);return this._attachViewToContainer(o,e.internalElement,t),f.wtfLeave(r,o.ref)},t.prototype.createHostViewInContainer=function(e,t,n,r,i){var o=this._createHostViewInContainerScope(),s=e,a=s.internalElement,c=n.internalHostViewFactory,u=c.viewFactory(a.parentView.renderer,a.parentView.viewManager,a,i,null,r,null);return this._attachViewToContainer(u,s.internalElement,t),f.wtfLeave(o,u.ref)},t.prototype.destroyViewInContainer=function(e,t){var n=this._destroyViewInContainerScope(),r=this._detachViewInContainer(e.internalElement,t);r.destroy(),f.wtfLeave(n)},t.prototype.attachViewInContainer=function(e,t,n){var r=n,i=this._attachViewInContainerScope();return this._attachViewToContainer(r.internalView,e.internalElement,t),f.wtfLeave(i,r)},t.prototype.detachViewInContainer=function(e,t){var n=this._detachViewInContainerScope(),r=this._detachViewInContainer(e.internalElement,t);return f.wtfLeave(n,r.ref)},t.prototype.onViewCreated=function(e){},t.prototype.onViewDestroyed=function(e){},t.prototype.createRenderComponentType=function(e,t){return new h.RenderComponentType(this._appId+"-"+this._nextCompTypeId++,e,t)},t.prototype._attachViewToContainer=function(e,t,n){if(e.proto.type===y.ViewType.COMPONENT)throw new p.BaseException("Component views can't be moved!");var r=t.nestedViews;null==r&&(r=[],t.nestedViews=r),u.ListWrapper.insert(r,n,e);var i;if(n>0){var o=r[n-1];i=o.rootNodesOrAppElements.length>0?o.rootNodesOrAppElements[o.rootNodesOrAppElements.length-1]:null}else i=t.nativeElement;if(c.isPresent(i)){var s=l.findLastRenderNode(i);e.renderer.attachViewAfter(s,l.flattenNestedViewRenderNodes(e.rootNodesOrAppElements))}t.parentView.changeDetector.addContentChild(e.changeDetector),t.traverseAndSetQueriesAsDirty()},t.prototype._detachViewInContainer=function(e,t){var n=u.ListWrapper.removeAt(e.nestedViews,t);if(n.proto.type===y.ViewType.COMPONENT)throw new p.BaseException("Component views can't be moved!");return e.traverseAndSetQueriesAsDirty(),n.renderer.detachView(l.flattenNestedViewRenderNodes(n.rootNodesOrAppElements)),n.changeDetector.remove(),n},t=i([a.Injectable(),s(1,a.Inject(d.APP_ID)),o("design:paramtypes",[h.RootRenderer,String])],t)}(v);t.AppViewManager_=g},function(e,t,n){"use strict";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){"use strict";var r=n(80);t.NgZone=r.NgZone,t.NgZoneError=r.NgZoneError},function(e,t,n){"use strict";var r=n(91);t.RootRenderer=r.RootRenderer,t.Renderer=r.Renderer,t.RenderComponentType=r.RenderComponentType},function(e,t,n){"use strict";var r=n(104);t.DirectiveResolver=r.DirectiveResolver;var i=n(105);t.ViewResolver=i.ViewResolver;var o=n(85);t.Compiler=o.Compiler;var s=n(99);t.AppViewManager=s.AppViewManager;var a=n(93);t.QueryList=a.QueryList;var c=n(84);t.DynamicComponentLoader=c.DynamicComponentLoader;var u=n(89);t.ElementRef=u.ElementRef;var p=n(92);t.TemplateRef=p.TemplateRef;var l=n(95);t.EmbeddedViewRef=l.EmbeddedViewRef,t.HostViewRef=l.HostViewRef,t.ViewRef=l.ViewRef,t.HostViewFactoryRef=l.HostViewFactoryRef;var h=n(90);t.ViewContainerRef=h.ViewContainerRef;var f=n(84);t.ComponentRef=f.ComponentRef},function(e,t,n){"use strict";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(17),h=n(19),f=function(){function e(e){a.isPresent(e)?this._reflector=e:this._reflector=l.reflector}return e.prototype.resolve=function(e){var t=this._reflector.annotations(s.resolveForwardRef(e));if(a.isPresent(t)){var n=t.find(r);if(a.isPresent(n)){var i=this._reflector.propMetadata(e);return this._mergeWithPropertyMetadata(n,i,e)}}throw new c.BaseException("No Directive annotation found on "+a.stringify(e))},e.prototype._mergeWithPropertyMetadata=function(e,t,n){var r=[],i=[],o={},s={};return u.StringMapWrapper.forEach(t,function(e,t){e.forEach(function(e){if(e instanceof p.InputMetadata&&(a.isPresent(e.bindingPropertyName)?r.push(t+": "+e.bindingPropertyName):r.push(t)),e instanceof p.OutputMetadata&&(a.isPresent(e.bindingPropertyName)?i.push(t+": "+e.bindingPropertyName):i.push(t)),e instanceof p.HostBindingMetadata&&(a.isPresent(e.hostPropertyName)?o["["+e.hostPropertyName+"]"]=t:o["["+t+"]"]=t),e instanceof p.HostListenerMetadata){var n=a.isPresent(e.args)?e.args.join(", "):"";o["("+e.eventName+")"]=t+"("+n+")"}e instanceof p.ContentChildrenMetadata&&(s[t]=e),e instanceof p.ViewChildrenMetadata&&(s[t]=e),e instanceof p.ContentChildMetadata&&(s[t]=e),e instanceof p.ViewChildMetadata&&(s[t]=e)})}),this._merge(e,r,i,o,s,n)},e.prototype._merge=function(e,t,n,r,i,o){var s,l=a.isPresent(e.inputs)?u.ListWrapper.concat(e.inputs,t):t;a.isPresent(e.outputs)?(e.outputs.forEach(function(e){if(u.ListWrapper.contains(n,e))throw new c.BaseException("Output event '"+e+"' defined multiple times in '"+a.stringify(o)+"'")}),s=u.ListWrapper.concat(e.outputs,n)):s=n;var h=a.isPresent(e.host)?u.StringMapWrapper.merge(e.host,r):r,f=a.isPresent(e.queries)?u.StringMapWrapper.merge(e.queries,i):i;return e instanceof p.ComponentMetadata?new p.ComponentMetadata({selector:e.selector,inputs:l,outputs:s,host:h,exportAs:e.exportAs,moduleId:e.moduleId,queries:f,changeDetection:e.changeDetection,providers:e.providers,viewProviders:e.viewProviders}):new p.DirectiveMetadata({selector:e.selector,inputs:l,outputs:s,host:h,exportAs:e.exportAs,queries:f,providers:e.providers})},e=i([s.Injectable(),o("design:paramtypes",[h.ReflectorReader])],e)}();t.DirectiveResolver=f,t.CODEGEN_DIRECTIVE_RESOLVER=new f(l.reflector)},function(e,t,n){"use strict";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(75),a=n(24),c=n(5),u=n(14),p=n(12),l=n(19),h=n(17),f=function(){function e(e){this._cache=new p.Map,c.isPresent(e)?this._reflector=e:this._reflector=h.reflector}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(this._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("Could not compile '"+c.stringify(e)+"' because it is not a component.");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' or 'templateUrl' 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",[l.ReflectorReader])],e)}();t.ViewResolver=f},function(e,t,n){"use strict";function r(e){return e.map(function(e){return e.nativeElement})}function i(e,t,n){e.childNodes.forEach(function(e){e instanceof y&&(t(e)&&n.push(e),i(e,t,n))})}function o(e,t,n){e instanceof y&&e.childNodes.forEach(function(e){t(e)&&n.push(e),e instanceof y&&o(e,t,n)})}function s(e){return v.get(e)}function a(){return h.MapWrapper.values(v)}function c(e){v.set(e.nativeNode,e)}function u(e){v["delete"](e.nativeNode)}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(5),h=n(12),f=function(){function e(e,t){this.name=e,this.callback=t}return e}();t.EventListener=f;var d=function(){function e(e,t){this.nativeNode=e,l.isPresent(t)&&t instanceof y?t.addChild(this):this.parent=null,this.listeners=[],this.providerTokens=[]}return e.prototype.setDebugInfo=function(e){this.injector=e.injector,this.providerTokens=e.providerTokens,this.locals=e.locals,this.componentInstance=e.component},e.prototype.inject=function(e){return this.injector.get(e)},e.prototype.getLocal=function(e){return this.locals.get(e)},e}();t.DebugNode=d;var y=function(e){function t(t,n){e.call(this,t,n),this.properties=new Map,this.attributes=new Map,this.childNodes=[],this.nativeElement=t}return p(t,e),t.prototype.addChild=function(e){l.isPresent(e)&&(this.childNodes.push(e),e.parent=this)},t.prototype.removeChild=function(e){var t=this.childNodes.indexOf(e);-1!==t&&(e.parent=null,this.childNodes.splice(t,1))},t.prototype.insertChildrenAfter=function(e,t){
9
+ var n=this.childNodes.indexOf(e);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,t),i);for(var o=0;o<t.length;++o){var s=t[o];l.isPresent(s.parent)&&s.parent.removeChild(s),s.parent=this}}},t.prototype.query=function(e){var t=this.queryAll(e);return t.length>0?t[0]:null},t.prototype.queryAll=function(e){var t=[];return i(this,e,t),t},t.prototype.queryAllNodes=function(e){var t=[];return o(this,e,t),t},Object.defineProperty(t.prototype,"children",{get:function(){var e=[];return this.childNodes.forEach(function(n){n instanceof t&&e.push(n)}),e},enumerable:!0,configurable:!0}),t.prototype.triggerEventHandler=function(e,t){this.listeners.forEach(function(n){n.name==e&&n.callback(t)})},t}(d);t.DebugElement=y,t.asNativeElements=r;var v=new Map;t.getDebugNode=s,t.getAllDebugNodes=a,t.indexDebugNode=c,t.removeDebugNodeFromIndex=u},function(e,t,n){"use strict";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){"use strict";function r(){return a.reflector}var i=n(5),o=n(6),s=n(100),a=n(17),c=n(19),u=n(83);t.PLATFORM_COMMON_PROVIDERS=i.CONST_EXPR([new o.Provider(a.Reflector,{useFactory:r,deps:[]}),new o.Provider(c.ReflectorReader,{useExisting:a.Reflector}),u.TestabilityRegistry,s.Console])},function(e,t,n){"use strict";var r=n(5),i=n(6),o=n(82),s=n(26),a=n(110),c=n(99),u=n(99),p=n(105),l=n(104),h=n(111),f=n(85),d=n(85),y=n(84),v=n(84);t.APPLICATION_COMMON_PROVIDERS=r.CONST_EXPR([new i.Provider(f.Compiler,{useClass:d.Compiler_}),o.APP_ID_RANDOM_PROVIDER,a.ResolvedMetadataCache,new i.Provider(c.AppViewManager,{useClass:u.AppViewManager_}),p.ViewResolver,new i.Provider(s.IterableDiffers,{useValue:s.defaultIterableDiffers}),new i.Provider(s.KeyValueDiffers,{useValue:s.defaultKeyValueDiffers}),l.DirectiveResolver,h.PipeResolver,new i.Provider(y.DynamicComponentLoader,{useClass:v.DynamicComponentLoader_})])},function(e,t,n){"use strict";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=n(87),c=n(104),u=n(94),p=n(111),l=function(){function e(e,t){this._directiveResolver=e,this._pipeResolver=t,this._directiveCache=new Map,this._pipeCache=new Map}return e.prototype.getResolvedDirectiveMetadata=function(e){var t=this._directiveCache.get(e);return s.isBlank(t)&&(t=a.DirectiveProvider.createFromType(e,this._directiveResolver.resolve(e)),this._directiveCache.set(e,t)),t},e.prototype.getResolvedPipeMetadata=function(e){var t=this._pipeCache.get(e);return s.isBlank(t)&&(t=u.PipeProvider.createFromType(e,this._pipeResolver.resolve(e)),this._pipeCache.set(e,t)),t},e=r([o.Injectable(),i("design:paramtypes",[c.DirectiveResolver,p.PipeResolver])],e)}();t.ResolvedMetadataCache=l,t.CODEGEN_RESOLVED_METADATA_CACHE=new l(c.CODEGEN_DIRECTIVE_RESOLVER,p.CODEGEN_PIPE_RESOLVER)},function(e,t,n){"use strict";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(19),l=n(17),h=function(){function e(e){a.isPresent(e)?this._reflector=e:this._reflector=l.reflector}return e.prototype.resolve=function(e){var t=this._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",[p.ReflectorReader])],e)}();t.PipeResolver=h,t.CODEGEN_PIPE_RESOLVER=new h(l.reflector)},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(113)),r(n(127)),r(n(136)),r(n(160))},function(e,t,n){"use strict";var r=n(114);t.AsyncPipe=r.AsyncPipe;var i=n(116);t.DatePipe=i.DatePipe;var o=n(118);t.JsonPipe=o.JsonPipe;var s=n(119);t.SlicePipe=s.SlicePipe;var a=n(120);t.LowerCasePipe=a.LowerCasePipe;var c=n(121);t.NumberPipe=c.NumberPipe,t.DecimalPipe=c.DecimalPipe,t.PercentPipe=c.PercentPipe,t.CurrencyPipe=c.CurrencyPipe;var u=n(122);t.UpperCasePipe=u.UpperCasePipe;var p=n(123);t.ReplacePipe=p.ReplacePipe;var l=n(124);t.I18nPluralPipe=l.I18nPluralPipe;var h=n(125);t.I18nSelectPipe=h.I18nSelectPipe;var f=n(126);t.COMMON_PIPES=f.COMMON_PIPES},function(e,t,n){"use strict";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(48),a=n(2),c=n(115),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._latestReturnedValue=this._latestValue,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){"use strict";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){"use strict";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(117),a=n(2),c=n(12),u=n(115),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){"use strict";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<e.length;){for(t=o;t<e.length&&e[t]==e[o];)t++;var s=t-o;switch(e[o]){case"G":i.era=r(s);break;case"y":i.year=n(s);break;case"M":s>=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){"use strict";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){"use strict";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(115),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){"use strict";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(115),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){"use strict";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(117),u=n(2),p=n(12),l=n(115),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 g=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=g},function(e,t,n){"use strict";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(115),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){"use strict";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(2),c=n(115),u=function(){function e(){}return e.prototype.transform=function(t,n){if(o.isBlank(n)||2!==n.length)throw new s.BaseException("ReplacePipe requires two arguments");if(o.isBlank(t))return t;if(!this._supportedInput(t))throw new c.InvalidPipeArgumentException(e,t);var r=t.toString(),i=n[0],a=n[1];if(!this._supportedPattern(i))throw new c.InvalidPipeArgumentException(e,i);if(!this._supportedReplacement(a))throw new c.InvalidPipeArgumentException(e,a);if(o.isFunction(a)){var u=o.isString(i)?o.RegExpWrapper.create(i):i;return o.StringWrapper.replaceAllMapped(r,u,a)}return i instanceof RegExp?o.StringWrapper.replaceAll(r,i,a):o.StringWrapper.replace(r,i,a)},e.prototype._supportedInput=function(e){return o.isString(e)||o.isNumber(e)},e.prototype._supportedPattern=function(e){return o.isString(e)||e instanceof RegExp},e.prototype._supportedReplacement=function(e){return o.isString(e)||o.isFunction(e)},e=r([a.Pipe({name:"replace"}),a.Injectable(),i("design:paramtypes",[])],e)}();t.ReplacePipe=u},function(e,t,n){"use strict";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(115),c=o.RegExpWrapper.create("#"),u=function(){function e(){}return e.prototype.transform=function(t,n){void 0===n&&(n=null);var r,i,s=n[0];if(!o.isStringMap(s))throw new a.InvalidPipeArgumentException(e,s);return r=0===t||1===t?"="+t:"other",i=o.isPresent(t)?t.toString():"",o.StringWrapper.replaceAll(s[r],c,i)},e=r([o.CONST(),s.Pipe({name:"i18nPlural",pure:!0}),s.Injectable(),i("design:paramtypes",[])],e)}();t.I18nPluralPipe=u},function(e,t,n){"use strict";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(12),a=n(2),c=n(115),u=function(){function e(){}return e.prototype.transform=function(t,n){void 0===n&&(n=null);var r=n[0];if(!o.isStringMap(r))throw new c.InvalidPipeArgumentException(e,r);return s.StringMapWrapper.contains(r,t)?r[t]:r.other},e=r([o.CONST(),a.Pipe({name:"i18nSelect",pure:!0}),a.Injectable(),i("design:paramtypes",[])],e)}();t.I18nSelectPipe=u},function(e,t,n){"use strict";var r=n(114),i=n(122),o=n(120),s=n(118),a=n(119),c=n(116),u=n(121),p=n(123),l=n(124),h=n(125),f=n(5);t.COMMON_PIPES=f.CONST_EXPR([r.AsyncPipe,i.UpperCasePipe,o.LowerCasePipe,s.JsonPipe,a.SlicePipe,u.DecimalPipe,u.PercentPipe,u.CurrencyPipe,c.DatePipe,p.ReplacePipe,l.I18nPluralPipe,h.I18nSelectPipe])},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(128);t.NgClass=i.NgClass;var o=n(129);t.NgFor=o.NgFor;var s=n(130);t.NgIf=s.NgIf;var a=n(131);t.NgStyle=a.NgStyle;var c=n(132);t.NgSwitch=c.NgSwitch,t.NgSwitchWhen=c.NgSwitchWhen,t.NgSwitchDefault=c.NgSwitchDefault;var u=n(133);t.NgPlural=u.NgPlural,t.NgPluralCase=u.NgPluralCase,t.NgLocalization=u.NgLocalization,r(n(134));var p=n(135);t.CORE_DIRECTIVES=p.CORE_DIRECTIVES},function(e,t,n){"use strict";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,this._iterableDiffer=null,this._keyValueDiffer=null,o.isPresent(e)&&(a.isListLikeIterable(e)?this._iterableDiffer=this._iterableDiffers.find(e).create(null):this._keyValueDiffer=this._keyValueDiffers.find(e).create(null))},enumerable:!0,configurable:!0}),e.prototype.ngDoCheck=function(){if(o.isPresent(this._iterableDiffer)){var e=this._iterableDiffer.diff(this._rawClass);o.isPresent(e)&&this._applyIterableChanges(e)}if(o.isPresent(this._keyValueDiffer)){var e=this._keyValueDiffer.diff(this._rawClass);o.isPresent(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){o.isPresent(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.nativeElement,n[r],t);else this._renderer.setElementClass(this._ngEl.nativeElement,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){"use strict";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(14),c=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){if(this._ngForOf=e,s.isBlank(this._differ)&&s.isPresent(e))try{this._differ=this._iterableDiffers.find(e).create(this._cdr,this._ngForTrackBy)}catch(t){throw new a.BaseException("Cannot find a differ supporting object '"+e+"' of type '"+s.getTypeNameForDebugging(e)+"'. NgFor only supports binding to Iterables such as Arrays.")}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTemplate",{set:function(e){s.isPresent(e)&&(this._templateRef=e)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ngForTrackBy",{set:function(e){this._ngForTrackBy=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=this,n=[];e.forEachRemovedItem(function(e){return n.push(new u(e,null))}),e.forEachMovedItem(function(e){return n.push(new u(e,null))});var r=this._bulkRemove(n);e.forEachAddedItem(function(e){return r.push(new u(e,null))}),this._bulkInsert(r);for(var i=0;i<r.length;i++)this._perViewChange(r[i].view,r[i].record);for(var i=0,o=this._viewContainer.length;o>i;i++){var s=this._viewContainer.get(i);s.setLocal("first",0===i),s.setLocal("last",i===o-1)}e.forEachIdentityChange(function(e){var n=t._viewContainer.get(e.currentIndex);n.setLocal("$implicit",e.item)})},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;t<e.length;t++){var n=e[t];s.isPresent(n.view)?this._viewContainer.insert(n.view,n.record.currentIndex):n.view=this._viewContainer.createEmbeddedView(this._templateRef,n.record.currentIndex)}return e},e=r([o.Directive({selector:"[ngFor][ngForOf]",inputs:["ngForTrackBy","ngForOf","ngForTemplate"]}),i("design:paramtypes",[o.ViewContainerRef,o.TemplateRef,o.IterableDiffers,o.ChangeDetectorRef])],e)}();t.NgFor=c;var u=function(){function e(e,t){this.record=e,this.view=t}return e}()},function(e,t,n){"use strict";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){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){"use strict";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.nativeElement,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){"use strict";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}();t.SwitchView=p;var 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;t<e.length;t++)e[t].destroy();this._activeViews=[]},e.prototype._activateViews=function(e){if(a.isPresent(e)){for(var t=0;t<e.length;t++)e[t].create();this._activeViews=e}},e.prototype._registerView=function(e,t){var n=this._valueViews.get(e);
10
+ a.isBlank(n)&&(n=[],this._valueViews.set(e,n)),n.push(t)},e.prototype._deregisterView=function(e,t){if(e!==u){var n=this._valueViews.get(e);1==n.length?this._valueViews["delete"](e):c.ListWrapper.remove(n,t)}},e=r([s.Directive({selector:"[ngSwitch]",inputs:["ngSwitch"]}),i("design:paramtypes",[])],e)}();t.NgSwitch=l;var h=function(){function e(e,t,n){this._value=u,this._switch=n,this._view=new p(e,t)}return Object.defineProperty(e.prototype,"ngSwitchWhen",{set:function(e){this._switch._onWhenValueChanged(this._value,e,this._view),this._value=e},enumerable:!0,configurable:!0}),e=r([s.Directive({selector:"[ngSwitchWhen]",inputs:["ngSwitchWhen"]}),o(2,s.Host()),i("design:paramtypes",[s.ViewContainerRef,s.TemplateRef,l])],e)}();t.NgSwitchWhen=h;var f=function(){function e(e,t,n){n._registerView(u,new p(e,t))}return e=r([s.Directive({selector:"[ngSwitchDefault]"}),o(2,s.Host()),i("design:paramtypes",[s.ViewContainerRef,s.TemplateRef,l])],e)}();t.NgSwitchDefault=f},function(e,t,n){"use strict";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=n(132),p="other",l=function(){function e(){}return e}();t.NgLocalization=l;var h=function(){function e(e,t,n){this.value=e,this._view=new u.SwitchView(n,t)}return e=r([s.Directive({selector:"[ngPluralCase]"}),o(0,s.Attribute("ngPluralCase")),i("design:paramtypes",[String,s.TemplateRef,s.ViewContainerRef])],e)}();t.NgPluralCase=h;var f=function(){function e(e){this._localization=e,this._caseViews=new c.Map,this.cases=null}return Object.defineProperty(e.prototype,"ngPlural",{set:function(e){this._switchValue=e,this._updateView()},enumerable:!0,configurable:!0}),e.prototype.ngAfterContentInit=function(){var e=this;this.cases.forEach(function(t){e._caseViews.set(e._formatValue(t),t._view)}),this._updateView()},e.prototype._updateView=function(){this._clearViews();var e=this._caseViews.get(this._switchValue);a.isPresent(e)||(e=this._getCategoryView(this._switchValue)),this._activateView(e)},e.prototype._clearViews=function(){a.isPresent(this._activeView)&&this._activeView.destroy()},e.prototype._activateView=function(e){a.isPresent(e)&&(this._activeView=e,this._activeView.create())},e.prototype._getCategoryView=function(e){var t=this._localization.getPluralCategory(e),n=this._caseViews.get(t);return a.isPresent(n)?n:this._caseViews.get(p)},e.prototype._isValueView=function(e){return"="===e.value[0]},e.prototype._formatValue=function(e){return this._isValueView(e)?this._stripValue(e.value):e.value},e.prototype._stripValue=function(e){return a.NumberWrapper.parseInt(e.substring(1),10)},r([s.ContentChildren(h),i("design:type",s.QueryList)],e.prototype,"cases",void 0),r([s.Input(),i("design:type",Number),i("design:paramtypes",[Number])],e.prototype,"ngPlural",null),e=r([s.Directive({selector:"[ngPlural]"}),i("design:paramtypes",[l])],e)}();t.NgPlural=f},function(e,t){"use strict"},function(e,t,n){"use strict";var r=n(5),i=n(128),o=n(129),s=n(130),a=n(131),c=n(132),u=n(133);t.CORE_DIRECTIVES=r.CONST_EXPR([i.NgClass,o.NgFor,s.NgIf,a.NgStyle,c.NgSwitch,c.NgSwitchWhen,c.NgSwitchDefault,u.NgPlural,u.NgPluralCase])},function(e,t,n){"use strict";var r=n(137);t.AbstractControl=r.AbstractControl,t.Control=r.Control,t.ControlGroup=r.ControlGroup,t.ControlArray=r.ControlArray;var i=n(138);t.AbstractControlDirective=i.AbstractControlDirective;var o=n(139);t.ControlContainer=o.ControlContainer;var s=n(140);t.NgControlName=s.NgControlName;var a=n(151);t.NgFormControl=a.NgFormControl;var c=n(152);t.NgModel=c.NgModel;var u=n(141);t.NgControl=u.NgControl;var p=n(153);t.NgControlGroup=p.NgControlGroup;var l=n(154);t.NgFormModel=l.NgFormModel;var h=n(155);t.NgForm=h.NgForm;var f=n(142);t.NG_VALUE_ACCESSOR=f.NG_VALUE_ACCESSOR;var d=n(145);t.DefaultValueAccessor=d.DefaultValueAccessor;var y=n(156);t.NgControlStatus=y.NgControlStatus;var v=n(147);t.CheckboxControlValueAccessor=v.CheckboxControlValueAccessor;var g=n(148);t.NgSelectOption=g.NgSelectOption,t.SelectControlValueAccessor=g.SelectControlValueAccessor;var m=n(157);t.FORM_DIRECTIVES=m.FORM_DIRECTIVES,t.RadioButtonState=m.RadioButtonState;var _=n(144);t.NG_VALIDATORS=_.NG_VALIDATORS,t.NG_ASYNC_VALIDATORS=_.NG_ASYNC_VALIDATORS,t.Validators=_.Validators;var b=n(158);t.RequiredValidator=b.RequiredValidator,t.MinLengthValidator=b.MinLengthValidator,t.MaxLengthValidator=b.MaxLengthValidator,t.PatternValidator=b.PatternValidator;var P=n(159);t.FormBuilder=P.FormBuilder;var C=n(159),w=n(149),R=n(5);t.FORM_PROVIDERS=R.CONST_EXPR([C.FormBuilder,w.RadioControlRegistry]),t.FORM_BINDINGS=t.FORM_PROVIDERS},function(e,t,n){"use strict";function r(e){return e instanceof l}function i(e,t){return a.isBlank(t)?null:(t instanceof Array||(t=t.split("/")),t instanceof Array&&p.ListWrapper.isEmpty(t)?null:t.reduce(function(e,t){if(e instanceof f)return a.isPresent(e.controls[t])?e.controls[t]:null;if(e instanceof d){var n=t;return a.isPresent(e.at(n))?e.at(n):null}return null},e))}function o(e){return u.PromiseWrapper.isPromise(e)?c.ObservableWrapper.fromPromise(e):e}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(5),c=n(48),u=n(49),p=n(12);t.VALID="VALID",t.INVALID="INVALID",t.PENDING="PENDING",t.isControl=r;var l=function(){function e(e,t){this.validator=e,this.asyncValidator=t,this._pristine=!0,this._touched=!1}return Object.defineProperty(e.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this._status===t.VALID},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return this._errors},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pristine",{get:function(){return this._pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"untouched",{get:function(){return!this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valueChanges",{get:function(){return this._valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"statusChanges",{get:function(){return this._statusChanges},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pending",{get:function(){return this._status==t.PENDING},enumerable:!0,configurable:!0}),e.prototype.markAsTouched=function(){this._touched=!0},e.prototype.markAsDirty=function(e){var t=(void 0===e?{}:e).onlySelf;t=a.normalizeBool(t),this._pristine=!1,a.isPresent(this._parent)&&!t&&this._parent.markAsDirty({onlySelf:t})},e.prototype.markAsPending=function(e){var n=(void 0===e?{}:e).onlySelf;n=a.normalizeBool(n),this._status=t.PENDING,a.isPresent(this._parent)&&!n&&this._parent.markAsPending({onlySelf:n})},e.prototype.setParent=function(e){this._parent=e},e.prototype.updateValueAndValidity=function(e){var n=void 0===e?{}:e,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==t.VALID||this._status==t.PENDING)&&this._runAsyncValidator(i),i&&(c.ObservableWrapper.callEmit(this._valueChanges,this._value),c.ObservableWrapper.callEmit(this._statusChanges,this._status)),a.isPresent(this._parent)&&!r&&this._parent.updateValueAndValidity({onlySelf:r,emitEvent:i})},e.prototype._runValidator=function(){return a.isPresent(this.validator)?this.validator(this):null},e.prototype._runAsyncValidator=function(e){var n=this;if(a.isPresent(this.asyncValidator)){this._status=t.PENDING,this._cancelExistingSubscription();var r=o(this.asyncValidator(this));this._asyncValidationSubscription=c.ObservableWrapper.subscribe(r,function(t){return n.setErrors(t,{emitEvent:e})})}},e.prototype._cancelExistingSubscription=function(){a.isPresent(this._asyncValidationSubscription)&&c.ObservableWrapper.dispose(this._asyncValidationSubscription)},e.prototype.setErrors=function(e,t){var n=(void 0===t?{}:t).emitEvent;n=a.isPresent(n)?n:!0,this._errors=e,this._status=this._calculateStatus(),n&&c.ObservableWrapper.callEmit(this._statusChanges,this._status),a.isPresent(this._parent)&&this._parent._updateControlsErrors()},e.prototype.find=function(e){return i(this,e)},e.prototype.getError=function(e,t){void 0===t&&(t=null);var n=a.isPresent(t)&&!p.ListWrapper.isEmpty(t)?this.find(t):this;return a.isPresent(n)&&a.isPresent(n._errors)?p.StringMapWrapper.get(n._errors,e):null},e.prototype.hasError=function(e,t){return void 0===t&&(t=null),a.isPresent(this.getError(e,t))},Object.defineProperty(e.prototype,"root",{get:function(){for(var e=this;a.isPresent(e._parent);)e=e._parent;return e},enumerable:!0,configurable:!0}),e.prototype._updateControlsErrors=function(){this._status=this._calculateStatus(),a.isPresent(this._parent)&&this._parent._updateControlsErrors()},e.prototype._initObservables=function(){this._valueChanges=new c.EventEmitter,this._statusChanges=new c.EventEmitter},e.prototype._calculateStatus=function(){return a.isPresent(this._errors)?t.INVALID:this._anyControlsHaveStatus(t.PENDING)?t.PENDING:this._anyControlsHaveStatus(t.INVALID)?t.INVALID:t.VALID},e}();t.AbstractControl=l;var h=function(e){function t(t,n,r){void 0===t&&(t=null),void 0===n&&(n=null),void 0===r&&(r=null),e.call(this,n,r),this._value=t,this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}return s(t,e),t.prototype.updateValue=function(e,t){var n=void 0===t?{}:t,r=n.onlySelf,i=n.emitEvent,o=n.emitModelToViewChange;o=a.isPresent(o)?o:!0,this._value=e,a.isPresent(this._onChange)&&o&&this._onChange(this._value),this.updateValueAndValidity({onlySelf:r,emitEvent:i})},t.prototype._updateValue=function(){},t.prototype._anyControlsHaveStatus=function(e){return!1},t.prototype.registerOnChange=function(e){this._onChange=e},t}(l);t.Control=h;var f=function(e){function t(t,n,r,i){void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),e.call(this,r,i),this.controls=t,this._optionals=a.isPresent(n)?n:{},this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return s(t,e),t.prototype.addControl=function(e,t){this.controls[e]=t,t.setParent(this)},t.prototype.removeControl=function(e){p.StringMapWrapper["delete"](this.controls,e)},t.prototype.include=function(e){p.StringMapWrapper.set(this._optionals,e,!0),this.updateValueAndValidity()},t.prototype.exclude=function(e){p.StringMapWrapper.set(this._optionals,e,!1),this.updateValueAndValidity()},t.prototype.contains=function(e){var t=p.StringMapWrapper.contains(this.controls,e);return t&&this._included(e)},t.prototype._setParentForControls=function(){var e=this;p.StringMapWrapper.forEach(this.controls,function(t,n){t.setParent(e)})},t.prototype._updateValue=function(){this._value=this._reduceValue()},t.prototype._anyControlsHaveStatus=function(e){var t=this,n=!1;return p.StringMapWrapper.forEach(this.controls,function(r,i){n=n||t.contains(i)&&r.status==e}),n},t.prototype._reduceValue=function(){return this._reduceChildren({},function(e,t,n){return e[n]=t.value,e})},t.prototype._reduceChildren=function(e,t){var n=this,r=e;return p.StringMapWrapper.forEach(this.controls,function(e,i){n._included(i)&&(r=t(r,e,i))}),r},t.prototype._included=function(e){var t=p.StringMapWrapper.contains(this._optionals,e);return!t||p.StringMapWrapper.get(this._optionals,e)},t}(l);t.ControlGroup=f;var d=function(e){function t(t,n,r){void 0===n&&(n=null),void 0===r&&(r=null),e.call(this,n,r),this.controls=t,this._initObservables(),this._setParentForControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return s(t,e),t.prototype.at=function(e){return this.controls[e]},t.prototype.push=function(e){this.controls.push(e),e.setParent(this),this.updateValueAndValidity()},t.prototype.insert=function(e,t){p.ListWrapper.insert(this.controls,e,t),t.setParent(this),this.updateValueAndValidity()},t.prototype.removeAt=function(e){p.ListWrapper.removeAt(this.controls,e),this.updateValueAndValidity()},Object.defineProperty(t.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),t.prototype._updateValue=function(){this._value=this.controls.map(function(e){return e.value})},t.prototype._anyControlsHaveStatus=function(e){return this.controls.some(function(t){return t.status==e})},t.prototype._setParentForControls=function(){var e=this;this.controls.forEach(function(t){t.setParent(e)})},t}(l);t.ControlArray=d},function(e,t,n){"use strict";var r=n(5),i=n(14),o=function(){function e(){}return Object.defineProperty(e.prototype,"control",{get:function(){return i.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return r.isPresent(this.control)?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return r.isPresent(this.control)?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"errors",{get:function(){return r.isPresent(this.control)?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"pristine",{get:function(){return r.isPresent(this.control)?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"dirty",{get:function(){return r.isPresent(this.control)?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"touched",{get:function(){return r.isPresent(this.control)?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"untouched",{get:function(){return r.isPresent(this.control)?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),e}();t.AbstractControlDirective=o},function(e,t,n){"use strict";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(138),o=function(e){function t(){e.apply(this,arguments)}return r(t,e),Object.defineProperty(t.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),t}(i.AbstractControlDirective);t.ControlContainer=o},function(e,t,n){"use strict";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(48),u=n(2),p=n(139),l=n(141),h=n(142),f=n(143),d=n(144),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){"use strict";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(138),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){"use strict";var r=n(2),i=n(5);t.NG_VALUE_ACCESSOR=i.CONST_EXPR(new r.OpaqueToken("NgValueAccessor"))},function(e,t,n){"use strict";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(b.normalizeValidator)):null}function c(e){return h.isPresent(e)?d.Validators.composeAsync(e.map(b.normalizeAsyncValidator)):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){h.hasConstructor(t,y.DefaultValueAccessor)?n=t:h.hasConstructor(t,g.CheckboxControlValueAccessor)||h.hasConstructor(t,v.NumberValueAccessor)||h.hasConstructor(t,m.SelectControlValueAccessor)||h.hasConstructor(t,_.RadioControlValueAccessor)?(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(144),y=n(145),v=n(146),g=n(147),m=n(148),_=n(149),b=n(150);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){"use strict";function r(e){return c.PromiseWrapper.isPromise(e)?e:u.ObservableWrapper.toPromise(e)}function i(e,t){return t.map(function(t){return t(e)})}function o(e,t){return t.map(function(t){return t(e)})}function s(e){var t=e.reduce(function(e,t){return a.isPresent(t)?p.StringMapWrapper.merge(e,t):e},{});return p.StringMapWrapper.isEmpty(t)?null:t}var a=n(5),c=n(49),u=n(48),p=n(12),l=n(2);t.NG_VALIDATORS=a.CONST_EXPR(new l.OpaqueToken("NgValidators")),t.NG_ASYNC_VALIDATORS=a.CONST_EXPR(new l.OpaqueToken("NgAsyncValidators"));var h=function(){function e(){}return e.required=function(e){return a.isBlank(e.value)||a.isString(e.value)&&""==e.value?{required:!0}:null},e.minLength=function(t){return function(n){if(a.isPresent(e.required(n)))return null;var r=n.value;return r.length<t?{minlength:{requiredLength:t,actualLength:r.length}}:null}},e.maxLength=function(t){return function(n){if(a.isPresent(e.required(n)))return null;var r=n.value;return r.length>t?{maxlength:{requiredLength:t,actualLength:r.length}}:null}},e.pattern=function(t){return function(n){if(a.isPresent(e.required(n)))return null;var r=new RegExp("^"+t+"$"),i=n.value;return r.test(i)?null:{pattern:{requiredPattern:"^"+t+"$",actualValue:i}}}},e.nullValidator=function(e){return null},e.compose=function(e){if(a.isBlank(e))return null;var t=e.filter(a.isPresent);return 0==t.length?null:function(e){return s(i(e,t))}},e.composeAsync=function(e){if(a.isBlank(e))return null;var t=e.filter(a.isPresent);return 0==t.length?null:function(e){var n=o(e,t).map(r);return c.PromiseWrapper.all(n).then(s)}},e}();t.Validators=h},function(e,t,n){"use strict";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(142),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.nativeElement,"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){"use strict";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(142),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.nativeElement,"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){"use strict";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(142),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.nativeElement,"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()"},providers:[c]}),i("design:paramtypes",[o.Renderer,o.ElementRef])],e)}();t.CheckboxControlValueAccessor=u},function(e,t,n){"use strict";function r(e,t){return p.isBlank(e)?""+t:(p.isPrimitive(t)||(t="Object"),p.StringWrapper.slice(e+": "+t,0,50))}function i(e){return e.split(":")[0]}var 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(2),u=n(142),p=n(5),l=n(12),h=p.CONST_EXPR(new c.Provider(u.NG_VALUE_ACCESSOR,{useExisting:c.forwardRef(function(){return f}),multi:!0})),f=function(){function e(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){}}return e.prototype.writeValue=function(e){this.value=e;var t=r(this._getOptionId(e),e);this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},e.prototype.registerOnChange=function(e){var t=this;this.onChange=function(n){e(t._getOptionValue(n))}},e.prototype.registerOnTouched=function(e){this.onTouched=e},e.prototype._registerOption=function(){return(this._idCounter++).toString()},e.prototype._getOptionId=function(e){for(var t=0,n=l.MapWrapper.keys(this._optionMap);t<n.length;t++){var r=n[t];if(p.looseIdentical(this._optionMap.get(r),e))return r}return null},e.prototype._getOptionValue=function(e){var t=this._optionMap.get(i(e));return p.isPresent(t)?t:e},e=o([c.Directive({selector:"select[ngControl],select[ngFormControl],select[ngModel]",host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[h]}),s("design:paramtypes",[c.Renderer,c.ElementRef])],e)}();t.SelectControlValueAccessor=f;var d=function(){function e(e,t,n){this._element=e,this._renderer=t,this._select=n,p.isPresent(this._select)&&(this.id=this._select._registerOption())}return Object.defineProperty(e.prototype,"ngValue",{set:function(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(r(this.id,e)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{set:function(e){this._setElementValue(e),p.isPresent(this._select)&&this._select.writeValue(this._select.value)},enumerable:!0,configurable:!0}),e.prototype._setElementValue=function(e){this._renderer.setElementProperty(this._element.nativeElement,"value",e)},e.prototype.ngOnDestroy=function(){p.isPresent(this._select)&&(this._select._optionMap["delete"](this.id),this._select.writeValue(this._select.value))},o([c.Input("ngValue"),s("design:type",Object),s("design:paramtypes",[Object])],e.prototype,"ngValue",null),o([c.Input("value"),s("design:type",Object),s("design:paramtypes",[Object])],e.prototype,"value",null),e=o([c.Directive({selector:"option"}),a(2,c.Optional()),a(2,c.Host()),s("design:paramtypes",[c.ElementRef,c.Renderer,f])],e)}();t.NgSelectOption=d},function(e,t,n){"use strict";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(142),a=n(141),c=n(5),u=n(12),p=c.CONST_EXPR(new o.Provider(s.NG_VALUE_ACCESSOR,{useExisting:o.forwardRef(function(){return f}),multi:!0})),l=function(){function e(){this._accessors=[]}return e.prototype.add=function(e,t){this._accessors.push([e,t])},e.prototype.remove=function(e){for(var t=-1,n=0;n<this._accessors.length;++n)this._accessors[n][1]===e&&(t=n);u.ListWrapper.removeAt(this._accessors,t)},e.prototype.select=function(e){this._accessors.forEach(function(t){t[0].control.root===e._control.control.root&&t[1]!==e&&t[1].fireUncheck()})},e=r([o.Injectable(),i("design:paramtypes",[])],e)}();t.RadioControlRegistry=l;var h=function(){function e(e,t){this.checked=e,this.value=t}return e}();t.RadioButtonState=h;var f=function(){function e(e,t,n,r){this._renderer=e,this._elementRef=t,this._registry=n,this._injector=r,this.onChange=function(){},this.onTouched=function(){}}return e.prototype.ngOnInit=function(){this._control=this._injector.get(a.NgControl),this._registry.add(this._control,this)},e.prototype.ngOnDestroy=function(){this._registry.remove(this)},e.prototype.writeValue=function(e){this._state=e,c.isPresent(e)&&e.checked&&this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",!0)},e.prototype.registerOnChange=function(e){var t=this;this._fn=e,this.onChange=function(){e(new h(!0,t._state.value)),t._registry.select(t)}},e.prototype.fireUncheck=function(){this._fn(new h(!1,this._state.value))},e.prototype.registerOnTouched=function(e){this.onTouched=e},r([o.Input(),i("design:type",String)],e.prototype,"name",void 0),e=r([o.Directive({selector:"input[type=radio][ngControl],input[type=radio][ngFormControl],input[type=radio][ngModel]",
11
+ host:{"(change)":"onChange()","(blur)":"onTouched()"},providers:[p]}),i("design:paramtypes",[o.Renderer,o.ElementRef,l,o.Injector])],e)}();t.RadioControlValueAccessor=f},function(e,t){"use strict";function n(e){return void 0!==e.validate?function(t){return e.validate(t)}:e}function r(e){return void 0!==e.validate?function(t){return Promise.resolve(e.validate(t))}:e}t.normalizeValidator=n,t.normalizeAsyncValidator=r},function(e,t,n){"use strict";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(48),p=n(2),l=n(141),h=n(144),f=n(142),d=n(143),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){"use strict";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(48),u=n(2),p=n(142),l=n(141),h=n(137),f=n(144),d=n(143),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){"use strict";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(139),p=n(143),l=n(144),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){"use strict";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(48),p=n(2),l=n(139),h=n(143),f=n(144),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){"use strict";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(48),c=n(12),u=n(5),p=n(2),l=n(139),h=n(137),f=n(143),d=n(144),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){"use strict";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(141),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){"use strict";var r=n(5),i=n(140),o=n(151),s=n(152),a=n(153),c=n(154),u=n(155),p=n(145),l=n(147),h=n(146),f=n(149),d=n(156),y=n(148),v=n(158),g=n(140);t.NgControlName=g.NgControlName;var m=n(151);t.NgFormControl=m.NgFormControl;var _=n(152);t.NgModel=_.NgModel;var b=n(153);t.NgControlGroup=b.NgControlGroup;var P=n(154);t.NgFormModel=P.NgFormModel;var C=n(155);t.NgForm=C.NgForm;var w=n(145);t.DefaultValueAccessor=w.DefaultValueAccessor;var R=n(147);t.CheckboxControlValueAccessor=R.CheckboxControlValueAccessor;var E=n(149);t.RadioControlValueAccessor=E.RadioControlValueAccessor,t.RadioButtonState=E.RadioButtonState;var O=n(146);t.NumberValueAccessor=O.NumberValueAccessor;var S=n(156);t.NgControlStatus=S.NgControlStatus;var A=n(148);t.SelectControlValueAccessor=A.SelectControlValueAccessor,t.NgSelectOption=A.NgSelectOption;var D=n(158);t.RequiredValidator=D.RequiredValidator,t.MinLengthValidator=D.MinLengthValidator,t.MaxLengthValidator=D.MaxLengthValidator,t.PatternValidator=D.PatternValidator;var x=n(141);t.NgControl=x.NgControl,t.FORM_DIRECTIVES=r.CONST_EXPR([i.NgControlName,a.NgControlGroup,o.NgFormControl,s.NgModel,c.NgFormModel,u.NgForm,y.NgSelectOption,p.DefaultValueAccessor,h.NumberValueAccessor,l.CheckboxControlValueAccessor,y.SelectControlValueAccessor,f.RadioControlValueAccessor,d.NgControlStatus,v.RequiredValidator,v.MinLengthValidator,v.MaxLengthValidator,v.PatternValidator])},function(e,t,n){"use strict";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(144),u=n(5),p=c.Validators.required,l=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useValue:p,multi:!0})),h=function(){function e(){}return e=r([s.Directive({selector:"[required][ngControl],[required][ngFormControl],[required][ngModel]",providers:[l]}),i("design:paramtypes",[])],e)}();t.RequiredValidator=h;var f=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return d}),multi:!0})),d=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:[f]}),o(0,s.Attribute("minlength")),i("design:paramtypes",[String])],e)}();t.MinLengthValidator=d;var y=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return v}),multi:!0})),v=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:[y]}),o(0,s.Attribute("maxlength")),i("design:paramtypes",[String])],e)}();t.MaxLengthValidator=v;var g=a.CONST_EXPR(new s.Provider(c.NG_VALIDATORS,{useExisting:s.forwardRef(function(){return m}),multi:!0})),m=function(){function e(e){this._validator=c.Validators.pattern(e)}return e.prototype.validate=function(e){return this._validator(e)},e=r([s.Directive({selector:"[pattern][ngControl],[pattern][ngFormControl],[pattern][ngModel]",providers:[g]}),o(0,s.Attribute("pattern")),i("design:paramtypes",[String])],e)}();t.PatternValidator=m},function(e,t,n){"use strict";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(137),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},function(e,t,n){"use strict";var r=n(5),i=n(136),o=n(127);t.COMMON_DIRECTIVES=r.CONST_EXPR([o.CORE_DIRECTIVES,i.FORM_DIRECTIVES])},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}r(n(162)),r(n(163)),r(n(164))},function(e,t,n){"use strict";function r(){return new g}function i(e){var t=s(e);return t&&t[m.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;s<r.length;s++){var a=r[s];switch(a){case"":case".":break;case"..":i.length>0?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[m.Path];return t=d.isBlank(t)?"":a(t),e[m.Path]=t,o(e[m.Scheme],e[m.UserInfo],e[m.Domain],e[m.Port],t,e[m.QueryData],e[m.Fragment])}function u(e,t){var n=s(encodeURI(t)),r=s(e);if(d.isPresent(n[m.Scheme]))return c(n);n[m.Scheme]=r[m.Scheme];for(var i=m.Scheme;i<=m.Port;i++)d.isBlank(n[i])&&(n[i]=r[i]);if("/"==n[m.Path][0])return c(n);var o=r[m.Path];d.isBlank(o)&&(o="/");var a=o.lastIndexOf("/");return o=o.substring(0,a+1)+n[m.Path],n[m.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(82),v=n(6);t.createWithoutPackagePrefix=r,t.DEFAULT_PACKAGE_URL_PROVIDER=new v.Provider(y.PACKAGE_ROOT_URL,{useValue:"/"});var g=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=g,t.getUrlScheme=i;var m,_=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"}(m||(m={}))},function(e,t){"use strict";var n=function(){function e(){}return e.prototype.get=function(e){return null},e}();t.XHR=n},function(e,t,n){"use strict";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(165),s=n(166);t.TemplateCompiler=s.TemplateCompiler;var a=n(167);t.CompileDirectiveMetadata=a.CompileDirectiveMetadata,t.CompileTypeMetadata=a.CompileTypeMetadata,t.CompileTemplateMetadata=a.CompileTemplateMetadata;var c=n(172);t.SourceModule=c.SourceModule,t.SourceWithImports=c.SourceWithImports;var u=n(107);t.PLATFORM_DIRECTIVES=u.PLATFORM_DIRECTIVES,t.PLATFORM_PIPES=u.PLATFORM_PIPES,r(n(171));var p=n(181);t.TEMPLATE_TRANSFORMS=p.TEMPLATE_TRANSFORMS;var l=n(5),h=n(6),f=n(181),d=n(182),y=n(189),v=n(190),g=n(173),m=n(176),_=n(179),b=n(180),P=n(166),C=n(26),w=n(85),R=n(165),E=n(187),O=n(193),S=n(162),A=n(26);t.COMPILER_PROVIDERS=l.CONST_EXPR([A.Lexer,A.Parser,d.HtmlParser,f.TemplateParser,y.TemplateNormalizer,v.RuntimeMetadataResolver,S.DEFAULT_PACKAGE_URL_PROVIDER,m.StyleCompiler,b.ProtoViewCompiler,_.ViewCompiler,g.ChangeDetectionCompiler,new h.Provider(C.ChangeDetectorGenConfig,{useFactory:i,deps:[]}),P.TemplateCompiler,new h.Provider(R.RuntimeCompiler,{useClass:o.RuntimeCompiler_}),new h.Provider(w.Compiler,{useExisting:R.RuntimeCompiler}),O.DomElementSchemaRegistry,new h.Provider(E.ElementSchemaRegistry,{useExisting:O.DomElementSchemaRegistry}),S.UrlResolver])},function(e,t,n){"use strict";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(85),a=n(95),c=n(166),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){e.call(this),this._templateCompiler=t}return r(t,e),t.prototype.compileInHost=function(e){return this._templateCompiler.compileHostComponentRuntime(e).then(function(e){return new a.HostViewFactoryRef_(e)})},t.prototype.clearCache=function(){e.prototype.clearCache.call(this),this._templateCompiler.clearCache()},t=i([u.Injectable(),o("design:paramtypes",[c.TemplateCompiler])],t)}(s.Compiler_);t.RuntimeCompiler_=l},function(e,t,n){"use strict";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){var t=e.substring(0,e.length-x.MODULE_SUFFIX.length);return t+".template"+x.MODULE_SUFFIX}function o(e){return"hostViewFactory_"+e.name}function s(e){return _.moduleRef(i(e.type.moduleUrl))+"viewFactory_"+e.type.name+"0"}function a(e){var t={};return e.forEach(function(e){d.StringMapWrapper.forEach(e,function(e,n){t[n]=e})}),t}function c(e){var t=[];return e.forEach(function(e){var n=t.filter(function(t){return t.type.name==e.type.name&&t.type.moduleUrl==e.type.moduleUrl&&t.type.runtime==e.type.runtime}).length>0;n||t.push(e)}),t}function u(e,t){var n=new M;return g.templateVisitAll(n,e),t.filter(function(e){return d.SetWrapper.has(n.collector.pipes,e.name)})}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(48),v=n(167),g=n(171),m=n(6),_=n(172),b=n(173),P=n(176),C=n(179),w=n(180),R=n(181),E=n(189),O=n(190),S=n(86),A=n(26),D=n(110),x=n(169);t.METADATA_CACHE_MODULE_REF=_.moduleRef("package:angular2/src/core/linker/resolved_metadata_cache"+x.MODULE_SUFFIX);var T=function(){function e(e,t,n,r,i,o,s,a,c){this._runtimeMetadataResolver=e,this._templateNormalizer=t,this._templateParser=n,this._styleCompiler=r,this._cdCompiler=i,this._protoViewCompiler=o,this._viewCompiler=s,this._resolvedMetadataCache=a,this._genConfig=c,this._hostCacheKeys=new Map,this._compiledTemplateCache=new Map,this._compiledTemplateDone=new Map}return e.prototype.normalizeDirectiveMetadata=function(e){return e.isComponent?this._templateNormalizer.normalizeTemplate(e.type,e.template).then(function(t){return new v.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,providers:e.providers,viewProviders:e.viewProviders,queries:e.queries,viewQueries:e.viewQueries,template:t})}):y.PromiseWrapper.resolve(e)},e.prototype.compileHostComponentRuntime=function(e){var t=this._runtimeMetadataResolver.getDirectiveMetadata(e),n=this._hostCacheKeys.get(e);if(h.isBlank(n)){n=new Object,this._hostCacheKeys.set(e,n),r(t);var i=v.createHostComponentMeta(t.type,t.selector);this._compileComponentRuntime(n,i,[t],[],[])}return this._compiledTemplateDone.get(n).then(function(e){return new S.HostViewFactory(t.selector,e.viewFactory)})},e.prototype.clearCache=function(){this._styleCompiler.clearCache(),this._compiledTemplateCache.clear(),this._compiledTemplateDone.clear(),this._hostCacheKeys.clear()},e.prototype.compileTemplatesCodeGen=function(e){var t=this;if(0===e.length)throw new f.BaseException("No components given");var n=[];e.forEach(function(e){var i=e.component;if(r(i),t._compileComponentCodeGen(i,e.directives,e.pipes,n),i.dynamicLoadable){var s=v.createHostComponentMeta(i.type,i.selector),a=t._compileComponentCodeGen(s,[i],[],n),c=h.IS_DART?"const":"new",u=c+" "+w.APP_VIEW_MODULE_REF+"HostViewFactory('"+i.selector+"',"+a+")",p=o(i.type);n.push(""+x.codeGenExportVariable(p)+u+";")}});var s=e[0].component.type.moduleUrl;return new _.SourceModule(""+i(s),n.join("\n"))},e.prototype.compileStylesheetCodeGen=function(e,t){return this._styleCompiler.compileStylesheetCodeGen(e,t)},e.prototype._compileComponentRuntime=function(e,t,n,r,i){var o=this,s=c(n),a=c(r),p=this._compiledTemplateCache.get(e),l=this._compiledTemplateDone.get(e);return h.isBlank(p)&&(p=new N,this._compiledTemplateCache.set(e,p),l=y.PromiseWrapper.all([this._styleCompiler.compileComponentRuntime(t.template)].concat(s.map(function(e){return o.normalizeDirectiveMetadata(e)}))).then(function(e){var n=e.slice(1),r=e[0],s=o._templateParser.parse(t.template.template,n,a,t.type.name),c=[],l=k.findUsedDirectives(s);return l.components.forEach(function(e){return o._compileNestedComponentRuntime(e,i,c)}),y.PromiseWrapper.all(c).then(function(e){var n=u(s,a);return p.init(o._createViewFactoryRuntime(t,s,l.directives,r,n)),p})}),this._compiledTemplateDone.set(e,l)),p},e.prototype._compileNestedComponentRuntime=function(e,t,n){var r=d.ListWrapper.clone(t),i=e.type.runtime,o=this._runtimeMetadataResolver.getViewDirectivesMetadata(e.type.runtime),s=this._runtimeMetadataResolver.getViewPipesMetadata(e.type.runtime),a=d.ListWrapper.contains(r,i);
12
+ r.push(i),this._compileComponentRuntime(i,e,o,s,r),a||n.push(this._compiledTemplateDone.get(i))},e.prototype._createViewFactoryRuntime=function(e,t,n,r,i){var o=this;if(h.IS_DART||!this._genConfig.useJit){var s=this._cdCompiler.compileComponentRuntime(e.type,e.changeDetection,t),c=this._protoViewCompiler.compileProtoViewRuntime(this._resolvedMetadataCache,e,t,i);return this._viewCompiler.compileComponentRuntime(e,t,r,c.protoViews,s,function(e){return o._getNestedComponentViewFactory(e)})}var u=[],p=this._createViewFactoryCodeGen("resolvedMetadataCache",e,new _.SourceExpression([],"styles"),t,i,u),l={exports:{},styles:r,resolvedMetadataCache:this._resolvedMetadataCache};n.forEach(function(t){l[t.type.name]=t.type.runtime,t.isComponent&&t.type.runtime!==e.type.runtime&&(l["viewFactory_"+t.type.name+"0"]=o._getNestedComponentViewFactory(t))}),i.forEach(function(e){return l[e.type.name]=e.type.runtime});var f=_.SourceModule.getSourceWithoutImports(u.join("\n"));return h.evalExpression("viewFactory_"+e.type.name,p,f,a([l,b.CHANGE_DETECTION_JIT_IMPORTS,w.PROTO_VIEW_JIT_IMPORTS,C.VIEW_JIT_IMPORTS]))},e.prototype._getNestedComponentViewFactory=function(e){return this._compiledTemplateCache.get(e.type.runtime).viewFactory},e.prototype._compileComponentCodeGen=function(e,n,r,i){var o=c(n),s=c(r),a=this._styleCompiler.compileComponentCodeGen(e.template),p=this._templateParser.parse(e.template.template,o,s,e.type.name),l=u(p,s);return this._createViewFactoryCodeGen(t.METADATA_CACHE_MODULE_REF+"CODEGEN_RESOLVED_METADATA_CACHE",e,a,p,l,i)},e.prototype._createViewFactoryCodeGen=function(e,t,n,r,i,o){var a=this._cdCompiler.compileComponentCodeGen(t.type,t.changeDetection,r),c=this._protoViewCompiler.compileProtoViewCodeGen(new x.Expression(e),t,r,i),u=this._viewCompiler.compileComponentCodeGen(t,r,n,c.protoViews,a,s);return x.addAll(a.declarations,o),x.addAll(c.declarations,o),x.addAll(u.declarations,o),u.expression},e=p([m.Injectable(),l("design:paramtypes",[O.RuntimeMetadataResolver,E.TemplateNormalizer,R.TemplateParser,P.StyleCompiler,b.ChangeDetectionCompiler,w.ProtoViewCompiler,C.ViewCompiler,D.ResolvedMetadataCache,A.ChangeDetectorGenConfig])],e)}();t.TemplateCompiler=T;var I=function(){function e(e,t,n){this.component=e,this.directives=t,this.pipes=n}return e}();t.NormalizedComponentWithViewDirectives=I;var N=function(){function e(){this.viewFactory=null}return e.prototype.init=function(e){this.viewFactory=e},e}(),k=function(){function e(){this.directives=[],this.components=[]}return e.findUsedDirectives=function(t){var n=new e;return g.templateVisitAll(n,t),n},e.prototype.visitBoundText=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){return g.templateVisitAll(this,e.directives),g.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){return g.templateVisitAll(this,e.directives),g.templateVisitAll(this,e.children),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitDirective=function(e,t){return e.directive.isComponent&&this.components.push(e.directive),this.directives.push(e.directive),null},e.prototype.visitEvent=function(e,t){return null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}(),M=function(){function e(){this.collector=new R.PipeCollector}return e.prototype.visitBoundText=function(e,t){return e.value.visit(this.collector),null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){return g.templateVisitAll(this,e.inputs),g.templateVisitAll(this,e.outputs),g.templateVisitAll(this,e.directives),g.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){return g.templateVisitAll(this,e.outputs),g.templateVisitAll(this,e.directives),g.templateVisitAll(this,e.children),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitDirective=function(e,t){return g.templateVisitAll(this,e.inputs),g.templateVisitAll(this,e.hostEvents),g.templateVisitAll(this,e.hostProperties),null},e.prototype.visitEvent=function(e,t){return e.handler.visit(this.collector),null},e.prototype.visitDirectiveProperty=function(e,t){return e.value.visit(this.collector),null},e.prototype.visitElementProperty=function(e,t){return e.value.visit(this.collector),null},e}()},function(e,t,n){"use strict";function r(e){return x[e["class"]](e)}function i(e,t){var n=y.CssSelector.parse(t)[0].getMatchingElementTemplate();return A.create({type:new E({runtime:Object,name:"Host"+e.name,moduleUrl:e.moduleUrl,isHost:!0}),template:new S({template:n,templateUrl:"",styles:[],styleUrls:[],ngContentSelectors:[]}),changeDetection:f.ChangeDetectionStrategy.Default,inputs:[],outputs:[],host:{},lifecycleHooks:[],isComponent:!0,dynamicLoadable:!1,selector:"*",providers:[],viewProviders:[],queries:[],viewQueries:[]})}function o(e,t){return p.isBlank(e)?null:e.map(function(e){return a(e,t)})}function s(e){return p.isBlank(e)?null:e.map(c)}function a(e,t){return p.isArray(e)?o(e,t):p.isString(e)||p.isBlank(e)||p.isBoolean(e)||p.isNumber(e)?e:t(e)}function c(e){return p.isArray(e)?s(e):p.isString(e)||p.isBlank(e)||p.isBoolean(e)||p.isNumber(e)?e:e.toJson()}var u=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)},p=n(5),l=n(14),h=n(12),f=n(26),d=n(75),y=n(168),v=n(169),g=n(170),m=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))$/g,_=function(){function e(){}return Object.defineProperty(e.prototype,"identifier",{get:function(){return l.unimplemented()},enumerable:!0,configurable:!0}),e}();t.CompileMetadataWithIdentifier=_;var b=function(e){function t(){e.apply(this,arguments)}return u(t,e),Object.defineProperty(t.prototype,"type",{get:function(){return l.unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"identifier",{get:function(){return l.unimplemented()},enumerable:!0,configurable:!0}),t}(_);t.CompileMetadataWithType=b,t.metadataFromJson=r;var P=function(){function e(e){var t=void 0===e?{}:e,n=t.runtime,r=t.name,i=t.moduleUrl,o=t.prefix,s=t.constConstructor,a=t.value;this.runtime=n,this.name=r,this.prefix=o,this.moduleUrl=i,this.constConstructor=s,this.value=a}return e.fromJson=function(t){var n=p.isArray(t.value)?o(t.value,r):a(t.value,r);return new e({name:t.name,prefix:t.prefix,moduleUrl:t.moduleUrl,constConstructor:t.constConstructor,value:n})},e.prototype.toJson=function(){var e=p.isArray(this.value)?s(this.value):c(this.value);return{"class":"Identifier",name:this.name,moduleUrl:this.moduleUrl,prefix:this.prefix,constConstructor:this.constConstructor,value:e}},Object.defineProperty(e.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),e}();t.CompileIdentifierMetadata=P;var C=function(){function e(e){var t=void 0===e?{}:e,n=t.isAttribute,r=t.isSelf,i=t.isHost,o=t.isSkipSelf,s=t.isOptional,a=t.query,c=t.viewQuery,u=t.token;this.isAttribute=p.normalizeBool(n),this.isSelf=p.normalizeBool(r),this.isHost=p.normalizeBool(i),this.isSkipSelf=p.normalizeBool(o),this.isOptional=p.normalizeBool(s),this.query=a,this.viewQuery=c,this.token=u}return e.fromJson=function(t){return new e({token:a(t.token,P.fromJson),query:a(t.query,O.fromJson),viewQuery:a(t.viewQuery,O.fromJson),isAttribute:t.isAttribute,isSelf:t.isSelf,isHost:t.isHost,isSkipSelf:t.isSkipSelf,isOptional:t.isOptional})},e.prototype.toJson=function(){return{token:c(this.token),query:c(this.query),viewQuery:c(this.viewQuery),isAttribute:this.isAttribute,isSelf:this.isSelf,isHost:this.isHost,isSkipSelf:this.isSkipSelf,isOptional:this.isOptional}},e}();t.CompileDiDependencyMetadata=C;var w=function(){function e(e){var t=e.token,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.deps=s,this.multi=a}return e.fromJson=function(t){return new e({token:a(t.token,P.fromJson),useClass:a(t.useClass,E.fromJson),useExisting:a(t.useExisting,P.fromJson),useValue:a(t.useValue,P.fromJson),useFactory:a(t.useFactory,R.fromJson)})},e.prototype.toJson=function(){return{"class":"Provider",token:c(this.token),useClass:c(this.useClass),useExisting:c(this.useExisting),useValue:c(this.useValue),useFactory:c(this.useFactory)}},e}();t.CompileProviderMetadata=w;var R=function(){function e(e){var t=e.runtime,n=e.name,r=e.moduleUrl,i=e.prefix,o=e.constConstructor,s=e.diDeps,a=e.value;this.runtime=t,this.name=n,this.prefix=i,this.moduleUrl=r,this.diDeps=s,this.constConstructor=o,this.value=a}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),e.fromJson=function(t){return new e({name:t.name,prefix:t.prefix,moduleUrl:t.moduleUrl,constConstructor:t.constConstructor,value:t.value,diDeps:o(t.diDeps,C.fromJson)})},e.prototype.toJson=function(){return{"class":"Factory",name:this.name,prefix:this.prefix,moduleUrl:this.moduleUrl,constConstructor:this.constConstructor,value:this.value,diDeps:s(this.diDeps)}},e}();t.CompileFactoryMetadata=R;var E=function(){function e(e){var t=void 0===e?{}:e,n=t.runtime,r=t.name,i=t.moduleUrl,o=t.prefix,s=t.isHost,a=t.constConstructor,c=t.value,u=t.diDeps;this.runtime=n,this.name=r,this.moduleUrl=i,this.prefix=o,this.isHost=p.normalizeBool(s),this.constConstructor=a,this.value=c,this.diDeps=p.normalizeBlank(u)}return e.fromJson=function(t){return new e({name:t.name,moduleUrl:t.moduleUrl,prefix:t.prefix,isHost:t.isHost,constConstructor:t.constConstructor,value:t.value,diDeps:o(t.diDeps,C.fromJson)})},Object.defineProperty(e.prototype,"identifier",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this},enumerable:!0,configurable:!0}),e.prototype.toJson=function(){return{"class":"Type",name:this.name,moduleUrl:this.moduleUrl,prefix:this.prefix,isHost:this.isHost,constConstructor:this.constConstructor,value:this.value,diDeps:s(this.diDeps)}},e}();t.CompileTypeMetadata=E;var O=function(){function e(e){var t=void 0===e?{}:e,n=t.selectors,r=t.descendants,i=t.first,o=t.propertyName;this.selectors=n,this.descendants=r,this.first=p.normalizeBool(i),this.propertyName=o}return e.fromJson=function(t){return new e({selectors:o(t.selectors,P.fromJson),descendants:t.descendants,first:t.first,propertyName:t.propertyName})},e.prototype.toJson=function(){return{selectors:s(this.selectors),descendants:this.descendants,first:this.first,propertyName:this.propertyName}},e}();t.CompileQueryMetadata=O;var S=function(){function e(e){var t=void 0===e?{}:e,n=t.encapsulation,r=t.template,i=t.templateUrl,o=t.styles,s=t.styleUrls,a=t.ngContentSelectors;this.encapsulation=p.isPresent(n)?n:d.ViewEncapsulation.Emulated,this.template=r,this.templateUrl=i,this.styles=p.isPresent(o)?o:[],this.styleUrls=p.isPresent(s)?s:[],this.ngContentSelectors=p.isPresent(a)?a:[]}return e.fromJson=function(t){return new e({encapsulation:p.isPresent(t.encapsulation)?d.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:p.isPresent(this.encapsulation)?p.serializeEnum(this.encapsulation):this.encapsulation,template:this.template,templateUrl:this.templateUrl,styles:this.styles,styleUrls:this.styleUrls,ngContentSelectors:this.ngContentSelectors}},e}();t.CompileTemplateMetadata=S;var A=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,l=t.hostListeners,h=t.hostProperties,f=t.hostAttributes,d=t.lifecycleHooks,y=t.providers,v=t.viewProviders,g=t.queries,m=t.viewQueries,_=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=l,this.hostProperties=h,this.hostAttributes=f,this.lifecycleHooks=d,this.providers=p.normalizeBlank(y),this.viewProviders=p.normalizeBlank(v),this.queries=p.normalizeBlank(g),this.viewQueries=p.normalizeBlank(m),this.template=_}return e.create=function(t){var n=void 0===t?{}:t,r=n.type,i=n.isComponent,o=n.dynamicLoadable,s=n.selector,a=n.exportAs,c=n.changeDetection,u=n.inputs,l=n.outputs,f=n.host,d=n.lifecycleHooks,y=n.providers,g=n.viewProviders,_=n.queries,b=n.viewQueries,P=n.template,C={},w={},R={};p.isPresent(f)&&h.StringMapWrapper.forEach(f,function(e,t){var n=p.RegExpWrapper.firstMatch(m,t);p.isBlank(n)?R[t]=e:p.isPresent(n[1])?w[n[1]]=e:p.isPresent(n[2])&&(C[n[2]]=e)});var E={};p.isPresent(u)&&u.forEach(function(e){var t=v.splitAtColon(e,[e,e]);E[t[0]]=t[1]});var O={};return p.isPresent(l)&&l.forEach(function(e){var t=v.splitAtColon(e,[e,e]);O[t[0]]=t[1]}),new e({type:r,isComponent:p.normalizeBool(i),dynamicLoadable:p.normalizeBool(o),selector:s,exportAs:a,changeDetection:c,inputs:E,outputs:O,hostListeners:C,hostProperties:w,hostAttributes:R,lifecycleHooks:p.isPresent(d)?d:[],providers:y,viewProviders:g,queries:_,viewQueries:b,template:P})},Object.defineProperty(e.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),e.fromJson=function(t){return new e({isComponent:t.isComponent,dynamicLoadable:t.dynamicLoadable,selector:t.selector,exportAs:t.exportAs,type:p.isPresent(t.type)?E.fromJson(t.type):t.type,changeDetection:p.isPresent(t.changeDetection)?f.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 g.LIFECYCLE_HOOKS_VALUES[e]}),template:p.isPresent(t.template)?S.fromJson(t.template):t.template,providers:o(t.providers,r),viewProviders:o(t.viewProviders,r),queries:o(t.queries,O.fromJson),viewQueries:o(t.viewQueries,O.fromJson)})},e.prototype.toJson=function(){return{"class":"Directive",isComponent:this.isComponent,dynamicLoadable:this.dynamicLoadable,selector:this.selector,exportAs:this.exportAs,type:p.isPresent(this.type)?this.type.toJson():this.type,changeDetection:p.isPresent(this.changeDetection)?p.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 p.serializeEnum(e)}),template:p.isPresent(this.template)?this.template.toJson():this.template,providers:s(this.providers),viewProviders:s(this.viewProviders),queries:s(this.queries),viewQueries:s(this.viewQueries)}},e}();t.CompileDirectiveMetadata=A,t.createHostComponentMeta=i;var D=function(){function e(e){var t=void 0===e?{}:e,n=t.type,r=t.name,i=t.pure;this.type=n,this.name=r,this.pure=p.normalizeBool(i)}return Object.defineProperty(e.prototype,"identifier",{get:function(){return this.type},enumerable:!0,configurable:!0}),e.fromJson=function(t){return new e({type:p.isPresent(t.type)?E.fromJson(t.type):t.type,name:t.name,pure:t.pure})},e.prototype.toJson=function(){return{"class":"Pipe",type:p.isPresent(this.type)?this.type.toJson():null,name:this.name,pure:this.pure}},e}();t.CompilePipeMetadata=D;var x={Directive:A.fromJson,Pipe:D.fromJson,Type:E.fromJson,Provider:w.fromJson,Identifier:P.fromJson,Factory:R.fromJson}},function(e,t,n){"use strict";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<this.attrs.length;r+=2){var o=this.attrs[r],s=""!==this.attrs[r+1]?'="'+this.attrs[r+1]+'"':"";n+=" "+o+s}return"<"+e+t+n+"></"+e+">"},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;t<this.classNames.length;t++)e+="."+this.classNames[t];if(i.isPresent(this.attrs))for(var t=0;t<this.attrs.length;){var n=this.attrs[t++],r=this.attrs[t++];e+="["+n,r.length>0&&(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;r<e.length;r++)this._addSelectable(e[r],t,n)},e.prototype._addSelectable=function(e,t,n){var o=this,s=e.element,a=e.classNames,c=e.attrs,u=new l(e,t,n);if(i.isPresent(s)){var p=0===c.length&&0===a.length;p?this._addTerminal(o._elementMap,s,u):o=this._addPartial(o._elementPartialMap,s)}if(i.isPresent(a))for(var h=0;h<a.length;h++){var p=0===c.length&&h===a.length-1,f=a[h];p?this._addTerminal(o._classMap,f,u):o=this._addPartial(o._classPartialMap,f)}if(i.isPresent(c))for(var h=0;h<c.length;){var p=h===c.length-2,d=c[h++],y=c[h++];if(p){var v=o._attrValueMap,g=v.get(d);i.isBlank(g)&&(g=new r.Map,v.set(d,g)),this._addTerminal(g,y,u)}else{var m=o._attrValuePartialMap,_=m.get(d);i.isBlank(_)&&(_=new r.Map,m.set(d,_)),o=this._addPartial(_,y)}}},e.prototype._addTerminal=function(e,t,n){var r=e.get(t);i.isBlank(r)&&(r=[],e.set(t,r)),r.push(n)},e.prototype._addPartial=function(t,n){var r=t.get(n);return i.isBlank(r)&&(r=new e,t.set(n,r)),r},e.prototype.match=function(e,t){for(var n=!1,r=e.element,o=e.classNames,a=e.attrs,c=0;c<this._listContexts.length;c++)this._listContexts[c].alreadyMatched=!1;if(n=this._matchTerminal(this._elementMap,r,e,t)||n,n=this._matchPartial(this._elementPartialMap,r,e,t)||n,i.isPresent(o))for(var u=0;u<o.length;u++){var p=o[u];n=this._matchTerminal(this._classMap,p,e,t)||n,n=this._matchPartial(this._classPartialMap,p,e,t)||n}if(i.isPresent(a))for(var u=0;u<a.length;){var l=a[u++],h=a[u++],f=this._attrValueMap.get(l);i.StringWrapper.equals(h,s)||(n=this._matchTerminal(f,s,e,t)||n),n=this._matchTerminal(f,h,e,t)||n;var d=this._attrValuePartialMap.get(l);i.StringWrapper.equals(h,s)||(n=this._matchPartial(d,s,e,t)||n),n=this._matchPartial(d,h,e,t)||n}return n},e.prototype._matchTerminal=function(e,t,n,r){if(i.isBlank(e)||i.isBlank(t))return!1;var o=e.get(t),s=e.get("*");if(i.isPresent(s)&&(o=o.concat(s)),i.isBlank(o))return!1;for(var a,c=!1,u=0;u<o.length;u++)a=o[u],c=a.finalize(n,r)||c;return c},e.prototype._matchPartial=function(e,t,n,r){if(i.isBlank(e)||i.isBlank(t))return!1;var o=e.get(t);return i.isBlank(o)?!1:o.match(n,r)},e}();t.SelectorMatcher=u;var p=function(){function e(e){this.selectors=e,this.alreadyMatched=!1}return e}();t.SelectorListContext=p;var l=function(){function e(e,t,n){this.selector=e,this.cbContext=t,this.listContext=n,this.notSelectors=e.notSelectors}return e.prototype.finalize=function(e,t){var n=!0;if(this.notSelectors.length>0&&(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){"use strict";function r(e){return P.StringWrapper.replaceAllMapped(e,C,function(e){return"-"+e[1].toLowerCase()})}function i(e){return P.StringWrapper.replaceAllMapped(e,w,function(e){return e[1].toUpperCase()})}function o(e){return P.isBlank(e)?null:"'"+a(e,R)+"'"}function s(e){return P.isBlank(e)?null:'"'+a(e,E)+'"'}function a(e,t){return P.StringWrapper.replaceAllMapped(e,t,function(e){return"$"==e[0]?P.IS_DART?"\\$":"$":"\n"==e[0]?"\\n":"\r"==e[0]?"\\r":"\\"+e[0]})}function c(e){return P.IS_DART?"const "+e+" = ":"var "+e+" = exports['"+e+"'] = "}function u(e){return P.IS_DART?"const "+e:"new "+e}function p(e,t,n){return void 0===n&&(n=""),P.IS_DART?l(e,n)+" => "+t:l(e,n)+" { return "+t+"; }"}function l(e,t){return void 0===t&&(t=""),P.IS_DART?t+"("+e.join(",")+")":"function "+t+"("+e.join(",")+")"}function h(e){return P.IS_DART?"'${"+e+"}'":e}function f(e,t){var n=P.StringWrapper.split(e.trim(),/\s*:\s*/g);return n.length>1?n:t}function d(e){return e instanceof S?e.expression:P.isString(e)?o(e):P.isBlank(e)?"null":""+e}function y(e){return"["+e.map(d).join(",")+"]"}function v(e){for(var t="([",n=!0,r=P.IS_DART?".addAll":"concat",i=0;i<e.length;i++){var o=e[i];o instanceof S&&o.isArray?(t+="])."+r+"("+o.expression+")."+r+"([",n=!0):(n||(t+=","),n=!1,t+=d(o))}return t+="])"}function g(e){return"{"+e.map(m).join(",")+"}"}function m(e){return d(e[0])+":"+d(e[1])}function _(e,t){for(var n=0;n<e.length;n++)t.push(e[n])}function b(e,t){if(P.isPresent(e))for(var n=0;n<e.length;n++){var r=e[n];P.isArray(r)?b(r,t):t.push(r)}return t}var P=n(5),C=/([A-Z])/g,w=/-([a-z])/g,R=/'|\\|\n|\r|\$/g,E=/"|\\|\n|\r|\$/g;t.MODULE_SUFFIX=P.IS_DART?".dart":".js",t.CONST_VAR=P.IS_DART?"const":"var",t.camelCaseToDashCase=r,t.dashCaseToCamelCase=i,t.escapeSingleQuoteString=o,t.escapeDoubleQuoteString=s,t.codeGenExportVariable=c,t.codeGenConstConstructorCall=u,t.codeGenValueFn=p,t.codeGenFnHeader=l,t.codeGenToString=h,t.splitAtColon=f;var O=function(){function e(e){this.statement=e}return e}();t.Statement=O;var S=function(){function e(e,t){void 0===t&&(t=!1),this.expression=e,this.isArray=t}return e}();t.Expression=S,t.escapeValue=d,t.codeGenArray=y,t.codeGenFlatArray=v,t.codeGenStringMap=g,t.addAll=_,t.flattenArray=b},function(e,t){"use strict";!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){"use strict";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,n){this.value=e,this.ngContentIndex=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitText(this,t)},e}();t.TextAst=o;var s=function(){function e(e,t,n){this.value=e,this.ngContentIndex=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitBoundText(this,t)},e}();t.BoundTextAst=s;var a=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.AttrAst=a;var c=function(){function e(e,t,n,r,i){this.name=e,this.type=t,this.value=n,this.unit=r,this.sourceSpan=i}return e.prototype.visit=function(e,t){return e.visitElementProperty(this,t)},e}();t.BoundElementPropertyAst=c;var u=function(){function e(e,t,n,r){this.name=e,this.target=t,this.handler=n,this.sourceSpan=r}return e.prototype.visit=function(e,t){return e.visitEvent(this,t)},Object.defineProperty(e.prototype,"fullName",{get:function(){return i.isPresent(this.target)?this.target+":"+this.name:this.name},enumerable:!0,configurable:!0}),e}();t.BoundEventAst=u;var p=function(){function e(e,t,n){this.name=e,this.value=t,this.sourceSpan=n}return e.prototype.visit=function(e,t){return e.visitVariable(this,t)},e}();t.VariableAst=p;var l=function(){function e(e,t,n,r,i,o,s,a,c){this.name=e,this.attrs=t,this.inputs=n,this.outputs=r,this.exportAsVars=i,this.directives=o,this.children=s,this.ngContentIndex=a,this.sourceSpan=c}return e.prototype.visit=function(e,t){return e.visitElement(this,t)},e.prototype.isBound=function(){return this.inputs.length>0||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,n){"use strict";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.getSourceWithoutImports=function(e){return i.StringWrapper.replaceAllMapped(e,o,function(e){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){"use strict";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(172),s=n(71),a=n(44),c=n(39),u=n(37),p=n(174),l=n(5),h=n(26),f=n(175),d=n(169),y=n(6),v="AbstractChangeDetector",g="ChangeDetectionUtil",m="ChangeDetectorState";t.CHANGE_DETECTION_JIT_IMPORTS=l.CONST_EXPR({AbstractChangeDetector:a.AbstractChangeDetector,ChangeDetectionUtil:c.ChangeDetectionUtil,ChangeDetectorState:u.ChangeDetectorState});var _=o.moduleRef("package:angular2/src/core/change_detection/abstract_change_detector"+d.MODULE_SUFFIX),b=o.moduleRef("package:angular2/src/core/change_detection/change_detection_util"+d.MODULE_SUFFIX),P=o.moduleRef("package:angular2/src/core/change_detection/pregen_proto_change_detector"+d.MODULE_SUFFIX),C=o.moduleRef("package:angular2/src/core/change_detection/constants"+d.MODULE_SUFFIX),w=function(){function e(e){this._genConfig=e}return e.prototype.compileComponentRuntime=function(e,t,n){var r=this,i=p.createChangeDetectorDefinitions(e,t,this._genConfig,n);return i.map(function(e){return r._createChangeDetectorFactory(e)})},e.prototype._createChangeDetectorFactory=function(e){var t=new h.DynamicProtoChangeDetector(e);return function(){return t.instantiate()}},e.prototype.compileComponentCodeGen=function(e,t,n){var r=p.createChangeDetectorDefinitions(e,t,this._genConfig,n),i=[],a=0,c=r.map(function(t){var n,r;if(l.IS_DART){n=new f.Codegen(P);var c="_"+t.id,u=0===a&&e.isHost?"dynamic":""+o.moduleRef(e.moduleUrl)+e.name;n.generate(u,c,t),i.push(c+".newChangeDetector"),r=n.toString()}else n=new s.ChangeDetectorJITGenerator(t,""+b+g,""+_+v,""+C+m),i.push("function() { return new "+n.typeName+"(); }"),r=n.generateSource();return a++,r});return new o.SourceExpressions(c,i)},e=r([y.Injectable(),i("design:paramtypes",[h.ChangeDetectorGenConfig])],e)}();t.ChangeDetectionCompiler=w},function(e,t,n){"use strict";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(17),u=n(26),p=n(171),l=n(170);t.createChangeDetectorDefinitions=r;var h=function(){function e(e,t,n){this.parent=e,this.allVisitors=t,this.strategy=n,this.nodeCount=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.nodeCount++,this.boundElementCount++,p.templateVisitAll(this,t.outputs);for(var r=0;r<t.directives.length;r++)t.directives[r].visit(this,r);var i=new e(this,this.allVisitors,u.ChangeDetectionStrategy.Default);return p.templateVisitAll(i,t.vars),p.templateVisitAll(i,t.children),null},e.prototype.visitElement=function(e,t){this.nodeCount++,e.isBound()&&this.boundElementCount++,p.templateVisitAll(this,e.inputs,null),p.templateVisitAll(this,e.outputs),p.templateVisitAll(this,e.exportAsVars);for(var n=0;n<e.directives.length;n++)e.directives[n].visit(this,n);return p.templateVisitAll(this,e.children),null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitVariable=function(e,t){return this.variableNames.push(e.name),null},e.prototype.visitEvent=function(e,t){var n=a.isPresent(t)?u.BindingRecord.createForHostEvent(e.handler,e.fullName,t):u.BindingRecord.createForEvent(e.handler,e.fullName,this.boundElementCount-1);
13
+ return this.eventRecords.push(n),null},e.prototype.visitElementProperty=function(e,t){var n,r=this.boundElementCount-1,i=a.isPresent(t)?t.directiveIndex:null;return e.type===p.PropertyBindingType.Property?n=a.isPresent(i)?u.BindingRecord.createForHostProperty(i,e.value,e.name):u.BindingRecord.createForElementProperty(e.value,r,e.name):e.type===p.PropertyBindingType.Attribute?n=a.isPresent(i)?u.BindingRecord.createForHostAttribute(i,e.value,e.name):u.BindingRecord.createForElementAttribute(e.value,r,e.name):e.type===p.PropertyBindingType.Class?n=a.isPresent(i)?u.BindingRecord.createForHostClass(i,e.value,e.name):u.BindingRecord.createForElementClass(e.value,r,e.name):e.type===p.PropertyBindingType.Style&&(n=a.isPresent(i)?u.BindingRecord.createForHostStyle(i,e.value,e.name,e.unit):u.BindingRecord.createForElementStyle(e.value,r,e.name,e.unit)),this.bindingRecords.push(n),null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitBoundText=function(e,t){var n=this.nodeCount++;return this.bindingRecords.push(u.BindingRecord.createForTextNode(e.value,n)),null},e.prototype.visitText=function(e,t){return this.nodeCount++,null},e.prototype.visitDirective=function(e,t){var n=new u.DirectiveIndex(this.boundElementCount-1,t),r=e.directive,i=[];s.StringMapWrapper.forEach(e.directive.outputs,function(e,t){return i.push([t,e])});var o=new u.DirectiveRecord({directiveIndex:n,callAfterContentInit:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.AfterContentInit),callAfterContentChecked:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.AfterContentChecked),callAfterViewInit:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.AfterViewInit),callAfterViewChecked:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.AfterViewChecked),callOnChanges:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.OnChanges),callDoCheck:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.DoCheck),callOnInit:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.OnInit),callOnDestroy:-1!==r.lifecycleHooks.indexOf(l.LifecycleHooks.OnDestroy),changeDetection:r.changeDetection,outputs:i});this.directiveRecords.push(o),p.templateVisitAll(this,e.inputs,o);var a=this.bindingRecords;return o.callOnChanges&&a.push(u.BindingRecord.createDirectiveOnChanges(o)),o.callOnInit&&a.push(u.BindingRecord.createDirectiveOnInit(o)),o.callDoCheck&&a.push(u.BindingRecord.createDirectiveDoCheck(o)),p.templateVisitAll(this,e.hostProperties,o),p.templateVisitAll(this,e.hostEvents,o),p.templateVisitAll(this,e.exportAsVars),null},e.prototype.visitDirectiveProperty=function(e,t){var n=c.reflector.setter(e.directiveName);return this.bindingRecords.push(u.BindingRecord.createForDirective(e.value,e.directiveName,n,t)),null},e}()},function(e,t){"use strict";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){"use strict";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(172),s=n(75),a=n(163),c=n(5),u=n(48),p=n(177),l=n(162),h=n(178),f=n(169),d=n(6),y="%COMP%",v="_nghost-"+y,g="_ngcontent-"+y,m=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;a<t.length;a++){var u=this._createModuleUrl(t[a],n);s.push(o.moduleRef(u)+"STYLES")}var p=i+" ["+s.join(",")+"]";return new o.SourceExpression([],p)},e.prototype._styleModule=function(e,t,n){var r="\n "+n.declarations.join("\n")+"\n "+f.codeGenExportVariable("STYLES")+n.expression+";\n ";return new o.SourceModule(this._createModuleUrl(e,t),r)},e.prototype._shimIfNeeded=function(e,t){return t?this._shadowCss.shimCssText(e,g,v):e},e.prototype._createModuleUrl=function(e,t){return t?e+".shim"+f.MODULE_SUFFIX:""+e+f.MODULE_SUFFIX},e=r([d.Injectable(),i("design:paramtypes",[a.XHR,l.UrlResolver])],e)}();t.StyleCompiler=m},function(e,t,n){"use strict";function r(e){return a.StringWrapper.replaceAllMapped(e,R,function(e){return""})}function i(e,t){var n=o(e),r=0;return a.StringWrapper.replaceAllMapped(n.escapedString,E,function(e){var i=e[2],o="",s=e[4],c="";a.isPresent(e[4])&&e[4].startsWith("{"+D)&&(o=n.blocks[r++],s=e[4].substring(D.length+1),c="{");var u=t(new x(i,o));return""+e[1]+u.selector+e[3]+c+u.content+s})}function o(e){for(var t=a.StringWrapper.split(e,O),n=[],r=[],i=0,o=[],s=0;s<t.length;s++){var c=t[s];c==A&&i--,i>0?o.push(c):(o.length>0&&(r.push(o.join("")),n.push(D),o=[]),n.push(c)),c==S&&i++}return o.length>0&&(r.push(o.join("")),n.push(D)),new T(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<t.length;i++){var o=t[i];if(a.isBlank(o))break;o=o.trim(),r.push(n(g,o,e[3]))}return r.join(",")}return g+e[3]})},e.prototype._colonHostContextPartReplacer=function(e,t,n){return a.StringWrapper.contains(t,h)?this._colonHostPartReplacer(e,t,n):e+t+n+", "+t+" "+e+n},e.prototype._colonHostPartReplacer=function(e,t,n){return e+a.StringWrapper.replace(t,h,"")+n},e.prototype._convertShadowDOMSelectors=function(e){for(var t=0;t<m.length;t++)e=a.StringWrapper.replaceAll(e,m[t]," ");return e},e.prototype._scopeSelectors=function(e,t,n){var r=this;return i(e,function(e){var i=e.selector,o=e.content;return"@"!=e.selector[0]||e.selector.startsWith("@page")?i=r._scopeSelector(e.selector,t,n,r.strictStyling):e.selector.startsWith("@media")&&(o=r._scopeSelectors(e.content,t,n)),new x(i,o)})},e.prototype._scopeSelector=function(e,t,n,r){for(var i=[],o=e.split(","),s=0;s<o.length;s++){var c=o[s].trim(),u=a.StringWrapper.split(c,_),p=u[0];this._selectorNeedsScoping(p,t)&&(u[0]=r&&!a.StringWrapper.contains(p,g)?this._applyStrictSelectorScope(p,t):this._applySelectorScope(p,t,n)),i.push(u.join(" "))}return i.join(", ")},e.prototype._selectorNeedsScoping=function(e,t){var n=this._makeScopeMatcher(t);return!a.isPresent(a.RegExpWrapper.firstMatch(n,e))},e.prototype._makeScopeMatcher=function(e){var t=/\[/g,n=/\]/g;return e=a.StringWrapper.replaceAll(e,t,"\\["),e=a.StringWrapper.replaceAll(e,n,"\\]"),a.RegExpWrapper.create("^("+e+")"+b,"m")},e.prototype._applySelectorScope=function(e,t,n){return this._applySimpleSelectorScope(e,t,n)},e.prototype._applySimpleSelectorScope=function(e,t,n){if(a.isPresent(a.RegExpWrapper.firstMatch(P,e))){var r=this.strictStyling?"["+n+"]":t;return e=a.StringWrapper.replace(e,g,r),a.StringWrapper.replaceAll(e,P,r+" ")}return t+" "+e},e.prototype._applyStrictSelectorScope=function(e,t){var n=/\[is=([^\]]*)\]/g;t=a.StringWrapper.replaceAllMapped(t,n,function(e){return e[1]});for(var r=[" ",">","+","~"],i=e,o="["+t+"]",c=0;c<r.length;c++){var u=r[c],p=i.split(u);i=p.map(function(e){var t=a.StringWrapper.replaceAll(e.trim(),P,"");if(t.length>0&&!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,w,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"),g=h+"-no-combinator",m=[/::shadow/g,/::content/g,/\/shadow-deep\//g,/\/shadow\//g],_=/(?:>>>)|(?:\/deep\/)/g,b="([>\\s~+[.,{:][\\s\\S]*)?$",P=a.RegExpWrapper.create(h,"im"),C=/:host/gim,w=/:host-context/gim,R=/\/\*[\s\S]*?\*\//g,E=/(\s*)([^;\{\}]+?)(\s*)((?:{%BLOCK%}?\s*;?)|(?:\s*;))/g,O=/([{}])/g,S="{",A="}",D="%BLOCK%",x=function(){function e(e,t){this.selector=e,this.content=t}return e}();t.CssRule=x,t.processRules=i;var T=function(){function e(e,t){this.escapedString=e,this.blocks=t}return e}()},function(e,t,n){"use strict";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){"use strict";function r(e,t,n){return v.codeGenValueFn(["event"],e.expression+".triggerEventHandlers("+v.escapeValue(n)+", event, "+t+")")}function i(e,t){return"viewFactory_"+e.type.name+t}function o(e){return c.IS_DART?""+m.METADATA_MODULE_REF+e:""+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(5),u=n(12),p=n(171),l=n(172),h=n(86),f=n(88),d=n(87),y=n(75),v=n(169),g=n(6),m=n(180);t.VIEW_JIT_IMPORTS=c.CONST_EXPR({AppView:h.AppView,AppElement:d.AppElement,flattenNestedViewRenderNodes:h.flattenNestedViewRenderNodes,checkSlotCount:h.checkSlotCount});var _=function(){function e(){}return e.prototype.compileComponentRuntime=function(e,t,n,r,i,o){var s=new P(e,n,r,i,o);return s.createViewFactory(t,0,[])},e.prototype.compileComponentCodeGen=function(e,t,n,r,i,o){var s=new b(e,n,r,i,o),a=[],c=s.createViewFactory(t,0,a);return new l.SourceExpression(a.map(function(e){return e.statement}),c.expression)},e=s([g.Injectable(),a("design:paramtypes",[])],e)}();t.ViewCompiler=_;var b=function(){function e(e,t,n,r,i){this.component=e,this.styles=t,this.protoViews=n,this.changeDetectorExpressions=r,this.componentViewFactory=i,this._nextVarId=0}return e.prototype._nextVar=function(e){return""+e+this._nextVarId++ +"_"+this.component.type.name},e.prototype._nextRenderVar=function(){return this._nextVar("render")},e.prototype._nextAppVar=function(){return this._nextVar("app")},e.prototype._nextDisposableVar=function(){return"disposable"+this._nextVarId++ +"_"+this.component.type.name},e.prototype.createText=function(e,t,n,r){var i=this._nextRenderVar(),o="var "+i+" = "+e.expression+".createText("+(c.isPresent(t)?t.expression:null)+", "+v.escapeSingleQuoteString(n)+");";return r.push(new v.Statement(o)),new v.Expression(i)},e.prototype.createElement=function(e,t,n,r,i){var o,s=this._nextRenderVar();o=c.isPresent(r)?r.expression+" == null ?\n "+e.expression+".createElement("+(c.isPresent(t)?t.expression:null)+", "+v.escapeSingleQuoteString(n)+") :\n "+e.expression+".selectRootElement("+r.expression+");":e.expression+".createElement("+(c.isPresent(t)?t.expression:null)+", "+v.escapeSingleQuoteString(n)+")";var a="var "+s+" = "+o+";";return i.push(new v.Statement(a)),new v.Expression(s)},e.prototype.createTemplateAnchor=function(e,t,n){var r=this._nextRenderVar(),i=e.expression+".createTemplateAnchor("+(c.isPresent(t)?t.expression:null)+");";return n.push(new v.Statement("var "+r+" = "+i)),new v.Expression(r)},e.prototype.createGlobalEventListener=function(e,t,n,i,o){var s=this._nextDisposableVar(),a=r(t,n,i.fullName);return o.push(new v.Statement("var "+s+" = "+e.expression+".listenGlobal("+v.escapeValue(i.target)+", "+v.escapeValue(i.name)+", "+a+");")),new v.Expression(s)},e.prototype.createElementEventListener=function(e,t,n,i,o,s){var a=this._nextDisposableVar(),c=r(t,n,o.fullName);return s.push(new v.Statement("var "+a+" = "+e.expression+".listen("+i.expression+", "+v.escapeValue(o.name)+", "+c+");")),new v.Expression(a)},e.prototype.setElementAttribute=function(e,t,n,r,i){i.push(new v.Statement(e.expression+".setElementAttribute("+t.expression+", "+v.escapeSingleQuoteString(n)+", "+v.escapeSingleQuoteString(r)+");"))},e.prototype.createAppElement=function(e,t,n,r,i,o){var s=this._nextAppVar(),a="new "+m.APP_EL_MODULE_REF+"AppElement("+e.expression+", "+t.expression+",\n "+(c.isPresent(r)?r.expression:null)+", "+n.expression+", "+(c.isPresent(i)?i.expression:null)+")";return o.push(new v.Statement("var "+s+" = "+a+";")),new v.Expression(s)},e.prototype.createAndSetComponentView=function(e,t,n,r,i,o,s){var a;a=this.component.type.isHost?n.expression+".projectableNodes":"["+o.map(function(e){return v.codeGenFlatArray(e)}).join(",")+"]",s.push(new v.Statement(this.componentViewFactory(i)+"("+e.expression+", "+t.expression+", "+r.expression+", "+a+", null, null, null);"))},e.prototype.getProjectedNodes=function(e,t){return new v.Expression(e.expression+"["+t+"]",!0)},e.prototype.appendProjectedNodes=function(e,t,n,r){r.push(new v.Statement(e.expression+".projectNodes("+t.expression+", "+m.APP_VIEW_MODULE_REF+"flattenNestedViewRenderNodes("+n.expression+"));"))},e.prototype.createViewFactory=function(e,t,n){var r=this.protoViews[t],s=this.component.type.isHost,a=0===t&&!s,c=new w(new v.Expression("renderer"),new v.Expression("viewManager"),new v.Expression("projectableNodes"),s?new v.Expression("rootSelector"):null,new v.Expression("view"),r,n,this);p.templateVisitAll(c,e,new C(a?new v.Expression("parentRenderNode"):null,null,null));var u=r.protoView.expression,l=i(this.component,t),h=this.changeDetectorExpressions.expressions[t],f=["parentRenderer","viewManager","containerEl","projectableNodes","rootSelector","dynamicallyCreatedProviders","rootInjector"],d=[],y="parentRenderer";if(0===t){var g=this._nextVar("renderType");n.push(new v.Statement("var "+g+" = null;"));var _=this._nextVar("styles");n.push(new v.Statement(v.CONST_VAR+" "+_+" = "+this.styles.expression+";"));var b=this.component.template.encapsulation;d.push("if ("+g+" == null) {\n "+g+" = viewManager.createRenderComponentType("+o(b)+", "+_+");\n }"),y="parentRenderer.renderComponent("+g+")"}var P="\n"+v.codeGenFnHeader(f,l)+"{\n "+d.join("\n")+"\n var renderer = "+y+";\n var view = new "+m.APP_VIEW_MODULE_REF+"AppView(\n "+u+", renderer, viewManager,\n projectableNodes,\n containerEl,\n dynamicallyCreatedProviders, rootInjector,\n "+h+"()\n );\n "+m.APP_VIEW_MODULE_REF+"checkSlotCount("+v.escapeValue(this.component.type.name)+", "+this.component.template.ngContentSelectors.length+", projectableNodes);\n "+(a?"var parentRenderNode = renderer.createViewRoot(view.containerAppElement.nativeElement);":"")+"\n "+c.renderStmts.map(function(e){return e.statement}).join("\n")+"\n "+c.appStmts.map(function(e){return e.statement}).join("\n")+"\n\n view.init("+v.codeGenFlatArray(c.rootNodesOrAppElements)+", "+v.codeGenArray(c.renderNodes)+", "+v.codeGenArray(c.appDisposables)+",\n "+v.codeGenArray(c.appElements)+");\n return view;\n}";return n.push(new v.Statement(P)),new v.Expression(l)},e}(),P=function(){function e(e,t,n,r,i){this.component=e,this.styles=t,this.protoViews=n,this.changeDetectorFactories=r,this.componentViewFactory=i}return e.prototype.createText=function(e,t,n,r){return e.createText(t,n)},e.prototype.createElement=function(e,t,n,r,i){var o;return o=c.isPresent(r)?e.selectRootElement(r):e.createElement(t,n)},e.prototype.createTemplateAnchor=function(e,t,n){return e.createTemplateAnchor(t)},e.prototype.createGlobalEventListener=function(e,t,n,r,i){return e.listenGlobal(r.target,r.name,function(e){return t.triggerEventHandlers(r.fullName,e,n)})},e.prototype.createElementEventListener=function(e,t,n,r,i,o){return e.listen(r,i.name,function(e){return t.triggerEventHandlers(i.fullName,e,n)})},e.prototype.setElementAttribute=function(e,t,n,r,i){e.setElementAttribute(t,n,r)},e.prototype.createAppElement=function(e,t,n,r,i,o){return new d.AppElement(e,t,r,n,i)},e.prototype.createAndSetComponentView=function(e,t,n,r,i,o,s){var a;if(this.component.type.isHost)a=n.projectableNodes;else{a=u.ListWrapper.createFixedSize(o.length);for(var c=0;c<o.length;c++)a[c]=v.flattenArray(o[c],[])}this.componentViewFactory(i)(e,t,r,a)},e.prototype.getProjectedNodes=function(e,t){return e[t]},e.prototype.appendProjectedNodes=function(e,t,n,r){e.projectNodes(t,h.flattenNestedViewRenderNodes(n))},e.prototype.createViewFactory=function(e,t,n){var r=this,i=this.protoViews[t],o=i.protoView.type===f.ViewType.COMPONENT,s=null;return function(n,a,u,l,f,d,y){void 0===f&&(f=null),void 0===d&&(d=null),void 0===y&&(y=null),h.checkSlotCount(r.component.type.name,r.component.template.ngContentSelectors.length,l);var g;0===t?(c.isBlank(s)&&(s=a.createRenderComponentType(r.component.template.encapsulation,r.styles)),g=n.renderComponent(s)):g=n;var m=r.changeDetectorFactories[t](),_=new h.AppView(i.protoView,g,a,l,u,d,y,m),b=new w(g,a,l,f,_,i,[],r),P=o?g.createViewRoot(u.nativeElement):null;return p.templateVisitAll(b,e,new C(P,null,null)),_.init(v.flattenArray(b.rootNodesOrAppElements,[]),b.renderNodes,b.appDisposables,b.appElements),_}},e}(),C=function(){function e(e,t,n){if(this.renderNode=e,this.appEl=t,this.component=n,c.isPresent(n)){this.contentNodesByNgContentIndex=u.ListWrapper.createFixedSize(n.template.ngContentSelectors.length);for(var r=0;r<this.contentNodesByNgContentIndex.length;r++)this.contentNodesByNgContentIndex[r]=[]}else this.contentNodesByNgContentIndex=null}return e.prototype.addContentNode=function(e,t){this.contentNodesByNgContentIndex[e].push(t)},e}(),w=function(){function e(e,t,n,r,i,o,s,a){this.renderer=e,this.viewManager=t,this.projectableNodes=n,this.rootSelector=r,this.view=i,this.protoView=o,this.targetStatements=s,this.factory=a,this.renderStmts=[],this.renderNodes=[],this.appStmts=[],this.appElements=[],this.appDisposables=[],this.rootNodesOrAppElements=[],this.elementCount=0}return e.prototype._addRenderNode=function(e,t,n,r){this.renderNodes.push(e),c.isPresent(r.component)?c.isPresent(n)&&r.addContentNode(n,c.isPresent(t)?t:e):c.isBlank(r.renderNode)&&this.rootNodesOrAppElements.push(c.isPresent(t)?t:e)},e.prototype._getParentRenderNode=function(e,t){return c.isPresent(t.component)&&t.component.template.encapsulation!==y.ViewEncapsulation.Native?null:t.renderNode},e.prototype.visitBoundText=function(e,t){return this._visitText("",e.ngContentIndex,t)},e.prototype.visitText=function(e,t){return this._visitText(e.value,e.ngContentIndex,t)},e.prototype._visitText=function(e,t,n){var r=this.factory.createText(this.renderer,this._getParentRenderNode(t,n),e,this.renderStmts);return this._addRenderNode(r,null,t,n),null},e.prototype.visitNgContent=function(e,t){var n=this.factory.getProjectedNodes(this.projectableNodes,e.index);return c.isPresent(t.component)?c.isPresent(e.ngContentIndex)&&t.addContentNode(e.ngContentIndex,n):c.isPresent(t.renderNode)?this.factory.appendProjectedNodes(this.renderer,t.renderNode,n,this.renderStmts):this.rootNodesOrAppElements.push(n),null},e.prototype.visitElement=function(e,t){var n=this,r=this.factory.createElement(this.renderer,this._getParentRenderNode(e.ngContentIndex,t),e.name,this.rootSelector,this.renderStmts),i=e.getComponent(),o=this.elementCount++,s=this.protoView.protoElements[o];s.renderEvents.forEach(function(e){var t;t=c.isPresent(e.target)?n.factory.createGlobalEventListener(n.renderer,n.view,s.boundElementIndex,e,n.renderStmts):n.factory.createElementEventListener(n.renderer,n.view,s.boundElementIndex,r,e,n.renderStmts),n.appDisposables.push(t)});for(var a=0;a<s.attrNameAndValues.length;a++){var u=s.attrNameAndValues[a][0],l=s.attrNameAndValues[a][1];this.factory.setElementAttribute(this.renderer,r,u,l,this.renderStmts)}var h=null;c.isPresent(s.appProtoEl)&&(h=this.factory.createAppElement(s.appProtoEl,this.view,r,t.appEl,null,this.appStmts),this.appElements.push(h)),this._addRenderNode(r,h,e.ngContentIndex,t);var f=new C(r,c.isPresent(h)?h:t.appEl,i);return p.templateVisitAll(this,e.children,f),c.isPresent(h)&&c.isPresent(i)&&this.factory.createAndSetComponentView(this.renderer,this.viewManager,this.view,h,i,f.contentNodesByNgContentIndex,this.appStmts),null},e.prototype.visitEmbeddedTemplate=function(e,t){var n=this.factory.createTemplateAnchor(this.renderer,this._getParentRenderNode(e.ngContentIndex,t),this.renderStmts),r=this.elementCount++,i=this.protoView.protoElements[r],o=this.factory.createViewFactory(e.children,i.embeddedTemplateIndex,this.targetStatements),s=this.factory.createAppElement(i.appProtoEl,this.view,n,t.appEl,o,this.appStmts);return this._addRenderNode(n,s,e.ngContentIndex,t),this.appElements.push(s),null},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitDirective=function(e,t){return null},e.prototype.visitEvent=function(e,t){return null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}()},function(e,t,n){"use strict";function r(e,t,n){return g.templateVisitAll(e,t,n),n}function i(e){var t=[];v.StringMapWrapper.forEach(e,function(e,n){t.push([n,e])}),v.ListWrapper.sort(t,function(e,t){return y.StringWrapper.compare(e[0],t[0])});var n=[];return t.forEach(function(e){n.push([e[0],e[1]])}),n}function o(e,t,n){return e==E||e==O?t+" "+n:n}function s(e){for(var t={},n=0;n<e.length;n++){var r=e[n];t[r[0]]=r[1]}return t}function a(e){var t=e.map(function(e){return p(e.type)});return"["+t.join(",")+"]"}function c(e){var t=e.map(p);return"["+t.join(",")+"]"}function u(e){return y.IS_DART?""+t.VIEW_TYPE_MODULE_REF+e:""+e}function p(e){return""+m.moduleRef(e.moduleUrl)+e.name}function l(e,t){return t>0?b.ViewType.EMBEDDED:e.type.isHost?b.ViewType.HOST:b.ViewType.COMPONENT}var h=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)},f=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},d=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},y=n(5),v=n(12),g=n(171),m=n(172),_=n(86),b=n(88),P=n(87),C=n(169),w=n(6);t.PROTO_VIEW_JIT_IMPORTS=y.CONST_EXPR({AppProtoView:_.AppProtoView,AppProtoElement:P.AppProtoElement,ViewType:b.ViewType}),t.APP_VIEW_MODULE_REF=m.moduleRef("package:angular2/src/core/linker/view"+C.MODULE_SUFFIX),t.VIEW_TYPE_MODULE_REF=m.moduleRef("package:angular2/src/core/linker/view_type"+C.MODULE_SUFFIX),t.APP_EL_MODULE_REF=m.moduleRef("package:angular2/src/core/linker/element"+C.MODULE_SUFFIX),t.METADATA_MODULE_REF=m.moduleRef("package:angular2/src/core/metadata/view"+C.MODULE_SUFFIX);var R="$implicit",E="class",O="style",S=function(){function e(){}return e.prototype.compileProtoViewRuntime=function(e,t,n,r){var i=new N(e,t,r),o=[];return i.createCompileProtoView(n,[],[],o),new A([],o)},e.prototype.compileProtoViewCodeGen=function(e,t,n,r){var i=new I(e,t,r),o=[],s=[];return i.createCompileProtoView(n,[],s,o),new A(s.map(function(e){return e.statement}),o)},e=f([w.Injectable(),d("design:paramtypes",[])],e)}();t.ProtoViewCompiler=S;var A=function(){function e(e,t){this.declarations=e,this.protoViews=t}return e}();t.CompileProtoViews=A;var D=function(){function e(e,t,n){this.embeddedTemplateIndex=e,this.protoElements=t,this.protoView=n}return e}();t.CompileProtoView=D;var x=function(){function e(e,t,n,r,i,o,s){this.boundElementIndex=e,this.attrNameAndValues=t,this.variableNameAndValues=n,this.renderEvents=r,this.directives=i,this.embeddedTemplateIndex=o,this.appProtoEl=s}return e}();t.CompileProtoElement=x;var T=function(){function e(e){this.component=e}return e.prototype.createCompileProtoView=function(e,t,n,r){var i=r.length;r.push(null);var o=new k(this,n,r);g.templateVisitAll(o,e);var s=l(this.component,i),a=this.createAppProtoView(i,s,t,n),c=new D(i,o.protoElements,a);return r[i]=c,c},e}(),I=function(e){function n(t,n,r){e.call(this,n),this.resolvedMetadataCacheExpr=t,this.pipes=r,this._nextVarId=0}return h(n,e),n.prototype._nextProtoViewVar=function(e){return"appProtoView"+this._nextVarId++ +"_"+this.component.type.name+e},n.prototype.createAppProtoView=function(e,n,r,i){var o=this._nextProtoViewVar(e),s=u(n),a=0===e?c(this.pipes.map(function(e){return e.type})):null,p="var "+o+" = "+t.APP_VIEW_MODULE_REF+"AppProtoView.create("+this.resolvedMetadataCacheExpr.expression+", "+s+", "+a+", "+C.codeGenStringMap(r)+");";return i.push(new C.Statement(p)),new C.Expression(o)},n.prototype.createAppProtoElement=function(e,n,r,i,o){var s="appProtoEl"+this._nextVarId++ +"_"+this.component.type.name,c=t.APP_EL_MODULE_REF+"AppProtoElement.create(\n "+this.resolvedMetadataCacheExpr.expression+",\n "+e+",\n "+C.codeGenStringMap(n)+",\n "+a(i)+",\n "+C.codeGenStringMap(r)+"\n )",u="var "+s+" = "+c+";";return o.push(new C.Statement(u)),new C.Expression(s)},n}(T),N=function(e){function t(t,n,r){e.call(this,n),this.metadataCache=t,this.pipes=r}return h(t,e),t.prototype.createAppProtoView=function(e,t,n,r){var i=0===e?this.pipes.map(function(e){return e.type.runtime}):[],o=s(n);return _.AppProtoView.create(this.metadataCache,t,i,o)},t.prototype.createAppProtoElement=function(e,t,n,r,i){var o=s(t);return P.AppProtoElement.create(this.metadataCache,e,o,r.map(function(e){return e.type.runtime}),s(n))},t}(T),k=function(){function e(e,t,n){this.factory=e,this.allStatements=t,this.allProtoViews=n,this.protoElements=[],this.boundElementCount=0}return e.prototype._readAttrNameAndValues=function(e,t){var n=r(this,t,{});return e.forEach(function(e){v.StringMapWrapper.forEach(e.hostAttributes,function(e,t){var r=n[t];n[t]=y.isPresent(r)?o(t,r,e):e})}),i(n)},e.prototype.visitBoundText=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e.prototype.visitNgContent=function(e,t){return null},e.prototype.visitElement=function(e,t){var n=this,i=null;e.isBound()&&(i=this.boundElementCount++);var o=e.getComponent(),s=[];y.isBlank(o)&&e.exportAsVars.forEach(function(e){s.push([e.name,null])});var a=[],c=r(this,e.outputs,new Map);v.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(n,new M(t,i,c,s,a))});var u=[];c.forEach(function(e,t){return u.push(e)});var p=this._readAttrNameAndValues(a,e.attrs);return this._addProtoElement(e.isBound(),i,p,s,u,a,null),g.templateVisitAll(this,e.children),null},e.prototype.visitEmbeddedTemplate=function(e,t){var n=this,r=this.boundElementCount++,i=[];v.ListWrapper.forEachWithIndex(e.directives,function(e,t){e.visit(n,new M(t,r,new Map,[],i))});var o=this._readAttrNameAndValues(i,e.attrs),s=e.vars.map(function(e){return[e.value.length>0?e.value:R,e.name]}),a=this.factory.createCompileProtoView(e.children,s,this.allStatements,this.allProtoViews);return this._addProtoElement(!0,r,o,[],[],i,a.embeddedTemplateIndex),null},e.prototype._addProtoElement=function(e,t,n,r,i,o,s){var a=null;e&&(a=this.factory.createAppProtoElement(t,n,r,o,this.allStatements));var c=new x(t,n,r,i,o,s,a);this.protoElements.push(c)},e.prototype.visitVariable=function(e,t){return null},e.prototype.visitAttr=function(e,t){return t[e.name]=e.value,null},e.prototype.visitDirective=function(e,t){return t.targetDirectives.push(e.directive),g.templateVisitAll(this,e.hostEvents,t.hostEventTargetAndNames),e.exportAsVars.forEach(function(e){t.targetVariableNameAndValues.push([e.name,t.index])}),null},e.prototype.visitEvent=function(e,t){return t.set(e.fullName,e),null},e.prototype.visitDirectiveProperty=function(e,t){return null},e.prototype.visitElementProperty=function(e,t){return null},e}(),M=function(){function e(e,t,n,r,i){this.index=e,this.boundElementIndex=t,this.hostEventTargetAndNames=n,this.targetVariableNameAndValues=r,this.targetDirectives=i}return e}()},function(e,t,n){"use strict";function r(e){return p.StringWrapper.split(e.trim(),/\s+/g)}function i(e,t){var n=new b.CssSelector,i=v.splitNsName(e)[1];n.setElement(i);for(var o=0;o<t.length;o++){var s=t[o][0],a=v.splitNsName(s)[1],c=t[o][1];if(n.addAttribute(a,c),s.toLowerCase()==x){var u=r(c);u.forEach(function(e){return n.addClassName(e)})}}return n}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;
14
+ 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(26),y=n(182),v=n(186),g=n(185),m=n(31),_=n(171),b=n(168),P=n(187),C=n(188),w=n(178),R=n(183),E=n(169),O=/^(?:(?:(?:(bind-)|(var-|#)|(on-)|(bindon-))(.+))|\[\(([^\)]+)\)\]|\[([^\]]+)\]|\(([^\)]+)\))$/g,S="template",A="template",D="*",x="class",T=".",I="attr",N="class",k="style",M=b.CssSelector.parse("*")[0];t.TEMPLATE_TRANSFORMS=h.CONST_EXPR(new l.OpaqueToken("TemplateTransforms"));var V=function(e){function t(t,n){e.call(this,n,t)}return o(t,e),t}(g.ParseError);t.TemplateParseError=V;var j=function(){function e(e,t){this.templateAst=e,this.errors=t}return e}();t.TemplateParseResult=j;var B=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,r){var i=this.tryParse(e,t,n,r);if(p.isPresent(i.errors)){var o=i.errors.join("\n");throw new f.BaseException("Template parse errors:\n"+o)}return i.templateAst},e.prototype.tryParse=function(e,t,n,r){var i=new L(t,n,this._exprParser,this._schemaRegistry),o=this._htmlParser.parse(e,r),s=R.htmlVisitAll(i,o.rootNodes,H),a=o.errors.concat(i.errors);return a.length>0?new j(s,a):(p.isPresent(this.transforms)&&this.transforms.forEach(function(e){s=_.templateVisitAll(e,s)}),new j(s))},e=s([l.Injectable(),c(3,l.Optional()),c(3,l.Inject(t.TEMPLATE_TRANSFORMS)),a("design:paramtypes",[d.Parser,P.ElementSchemaRegistry,y.HtmlParser,Array])],e)}();t.TemplateParser=B;var L=function(){function e(e,t,n,r){var i=this;this._exprParser=n,this._schemaRegistry=r,this.errors=[],this.directivesIndex=new Map,this.ngContentCount=0,this.selectorMatcher=new b.SelectorMatcher,u.ListWrapper.forEachWithIndex(e,function(e,t){var n=b.CssSelector.parse(e.selector);i.selectorMatcher.addSelectables(n,e),i.directivesIndex.set(e,t)}),this.pipesByName=new Map,t.forEach(function(e){return i.pipesByName.set(e.name,e)})}return e.prototype._reportError=function(e,t){this.errors.push(new V(e,t))},e.prototype._parseInterpolation=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseInterpolation(e,n);return this._checkPipes(r,t),r}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._parseAction=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseAction(e,n);return this._checkPipes(r,t),r}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._parseBinding=function(e,t){var n=t.start.toString();try{var r=this._exprParser.parseBinding(e,n);return this._checkPipes(r,t),r}catch(i){return this._reportError(""+i,t),this._exprParser.wrapLiteralPrimitive("ERROR",n)}},e.prototype._parseTemplateBindings=function(e,t){var n=this,r=t.start.toString();try{var i=this._exprParser.parseTemplateBindings(e,r);return i.forEach(function(e){p.isPresent(e.expression)&&n._checkPipes(e.expression,t)}),i}catch(o){return this._reportError(""+o,t),[]}},e.prototype._checkPipes=function(e,t){var n=this;if(p.isPresent(e)){var r=new G;e.visit(r),r.pipes.forEach(function(e){n.pipesByName.has(e)||n._reportError("The pipe '"+e+"' could not be found",t)})}},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(M),r=this._parseInterpolation(e.value,e.sourceSpan);return p.isPresent(r)?new _.BoundTextAst(r,n,e.sourceSpan):new _.TextAst(e.value,n,e.sourceSpan)},e.prototype.visitAttr=function(e,t){return new _.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitComment=function(e,t){return null},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&&w.isStyleUrlResolvable(o.hrefAttr))return null;var s=[],a=[],c=[],u=[],l=[],h=[],f=[],d=!1,y=[];e.attrs.forEach(function(e){var t=n._parseAttr(e,s,a,u,c),r=n._parseInlineTemplateBinding(e,f,l,h);t||r||(y.push(n.visitAttr(e,null)),s.push([e.name,e.value])),r&&(d=!0)});var g,m=v.splitNsName(r.toLowerCase())[1],P=m==S,E=i(r,s),O=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,E),a,P?[]:c,e.sourceSpan),A=this._createElementPropertyAsts(e.name,a,O),D=R.htmlVisitAll(o.nonBindable?q:this,e.children,U.create(O)),x=p.isPresent(o.projectAs)?b.CssSelector.parse(o.projectAs)[0]:E,T=t.findNgContentIndex(x);if(o.type===C.PreparsedElementType.NG_CONTENT)p.isPresent(e.children)&&e.children.length>0&&this._reportError("<ng-content> element cannot have content. <ng-content> must be immediately followed by </ng-content>",e.sourceSpan),g=new _.NgContentAst(this.ngContentCount++,d?null:T,e.sourceSpan);else if(P)this._assertAllEventsPublishedByDirectives(O,u),this._assertNoComponentsNorElementBindingsOnTemplate(O,A,e.sourceSpan),g=new _.EmbeddedTemplateAst(y,u,c,O,D,d?null:T,e.sourceSpan);else{this._assertOnlyOneComponent(O,e.sourceSpan);var I=c.filter(function(e){return 0===e.value.length}),N=d?null:t.findNgContentIndex(x);g=new _.ElementAst(r,y,A,u,I,O,D,d?null:N,e.sourceSpan)}if(d){var k=i(S,f),M=this._createDirectiveAsts(e.name,this._parseDirectives(this.selectorMatcher,k),l,[],e.sourceSpan),V=this._createElementPropertyAsts(e.name,l,M);this._assertNoComponentsNorElementBindingsOnTemplate(M,V,e.sourceSpan),g=new _.EmbeddedTemplateAst([],[],h,M,[g],T,e.sourceSpan)}return g},e.prototype._parseInlineTemplateBinding=function(e,t,n,r){var i=null;if(e.name==A)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<s.length;a++){var c=s[a];c.keyIsVar?(r.push(new _.VariableAst(c.key,c.name,e.sourceSpan)),t.push([c.key,c.name])):p.isPresent(c.expression)?this._parsePropertyAst(c.key,c.expression,e.sourceSpan,t,n):(t.push([c.key,""]),this._parseLiteralAttr(c.key,null,e.sourceSpan,n))}return!0}return!1},e.prototype._parseAttr=function(e,t,n,r,i){var o=this._normalizeAttributeName(e.name),s=e.value,a=p.RegExpWrapper.firstMatch(O,o),c=!1;if(p.isPresent(a))if(c=!0,p.isPresent(a[1]))this._parseProperty(a[5],s,e.sourceSpan,t,n);else if(p.isPresent(a[2])){var u=a[5];this._parseVariable(u,s,e.sourceSpan,i)}else p.isPresent(a[3])?this._parseEvent(a[5],s,e.sourceSpan,t,r):p.isPresent(a[4])?(this._parseProperty(a[5],s,e.sourceSpan,t,n),this._parseAssignmentEvent(a[5],s,e.sourceSpan,t,r)):p.isPresent(a[6])?(this._parseProperty(a[6],s,e.sourceSpan,t,n),this._parseAssignmentEvent(a[6],s,e.sourceSpan,t,r)):p.isPresent(a[7])?this._parseProperty(a[7],s,e.sourceSpan,t,n):p.isPresent(a[8])&&this._parseEvent(a[8],s,e.sourceSpan,t,r);else c=this._parsePropertyInterpolation(o,s,e.sourceSpan,t,n);return c||this._parseLiteralAttr(o,s,e.sourceSpan,n),c},e.prototype._normalizeAttributeName=function(e){return e.toLowerCase().startsWith("data-")?e.substring(5):e},e.prototype._parseVariable=function(e,t,n,r){e.indexOf("-")>-1&&this._reportError('"-" is not allowed in variable names',n),r.push(new _.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 W(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=E.splitAtColon(e,[null,e]),s=o[0],a=o[1],c=this._parseAction(t,n);r.push([e,c.source]),i.push(new _.BoundEventAst(a,s,c,n))},e.prototype._parseLiteralAttr=function(e,t,n,r){r.push(new W(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 _.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 _.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(T);if(1===a.length)o=this._schemaRegistry.getMappedPropName(a[0]),i=_.PropertyBindingType.Property,this._schemaRegistry.hasProperty(e,o)||this._reportError("Can't bind to '"+o+"' since it isn't a known native property",r);else if(a[0]==I){o=a[1];var c=o.indexOf(":");if(c>-1){var u=o.substring(0,c),p=o.substring(c+1);o=v.mergeNsAndName(u,p)}i=_.PropertyBindingType.Attribute}else a[0]==N?(o=a[1],i=_.PropertyBindingType.Class):a[0]==k?(s=a.length>2?a[2]:null,o=a[1],i=_.PropertyBindingType.Style):(this._reportError("Invalid property name '"+t+"'",r),i=null);return new _.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}(),F=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=R.htmlVisitAll(this,e.children,H);return new _.ElementAst(e.name,R.htmlVisitAll(this,e.attrs),[],[],[],[],a,s,e.sourceSpan)},e.prototype.visitComment=function(e,t){return null},e.prototype.visitAttr=function(e,t){return new _.AttrAst(e.name,e.value,e.sourceSpan)},e.prototype.visitText=function(e,t){var n=t.findNgContentIndex(M);return new _.TextAst(e.value,n,e.sourceSpan)},e}(),W=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 U=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 H;for(var n=new b.SelectorMatcher,r=t[0].directive.template.ngContentSelectors,i=null,o=0;o<r.length;o++){var s=r[o];p.StringWrapper.equals(s,"*")?i=o:n.addSelectables(b.CssSelector.parse(r[o]),o)}return new e(n,i)},e.prototype.findNgContentIndex=function(e){var t=[];return this.ngContentIndexMatcher.match(e,function(e,n){t.push(n)}),u.ListWrapper.sort(t),p.isPresent(this.wildcardNgContentIndex)&&t.push(this.wildcardNgContentIndex),t.length>0?t[0]:null},e}(),H=new U(new b.SelectorMatcher,null),q=new F,G=function(e){function t(){e.apply(this,arguments),this.pipes=new Set}return o(t,e),t.prototype.visitPipe=function(e){return this.pipes.add(e.name),e.exp.visit(this),this.visitAll(e.args),null},t}(m.RecursiveAstVisitor);t.PipeCollector=G},function(e,t,n){"use strict";function r(e,t,n){return a.isBlank(e)&&(e=f.getHtmlTagDefinition(t).implicitNamespacePrefix,a.isBlank(e)&&a.isPresent(n)&&(e=f.getNsPrefix(n.name))),f.mergeNsAndName(e,t)}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(5),c=n(12),u=n(183),p=n(6),l=n(184),h=n(185),f=n(186),d=function(e){function t(t,n,r){e.call(this,n,r),this.elementName=t}return i(t,e),t.create=function(e,n,r){return new t(e,n,r)},t}(h.ParseError);t.HtmlTreeError=d;var y=function(){function e(e,t){this.rootNodes=e,this.errors=t}return e}();t.HtmlParseTreeResult=y;var v=function(){function e(){}return e.prototype.parse=function(e,t){var n=l.tokenizeHtml(e,t),r=new g(n.tokens).build();return new y(r.rootNodes,n.errors.concat(r.errors))},e=o([p.Injectable(),s("design:paramtypes",[])],e)}();t.HtmlParser=v;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!==l.HtmlTokenType.EOF;)this.peek.type===l.HtmlTokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this.peek.type===l.HtmlTokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this.peek.type===l.HtmlTokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this.peek.type===l.HtmlTokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this.peek.type===l.HtmlTokenType.TEXT||this.peek.type===l.HtmlTokenType.RAW_TEXT||this.peek.type===l.HtmlTokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._advance();return new y(this.rootNodes,this.errors)},e.prototype._advance=function(){var e=this.peek;return this.index<this.tokens.length-1&&this.index++,this.peek=this.tokens[this.index],e},e.prototype._advanceIf=function(e){return this.peek.type===e?this._advance():null},e.prototype._consumeCdata=function(e){this._consumeText(this._advance()),this._advanceIf(l.HtmlTokenType.CDATA_END)},e.prototype._consumeComment=function(e){var t=this._advanceIf(l.HtmlTokenType.RAW_TEXT);this._advanceIf(l.HtmlTokenType.COMMENT_END);var n=a.isPresent(t)?t.parts[0].trim():null;this._addToParent(new u.HtmlCommentAst(n,e.sourceSpan))},e.prototype._consumeText=function(e){var t=e.parts[0];if(t.length>0&&"\n"==t[0]){var n=this._getParentElement();a.isPresent(n)&&0==n.children.length&&f.getHtmlTagDefinition(n.name).ignoreFirstLf&&(t=t.substring(1))}t.length>0&&this._addToParent(new u.HtmlTextAst(t,e.sourceSpan))},e.prototype._closeVoidElement=function(){if(this.elementStack.length>0){var e=c.ListWrapper.last(this.elementStack);f.getHtmlTagDefinition(e.name).isVoid&&this.elementStack.pop()}},e.prototype._consumeStartTag=function(e){for(var t=e.parts[0],n=e.parts[1],i=[];this.peek.type===l.HtmlTokenType.ATTR_NAME;)i.push(this._consumeAttr(this._advance()));var o=r(t,n,this._getParentElement()),s=!1;this.peek.type===l.HtmlTokenType.TAG_OPEN_END_VOID?(this._advance(),s=!0,null!=f.getNsPrefix(o)||f.getHtmlTagDefinition(o).isVoid||this.errors.push(d.create(o,e.sourceSpan,'Only void and foreign elements can be self closed "'+e.parts[1]+'"'))):this.peek.type===l.HtmlTokenType.TAG_OPEN_END&&(this._advance(),s=!1);var a=this.peek.sourceSpan.start,c=new h.ParseSourceSpan(e.sourceSpan.start,a),p=new u.HtmlElementAst(o,i,[],c,c,null);this._pushElement(p),s&&(this._popElement(o),p.endSourceSpan=c)},e.prototype._pushElement=function(e){if(this.elementStack.length>0){var t=c.ListWrapper.last(this.elementStack);f.getHtmlTagDefinition(t.name).isClosedByChild(e.name)&&this.elementStack.pop()}var n=f.getHtmlTagDefinition(e.name),t=this._getParentElement();if(n.requireExtraParent(a.isPresent(t)?t.name:null)){var r=new u.HtmlElementAst(n.parentToAdd,[],[e],e.sourceSpan,e.startSourceSpan,e.endSourceSpan);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=r(e.parts[0],e.parts[1],this._getParentElement());this._getParentElement().endSourceSpan=e.sourceSpan,f.getHtmlTagDefinition(t).isVoid?this.errors.push(d.create(t,e.sourceSpan,'Void elements do not have end tags "'+e.parts[1]+'"')):this._popElement(t)||this.errors.push(d.create(t,e.sourceSpan,'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 c.ListWrapper.splice(this.elementStack,t,this.elementStack.length-t),!0;if(!f.getHtmlTagDefinition(n.name).closedByParent)return!1}return!1},e.prototype._consumeAttr=function(e){var t=f.mergeNsAndName(e.parts[0],e.parts[1]),n=e.sourceSpan.end,r="";if(this.peek.type===l.HtmlTokenType.ATTR_VALUE){var i=this._advance();r=i.parts[0],n=i.sourceSpan.end}return new u.HtmlAttrAst(t,r,new h.ParseSourceSpan(e.sourceSpan.start,n))},e.prototype._getParentElement=function(){return this.elementStack.length>0?c.ListWrapper.last(this.elementStack):null},e.prototype._addToParent=function(e){var t=this._getParentElement();a.isPresent(t)?t.children.push(e):this.rootNodes.push(e)},e}()},function(e,t,n){"use strict";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,i,o){this.name=e,this.attrs=t,this.children=n,this.sourceSpan=r,this.startSourceSpan=i,this.endSourceSpan=o}return e.prototype.visit=function(e,t){return e.visitElement(this,t)},e}();t.HtmlElementAst=a;var c=function(){function e(e,t){this.value=e,this.sourceSpan=t}return e.prototype.visit=function(e,t){return e.visitComment(this,t)},e}();t.HtmlCommentAst=c,t.htmlVisitAll=r},function(e,t,n){"use strict";function r(e,t){return new oe(new P.ParseSourceFile(e,t)).tokenize()}function i(e){var t=e===S?"EOF":_.StringWrapper.fromCharCode(e);return'Unexpected character "'+t+'"'}function o(e){return'Unknown entity "'+e+'" - use the "&#<decimal>;" or "&#x<hex>;" syntax'}function s(e){return!a(e)||e===S}function a(e){return e>=A&&T>=e||e===ne}function c(e){return a(e)||e===G||e===B||e===V||e===N||e===q}function u(e){return(Z>e||e>ee)&&($>e||e>J)&&(L>e||e>W)}function p(e){return e==F||e==S||!d(e)}function l(e){return e==F||e==S||!f(e)}function h(e){return e===H||e===S}function f(e){return e>=Z&&ee>=e||e>=$&&J>=e}function d(e){return e>=Z&&Y>=e||e>=$&&X>=e||e>=L&&W>=e}function y(e,t){return v(e)==v(t)}function v(e){return e>=Z&&ee>=e?e-Z+$:e}function g(e){for(var t,n=[],r=0;r<e.length;r++){var i=e[r];_.isPresent(t)&&t.type==w.TEXT&&i.type==w.TEXT?(t.parts[0]+=i.parts[0],t.sourceSpan.end=i.sourceSpan.end):(t=i,n.push(t))}return n}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)},_=n(5),b=n(12),P=n(185),C=n(186);!function(e){e[e.TAG_OPEN_START=0]="TAG_OPEN_START",e[e.TAG_OPEN_END=1]="TAG_OPEN_END",e[e.TAG_OPEN_END_VOID=2]="TAG_OPEN_END_VOID",e[e.TAG_CLOSE=3]="TAG_CLOSE",e[e.TEXT=4]="TEXT",e[e.ESCAPABLE_RAW_TEXT=5]="ESCAPABLE_RAW_TEXT",e[e.RAW_TEXT=6]="RAW_TEXT",e[e.COMMENT_START=7]="COMMENT_START",e[e.COMMENT_END=8]="COMMENT_END",e[e.CDATA_START=9]="CDATA_START",e[e.CDATA_END=10]="CDATA_END",e[e.ATTR_NAME=11]="ATTR_NAME",e[e.ATTR_VALUE=12]="ATTR_VALUE",e[e.DOC_TYPE=13]="DOC_TYPE",e[e.EOF=14]="EOF"}(t.HtmlTokenType||(t.HtmlTokenType={}));var w=t.HtmlTokenType,R=function(){function e(e,t,n){this.type=e,this.parts=t,this.sourceSpan=n}return e}();t.HtmlToken=R;var E=function(e){function t(t,n,r){e.call(this,r,t),this.tokenType=n}return m(t,e),t}(P.ParseError);t.HtmlTokenError=E;var O=function(){function e(e,t){this.tokens=e,this.errors=t}return e}();t.HtmlTokenizeResult=O,t.tokenizeHtml=r;var S=0,A=9,D=10,x=13,T=32,I=33,N=34,k=35,M=38,V=39,j=45,B=47,L=48,F=59,W=57,U=58,H=60,q=61,G=62,z=91,K=93,$=65,X=70,Q=88,J=90,Z=97,Y=102,ee=122,te=120,ne=160,re=/\r\n?/g,ie=function(){function e(e){this.error=e}return e}(),oe=function(){function e(e){this.file=e,this.peek=-1,this.index=-1,this.line=0,this.column=-1,this.tokens=[],this.errors=[],this.input=e.content,this.length=e.content.length,this._advance()}return e.prototype._processCarriageReturns=function(e){return _.StringWrapper.replaceAll(e,re,"\n")},e.prototype.tokenize=function(){for(;this.peek!==S;){var e=this._getLocation();try{this._attemptCharCode(H)?this._attemptCharCode(I)?this._attemptCharCode(z)?this._consumeCdata(e):this._attemptCharCode(j)?this._consumeComment(e):this._consumeDocType(e):this._attemptCharCode(B)?this._consumeTagClose(e):this._consumeTagOpen(e):this._consumeText()}catch(t){if(!(t instanceof ie))throw t;this.errors.push(t.error)}}return this._beginToken(w.EOF),this._endToken([]),new O(g(this.tokens),this.errors)},e.prototype._getLocation=function(){return new P.ParseLocation(this.file,this.index,this.line,this.column)},e.prototype._getSpan=function(e,t){return _.isBlank(e)&&(e=this._getLocation()),_.isBlank(t)&&(t=this._getLocation()),new P.ParseSourceSpan(e,t)},e.prototype._beginToken=function(e,t){void 0===t&&(t=null),_.isBlank(t)&&(t=this._getLocation()),this.currentTokenStart=t,this.currentTokenType=e},e.prototype._endToken=function(e,t){void 0===t&&(t=null),_.isBlank(t)&&(t=this._getLocation());var n=new R(this.currentTokenType,e,new P.ParseSourceSpan(this.currentTokenStart,t));return this.tokens.push(n),this.currentTokenStart=null,this.currentTokenType=null,n},e.prototype._createError=function(e,t){var n=new E(e,this.currentTokenType,t);return this.currentTokenStart=null,this.currentTokenType=null,new ie(n)},e.prototype._advance=function(){if(this.index>=this.length)throw this._createError(i(S),this._getSpan());this.peek===D?(this.line++,this.column=0):this.peek!==D&&this.peek!==x&&this.column++,this.index++,this.peek=this.index>=this.length?S:_.StringWrapper.charCodeAt(this.input,this.index)},e.prototype._attemptCharCode=function(e){return this.peek===e?(this._advance(),!0):!1},e.prototype._attemptCharCodeCaseInsensitive=function(e){return y(this.peek,e)?(this._advance(),!0):!1},e.prototype._requireCharCode=function(e){var t=this._getLocation();if(!this._attemptCharCode(e))throw this._createError(i(this.peek),this._getSpan(t,t))},e.prototype._attemptStr=function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCode(_.StringWrapper.charCodeAt(e,t)))return!1;return!0},e.prototype._attemptStrCaseInsensitive=function(e){for(var t=0;t<e.length;t++)if(!this._attemptCharCodeCaseInsensitive(_.StringWrapper.charCodeAt(e,t)))return!1;return!0},e.prototype._requireStr=function(e){var t=this._getLocation();if(!this._attemptStr(e))throw this._createError(i(this.peek),this._getSpan(t))},e.prototype._attemptCharCodeUntilFn=function(e){for(;!e(this.peek);)this._advance()},e.prototype._requireCharCodeUntilFn=function(e,t){var n=this._getLocation();if(this._attemptCharCodeUntilFn(e),this.index-n.offset<t)throw this._createError(i(this.peek),this._getSpan(n,n))},e.prototype._attemptUntilChar=function(e){for(;this.peek!==e;)this._advance()},e.prototype._readChar=function(e){if(e&&this.peek===M)return this._decodeEntity();var t=this.index;return this._advance(),this.input[t]},e.prototype._decodeEntity=function(){var e=this._getLocation();if(this._advance(),!this._attemptCharCode(k)){var t=this._savePosition();if(this._attemptCharCodeUntilFn(l),this.peek!=F)return this._restorePosition(t),"&";this._advance();var n=this.input.substring(e.offset+1,this.index-1),r=C.NAMED_ENTITIES[n];if(_.isBlank(r))throw this._createError(o(n),this._getSpan(e));return r}var s=this._attemptCharCode(te)||this._attemptCharCode(Q),a=this._getLocation().offset;if(this._attemptCharCodeUntilFn(p),this.peek!=F)throw this._createError(i(this.peek),this._getSpan());this._advance();var c=this.input.substring(a,this.index-1);try{var u=_.NumberWrapper.parseInt(c,s?16:10);return _.StringWrapper.fromCharCode(u)}catch(h){var f=this.input.substring(e.offset+1,this.index-1);throw this._createError(o(f),this._getSpan(e))}},e.prototype._consumeRawText=function(e,t,n){var r,i=this._getLocation();this._beginToken(e?w.ESCAPABLE_RAW_TEXT:w.RAW_TEXT,i);for(var o=[];;){if(r=this._getLocation(),this._attemptCharCode(t)&&n())break;for(this.index>r.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(w.COMMENT_START,e),this._requireCharCode(j),this._endToken([]);var n=this._consumeRawText(!1,j,function(){return t._attemptStr("->")});this._beginToken(w.COMMENT_END,n.sourceSpan.end),this._endToken([])},e.prototype._consumeCdata=function(e){var t=this;this._beginToken(w.CDATA_START,e),this._requireStr("CDATA["),this._endToken([]);var n=this._consumeRawText(!1,K,function(){return t._attemptStr("]>")});this._beginToken(w.CDATA_END,n.sourceSpan.end),this._endToken([])},e.prototype._consumeDocType=function(e){this._beginToken(w.DOC_TYPE,e),this._attemptUntilChar(G),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!==U&&!u(this.peek);)this._advance();var n;this.peek===U?(this._advance(),t=this.input.substring(e,this.index-1),n=this.index):n=e,this._requireCharCodeUntilFn(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._getSpan());var r=this.index;for(this._consumeTagOpenStart(e),t=this.input.substring(r,this.index).toLowerCase(),this._attemptCharCodeUntilFn(s);this.peek!==B&&this.peek!==G;)this._consumeAttributeName(),this._attemptCharCodeUntilFn(s),this._attemptCharCode(q)&&(this._attemptCharCodeUntilFn(s),this._consumeAttributeValue()),this._attemptCharCodeUntilFn(s);this._consumeTagOpenEnd()}catch(o){if(o instanceof ie)return this._restorePosition(n),this._beginToken(w.TEXT,e),void this._endToken(["<"]);throw o}var a=C.getHtmlTagDefinition(t).contentType;a===C.HtmlTagContentType.RAW_TEXT?this._consumeRawTextWithTagClose(t,!1):a===C.HtmlTagContentType.ESCAPABLE_RAW_TEXT&&this._consumeRawTextWithTagClose(t,!0)},e.prototype._consumeRawTextWithTagClose=function(e,t){var n=this,r=this._consumeRawText(t,H,function(){return n._attemptCharCode(B)?(n._attemptCharCodeUntilFn(s),n._attemptStrCaseInsensitive(e)?(n._attemptCharCodeUntilFn(s),n._attemptCharCode(G)?!0:!1):!1):!1});this._beginToken(w.TAG_CLOSE,r.sourceSpan.end),this._endToken([null,e])},e.prototype._consumeTagOpenStart=function(e){this._beginToken(w.TAG_OPEN_START,e);var t=this._consumePrefixAndName();this._endToken(t)},e.prototype._consumeAttributeName=function(){this._beginToken(w.ATTR_NAME);var e=this._consumePrefixAndName();this._endToken(e)},e.prototype._consumeAttributeValue=function(){this._beginToken(w.ATTR_VALUE);var e;if(this.peek===V||this.peek===N){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._requireCharCodeUntilFn(c,1),e=this.input.substring(r,this.index)}this._endToken([this._processCarriageReturns(e)])},e.prototype._consumeTagOpenEnd=function(){var e=this._attemptCharCode(B)?w.TAG_OPEN_END_VOID:w.TAG_OPEN_END;this._beginToken(e),this._requireCharCode(G),this._endToken([])},e.prototype._consumeTagClose=function(e){this._beginToken(w.TAG_CLOSE,e),this._attemptCharCodeUntilFn(s);var t;t=this._consumePrefixAndName(),this._attemptCharCodeUntilFn(s),this._requireCharCode(G),this._endToken(t)},e.prototype._consumeText=function(){var e=this._getLocation();this._beginToken(w.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];t<this.tokens.length&&(this.tokens=b.ListWrapper.slice(this.tokens,0,t))},e}()},function(e,t){"use strict";var n=function(){function e(e,t,n,r){this.file=e,this.offset=t,this.line=n,this.col=r}return e.prototype.toString=function(){return this.file.url+"@"+this.line+":"+this.col},e}();t.ParseLocation=n;var r=function(){function e(e,t){this.content=e,this.url=t}return e}();t.ParseSourceFile=r;var i=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=i;var o=function(){function e(e,t){this.span=e,this.msg=t}return e.prototype.toString=function(){var e=this.span.start.file.content,t=this.span.start.offset;t>e.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.length-1&&(n++,r++,"\n"!=e[n]||3!=++i););var o=e.substring(t,this.span.start.offset)+"[ERROR ->]"+e.substring(this.span.start.offset,n+1);return this.msg+' ("'+o+'"): '+this.span.start},e}();t.ParseError=o},function(e,t,n){"use strict";function r(e){var t=p[e.toLowerCase()];return a.isPresent(t)?t:l}function i(e){if("@"!=e[0])return[null,e];var t=a.RegExpWrapper.firstMatch(h,e);return[t[1],t[2]]}function o(e){return i(e)[0]}function s(e,t){return a.isPresent(e)?"@"+e+":"+t:t}var a=n(5);t.NAMED_ENTITIES=a.CONST_EXPR({Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",
15
+ 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 c=t.HtmlTagContentType,u=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.closedByChildren,i=n.requiredParents,o=n.implicitNamespacePrefix,s=n.contentType,u=n.closedByParent,p=n.isVoid,l=n.ignoreFirstLf;this.closedByChildren={},this.closedByParent=!1,a.isPresent(r)&&r.length>0&&r.forEach(function(e){return t.closedByChildren[e]=!0}),this.isVoid=a.normalizeBool(p),this.closedByParent=a.normalizeBool(u)||this.isVoid,a.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=a.isPresent(s)?s:c.PARSABLE_DATA,this.ignoreFirstLf=a.normalizeBool(l)}return e.prototype.requireExtraParent=function(e){if(a.isBlank(this.requiredParents))return!1;if(a.isBlank(e))return!0;var t=e.toLowerCase();return 1!=this.requiredParents[t]&&"template"!=t},e.prototype.isClosedByChild=function(e){return this.isVoid||a.normalizeBool(this.closedByChildren[e.toLowerCase()])},e}();t.HtmlTagDefinition=u;var p={base:new u({isVoid:!0}),meta:new u({isVoid:!0}),area:new u({isVoid:!0}),embed:new u({isVoid:!0}),link:new u({isVoid:!0}),img:new u({isVoid:!0}),input:new u({isVoid:!0}),param:new u({isVoid:!0}),hr:new u({isVoid:!0}),br:new u({isVoid:!0}),source:new u({isVoid:!0}),track:new u({isVoid:!0}),wbr:new u({isVoid:!0}),p:new u({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 u({closedByChildren:["tbody","tfoot"]}),tbody:new u({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new u({closedByChildren:["tbody"],closedByParent:!0}),tr:new u({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new u({closedByChildren:["td","th"],closedByParent:!0}),th:new u({closedByChildren:["td","th"],closedByParent:!0}),col:new u({requiredParents:["colgroup"],isVoid:!0}),svg:new u({implicitNamespacePrefix:"svg"}),math:new u({implicitNamespacePrefix:"math"}),li:new u({closedByChildren:["li"],closedByParent:!0}),dt:new u({closedByChildren:["dt","dd"]}),dd:new u({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new u({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new u({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new u({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new u({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new u({closedByChildren:["optgroup"],closedByParent:!0}),option:new u({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new u({ignoreFirstLf:!0}),listing:new u({ignoreFirstLf:!0}),style:new u({contentType:c.RAW_TEXT}),script:new u({contentType:c.RAW_TEXT}),title:new u({contentType:c.ESCAPABLE_RAW_TEXT}),textarea:new u({contentType:c.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})},l=new u;t.getHtmlTagDefinition=r;var h=/^@([^:]+):(.+)/g;t.splitNsName=i,t.getNsPrefix=o,t.mergeNsAndName=s},function(e,t){"use strict";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){"use strict";function r(e){var t=null,n=null,r=null,o=!1,_=null;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:e.name==v&&e.value.length>0&&(_=e.value)}),t=i(t);var b=e.name.toLowerCase(),P=g.OTHER;return s.splitNsName(b)[1]==c?P=g.NG_CONTENT:b==f?P=g.STYLE:b==d?P=g.SCRIPT:b==u&&r==h&&(P=g.STYLESHEET),new m(P,t,n,o,_)}function i(e){return o.isBlank(e)||0===e.length?"*":e}var o=n(5),s=n(186),a="select",c="ng-content",u="link",p="rel",l="href",h="stylesheet",f="style",d="script",y="ngNonBindable",v="ngProjectAs";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 g=t.PreparsedElementType,m=function(){function e(e,t,n,r,i){this.type=e,this.selectAttr=t,this.hrefAttr=n,this.nonBindable=r,this.projectAs=i}return e}();t.PreparsedElement=m},function(e,t,n){"use strict";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(167),s=n(5),a=n(14),c=n(48),u=n(163),p=n(162),l=n(178),h=n(6),f=n(75),d=n(183),y=n(182),v=n(188),g=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 m;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=g;var m=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.visitComment=function(e,t){return null},e.prototype.visitAttr=function(e,t){return null},e.prototype.visitText=function(e,t){return null},e}()},function(e,t,n){"use strict";function r(e,t){var n=[];return h.isPresent(t)&&o(t,n),h.isPresent(e.directives)&&o(e.directives,n),n}function i(e,t){var n=[];return h.isPresent(t)&&o(t,n),h.isPresent(e.pipes)&&o(e.pipes,n),n}function o(e,t){for(var n=0;n<e.length;n++){var r=l.resolveForwardRef(e[n]);h.isArray(r)?o(r,t):t.push(r)}}function s(e){return h.isPresent(e)&&e instanceof h.Type}function a(e,t){var n=t.moduleId;if(h.isPresent(n)){var r=O.getUrlScheme(n);return h.isPresent(r)&&r.length>0?n:"package:"+n+R.MODULE_SUFFIX}return P.reflector.importUri(e)}var c=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},u=this&&this.__metadata||function(e,t){return"object"==typeof Reflect&&"function"==typeof Reflect.metadata?Reflect.metadata(e,t):void 0},p=this&&this.__param||function(e,t){return function(n,r){t(n,r,e)}},l=n(6),h=n(5),f=n(14),d=n(167),y=n(24),v=n(104),g=n(111),m=n(105),_=n(191),b=n(170),P=n(17),C=n(6),w=n(107),R=n(169),E=n(192),O=n(162),S=function(){function e(e,t,n,r,i){this._directiveResolver=e,this._pipeResolver=t,this._viewResolver=n,this._platformDirectives=r,this._platformPipes=i,this._directiveCache=new Map,this._pipeCache=new Map,this._anonymousTypes=new Map,this._anonymousTypeIndex=0}return e.prototype.sanitizeName=function(e){var t=h.stringify(e);if(t.indexOf("(")<0)return t;var n=this._anonymousTypes.get(e);return n||(this._anonymousTypes.set(e,this._anonymousTypeIndex++),n=this._anonymousTypes.get(e)),"anonymous_type_"+n+"_"},e.prototype.getDirectiveMetadata=function(e){var t=this._directiveCache.get(e);if(h.isBlank(t)){var n=this._directiveResolver.resolve(e),r=null,i=null,o=null;if(n instanceof y.ComponentMetadata){E.assertArrayOfStrings("styles",n.styles);var s=n;r=a(e,s);var c=this._viewResolver.resolve(e);E.assertArrayOfStrings("styles",c.styles),i=new d.CompileTemplateMetadata({encapsulation:c.encapsulation,template:c.template,templateUrl:c.templateUrl,styles:c.styles,styleUrls:c.styleUrls}),o=s.changeDetection}t=d.CompileDirectiveMetadata.create({selector:n.selector,exportAs:n.exportAs,isComponent:h.isPresent(i),dynamicLoadable:!0,type:new d.CompileTypeMetadata({name:this.sanitizeName(e),moduleUrl:r,runtime:e}),template:i,changeDetection:o,inputs:n.inputs,outputs:n.outputs,host:n.host,lifecycleHooks:b.LIFECYCLE_HOOKS_VALUES.filter(function(t){return _.hasLifecycleHook(t,e)})}),this._directiveCache.set(e,t)}return t},e.prototype.getPipeMetadata=function(e){var t=this._pipeCache.get(e);if(h.isBlank(t)){var n=this._pipeResolver.resolve(e),r=P.reflector.importUri(e);t=new d.CompilePipeMetadata({type:new d.CompileTypeMetadata({name:this.sanitizeName(e),moduleUrl:r,runtime:e}),name:n.name,pure:n.pure}),this._pipeCache.set(e,t)}return t},e.prototype.getViewDirectivesMetadata=function(e){for(var t=this,n=this._viewResolver.resolve(e),i=r(n,this._platformDirectives),o=0;o<i.length;o++)if(!s(i[o]))throw new f.BaseException("Unexpected directive value '"+h.stringify(i[o])+"' on the View of component '"+h.stringify(e)+"'");return i.map(function(e){return t.getDirectiveMetadata(e)})},e.prototype.getViewPipesMetadata=function(e){for(var t=this,n=this._viewResolver.resolve(e),r=i(n,this._platformPipes),o=0;o<r.length;o++)if(!s(r[o]))throw new f.BaseException("Unexpected piped value '"+h.stringify(r[o])+"' on the View of component '"+h.stringify(e)+"'");return r.map(function(e){return t.getPipeMetadata(e)})},e=c([C.Injectable(),p(3,C.Optional()),p(3,C.Inject(w.PLATFORM_DIRECTIVES)),p(4,C.Optional()),p(4,C.Inject(w.PLATFORM_PIPES)),u("design:paramtypes",[v.DirectiveResolver,g.PipeResolver,m.ViewResolver,Array,Array])],e)}();t.RuntimeMetadataResolver=S},function(e,t,n){"use strict";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(170);t.hasLifecycleHook=r},function(e,t,n){"use strict";function r(e,t){if(i.assertionsEnabled()&&!i.isBlank(t)){if(!i.isArray(t))throw new o.BaseException("Expected '"+e+"' to be an array of strings.");for(var n=0;n<t.length;n+=1)if(!i.isString(t[n]))throw new o.BaseException("Expected '"+e+"' to be an array of strings.")}}var i=n(5),o=n(14);t.assertArrayOfStrings=r},function(e,t,n){"use strict";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(5),c=n(12),u=n(194),p=n(186),l=n(187),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){"use strict";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 Object.defineProperty(e.prototype,"attrToPropMap",{get:function(){return this._attrToPropMap},set:function(e){this._attrToPropMap=e},enumerable:!0,configurable:!0}),e}();t.DomAdapter=o},function(e,t,n){"use strict";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(196);t.AngularEntrypoint=i.AngularEntrypoint;var o=n(197);t.BROWSER_PROVIDERS=o.BROWSER_PROVIDERS,t.CACHED_TEMPLATE_PROVIDER=o.CACHED_TEMPLATE_PROVIDER,t.ELEMENT_PROBE_PROVIDERS=o.ELEMENT_PROBE_PROVIDERS,t.ELEMENT_PROBE_PROVIDERS_PROD_MODE=o.ELEMENT_PROBE_PROVIDERS_PROD_MODE,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(197),c=n(161),u=n(2),p=n(20),l=n(215),h=n(161),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){"use strict";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){"use strict";function r(){return new u.ExceptionHandler(h.DOM,!s.IS_DART)}function i(){return h.DOM.defaultDoc()}function o(){C.BrowserDomAdapter.makeCurrent(),E.wtfInit(),w.BrowserGetTestability.init()}var s=n(5),a=n(6),c=n(163),u=n(2),p=n(112),l=n(83),h=n(194),f=n(198),d=n(200),y=n(201),v=n(203),g=n(204),m=n(212),_=n(212),b=n(211),P=n(205),C=n(213),w=n(216),R=n(217),E=n(218),O=n(199),S=n(201),A=n(219),D=n(203);t.DOCUMENT=D.DOCUMENT;var x=n(223);t.Title=x.Title;var T=n(219);t.ELEMENT_PROBE_PROVIDERS=T.ELEMENT_PROBE_PROVIDERS,t.ELEMENT_PROBE_PROVIDERS_PROD_MODE=T.ELEMENT_PROBE_PROVIDERS_PROD_MODE,t.inspectNativeElement=T.inspectNativeElement,t.By=T.By;var I=n(213);t.BrowserDomAdapter=I.BrowserDomAdapter;var N=n(224);t.enableDebugTools=N.enableDebugTools,t.disableDebugTools=N.disableDebugTools;var k=n(201);t.HAMMER_GESTURE_CONFIG=k.HAMMER_GESTURE_CONFIG,t.HammerGestureConfig=k.HammerGestureConfig,t.BROWSER_PROVIDERS=s.CONST_EXPR([u.PLATFORM_COMMON_PROVIDERS,new a.Provider(u.PLATFORM_INITIALIZER,{useValue:o,multi:!0})]),t.BROWSER_APP_COMMON_PROVIDERS=s.CONST_EXPR([u.APPLICATION_COMMON_PROVIDERS,p.FORM_PROVIDERS,new a.Provider(u.PLATFORM_PIPES,{useValue:p.COMMON_PIPES,multi:!0}),new a.Provider(u.PLATFORM_DIRECTIVES,{useValue:p.COMMON_DIRECTIVES,multi:!0}),new a.Provider(u.ExceptionHandler,{useFactory:r,deps:[]}),new a.Provider(v.DOCUMENT,{useFactory:i,deps:[]}),new a.Provider(O.EVENT_MANAGER_PLUGINS,{useClass:f.DomEventsPlugin,multi:!0}),new a.Provider(O.EVENT_MANAGER_PLUGINS,{useClass:d.KeyEventsPlugin,multi:!0}),new a.Provider(O.EVENT_MANAGER_PLUGINS,{useClass:y.HammerGesturesPlugin,multi:!0}),new a.Provider(S.HAMMER_GESTURE_CONFIG,{useClass:S.HammerGestureConfig}),new a.Provider(g.DomRootRenderer,{useClass:g.DomRootRenderer_}),new a.Provider(u.RootRenderer,{useExisting:g.DomRootRenderer}),new a.Provider(_.SharedStylesHost,{useExisting:m.DomSharedStylesHost}),m.DomSharedStylesHost,l.Testability,b.BrowserDetails,P.AnimationBuilder,O.EventManager,A.ELEMENT_PROBE_PROVIDERS]),t.CACHED_TEMPLATE_PROVIDER=s.CONST_EXPR([new a.Provider(c.XHR,{useClass:R.CachedXHR})]),t.initDomAdapter=o},function(e,t,n){"use strict";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(194),a=n(2),c=n(199),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)})};return this.manager.getZone().runOutsideAngular(function(){return s.DOM.onAndCancel(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){"use strict";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(80),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);return 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;n<t.length;n++){var r=t[n];if(r.supports(e))return r}throw new a.BaseException("No event manager plugin found for event "+e)},e=r([c.Injectable(),o(0,c.Inject(t.EVENT_MANAGER_PLUGINS)),i("design:paramtypes",[Array,u.NgZone])],e)}();t.EventManager=l;var h=function(){function e(){}return e.prototype.supports=function(e){return!1},e.prototype.addEventListener=function(e,t,n){throw"not implemented"},e.prototype.addGlobalEventListener=function(e,t,n){throw"not implemented"},e}();t.EventManagerPlugin=h},function(e,t,n){"use strict";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(194),a=n(5),c=n(12),u=n(199),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());return this.manager.getZone().runOutsideAngular(function(){return s.DOM.onAndCancel(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){"use strict";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(202),c=n(5),u=n(14),p=n(2);t.HAMMER_GESTURE_CONFIG=c.CONST_EXPR(new p.OpaqueToken("HammerGestureConfig"));var l=function(){function e(){this.events=[],this.overrides={}}return e.prototype.buildHammer=function(e){var t=new Hammer(e);t.get("pinch").set({enable:!0}),t.get("rotate").set({enable:!0});for(var n in this.overrides)t.get(n).set(this.overrides[n]);return t},e=i([p.Injectable(),o("design:paramtypes",[])],e)}();t.HammerGestureConfig=l;var h=function(e){function n(t){e.call(this),this._config=t}return r(n,e),n.prototype.supports=function(t){if(!e.prototype.supports.call(this,t)&&!this.isCustomEvent(t))return!1;if(!c.isPresent(window.Hammer))throw new u.BaseException("Hammer.js is not loaded, can not bind "+t+" event");return!0},n.prototype.addEventListener=function(e,t,n){var r=this,i=this.manager.getZone();return t=t.toLowerCase(),i.runOutsideAngular(function(){var o=r._config.buildHammer(e),s=function(e){i.run(function(){n(e)})};return o.on(t,s),function(){o.off(t,s)}})},n.prototype.isCustomEvent=function(e){return this._config.events.indexOf(e)>-1},n=i([p.Injectable(),s(0,p.Inject(t.HAMMER_GESTURE_CONFIG)),o("design:paramtypes",[l])],n)}(a.HammerGesturesPluginCommon);t.HammerGesturesPlugin=h},function(e,t,n){"use strict";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(199),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){"use strict";var r=n(6),i=n(5);t.DOCUMENT=i.CONST_EXPR(new r.OpaqueToken("DocumentToken"))},function(e,t,n){"use strict";function r(e,t){var n=C.DOM.parentElement(e);if(t.length>0&&v.isPresent(n)){var r=C.DOM.nextSibling(e);if(v.isPresent(r))for(var i=0;i<t.length;i++)C.DOM.insertBefore(r,t[i]);else for(var i=0;i<t.length;i++)C.DOM.appendChild(n,t[i])}}function i(e,t){for(var n=0;n<t.length;n++)C.DOM.appendChild(e,t[n])}function o(e){return function(t){var n=e(t);n===!1&&C.DOM.preventDefault(t)}}function s(e){return v.StringWrapper.replaceAll(t.CONTENT_ATTR,x,e)}function a(e){return v.StringWrapper.replaceAll(t.HOST_ATTR,x,e)}function c(e,t,n){for(var r=0;r<t.length;r++){var i=t[r];v.isArray(i)?c(e,i,n):(i=v.StringWrapper.replaceAll(i,x,e),n.push(i))}return n}function u(e){if("@"!=e[0])return[null,e];var t=v.RegExpWrapper.firstMatch(T,e);return[t[1],t[2]]}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=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},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(6),y=n(205),v=n(5),g=n(14),m=n(212),_=n(199),b=n(203),P=n(3),C=n(194),w=n(210),R=v.CONST_EXPR({xlink:"http://www.w3.org/1999/xlink",svg:"http://www.w3.org/2000/svg"}),E="template bindings={}",O=/^template bindings=(.*)$/g,S=function(){function e(e,t,n,r){this.document=e,this.eventManager=t,this.sharedStylesHost=n,this.animate=r,this._registeredComponents=new Map}return e.prototype.renderComponent=function(e){var t=this._registeredComponents.get(e.id);return v.isBlank(t)&&(t=new D(this,e),this._registeredComponents.set(e.id,t)),t},e}();t.DomRootRenderer=S;var A=function(e){function t(t,n,r,i){e.call(this,t,n,r,i)}return p(t,e),t=l([d.Injectable(),f(0,d.Inject(b.DOCUMENT)),h("design:paramtypes",[Object,_.EventManager,m.DomSharedStylesHost,y.AnimationBuilder])],t)}(S);t.DomRootRenderer_=A;var D=function(){function e(e,t){this._rootRenderer=e,this.componentProto=t,this._styles=c(t.id,t.styles,[]),t.encapsulation!==P.ViewEncapsulation.Native&&this._rootRenderer.sharedStylesHost.addStyles(this._styles),this.componentProto.encapsulation===P.ViewEncapsulation.Emulated?(this._contentAttr=s(t.id),this._hostAttr=a(t.id)):(this._contentAttr=null,this._hostAttr=null)}return e.prototype.renderComponent=function(e){return this._rootRenderer.renderComponent(e)},e.prototype.selectRootElement=function(e){var t=C.DOM.querySelector(this._rootRenderer.document,e);if(v.isBlank(t))throw new g.BaseException('The selector "'+e+'" did not match any elements');return C.DOM.clearNodes(t),t},e.prototype.createElement=function(e,t){var n=u(t),r=v.isPresent(n[0])?C.DOM.createElementNS(R[n[0]],n[1]):C.DOM.createElement(n[1]);return v.isPresent(this._contentAttr)&&C.DOM.setAttribute(r,this._contentAttr,""),v.isPresent(e)&&C.DOM.appendChild(e,r),r},e.prototype.createViewRoot=function(e){var t;if(this.componentProto.encapsulation===P.ViewEncapsulation.Native){
16
+ t=C.DOM.createShadowRoot(e),this._rootRenderer.sharedStylesHost.addHost(t);for(var n=0;n<this._styles.length;n++)C.DOM.appendChild(t,C.DOM.createStyleElement(this._styles[n]))}else v.isPresent(this._hostAttr)&&C.DOM.setAttribute(e,this._hostAttr,""),t=e;return t},e.prototype.createTemplateAnchor=function(e){var t=C.DOM.createComment(E);return v.isPresent(e)&&C.DOM.appendChild(e,t),t},e.prototype.createText=function(e,t){var n=C.DOM.createTextNode(t);return v.isPresent(e)&&C.DOM.appendChild(e,n),n},e.prototype.projectNodes=function(e,t){v.isBlank(e)||i(e,t)},e.prototype.attachViewAfter=function(e,t){r(e,t);for(var n=0;n<t.length;n++)this.animateNodeEnter(t[n])},e.prototype.detachView=function(e){for(var t=0;t<e.length;t++){var n=e[t];C.DOM.remove(n),this.animateNodeLeave(n)}},e.prototype.destroyView=function(e,t){this.componentProto.encapsulation===P.ViewEncapsulation.Native&&v.isPresent(e)&&this._rootRenderer.sharedStylesHost.removeHost(C.DOM.getShadowRoot(e))},e.prototype.listen=function(e,t,n){return this._rootRenderer.eventManager.addEventListener(e,t,o(n))},e.prototype.listenGlobal=function(e,t,n){return this._rootRenderer.eventManager.addGlobalEventListener(e,t,o(n))},e.prototype.setElementProperty=function(e,t,n){C.DOM.setProperty(e,t,n)},e.prototype.setElementAttribute=function(e,t,n){var r,i=u(t);v.isPresent(i[0])&&(t=i[0]+":"+i[1],r=R[i[0]]),v.isPresent(n)?v.isPresent(r)?C.DOM.setAttributeNS(e,r,t,n):C.DOM.setAttribute(e,t,n):v.isPresent(r)?C.DOM.removeAttributeNS(e,r,i[1]):C.DOM.removeAttribute(e,t)},e.prototype.setBindingDebugInfo=function(e,t,n){var r=w.camelCaseToDashCase(t);if(C.DOM.isCommentNode(e)){var i=v.RegExpWrapper.firstMatch(O,v.StringWrapper.replaceAll(C.DOM.getText(e),/\n/g,"")),o=v.Json.parse(i[1]);o[r]=n,C.DOM.setText(e,v.StringWrapper.replace(E,"{}",v.Json.stringify(o)))}else this.setElementAttribute(e,t,n)},e.prototype.setElementDebugInfo=function(e,t){},e.prototype.setElementClass=function(e,t,n){n?C.DOM.addClass(e,t):C.DOM.removeClass(e,t)},e.prototype.setElementStyle=function(e,t,n){v.isPresent(n)?C.DOM.setStyle(e,t,v.stringify(n)):C.DOM.removeStyle(e,t)},e.prototype.invokeElementMethod=function(e,t,n){C.DOM.invoke(e,t,n)},e.prototype.setText=function(e,t){C.DOM.setText(e,t)},e.prototype.animateNodeEnter=function(e){C.DOM.isElementNode(e)&&C.DOM.hasClass(e,"ng-animate")&&(C.DOM.addClass(e,"ng-enter"),this._rootRenderer.animate.css().addAnimationClass("ng-enter-active").start(e).onComplete(function(){C.DOM.removeClass(e,"ng-enter")}))},e.prototype.animateNodeLeave=function(e){C.DOM.isElementNode(e)&&C.DOM.hasClass(e,"ng-animate")?(C.DOM.addClass(e,"ng-leave"),this._rootRenderer.animate.css().addAnimationClass("ng-leave-active").start(e).onComplete(function(){C.DOM.removeClass(e,"ng-leave"),C.DOM.remove(e)})):C.DOM.remove(e)},e}();t.DomRenderer=D;var x=/%COMP%/g;t.COMPONENT_VARIABLE="%COMP%",t.HOST_ATTR="_nghost-"+t.COMPONENT_VARIABLE,t.CONTENT_ATTR="_ngcontent-"+t.COMPONENT_VARIABLE;var T=/^@([^:]+):(.+)/g},function(e,t,n){"use strict";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(206),a=n(211),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){"use strict";var r=n(207),i=n(208),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){"use strict";var n=function(){function e(){this.classesToAdd=[],this.classesToRemove=[],this.animationClasses=[]}return e}();t.CssAnimationOptions=n},function(e,t,n){"use strict";var r=n(5),i=n(209),o=n(210),s=n(12),a=n(194),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){"use strict";var r=n(5);t.Math=r.global.Math,t.NaN=typeof t.NaN},function(e,t,n){"use strict";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){"use strict";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(209),a=n(194),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){"use strict";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(194),c=n(6),u=n(12),p=n(203),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;n<e.length;n++){var r=e[n];a.DOM.appendChild(t,a.DOM.createStyleElement(r))}},t.prototype.addHost=function(e){this._addStylesToHost(this._styles,e),this._hostNodes.add(e)},t.prototype.removeHost=function(e){u.SetWrapper["delete"](this._hostNodes,e)},t.prototype.onStylesAdded=function(e){var t=this;this._hostNodes.forEach(function(n){t._addStylesToHost(e,n)})},t=i([c.Injectable(),s(0,c.Inject(p.DOCUMENT)),o("design:paramtypes",[Object])],t)}(l);t.DomSharedStylesHost=h},function(e,t,n){"use strict";function r(){return a.isBlank(y)&&(y=document.querySelector("base"),a.isBlank(y))?null:y.getAttribute("href")}function i(e){return a.isBlank(v)&&(v=document.createElement("a")),v.setAttribute("href",e),"/"===v.pathname.charAt(0)?v.pathname:"/"+v.pathname}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(194),u=n(214),p={"class":"className",innerHtml:"innerHTML",readonly:"readOnly",tabindex:"tabIndex"},l=3,h={"\b":"Backspace"," ":"Tab","":"Delete","":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},f={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","":"NumLock"},d=function(e){function t(){e.apply(this,arguments)}return o(t,e),t.prototype.parse=function(e){throw new Error("parse not implemented")},t.makeCurrent=function(){c.setRootDomAdapter(new t)},t.prototype.hasProperty=function(e,t){return t in e},t.prototype.setProperty=function(e,t,n){e[t]=n},t.prototype.getProperty=function(e,t){return e[t]},t.prototype.invoke=function(e,t,n){e[t].apply(e,n)},t.prototype.logError=function(e){window.console.error?window.console.error(e):window.console.log(e)},t.prototype.log=function(e){window.console.log(e)},t.prototype.logGroup=function(e){window.console.group?(window.console.group(e),this.logError(e)):window.console.log(e)},t.prototype.logGroupEnd=function(){window.console.groupEnd&&window.console.groupEnd()},Object.defineProperty(t.prototype,"attrToPropMap",{get:function(){return p},enumerable:!0,configurable:!0}),t.prototype.query=function(e){return document.querySelector(e)},t.prototype.querySelector=function(e,t){return e.querySelector(t)},t.prototype.querySelectorAll=function(e,t){return e.querySelectorAll(t)},t.prototype.on=function(e,t,n){e.addEventListener(t,n,!1)},t.prototype.onAndCancel=function(e,t,n){return e.addEventListener(t,n,!1),function(){e.removeEventListener(t,n,!1)}},t.prototype.dispatchEvent=function(e,t){e.dispatchEvent(t)},t.prototype.createMouseEvent=function(e){var t=document.createEvent("MouseEvent");return t.initEvent(e,!0,!0),t},t.prototype.createEvent=function(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t},t.prototype.preventDefault=function(e){e.preventDefault(),e.returnValue=!1},t.prototype.isPrevented=function(e){return e.defaultPrevented||a.isPresent(e.returnValue)&&!e.returnValue},t.prototype.getInnerHTML=function(e){return e.innerHTML},t.prototype.getOuterHTML=function(e){return e.outerHTML},t.prototype.nodeName=function(e){return e.nodeName},t.prototype.nodeValue=function(e){return e.nodeValue},t.prototype.type=function(e){return e.type},t.prototype.content=function(e){return this.hasProperty(e,"content")?e.content:e},t.prototype.firstChild=function(e){return e.firstChild},t.prototype.nextSibling=function(e){return e.nextSibling},t.prototype.parentElement=function(e){return e.parentNode},t.prototype.childNodes=function(e){return e.childNodes},t.prototype.childNodesAsList=function(e){for(var t=e.childNodes,n=s.ListWrapper.createFixedSize(t.length),r=0;r<t.length;r++)n[r]=t[r];return n},t.prototype.clearNodes=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},t.prototype.appendChild=function(e,t){e.appendChild(t)},t.prototype.removeChild=function(e,t){e.removeChild(t)},t.prototype.replaceChild=function(e,t,n){e.replaceChild(t,n)},t.prototype.remove=function(e){return e.parentNode&&e.parentNode.removeChild(e),e},t.prototype.insertBefore=function(e,t){e.parentNode.insertBefore(t,e)},t.prototype.insertAllBefore=function(e,t){t.forEach(function(t){return e.parentNode.insertBefore(t,e)})},t.prototype.insertAfter=function(e,t){e.parentNode.insertBefore(t,e.nextSibling)},t.prototype.setInnerHTML=function(e,t){e.innerHTML=t},t.prototype.getText=function(e){return e.textContent},t.prototype.setText=function(e,t){e.textContent=t},t.prototype.getValue=function(e){return e.value},t.prototype.setValue=function(e,t){e.value=t},t.prototype.getChecked=function(e){return e.checked},t.prototype.setChecked=function(e,t){e.checked=t},t.prototype.createComment=function(e){return document.createComment(e)},t.prototype.createTemplate=function(e){var t=document.createElement("template");return t.innerHTML=e,t},t.prototype.createElement=function(e,t){return void 0===t&&(t=document),t.createElement(e)},t.prototype.createElementNS=function(e,t,n){return void 0===n&&(n=document),n.createElementNS(e,t)},t.prototype.createTextNode=function(e,t){return void 0===t&&(t=document),t.createTextNode(e)},t.prototype.createScriptTag=function(e,t,n){void 0===n&&(n=document);var r=n.createElement("SCRIPT");return r.setAttribute(e,t),r},t.prototype.createStyleElement=function(e,t){void 0===t&&(t=document);var n=t.createElement("style");return this.appendChild(n,this.createTextNode(e)),n},t.prototype.createShadowRoot=function(e){return e.createShadowRoot()},t.prototype.getShadowRoot=function(e){return e.shadowRoot},t.prototype.getHost=function(e){return e.host},t.prototype.clone=function(e){return e.cloneNode(!0)},t.prototype.getElementsByClassName=function(e,t){return e.getElementsByClassName(t)},t.prototype.getElementsByTagName=function(e,t){return e.getElementsByTagName(t)},t.prototype.classList=function(e){return Array.prototype.slice.call(e.classList,0)},t.prototype.addClass=function(e,t){e.classList.add(t)},t.prototype.removeClass=function(e,t){e.classList.remove(t)},t.prototype.hasClass=function(e,t){return e.classList.contains(t)},t.prototype.setStyle=function(e,t,n){e.style[t]=n},t.prototype.removeStyle=function(e,t){e.style[t]=null},t.prototype.getStyle=function(e,t){return e.style[t]},t.prototype.hasStyle=function(e,t,n){void 0===n&&(n=null);var r=this.getStyle(e,t)||"";return n?r==n:r.length>0},t.prototype.tagName=function(e){return e.tagName},t.prototype.attributeMap=function(e){for(var t=new Map,n=e.attributes,r=0;r<n.length;r++){var i=n[r];t.set(i.name,i.value)}return t},t.prototype.hasAttribute=function(e,t){return e.hasAttribute(t)},t.prototype.hasAttributeNS=function(e,t,n){return e.hasAttributeNS(t,n)},t.prototype.getAttribute=function(e,t){return e.getAttribute(t)},t.prototype.getAttributeNS=function(e,t,n){return e.getAttributeNS(t,n)},t.prototype.setAttribute=function(e,t,n){e.setAttribute(t,n)},t.prototype.setAttributeNS=function(e,t,n,r){e.setAttributeNS(t,n,r)},t.prototype.removeAttribute=function(e,t){e.removeAttribute(t)},t.prototype.removeAttributeNS=function(e,t,n){e.removeAttributeNS(t,n)},t.prototype.templateAwareRoot=function(e){return this.isTemplateElement(e)?this.content(e):e},t.prototype.createHtmlDocument=function(){return document.implementation.createHTMLDocument("fakeTitle")},t.prototype.defaultDoc=function(){return document},t.prototype.getBoundingClientRect=function(e){try{return e.getBoundingClientRect()}catch(t){return{top:0,bottom:0,left:0,right:0,width:0,height:0}}},t.prototype.getTitle=function(){return document.title},t.prototype.setTitle=function(e){document.title=e||""},t.prototype.elementMatches=function(e,t){var n=!1;return e instanceof HTMLElement&&(e.matches?n=e.matches(t):e.msMatchesSelector?n=e.msMatchesSelector(t):e.webkitMatchesSelector&&(n=e.webkitMatchesSelector(t))),n},t.prototype.isTemplateElement=function(e){return e instanceof HTMLElement&&"TEMPLATE"==e.nodeName},t.prototype.isTextNode=function(e){return e.nodeType===Node.TEXT_NODE},t.prototype.isCommentNode=function(e){return e.nodeType===Node.COMMENT_NODE},t.prototype.isElementNode=function(e){return e.nodeType===Node.ELEMENT_NODE},t.prototype.hasShadowRoot=function(e){return e instanceof HTMLElement&&a.isPresent(e.shadowRoot)},t.prototype.isShadowRoot=function(e){return e instanceof DocumentFragment},t.prototype.importIntoDoc=function(e){var t=e;return this.isTemplateElement(e)&&(t=this.content(e)),document.importNode(t,!0)},t.prototype.adoptNode=function(e){return document.adoptNode(e)},t.prototype.getHref=function(e){return e.href},t.prototype.getEventKey=function(e){var t=e.key;if(a.isBlank(t)){if(t=e.keyIdentifier,a.isBlank(t))return"Unidentified";t.startsWith("U+")&&(t=String.fromCharCode(parseInt(t.substring(2),16)),e.location===l&&f.hasOwnProperty(t)&&(t=f[t]))}return h.hasOwnProperty(t)&&(t=h[t]),t},t.prototype.getGlobalEventTarget=function(e){return"window"==e?window:"document"==e?document:"body"==e?document.body:void 0},t.prototype.getHistory=function(){return window.history},t.prototype.getLocation=function(){return window.location},t.prototype.getBaseHref=function(){var e=r();return a.isBlank(e)?null:i(e)},t.prototype.resetBaseElement=function(){y=null},t.prototype.getUserAgent=function(){return window.navigator.userAgent},t.prototype.setData=function(e,t,n){this.setAttribute(e,"data-"+t,n)},t.prototype.getData=function(e,t){return this.getAttribute(e,"data-"+t)},t.prototype.getComputedStyle=function(e){return getComputedStyle(e)},t.prototype.setGlobalVar=function(e,t){a.setValueOnPath(a.global,e,t)},t.prototype.requestAnimationFrame=function(e){return window.requestAnimationFrame(e)},t.prototype.cancelAnimationFrame=function(e){window.cancelAnimationFrame(e)},t.prototype.performanceNow=function(){return a.isPresent(window.performance)&&a.isPresent(window.performance.now)?window.performance.now():a.DateWrapper.toMillis(a.DateWrapper.now())},t}(u.GenericBrowserDomAdapter);t.BrowserDomAdapter=d;var y=null,v=null},function(e,t,n){"use strict";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(194),a=n(215),c=function(e){function t(){var t=this;e.call(this),this._animationPrefix=null,this._transitionEnd=null;try{var n=this.createElement("div",this.defaultDoc());if(o.isPresent(this.getStyle(n,"animationName")))this._animationPrefix="";else for(var r=["Webkit","Moz","O","ms"],s=0;s<r.length;s++)if(o.isPresent(this.getStyle(n,r[s]+"AnimationName"))){this._animationPrefix="-"+r[s].toLowerCase()+"-";break}var a={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};i.StringMapWrapper.forEach(a,function(e,r){o.isPresent(t.getStyle(n,r))&&(t._transitionEnd=e)})}catch(c){this._animationPrefix=null,this._transitionEnd=null}}return r(t,e),t.prototype.getXHR=function(){return a.XHRImpl},t.prototype.getDistributedNodes=function(e){return e.getDistributedNodes()},t.prototype.resolveAndSetHref=function(e,t,n){e.href=null==n?t:t+"/../"+n},t.prototype.supportsDOMEvents=function(){return!0},t.prototype.supportsNativeShadowDOM=function(){return o.isFunction(this.defaultDoc().body.createShadowRoot)},t.prototype.getAnimationPrefix=function(){return o.isPresent(this._animationPrefix)?this._animationPrefix:""},t.prototype.getTransitionEnd=function(){return o.isPresent(this._transitionEnd)?this._transitionEnd:""},t.prototype.supportsAnimation=function(){return o.isPresent(this._animationPrefix)&&o.isPresent(this._transitionEnd)},t}(s.DomAdapter);t.GenericBrowserDomAdapter=c},function(e,t,n){"use strict";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(49),o=n(5),s=n(163),a=function(e){function t(){e.apply(this,arguments)}return r(t,e),t.prototype.get=function(e){var t=i.PromiseWrapper.completer(),n=new XMLHttpRequest;return n.open("GET",e,!0),n.responseType="text",n.onload=function(){var r=o.isPresent(n.response)?n.response:n.responseText,i=1223===n.status?204:n.status;0===i&&(i=r?200:0),i>=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){"use strict";var r=n(12),i=n(5),o=n(194),s=n(2),a=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}(),c=function(){function e(){}return e.init=function(){s.setTestabilityGetter(new e)},e.prototype.addToWindow=function(e){i.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 a(r)},i.global.getAllAngularTestabilities=function(){var t=e.getAllTestabilities();return t.map(function(e){return new a(e)})},i.global.getAllAngularRootElements=function(){return e.getAllRootElements()};var t=function(e){var t=i.global.getAllAngularTestabilities(),n=t.length,r=!1,o=function(t){r=r||t,n--,0==n&&e(r)};t.forEach(function(e){e.whenStable(o)})};i.global.frameworkStabilizers||(i.global.frameworkStabilizers=r.ListWrapper.createGrowableSize(0)),i.global.frameworkStabilizers.push(t)},e.prototype.findTestabilityInTree=function(e,t,n){if(null==t)return null;var r=e.getTestability(t);return i.isPresent(r)?r:n?o.DOM.isShadowRoot(t)?this.findTestabilityInTree(e,o.DOM.getHost(t),!0):this.findTestabilityInTree(e,o.DOM.parentElement(t),!0):null},e}();t.BrowserGetTestability=c},function(e,t,n){"use strict";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(163),o=n(14),s=n(5),a=n(49),c=function(e){function t(){if(e.call(this),this._cache=s.global.$templateCache,null==this._cache)throw new o.BaseException("CachedXHR: Template cache was not found in $templateCache.")}return r(t,e),t.prototype.get=function(e){return this._cache.hasOwnProperty(e)?a.PromiseWrapper.resolve(this._cache[e]):a.PromiseWrapper.reject("CachedXHR: Did not find cached template for "+e,null)},t}(i.XHR);t.CachedXHR=c},function(e,t){"use strict";function n(){}t.wtfInit=n},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(194);t.DOM=i.DOM,t.setRootDomAdapter=i.setRootDomAdapter,t.DomAdapter=i.DomAdapter;var o=n(204);t.DomRenderer=o.DomRenderer;var s=n(203);t.DOCUMENT=s.DOCUMENT;var a=n(212);t.SharedStylesHost=a.SharedStylesHost,t.DomSharedStylesHost=a.DomSharedStylesHost;var c=n(198);t.DomEventsPlugin=c.DomEventsPlugin;var u=n(199);t.EVENT_MANAGER_PLUGINS=u.EVENT_MANAGER_PLUGINS,t.EventManager=u.EventManager,t.EventManagerPlugin=u.EventManagerPlugin,r(n(220)),r(n(221))},function(e,t,n){"use strict";var r=n(5),i=n(194),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-1!==t.providerTokens.indexOf(e)}},e}();t.By=o},function(e,t,n){"use strict";function r(e){return u.getDebugNode(e)}function i(e){return s.assertionsEnabled()?o(e):e}function o(e){return c.DOM.setGlobalVar(d,r),c.DOM.setGlobalVar(y,f),new h.DebugDomRootRenderer(e)}var s=n(5),a=n(6),c=n(194),u=n(106),p=n(204),l=n(2),h=n(222),f=s.CONST_EXPR({ApplicationRef:l.ApplicationRef,NgZone:l.NgZone}),d="ng.probe",y="ng.coreTokens";t.inspectNativeElement=r,t.ELEMENT_PROBE_PROVIDERS=s.CONST_EXPR([new a.Provider(l.RootRenderer,{useFactory:i,deps:[p.DomRootRenderer]})]),t.ELEMENT_PROBE_PROVIDERS_PROD_MODE=s.CONST_EXPR([new a.Provider(l.RootRenderer,{useFactory:o,deps:[p.DomRootRenderer]})])},function(e,t,n){"use strict";var r=n(5),i=n(106),o=function(){function e(e){this._delegate=e}return e.prototype.renderComponent=function(e){return new s(this,this._delegate.renderComponent(e))},e}();t.DebugDomRootRenderer=o;var s=function(){function e(e,t){this._rootRenderer=e,this._delegate=t}return e.prototype.renderComponent=function(e){return this._rootRenderer.renderComponent(e)},e.prototype.selectRootElement=function(e){var t=this._delegate.selectRootElement(e),n=new i.DebugElement(t,null);return i.indexDebugNode(n),t},e.prototype.createElement=function(e,t){var n=this._delegate.createElement(e,t),r=new i.DebugElement(n,i.getDebugNode(e));return r.name=t,i.indexDebugNode(r),n},e.prototype.createViewRoot=function(e){return this._delegate.createViewRoot(e)},e.prototype.createTemplateAnchor=function(e){var t=this._delegate.createTemplateAnchor(e),n=new i.DebugNode(t,i.getDebugNode(e));return i.indexDebugNode(n),t},e.prototype.createText=function(e,t){var n=this._delegate.createText(e,t),r=new i.DebugNode(n,i.getDebugNode(e));return i.indexDebugNode(r),n},e.prototype.projectNodes=function(e,t){var n=i.getDebugNode(e);if(r.isPresent(n)&&n instanceof i.DebugElement){var o=n;t.forEach(function(e){o.addChild(i.getDebugNode(e))})}this._delegate.projectNodes(e,t)},e.prototype.attachViewAfter=function(e,t){var n=i.getDebugNode(e);if(r.isPresent(n)){var o=n.parent;if(t.length>0&&r.isPresent(o)){var s=[];t.forEach(function(e){return s.push(i.getDebugNode(e))}),o.insertChildrenAfter(n,s)}}this._delegate.attachViewAfter(e,t)},e.prototype.detachView=function(e){e.forEach(function(e){var t=i.getDebugNode(e);r.isPresent(t)&&r.isPresent(t.parent)&&t.parent.removeChild(t)}),this._delegate.detachView(e)},e.prototype.destroyView=function(e,t){t.forEach(function(e){i.removeDebugNodeFromIndex(i.getDebugNode(e))}),this._delegate.destroyView(e,t)},e.prototype.listen=function(e,t,n){var o=i.getDebugNode(e);return r.isPresent(o)&&o.listeners.push(new i.EventListener(t,n)),this._delegate.listen(e,t,n)},e.prototype.listenGlobal=function(e,t,n){return this._delegate.listenGlobal(e,t,n)},e.prototype.setElementProperty=function(e,t,n){var o=i.getDebugNode(e);r.isPresent(o)&&o instanceof i.DebugElement&&o.properties.set(t,n),this._delegate.setElementProperty(e,t,n)},e.prototype.setElementAttribute=function(e,t,n){var o=i.getDebugNode(e);r.isPresent(o)&&o instanceof i.DebugElement&&o.attributes.set(t,n),this._delegate.setElementAttribute(e,t,n)},e.prototype.setBindingDebugInfo=function(e,t,n){this._delegate.setBindingDebugInfo(e,t,n)},e.prototype.setElementDebugInfo=function(e,t){var n=i.getDebugNode(e);n.setDebugInfo(t),this._delegate.setElementDebugInfo(e,t)},e.prototype.setElementClass=function(e,t,n){this._delegate.setElementClass(e,t,n)},e.prototype.setElementStyle=function(e,t,n){this._delegate.setElementStyle(e,t,n)},e.prototype.invokeElementMethod=function(e,t,n){this._delegate.invokeElementMethod(e,t,n)},e.prototype.setText=function(e,t){this._delegate.setText(e,t)},e}();t.DebugDomRenderer=s},function(e,t,n){"use strict";var r=n(194),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){"use strict";function r(e){a.ng=new s.AngularTools(e)}function i(){delete a.ng}var o=n(5),s=n(225),a=o.global;t.enableDebugTools=r,t.disableDebugTools=i},function(e,t,n){"use strict";var r=n(79),i=n(5),o=n(226),s=n(194),a=function(){function e(e){this.profiler=new c(e)}return e}();t.AngularTools=a;var c=function(){function e(e){this.appRef=e.injector.get(r.ApplicationRef)}return e.prototype.timeChangeDetection=function(e){var t=i.isPresent(e)&&e.record,n="Change Detection",r=i.isPresent(o.window.console.profile);t&&r&&o.window.console.profile(n);for(var a=s.DOM.performanceNow(),c=0;5>c||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");
17
+ },e}();t.AngularProfiler=c},function(e,t){"use strict";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){"use strict";var r=n(2),i=n(228),o=n(236),s=n(240),a=n(239),c=n(241),u=n(234),p=n(238),l=n(230);t.Request=l.Request;var h=n(237);t.Response=h.Response;var f=n(229);t.Connection=f.Connection,t.ConnectionBackend=f.ConnectionBackend;var d=n(239);t.BrowserXhr=d.BrowserXhr;var y=n(234);t.BaseRequestOptions=y.BaseRequestOptions,t.RequestOptions=y.RequestOptions;var v=n(238);t.BaseResponseOptions=v.BaseResponseOptions,t.ResponseOptions=v.ResponseOptions;var g=n(236);t.XHRBackend=g.XHRBackend,t.XHRConnection=g.XHRConnection;var m=n(240);t.JSONPBackend=m.JSONPBackend,t.JSONPConnection=m.JSONPConnection;var _=n(228);t.Http=_.Http,t.Jsonp=_.Jsonp;var b=n(231);t.Headers=b.Headers;var P=n(233);t.ResponseType=P.ResponseType,t.ReadyState=P.ReadyState,t.RequestMethod=P.RequestMethod;var C=n(235);t.URLSearchParams=C.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){"use strict";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(229),h=n(230),f=n(234),d=n(233),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){"use strict";var n=function(){function e(){}return e}();t.ConnectionBackend=n;var r=function(){function e(){}return e}();t.Connection=r},function(e,t,n){"use strict";var r=n(231),i=n(232),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){"use strict";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(){var e={};return this._headersMap.forEach(function(t,n){var r=[];o.iterateListLike(t,function(e){return r=o.ListWrapper.concat(r,e.split(","))}),e[n]=r}),e},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){"use strict";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(233),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){"use strict";!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){"use strict";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(231),c=n(233),u=n(2),p=n(235),l=n(232),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){"use strict";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;s<e.length;++s)o.push(e[s]);t.paramsMap.set(n,o)})},e.prototype.replaceAll=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);for(var a=0;a<e.length;++a)s.push(e[a]);t.paramsMap.set(n,s)})},e.prototype.toString=function(){var e=[];return this.paramsMap.forEach(function(t,n){t.forEach(function(t){return e.push(n+"="+t)})}),e.join("&")},e.prototype["delete"]=function(e){this.paramsMap["delete"](e)},e}();t.URLSearchParams=s},function(e,t,n){"use strict";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(233),s=n(237),a=n(231),c=n(238),u=n(2),p=n(239),l=n(5),h=n(50),f=n(232),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){"use strict";var r=n(5),i=n(14),o=n(232),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){"use strict";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(231),u=n(233),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){"use strict";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){"use strict";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(229),a=n(233),c=n(237),u=n(238),p=n(2),l=n(241),h=n(14),f=n(5),d=n(50),y="JSONP injected script did not invoke callback.",v="JSONP requests must use GET request method.",g=function(){function e(){}return e}();t.JSONPConnection=g;var m=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}(g);t.JSONPConnection_=m;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 m(e,this._browserJSONP,this._baseResponseOptions)},t=i([p.Injectable(),o("design:paramtypes",[l.BrowserJsonp,u.ResponseOptions])],t)}(_);t.JSONPBackend_=b},function(e,t,n){"use strict";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){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}var i=n(243);t.Router=i.Router;var o=n(262);t.RouterOutlet=o.RouterOutlet;var s=n(264);t.RouterLink=s.RouterLink;var a=n(248);t.RouteParams=a.RouteParams,t.RouteData=a.RouteData;var c=n(265);t.PlatformLocation=c.PlatformLocation;var u=n(244);t.RouteRegistry=u.RouteRegistry,t.ROUTER_PRIMARY_COMPONENT=u.ROUTER_PRIMARY_COMPONENT;var p=n(259);t.LocationStrategy=p.LocationStrategy,t.APP_BASE_HREF=p.APP_BASE_HREF;var l=n(266);t.HashLocationStrategy=l.HashLocationStrategy;var h=n(267);t.PathLocationStrategy=h.PathLocationStrategy;var f=n(258);t.Location=f.Location,r(n(257));var d=n(263);t.CanActivate=d.CanActivate;var y=n(248);t.Instruction=y.Instruction,t.ComponentInstruction=y.ComponentInstruction;var v=n(2);t.OpaqueToken=v.OpaqueToken;var g=n(268);t.ROUTER_PROVIDERS_COMMON=g.ROUTER_PROVIDERS_COMMON;var m=n(269);t.ROUTER_PROVIDERS=m.ROUTER_PROVIDERS,t.ROUTER_BINDINGS=m.ROUTER_BINDINGS;var _=n(262),b=n(264),P=n(5);t.ROUTER_DIRECTIVES=P.CONST_EXPR([_.RouterOutlet,b.RouterLink])},function(e,t,n){"use strict";function r(e,t){var n=v;return p.isBlank(e.component)?n:(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(48),u=n(12),p=n(5),l=n(14),h=n(2),f=n(244),d=n(258),y=n(260),v=c.PromiseWrapper.resolve(!0),g=c.PromiseWrapper.resolve(!1),m=function(){function e(e,t,n,r){this.registry=e,this.parent=t,this.hostComponent=n,this.root=r,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.");if(p.isPresent(this._outlet))throw new l.BaseException("Primary outlet is already registered.");return this._outlet=e,p.isPresent(this.currentInstruction)?this.commit(this.currentInstruction,!1):v},e.prototype.unregisterPrimaryOutlet=function(e){if(p.isPresent(e.name))throw new l.BaseException("registerPrimaryOutlet expects to be called with an unnamed outlet.");this._outlet=null},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){var t=this,n=this;if(p.isBlank(this.currentInstruction))return!1;for(;p.isPresent(n.parent)&&p.isPresent(e.child);)n=n.parent,e=e.child;if(p.isBlank(e.component)||p.isBlank(this.currentInstruction.component)||this.currentInstruction.component.routeName!=e.component.routeName)return!1;var r=!0;return p.isPresent(this.currentInstruction.component.params)&&u.StringMapWrapper.forEach(e.component.params,function(e,n){t.currentInstruction.component.params[n]!==e&&(r=!1)}),r},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)?g:this._currentNavigation=this._currentNavigation.then(function(r){return n._startNavigating(),n._afterPromiseFinishNavigating(n._navigate(e,t))})},e.prototype._settleInstruction=function(e){var t=this;return e.resolveComponent().then(function(n){var r=[];return p.isPresent(e.component)&&(e.component.reuse=!1),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._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._emitNavigationFinish=function(e){c.ObservableWrapper.callEmit(this._subject,e)},e.prototype._emitNavigationFail=function(e){c.ObservableWrapper.callError(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)?g:p.isBlank(e.component)?v: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=p.isBlank(e.component)||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)&&p.isPresent(e.component)){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,t){return c.ObservableWrapper.subscribe(this._subject,e,t)},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=[this.currentInstruction],t=this;p.isPresent(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=o([h.Injectable(),s("design:paramtypes",[f.RouteRegistry,e,Object,e])],e)}();t.Router=m;var _=function(e){function t(t,n,r){var i=this;e.call(this,t,null,r),this.root=this,this._location=n,this._locationSub=this._location.subscribe(function(e){i.recognize(e.url).then(function(t){p.isPresent(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[0]&&(r="/"+r),"hashchange"==e.type?t.toRootUrl()!=i._location.path()&&i._location.replaceState(r,o):i._location.go(r,o)}}):i._emitNavigationFail(e.url)})}),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[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)}(m);t.RootRouter=_;var b=function(e){function t(t,n){e.call(this,t.registry,t,n,t.root),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}(m)},function(e,t,n){"use strict";function r(e){var t=[];return e.forEach(function(e){if(h.isString(e)){var n=e;t=t.concat(n.split("/"))}else t.push(e)}),t}function i(e){if(e=e.filter(function(e){return h.isPresent(e)}),0==e.length)return null;if(1==e.length)return e[0];var t=e[0],n=e.slice(1);return n.reduce(function(e,t){return-1==o(t.specificity,e.specificity)?t:e},t)}function o(e,t){for(var n=h.Math.min(e.length,t.length),r=0;n>r;r+=1){var i=h.StringWrapper.charCodeAt(e,r),o=h.StringWrapper.charCodeAt(t,r),s=o-i;if(0!=s)return s}return e.length-t.length}function s(e,t){if(h.isType(e)){var n=d.reflector.annotations(e);if(h.isPresent(n))for(var r=0;r<n.length;r++){var i=n[r];if(i instanceof v.RouteConfig)throw new f.BaseException('Child routes are not allowed for "'+t+'". Use "..." on the parent\'s route path.')}}}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);
18
+ 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(12),l=n(48),h=n(5),f=n(14),d=n(17),y=n(2),v=n(245),g=n(246),m=n(249),_=n(248),b=n(256),P=n(247),C=l.PromiseWrapper.resolve(null);t.ROUTER_PRIMARY_COMPONENT=h.CONST_EXPR(new y.OpaqueToken("RouterPrimaryComponent"));var w=function(){function e(e){this._rootComponent=e,this._rules=new p.Map}return e.prototype.config=function(e,t){t=b.normalizeRouteConfig(t,this),t instanceof v.Route?b.assertComponentExists(t.component,t.path):t instanceof v.AuxRoute&&b.assertComponentExists(t.component,t.path);var n=this._rules.get(e);h.isBlank(n)&&(n=new m.RuleSet,this._rules.set(e,n));var r=n.config(t);t instanceof v.Route&&(r?s(t.component,t.path):this.configFromComponent(t.component))},e.prototype.configFromComponent=function(e){var t=this;if(h.isType(e)&&!this._rules.has(e)){var n=d.reflector.annotations(e);if(h.isPresent(n))for(var r=0;r<n.length;r++){var i=n[r];if(i instanceof v.RouteConfig){var o=i.configs;o.forEach(function(n){return t.config(e,n)})}}}},e.prototype.recognize=function(e,t){var n=P.parser.parse(e);return this._recognize(n,[])},e.prototype._recognize=function(e,t,n){var r=this;void 0===n&&(n=!1);var o=p.ListWrapper.last(t),s=h.isPresent(o)?o.component.componentType:this._rootComponent,a=this._rules.get(s);if(h.isBlank(a))return C;var c=n?a.recognizeAuxiliary(e):a.recognize(e),u=c.map(function(e){return e.then(function(e){if(e instanceof g.PathMatch){var n=t.length>0?[p.ListWrapper.last(t)]:[],i=r._auxRoutesToUnresolved(e.remainingAux,n),o=new _.ResolvedInstruction(e.instruction,null,i);if(h.isBlank(e.instruction)||e.instruction.terminal)return o;var s=t.concat([o]);return r._recognize(e.remaining,s).then(function(e){return h.isBlank(e)?null:e instanceof _.RedirectInstruction?e:(o.child=e,o)})}if(e instanceof g.RedirectMatch){var o=r.generate(e.redirectTo,t.concat([null]));return new _.RedirectInstruction(o.component,o.child,o.auxInstruction,e.specificity)}})});return!h.isBlank(e)&&""!=e.path||0!=c.length?l.PromiseWrapper.all(u).then(i):l.PromiseWrapper.resolve(this.generateDefault(s))},e.prototype._auxRoutesToUnresolved=function(e,t){var n=this,r={};return e.forEach(function(e){r[e.path]=new _.UnresolvedInstruction(function(){return n._recognize(e,t,!0)})}),r},e.prototype.generate=function(e,t,n){void 0===n&&(n=!1);var i,o=r(e);if(""==p.ListWrapper.first(o))o.shift(),i=p.ListWrapper.first(t),t=[];else if(i=t.length>0?t.pop():null,"."==p.ListWrapper.first(o))o.shift();else if(".."==p.ListWrapper.first(o))for(;".."==p.ListWrapper.first(o);){if(t.length<=0)throw new f.BaseException('Link "'+p.ListWrapper.toJSON(e)+'" has too many "../" segments.');i=t.pop(),o=p.ListWrapper.slice(o,1)}else{var s=p.ListWrapper.first(o),a=this._rootComponent,c=null;if(t.length>1){var u=t[t.length-1],l=t[t.length-2];a=u.component.componentType,c=l.component.componentType}else 1==t.length&&(a=t[0].component.componentType,c=this._rootComponent);var d=this.hasRoute(s,a),y=h.isPresent(c)&&this.hasRoute(s,c);if(y&&d){var v='Link "'+p.ListWrapper.toJSON(e)+'" is ambiguous, use "./" or "../" to disambiguate.';throw new f.BaseException(v)}y&&(i=t.pop())}if(""==o[o.length-1]&&o.pop(),o.length>0&&""==o[0]&&o.shift(),o.length<1){var v='Link "'+p.ListWrapper.toJSON(e)+'" must include a route name.';throw new f.BaseException(v)}for(var g=this._generate(o,t,i,n,e),m=t.length-1;m>=0;m--){var _=t[m];if(h.isBlank(_))break;g=_.replaceChild(g)}return g},e.prototype._generate=function(e,t,n,r,i){var o=this;void 0===r&&(r=!1);var s=this._rootComponent,a=null,c={},u=p.ListWrapper.last(t);if(h.isPresent(u)&&h.isPresent(u.component)&&(s=u.component.componentType),0==e.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&&(c=p.StringMapWrapper.merge(n.auxInstruction,c),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 y=0,v={};if(y<e.length&&h.isString(e[y])){var g=e[y];if(""==g||"."==g||".."==g)throw new f.BaseException('"'+g+'/" is only allowed at the beginning of a link DSL.');if(y+=1,y<e.length){var m=e[y];h.isStringMap(m)&&!h.isArray(m)&&(v=m,y+=1)}var b=(r?d.auxRulesByName:d.rulesByName).get(g);if(h.isBlank(b))throw new f.BaseException('Component "'+h.getTypeNameForDebugging(s)+'" has no route named "'+g+'".');if(h.isBlank(b.handler.componentType)){var C=b.generateComponentPathValues(v);return new _.UnresolvedInstruction(function(){return b.handler.resolveComponentType().then(function(s){return o._generate(e,t,n,r,i)})},C.urlPath,P.convertUrlParamsToArray(C.urlParams))}a=r?d.generateAuxiliary(g,v):d.generate(g,v)}for(;y<e.length&&h.isArray(e[y]);){var w=[u],R=this._generate(e[y],w,null,!0,i);c[R.component.urlPath]=R,y+=1}var E=new _.ResolvedInstruction(a,null,c);if(h.isPresent(a)&&h.isPresent(a.componentType)){var O=null;if(a.terminal)y>=e.length;else{var S=t.concat([E]),A=e.slice(y);O=this._generate(A,S,null,!1,i)}E.child=O}return E},e.prototype.hasRoute=function(e,t){var n=this._rules.get(t);return h.isBlank(n)?!1:n.hasRoute(e)},e.prototype.generateDefault=function(e){var t=this;if(h.isBlank(e))return null;var n=this._rules.get(e);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 t.generateDefault(e)})})},e=a([y.Injectable(),u(0,y.Inject(t.ROUTER_PRIMARY_COMPONENT)),c("design:paramtypes",[h.Type])],e)}();t.RouteRegistry=w},function(e,t,n){"use strict";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=function(){function e(e){this.configs=e}return e=i([s.CONST(),o("design:paramtypes",[Array])],e)}();t.RouteConfig=a;var c=function(){function e(e){var t=e.name,n=e.useAsDefault,r=e.path,i=e.regex,o=e.serializer,s=e.data;this.name=t,this.useAsDefault=n,this.path=r,this.regex=i,this.serializer=o,this.data=s}return e=i([s.CONST(),o("design:paramtypes",[Object])],e)}();t.AbstractRoute=c;var u=function(e){function t(t){var n=t.name,r=t.useAsDefault,i=t.path,o=t.regex,s=t.serializer,a=t.data,c=t.component;e.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.aux=null,this.component=c}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(c);t.Route=u;var p=function(e){function t(t){var n=t.name,r=t.useAsDefault,i=t.path,o=t.regex,s=t.serializer,a=t.data,c=t.component;e.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.component=c}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(c);t.AuxRoute=p;var l=function(e){function t(t){var n=t.name,r=t.useAsDefault,i=t.path,o=t.regex,s=t.serializer,a=t.data,c=t.loader;e.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.aux=null,this.loader=c}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(c);t.AsyncRoute=l;var h=function(e){function t(t){var n=t.name,r=t.useAsDefault,i=t.path,o=t.regex,s=t.serializer,a=t.data,c=t.redirectTo;e.call(this,{name:n,useAsDefault:r,path:i,regex:o,serializer:s,data:a}),this.redirectTo=c}return r(t,e),t=i([s.CONST(),o("design:paramtypes",[Object])],t)}(c);t.Redirect=h},function(e,t,n){"use strict";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(49),a=n(12),c=n(247),u=n(248),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._pathRecognizer=e,this.redirectTo=t,this.hash=this._pathRecognizer.hash}return Object.defineProperty(e.prototype,"path",{get:function(){return this._pathRecognizer.toString()},set:function(e){throw new o.BaseException("you cannot set the path of a RedirectRule directly")},enumerable:!0,configurable:!0}),e.prototype.recognize=function(e){var t=null;return i.isPresent(this._pathRecognizer.matchUrl(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.RedirectRule=f;var d=function(){function e(e,t,n){this._routePath=e,this.handler=t,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(e.prototype,"path",{get:function(){return this._routePath.toString()},set:function(e){throw new o.BaseException("you cannot set the path of a RouteRule directly")},enumerable:!0,configurable:!0}),e.prototype.recognize=function(e){var t=this,n=this._routePath.matchUrl(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.rest,n.auxiliary)})},e.prototype.generate=function(e){var t=this._routePath.generateUrl(e),n=t.urlPath,r=t.urlParams;return this._getInstruction(n,c.convertUrlParamsToArray(r),e)},e.prototype.generateComponentPathValues=function(e){return this._routePath.generateUrl(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 u.ComponentInstruction(e,t,this.handler.data,this.handler.componentType,this.terminal,this.specificity,n,this._routeName);return this._cache.set(r,s),s},e}();t.RouteRule=d},function(e,t,n){"use strict";function r(e){var t=[];return p.isBlank(e)?[]:(u.StringMapWrapper.forEach(e,function(e,n){t.push(e===!0?n:n+"="+e)}),t)}function i(e,t){return void 0===t&&(t="&"),r(e).join(t)}function o(e){for(var t=new h(e[e.length-1]),n=e.length-2;n>=0;n-=1)t=new h(e[n],t);return t}function s(e){var t=p.RegExpWrapper.firstMatch(d,e);return p.isPresent(t)?t[0]:""}function a(e){var t=p.RegExpWrapper.firstMatch(y,e);return p.isPresent(t)?t[0]:""}var c=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)},u=n(12),p=n(5),l=n(14);t.convertUrlParamsToArray=r,t.serializeParams=i;var h=function(){function e(e,t,n,r){void 0===t&&(t=null),void 0===n&&(n=p.CONST_EXPR([])),void 0===r&&(r=p.CONST_EXPR({})),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(){var e=i(this.params,";");return e.length>0?";"+e:""},e.prototype._childString=function(){return p.isPresent(this.child)?"/"+this.child.toString():""},e}();t.Url=h;var f=function(e){function t(t,n,r,i){void 0===n&&(n=null),void 0===r&&(r=p.CONST_EXPR([])),void 0===i&&(i=null),e.call(this,t,n,r,i)}return c(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 p.isBlank(this.params)?"":"?"+i(this.params)},t}(h);t.RootUrl=f,t.pathSegmentsToUrl=o;var d=p.RegExpWrapper.create("^[^\\/\\(\\)\\?;=&#]+"),y=p.RegExpWrapper.create("^[^\\(\\)\\?;&#]+"),v=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 l.BaseException('Expected "'+e+'".');this._remaining=this._remaining.substring(e.length)},e.prototype.parse=function(e){return this._remaining=e,""==e||"/"==e?new h(""):this.parseRoot()},e.prototype.parseRoot=function(){this.peekStartsWith("/")&&this.capture("/");var e=s(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 f(e,n,t,r)},e.prototype.parseSegment=function(){if(0==this._remaining.length)return null;this.peekStartsWith("/")&&this.capture("/");var e=s(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 h(e,r,n,t)},e.prototype.parseQueryParams=function(){var e={};for(this.capture("?"),this.parseQueryParam(e);this._remaining.length>0&&this.peekStartsWith("&");)this.capture("&"),this.parseQueryParam(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=s(this._remaining);if(!p.isBlank(t)){this.capture(t);var n=!0;if(this.peekStartsWith("=")){this.capture("=");var r=s(this._remaining);p.isPresent(r)&&(n=r,this.capture(n))}e[t]=n}},e.prototype.parseQueryParam=function(e){var t=s(this._remaining);if(!p.isBlank(t)){this.capture(t);var n=!0;if(this.peekStartsWith("=")){this.capture("=");var r=a(this._remaining);p.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=v,t.parser=new v},function(e,t,n){"use strict";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(48),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(e,t,n){this.component=e,this.child=t,this.auxInstruction=n}return Object.defineProperty(e.prototype,"urlPath",{get:function(){return o.isPresent(this.component)?this.component.urlPath:""},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"urlParams",{get:function(){return o.isPresent(this.component)?this.component.urlParams:[]},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"specificity",{get:function(){var e="";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():"")+this.toUrlQuery()},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.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,t,n,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,t,n,{})}return r(t,e),t.prototype.toLinkUrl=function(){return""},t.prototype._toLinkUrl=function(){return""},t}(p);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,null,null,{}),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=o.isPresent(t)?t.child:null,e.component=o.isPresent(t)?t.component:null})},t}(u);t.UnresolvedInstruction=h;var f=function(e){function t(t,n,r,i){e.call(this,t,n,r),this._specificity=i}return r(t,e),Object.defineProperty(t.prototype,"specificity",{get:function(){return this._specificity},enumerable:!0,configurable:!0}),t}(p);t.RedirectInstruction=f;var d=function(){function e(e,n,r,i,s,a,c,u){void 0===c&&(c=null),this.urlPath=e,this.urlParams=n,this.componentType=i,this.terminal=s,this.specificity=a,this.params=c,this.routeName=u,this.reuse=!1,this.routeData=o.isPresent(r)?r:t.BLANK_ROUTE_DATA}return e}();t.ComponentInstruction=d},function(e,t,n){"use strict";var r=n(5),i=n(14),o=n(12),s=n(48),a=n(246),c=n(245),u=n(250),p=n(251),l=n(252),h=n(255),f=function(){function e(){this.rulesByName=new o.Map,this.auxRulesByName=new o.Map,this.auxRulesByPath=new o.Map,this.rules=[],this.defaultRule=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=this._getRoutePath(e),s=new a.RouteRule(o,t,e.name);return this.auxRulesByPath.set(o.toString(),s),r.isPresent(e.name)&&this.auxRulesByName.set(e.name,s),s.terminal}var l=!1;if(e instanceof c.Redirect){var h=this._getRoutePath(e),f=new a.RedirectRule(h,e.redirectTo);return this._assertNoHashCollision(f.hash,e.path),this.rules.push(f),!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 d=this._getRoutePath(e),y=new a.RouteRule(d,t,e.name);if(this._assertNoHashCollision(y.hash,e.path),l){if(r.isPresent(this.defaultRule))throw new i.BaseException("Only one route can be default");this.defaultRule=y}return this.rules.push(y),r.isPresent(e.name)&&this.rulesByName.set(e.name,y),y.terminal},e.prototype.recognize=function(e){var t=[];return this.rules.forEach(function(n){var i=n.recognize(e);r.isPresent(i)&&t.push(i)}),0==t.length&&r.isPresent(e)&&e.auxiliary.length>0?[s.PromiseWrapper.resolve(new a.PathMatch(null,null,e.auxiliary))]:t},e.prototype.recognizeAuxiliary=function(e){var t=this.auxRulesByPath.get(e.path);return r.isPresent(t)?[t.recognize(e)]:[s.PromiseWrapper.resolve(null)]},e.prototype.hasRoute=function(e){return this.rulesByName.has(e)},e.prototype.componentLoaded=function(e){return this.hasRoute(e)&&r.isPresent(this.rulesByName.get(e).handler.componentType)},e.prototype.loadComponent=function(e){return this.rulesByName.get(e).handler.resolveComponentType()},e.prototype.generate=function(e,t){var n=this.rulesByName.get(e);return r.isBlank(n)?null:n.generate(t)},e.prototype.generateAuxiliary=function(e,t){var n=this.auxRulesByName.get(e);return r.isBlank(n)?null:n.generate(t)},e.prototype._assertNoHashCollision=function(e,t){this.rules.forEach(function(n){if(e==n.hash)throw new i.BaseException("Configuration '"+t+"' conflicts with existing route '"+n.path+"'")})},e.prototype._getRoutePath=function(e){if(r.isPresent(e.regex)){if(r.isFunction(e.serializer))return new h.RegexRoutePath(e.regex,e.serializer);throw new i.BaseException("Route provides a regex property, '"+e.regex+"', but no serializer property")}if(r.isPresent(e.path)){var t=e instanceof c.AuxRoute&&e.path.startsWith("/")?e.path.substring(1):e.path;return new l.ParamRoutePath(t)}throw new i.BaseException("Route must provide either a path or regex property")},e}();t.RuleSet=f},function(e,t,n){"use strict";var r=n(5),i=n(248),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){"use strict";var r=n(48),i=n(5),o=n(248),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){"use strict";function r(e){return o.isBlank(e)?null:(e=o.StringWrapper.replaceAll(e,v,"%25"),e=o.StringWrapper.replaceAll(e,g,"%2F"),e=o.StringWrapper.replaceAll(e,m,"%28"),e=o.StringWrapper.replaceAll(e,_,"%29"),e=o.StringWrapper.replaceAll(e,b,"%3B"))}function i(e){return o.isBlank(e)?null:(e=o.StringWrapper.replaceAll(e,P,";"),e=o.StringWrapper.replaceAll(e,C,")"),e=o.StringWrapper.replaceAll(e,w,"("),e=o.StringWrapper.replaceAll(e,R,"/"),e=o.StringWrapper.replaceAll(e,E,"%"))}var o=n(5),s=n(14),a=n(12),c=n(253),u=n(247),p=n(254),l=function(){function e(){this.name="",this.specificity="",this.hash="..."}return e.prototype.generate=function(e){return""},e.prototype.match=function(e){return!0},e}(),h=function(){function e(e){this.path=e,this.name="",this.specificity="2",this.hash=e}return e.prototype.match=function(e){return e==this.path},e.prototype.generate=function(e){return this.path},e}(),f=function(){function e(e){this.name=e,this.specificity="1",this.hash=":"}return e.prototype.match=function(e){return e.length>0},e.prototype.generate=function(e){if(!a.StringMapWrapper.contains(e.map,this.name))throw new s.BaseException("Route generator for '"+this.name+"' was not included in parameters passed.");return r(c.normalizeString(e.get(this.name)))},e.paramMatcher=/^:([^\/]+)$/g,e}(),d=function(){function e(e){this.name=e,this.specificity="0",this.hash="*"}return e.prototype.match=function(e){return!0},e.prototype.generate=function(e){return c.normalizeString(e.get(this.name))},e.wildcardMatcher=/^\*([^\/]+)$/g,e}(),y=function(){function e(e){this.routePath=e,this.terminal=!0,this._assertValidPath(e),this._parsePathString(e),this.specificity=this._calculateSpecificity(),this.hash=this._calculateHash();var t=this._segments[this._segments.length-1];this.terminal=!(t instanceof l)}return e.prototype.matchUrl=function(e){for(var t,n=e,r={},s=[],c=0;c<this._segments.length;c+=1){var h=this._segments[c];if(t=n,h instanceof l)break;if(o.isPresent(t)){if(h instanceof d){r[h.name]=t.toString(),s.push(t.toString()),n=null;break}if(s.push(t.path),h instanceof f)r[h.name]=i(t.path);else if(!h.match(t.path))return null;n=t.child}else if(!h.match(""))return null}if(this.terminal&&o.isPresent(n))return null;var y=s.join("/"),v=[],g=[],m=r;if(o.isPresent(t)){var _=e instanceof u.RootUrl?e:t;o.isPresent(_.params)?(m=a.StringMapWrapper.merge(_.params,r),g=u.convertUrlParamsToArray(_.params)):m=r,v=t.auxiliary}return new p.MatchedUrl(y,g,m,v,n)},e.prototype.generateUrl=function(e){for(var t=new c.TouchMap(e),n=[],r=0;r<this._segments.length;r++){var i=this._segments[r];i instanceof l||n.push(i.generate(t))}var o=n.join("/"),s=t.getUnused(),a=s;return new p.GeneratedUrl(o,a)},e.prototype.toString=function(){return this.routePath},e.prototype._parsePathString=function(e){e.startsWith("/")&&(e=e.substring(1));var t=e.split("/");this._segments=[];for(var n=t.length-1,r=0;n>=r;r++){var i,a=t[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 "'+e+'".');this._segments.push(new l)}else this._segments.push(new h(a))}},e.prototype._calculateSpecificity=function(){var e,t,n=this._segments.length;if(0==n)t+="2";else for(t="",e=0;n>e;e++)t+=this._segments[e].specificity;return t},e.prototype._calculateHash=function(){var e,t=this._segments.length,n=[];for(e=0;t>e;e++)n.push(this._segments[e].hash);return n.join("/")},e.prototype._assertValidPath=function(t){if(o.StringWrapper.contains(t,"#"))throw new s.BaseException('Path "'+t+'" should not include "#". Use "HashLocationStrategy" instead.');var n=o.RegExpWrapper.firstMatch(e.RESERVED_CHARS,t);if(o.isPresent(n))throw new s.BaseException('Path "'+t+'" contains "'+n[0]+'" which is not allowed in a route config.')},e.RESERVED_CHARS=o.RegExpWrapper.create("//|\\(|\\)|;|\\?|="),e}();t.ParamRoutePath=y;var v=/%/g,g=/\//g,m=/\(/g,_=/\)/g,b=/;/g,P=/%3B/gi,C=/%29/gi,w=/%28/gi,R=/%2F/gi,E=/%25/gi},function(e,t,n){"use strict";function r(e){return i.isBlank(e)?null:e.toString()}var i=n(5),o=n(12),s=function(){function e(e){var t=this;this.map={},this.keys={},i.isPresent(e)&&o.StringMapWrapper.forEach(e,function(e,n){t.map[n]=i.isPresent(e)?e.toString():null,t.keys[n]=!0})}return e.prototype.get=function(e){return o.StringMapWrapper["delete"](this.keys,e),this.map[e]},e.prototype.getUnused=function(){var e=this,t={},n=o.StringMapWrapper.keys(this.keys);return n.forEach(function(n){return t[n]=o.StringMapWrapper.get(e.map,n)}),t},e}();t.TouchMap=s,t.normalizeString=r},function(e,t){"use strict";var n=function(){function e(e,t,n,r,i){this.urlPath=e,this.urlParams=t,this.allParams=n,this.auxiliary=r,this.rest=i}return e}();t.MatchedUrl=n;var r=function(){function e(e,t){this.urlPath=e,this.urlParams=t}return e}();t.GeneratedUrl=r},function(e,t,n){"use strict";var r=n(5),i=n(254),o=function(){function e(e,t){this._reString=e,this._serializer=t,this.terminal=!0,this.specificity="2",this.hash=this._reString,this._regex=r.RegExpWrapper.create(this._reString)}return e.prototype.matchUrl=function(e){var t=e.toString(),n={},o=r.RegExpWrapper.matcher(this._regex,t),s=r.RegExpMatcherWrapper.next(o);if(r.isBlank(s))return null;for(var a=0;a<s.length;a+=1)n[a.toString()]=s[a];return new i.MatchedUrl(t,[],n,[],null)},e.prototype.generateUrl=function(e){return this._serializer(e)},e.prototype.toString=function(){return this._reString},e}();t.RegexRoutePath=o},function(e,t,n){"use strict";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,data:e.data,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,data:e.data,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(257),a=n(5),c=n(14);t.normalizeRouteConfig=r,t.assertComponentExists=o},function(e,t,n){"use strict";var r=n(245),i=n(9),o=n(245);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){"use strict";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(259),u=n(48),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){
19
+ 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){"use strict";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){"use strict";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;n<t.length;n+=1){var r=t[n];if(r instanceof s.CanActivate)return r.fn}return null}var o=n(5),s=n(261),a=n(17);t.hasLifecycleHook=r,t.getCanActivateHook=i},function(e,t,n){"use strict";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.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){"use strict";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(48),a=n(12),c=n(5),u=n(2),p=n(243),l=n(248),h=n(263),f=n(260),d=s.PromiseWrapper.resolve(!0),y=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=u.Injector.resolve([u.provide(l.RouteData,{useValue:e.routeData}),u.provide(l.RouteParams,{useValue:new l.RouteParams(e.params)}),u.provide(p.Router,{useValue:i})]);return this._componentRef=this._loader.loadNextToLocation(r,this._elementRef,o),this._componentRef.then(function(i){return f.hasLifecycleHook(h.routerOnActivate,r)?t._componentRef.then(function(t){return t.instance.routerOnActivate(e,n)}):i})},e.prototype.reuse=function(e){var t=this._currentInstruction;return this._currentInstruction=e,c.isBlank(this._componentRef)?this.activate(e):s.PromiseWrapper.resolve(f.hasLifecycleHook(h.routerOnReuse,this._currentInstruction.componentType)?this._componentRef.then(function(n){return n.instance.routerOnReuse(e,t)}):!0)},e.prototype.deactivate=function(e){var t=this,n=d;return c.isPresent(this._componentRef)&&c.isPresent(this._currentInstruction)&&f.hasLifecycleHook(h.routerOnDeactivate,this._currentInstruction.componentType)&&(n=this._componentRef.then(function(n){return n.instance.routerOnDeactivate(e,t._currentInstruction)})),n.then(function(e){if(c.isPresent(t._componentRef)){var n=t._componentRef.then(function(e){return e.dispose()});return t._componentRef=null,n}})},e.prototype.routerCanDeactivate=function(e){var t=this;return c.isBlank(this._currentInstruction)?d:f.hasLifecycleHook(h.routerCanDeactivate,this._currentInstruction.componentType)?this._componentRef.then(function(n){return n.instance.routerCanDeactivate(e,t._currentInstruction)}):d},e.prototype.routerCanReuse=function(e){var t,n=this;return t=c.isBlank(this._currentInstruction)||this._currentInstruction.componentType!=e.componentType?!1:f.hasLifecycleHook(h.routerCanReuse,this._currentInstruction.componentType)?this._componentRef.then(function(t){return t.instance.routerCanReuse(e,n._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.prototype.ngOnDestroy=function(){this._parentRouter.unregisterPrimaryOutlet(this)},e=r([u.Directive({selector:"router-outlet"}),o(3,u.Attribute("name")),i("design:paramtypes",[u.ElementRef,u.DynamicComponentLoader,p.Router,String])],e)}();t.RouterOutlet=y},function(e,t,n){"use strict";var r=n(9),i=n(261),o=n(261);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){"use strict";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(243),c=n(258),u=function(){function e(e,t){var n=this;this._router=e,this._location=t,this._router.subscribe(function(e){return n._updateLink()})}return e.prototype._updateLink=function(){this._navigationInstruction=this._router.generate(this._routeParams);var e=this._navigationInstruction.toLinkUrl();this.visibleHref=this._location.prepareExternalUrl(e)},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._updateLink()},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){"use strict";var n=function(){function e(){}return Object.defineProperty(e.prototype,"pathname",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"search",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"hash",{get:function(){return null},enumerable:!0,configurable:!0}),e}();t.PlatformLocation=n},function(e,t,n){"use strict";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(259),u=n(5),p=n(265),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 u.isPresent(e)||(e="#"),e.length>0?e.substring(1):e},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){"use strict";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(259),l=n(265),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,n){"use strict";function r(e,t,n,r){var i=new a.RootRouter(e,t,n);return r.registerDisposeListener(function(){return i.dispose()}),i}function i(e){if(0==e.componentTypes.length)throw new h.BaseException("Bootstrap at least one component before injecting Router.");return e.componentTypes[0]}var o=n(259),s=n(267),a=n(243),c=n(244),u=n(258),p=n(5),l=n(2),h=n(14);t.ROUTER_PROVIDERS_COMMON=p.CONST_EXPR([c.RouteRegistry,p.CONST_EXPR(new l.Provider(o.LocationStrategy,{useClass:s.PathLocationStrategy})),u.Location,p.CONST_EXPR(new l.Provider(a.Router,{useFactory:r,deps:p.CONST_EXPR([c.RouteRegistry,u.Location,c.ROUTER_PRIMARY_COMPONENT,l.ApplicationRef])})),p.CONST_EXPR(new l.Provider(c.ROUTER_PRIMARY_COMPONENT,{useFactory:i,deps:p.CONST_EXPR([l.ApplicationRef])}))])},function(e,t,n){"use strict";var r=n(268),i=n(2),o=n(5),s=n(270),a=n(265);t.ROUTER_PROVIDERS=o.CONST_EXPR([r.ROUTER_PROVIDERS_COMMON,o.CONST_EXPR(new i.Provider(a.PlatformLocation,{useClass:s.BrowserPlatformLocation}))]),t.ROUTER_BINDINGS=t.ROUTER_PROVIDERS},function(e,t,n){"use strict";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(265),c=n(194),u=function(e){function t(){e.call(this),this._init()}return r(t,e),t.prototype._init=function(){this._location=c.DOM.getLocation(),this._history=c.DOM.getHistory()},Object.defineProperty(t.prototype,"location",{get:function(){return this._location},enumerable:!0,configurable:!0}),t.prototype.getBaseHrefFromDOM=function(){return c.DOM.getBaseHref()},t.prototype.onPopState=function(e){c.DOM.getGlobalEventTarget("window").addEventListener("popstate",e,!1)},t.prototype.onHashChange=function(e){c.DOM.getGlobalEventTarget("window").addEventListener("hashchange",e,!1)},Object.defineProperty(t.prototype,"pathname",{get:function(){return this._location.pathname},set:function(e){this._location.pathname=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"search",{get:function(){return this._location.search},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hash",{get:function(){return this._location.hash},enumerable:!0,configurable:!0}),t.prototype.pushState=function(e,t,n){this._history.pushState(e,t,n)},t.prototype.replaceState=function(e,t,n){this._history.replaceState(e,t,n)},t.prototype.forward=function(){this._history.forward()},t.prototype.back=function(){this._history.back()},t=i([s.Injectable(),o("design:paramtypes",[])],t)}(a.PlatformLocation);t.BrowserPlatformLocation=u},function(e,t,n){"use strict";var r=n(161),i=n(2),o=n(272),s=n(5),a=n(272);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){"use strict";function r(e,t){var n=new v(e,t.trim()).tokenize();return new g(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(161),c=n(31),u=n(14),p=n(2),l=n(33),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.index<this.exp.length;)e.push(this._parseToken());return e},e.prototype._parseToken=function(){var e=this.exp[this.index];return"["==e?(this.index++,new f):"]"==e?(this.index++,new d):"("==e?this._parseParams():"/"==e&&0!==this.index?(this.index++,this._parseFixedPart()):this._parseFixedPart()},e.prototype._parseParams=function(){for(var e=this.index;this.index<this.exp.length;++this.index){var t=this.exp[this.index];if(")"==t){var n=this.exp.substring(e+1,this.index);return this.index++,new y(this.parser.parseBinding("{"+n+"}",null).ast)}}throw new u.BaseException("Cannot find ')'")},e.prototype._parseFixedPart=function(){for(var e=this.index,t=!1;this.index<this.exp.length;++this.index){var n=this.exp[this.index];if("("==n||"["==n||"]"==n||"/"==n&&t)break;"."!=n&&"/"!=n&&(t=!0)}var r=this.exp.substring(e,this.index);if(e===this.index||!t||r.startsWith("//"))throw new u.BaseException("Invalid router link");return new h(r)},e}(),g=function(){function e(e){this.tokens=e,this.index=0}return e.prototype.generate=function(){return this._genAuxiliary()},e.prototype._genAuxiliary=function(){for(var e=[];this.index<this.tokens.length;this.index++){var t=this.tokens[this.index];if(t instanceof h)e.push(new c.LiteralPrimitive(t.value));else if(t instanceof y)e.push(t.ast);else{if(t instanceof d)break;t instanceof f&&(this.index++,e.push(this._genAuxiliary()))}}return new c.LiteralArray(e)},e}(),m=function(e){function t(t){e.call(this),this.parser=t}return i(t,e),t.prototype.visitQuote=function(t){return"route"==t.prefix?r(this.parser,t.uninterpretedExpression):e.prototype.visitQuote.call(this,t)},t}(c.AstTransformer);t.parseRouterLinkExpression=r;var _=function(){function e(e){this.astTransformer=new m(e)}return e.prototype.visitNgContent=function(e,t){return e},e.prototype.visitEmbeddedTemplate=function(e,t){return e},e.prototype.visitElement=function(e,t){var n=this,r=e.children.map(function(e){return e.visit(n,t)}),i=e.inputs.map(function(e){return e.visit(n,t)}),o=e.directives.map(function(e){return e.visit(n,t)});return new a.ElementAst(e.name,e.attrs,i,e.outputs,e.exportAsVars,o,r,e.ngContentIndex,e.sourceSpan)},e.prototype.visitVariable=function(e,t){return e},e.prototype.visitEvent=function(e,t){return e},e.prototype.visitElementProperty=function(e,t){return e},e.prototype.visitAttr=function(e,t){return e},e.prototype.visitBoundText=function(e,t){return e},e.prototype.visitText=function(e,t){return e},e.prototype.visitDirective=function(e,t){var n=this,r=e.inputs.map(function(e){return e.visit(n,t)});return new a.DirectiveAst(e.directive,r,e.hostProperties,e.hostEvents,e.exportAsVars,e.sourceSpan)},e.prototype.visitDirectiveProperty=function(e,t){var n=e.value.visit(this.astTransformer);return new a.BoundDirectivePropertyAst(e.directiveName,e.templateName,n,e.sourceSpan)},e=o([p.Injectable(),s("design:paramtypes",[l.Parser])],e)}();t.RouterLinkTransform=_},function(e,t,n){"use strict";var r=n(46);t.wtfCreateScope=r.wtfCreateScope,t.wtfLeave=r.wtfLeave,t.wtfStartTimeRange=r.wtfStartTimeRange,t.wtfEndTimeRange=r.wtfEndTimeRange},function(e,t,n){"use strict";var r=n(275);t.UpgradeAdapter=r.UpgradeAdapter,t.UpgradeAdapterRef=r.UpgradeAdapterRef},function(e,t,n){"use strict";function r(e,t){function n(n,r,i){var o=n[e.selector];if(!o)throw new Error("Expecting HostViewFactoryRef for: "+e.selector);var s=0;return{restrict:"E",require:p.REQUIRE_INJECTOR,link:{post:function(n,a,c,u,p){var h=(a[0],new l.DowngradeNg2ComponentAdapter(t+s++,e,a,c,n,u,i,r,o));h.setupInputs(),h.bootstrapNg2(),h.projectContent(),h.setupOutputs(),h.registerCleanup()}}}}return n.$inject=[p.NG2_HOST_VIEW_FACTORY_REF_MAP,p.NG2_APP_VIEW_MANAGER,p.NG1_PARSE],n}var i=n(2),o=n(5),s=n(48),a=n(195),c=n(276),u=n(277),p=n(278),l=n(279),h=n(280),f=n(281),d=0,y=function(){function e(){this.idPrefix="NG2_UPGRADE_"+d++ +"_",this.upgradedComponents=[],this.downgradedComponents={},this.providers=[]}return e.prototype.downgradeNg2Component=function(e){this.upgradedComponents.push(e);var t=c.getComponentInfo(e);return r(t,""+this.idPrefix+t.selector+"_c")},e.prototype.upgradeNg1Component=function(e){return this.downgradedComponents.hasOwnProperty(e)?this.downgradedComponents[e].type:(this.downgradedComponents[e]=new h.UpgradeNg1ComponentAdapterBuilder(e)).type},e.prototype.bootstrap=function(e,t,n){var r,c,l,d=this,y=new v,g=null,m=i.platform(a.BROWSER_PROVIDERS),_=m.application([a.BROWSER_APP_PROVIDERS,i.provide(p.NG1_INJECTOR,{useFactory:function(){return g}}),i.provide(p.NG1_COMPILE,{useFactory:function(){return g.get(p.NG1_COMPILE)}}),this.providers]),b=_.injector,P=b.get(i.NgZone),C=b.get(i.Compiler),w=[],R={},E=f.module(this.idPrefix,t),O=null,S=null;E.value(p.NG2_INJECTOR,b).value(p.NG2_ZONE,P).value(p.NG2_COMPILER,C).value(p.NG2_HOST_VIEW_FACTORY_REF_MAP,R).value(p.NG2_APP_VIEW_MANAGER,b.get(i.AppViewManager)).config(["$provide",function(e){e.decorator(p.NG1_ROOT_SCOPE,["$delegate",function(e){if(c=e.constructor.prototype,!c.hasOwnProperty("$apply"))throw new Error("Failed to find '$apply' on '$rootScope'!");return r=c.$apply,c.$apply=function(e){return w.push(e)},l=e}]),e.decorator(p.NG1_TESTABILITY,["$delegate",function(e){var t=this,n=b.get(i.Testability),r=e.whenStable,o=function(e){var i=t;r.call(t,function(){n.isStable()?e.apply(this,arguments):n.whenStable(o.bind(i,e))})};return e.whenStable=o,e}])}]),S=new Promise(function(e,t){E.run(["$injector","$rootScope",function(n,r){g=n,s.ObservableWrapper.subscribe(P.onMicrotaskEmpty,function(e){return P.runOutsideAngular(function(){return r.$apply()})}),h.UpgradeNg1ComponentAdapterBuilder.resolve(d.downgradedComponents,n).then(e,t)}])});var A=o.global.angular;return A.resumeBootstrap=void 0,f.element(e).data(u.controllerKey(p.NG2_INJECTOR),b),P.run(function(){f.bootstrap(e,[d.idPrefix],n)}),O=new Promise(function(e,t){if(A.resumeBootstrap){var n=A.resumeBootstrap;A.resumeBootstrap=function(){A.resumeBootstrap=n,A.resumeBootstrap.apply(this,arguments),e()}}else e()}),Promise.all([this.compileNg2Components(C,R),O,S]).then(function(){P.run(function(){if(c){for(c.$apply=r;w.length;)l.$apply(w.shift());y._bootstrapDone(_,g),c=null}})},u.onError),y},e.prototype.addProvider=function(e){this.providers.push(e)},e.prototype.upgradeNg1Provider=function(e,t){var n=t&&t.asToken||e;this.providers.push(i.provide(n,{useFactory:function(t){return t.get(e)},deps:[p.NG1_INJECTOR]}))},e.prototype.downgradeNg2Provider=function(e){var t=function(t){return t.get(e)};return t.$inject=[p.NG2_INJECTOR],t},e.prototype.compileNg2Components=function(e,t){for(var n=this,r=[],i=this.upgradedComponents,o=0;o<i.length;o++)r.push(e.compileInHost(i[o]));return Promise.all(r).then(function(e){for(var r=n.upgradedComponents,i=0;i<e.length;i++)t[c.getComponentInfo(r[i]).selector]=e[i];return t},u.onError)},e}();t.UpgradeAdapter=y;var v=function(){function e(){this._readyFn=null,this.ng1RootScope=null,this.ng1Injector=null,this.ng2ApplicationRef=null,this.ng2Injector=null}return e.prototype._bootstrapDone=function(e,t){this.ng2ApplicationRef=e,this.ng2Injector=e.injector,this.ng1Injector=t,this.ng1RootScope=t.get(p.NG1_ROOT_SCOPE),this._readyFn&&this._readyFn(this)},e.prototype.ready=function(e){this._readyFn=e},e.prototype.dispose=function(){this.ng1Injector.get(p.NG1_ROOT_SCOPE).$destroy(),this.ng2ApplicationRef.dispose()},e}();t.UpgradeAdapterRef=v},function(e,t,n){"use strict";function r(e){var t=c.resolve(e),n=t.selector;if(!n.match(s))throw new Error("Only selectors matching element names are supported, got: "+n);var n=n.replace(a,function(e,t){return t.toUpperCase()});return{type:e,selector:n,inputs:i(t.inputs),outputs:i(t.outputs)}}function i(e){var t=[];if(e)for(var n=0;n<e.length;n++){var r=e[n].split(":"),i=r[0].trim(),o=(r[1]||r[0]).trim(),s=o.charAt(0).toUpperCase()+o.substr(1);t.push({prop:i,attr:o,bracketAttr:"["+o+"]",parenAttr:"("+o+")",bracketParenAttr:"[("+o+")]",onAttr:"on"+s,bindAttr:"bind"+s,bindonAttr:"bindon"+s})}return t}var o=n(2),s=/^[\w|-]*$/,a=/-(\w)/g,c=new o.DirectiveResolver;t.getComponentInfo=r,t.parseFields=i},function(e,t){"use strict";function n(e){return"function"==typeof e?e.name||e.toString():""+e}function r(e){throw console.log(e,e.stack),e}function i(e){return"$"+e+"Controller"}t.stringify=n,t.onError=r,t.controllerKey=i},function(e,t){"use strict";t.NG2_APP_VIEW_MANAGER="ng2.AppViewManager",t.NG2_COMPILER="ng2.Compiler",t.NG2_INJECTOR="ng2.Injector",t.NG2_HOST_VIEW_FACTORY_REF_MAP="ng2.HostViewFactoryRefMap",t.NG2_ZONE="ng2.NgZone",t.NG1_CONTROLLER="$controller",t.NG1_SCOPE="$scope",t.NG1_ROOT_SCOPE="$rootScope",t.NG1_COMPILE="$compile",t.NG1_HTTP_BACKEND="$httpBackend",t.NG1_INJECTOR="$injector",t.NG1_PARSE="$parse",t.NG1_TEMPLATE_CACHE="$templateCache",t.NG1_TESTABILITY="$$testability",t.REQUIRE_INJECTOR="^"+t.NG2_INJECTOR},function(e,t,n){"use strict";var r=n(2),i=n(278),o={__UNINITIALIZED__:!0},s=function(){function e(e,t,n,r,i,o,s,a,c){this.id=e,this.info=t,this.element=n,this.attrs=r,this.scope=i,this.parentInjector=o,this.parse=s,this.viewManager=a,this.hostViewFactory=c,this.component=null,this.inputChangeCount=0,this.inputChanges=null,this.hostViewRef=null,this.changeDetector=null,this.contentInsertionPoint=null,this.element[0].id=e,this.componentScope=i.$new(),this.childNodes=n.contents()}return e.prototype.bootstrapNg2=function(){var e=this.parentInjector.resolveAndCreateChild([r.provide(i.NG1_SCOPE,{useValue:this.componentScope})]);this.contentInsertionPoint=document.createComment("ng1 insertion point"),this.hostViewRef=this.viewManager.createRootHostView(this.hostViewFactory,"#"+this.id,e,[[this.contentInsertionPoint]]);var t=this.viewManager.getHostElement(this.hostViewRef);this.changeDetector=this.hostViewRef.changeDetectorRef,this.component=this.viewManager.getComponent(t)},e.prototype.setupInputs=function(){for(var e=this,t=this.attrs,n=this.info.inputs,r=0;r<n.length;r++){var i=n[r],s=null;if(t.hasOwnProperty(i.attr)){var c=function(t){var n=o;return function(r){null!==e.inputChanges&&(e.inputChangeCount++,e.inputChanges[t]=new a(r,n===o?r:n),n=r),e.component[t]=r}}(i.prop);t.$observe(i.attr,c)}else t.hasOwnProperty(i.bindAttr)?s=t[i.bindAttr]:t.hasOwnProperty(i.bracketAttr)?s=t[i.bracketAttr]:t.hasOwnProperty(i.bindonAttr)?s=t[i.bindonAttr]:t.hasOwnProperty(i.bracketParenAttr)&&(s=t[i.bracketParenAttr]);if(null!=s){var u=function(t){return function(n,r){null!=e.inputChanges&&(e.inputChangeCount++,e.inputChanges[t]=new a(r,n)),e.component[t]=n}}(i.prop);this.componentScope.$watch(s,u)}}var p=this.info.type.prototype;p&&p.ngOnChanges&&(this.inputChanges={},this.componentScope.$watch(function(){return e.inputChangeCount},function(){var t=e.inputChanges;e.inputChanges={},e.component.ngOnChanges(t)})),this.componentScope.$watch(function(){return e.changeDetector&&e.changeDetector.detectChanges()})},e.prototype.projectContent=function(){var e=this.childNodes,t=this.contentInsertionPoint.parentNode;if(t)for(var n=0,r=e.length;r>n;n++)t.insertBefore(e[n],this.contentInsertionPoint)},e.prototype.setupOutputs=function(){for(var e=this,t=this.attrs,n=this.info.outputs,r=0;r<n.length;r++){var i=n[r],o=null,s=!1,a=i.bindonAttr?i.bindonAttr.substring(0,i.bindonAttr.length-6):null,c=i.bracketParenAttr?"[("+i.bracketParenAttr.substring(2,i.bracketParenAttr.length-8)+")]":null;if(t.hasOwnProperty(i.onAttr)?o=t[i.onAttr]:t.hasOwnProperty(i.parenAttr)?o=t[i.parenAttr]:t.hasOwnProperty(a)?(o=t[a],s=!0):t.hasOwnProperty(c)&&(o=t[c],s=!0),null!=o&&null!=s){var u=this.parse(o),p=u.assign;if(s&&!p)throw new Error("Expression '"+o+"' is not assignable!");var l=this.component[i.prop];if(!l)throw new Error("Missing emitter '"+i.prop+"' on component '"+this.info.selector+"'!");l.subscribe({next:s?function(t){return function(n){return t(e.scope,n)}}(p):function(t){return function(n){return t(e.scope,{$event:n})}}(u)})}}},e.prototype.registerCleanup=function(){var e=this;this.element.bind("$destroy",function(){return e.viewManager.destroyRootHostView(e.hostViewRef)})},e}();t.DowngradeNg2ComponentAdapter=s;var a=function(){function e(e,t){this.previousValue=e,this.currentValue=t}return e.prototype.isFirstChange=function(){return this.previousValue===this.currentValue},e}()},function(e,t,n){"use strict";var r=n(2),i=n(278),o=n(277),s=n(281),a=/([A-Z])/g,c={__UNINITIALIZED__:!0},u="NOT_SUPPORTED",p=function(){function e(e){this.name=e,this.inputs=[],this.inputsRename=[],this.outputs=[],this.outputsRename=[],this.propertyOutputs=[],this.checkProperties=[],this.propertyMap={},this.linkFn=null,this.directive=null,this.$controller=null;var t=e.replace(a,function(e,t){return"-"+t.toLowerCase()}),n=this;this.type=r.Directive({selector:t,inputs:this.inputsRename,outputs:this.outputsRename}).Class({constructor:[new r.Inject(i.NG1_SCOPE),r.ElementRef,function(e,t){return new l(n.linkFn,e,n.directive,t,n.$controller,n.inputs,n.outputs,n.propertyOutputs,n.checkProperties,n.propertyMap)}],ngOnInit:function(){},ngOnChanges:function(){},ngDoCheck:function(){}})}return e.prototype.extractDirective=function(e){var t=e.get(this.name+"Directive");if(t.length>1)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="object"==typeof this.directive.bindToController;if(e&&Object.keys(this.directive.scope).length)throw new Error("Binding definitions on scope and controller at the same time are not supported.");var t=e?this.directive.bindToController:this.directive.scope;if("object"==typeof t)for(var n in t)if(t.hasOwnProperty(n)){var r=t[n],i=r.charAt(0);r=r.substr(1)||n;var o="output_"+n,s=o+": "+n,a=o+": "+n+"Change",c="input_"+n,u=c+": "+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(c),this.inputsRename.push(u),this.propertyMap[c]=r;break;case"&":this.outputs.push(o),this.outputsRename.push(s),this.propertyMap[o]=r;break;default:var p=JSON.stringify(t);throw new Error("Unexpected mapping '"+i+"' in '"+p+"' 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);
20
+ 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,g=[];y=v.firstChild;)v.removeChild(y),g.push(y);var m=t.$new(!!n.scope),_=s.element(v),b=n.controller,P=null;if(b){var C={$scope:m,$element:_};P=a(b,C,null,n.controllerAs),_.data(o.controllerKey(n.name),P)}var w=n.link;if("object"==typeof w&&(w=w.pre),w){var R=u,E=u,O=this.resolveRequired(_,n.require);n.link(m,_,R,O,E)}this.destinationObj=n.bindToController&&P?P:m,e(m,function(e,t){for(var n=0,r=e.length;r>n;n++)v.appendChild(e[n])},{parentBoundTranscludeFn:function(e,t){t(g)}});for(var S=0;S<p.length;S++)this[p[S]]=null;for(var A=0;A<l.length;A++){var D=this[l[A]]=new r.EventEmitter;this.setComponentProperty(l[A],function(e){return function(t){return e.emit(t)}}(D))}for(var x=0;x<h.length;x++)this[h[x]]=new r.EventEmitter,this.checkLastValues.push(c)}return e.prototype.ngOnInit=function(){this.destinationObj.$onInit&&this.destinationObj.$onInit()},e.prototype.ngOnChanges=function(e){for(var t in e)if(e.hasOwnProperty(t)){var n=e[t];this.setComponentProperty(t,n.currentValue)}},e.prototype.ngDoCheck=function(){for(var e=0,t=this.destinationObj,n=this.checkLastValues,r=this.checkProperties,i=0;i<r.length;i++){var o=t[r[i]],s=n[i];if(o!==s)if("number"==typeof o&&isNaN(o)&&"number"==typeof s&&isNaN(s));else{var a=this[this.propOuts[i]];a.emit(n[i]=o)}}return e},e.prototype.setComponentProperty=function(e,t){this.destinationObj[this.propertyMap[e]]=t},e.prototype.resolveRequired=function(e,t){if(t){if("string"==typeof t){var n=t,r=!1,i=!1,s=!1;"?"==n.charAt(0)&&(r=!0,n=n.substr(1)),"^"==n.charAt(0)&&(s=!0,n=n.substr(1)),"^"==n.charAt(0)&&(i=!0,n=n.substr(1));var a=o.controllerKey(n);i&&(e=e.parent());var c=s?e.inheritedData(a):e.data(a);if(!c&&!r)throw new Error("Can not locate '"+t+"' in '"+this.directive.name+"'.");return c}if(t instanceof Array){for(var u=[],p=0;p<t.length;p++)u.push(this.resolveRequired(e,t[p]));return u}throw new Error("Directive '"+this.directive.name+"' require syntax unrecognized: "+this.directive.require)}},e}()},function(e,t){"use strict";function n(){throw new Error("AngularJS v1.x is not loaded!")}var r={bootstrap:n,module:n,element:n,version:n,resumeBootstrap:n,getTestability:n};try{window.hasOwnProperty("angular")&&(r=window.angular)}catch(i){}t.bootstrap=r.bootstrap,t.module=r.module,t.element=r.element,t.version=r.version,t.resumeBootstrap=r.resumeBootstrap,t.getTestability=r.getTestability}])});
@@ -0,0 +1,2491 @@
1
+ /**
2
+ @license
3
+ The MIT License
4
+
5
+ Copyright (c) 2016 Google, Inc.
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy
8
+ of this software and associated documentation files (the "Software"), to deal
9
+ in the Software without restriction, including without limitation the rights
10
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11
+ copies of the Software, and to permit persons to whom the Software is
12
+ furnished to do so, subject to the following conditions:
13
+
14
+ The above copyright notice and this permission notice shall be included in
15
+ all copies or substantial portions of the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23
+ THE SOFTWARE.
24
+
25
+ */
26
+
27
+ /******/ (function(modules) { // webpackBootstrap
28
+ /******/ // The module cache
29
+ /******/ var installedModules = {};
30
+
31
+ /******/ // The require function
32
+ /******/ function __webpack_require__(moduleId) {
33
+
34
+ /******/ // Check if module is in cache
35
+ /******/ if(installedModules[moduleId])
36
+ /******/ return installedModules[moduleId].exports;
37
+
38
+ /******/ // Create a new module (and put it into the cache)
39
+ /******/ var module = installedModules[moduleId] = {
40
+ /******/ exports: {},
41
+ /******/ id: moduleId,
42
+ /******/ loaded: false
43
+ /******/ };
44
+
45
+ /******/ // Execute the module function
46
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
47
+
48
+ /******/ // Flag the module as loaded
49
+ /******/ module.loaded = true;
50
+
51
+ /******/ // Return the exports of the module
52
+ /******/ return module.exports;
53
+ /******/ }
54
+
55
+
56
+ /******/ // expose the modules object (__webpack_modules__)
57
+ /******/ __webpack_require__.m = modules;
58
+
59
+ /******/ // expose the module cache
60
+ /******/ __webpack_require__.c = installedModules;
61
+
62
+ /******/ // __webpack_public_path__
63
+ /******/ __webpack_require__.p = "";
64
+
65
+ /******/ // Load entry module and return exports
66
+ /******/ return __webpack_require__(0);
67
+ /******/ })
68
+ /************************************************************************/
69
+ /******/ ([
70
+ /* 0 */
71
+ /***/ function(module, exports, __webpack_require__) {
72
+
73
+ /* WEBPACK VAR INJECTION */(function(global) {"use strict";
74
+ __webpack_require__(1);
75
+ var event_target_1 = __webpack_require__(2);
76
+ var define_property_1 = __webpack_require__(4);
77
+ var register_element_1 = __webpack_require__(5);
78
+ var property_descriptor_1 = __webpack_require__(6);
79
+ var utils_1 = __webpack_require__(3);
80
+ var set = 'set';
81
+ var clear = 'clear';
82
+ var blockingMethods = ['alert', 'prompt', 'confirm'];
83
+ var _global = typeof window == 'undefined' ? global : window;
84
+ patchTimer(_global, set, clear, 'Timeout');
85
+ patchTimer(_global, set, clear, 'Interval');
86
+ patchTimer(_global, set, clear, 'Immediate');
87
+ patchTimer(_global, 'request', 'cancelMacroTask', 'AnimationFrame');
88
+ patchTimer(_global, 'mozRequest', 'mozCancel', 'AnimationFrame');
89
+ patchTimer(_global, 'webkitRequest', 'webkitCancel', 'AnimationFrame');
90
+ for (var i = 0; i < blockingMethods.length; i++) {
91
+ var name = blockingMethods[i];
92
+ utils_1.patchMethod(_global, name, function (delegate, symbol, name) {
93
+ return function (s, args) {
94
+ return Zone.current.run(delegate, _global, args, name);
95
+ };
96
+ });
97
+ }
98
+ event_target_1.eventTargetPatch(_global);
99
+ property_descriptor_1.propertyDescriptorPatch(_global);
100
+ utils_1.patchClass('MutationObserver');
101
+ utils_1.patchClass('WebKitMutationObserver');
102
+ utils_1.patchClass('FileReader');
103
+ define_property_1.propertyPatch();
104
+ register_element_1.registerElementPatch(_global);
105
+ // Treat XMLHTTPRequest as a macrotask.
106
+ patchXHR(_global);
107
+ var XHR_TASK = utils_1.zoneSymbol('xhrTask');
108
+ function patchXHR(window) {
109
+ function findPendingTask(target) {
110
+ var pendingTask = target[XHR_TASK];
111
+ return pendingTask;
112
+ }
113
+ function scheduleTask(task) {
114
+ var data = task.data;
115
+ data.target.addEventListener('readystatechange', function () {
116
+ if (data.target.readyState === XMLHttpRequest.DONE) {
117
+ if (!data.aborted) {
118
+ task.invoke();
119
+ }
120
+ }
121
+ });
122
+ var storedTask = data.target[XHR_TASK];
123
+ if (!storedTask) {
124
+ data.target[XHR_TASK] = task;
125
+ }
126
+ setNative.apply(data.target, data.args);
127
+ return task;
128
+ }
129
+ function placeholderCallback() {
130
+ }
131
+ function clearTask(task) {
132
+ var data = task.data;
133
+ // Note - ideally, we would call data.target.removeEventListener here, but it's too late
134
+ // to prevent it from firing. So instead, we store info for the event listener.
135
+ data.aborted = true;
136
+ return clearNative.apply(data.target, data.args);
137
+ }
138
+ var setNative = utils_1.patchMethod(window.XMLHttpRequest.prototype, 'send', function () { return function (self, args) {
139
+ var zone = Zone.current;
140
+ var options = {
141
+ target: self,
142
+ isPeriodic: false,
143
+ delay: null,
144
+ args: args,
145
+ aborted: false
146
+ };
147
+ return zone.scheduleMacroTask('XMLHttpRequest.send', placeholderCallback, options, scheduleTask, clearTask);
148
+ }; });
149
+ var clearNative = utils_1.patchMethod(window.XMLHttpRequest.prototype, 'abort', function (delegate) { return function (self, args) {
150
+ var task = findPendingTask(self);
151
+ if (task && typeof task.type == 'string') {
152
+ // If the XHR has already completed, do nothing.
153
+ if (task.cancelFn == null) {
154
+ return;
155
+ }
156
+ task.zone.cancelTask(task);
157
+ }
158
+ // Otherwise, we are trying to abort an XHR which has not yet been sent, so there is no task to cancel. Do nothing.
159
+ }; });
160
+ }
161
+ /// GEO_LOCATION
162
+ if (_global['navigator'] && _global['navigator'].geolocation) {
163
+ utils_1.patchPrototype(_global['navigator'].geolocation, [
164
+ 'getCurrentPosition',
165
+ 'watchPosition'
166
+ ]);
167
+ }
168
+ function patchTimer(window, setName, cancelName, nameSuffix) {
169
+ setName += nameSuffix;
170
+ cancelName += nameSuffix;
171
+ function scheduleTask(task) {
172
+ var data = task.data;
173
+ data.args[0] = task.invoke;
174
+ data.handleId = setNative.apply(window, data.args);
175
+ return task;
176
+ }
177
+ function clearTask(task) {
178
+ return clearNative(task.data.handleId);
179
+ }
180
+ var setNative = utils_1.patchMethod(window, setName, function (delegate) { return function (self, args) {
181
+ if (typeof args[0] === 'function') {
182
+ var zone = Zone.current;
183
+ var options = {
184
+ handleId: null,
185
+ isPeriodic: nameSuffix == 'Interval',
186
+ delay: (nameSuffix == 'Timeout' || nameSuffix == 'Interval') ? args[1] || 0 : null,
187
+ args: args
188
+ };
189
+ return zone.scheduleMacroTask(setName, args[0], options, scheduleTask, clearTask);
190
+ }
191
+ else {
192
+ // cause an error by calling it directly.
193
+ return delegate.apply(window, args);
194
+ }
195
+ }; });
196
+ var clearNative = utils_1.patchMethod(window, cancelName, function (delegate) { return function (self, args) {
197
+ var task = args[0];
198
+ if (task && typeof task.type == 'string') {
199
+ if (task.cancelFn && task.data.isPeriodic || task.runCount == 0) {
200
+ // Do not cancel already canceled functions
201
+ task.zone.cancelTask(task);
202
+ }
203
+ }
204
+ else {
205
+ // cause an error by calling it directly.
206
+ delegate.apply(window, args);
207
+ }
208
+ }; });
209
+ }
210
+
211
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
212
+
213
+ /***/ },
214
+ /* 1 */
215
+ /***/ function(module, exports) {
216
+
217
+ /* WEBPACK VAR INJECTION */(function(global) {;
218
+ ;
219
+ var Zone = (function (global) {
220
+ var Zone = (function () {
221
+ function Zone(parent, zoneSpec) {
222
+ this._properties = null;
223
+ this._parent = parent;
224
+ this._name = zoneSpec ? zoneSpec.name || 'unnamed' : '<root>';
225
+ this._properties = zoneSpec && zoneSpec.properties || {};
226
+ this._zoneDelegate = new ZoneDelegate(this, this._parent && this._parent._zoneDelegate, zoneSpec);
227
+ }
228
+ Object.defineProperty(Zone, "current", {
229
+ get: function () { return _currentZone; },
230
+ enumerable: true,
231
+ configurable: true
232
+ });
233
+ ;
234
+ Object.defineProperty(Zone, "currentTask", {
235
+ get: function () { return _currentTask; },
236
+ enumerable: true,
237
+ configurable: true
238
+ });
239
+ ;
240
+ Object.defineProperty(Zone.prototype, "parent", {
241
+ get: function () { return this._parent; },
242
+ enumerable: true,
243
+ configurable: true
244
+ });
245
+ ;
246
+ Object.defineProperty(Zone.prototype, "name", {
247
+ get: function () { return this._name; },
248
+ enumerable: true,
249
+ configurable: true
250
+ });
251
+ ;
252
+ Zone.prototype.get = function (key) {
253
+ var current = this;
254
+ while (current) {
255
+ if (current._properties.hasOwnProperty(key)) {
256
+ return current._properties[key];
257
+ }
258
+ current = current._parent;
259
+ }
260
+ };
261
+ Zone.prototype.fork = function (zoneSpec) {
262
+ if (!zoneSpec)
263
+ throw new Error('ZoneSpec required!');
264
+ return this._zoneDelegate.fork(this, zoneSpec);
265
+ };
266
+ Zone.prototype.wrap = function (callback, source) {
267
+ if (typeof callback != 'function') {
268
+ throw new Error('Expecting function got: ' + callback);
269
+ }
270
+ var callback = this._zoneDelegate.intercept(this, callback, source);
271
+ var zone = this;
272
+ return function () {
273
+ return zone.runGuarded(callback, this, arguments, source);
274
+ };
275
+ };
276
+ Zone.prototype.run = function (callback, applyThis, applyArgs, source) {
277
+ if (applyThis === void 0) { applyThis = null; }
278
+ if (applyArgs === void 0) { applyArgs = null; }
279
+ if (source === void 0) { source = null; }
280
+ var oldZone = _currentZone;
281
+ _currentZone = this;
282
+ try {
283
+ return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
284
+ }
285
+ finally {
286
+ _currentZone = oldZone;
287
+ }
288
+ };
289
+ Zone.prototype.runGuarded = function (callback, applyThis, applyArgs, source) {
290
+ if (applyThis === void 0) { applyThis = null; }
291
+ if (applyArgs === void 0) { applyArgs = null; }
292
+ if (source === void 0) { source = null; }
293
+ var oldZone = _currentZone;
294
+ _currentZone = this;
295
+ try {
296
+ try {
297
+ return this._zoneDelegate.invoke(this, callback, applyThis, applyArgs, source);
298
+ }
299
+ catch (error) {
300
+ if (this._zoneDelegate.handleError(this, error)) {
301
+ throw error;
302
+ }
303
+ }
304
+ }
305
+ finally {
306
+ _currentZone = oldZone;
307
+ }
308
+ };
309
+ Zone.prototype.runTask = function (task, applyThis, applyArgs) {
310
+ task.runCount++;
311
+ if (task.zone != this)
312
+ throw new Error('A task can only be run in the zone which created it! (Creation: ' +
313
+ task.zone.name + '; Execution: ' + this.name + ')');
314
+ var previousTask = _currentTask;
315
+ _currentTask = task;
316
+ var oldZone = _currentZone;
317
+ _currentZone = this;
318
+ try {
319
+ try {
320
+ return this._zoneDelegate.invokeTask(this, task, applyThis, applyArgs);
321
+ }
322
+ catch (error) {
323
+ if (this._zoneDelegate.handleError(this, error)) {
324
+ throw error;
325
+ }
326
+ }
327
+ }
328
+ finally {
329
+ if (task.type == 'macroTask' && task.data && !task.data.isPeriodic) {
330
+ task.cancelFn = null;
331
+ }
332
+ _currentZone = oldZone;
333
+ _currentTask = previousTask;
334
+ }
335
+ };
336
+ Zone.prototype.scheduleMicroTask = function (source, callback, data, customSchedule) {
337
+ return this._zoneDelegate.scheduleTask(this, new ZoneTask('microTask', this, source, callback, data, customSchedule, null));
338
+ };
339
+ Zone.prototype.scheduleMacroTask = function (source, callback, data, customSchedule, customCancel) {
340
+ return this._zoneDelegate.scheduleTask(this, new ZoneTask('macroTask', this, source, callback, data, customSchedule, customCancel));
341
+ };
342
+ Zone.prototype.scheduleEventTask = function (source, callback, data, customSchedule, customCancel) {
343
+ return this._zoneDelegate.scheduleTask(this, new ZoneTask('eventTask', this, source, callback, data, customSchedule, customCancel));
344
+ };
345
+ Zone.prototype.cancelTask = function (task) {
346
+ var value = this._zoneDelegate.cancelTask(this, task);
347
+ task.runCount = -1;
348
+ task.cancelFn = null;
349
+ return value;
350
+ };
351
+ Zone.__symbol__ = __symbol__;
352
+ return Zone;
353
+ }());
354
+ ;
355
+ var ZoneDelegate = (function () {
356
+ function ZoneDelegate(zone, parentDelegate, zoneSpec) {
357
+ this._taskCounts = { microTask: 0, macroTask: 0, eventTask: 0 };
358
+ this.zone = zone;
359
+ this._parentDelegate = parentDelegate;
360
+ this._forkZS = zoneSpec && (zoneSpec && zoneSpec.onFork ? zoneSpec : parentDelegate._forkZS);
361
+ this._forkDlgt = zoneSpec && (zoneSpec.onFork ? parentDelegate : parentDelegate._forkDlgt);
362
+ this._interceptZS = zoneSpec && (zoneSpec.onIntercept ? zoneSpec : parentDelegate._interceptZS);
363
+ this._interceptDlgt = zoneSpec && (zoneSpec.onIntercept ? parentDelegate : parentDelegate._interceptDlgt);
364
+ this._invokeZS = zoneSpec && (zoneSpec.onInvoke ? zoneSpec : parentDelegate._invokeZS);
365
+ this._invokeDlgt = zoneSpec && (zoneSpec.onInvoke ? parentDelegate : parentDelegate._invokeDlgt);
366
+ this._handleErrorZS = zoneSpec && (zoneSpec.onHandleError ? zoneSpec : parentDelegate._handleErrorZS);
367
+ this._handleErrorDlgt = zoneSpec && (zoneSpec.onHandleError ? parentDelegate : parentDelegate._handleErrorDlgt);
368
+ this._scheduleTaskZS = zoneSpec && (zoneSpec.onScheduleTask ? zoneSpec : parentDelegate._scheduleTaskZS);
369
+ this._scheduleTaskDlgt = zoneSpec && (zoneSpec.onScheduleTask ? parentDelegate : parentDelegate._scheduleTaskDlgt);
370
+ this._invokeTaskZS = zoneSpec && (zoneSpec.onInvokeTask ? zoneSpec : parentDelegate._invokeTaskZS);
371
+ this._invokeTaskDlgt = zoneSpec && (zoneSpec.onInvokeTask ? parentDelegate : parentDelegate._invokeTaskDlgt);
372
+ this._cancelTaskZS = zoneSpec && (zoneSpec.onCancelTask ? zoneSpec : parentDelegate._cancelTaskZS);
373
+ this._cancelTaskDlgt = zoneSpec && (zoneSpec.onCancelTask ? parentDelegate : parentDelegate._cancelTaskDlgt);
374
+ this._hasTaskZS = zoneSpec && (zoneSpec.onHasTask ? zoneSpec : parentDelegate._hasTaskZS);
375
+ this._hasTaskDlgt = zoneSpec && (zoneSpec.onHasTask ? parentDelegate : parentDelegate._hasTaskDlgt);
376
+ }
377
+ ZoneDelegate.prototype.fork = function (targetZone, zoneSpec) {
378
+ return this._forkZS
379
+ ? this._forkZS.onFork(this._forkDlgt, this.zone, targetZone, zoneSpec)
380
+ : new Zone(targetZone, zoneSpec);
381
+ };
382
+ ZoneDelegate.prototype.intercept = function (targetZone, callback, source) {
383
+ return this._interceptZS
384
+ ? this._interceptZS.onIntercept(this._interceptDlgt, this.zone, targetZone, callback, source)
385
+ : callback;
386
+ };
387
+ ZoneDelegate.prototype.invoke = function (targetZone, callback, applyThis, applyArgs, source) {
388
+ return this._invokeZS
389
+ ? this._invokeZS.onInvoke(this._invokeDlgt, this.zone, targetZone, callback, applyThis, applyArgs, source)
390
+ : callback.apply(applyThis, applyArgs);
391
+ };
392
+ ZoneDelegate.prototype.handleError = function (targetZone, error) {
393
+ return this._handleErrorZS
394
+ ? this._handleErrorZS.onHandleError(this._handleErrorDlgt, this.zone, targetZone, error)
395
+ : true;
396
+ };
397
+ ZoneDelegate.prototype.scheduleTask = function (targetZone, task) {
398
+ try {
399
+ if (this._scheduleTaskZS) {
400
+ return this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt, this.zone, targetZone, task);
401
+ }
402
+ else if (task.scheduleFn) {
403
+ task.scheduleFn(task);
404
+ }
405
+ else if (task.type == 'microTask') {
406
+ scheduleMicroTask(task);
407
+ }
408
+ else {
409
+ throw new Error('Task is missing scheduleFn.');
410
+ }
411
+ return task;
412
+ }
413
+ finally {
414
+ if (targetZone == this.zone) {
415
+ this._updateTaskCount(task.type, 1);
416
+ }
417
+ }
418
+ };
419
+ ZoneDelegate.prototype.invokeTask = function (targetZone, task, applyThis, applyArgs) {
420
+ try {
421
+ return this._invokeTaskZS
422
+ ? this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt, this.zone, targetZone, task, applyThis, applyArgs)
423
+ : task.callback.apply(applyThis, applyArgs);
424
+ }
425
+ finally {
426
+ if (targetZone == this.zone && (task.type != 'eventTask') && !(task.data && task.data.isPeriodic)) {
427
+ this._updateTaskCount(task.type, -1);
428
+ }
429
+ }
430
+ };
431
+ ZoneDelegate.prototype.cancelTask = function (targetZone, task) {
432
+ var value;
433
+ if (this._cancelTaskZS) {
434
+ value = this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt, this.zone, targetZone, task);
435
+ }
436
+ else if (!task.cancelFn) {
437
+ throw new Error('Task does not support cancellation, or is already canceled.');
438
+ }
439
+ else {
440
+ value = task.cancelFn(task);
441
+ }
442
+ if (targetZone == this.zone) {
443
+ // this should not be in the finally block, because exceptions assume not canceled.
444
+ this._updateTaskCount(task.type, -1);
445
+ }
446
+ return value;
447
+ };
448
+ ZoneDelegate.prototype.hasTask = function (targetZone, isEmpty) {
449
+ return this._hasTaskZS && this._hasTaskZS.onHasTask(this._hasTaskDlgt, this.zone, targetZone, isEmpty);
450
+ };
451
+ ZoneDelegate.prototype._updateTaskCount = function (type, count) {
452
+ var counts = this._taskCounts;
453
+ var prev = counts[type];
454
+ var next = counts[type] = prev + count;
455
+ if (next < 0) {
456
+ throw new Error('More tasks executed then were scheduled.');
457
+ }
458
+ if (prev == 0 || next == 0) {
459
+ var isEmpty = {
460
+ microTask: counts.microTask > 0,
461
+ macroTask: counts.macroTask > 0,
462
+ eventTask: counts.eventTask > 0,
463
+ change: type
464
+ };
465
+ try {
466
+ this.hasTask(this.zone, isEmpty);
467
+ }
468
+ finally {
469
+ if (this._parentDelegate) {
470
+ this._parentDelegate._updateTaskCount(type, count);
471
+ }
472
+ }
473
+ }
474
+ };
475
+ return ZoneDelegate;
476
+ }());
477
+ var ZoneTask = (function () {
478
+ function ZoneTask(type, zone, source, callback, options, scheduleFn, cancelFn) {
479
+ this.runCount = 0;
480
+ this.type = type;
481
+ this.zone = zone;
482
+ this.source = source;
483
+ this.data = options;
484
+ this.scheduleFn = scheduleFn;
485
+ this.cancelFn = cancelFn;
486
+ this.callback = callback;
487
+ var self = this;
488
+ this.invoke = function () {
489
+ try {
490
+ return zone.runTask(self, this, arguments);
491
+ }
492
+ finally {
493
+ drainMicroTaskQueue();
494
+ }
495
+ };
496
+ }
497
+ return ZoneTask;
498
+ }());
499
+ function __symbol__(name) { return '__zone_symbol__' + name; }
500
+ ;
501
+ var symbolSetTimeout = __symbol__('setTimeout');
502
+ var symbolPromise = __symbol__('Promise');
503
+ var symbolThen = __symbol__('then');
504
+ var _currentZone = new Zone(null, null);
505
+ var _currentTask = null;
506
+ var _microTaskQueue = [];
507
+ var _isDrainingMicrotaskQueue = false;
508
+ var _uncaughtPromiseErrors = [];
509
+ var _drainScheduled = false;
510
+ function scheduleQueueDrain() {
511
+ if (!_drainScheduled && !_currentTask && _microTaskQueue.length == 0) {
512
+ // We are not running in Task, so we need to kickstart the microtask queue.
513
+ if (global[symbolPromise]) {
514
+ global[symbolPromise].resolve(0)[symbolThen](drainMicroTaskQueue);
515
+ }
516
+ else {
517
+ global[symbolSetTimeout](drainMicroTaskQueue, 0);
518
+ }
519
+ }
520
+ }
521
+ function scheduleMicroTask(task) {
522
+ scheduleQueueDrain();
523
+ _microTaskQueue.push(task);
524
+ }
525
+ function consoleError(e) {
526
+ var rejection = e && e.rejection;
527
+ if (rejection) {
528
+ console.error('Unhandled Promise rejection:', rejection instanceof Error ? rejection.message : rejection, '; Zone:', e.zone.name, '; Task:', e.task && e.task.source, '; Value:', rejection);
529
+ }
530
+ console.error(e);
531
+ }
532
+ function drainMicroTaskQueue() {
533
+ if (!_isDrainingMicrotaskQueue) {
534
+ _isDrainingMicrotaskQueue = true;
535
+ while (_microTaskQueue.length) {
536
+ var queue = _microTaskQueue;
537
+ _microTaskQueue = [];
538
+ for (var i = 0; i < queue.length; i++) {
539
+ var task = queue[i];
540
+ try {
541
+ task.zone.runTask(task, null, null);
542
+ }
543
+ catch (e) {
544
+ consoleError(e);
545
+ }
546
+ }
547
+ }
548
+ while (_uncaughtPromiseErrors.length) {
549
+ var uncaughtPromiseErrors = _uncaughtPromiseErrors;
550
+ _uncaughtPromiseErrors = [];
551
+ for (var i = 0; i < uncaughtPromiseErrors.length; i++) {
552
+ var uncaughtPromiseError = uncaughtPromiseErrors[i];
553
+ try {
554
+ uncaughtPromiseError.zone.runGuarded(function () { throw uncaughtPromiseError; });
555
+ }
556
+ catch (e) {
557
+ consoleError(e);
558
+ }
559
+ }
560
+ }
561
+ _isDrainingMicrotaskQueue = false;
562
+ _drainScheduled = false;
563
+ }
564
+ }
565
+ function isThenable(value) {
566
+ return value && value.then;
567
+ }
568
+ function forwardResolution(value) { return value; }
569
+ function forwardRejection(rejection) { return ZoneAwarePromise.reject(rejection); }
570
+ var symbolState = __symbol__('state');
571
+ var symbolValue = __symbol__('value');
572
+ var source = 'Promise.then';
573
+ var UNRESOLVED = null;
574
+ var RESOLVED = true;
575
+ var REJECTED = false;
576
+ var REJECTED_NO_CATCH = 0;
577
+ function makeResolver(promise, state) {
578
+ return function (v) {
579
+ resolvePromise(promise, state, v);
580
+ // Do not return value or you will break the Promise spec.
581
+ };
582
+ }
583
+ function resolvePromise(promise, state, value) {
584
+ if (promise[symbolState] === UNRESOLVED) {
585
+ if (value instanceof ZoneAwarePromise && value[symbolState] !== UNRESOLVED) {
586
+ clearRejectedNoCatch(value);
587
+ resolvePromise(promise, value[symbolState], value[symbolValue]);
588
+ }
589
+ else if (isThenable(value)) {
590
+ value.then(makeResolver(promise, state), makeResolver(promise, false));
591
+ }
592
+ else {
593
+ promise[symbolState] = state;
594
+ var queue = promise[symbolValue];
595
+ promise[symbolValue] = value;
596
+ for (var i = 0; i < queue.length;) {
597
+ scheduleResolveOrReject(promise, queue[i++], queue[i++], queue[i++], queue[i++]);
598
+ }
599
+ if (queue.length == 0 && state == REJECTED) {
600
+ promise[symbolState] = REJECTED_NO_CATCH;
601
+ try {
602
+ throw new Error("Uncaught (in promise): " + value);
603
+ }
604
+ catch (e) {
605
+ var error = e;
606
+ error.rejection = value;
607
+ error.promise = promise;
608
+ error.zone = Zone.current;
609
+ error.task = Zone.currentTask;
610
+ _uncaughtPromiseErrors.push(error);
611
+ scheduleQueueDrain();
612
+ }
613
+ }
614
+ }
615
+ }
616
+ // Resolving an already resolved promise is a noop.
617
+ return promise;
618
+ }
619
+ function clearRejectedNoCatch(promise) {
620
+ if (promise[symbolState] === REJECTED_NO_CATCH) {
621
+ promise[symbolState] = REJECTED;
622
+ for (var i = 0; i < _uncaughtPromiseErrors.length; i++) {
623
+ if (promise === _uncaughtPromiseErrors[i].promise) {
624
+ _uncaughtPromiseErrors.splice(i, 1);
625
+ break;
626
+ }
627
+ }
628
+ }
629
+ }
630
+ function scheduleResolveOrReject(promise, zone, chainPromise, onFulfilled, onRejected) {
631
+ clearRejectedNoCatch(promise);
632
+ var delegate = promise[symbolState] ? onFulfilled || forwardResolution : onRejected || forwardRejection;
633
+ zone.scheduleMicroTask(source, function () {
634
+ try {
635
+ resolvePromise(chainPromise, true, zone.run(delegate, null, [promise[symbolValue]]));
636
+ }
637
+ catch (error) {
638
+ resolvePromise(chainPromise, false, error);
639
+ }
640
+ });
641
+ }
642
+ var ZoneAwarePromise = (function () {
643
+ function ZoneAwarePromise(executor) {
644
+ var promise = this;
645
+ promise[symbolState] = UNRESOLVED;
646
+ promise[symbolValue] = []; // queue;
647
+ try {
648
+ executor && executor(makeResolver(promise, RESOLVED), makeResolver(promise, REJECTED));
649
+ }
650
+ catch (e) {
651
+ resolvePromise(promise, false, e);
652
+ }
653
+ }
654
+ ZoneAwarePromise.resolve = function (value) {
655
+ return resolvePromise(new this(null), RESOLVED, value);
656
+ };
657
+ ZoneAwarePromise.reject = function (error) {
658
+ return resolvePromise(new this(null), REJECTED, error);
659
+ };
660
+ ZoneAwarePromise.race = function (values) {
661
+ var resolve;
662
+ var reject;
663
+ var promise = new this(function (res, rej) { resolve = res; reject = rej; });
664
+ function onResolve(value) { promise && (promise = null || resolve(value)); }
665
+ function onReject(error) { promise && (promise = null || reject(error)); }
666
+ for (var _i = 0, values_1 = values; _i < values_1.length; _i++) {
667
+ var value = values_1[_i];
668
+ if (!isThenable(value)) {
669
+ value = this.resolve(value);
670
+ }
671
+ value.then(onResolve, onReject);
672
+ }
673
+ return promise;
674
+ };
675
+ ZoneAwarePromise.all = function (values) {
676
+ var resolve;
677
+ var reject;
678
+ var promise = new this(function (res, rej) { resolve = res; reject = rej; });
679
+ var resolvedValues = [];
680
+ var count = 0;
681
+ function onReject(error) { promise && reject(error); promise = null; }
682
+ for (var _i = 0, values_2 = values; _i < values_2.length; _i++) {
683
+ var value = values_2[_i];
684
+ if (!isThenable(value)) {
685
+ value = this.resolve(value);
686
+ }
687
+ value.then((function (index) { return function (value) {
688
+ resolvedValues[index] = value;
689
+ count--;
690
+ if (promise && !count) {
691
+ resolve(resolvedValues);
692
+ }
693
+ promise == null;
694
+ }; })(count), onReject);
695
+ count++;
696
+ }
697
+ if (!count)
698
+ resolve(resolvedValues);
699
+ return promise;
700
+ };
701
+ ZoneAwarePromise.prototype.then = function (onFulfilled, onRejected) {
702
+ var chainPromise = new ZoneAwarePromise(null);
703
+ var zone = Zone.current;
704
+ if (this[symbolState] == UNRESOLVED) {
705
+ this[symbolValue].push(zone, chainPromise, onFulfilled, onRejected);
706
+ }
707
+ else {
708
+ scheduleResolveOrReject(this, zone, chainPromise, onFulfilled, onRejected);
709
+ }
710
+ return chainPromise;
711
+ };
712
+ ZoneAwarePromise.prototype.catch = function (onRejected) {
713
+ return this.then(null, onRejected);
714
+ };
715
+ return ZoneAwarePromise;
716
+ }());
717
+ var NativePromise = global[__symbol__('Promise')] = global.Promise;
718
+ global.Promise = ZoneAwarePromise;
719
+ if (NativePromise) {
720
+ var NativePromiseProtototype = NativePromise.prototype;
721
+ var NativePromiseThen = NativePromiseProtototype[__symbol__('then')]
722
+ = NativePromiseProtototype.then;
723
+ NativePromiseProtototype.then = function (onResolve, onReject) {
724
+ var nativePromise = this;
725
+ return new ZoneAwarePromise(function (resolve, reject) {
726
+ NativePromiseThen.call(nativePromise, resolve, reject);
727
+ }).then(onResolve, onReject);
728
+ };
729
+ }
730
+ return global.Zone = Zone;
731
+ })(typeof window == 'undefined' ? global : window);
732
+
733
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
734
+
735
+ /***/ },
736
+ /* 2 */
737
+ /***/ function(module, exports, __webpack_require__) {
738
+
739
+ "use strict";
740
+ var utils_1 = __webpack_require__(3);
741
+ var WTF_ISSUE_555 = 'Anchor,Area,Audio,BR,Base,BaseFont,Body,Button,Canvas,Content,DList,Directory,Div,Embed,FieldSet,Font,Form,Frame,FrameSet,HR,Head,Heading,Html,IFrame,Image,Input,Keygen,LI,Label,Legend,Link,Map,Marquee,Media,Menu,Meta,Meter,Mod,OList,Object,OptGroup,Option,Output,Paragraph,Pre,Progress,Quote,Script,Select,Source,Span,Style,TableCaption,TableCell,TableCol,Table,TableRow,TableSection,TextArea,Title,Track,UList,Unknown,Video';
742
+ var NO_EVENT_TARGET = 'ApplicationCache,EventSource,FileReader,InputMethodContext,MediaController,MessagePort,Node,Performance,SVGElementInstance,SharedWorker,TextTrack,TextTrackCue,TextTrackList,WebKitNamedFlow,Worker,WorkerGlobalScope,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload,IDBRequest,IDBOpenDBRequest,IDBDatabase,IDBTransaction,IDBCursor,DBIndex'.split(',');
743
+ var EVENT_TARGET = 'EventTarget';
744
+ function eventTargetPatch(_global) {
745
+ var apis = [];
746
+ var isWtf = _global['wtf'];
747
+ if (isWtf) {
748
+ // Workaround for: https://github.com/google/tracing-framework/issues/555
749
+ apis = WTF_ISSUE_555.split(',').map(function (v) { return 'HTML' + v + 'Element'; }).concat(NO_EVENT_TARGET);
750
+ }
751
+ else if (_global[EVENT_TARGET]) {
752
+ apis.push(EVENT_TARGET);
753
+ }
754
+ else {
755
+ // Note: EventTarget is not available in all browsers,
756
+ // if it's not available, we instead patch the APIs in the IDL that inherit from EventTarget
757
+ apis = NO_EVENT_TARGET;
758
+ }
759
+ for (var i = 0; i < apis.length; i++) {
760
+ var type = _global[apis[i]];
761
+ utils_1.patchEventTargetMethods(type && type.prototype);
762
+ }
763
+ }
764
+ exports.eventTargetPatch = eventTargetPatch;
765
+
766
+
767
+ /***/ },
768
+ /* 3 */
769
+ /***/ function(module, exports) {
770
+
771
+ /* WEBPACK VAR INJECTION */(function(global) {/**
772
+ * Suppress closure compiler errors about unknown 'process' variable
773
+ * @fileoverview
774
+ * @suppress {undefinedVars}
775
+ */
776
+ "use strict";
777
+ exports.zoneSymbol = Zone['__symbol__'];
778
+ var _global = typeof window == 'undefined' ? global : window;
779
+ function bindArguments(args, source) {
780
+ for (var i = args.length - 1; i >= 0; i--) {
781
+ if (typeof args[i] === 'function') {
782
+ args[i] = Zone.current.wrap(args[i], source + '_' + i);
783
+ }
784
+ }
785
+ return args;
786
+ }
787
+ exports.bindArguments = bindArguments;
788
+ ;
789
+ function patchPrototype(prototype, fnNames) {
790
+ var source = prototype.constructor['name'];
791
+ for (var i = 0; i < fnNames.length; i++) {
792
+ var name = fnNames[i];
793
+ var delegate = prototype[name];
794
+ if (delegate) {
795
+ prototype[name] = (function (delegate) {
796
+ return function () {
797
+ return delegate.apply(this, bindArguments(arguments, source + '.' + name));
798
+ };
799
+ })(delegate);
800
+ }
801
+ }
802
+ }
803
+ exports.patchPrototype = patchPrototype;
804
+ ;
805
+ exports.isWebWorker = (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope);
806
+ exports.isNode = (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]');
807
+ exports.isBrowser = !exports.isNode && !exports.isWebWorker && !!(window && window['HTMLElement']);
808
+ function patchProperty(obj, prop) {
809
+ var desc = Object.getOwnPropertyDescriptor(obj, prop) || {
810
+ enumerable: true,
811
+ configurable: true
812
+ };
813
+ // A property descriptor cannot have getter/setter and be writable
814
+ // deleting the writable and value properties avoids this error:
815
+ //
816
+ // TypeError: property descriptors must not specify a value or be writable when a
817
+ // getter or setter has been specified
818
+ delete desc.writable;
819
+ delete desc.value;
820
+ // substr(2) cuz 'onclick' -> 'click', etc
821
+ var eventName = prop.substr(2);
822
+ var _prop = '_' + prop;
823
+ desc.set = function (fn) {
824
+ if (this[_prop]) {
825
+ this.removeEventListener(eventName, this[_prop]);
826
+ }
827
+ if (typeof fn === 'function') {
828
+ var wrapFn = function (event) {
829
+ var result;
830
+ result = fn.apply(this, arguments);
831
+ if (result != undefined && !result)
832
+ event.preventDefault();
833
+ };
834
+ this[_prop] = wrapFn;
835
+ this.addEventListener(eventName, wrapFn, false);
836
+ }
837
+ else {
838
+ this[_prop] = null;
839
+ }
840
+ };
841
+ desc.get = function () {
842
+ return this[_prop];
843
+ };
844
+ Object.defineProperty(obj, prop, desc);
845
+ }
846
+ exports.patchProperty = patchProperty;
847
+ ;
848
+ function patchOnProperties(obj, properties) {
849
+ var onProperties = [];
850
+ for (var prop in obj) {
851
+ if (prop.substr(0, 2) == 'on') {
852
+ onProperties.push(prop);
853
+ }
854
+ }
855
+ for (var j = 0; j < onProperties.length; j++) {
856
+ patchProperty(obj, onProperties[j]);
857
+ }
858
+ if (properties) {
859
+ for (var i = 0; i < properties.length; i++) {
860
+ patchProperty(obj, 'on' + properties[i]);
861
+ }
862
+ }
863
+ }
864
+ exports.patchOnProperties = patchOnProperties;
865
+ ;
866
+ var EVENT_TASKS = exports.zoneSymbol('eventTasks');
867
+ var ADD_EVENT_LISTENER = 'addEventListener';
868
+ var REMOVE_EVENT_LISTENER = 'removeEventListener';
869
+ var SYMBOL_ADD_EVENT_LISTENER = exports.zoneSymbol(ADD_EVENT_LISTENER);
870
+ var SYMBOL_REMOVE_EVENT_LISTENER = exports.zoneSymbol(REMOVE_EVENT_LISTENER);
871
+ function findExistingRegisteredTask(target, handler, name, capture, remove) {
872
+ var eventTasks = target[EVENT_TASKS];
873
+ if (eventTasks) {
874
+ for (var i = 0; i < eventTasks.length; i++) {
875
+ var eventTask = eventTasks[i];
876
+ var data = eventTask.data;
877
+ if (data.handler === handler
878
+ && data.useCapturing === capture
879
+ && data.eventName === name) {
880
+ if (remove) {
881
+ eventTasks.splice(i, 1);
882
+ }
883
+ return eventTask;
884
+ }
885
+ }
886
+ }
887
+ return null;
888
+ }
889
+ function attachRegisteredEvent(target, eventTask) {
890
+ var eventTasks = target[EVENT_TASKS];
891
+ if (!eventTasks) {
892
+ eventTasks = target[EVENT_TASKS] = [];
893
+ }
894
+ eventTasks.push(eventTask);
895
+ }
896
+ function scheduleEventListener(eventTask) {
897
+ var meta = eventTask.data;
898
+ attachRegisteredEvent(meta.target, eventTask);
899
+ return meta.target[SYMBOL_ADD_EVENT_LISTENER](meta.eventName, eventTask.invoke, meta.useCapturing);
900
+ }
901
+ function cancelEventListener(eventTask) {
902
+ var meta = eventTask.data;
903
+ findExistingRegisteredTask(meta.target, eventTask.invoke, meta.eventName, meta.useCapturing, true);
904
+ meta.target[SYMBOL_REMOVE_EVENT_LISTENER](meta.eventName, eventTask.invoke, meta.useCapturing);
905
+ }
906
+ function zoneAwareAddEventListener(self, args) {
907
+ var eventName = args[0];
908
+ var handler = args[1];
909
+ var useCapturing = args[2] || false;
910
+ // - Inside a Web Worker, `this` is undefined, the context is `global`
911
+ // - When `addEventListener` is called on the global context in strict mode, `this` is undefined
912
+ // see https://github.com/angular/zone.js/issues/190
913
+ var target = self || _global;
914
+ var delegate = null;
915
+ if (typeof handler == 'function') {
916
+ delegate = handler;
917
+ }
918
+ else if (handler && handler.handleEvent) {
919
+ delegate = function (event) { return handler.handleEvent(event); };
920
+ }
921
+ // Ignore special listeners of IE11 & Edge dev tools, see https://github.com/angular/zone.js/issues/150
922
+ if (!delegate || handler && handler.toString() === "[object FunctionWrapper]") {
923
+ return target[SYMBOL_ADD_EVENT_LISTENER](eventName, handler, useCapturing);
924
+ }
925
+ var eventTask = findExistingRegisteredTask(target, handler, eventName, useCapturing, false);
926
+ if (eventTask) {
927
+ // we already registered, so this will have noop.
928
+ return target[SYMBOL_ADD_EVENT_LISTENER](eventName, eventTask.invoke, useCapturing);
929
+ }
930
+ var zone = Zone.current;
931
+ var source = target.constructor['name'] + '.addEventListener:' + eventName;
932
+ var data = {
933
+ target: target,
934
+ eventName: eventName,
935
+ name: eventName,
936
+ useCapturing: useCapturing,
937
+ handler: handler
938
+ };
939
+ zone.scheduleEventTask(source, delegate, data, scheduleEventListener, cancelEventListener);
940
+ }
941
+ function zoneAwareRemoveEventListener(self, args) {
942
+ var eventName = args[0];
943
+ var handler = args[1];
944
+ var useCapturing = args[2] || false;
945
+ // - Inside a Web Worker, `this` is undefined, the context is `global`
946
+ // - When `addEventListener` is called on the global context in strict mode, `this` is undefined
947
+ // see https://github.com/angular/zone.js/issues/190
948
+ var target = self || _global;
949
+ var eventTask = findExistingRegisteredTask(target, handler, eventName, useCapturing, true);
950
+ if (eventTask) {
951
+ eventTask.zone.cancelTask(eventTask);
952
+ }
953
+ else {
954
+ target[SYMBOL_REMOVE_EVENT_LISTENER](eventName, handler, useCapturing);
955
+ }
956
+ }
957
+ function patchEventTargetMethods(obj) {
958
+ if (obj && obj.addEventListener) {
959
+ patchMethod(obj, ADD_EVENT_LISTENER, function () { return zoneAwareAddEventListener; });
960
+ patchMethod(obj, REMOVE_EVENT_LISTENER, function () { return zoneAwareRemoveEventListener; });
961
+ return true;
962
+ }
963
+ else {
964
+ return false;
965
+ }
966
+ }
967
+ exports.patchEventTargetMethods = patchEventTargetMethods;
968
+ ;
969
+ var originalInstanceKey = exports.zoneSymbol('originalInstance');
970
+ // wrap some native API on `window`
971
+ function patchClass(className) {
972
+ var OriginalClass = _global[className];
973
+ if (!OriginalClass)
974
+ return;
975
+ _global[className] = function () {
976
+ var a = bindArguments(arguments, className);
977
+ switch (a.length) {
978
+ case 0:
979
+ this[originalInstanceKey] = new OriginalClass();
980
+ break;
981
+ case 1:
982
+ this[originalInstanceKey] = new OriginalClass(a[0]);
983
+ break;
984
+ case 2:
985
+ this[originalInstanceKey] = new OriginalClass(a[0], a[1]);
986
+ break;
987
+ case 3:
988
+ this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2]);
989
+ break;
990
+ case 4:
991
+ this[originalInstanceKey] = new OriginalClass(a[0], a[1], a[2], a[3]);
992
+ break;
993
+ default: throw new Error('Arg list too long.');
994
+ }
995
+ };
996
+ var instance = new OriginalClass(function () { });
997
+ var prop;
998
+ for (prop in instance) {
999
+ (function (prop) {
1000
+ if (typeof instance[prop] === 'function') {
1001
+ _global[className].prototype[prop] = function () {
1002
+ return this[originalInstanceKey][prop].apply(this[originalInstanceKey], arguments);
1003
+ };
1004
+ }
1005
+ else {
1006
+ Object.defineProperty(_global[className].prototype, prop, {
1007
+ set: function (fn) {
1008
+ if (typeof fn === 'function') {
1009
+ this[originalInstanceKey][prop] = Zone.current.wrap(fn, className + '.' + prop);
1010
+ }
1011
+ else {
1012
+ this[originalInstanceKey][prop] = fn;
1013
+ }
1014
+ },
1015
+ get: function () {
1016
+ return this[originalInstanceKey][prop];
1017
+ }
1018
+ });
1019
+ }
1020
+ }(prop));
1021
+ }
1022
+ for (prop in OriginalClass) {
1023
+ if (prop !== 'prototype' && OriginalClass.hasOwnProperty(prop)) {
1024
+ _global[className][prop] = OriginalClass[prop];
1025
+ }
1026
+ }
1027
+ }
1028
+ exports.patchClass = patchClass;
1029
+ ;
1030
+ function createNamedFn(name, delegate) {
1031
+ try {
1032
+ return (Function('f', "return function " + name + "(){return f(this, arguments)}"))(delegate);
1033
+ }
1034
+ catch (e) {
1035
+ // if we fail, we must be CSP, just return delegate.
1036
+ return function () {
1037
+ return delegate(this, arguments);
1038
+ };
1039
+ }
1040
+ }
1041
+ exports.createNamedFn = createNamedFn;
1042
+ function patchMethod(target, name, patchFn) {
1043
+ var proto = target;
1044
+ while (proto && !proto.hasOwnProperty(name)) {
1045
+ proto = Object.getPrototypeOf(proto);
1046
+ }
1047
+ if (!proto && target[name]) {
1048
+ // somehow we did not find it, but we can see it. This happens on IE for Window properties.
1049
+ proto = target;
1050
+ }
1051
+ var delegateName = exports.zoneSymbol(name);
1052
+ var delegate;
1053
+ if (proto && !(delegate = proto[delegateName])) {
1054
+ delegate = proto[delegateName] = proto[name];
1055
+ proto[name] = createNamedFn(name, patchFn(delegate, delegateName, name));
1056
+ }
1057
+ return delegate;
1058
+ }
1059
+ exports.patchMethod = patchMethod;
1060
+
1061
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1062
+
1063
+ /***/ },
1064
+ /* 4 */
1065
+ /***/ function(module, exports, __webpack_require__) {
1066
+
1067
+ "use strict";
1068
+ var utils_1 = __webpack_require__(3);
1069
+ // might need similar for object.freeze
1070
+ // i regret nothing
1071
+ var _defineProperty = Object.defineProperty;
1072
+ var _getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1073
+ var _create = Object.create;
1074
+ var unconfigurablesKey = utils_1.zoneSymbol('unconfigurables');
1075
+ function propertyPatch() {
1076
+ Object.defineProperty = function (obj, prop, desc) {
1077
+ if (isUnconfigurable(obj, prop)) {
1078
+ throw new TypeError('Cannot assign to read only property \'' + prop + '\' of ' + obj);
1079
+ }
1080
+ if (prop !== 'prototype') {
1081
+ desc = rewriteDescriptor(obj, prop, desc);
1082
+ }
1083
+ return _defineProperty(obj, prop, desc);
1084
+ };
1085
+ Object.defineProperties = function (obj, props) {
1086
+ Object.keys(props).forEach(function (prop) {
1087
+ Object.defineProperty(obj, prop, props[prop]);
1088
+ });
1089
+ return obj;
1090
+ };
1091
+ Object.create = function (obj, proto) {
1092
+ if (typeof proto === 'object') {
1093
+ Object.keys(proto).forEach(function (prop) {
1094
+ proto[prop] = rewriteDescriptor(obj, prop, proto[prop]);
1095
+ });
1096
+ }
1097
+ return _create(obj, proto);
1098
+ };
1099
+ Object.getOwnPropertyDescriptor = function (obj, prop) {
1100
+ var desc = _getOwnPropertyDescriptor(obj, prop);
1101
+ if (isUnconfigurable(obj, prop)) {
1102
+ desc.configurable = false;
1103
+ }
1104
+ return desc;
1105
+ };
1106
+ }
1107
+ exports.propertyPatch = propertyPatch;
1108
+ ;
1109
+ function _redefineProperty(obj, prop, desc) {
1110
+ desc = rewriteDescriptor(obj, prop, desc);
1111
+ return _defineProperty(obj, prop, desc);
1112
+ }
1113
+ exports._redefineProperty = _redefineProperty;
1114
+ ;
1115
+ function isUnconfigurable(obj, prop) {
1116
+ return obj && obj[unconfigurablesKey] && obj[unconfigurablesKey][prop];
1117
+ }
1118
+ function rewriteDescriptor(obj, prop, desc) {
1119
+ desc.configurable = true;
1120
+ if (!desc.configurable) {
1121
+ if (!obj[unconfigurablesKey]) {
1122
+ _defineProperty(obj, unconfigurablesKey, { writable: true, value: {} });
1123
+ }
1124
+ obj[unconfigurablesKey][prop] = true;
1125
+ }
1126
+ return desc;
1127
+ }
1128
+
1129
+
1130
+ /***/ },
1131
+ /* 5 */
1132
+ /***/ function(module, exports, __webpack_require__) {
1133
+
1134
+ "use strict";
1135
+ var define_property_1 = __webpack_require__(4);
1136
+ var utils_1 = __webpack_require__(3);
1137
+ function registerElementPatch(_global) {
1138
+ if (!utils_1.isBrowser || !('registerElement' in _global.document)) {
1139
+ return;
1140
+ }
1141
+ var _registerElement = document.registerElement;
1142
+ var callbacks = [
1143
+ 'createdCallback',
1144
+ 'attachedCallback',
1145
+ 'detachedCallback',
1146
+ 'attributeChangedCallback'
1147
+ ];
1148
+ document.registerElement = function (name, opts) {
1149
+ if (opts && opts.prototype) {
1150
+ callbacks.forEach(function (callback) {
1151
+ var source = 'Document.registerElement::' + callback;
1152
+ if (opts.prototype.hasOwnProperty(callback)) {
1153
+ var descriptor = Object.getOwnPropertyDescriptor(opts.prototype, callback);
1154
+ if (descriptor && descriptor.value) {
1155
+ descriptor.value = Zone.current.wrap(descriptor.value, source);
1156
+ define_property_1._redefineProperty(opts.prototype, callback, descriptor);
1157
+ }
1158
+ else {
1159
+ opts.prototype[callback] = Zone.current.wrap(opts.prototype[callback], source);
1160
+ }
1161
+ }
1162
+ else if (opts.prototype[callback]) {
1163
+ opts.prototype[callback] = Zone.current.wrap(opts.prototype[callback], source);
1164
+ }
1165
+ });
1166
+ }
1167
+ return _registerElement.apply(document, [name, opts]);
1168
+ };
1169
+ }
1170
+ exports.registerElementPatch = registerElementPatch;
1171
+
1172
+
1173
+ /***/ },
1174
+ /* 6 */
1175
+ /***/ function(module, exports, __webpack_require__) {
1176
+
1177
+ "use strict";
1178
+ var webSocketPatch = __webpack_require__(7);
1179
+ var utils_1 = __webpack_require__(3);
1180
+ var eventNames = '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(' ');
1181
+ function propertyDescriptorPatch(_global) {
1182
+ if (utils_1.isNode) {
1183
+ return;
1184
+ }
1185
+ var supportsWebSocket = typeof WebSocket !== 'undefined';
1186
+ if (canPatchViaPropertyDescriptor()) {
1187
+ // for browsers that we can patch the descriptor: Chrome & Firefox
1188
+ if (utils_1.isBrowser) {
1189
+ utils_1.patchOnProperties(HTMLElement.prototype, eventNames);
1190
+ }
1191
+ utils_1.patchOnProperties(XMLHttpRequest.prototype, null);
1192
+ if (typeof IDBIndex !== 'undefined') {
1193
+ utils_1.patchOnProperties(IDBIndex.prototype, null);
1194
+ utils_1.patchOnProperties(IDBRequest.prototype, null);
1195
+ utils_1.patchOnProperties(IDBOpenDBRequest.prototype, null);
1196
+ utils_1.patchOnProperties(IDBDatabase.prototype, null);
1197
+ utils_1.patchOnProperties(IDBTransaction.prototype, null);
1198
+ utils_1.patchOnProperties(IDBCursor.prototype, null);
1199
+ }
1200
+ if (supportsWebSocket) {
1201
+ utils_1.patchOnProperties(WebSocket.prototype, null);
1202
+ }
1203
+ }
1204
+ else {
1205
+ // Safari, Android browsers (Jelly Bean)
1206
+ patchViaCapturingAllTheEvents();
1207
+ utils_1.patchClass('XMLHttpRequest');
1208
+ if (supportsWebSocket) {
1209
+ webSocketPatch.apply(_global);
1210
+ }
1211
+ }
1212
+ }
1213
+ exports.propertyDescriptorPatch = propertyDescriptorPatch;
1214
+ function canPatchViaPropertyDescriptor() {
1215
+ if (utils_1.isBrowser && !Object.getOwnPropertyDescriptor(HTMLElement.prototype, 'onclick')
1216
+ && typeof Element !== 'undefined') {
1217
+ // WebKit https://bugs.webkit.org/show_bug.cgi?id=134364
1218
+ // IDL interface attributes are not configurable
1219
+ var desc = Object.getOwnPropertyDescriptor(Element.prototype, 'onclick');
1220
+ if (desc && !desc.configurable)
1221
+ return false;
1222
+ }
1223
+ Object.defineProperty(XMLHttpRequest.prototype, 'onreadystatechange', {
1224
+ get: function () {
1225
+ return true;
1226
+ }
1227
+ });
1228
+ var req = new XMLHttpRequest();
1229
+ var result = !!req.onreadystatechange;
1230
+ Object.defineProperty(XMLHttpRequest.prototype, 'onreadystatechange', {});
1231
+ return result;
1232
+ }
1233
+ ;
1234
+ var unboundKey = utils_1.zoneSymbol('unbound');
1235
+ // Whenever any eventListener fires, we check the eventListener target and all parents
1236
+ // for `onwhatever` properties and replace them with zone-bound functions
1237
+ // - Chrome (for now)
1238
+ function patchViaCapturingAllTheEvents() {
1239
+ for (var i = 0; i < eventNames.length; i++) {
1240
+ var property = eventNames[i];
1241
+ var onproperty = 'on' + property;
1242
+ document.addEventListener(property, function (event) {
1243
+ var elt = event.target, bound;
1244
+ var source = elt.constructor['name'] + '.' + onproperty;
1245
+ while (elt) {
1246
+ if (elt[onproperty] && !elt[onproperty][unboundKey]) {
1247
+ bound = Zone.current.wrap(elt[onproperty], source);
1248
+ bound[unboundKey] = elt[onproperty];
1249
+ elt[onproperty] = bound;
1250
+ }
1251
+ elt = elt.parentElement;
1252
+ }
1253
+ }, true);
1254
+ }
1255
+ ;
1256
+ }
1257
+ ;
1258
+
1259
+
1260
+ /***/ },
1261
+ /* 7 */
1262
+ /***/ function(module, exports, __webpack_require__) {
1263
+
1264
+ /* WEBPACK VAR INJECTION */(function(global) {"use strict";
1265
+ var utils_1 = __webpack_require__(3);
1266
+ // we have to patch the instance since the proto is non-configurable
1267
+ function apply(_global) {
1268
+ var WS = _global.WebSocket;
1269
+ // On Safari window.EventTarget doesn't exist so need to patch WS add/removeEventListener
1270
+ // On older Chrome, no need since EventTarget was already patched
1271
+ if (!_global.EventTarget) {
1272
+ utils_1.patchEventTargetMethods(WS.prototype);
1273
+ }
1274
+ _global.WebSocket = function (a, b) {
1275
+ var socket = arguments.length > 1 ? new WS(a, b) : new WS(a);
1276
+ var proxySocket;
1277
+ // Safari 7.0 has non-configurable own 'onmessage' and friends properties on the socket instance
1278
+ var onmessageDesc = Object.getOwnPropertyDescriptor(socket, 'onmessage');
1279
+ if (onmessageDesc && onmessageDesc.configurable === false) {
1280
+ proxySocket = Object.create(socket);
1281
+ ['addEventListener', 'removeEventListener', 'send', 'close'].forEach(function (propName) {
1282
+ proxySocket[propName] = function () {
1283
+ return socket[propName].apply(socket, arguments);
1284
+ };
1285
+ });
1286
+ }
1287
+ else {
1288
+ // we can patch the real socket
1289
+ proxySocket = socket;
1290
+ }
1291
+ utils_1.patchOnProperties(proxySocket, ['close', 'error', 'message', 'open']);
1292
+ return proxySocket;
1293
+ };
1294
+ global.WebSocket.prototype = Object.create(WS.prototype, { constructor: { value: WebSocket } });
1295
+ }
1296
+ exports.apply = apply;
1297
+
1298
+ /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
1299
+
1300
+ /***/ }
1301
+ /******/ ]);
1302
+ /******/ (function(modules) { // webpackBootstrap
1303
+ /******/ // The module cache
1304
+ /******/ var installedModules = {};
1305
+
1306
+ /******/ // The require function
1307
+ /******/ function __webpack_require__(moduleId) {
1308
+
1309
+ /******/ // Check if module is in cache
1310
+ /******/ if(installedModules[moduleId])
1311
+ /******/ return installedModules[moduleId].exports;
1312
+
1313
+ /******/ // Create a new module (and put it into the cache)
1314
+ /******/ var module = installedModules[moduleId] = {
1315
+ /******/ exports: {},
1316
+ /******/ id: moduleId,
1317
+ /******/ loaded: false
1318
+ /******/ };
1319
+
1320
+ /******/ // Execute the module function
1321
+ /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
1322
+
1323
+ /******/ // Flag the module as loaded
1324
+ /******/ module.loaded = true;
1325
+
1326
+ /******/ // Return the exports of the module
1327
+ /******/ return module.exports;
1328
+ /******/ }
1329
+
1330
+
1331
+ /******/ // expose the modules object (__webpack_modules__)
1332
+ /******/ __webpack_require__.m = modules;
1333
+
1334
+ /******/ // expose the module cache
1335
+ /******/ __webpack_require__.c = installedModules;
1336
+
1337
+ /******/ // __webpack_public_path__
1338
+ /******/ __webpack_require__.p = "";
1339
+
1340
+ /******/ // Load entry module and return exports
1341
+ /******/ return __webpack_require__(0);
1342
+ /******/ })
1343
+ /************************************************************************/
1344
+ /******/ ([
1345
+ /* 0 */
1346
+ /***/ function(module, exports) {
1347
+
1348
+ 'use strict';
1349
+ (function () {
1350
+ var NEWLINE = '\n';
1351
+ var SEP = ' ------------- ';
1352
+ var IGNORE_FRAMES = [];
1353
+ var creationTrace = '__creationTrace__';
1354
+ var LongStackTrace = (function () {
1355
+ function LongStackTrace() {
1356
+ this.error = getStacktrace();
1357
+ this.timestamp = new Date();
1358
+ }
1359
+ return LongStackTrace;
1360
+ }());
1361
+ function getStacktraceWithUncaughtError() {
1362
+ return new Error('STACKTRACE TRACKING');
1363
+ }
1364
+ function getStacktraceWithCaughtError() {
1365
+ try {
1366
+ throw getStacktraceWithUncaughtError();
1367
+ }
1368
+ catch (e) {
1369
+ return e;
1370
+ }
1371
+ }
1372
+ // Some implementations of exception handling don't create a stack trace if the exception
1373
+ // isn't thrown, however it's faster not to actually throw the exception.
1374
+ var error = getStacktraceWithUncaughtError();
1375
+ var coughtError = getStacktraceWithCaughtError();
1376
+ var getStacktrace = error.stack
1377
+ ? getStacktraceWithUncaughtError
1378
+ : (coughtError.stack ? getStacktraceWithCaughtError : getStacktraceWithUncaughtError);
1379
+ function getFrames(error) {
1380
+ return error.stack ? error.stack.split(NEWLINE) : [];
1381
+ }
1382
+ function addErrorStack(lines, error) {
1383
+ var trace;
1384
+ trace = getFrames(error);
1385
+ for (var i = 0; i < trace.length; i++) {
1386
+ var frame = trace[i];
1387
+ // Filter out the Frames which are part of stack capturing.
1388
+ if (!(i < IGNORE_FRAMES.length && IGNORE_FRAMES[i] === frame)) {
1389
+ lines.push(trace[i]);
1390
+ }
1391
+ }
1392
+ }
1393
+ function renderLongStackTrace(frames, stack) {
1394
+ var longTrace = [stack];
1395
+ if (frames) {
1396
+ var timestamp = new Date().getTime();
1397
+ for (var i = 0; i < frames.length; i++) {
1398
+ var traceFrames = frames[i];
1399
+ var lastTime = traceFrames.timestamp;
1400
+ longTrace.push(SEP + " Elapsed: " + (timestamp - lastTime.getTime()) + " ms; At: " + lastTime + " " + SEP);
1401
+ addErrorStack(longTrace, traceFrames.error);
1402
+ timestamp = lastTime.getTime();
1403
+ }
1404
+ }
1405
+ return longTrace.join(NEWLINE);
1406
+ }
1407
+ Zone['longStackTraceZoneSpec'] = {
1408
+ name: 'long-stack-trace',
1409
+ longStackTraceLimit: 10,
1410
+ onScheduleTask: function (parentZoneDelegate, currentZone, targetZone, task) {
1411
+ var currentTask = Zone.currentTask;
1412
+ var trace = currentTask && currentTask.data && currentTask.data[creationTrace] || [];
1413
+ trace = [new LongStackTrace()].concat(trace);
1414
+ if (trace.length > this.longStackTraceLimit) {
1415
+ trace.length = this.longStackTraceLimit;
1416
+ }
1417
+ if (!task.data)
1418
+ task.data = {};
1419
+ task.data[creationTrace] = trace;
1420
+ return parentZoneDelegate.scheduleTask(targetZone, task);
1421
+ },
1422
+ onHandleError: function (parentZoneDelegate, currentZone, targetZone, error) {
1423
+ var parentTask = Zone.currentTask;
1424
+ if (error instanceof Error && parentTask) {
1425
+ var descriptor = Object.getOwnPropertyDescriptor(error, 'stack');
1426
+ if (descriptor) {
1427
+ var delegateGet = descriptor.get;
1428
+ var value = descriptor.value;
1429
+ descriptor = {
1430
+ get: function () {
1431
+ return renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], delegateGet ? delegateGet.apply(this) : value);
1432
+ }
1433
+ };
1434
+ Object.defineProperty(error, 'stack', descriptor);
1435
+ }
1436
+ else {
1437
+ error.stack = renderLongStackTrace(parentTask.data && parentTask.data[creationTrace], error.stack);
1438
+ }
1439
+ }
1440
+ return parentZoneDelegate.handleError(targetZone, error);
1441
+ }
1442
+ };
1443
+ function captureStackTraces(stackTraces, count) {
1444
+ if (count > 0) {
1445
+ stackTraces.push(getFrames((new LongStackTrace()).error));
1446
+ captureStackTraces(stackTraces, count - 1);
1447
+ }
1448
+ }
1449
+ function computeIgnoreFrames() {
1450
+ var frames = [];
1451
+ captureStackTraces(frames, 2);
1452
+ var frames1 = frames[0];
1453
+ var frames2 = frames[1];
1454
+ for (var i = 0; i < frames1.length; i++) {
1455
+ var frame1 = frames1[i];
1456
+ var frame2 = frames2[i];
1457
+ if (frame1 === frame2) {
1458
+ IGNORE_FRAMES.push(frame1);
1459
+ }
1460
+ else {
1461
+ break;
1462
+ }
1463
+ }
1464
+ }
1465
+ computeIgnoreFrames();
1466
+ })();
1467
+
1468
+
1469
+ /***/ }
1470
+ /******/ ]);
1471
+ /**
1472
+ @license
1473
+ Apache License
1474
+
1475
+ Version 2.0, January 2004
1476
+
1477
+ http://www.apache.org/licenses/
1478
+
1479
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1480
+
1481
+ 1. Definitions.
1482
+
1483
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
1484
+
1485
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
1486
+
1487
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
1488
+
1489
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
1490
+
1491
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
1492
+
1493
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
1494
+
1495
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
1496
+
1497
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
1498
+
1499
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
1500
+
1501
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
1502
+
1503
+ 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
1504
+
1505
+ 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
1506
+
1507
+ 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
1508
+
1509
+ You must give any other recipients of the Work or Derivative Works a copy of this License; and
1510
+
1511
+ You must cause any modified files to carry prominent notices stating that You changed the files; and
1512
+
1513
+ You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
1514
+
1515
+ If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
1516
+
1517
+ 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
1518
+
1519
+ 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
1520
+
1521
+ 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
1522
+
1523
+ 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
1524
+
1525
+ 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
1526
+
1527
+ END OF TERMS AND CONDITIONS
1528
+ */
1529
+
1530
+ /*! *****************************************************************************
1531
+ Copyright (C) Microsoft. All rights reserved.
1532
+ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
1533
+ this file except in compliance with the License. You may obtain a copy of the
1534
+ License at http://www.apache.org/licenses/LICENSE-2.0
1535
+
1536
+ THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
1537
+ KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
1538
+ WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
1539
+ MERCHANTABLITY OR NON-INFRINGEMENT.
1540
+
1541
+ See the Apache Version 2.0 License for specific language governing permissions
1542
+ and limitations under the License.
1543
+ ***************************************************************************** */
1544
+ "use strict";
1545
+ var Reflect;
1546
+ (function (Reflect) {
1547
+ // Load global or shim versions of Map, Set, and WeakMap
1548
+ var functionPrototype = Object.getPrototypeOf(Function);
1549
+ var _Map = typeof Map === "function" ? Map : CreateMapPolyfill();
1550
+ var _Set = typeof Set === "function" ? Set : CreateSetPolyfill();
1551
+ var _WeakMap = typeof WeakMap === "function" ? WeakMap : CreateWeakMapPolyfill();
1552
+ // [[Metadata]] internal slot
1553
+ var __Metadata__ = new _WeakMap();
1554
+ /**
1555
+ * Applies a set of decorators to a property of a target object.
1556
+ * @param decorators An array of decorators.
1557
+ * @param target The target object.
1558
+ * @param targetKey (Optional) The property key to decorate.
1559
+ * @param targetDescriptor (Optional) The property descriptor for the target key
1560
+ * @remarks Decorators are applied in reverse order.
1561
+ * @example
1562
+ *
1563
+ * class C {
1564
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
1565
+ * // static staticProperty;
1566
+ * // property;
1567
+ *
1568
+ * constructor(p) { }
1569
+ * static staticMethod(p) { }
1570
+ * method(p) { }
1571
+ * }
1572
+ *
1573
+ * // constructor
1574
+ * C = Reflect.decorate(decoratorsArray, C);
1575
+ *
1576
+ * // property (on constructor)
1577
+ * Reflect.decorate(decoratorsArray, C, "staticProperty");
1578
+ *
1579
+ * // property (on prototype)
1580
+ * Reflect.decorate(decoratorsArray, C.prototype, "property");
1581
+ *
1582
+ * // method (on constructor)
1583
+ * Object.defineProperty(C, "staticMethod",
1584
+ * Reflect.decorate(decoratorsArray, C, "staticMethod",
1585
+ * Object.getOwnPropertyDescriptor(C, "staticMethod")));
1586
+ *
1587
+ * // method (on prototype)
1588
+ * Object.defineProperty(C.prototype, "method",
1589
+ * Reflect.decorate(decoratorsArray, C.prototype, "method",
1590
+ * Object.getOwnPropertyDescriptor(C.prototype, "method")));
1591
+ *
1592
+ */
1593
+ function decorate(decorators, target, targetKey, targetDescriptor) {
1594
+ if (!IsUndefined(targetDescriptor)) {
1595
+ if (!IsArray(decorators)) {
1596
+ throw new TypeError();
1597
+ }
1598
+ else if (!IsObject(target)) {
1599
+ throw new TypeError();
1600
+ }
1601
+ else if (IsUndefined(targetKey)) {
1602
+ throw new TypeError();
1603
+ }
1604
+ else if (!IsObject(targetDescriptor)) {
1605
+ throw new TypeError();
1606
+ }
1607
+ targetKey = ToPropertyKey(targetKey);
1608
+ return DecoratePropertyWithDescriptor(decorators, target, targetKey, targetDescriptor);
1609
+ }
1610
+ else if (!IsUndefined(targetKey)) {
1611
+ if (!IsArray(decorators)) {
1612
+ throw new TypeError();
1613
+ }
1614
+ else if (!IsObject(target)) {
1615
+ throw new TypeError();
1616
+ }
1617
+ targetKey = ToPropertyKey(targetKey);
1618
+ return DecoratePropertyWithoutDescriptor(decorators, target, targetKey);
1619
+ }
1620
+ else {
1621
+ if (!IsArray(decorators)) {
1622
+ throw new TypeError();
1623
+ }
1624
+ else if (!IsConstructor(target)) {
1625
+ throw new TypeError();
1626
+ }
1627
+ return DecorateConstructor(decorators, target);
1628
+ }
1629
+ }
1630
+ Reflect.decorate = decorate;
1631
+ /**
1632
+ * A default metadata decorator factory that can be used on a class, class member, or parameter.
1633
+ * @param metadataKey The key for the metadata entry.
1634
+ * @param metadataValue The value for the metadata entry.
1635
+ * @returns A decorator function.
1636
+ * @remarks
1637
+ * If `metadataKey` is already defined for the target and target key, the
1638
+ * metadataValue for that key will be overwritten.
1639
+ * @example
1640
+ *
1641
+ * // constructor
1642
+ * @Reflect.metadata(key, value)
1643
+ * class C {
1644
+ * }
1645
+ *
1646
+ * // property (on constructor, TypeScript only)
1647
+ * class C {
1648
+ * @Reflect.metadata(key, value)
1649
+ * static staticProperty;
1650
+ * }
1651
+ *
1652
+ * // property (on prototype, TypeScript only)
1653
+ * class C {
1654
+ * @Reflect.metadata(key, value)
1655
+ * property;
1656
+ * }
1657
+ *
1658
+ * // method (on constructor)
1659
+ * class C {
1660
+ * @Reflect.metadata(key, value)
1661
+ * static staticMethod() { }
1662
+ * }
1663
+ *
1664
+ * // method (on prototype)
1665
+ * class C {
1666
+ * @Reflect.metadata(key, value)
1667
+ * method() { }
1668
+ * }
1669
+ *
1670
+ */
1671
+ function metadata(metadataKey, metadataValue) {
1672
+ function decorator(target, targetKey) {
1673
+ if (!IsUndefined(targetKey)) {
1674
+ if (!IsObject(target)) {
1675
+ throw new TypeError();
1676
+ }
1677
+ targetKey = ToPropertyKey(targetKey);
1678
+ OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, targetKey);
1679
+ }
1680
+ else {
1681
+ if (!IsConstructor(target)) {
1682
+ throw new TypeError();
1683
+ }
1684
+ OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, undefined);
1685
+ }
1686
+ }
1687
+ return decorator;
1688
+ }
1689
+ Reflect.metadata = metadata;
1690
+ /**
1691
+ * Define a unique metadata entry on the target.
1692
+ * @param metadataKey A key used to store and retrieve metadata.
1693
+ * @param metadataValue A value that contains attached metadata.
1694
+ * @param target The target object on which to define metadata.
1695
+ * @param targetKey (Optional) The property key for the target.
1696
+ * @example
1697
+ *
1698
+ * class C {
1699
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
1700
+ * // static staticProperty;
1701
+ * // property;
1702
+ *
1703
+ * constructor(p) { }
1704
+ * static staticMethod(p) { }
1705
+ * method(p) { }
1706
+ * }
1707
+ *
1708
+ * // constructor
1709
+ * Reflect.defineMetadata("custom:annotation", options, C);
1710
+ *
1711
+ * // property (on constructor)
1712
+ * Reflect.defineMetadata("custom:annotation", options, C, "staticProperty");
1713
+ *
1714
+ * // property (on prototype)
1715
+ * Reflect.defineMetadata("custom:annotation", options, C.prototype, "property");
1716
+ *
1717
+ * // method (on constructor)
1718
+ * Reflect.defineMetadata("custom:annotation", options, C, "staticMethod");
1719
+ *
1720
+ * // method (on prototype)
1721
+ * Reflect.defineMetadata("custom:annotation", options, C.prototype, "method");
1722
+ *
1723
+ * // decorator factory as metadata-producing annotation.
1724
+ * function MyAnnotation(options): Decorator {
1725
+ * return (target, key?) => Reflect.defineMetadata("custom:annotation", options, target, key);
1726
+ * }
1727
+ *
1728
+ */
1729
+ function defineMetadata(metadataKey, metadataValue, target, targetKey) {
1730
+ if (!IsObject(target)) {
1731
+ throw new TypeError();
1732
+ }
1733
+ else if (!IsUndefined(targetKey)) {
1734
+ targetKey = ToPropertyKey(targetKey);
1735
+ }
1736
+ return OrdinaryDefineOwnMetadata(metadataKey, metadataValue, target, targetKey);
1737
+ }
1738
+ Reflect.defineMetadata = defineMetadata;
1739
+ /**
1740
+ * Gets a value indicating whether the target object or its prototype chain has the provided metadata key defined.
1741
+ * @param metadataKey A key used to store and retrieve metadata.
1742
+ * @param target The target object on which the metadata is defined.
1743
+ * @param targetKey (Optional) The property key for the target.
1744
+ * @returns `true` if the metadata key was defined on the target object or its prototype chain; otherwise, `false`.
1745
+ * @example
1746
+ *
1747
+ * class C {
1748
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
1749
+ * // static staticProperty;
1750
+ * // property;
1751
+ *
1752
+ * constructor(p) { }
1753
+ * static staticMethod(p) { }
1754
+ * method(p) { }
1755
+ * }
1756
+ *
1757
+ * // constructor
1758
+ * result = Reflect.hasMetadata("custom:annotation", C);
1759
+ *
1760
+ * // property (on constructor)
1761
+ * result = Reflect.hasMetadata("custom:annotation", C, "staticProperty");
1762
+ *
1763
+ * // property (on prototype)
1764
+ * result = Reflect.hasMetadata("custom:annotation", C.prototype, "property");
1765
+ *
1766
+ * // method (on constructor)
1767
+ * result = Reflect.hasMetadata("custom:annotation", C, "staticMethod");
1768
+ *
1769
+ * // method (on prototype)
1770
+ * result = Reflect.hasMetadata("custom:annotation", C.prototype, "method");
1771
+ *
1772
+ */
1773
+ function hasMetadata(metadataKey, target, targetKey) {
1774
+ if (!IsObject(target)) {
1775
+ throw new TypeError();
1776
+ }
1777
+ else if (!IsUndefined(targetKey)) {
1778
+ targetKey = ToPropertyKey(targetKey);
1779
+ }
1780
+ return OrdinaryHasMetadata(metadataKey, target, targetKey);
1781
+ }
1782
+ Reflect.hasMetadata = hasMetadata;
1783
+ /**
1784
+ * Gets a value indicating whether the target object has the provided metadata key defined.
1785
+ * @param metadataKey A key used to store and retrieve metadata.
1786
+ * @param target The target object on which the metadata is defined.
1787
+ * @param targetKey (Optional) The property key for the target.
1788
+ * @returns `true` if the metadata key was defined on the target object; otherwise, `false`.
1789
+ * @example
1790
+ *
1791
+ * class C {
1792
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
1793
+ * // static staticProperty;
1794
+ * // property;
1795
+ *
1796
+ * constructor(p) { }
1797
+ * static staticMethod(p) { }
1798
+ * method(p) { }
1799
+ * }
1800
+ *
1801
+ * // constructor
1802
+ * result = Reflect.hasOwnMetadata("custom:annotation", C);
1803
+ *
1804
+ * // property (on constructor)
1805
+ * result = Reflect.hasOwnMetadata("custom:annotation", C, "staticProperty");
1806
+ *
1807
+ * // property (on prototype)
1808
+ * result = Reflect.hasOwnMetadata("custom:annotation", C.prototype, "property");
1809
+ *
1810
+ * // method (on constructor)
1811
+ * result = Reflect.hasOwnMetadata("custom:annotation", C, "staticMethod");
1812
+ *
1813
+ * // method (on prototype)
1814
+ * result = Reflect.hasOwnMetadata("custom:annotation", C.prototype, "method");
1815
+ *
1816
+ */
1817
+ function hasOwnMetadata(metadataKey, target, targetKey) {
1818
+ if (!IsObject(target)) {
1819
+ throw new TypeError();
1820
+ }
1821
+ else if (!IsUndefined(targetKey)) {
1822
+ targetKey = ToPropertyKey(targetKey);
1823
+ }
1824
+ return OrdinaryHasOwnMetadata(metadataKey, target, targetKey);
1825
+ }
1826
+ Reflect.hasOwnMetadata = hasOwnMetadata;
1827
+ /**
1828
+ * Gets the metadata value for the provided metadata key on the target object or its prototype chain.
1829
+ * @param metadataKey A key used to store and retrieve metadata.
1830
+ * @param target The target object on which the metadata is defined.
1831
+ * @param targetKey (Optional) The property key for the target.
1832
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
1833
+ * @example
1834
+ *
1835
+ * class C {
1836
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
1837
+ * // static staticProperty;
1838
+ * // property;
1839
+ *
1840
+ * constructor(p) { }
1841
+ * static staticMethod(p) { }
1842
+ * method(p) { }
1843
+ * }
1844
+ *
1845
+ * // constructor
1846
+ * result = Reflect.getMetadata("custom:annotation", C);
1847
+ *
1848
+ * // property (on constructor)
1849
+ * result = Reflect.getMetadata("custom:annotation", C, "staticProperty");
1850
+ *
1851
+ * // property (on prototype)
1852
+ * result = Reflect.getMetadata("custom:annotation", C.prototype, "property");
1853
+ *
1854
+ * // method (on constructor)
1855
+ * result = Reflect.getMetadata("custom:annotation", C, "staticMethod");
1856
+ *
1857
+ * // method (on prototype)
1858
+ * result = Reflect.getMetadata("custom:annotation", C.prototype, "method");
1859
+ *
1860
+ */
1861
+ function getMetadata(metadataKey, target, targetKey) {
1862
+ if (!IsObject(target)) {
1863
+ throw new TypeError();
1864
+ }
1865
+ else if (!IsUndefined(targetKey)) {
1866
+ targetKey = ToPropertyKey(targetKey);
1867
+ }
1868
+ return OrdinaryGetMetadata(metadataKey, target, targetKey);
1869
+ }
1870
+ Reflect.getMetadata = getMetadata;
1871
+ /**
1872
+ * Gets the metadata value for the provided metadata key on the target object.
1873
+ * @param metadataKey A key used to store and retrieve metadata.
1874
+ * @param target The target object on which the metadata is defined.
1875
+ * @param targetKey (Optional) The property key for the target.
1876
+ * @returns The metadata value for the metadata key if found; otherwise, `undefined`.
1877
+ * @example
1878
+ *
1879
+ * class C {
1880
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
1881
+ * // static staticProperty;
1882
+ * // property;
1883
+ *
1884
+ * constructor(p) { }
1885
+ * static staticMethod(p) { }
1886
+ * method(p) { }
1887
+ * }
1888
+ *
1889
+ * // constructor
1890
+ * result = Reflect.getOwnMetadata("custom:annotation", C);
1891
+ *
1892
+ * // property (on constructor)
1893
+ * result = Reflect.getOwnMetadata("custom:annotation", C, "staticProperty");
1894
+ *
1895
+ * // property (on prototype)
1896
+ * result = Reflect.getOwnMetadata("custom:annotation", C.prototype, "property");
1897
+ *
1898
+ * // method (on constructor)
1899
+ * result = Reflect.getOwnMetadata("custom:annotation", C, "staticMethod");
1900
+ *
1901
+ * // method (on prototype)
1902
+ * result = Reflect.getOwnMetadata("custom:annotation", C.prototype, "method");
1903
+ *
1904
+ */
1905
+ function getOwnMetadata(metadataKey, target, targetKey) {
1906
+ if (!IsObject(target)) {
1907
+ throw new TypeError();
1908
+ }
1909
+ else if (!IsUndefined(targetKey)) {
1910
+ targetKey = ToPropertyKey(targetKey);
1911
+ }
1912
+ return OrdinaryGetOwnMetadata(metadataKey, target, targetKey);
1913
+ }
1914
+ Reflect.getOwnMetadata = getOwnMetadata;
1915
+ /**
1916
+ * Gets the metadata keys defined on the target object or its prototype chain.
1917
+ * @param target The target object on which the metadata is defined.
1918
+ * @param targetKey (Optional) The property key for the target.
1919
+ * @returns An array of unique metadata keys.
1920
+ * @example
1921
+ *
1922
+ * class C {
1923
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
1924
+ * // static staticProperty;
1925
+ * // property;
1926
+ *
1927
+ * constructor(p) { }
1928
+ * static staticMethod(p) { }
1929
+ * method(p) { }
1930
+ * }
1931
+ *
1932
+ * // constructor
1933
+ * result = Reflect.getMetadataKeys(C);
1934
+ *
1935
+ * // property (on constructor)
1936
+ * result = Reflect.getMetadataKeys(C, "staticProperty");
1937
+ *
1938
+ * // property (on prototype)
1939
+ * result = Reflect.getMetadataKeys(C.prototype, "property");
1940
+ *
1941
+ * // method (on constructor)
1942
+ * result = Reflect.getMetadataKeys(C, "staticMethod");
1943
+ *
1944
+ * // method (on prototype)
1945
+ * result = Reflect.getMetadataKeys(C.prototype, "method");
1946
+ *
1947
+ */
1948
+ function getMetadataKeys(target, targetKey) {
1949
+ if (!IsObject(target)) {
1950
+ throw new TypeError();
1951
+ }
1952
+ else if (!IsUndefined(targetKey)) {
1953
+ targetKey = ToPropertyKey(targetKey);
1954
+ }
1955
+ return OrdinaryMetadataKeys(target, targetKey);
1956
+ }
1957
+ Reflect.getMetadataKeys = getMetadataKeys;
1958
+ /**
1959
+ * Gets the unique metadata keys defined on the target object.
1960
+ * @param target The target object on which the metadata is defined.
1961
+ * @param targetKey (Optional) The property key for the target.
1962
+ * @returns An array of unique metadata keys.
1963
+ * @example
1964
+ *
1965
+ * class C {
1966
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
1967
+ * // static staticProperty;
1968
+ * // property;
1969
+ *
1970
+ * constructor(p) { }
1971
+ * static staticMethod(p) { }
1972
+ * method(p) { }
1973
+ * }
1974
+ *
1975
+ * // constructor
1976
+ * result = Reflect.getOwnMetadataKeys(C);
1977
+ *
1978
+ * // property (on constructor)
1979
+ * result = Reflect.getOwnMetadataKeys(C, "staticProperty");
1980
+ *
1981
+ * // property (on prototype)
1982
+ * result = Reflect.getOwnMetadataKeys(C.prototype, "property");
1983
+ *
1984
+ * // method (on constructor)
1985
+ * result = Reflect.getOwnMetadataKeys(C, "staticMethod");
1986
+ *
1987
+ * // method (on prototype)
1988
+ * result = Reflect.getOwnMetadataKeys(C.prototype, "method");
1989
+ *
1990
+ */
1991
+ function getOwnMetadataKeys(target, targetKey) {
1992
+ if (!IsObject(target)) {
1993
+ throw new TypeError();
1994
+ }
1995
+ else if (!IsUndefined(targetKey)) {
1996
+ targetKey = ToPropertyKey(targetKey);
1997
+ }
1998
+ return OrdinaryOwnMetadataKeys(target, targetKey);
1999
+ }
2000
+ Reflect.getOwnMetadataKeys = getOwnMetadataKeys;
2001
+ /**
2002
+ * Deletes the metadata entry from the target object with the provided key.
2003
+ * @param metadataKey A key used to store and retrieve metadata.
2004
+ * @param target The target object on which the metadata is defined.
2005
+ * @param targetKey (Optional) The property key for the target.
2006
+ * @returns `true` if the metadata entry was found and deleted; otherwise, false.
2007
+ * @example
2008
+ *
2009
+ * class C {
2010
+ * // property declarations are not part of ES6, though they are valid in TypeScript:
2011
+ * // static staticProperty;
2012
+ * // property;
2013
+ *
2014
+ * constructor(p) { }
2015
+ * static staticMethod(p) { }
2016
+ * method(p) { }
2017
+ * }
2018
+ *
2019
+ * // constructor
2020
+ * result = Reflect.deleteMetadata("custom:annotation", C);
2021
+ *
2022
+ * // property (on constructor)
2023
+ * result = Reflect.deleteMetadata("custom:annotation", C, "staticProperty");
2024
+ *
2025
+ * // property (on prototype)
2026
+ * result = Reflect.deleteMetadata("custom:annotation", C.prototype, "property");
2027
+ *
2028
+ * // method (on constructor)
2029
+ * result = Reflect.deleteMetadata("custom:annotation", C, "staticMethod");
2030
+ *
2031
+ * // method (on prototype)
2032
+ * result = Reflect.deleteMetadata("custom:annotation", C.prototype, "method");
2033
+ *
2034
+ */
2035
+ function deleteMetadata(metadataKey, target, targetKey) {
2036
+ if (!IsObject(target)) {
2037
+ throw new TypeError();
2038
+ }
2039
+ else if (!IsUndefined(targetKey)) {
2040
+ targetKey = ToPropertyKey(targetKey);
2041
+ }
2042
+ // https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md#deletemetadata-metadatakey-p-
2043
+ var metadataMap = GetOrCreateMetadataMap(target, targetKey, false);
2044
+ if (IsUndefined(metadataMap)) {
2045
+ return false;
2046
+ }
2047
+ if (!metadataMap.delete(metadataKey)) {
2048
+ return false;
2049
+ }
2050
+ if (metadataMap.size > 0) {
2051
+ return true;
2052
+ }
2053
+ var targetMetadata = __Metadata__.get(target);
2054
+ targetMetadata.delete(targetKey);
2055
+ if (targetMetadata.size > 0) {
2056
+ return true;
2057
+ }
2058
+ __Metadata__.delete(target);
2059
+ return true;
2060
+ }
2061
+ Reflect.deleteMetadata = deleteMetadata;
2062
+ function DecorateConstructor(decorators, target) {
2063
+ for (var i = decorators.length - 1; i >= 0; --i) {
2064
+ var decorator = decorators[i];
2065
+ var decorated = decorator(target);
2066
+ if (!IsUndefined(decorated)) {
2067
+ if (!IsConstructor(decorated)) {
2068
+ throw new TypeError();
2069
+ }
2070
+ target = decorated;
2071
+ }
2072
+ }
2073
+ return target;
2074
+ }
2075
+ function DecoratePropertyWithDescriptor(decorators, target, propertyKey, descriptor) {
2076
+ for (var i = decorators.length - 1; i >= 0; --i) {
2077
+ var decorator = decorators[i];
2078
+ var decorated = decorator(target, propertyKey, descriptor);
2079
+ if (!IsUndefined(decorated)) {
2080
+ if (!IsObject(decorated)) {
2081
+ throw new TypeError();
2082
+ }
2083
+ descriptor = decorated;
2084
+ }
2085
+ }
2086
+ return descriptor;
2087
+ }
2088
+ function DecoratePropertyWithoutDescriptor(decorators, target, propertyKey) {
2089
+ for (var i = decorators.length - 1; i >= 0; --i) {
2090
+ var decorator = decorators[i];
2091
+ decorator(target, propertyKey);
2092
+ }
2093
+ }
2094
+ // https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md#getorcreatemetadatamap--o-p-create-
2095
+ function GetOrCreateMetadataMap(target, targetKey, create) {
2096
+ var targetMetadata = __Metadata__.get(target);
2097
+ if (!targetMetadata) {
2098
+ if (!create) {
2099
+ return undefined;
2100
+ }
2101
+ targetMetadata = new _Map();
2102
+ __Metadata__.set(target, targetMetadata);
2103
+ }
2104
+ var keyMetadata = targetMetadata.get(targetKey);
2105
+ if (!keyMetadata) {
2106
+ if (!create) {
2107
+ return undefined;
2108
+ }
2109
+ keyMetadata = new _Map();
2110
+ targetMetadata.set(targetKey, keyMetadata);
2111
+ }
2112
+ return keyMetadata;
2113
+ }
2114
+ // https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md#ordinaryhasmetadata--metadatakey-o-p-
2115
+ function OrdinaryHasMetadata(MetadataKey, O, P) {
2116
+ var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);
2117
+ if (hasOwn) {
2118
+ return true;
2119
+ }
2120
+ var parent = GetPrototypeOf(O);
2121
+ if (parent !== null) {
2122
+ return OrdinaryHasMetadata(MetadataKey, parent, P);
2123
+ }
2124
+ return false;
2125
+ }
2126
+ // https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md#ordinaryhasownmetadata--metadatakey-o-p-
2127
+ function OrdinaryHasOwnMetadata(MetadataKey, O, P) {
2128
+ var metadataMap = GetOrCreateMetadataMap(O, P, false);
2129
+ if (metadataMap === undefined) {
2130
+ return false;
2131
+ }
2132
+ return Boolean(metadataMap.has(MetadataKey));
2133
+ }
2134
+ // https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md#ordinarygetmetadata--metadatakey-o-p-
2135
+ function OrdinaryGetMetadata(MetadataKey, O, P) {
2136
+ var hasOwn = OrdinaryHasOwnMetadata(MetadataKey, O, P);
2137
+ if (hasOwn) {
2138
+ return OrdinaryGetOwnMetadata(MetadataKey, O, P);
2139
+ }
2140
+ var parent = GetPrototypeOf(O);
2141
+ if (parent !== null) {
2142
+ return OrdinaryGetMetadata(MetadataKey, parent, P);
2143
+ }
2144
+ return undefined;
2145
+ }
2146
+ // https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md#ordinarygetownmetadata--metadatakey-o-p-
2147
+ function OrdinaryGetOwnMetadata(MetadataKey, O, P) {
2148
+ var metadataMap = GetOrCreateMetadataMap(O, P, false);
2149
+ if (metadataMap === undefined) {
2150
+ return undefined;
2151
+ }
2152
+ return metadataMap.get(MetadataKey);
2153
+ }
2154
+ // https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md#ordinarydefineownmetadata--metadatakey-metadatavalue-o-p-
2155
+ function OrdinaryDefineOwnMetadata(MetadataKey, MetadataValue, O, P) {
2156
+ var metadataMap = GetOrCreateMetadataMap(O, P, true);
2157
+ metadataMap.set(MetadataKey, MetadataValue);
2158
+ }
2159
+ // https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md#ordinarymetadatakeys--o-p-
2160
+ function OrdinaryMetadataKeys(O, P) {
2161
+ var ownKeys = OrdinaryOwnMetadataKeys(O, P);
2162
+ var parent = GetPrototypeOf(O);
2163
+ if (parent === null) {
2164
+ return ownKeys;
2165
+ }
2166
+ var parentKeys = OrdinaryMetadataKeys(parent, P);
2167
+ if (parentKeys.length <= 0) {
2168
+ return ownKeys;
2169
+ }
2170
+ if (ownKeys.length <= 0) {
2171
+ return parentKeys;
2172
+ }
2173
+ var set = new _Set();
2174
+ var keys = [];
2175
+ for (var _i = 0; _i < ownKeys.length; _i++) {
2176
+ var key = ownKeys[_i];
2177
+ var hasKey = set.has(key);
2178
+ if (!hasKey) {
2179
+ set.add(key);
2180
+ keys.push(key);
2181
+ }
2182
+ }
2183
+ for (var _a = 0; _a < parentKeys.length; _a++) {
2184
+ var key = parentKeys[_a];
2185
+ var hasKey = set.has(key);
2186
+ if (!hasKey) {
2187
+ set.add(key);
2188
+ keys.push(key);
2189
+ }
2190
+ }
2191
+ return keys;
2192
+ }
2193
+ // https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md#ordinaryownmetadatakeys--o-p-
2194
+ function OrdinaryOwnMetadataKeys(target, targetKey) {
2195
+ var metadataMap = GetOrCreateMetadataMap(target, targetKey, false);
2196
+ var keys = [];
2197
+ if (metadataMap) {
2198
+ metadataMap.forEach(function (_, key) { return keys.push(key); });
2199
+ }
2200
+ return keys;
2201
+ }
2202
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-language-types-undefined-type
2203
+ function IsUndefined(x) {
2204
+ return x === undefined;
2205
+ }
2206
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isarray
2207
+ function IsArray(x) {
2208
+ return Array.isArray(x);
2209
+ }
2210
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object-type
2211
+ function IsObject(x) {
2212
+ return typeof x === "object" ? x !== null : typeof x === "function";
2213
+ }
2214
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-isconstructor
2215
+ function IsConstructor(x) {
2216
+ return typeof x === "function";
2217
+ }
2218
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-ecmascript-language-types-symbol-type
2219
+ function IsSymbol(x) {
2220
+ return typeof x === "symbol";
2221
+ }
2222
+ // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-topropertykey
2223
+ function ToPropertyKey(value) {
2224
+ if (IsSymbol(value)) {
2225
+ return value;
2226
+ }
2227
+ return String(value);
2228
+ }
2229
+ function GetPrototypeOf(O) {
2230
+ var proto = Object.getPrototypeOf(O);
2231
+ if (typeof O !== "function" || O === functionPrototype) {
2232
+ return proto;
2233
+ }
2234
+ // TypeScript doesn't set __proto__ in ES5, as it's non-standard.
2235
+ // Try to determine the superclass constructor. Compatible implementations
2236
+ // must either set __proto__ on a subclass constructor to the superclass constructor,
2237
+ // or ensure each class has a valid `constructor` property on its prototype that
2238
+ // points back to the constructor.
2239
+ // If this is not the same as Function.[[Prototype]], then this is definately inherited.
2240
+ // This is the case when in ES6 or when using __proto__ in a compatible browser.
2241
+ if (proto !== functionPrototype) {
2242
+ return proto;
2243
+ }
2244
+ // If the super prototype is Object.prototype, null, or undefined, then we cannot determine the heritage.
2245
+ var prototype = O.prototype;
2246
+ var prototypeProto = Object.getPrototypeOf(prototype);
2247
+ if (prototypeProto == null || prototypeProto === Object.prototype) {
2248
+ return proto;
2249
+ }
2250
+ // if the constructor was not a function, then we cannot determine the heritage.
2251
+ var constructor = prototypeProto.constructor;
2252
+ if (typeof constructor !== "function") {
2253
+ return proto;
2254
+ }
2255
+ // if we have some kind of self-reference, then we cannot determine the heritage.
2256
+ if (constructor === O) {
2257
+ return proto;
2258
+ }
2259
+ // we have a pretty good guess at the heritage.
2260
+ return constructor;
2261
+ }
2262
+ // naive Map shim
2263
+ function CreateMapPolyfill() {
2264
+ var cacheSentinel = {};
2265
+ function Map() {
2266
+ this._keys = [];
2267
+ this._values = [];
2268
+ this._cache = cacheSentinel;
2269
+ }
2270
+ Map.prototype = {
2271
+ get size() {
2272
+ return this._keys.length;
2273
+ },
2274
+ has: function (key) {
2275
+ if (key === this._cache) {
2276
+ return true;
2277
+ }
2278
+ if (this._find(key) >= 0) {
2279
+ this._cache = key;
2280
+ return true;
2281
+ }
2282
+ return false;
2283
+ },
2284
+ get: function (key) {
2285
+ var index = this._find(key);
2286
+ if (index >= 0) {
2287
+ this._cache = key;
2288
+ return this._values[index];
2289
+ }
2290
+ return undefined;
2291
+ },
2292
+ set: function (key, value) {
2293
+ this.delete(key);
2294
+ this._keys.push(key);
2295
+ this._values.push(value);
2296
+ this._cache = key;
2297
+ return this;
2298
+ },
2299
+ delete: function (key) {
2300
+ var index = this._find(key);
2301
+ if (index >= 0) {
2302
+ this._keys.splice(index, 1);
2303
+ this._values.splice(index, 1);
2304
+ this._cache = cacheSentinel;
2305
+ return true;
2306
+ }
2307
+ return false;
2308
+ },
2309
+ clear: function () {
2310
+ this._keys.length = 0;
2311
+ this._values.length = 0;
2312
+ this._cache = cacheSentinel;
2313
+ },
2314
+ forEach: function (callback, thisArg) {
2315
+ var size = this.size;
2316
+ for (var i = 0; i < size; ++i) {
2317
+ var key = this._keys[i];
2318
+ var value = this._values[i];
2319
+ this._cache = key;
2320
+ callback.call(this, value, key, this);
2321
+ }
2322
+ },
2323
+ _find: function (key) {
2324
+ var keys = this._keys;
2325
+ var size = keys.length;
2326
+ for (var i = 0; i < size; ++i) {
2327
+ if (keys[i] === key) {
2328
+ return i;
2329
+ }
2330
+ }
2331
+ return -1;
2332
+ }
2333
+ };
2334
+ return Map;
2335
+ }
2336
+ // naive Set shim
2337
+ function CreateSetPolyfill() {
2338
+ var cacheSentinel = {};
2339
+ function Set() {
2340
+ this._map = new _Map();
2341
+ }
2342
+ Set.prototype = {
2343
+ get size() {
2344
+ return this._map.length;
2345
+ },
2346
+ has: function (value) {
2347
+ return this._map.has(value);
2348
+ },
2349
+ add: function (value) {
2350
+ this._map.set(value, value);
2351
+ return this;
2352
+ },
2353
+ delete: function (value) {
2354
+ return this._map.delete(value);
2355
+ },
2356
+ clear: function () {
2357
+ this._map.clear();
2358
+ },
2359
+ forEach: function (callback, thisArg) {
2360
+ this._map.forEach(callback, thisArg);
2361
+ }
2362
+ };
2363
+ return Set;
2364
+ }
2365
+ // naive WeakMap shim
2366
+ function CreateWeakMapPolyfill() {
2367
+ var UUID_SIZE = 16;
2368
+ var isNode = typeof global !== "undefined" && Object.prototype.toString.call(global.process) === '[object process]';
2369
+ var nodeCrypto = isNode && require("crypto");
2370
+ var hasOwn = Object.prototype.hasOwnProperty;
2371
+ var keys = {};
2372
+ var rootKey = CreateUniqueKey();
2373
+ function WeakMap() {
2374
+ this._key = CreateUniqueKey();
2375
+ }
2376
+ WeakMap.prototype = {
2377
+ has: function (target) {
2378
+ var table = GetOrCreateWeakMapTable(target, false);
2379
+ if (table) {
2380
+ return this._key in table;
2381
+ }
2382
+ return false;
2383
+ },
2384
+ get: function (target) {
2385
+ var table = GetOrCreateWeakMapTable(target, false);
2386
+ if (table) {
2387
+ return table[this._key];
2388
+ }
2389
+ return undefined;
2390
+ },
2391
+ set: function (target, value) {
2392
+ var table = GetOrCreateWeakMapTable(target, true);
2393
+ table[this._key] = value;
2394
+ return this;
2395
+ },
2396
+ delete: function (target) {
2397
+ var table = GetOrCreateWeakMapTable(target, false);
2398
+ if (table && this._key in table) {
2399
+ return delete table[this._key];
2400
+ }
2401
+ return false;
2402
+ },
2403
+ clear: function () {
2404
+ // NOTE: not a real clear, just makes the previous data unreachable
2405
+ this._key = CreateUniqueKey();
2406
+ }
2407
+ };
2408
+ function FillRandomBytes(buffer, size) {
2409
+ for (var i = 0; i < size; ++i) {
2410
+ buffer[i] = Math.random() * 255 | 0;
2411
+ }
2412
+ }
2413
+ function GenRandomBytes(size) {
2414
+ if (nodeCrypto) {
2415
+ var data = nodeCrypto.randomBytes(size);
2416
+ return data;
2417
+ }
2418
+ else if (typeof Uint8Array === "function") {
2419
+ var data = new Uint8Array(size);
2420
+ if (typeof crypto !== "undefined") {
2421
+ crypto.getRandomValues(data);
2422
+ }
2423
+ else if (typeof msCrypto !== "undefined") {
2424
+ msCrypto.getRandomValues(data);
2425
+ }
2426
+ else {
2427
+ FillRandomBytes(data, size);
2428
+ }
2429
+ return data;
2430
+ }
2431
+ else {
2432
+ var data = new Array(size);
2433
+ FillRandomBytes(data, size);
2434
+ return data;
2435
+ }
2436
+ }
2437
+ function CreateUUID() {
2438
+ var data = GenRandomBytes(UUID_SIZE);
2439
+ // mark as random - RFC 4122 § 4.4
2440
+ data[6] = data[6] & 0x4f | 0x40;
2441
+ data[8] = data[8] & 0xbf | 0x80;
2442
+ var result = "";
2443
+ for (var offset = 0; offset < UUID_SIZE; ++offset) {
2444
+ var byte = data[offset];
2445
+ if (offset === 4 || offset === 6 || offset === 8) {
2446
+ result += "-";
2447
+ }
2448
+ if (byte < 16) {
2449
+ result += "0";
2450
+ }
2451
+ result += byte.toString(16).toLowerCase();
2452
+ }
2453
+ return result;
2454
+ }
2455
+ function CreateUniqueKey() {
2456
+ var key;
2457
+ do {
2458
+ key = "@@WeakMap@@" + CreateUUID();
2459
+ } while (hasOwn.call(keys, key));
2460
+ keys[key] = true;
2461
+ return key;
2462
+ }
2463
+ function GetOrCreateWeakMapTable(target, create) {
2464
+ if (!hasOwn.call(target, rootKey)) {
2465
+ if (!create) {
2466
+ return undefined;
2467
+ }
2468
+ Object.defineProperty(target, rootKey, { value: Object.create(null) });
2469
+ }
2470
+ return target[rootKey];
2471
+ }
2472
+ return WeakMap;
2473
+ }
2474
+ // hook global Reflect
2475
+ (function (__global) {
2476
+ if (typeof __global.Reflect !== "undefined") {
2477
+ if (__global.Reflect !== Reflect) {
2478
+ for (var p in Reflect) {
2479
+ __global.Reflect[p] = Reflect[p];
2480
+ }
2481
+ }
2482
+ }
2483
+ else {
2484
+ __global.Reflect = Reflect;
2485
+ }
2486
+ })(typeof window !== "undefined" ? window :
2487
+ typeof WorkerGlobalScope !== "undefined" ? self :
2488
+ typeof global !== "undefined" ? global :
2489
+ Function("return this;")());
2490
+ })(Reflect || (Reflect = {}));
2491
+ //# sourceMappingURLDisabled=Reflect.js.map