angular2-boiler-plate
Version:
Angular 2 Boiler plate that integrated with WebPack, TypeScript, DatePicker, RxJs for Reactive Extensions in Java Script , Karma , Jasmine for unit testing , WebKit ,protractor e2e testing
14 lines • 152 kB
JavaScript
webpackJsonp([0],{0:function(e,t,o){"use strict";var n=o(1),r=o(3),i=o(23);r.enableProdMode(),n.platformBrowserDynamic().bootstrapModule(i.AppModule)},23:function(e,t,o){"use strict";var n=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=o(3),a=o(21),s=o(22),l=o(24),c=o(25),u=o(57),p=o(384),d=o(411),f=o(413),h=o(415),m=o(417),y=o(419),g=function(){function AppModule(){}return AppModule=n([i.NgModule({imports:[a.BrowserModule,s.CommonModule,l.HttpModule,l.JsonpModule,c.RouterModule.forRoot([{path:"welcome",component:d.WelcomeComponent},{path:"ratingsUi",component:f.RatingSampleComponent},{path:"tableUi",component:h.TableSampleComponent},{path:"sampleForm",component:m.SampleFormComponent},{path:"sampleModal",component:y.ModalSampleComponent},{path:"",redirectTo:"welcome",pathMatch:"full"},{path:"**",redirectTo:"welcome",pathMatch:"full"}]),u.SuiModule],declarations:[p.AppComponent,d.WelcomeComponent,f.RatingSampleComponent,h.TableSampleComponent,m.SampleFormComponent,y.ModalSampleComponent],bootstrap:[p.AppComponent]}),r("design:paramtypes",[])],AppModule)}();t.AppModule=g},57:function(e,t,o){"use strict";var n=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,o,a):r(t,o))||a);return i>3&&a&&Object.defineProperty(t,o,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=o(3),a=o(22),s=o(25),l=o(58),c=o(60),u=o(61),p=o(62),d=o(63),f=o(64),h=o(65),m=o(68),y=o(70),g=o(372),v=o(374),b=o(376),C=o(379),_=o(380),A=o(369),M=o(382),P=function(){function SuiModule(){}return SuiModule=n([i.NgModule({declarations:[c.FilterPipe,u.OrderByPipe,d.PagingPipe,p.VisiblePipe,f.DeletePipe,C.AddPipe,g.ModalComponent,A.Alertomponent,h.NavigationComponent,m.RatingComponent,y.TableComponent,v.ConfirmModalComponent,_.InputComponent,M.PanelComponent,b.FormComponent],imports:[a.CommonModule,s.RouterModule,l.FormsModule,l.ReactiveFormsModule],exports:[a.CommonModule,l.FormsModule,l.ReactiveFormsModule,d.PagingPipe,p.VisiblePipe,s.RouterModule,c.FilterPipe,u.OrderByPipe,f.DeletePipe,C.AddPipe,g.ModalComponent,y.TableComponent,h.NavigationComponent,A.Alertomponent,m.RatingComponent,v.ConfirmModalComponent,_.InputComponent,M.PanelComponent,b.FormComponent]}),r("design:paramtypes",[])],SuiModule)}();t.SuiModule=P},58:function(e,t,o){/**
* @license Angular v2.1.2
* (c) 2010-2016 Google, Inc. https://angular.io/
* License: MIT
*/
!function(e,n){n(t,o(3),o(59),o(4),o(5),o(53))}(this,function(e,t,o,n,r,i){"use strict";function isPresent(e){return null!=e}function isBlank(e){return null==e}function looseIdentical(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)}function isJsObject(e){return null!==e&&("function"==typeof e||"object"==typeof e)}function isPrimitive(e){return!isJsObject(e)}function _flattenArray(e,t){if(isPresent(e))for(var o=0;o<e.length;o++){var n=e[o];Array.isArray(n)?_flattenArray(n,t):t.push(n)}return t}function isEmptyInputValue(e){return null==e||"string"==typeof e&&0===e.length}function _convertToPromise(e){return f(e)?e:o.toPromise.call(e)}function _executeValidators(e,t){return t.map(function(t){return t(e)})}function _executeAsyncValidators(e,t){return t.map(function(t){return t(e)})}function _mergeErrors(e){var t=e.reduce(function(e,t){return isPresent(t)?p.merge(e,t):e},{});return 0===Object.keys(t).length?null:t}/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
function normalizeValidator(e){return void 0!==e.validate?function(t){return e.validate(t)}:e}function normalizeAsyncValidator(e){return void 0!==e.validate?function(t){return e.validate(t)}:e}function unimplemented(){throw new Error("unimplemented")}function _buildValueString(e,t){return isBlank(e)?""+t:(isPrimitive(t)||(t="Object"),(e+": "+t).slice(0,50))}function _extractId(e){return e.split(":")[0]}function _buildValueString$1(e,t){return isBlank(e)?""+t:("string"==typeof t&&(t="'"+t+"'"),isPrimitive(t)||(t="Object"),(e+": "+t).slice(0,50))}function _extractId$1(e){return e.split(":")[0]}function controlPath(e,t){return t.path.concat([e])}function setUpControl(e,t){e||_throwError(t,"Cannot find control with"),t.valueAccessor||_throwError(t,"No value accessor for form control with"),e.validator=y.compose([e.validator,t.validator]),e.asyncValidator=y.composeAsync([e.asyncValidator,t.asyncValidator]),t.valueAccessor.writeValue(e.value),t.valueAccessor.registerOnChange(function(o){t.viewToModelUpdate(o),e.markAsDirty(),e.setValue(o,{emitModelToViewChange:!1})}),t.valueAccessor.registerOnTouched(function(){return e.markAsTouched()}),e.registerOnChange(function(e,o){t.valueAccessor.writeValue(e),o&&t.viewToModelUpdate(e)}),t.valueAccessor.setDisabledState&&e.registerOnDisabledChange(function(e){t.valueAccessor.setDisabledState(e)}),t._rawValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(function(){return e.updateValueAndValidity()})}),t._rawAsyncValidators.forEach(function(t){t.registerOnValidatorChange&&t.registerOnValidatorChange(function(){return e.updateValueAndValidity()})})}function cleanUpControl(e,t){t.valueAccessor.registerOnChange(function(){return _noControlError(t)}),t.valueAccessor.registerOnTouched(function(){return _noControlError(t)}),t._rawValidators.forEach(function(e){return e.registerOnValidatorChange(null)}),t._rawAsyncValidators.forEach(function(e){return e.registerOnValidatorChange(null)}),e&&e._clearChangeFns()}function setUpFormContainer(e,t){isBlank(e)&&_throwError(t,"Cannot find control with"),e.validator=y.compose([e.validator,t.validator]),e.asyncValidator=y.composeAsync([e.asyncValidator,t.asyncValidator])}function _noControlError(e){return _throwError(e,"There is no FormControl instance attached to form control element with")}function _throwError(e,t){var o;throw o=e.path.length>1?"path: '"+e.path.join(" -> ")+"'":e.path[0]?"name: '"+e.path+"'":"unspecified name attribute",new Error(t+" "+o)}function composeValidators(e){return isPresent(e)?y.compose(e.map(normalizeValidator)):null}function composeAsyncValidators(e){return isPresent(e)?y.composeAsync(e.map(normalizeAsyncValidator)):null}function isPropertyUpdated(e,t){if(!e.hasOwnProperty("model"))return!1;var o=e.model;return!!o.isFirstChange()||!looseIdentical(t,o.currentValue)}function isBuiltInAccessor(e){return I.some(function(t){return e.constructor===t})}function selectValueAccessor(e,t){if(!t)return null;var o,n,r;return t.forEach(function(t){t.constructor===_?o=t:isBuiltInAccessor(t)?(n&&_throwError(e,"More than one built-in value accessor matches form control with"),n=t):(r&&_throwError(e,"More than one custom value accessor matches form control with"),r=t)}),r?r:n?n:o?o:(_throwError(e,"No valid value accessor for form control with"),null)}function _find(e,t,o){return null==t?null:(t instanceof Array||(t=t.split(o)),t instanceof Array&&0===t.length?null:t.reduce(function(e,t){return e instanceof X?e.controls[t]||null:e instanceof Z?e.at(t)||null:null},e))}function toObservable(e){return f(e)?i.fromPromise(e):e}function coerceToValidator(e){return Array.isArray(e)?composeValidators(e):e}function coerceToAsyncValidator(e){return Array.isArray(e)?composeAsyncValidators(e):e}function _hasInvalidParent(e){return!(e instanceof Ae||e instanceof be||e instanceof Pe)}var a=function(){function AbstractControlDirective(){}return Object.defineProperty(AbstractControlDirective.prototype,"control",{get:function(){throw new Error("unimplemented")},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"value",{get:function(){return isPresent(this.control)?this.control.value:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"valid",{get:function(){return isPresent(this.control)?this.control.valid:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"invalid",{get:function(){return isPresent(this.control)?this.control.invalid:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"pending",{get:function(){return isPresent(this.control)?this.control.pending:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"errors",{get:function(){return isPresent(this.control)?this.control.errors:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"pristine",{get:function(){return isPresent(this.control)?this.control.pristine:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"dirty",{get:function(){return isPresent(this.control)?this.control.dirty:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"touched",{get:function(){return isPresent(this.control)?this.control.touched:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"untouched",{get:function(){return isPresent(this.control)?this.control.untouched:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"disabled",{get:function(){return isPresent(this.control)?this.control.disabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"enabled",{get:function(){return isPresent(this.control)?this.control.enabled:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"statusChanges",{get:function(){return isPresent(this.control)?this.control.statusChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"valueChanges",{get:function(){return isPresent(this.control)?this.control.valueChanges:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlDirective.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),AbstractControlDirective.prototype.reset=function(e){void 0===e&&(e=void 0),isPresent(this.control)&&this.control.reset(e)},AbstractControlDirective}(),s=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},l=function(e){function ControlContainer(){e.apply(this,arguments)}return s(ControlContainer,e),Object.defineProperty(ControlContainer.prototype,"formDirective",{get:function(){return null},enumerable:!0,configurable:!0}),Object.defineProperty(ControlContainer.prototype,"path",{get:function(){return null},enumerable:!0,configurable:!0}),ControlContainer}(a),c=function(){try{if((new Map).values().next)return function(e,t){return t?Array.from(e.values()):Array.from(e.keys())}}catch(e){}return function(e,t){var o=new Array(e.size),n=0;return e.forEach(function(e,r){o[n]=t?e:r,n++}),o}}(),u=function(){function MapWrapper(){}return MapWrapper.createFromStringMap=function(e){var t=new Map;for(var o in e)t.set(o,e[o]);return t},MapWrapper.keys=function(e){return c(e,!1)},MapWrapper.values=function(e){return c(e,!0)},MapWrapper}(),p=function(){function StringMapWrapper(){}return StringMapWrapper.merge=function(e,t){for(var o={},n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];o[i]=e[i]}for(var a=0,s=Object.keys(t);a<s.length;a++){var i=s[a];o[i]=t[i]}return o},StringMapWrapper.equals=function(e,t){var o=Object.keys(e),n=Object.keys(t);if(o.length!=n.length)return!1;for(var r=0;r<o.length;r++){var i=o[r];if(e[i]!==t[i])return!1}return!0},StringMapWrapper}(),d=function(){function ListWrapper(){}return ListWrapper.removeAll=function(e,t){for(var o=0;o<t.length;++o){var n=e.indexOf(t[o]);e.splice(n,1)}},ListWrapper.remove=function(e,t){var o=e.indexOf(t);return o>-1&&(e.splice(o,1),!0)},ListWrapper.equals=function(e,t){if(e.length!=t.length)return!1;for(var o=0;o<e.length;++o)if(e[o]!==t[o])return!1;return!0},ListWrapper.maximum=function(e,t){if(0==e.length)return null;for(var o=null,n=-(1/0),r=0;r<e.length;r++){var i=e[r];if(null!=i){var a=t(i);a>n&&(o=i,n=a)}}return o},ListWrapper.flatten=function(e){var t=[];return _flattenArray(e,t),t},ListWrapper}(),f=t.__core_private__.isPromise,h=new t.OpaqueToken("NgValidators"),m=new t.OpaqueToken("NgAsyncValidators"),y=function(){function Validators(){}return Validators.required=function(e){return isEmptyInputValue(e.value)?{required:!0}:null},Validators.minLength=function(e){return function(t){if(isEmptyInputValue(t.value))return null;var o="string"==typeof t.value?t.value.length:0;return o<e?{minlength:{requiredLength:e,actualLength:o}}:null}},Validators.maxLength=function(e){return function(t){var o="string"==typeof t.value?t.value.length:0;return o>e?{maxlength:{requiredLength:e,actualLength:o}}:null}},Validators.pattern=function(e){return function(t){if(isEmptyInputValue(t.value))return null;var o=new RegExp("^"+e+"$"),n=t.value;return o.test(n)?null:{pattern:{requiredPattern:"^"+e+"$",actualValue:n}}}},Validators.nullValidator=function(e){return null},Validators.compose=function(e){if(!e)return null;var t=e.filter(isPresent);return 0==t.length?null:function(e){return _mergeErrors(_executeValidators(e,t))}},Validators.composeAsync=function(e){if(!e)return null;var t=e.filter(isPresent);return 0==t.length?null:function(e){var o=_executeAsyncValidators(e,t).map(_convertToPromise);return Promise.all(o).then(_mergeErrors)}},Validators}(),g=new t.OpaqueToken("NgValueAccessor"),v={provide:g,useExisting:t.forwardRef(function(){return b}),multi:!0},b=function(){function CheckboxControlValueAccessor(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return CheckboxControlValueAccessor.prototype.writeValue=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",e)},CheckboxControlValueAccessor.prototype.registerOnChange=function(e){this.onChange=e},CheckboxControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},CheckboxControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},CheckboxControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]",host:{"(change)":"onChange($event.target.checked)","(blur)":"onTouched()"},providers:[v]}]}],CheckboxControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],CheckboxControlValueAccessor}(),C={provide:g,useExisting:t.forwardRef(function(){return _}),multi:!0},_=function(){function DefaultValueAccessor(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return DefaultValueAccessor.prototype.writeValue=function(e){var t=isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},DefaultValueAccessor.prototype.registerOnChange=function(e){this.onChange=e},DefaultValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},DefaultValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},DefaultValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]",host:{"(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[C]}]}],DefaultValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],DefaultValueAccessor}(),A={provide:g,useExisting:t.forwardRef(function(){return M}),multi:!0},M=function(){function NumberValueAccessor(e,t){this._renderer=e,this._elementRef=t,this.onChange=function(e){},this.onTouched=function(){}}return NumberValueAccessor.prototype.writeValue=function(e){var t=isBlank(e)?"":e;this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},NumberValueAccessor.prototype.registerOnChange=function(e){this.onChange=function(t){e(""==t?null:parseFloat(t))}},NumberValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},NumberValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},NumberValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]",host:{"(change)":"onChange($event.target.value)","(input)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[A]}]}],NumberValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],NumberValueAccessor}(),P=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},F=function(e){function NgControl(){e.apply(this,arguments),this._parent=null,this.name=null,this.valueAccessor=null,this._rawValidators=[],this._rawAsyncValidators=[]}return P(NgControl,e),Object.defineProperty(NgControl.prototype,"validator",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),Object.defineProperty(NgControl.prototype,"asyncValidator",{get:function(){return unimplemented()},enumerable:!0,configurable:!0}),NgControl}(a),w={provide:g,useExisting:t.forwardRef(function(){return V}),multi:!0},S=function(){function RadioControlRegistry(){this._accessors=[]}return RadioControlRegistry.prototype.add=function(e,t){this._accessors.push([e,t])},RadioControlRegistry.prototype.remove=function(e){for(var t=-1,o=0;o<this._accessors.length;++o)this._accessors[o][1]===e&&(t=o);this._accessors.splice(t,1)},RadioControlRegistry.prototype.select=function(e){var t=this;this._accessors.forEach(function(o){t._isSameGroup(o,e)&&o[1]!==e&&o[1].fireUncheck(e.value)})},RadioControlRegistry.prototype._isSameGroup=function(e,t){return!!e[0].control&&(e[0]._parent===t._control._parent&&e[1].name===t.name)},RadioControlRegistry.decorators=[{type:t.Injectable}],RadioControlRegistry.ctorParameters=[],RadioControlRegistry}(),V=function(){function RadioControlValueAccessor(e,t,o,n){this._renderer=e,this._elementRef=t,this._registry=o,this._injector=n,this.onChange=function(){},this.onTouched=function(){}}return RadioControlValueAccessor.prototype.ngOnInit=function(){this._control=this._injector.get(F),this._checkName(),this._registry.add(this._control,this)},RadioControlValueAccessor.prototype.ngOnDestroy=function(){this._registry.remove(this)},RadioControlValueAccessor.prototype.writeValue=function(e){this._state=e===this.value,this._renderer.setElementProperty(this._elementRef.nativeElement,"checked",this._state)},RadioControlValueAccessor.prototype.registerOnChange=function(e){var t=this;this._fn=e,this.onChange=function(){e(t.value),t._registry.select(t)}},RadioControlValueAccessor.prototype.fireUncheck=function(e){this.writeValue(e)},RadioControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},RadioControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},RadioControlValueAccessor.prototype._checkName=function(){this.name&&this.formControlName&&this.name!==this.formControlName&&this._throwNameError(),!this.name&&this.formControlName&&(this.name=this.formControlName)},RadioControlValueAccessor.prototype._throwNameError=function(){throw new Error('\n If you define both a name and a formControlName attribute on your radio button, their values\n must match. Ex: <input type="radio" formControlName="food" name="food">\n ')},RadioControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]",host:{"(change)":"onChange()","(blur)":"onTouched()"},providers:[w]}]}],RadioControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef},{type:S},{type:t.Injector}],RadioControlValueAccessor.propDecorators={name:[{type:t.Input}],formControlName:[{type:t.Input}],value:[{type:t.Input}]},RadioControlValueAccessor}(),O={provide:g,useExisting:t.forwardRef(function(){return R}),multi:!0},R=function(){function SelectControlValueAccessor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){}}return SelectControlValueAccessor.prototype.writeValue=function(e){this.value=e;var t=_buildValueString(this._getOptionId(e),e);this._renderer.setElementProperty(this._elementRef.nativeElement,"value",t)},SelectControlValueAccessor.prototype.registerOnChange=function(e){var t=this;this.onChange=function(o){t.value=o,e(t._getOptionValue(o))}},SelectControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},SelectControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},SelectControlValueAccessor.prototype._registerOption=function(){return(this._idCounter++).toString()},SelectControlValueAccessor.prototype._getOptionId=function(e){for(var t=0,o=u.keys(this._optionMap);t<o.length;t++){var n=o[t];if(looseIdentical(this._optionMap.get(n),e))return n}return null},SelectControlValueAccessor.prototype._getOptionValue=function(e){var t=this._optionMap.get(_extractId(e));return isPresent(t)?t:e},SelectControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]",host:{"(change)":"onChange($event.target.value)","(blur)":"onTouched()"},providers:[O]}]}],SelectControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],SelectControlValueAccessor}(),E=function(){function NgSelectOption(e,t,o){this._element=e,this._renderer=t,this._select=o,isPresent(this._select)&&(this.id=this._select._registerOption())}return Object.defineProperty(NgSelectOption.prototype,"ngValue",{set:function(e){null!=this._select&&(this._select._optionMap.set(this.id,e),this._setElementValue(_buildValueString(this.id,e)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(NgSelectOption.prototype,"value",{set:function(e){this._setElementValue(e),isPresent(this._select)&&this._select.writeValue(this._select.value)},enumerable:!0,configurable:!0}),NgSelectOption.prototype._setElementValue=function(e){this._renderer.setElementProperty(this._element.nativeElement,"value",e)},NgSelectOption.prototype.ngOnDestroy=function(){isPresent(this._select)&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))},NgSelectOption.decorators=[{type:t.Directive,args:[{selector:"option"}]}],NgSelectOption.ctorParameters=[{type:t.ElementRef},{type:t.Renderer},{type:R,decorators:[{type:t.Optional},{type:t.Host}]}],NgSelectOption.propDecorators={ngValue:[{type:t.Input,args:["ngValue"]}],value:[{type:t.Input,args:["value"]}]},NgSelectOption}(),N={provide:g,useExisting:t.forwardRef(function(){return x}),multi:!0},x=function(){function SelectMultipleControlValueAccessor(e,t){this._renderer=e,this._elementRef=t,this._optionMap=new Map,this._idCounter=0,this.onChange=function(e){},this.onTouched=function(){}}return SelectMultipleControlValueAccessor.prototype.writeValue=function(e){var t=this;if(this.value=e,null!=e){var o=e,n=o.map(function(e){return t._getOptionId(e)});this._optionMap.forEach(function(e,t){e._setSelected(n.indexOf(t.toString())>-1)})}},SelectMultipleControlValueAccessor.prototype.registerOnChange=function(e){var t=this;this.onChange=function(o){var n=[];if(o.hasOwnProperty("selectedOptions"))for(var r=o.selectedOptions,i=0;i<r.length;i++){var a=r.item(i),s=t._getOptionValue(a.value);n.push(s)}else for(var r=o.options,i=0;i<r.length;i++){var a=r.item(i);if(a.selected){var s=t._getOptionValue(a.value);n.push(s)}}e(n)}},SelectMultipleControlValueAccessor.prototype.registerOnTouched=function(e){this.onTouched=e},SelectMultipleControlValueAccessor.prototype.setDisabledState=function(e){this._renderer.setElementProperty(this._elementRef.nativeElement,"disabled",e)},SelectMultipleControlValueAccessor.prototype._registerOption=function(e){var t=(this._idCounter++).toString();return this._optionMap.set(t,e),t},SelectMultipleControlValueAccessor.prototype._getOptionId=function(e){for(var t=0,o=u.keys(this._optionMap);t<o.length;t++){var n=o[t];if(looseIdentical(this._optionMap.get(n)._value,e))return n}return null},SelectMultipleControlValueAccessor.prototype._getOptionValue=function(e){var t=this._optionMap.get(_extractId$1(e));return isPresent(t)?t._value:e},SelectMultipleControlValueAccessor.decorators=[{type:t.Directive,args:[{selector:"select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]",host:{"(change)":"onChange($event.target)","(blur)":"onTouched()"},providers:[N]}]}],SelectMultipleControlValueAccessor.ctorParameters=[{type:t.Renderer},{type:t.ElementRef}],SelectMultipleControlValueAccessor}(),D=function(){function NgSelectMultipleOption(e,t,o){this._element=e,this._renderer=t,this._select=o,isPresent(this._select)&&(this.id=this._select._registerOption(this))}return Object.defineProperty(NgSelectMultipleOption.prototype,"ngValue",{set:function(e){null!=this._select&&(this._value=e,this._setElementValue(_buildValueString$1(this.id,e)),this._select.writeValue(this._select.value))},enumerable:!0,configurable:!0}),Object.defineProperty(NgSelectMultipleOption.prototype,"value",{set:function(e){isPresent(this._select)?(this._value=e,this._setElementValue(_buildValueString$1(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)},enumerable:!0,configurable:!0}),NgSelectMultipleOption.prototype._setElementValue=function(e){this._renderer.setElementProperty(this._element.nativeElement,"value",e)},NgSelectMultipleOption.prototype._setSelected=function(e){this._renderer.setElementProperty(this._element.nativeElement,"selected",e)},NgSelectMultipleOption.prototype.ngOnDestroy=function(){isPresent(this._select)&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))},NgSelectMultipleOption.decorators=[{type:t.Directive,args:[{selector:"option"}]}],NgSelectMultipleOption.ctorParameters=[{type:t.ElementRef},{type:t.Renderer},{type:x,decorators:[{type:t.Optional},{type:t.Host}]}],NgSelectMultipleOption.propDecorators={ngValue:[{type:t.Input,args:["ngValue"]}],value:[{type:t.Input,args:["value"]}]},NgSelectMultipleOption}(),I=[b,M,R,x,V],T=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},j=function(e){function AbstractFormGroupDirective(){e.apply(this,arguments)}return T(AbstractFormGroupDirective,e),AbstractFormGroupDirective.prototype.ngOnInit=function(){this._checkParentType(),this.formDirective.addFormGroup(this)},AbstractFormGroupDirective.prototype.ngOnDestroy=function(){this.formDirective&&this.formDirective.removeFormGroup(this)},Object.defineProperty(AbstractFormGroupDirective.prototype,"control",{get:function(){return this.formDirective.getFormGroup(this)},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractFormGroupDirective.prototype,"path",{get:function(){return controlPath(this.name,this._parent)},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractFormGroupDirective.prototype,"formDirective",{get:function(){return this._parent?this._parent.formDirective:null},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractFormGroupDirective.prototype,"validator",{get:function(){return composeValidators(this._validators)},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractFormGroupDirective.prototype,"asyncValidator",{get:function(){return composeAsyncValidators(this._asyncValidators)},enumerable:!0,configurable:!0}),AbstractFormGroupDirective.prototype._checkParentType=function(){},AbstractFormGroupDirective}(l),k=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},G=function(){function AbstractControlStatus(e){this._cd=e}return Object.defineProperty(AbstractControlStatus.prototype,"ngClassUntouched",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.untouched},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassTouched",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.touched},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassPristine",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassDirty",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.dirty},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassValid",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.valid},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControlStatus.prototype,"ngClassInvalid",{get:function(){return!!isPresent(this._cd.control)&&this._cd.control.invalid},enumerable:!0,configurable:!0}),AbstractControlStatus}(),q={"[class.ng-untouched]":"ngClassUntouched","[class.ng-touched]":"ngClassTouched","[class.ng-pristine]":"ngClassPristine","[class.ng-dirty]":"ngClassDirty","[class.ng-valid]":"ngClassValid","[class.ng-invalid]":"ngClassInvalid"},L=function(e){function NgControlStatus(t){e.call(this,t)}return k(NgControlStatus,e),NgControlStatus.decorators=[{type:t.Directive,args:[{selector:"[formControlName],[ngModel],[formControl]",host:q}]}],NgControlStatus.ctorParameters=[{type:F,decorators:[{type:t.Self}]}],NgControlStatus}(G),B=function(e){function NgControlStatusGroup(t){e.call(this,t)}return k(NgControlStatusGroup,e),NgControlStatusGroup.decorators=[{type:t.Directive,args:[{selector:"[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]",host:q}]}],NgControlStatusGroup.ctorParameters=[{type:l,decorators:[{type:t.Self}]}],NgControlStatusGroup}(G),U=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},H=function(e){function EventEmitter(t){void 0===t&&(t=!1),e.call(this),this.__isAsync=t}return U(EventEmitter,e),EventEmitter.prototype.emit=function(t){e.prototype.next.call(this,t)},EventEmitter.prototype.subscribe=function(t,o,n){var r,i=function(e){return null},a=function(){return null};return t&&"object"==typeof t?(r=this.__isAsync?function(e){setTimeout(function(){return t.next(e)})}:function(e){t.next(e)},t.error&&(i=this.__isAsync?function(e){setTimeout(function(){return t.error(e)})}:function(e){t.error(e)}),t.complete&&(a=this.__isAsync?function(){setTimeout(function(){return t.complete()})}:function(){t.complete()})):(r=this.__isAsync?function(e){setTimeout(function(){return t(e)})}:function(e){t(e)},o&&(i=this.__isAsync?function(e){setTimeout(function(){return o(e)})}:function(e){o(e)}),n&&(a=this.__isAsync?function(){setTimeout(function(){return n()})}:function(){n()})),e.prototype.subscribe.call(this,r,i,a)},EventEmitter}(n.Subject),$=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},W="VALID",z="INVALID",J="PENDING",K="DISABLED",Q=function(){function AbstractControl(e,t){this.validator=e,this.asyncValidator=t,this._onCollectionChange=function(){},this._pristine=!0,this._touched=!1,this._onDisabledChange=[]}return Object.defineProperty(AbstractControl.prototype,"value",{get:function(){return this._value},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"status",{get:function(){return this._status},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"valid",{get:function(){return this._status===W},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"invalid",{get:function(){return this._status===z},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"pending",{get:function(){return this._status==J},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"disabled",{get:function(){return this._status===K},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"enabled",{get:function(){return this._status!==K},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"errors",{get:function(){return this._errors},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"pristine",{get:function(){return this._pristine},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"dirty",{get:function(){return!this.pristine},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"touched",{get:function(){return this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"untouched",{get:function(){return!this._touched},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"valueChanges",{get:function(){return this._valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(AbstractControl.prototype,"statusChanges",{get:function(){return this._statusChanges},enumerable:!0,configurable:!0}),AbstractControl.prototype.setValidators=function(e){this.validator=coerceToValidator(e)},AbstractControl.prototype.setAsyncValidators=function(e){this.asyncValidator=coerceToAsyncValidator(e)},AbstractControl.prototype.clearValidators=function(){this.validator=null},AbstractControl.prototype.clearAsyncValidators=function(){this.asyncValidator=null},AbstractControl.prototype.markAsTouched=function(e){var t=(void 0===e?{}:e).onlySelf;this._touched=!0,this._parent&&!t&&this._parent.markAsTouched({onlySelf:t})},AbstractControl.prototype.markAsUntouched=function(e){var t=(void 0===e?{}:e).onlySelf;this._touched=!1,this._forEachChild(function(e){e.markAsUntouched({onlySelf:!0})}),this._parent&&!t&&this._parent._updateTouched({onlySelf:t})},AbstractControl.prototype.markAsDirty=function(e){var t=(void 0===e?{}:e).onlySelf;this._pristine=!1,this._parent&&!t&&this._parent.markAsDirty({onlySelf:t})},AbstractControl.prototype.markAsPristine=function(e){var t=(void 0===e?{}:e).onlySelf;this._pristine=!0,this._forEachChild(function(e){e.markAsPristine({onlySelf:!0})}),this._parent&&!t&&this._parent._updatePristine({onlySelf:t})},AbstractControl.prototype.markAsPending=function(e){var t=(void 0===e?{}:e).onlySelf;this._status=J,this._parent&&!t&&this._parent.markAsPending({onlySelf:t})},AbstractControl.prototype.disable=function(e){var t=void 0===e?{}:e,o=t.onlySelf,n=t.emitEvent;this._status=K,this._errors=null,this._forEachChild(function(e){e.disable({onlySelf:!0})}),this._updateValue(),n!==!1&&(this._valueChanges.emit(this._value),this._statusChanges.emit(this._status)),this._updateAncestors(o),this._onDisabledChange.forEach(function(e){return e(!0)})},AbstractControl.prototype.enable=function(e){
var t=void 0===e?{}:e,o=t.onlySelf,n=t.emitEvent;this._status=W,this._forEachChild(function(e){e.enable({onlySelf:!0})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:n}),this._updateAncestors(o),this._onDisabledChange.forEach(function(e){return e(!1)})},AbstractControl.prototype._updateAncestors=function(e){this._parent&&!e&&(this._parent.updateValueAndValidity(),this._parent._updatePristine(),this._parent._updateTouched())},AbstractControl.prototype.setParent=function(e){this._parent=e},AbstractControl.prototype.updateValueAndValidity=function(e){var t=void 0===e?{}:e,o=t.onlySelf,n=t.emitEvent;this._setInitialStatus(),this._updateValue(),this.enabled&&(this._errors=this._runValidator(),this._status=this._calculateStatus(),this._status!==W&&this._status!==J||this._runAsyncValidator(n)),n!==!1&&(this._valueChanges.emit(this._value),this._statusChanges.emit(this._status)),this._parent&&!o&&this._parent.updateValueAndValidity({onlySelf:o,emitEvent:n})},AbstractControl.prototype._updateTreeValidity=function(e){var t=(void 0===e?{emitEvent:!0}:e).emitEvent;this._forEachChild(function(e){return e._updateTreeValidity({emitEvent:t})}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t})},AbstractControl.prototype._setInitialStatus=function(){this._status=this._allControlsDisabled()?K:W},AbstractControl.prototype._runValidator=function(){return this.validator?this.validator(this):null},AbstractControl.prototype._runAsyncValidator=function(e){var t=this;if(this.asyncValidator){this._status=J,this._cancelExistingSubscription();var o=toObservable(this.asyncValidator(this));this._asyncValidationSubscription=o.subscribe({next:function(o){return t.setErrors(o,{emitEvent:e})}})}},AbstractControl.prototype._cancelExistingSubscription=function(){this._asyncValidationSubscription&&this._asyncValidationSubscription.unsubscribe()},AbstractControl.prototype.setErrors=function(e,t){var o=(void 0===t?{}:t).emitEvent;this._errors=e,this._updateControlsErrors(o!==!1)},AbstractControl.prototype.get=function(e){return _find(this,e,".")},AbstractControl.prototype.getError=function(e,t){void 0===t&&(t=null);var o=t?this.get(t):this;return o&&o._errors?o._errors[e]:null},AbstractControl.prototype.hasError=function(e,t){return void 0===t&&(t=null),!!this.getError(e,t)},Object.defineProperty(AbstractControl.prototype,"root",{get:function(){for(var e=this;e._parent;)e=e._parent;return e},enumerable:!0,configurable:!0}),AbstractControl.prototype._updateControlsErrors=function(e){this._status=this._calculateStatus(),e&&this._statusChanges.emit(this._status),this._parent&&this._parent._updateControlsErrors(e)},AbstractControl.prototype._initObservables=function(){this._valueChanges=new H,this._statusChanges=new H},AbstractControl.prototype._calculateStatus=function(){return this._allControlsDisabled()?K:this._errors?z:this._anyControlsHaveStatus(J)?J:this._anyControlsHaveStatus(z)?z:W},AbstractControl.prototype._anyControlsHaveStatus=function(e){return this._anyControls(function(t){return t.status===e})},AbstractControl.prototype._anyControlsDirty=function(){return this._anyControls(function(e){return e.dirty})},AbstractControl.prototype._anyControlsTouched=function(){return this._anyControls(function(e){return e.touched})},AbstractControl.prototype._updatePristine=function(e){var t=(void 0===e?{}:e).onlySelf;this._pristine=!this._anyControlsDirty(),this._parent&&!t&&this._parent._updatePristine({onlySelf:t})},AbstractControl.prototype._updateTouched=function(e){var t=(void 0===e?{}:e).onlySelf;this._touched=this._anyControlsTouched(),this._parent&&!t&&this._parent._updateTouched({onlySelf:t})},AbstractControl.prototype._isBoxedValue=function(e){return"object"==typeof e&&null!==e&&2===Object.keys(e).length&&"value"in e&&"disabled"in e},AbstractControl.prototype._registerOnCollectionChange=function(e){this._onCollectionChange=e},AbstractControl}(),Y=function(e){function FormControl(t,o,n){void 0===t&&(t=null),void 0===o&&(o=null),void 0===n&&(n=null),e.call(this,coerceToValidator(o),coerceToAsyncValidator(n)),this._onChange=[],this._applyFormState(t),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1}),this._initObservables()}return $(FormControl,e),FormControl.prototype.setValue=function(e,t){var o=this,n=void 0===t?{}:t,r=n.onlySelf,i=n.emitEvent,a=n.emitModelToViewChange,s=n.emitViewToModelChange;this._value=e,this._onChange.length&&a!==!1&&this._onChange.forEach(function(e){return e(o._value,s!==!1)}),this.updateValueAndValidity({onlySelf:r,emitEvent:i})},FormControl.prototype.patchValue=function(e,t){void 0===t&&(t={}),this.setValue(e,t)},FormControl.prototype.reset=function(e,t){void 0===e&&(e=null);var o=(void 0===t?{}:t).onlySelf;this._applyFormState(e),this.markAsPristine({onlySelf:o}),this.markAsUntouched({onlySelf:o}),this.setValue(this._value,{onlySelf:o})},FormControl.prototype._updateValue=function(){},FormControl.prototype._anyControls=function(e){return!1},FormControl.prototype._allControlsDisabled=function(){return this.disabled},FormControl.prototype.registerOnChange=function(e){this._onChange.push(e)},FormControl.prototype._clearChangeFns=function(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=function(){}},FormControl.prototype.registerOnDisabledChange=function(e){this._onDisabledChange.push(e)},FormControl.prototype._forEachChild=function(e){},FormControl.prototype._applyFormState=function(e){this._isBoxedValue(e)?(this._value=e.value,e.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this._value=e},FormControl}(Q),X=function(e){function FormGroup(t,o,n){void 0===o&&(o=null),void 0===n&&(n=null),e.call(this,o,n),this.controls=t,this._initObservables(),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return $(FormGroup,e),FormGroup.prototype.registerControl=function(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)},FormGroup.prototype.addControl=function(e,t){this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()},FormGroup.prototype.removeControl=function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],this.updateValueAndValidity(),this._onCollectionChange()},FormGroup.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity(),this._onCollectionChange()},FormGroup.prototype.contains=function(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled},FormGroup.prototype.setValue=function(e,t){var o=this,n=(void 0===t?{}:t).onlySelf;this._checkAllValuesPresent(e),Object.keys(e).forEach(function(t){o._throwIfControlMissing(t),o.controls[t].setValue(e[t],{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormGroup.prototype.patchValue=function(e,t){var o=this,n=(void 0===t?{}:t).onlySelf;Object.keys(e).forEach(function(t){o.controls[t]&&o.controls[t].patchValue(e[t],{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormGroup.prototype.reset=function(e,t){void 0===e&&(e={});var o=(void 0===t?{}:t).onlySelf;this._forEachChild(function(t,o){t.reset(e[o],{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:o}),this._updatePristine({onlySelf:o}),this._updateTouched({onlySelf:o})},FormGroup.prototype.getRawValue=function(){return this._reduceChildren({},function(e,t,o){return e[o]=t.value,e})},FormGroup.prototype._throwIfControlMissing=function(e){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[e])throw new Error("Cannot find form control with name: "+e+".")},FormGroup.prototype._forEachChild=function(e){var t=this;Object.keys(this.controls).forEach(function(o){return e(t.controls[o],o)})},FormGroup.prototype._setUpControls=function(){var e=this;this._forEachChild(function(t){t.setParent(e),t._registerOnCollectionChange(e._onCollectionChange)})},FormGroup.prototype._updateValue=function(){this._value=this._reduceValue()},FormGroup.prototype._anyControls=function(e){var t=this,o=!1;return this._forEachChild(function(n,r){o=o||t.contains(r)&&e(n)}),o},FormGroup.prototype._reduceValue=function(){var e=this;return this._reduceChildren({},function(t,o,n){return(o.enabled||e.disabled)&&(t[n]=o.value),t})},FormGroup.prototype._reduceChildren=function(e,t){var o=e;return this._forEachChild(function(e,n){o=t(o,e,n)}),o},FormGroup.prototype._allControlsDisabled=function(){for(var e=0,t=Object.keys(this.controls);e<t.length;e++){var o=t[e];if(this.controls[o].enabled)return!1}return Object.keys(this.controls).length>0||this.disabled},FormGroup.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,o){if(void 0===e[o])throw new Error("Must supply a value for form control with name: '"+o+"'.")})},FormGroup}(Q),Z=function(e){function FormArray(t,o,n){void 0===o&&(o=null),void 0===n&&(n=null),e.call(this,o,n),this.controls=t,this._initObservables(),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!1})}return $(FormArray,e),FormArray.prototype.at=function(e){return this.controls[e]},FormArray.prototype.push=function(e){this.controls.push(e),this._registerControl(e),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.insert=function(e,t){this.controls.splice(e,0,t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.removeAt=function(e){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),this.updateValueAndValidity(),this._onCollectionChange()},FormArray.prototype.setControl=function(e,t){this.controls[e]&&this.controls[e]._registerOnCollectionChange(function(){}),this.controls.splice(e,1),t&&(this.controls.splice(e,0,t),this._registerControl(t)),this.updateValueAndValidity(),this._onCollectionChange()},Object.defineProperty(FormArray.prototype,"length",{get:function(){return this.controls.length},enumerable:!0,configurable:!0}),FormArray.prototype.setValue=function(e,t){var o=this,n=(void 0===t?{}:t).onlySelf;this._checkAllValuesPresent(e),e.forEach(function(e,t){o._throwIfControlMissing(t),o.at(t).setValue(e,{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormArray.prototype.patchValue=function(e,t){var o=this,n=(void 0===t?{}:t).onlySelf;e.forEach(function(e,t){o.at(t)&&o.at(t).patchValue(e,{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:n})},FormArray.prototype.reset=function(e,t){void 0===e&&(e=[]);var o=(void 0===t?{}:t).onlySelf;this._forEachChild(function(t,o){t.reset(e[o],{onlySelf:!0})}),this.updateValueAndValidity({onlySelf:o}),this._updatePristine({onlySelf:o}),this._updateTouched({onlySelf:o})},FormArray.prototype.getRawValue=function(){return this.controls.map(function(e){return e.value})},FormArray.prototype._throwIfControlMissing=function(e){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(e))throw new Error("Cannot find form control at index "+e)},FormArray.prototype._forEachChild=function(e){this.controls.forEach(function(t,o){e(t,o)})},FormArray.prototype._updateValue=function(){var e=this;this._value=this.controls.filter(function(t){return t.enabled||e.disabled}).map(function(e){return e.value})},FormArray.prototype._anyControls=function(e){return this.controls.some(function(t){return t.enabled&&e(t)})},FormArray.prototype._setUpControls=function(){var e=this;this._forEachChild(function(t){return e._registerControl(t)})},FormArray.prototype._checkAllValuesPresent=function(e){this._forEachChild(function(t,o){if(void 0===e[o])throw new Error("Must supply a value for form control at index: "+o+".")})},FormArray.prototype._allControlsDisabled=function(){for(var e=0,t=this.controls;e<t.length;e++){var o=t[e];if(o.enabled)return!1}return this.controls.length>0||this.disabled},FormArray.prototype._registerControl=function(e){e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)},FormArray}(Q),ee=this&&this.__extends||function(e,t){function __(){this.constructor=e}for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o]);e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)},te={provide:l,useExisting:t.forwardRef(function(){return ne})},oe=Promise.resolve(null),ne=function(e){function NgForm(t,o){e.call(this),this._submitted=!1,this.ngSubmit=new H,this.form=new X({},composeValidators(t),composeAsyncValidators(o))}return ee(NgForm,e),Object.defineProperty(NgForm.prototype,"submitted",{get:function(){return this._submitted},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"formDirective",{get:function(){return this},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"control",{get:function(){return this.form},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"path",{get:function(){return[]},enumerable:!0,configurable:!0}),Object.defineProperty(NgForm.prototype,"controls",{get:function(){return this.form.controls},enumerable:!0,configurable:!0}),NgForm.prototype.addControl=function(e){var t=this;oe.then(function(){var o=t._findContainer(e.path);e._control=o.registerControl(e.name,e.control),setUpControl(e.control,e),e.control.updateValueAndValidity({emitEvent:!1