blob: 85b24b7bcb9b4409a08467acaa5e5cd94b010811 [file] [log] [blame]
/**
* @license
* Copyright Google LLC 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(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@angular/core"),require("@angular/platform-browser/animations"),require("@angular/cdk/portal"),require("@angular/material/core"),require("rxjs"),require("@angular/animations"),require("@angular/cdk/bidi"),require("rxjs/operators"),require("@angular/cdk/coercion"),require("@angular/cdk/scrolling"),require("@angular/cdk/a11y"),require("@angular/cdk/keycodes"),require("@angular/cdk/platform"),require("@angular/cdk/observers"),require("@angular/common")):"function"==typeof define&&define.amd?define("@angular/material/tabs",["exports","@angular/core","@angular/platform-browser/animations","@angular/cdk/portal","@angular/material/core","rxjs","@angular/animations","@angular/cdk/bidi","rxjs/operators","@angular/cdk/coercion","@angular/cdk/scrolling","@angular/cdk/a11y","@angular/cdk/keycodes","@angular/cdk/platform","@angular/cdk/observers","@angular/common"],e):e((t.ng=t.ng||{},t.ng.material=t.ng.material||{},t.ng.material.tabs={}),t.ng.core,t.ng.platformBrowser.animations,t.ng.cdk.portal,t.ng.material.core,t.rxjs,t.ng.animations,t.ng.cdk.bidi,t.rxjs.operators,t.ng.cdk.coercion,t.ng.cdk.scrolling,t.ng.cdk.a11y,t.ng.cdk.keycodes,t.ng.cdk.platform,t.ng.cdk.observers,t.ng.common)}(this,function(t,e,a,n,i,o,r,s,l,c,p,d,b,h,u,m){"use strict";function g(t,e){function a(){this.constructor=t}_(t,e),t.prototype=null===e?Object.create(e):(a.prototype=e.prototype,new a)}function f(){return function(t){return{left:t?(t.offsetLeft||0)+"px":"0",width:t?(t.offsetWidth||0)+"px":"0"}}}var _=function(t,e){return(_=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a])})(t,e)},y=new e.InjectionToken("MatInkBarPositioner",{providedIn:"root",factory:f}),v=function(){function t(t,e,a,n){this._elementRef=t,this._ngZone=e,this._inkBarPositioner=a,this._animationMode=n}return t.prototype.alignToElement=function(t){var e=this;this.show(),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(function(){requestAnimationFrame(function(){return e._setStyles(t)})}):this._setStyles(t)},t.prototype.show=function(){this._elementRef.nativeElement.style.visibility="visible"},t.prototype.hide=function(){this._elementRef.nativeElement.style.visibility="hidden"},t.prototype._setStyles=function(t){var e=this._inkBarPositioner(t),a=this._elementRef.nativeElement;a.style.left=e.left,a.style.width=e.width},t.decorators=[{type:e.Directive,args:[{selector:"mat-ink-bar",host:{class:"mat-ink-bar","[class._mat-animation-noopable]":"_animationMode === 'NoopAnimations'"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.NgZone},{type:void 0,decorators:[{type:e.Inject,args:[y]}]},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[a.ANIMATION_MODULE_TYPE]}]}]},t}(),x=function(){function t(t){this.template=t}return t.decorators=[{type:e.Directive,args:[{selector:"[matTabContent]"}]}],t.ctorParameters=function(){return[{type:e.TemplateRef}]},t}(),C=function(t){function a(){return null!==t&&t.apply(this,arguments)||this}return g(a,t),a.decorators=[{type:e.Directive,args:[{selector:"[mat-tab-label], [matTabLabel]"}]}],a}(n.CdkPortal),k=function(){function t(){}return t}(),I=i.mixinDisabled(k),w=function(t){function a(e){var a=t.call(this)||this;return a._viewContainerRef=e,a.textLabel="",a._contentPortal=null,a._stateChanges=new o.Subject,a.position=null,a.origin=null,a.isActive=!1,a}return g(a,t),Object.defineProperty(a.prototype,"content",{get:function(){return this._contentPortal},enumerable:!0,configurable:!0}),a.prototype.ngOnChanges=function(t){(t.hasOwnProperty("textLabel")||t.hasOwnProperty("disabled"))&&this._stateChanges.next()},a.prototype.ngOnDestroy=function(){this._stateChanges.complete()},a.prototype.ngOnInit=function(){this._contentPortal=new n.TemplatePortal(this._explicitContent||this._implicitContent,this._viewContainerRef)},a.decorators=[{type:e.Component,args:[{selector:"mat-tab",template:"<ng-template><ng-content></ng-content></ng-template>",inputs:["disabled"],changeDetection:e.ChangeDetectionStrategy.OnPush,encapsulation:e.ViewEncapsulation.None,exportAs:"matTab"}]}],a.ctorParameters=function(){return[{type:e.ViewContainerRef}]},a.propDecorators={templateLabel:[{type:e.ContentChild,args:[C,{static:!1}]}],_explicitContent:[{type:e.ContentChild,args:[x,{read:e.TemplateRef,static:!0}]}],_implicitContent:[{type:e.ViewChild,args:[e.TemplateRef,{static:!0}]}],textLabel:[{type:e.Input,args:["label"]}],ariaLabel:[{type:e.Input,args:["aria-label"]}],ariaLabelledby:[{type:e.Input,args:["aria-labelledby"]}]},a}(I),P={translateTab:r.trigger("translateTab",[r.state("center, void, left-origin-center, right-origin-center",r.style({transform:"none"})),r.state("left",r.style({transform:"translate3d(-100%, 0, 0)",minHeight:"1px"})),r.state("right",r.style({transform:"translate3d(100%, 0, 0)",minHeight:"1px"})),r.transition("* => left, * => right, left => center, right => center",r.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")),r.transition("void => left-origin-center",[r.style({transform:"translate3d(-100%, 0, 0)"}),r.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")]),r.transition("void => right-origin-center",[r.style({transform:"translate3d(100%, 0, 0)"}),r.animate("{{animationDuration}} cubic-bezier(0.35, 0, 0.25, 1)")])])},T=function(t){function a(e,a,n){var i=t.call(this,e,a)||this;return i._host=n,i._centeringSub=o.Subscription.EMPTY,i._leavingSub=o.Subscription.EMPTY,i}return g(a,t),a.prototype.ngOnInit=function(){var e=this;t.prototype.ngOnInit.call(this),this._centeringSub=this._host._beforeCentering.pipe(l.startWith(this._host._isCenterPosition(this._host._position))).subscribe(function(t){t&&!e.hasAttached()&&e.attach(e._host._content)}),this._leavingSub=this._host._afterLeavingCenter.subscribe(function(){e.detach()})},a.prototype.ngOnDestroy=function(){t.prototype.ngOnDestroy.call(this),this._centeringSub.unsubscribe(),this._leavingSub.unsubscribe()},a.decorators=[{type:e.Directive,args:[{selector:"[matTabBodyHost]"}]}],a.ctorParameters=function(){return[{type:e.ComponentFactoryResolver},{type:e.ViewContainerRef},{type:D,decorators:[{type:e.Inject,args:[e.forwardRef(function(){return D})]}]}]},a}(n.CdkPortalOutlet),D=function(){function t(t,a,n){var i=this;this._elementRef=t,this._dir=a,this._dirChangeSubscription=o.Subscription.EMPTY,this._translateTabComplete=new o.Subject,this._onCentering=new e.EventEmitter,this._beforeCentering=new e.EventEmitter,this._afterLeavingCenter=new e.EventEmitter,this._onCentered=new e.EventEmitter(!0),this.animationDuration="500ms",a&&(this._dirChangeSubscription=a.change.subscribe(function(t){i._computePositionAnimationState(t),n.markForCheck()})),this._translateTabComplete.pipe(l.distinctUntilChanged(function(t,e){return t.fromState===e.fromState&&t.toState===e.toState})).subscribe(function(t){i._isCenterPosition(t.toState)&&i._isCenterPosition(i._position)&&i._onCentered.emit(),i._isCenterPosition(t.fromState)&&!i._isCenterPosition(i._position)&&i._afterLeavingCenter.emit()})}return Object.defineProperty(t.prototype,"position",{set:function(t){this._positionIndex=t,this._computePositionAnimationState()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){"center"==this._position&&null!=this.origin&&(this._position=this._computePositionFromOrigin())},t.prototype.ngOnDestroy=function(){this._dirChangeSubscription.unsubscribe(),this._translateTabComplete.complete()},t.prototype._onTranslateTabStarted=function(t){var e=this._isCenterPosition(t.toState);this._beforeCentering.emit(e),e&&this._onCentering.emit(this._elementRef.nativeElement.clientHeight)},t.prototype._getLayoutDirection=function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},t.prototype._isCenterPosition=function(t){return"center"==t||"left-origin-center"==t||"right-origin-center"==t},t.prototype._computePositionAnimationState=function(t){void 0===t&&(t=this._getLayoutDirection()),this._positionIndex<0?this._position="ltr"==t?"left":"right":this._positionIndex>0?this._position="ltr"==t?"right":"left":this._position="center"},t.prototype._computePositionFromOrigin=function(){var t=this._getLayoutDirection();return"ltr"==t&&this.origin<=0||"rtl"==t&&this.origin>0?"left-origin-center":"right-origin-center"},t.decorators=[{type:e.Component,args:[{selector:"mat-tab-body",template:'<div class="mat-tab-body-content" #content [@translateTab]="{ value: _position, params: {animationDuration: animationDuration} }" (@translateTab.start)="_onTranslateTabStarted($event)" (@translateTab.done)="_translateTabComplete.next($event)"><ng-template matTabBodyHost></ng-template></div>',styles:[".mat-tab-body-content{height:100%;overflow:auto}.mat-tab-group-dynamic-height .mat-tab-body-content{overflow:hidden}"],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,animations:[P.translateTab],host:{class:"mat-tab-body"}}]}],t.ctorParameters=function(){return[{type:e.ElementRef},{type:s.Directionality,decorators:[{type:e.Optional}]},{type:e.ChangeDetectorRef}]},t.propDecorators={_onCentering:[{type:e.Output}],_beforeCentering:[{type:e.Output}],_afterLeavingCenter:[{type:e.Output}],_onCentered:[{type:e.Output}],_portalHost:[{type:e.ViewChild,args:[n.PortalHostDirective,{static:!1}]}],_content:[{type:e.Input,args:["content"]}],origin:[{type:e.Input}],animationDuration:[{type:e.Input}],position:[{type:e.Input}]},t}(),E=function(){function t(){}return t}(),R=i.mixinDisabled(E),S=function(t){function a(e){var a=t.call(this)||this;return a.elementRef=e,a}return g(a,t),a.prototype.focus=function(){this.elementRef.nativeElement.focus()},a.prototype.getOffsetLeft=function(){return this.elementRef.nativeElement.offsetLeft},a.prototype.getOffsetWidth=function(){return this.elementRef.nativeElement.offsetWidth},a.decorators=[{type:e.Directive,args:[{selector:"[matTabLabelWrapper]",inputs:["disabled"],host:{"[class.mat-tab-disabled]":"disabled","[attr.aria-disabled]":"!!disabled"}}]}],a.ctorParameters=function(){return[{type:e.ElementRef}]},a}(R),L=h.normalizePassiveListenerOptions({passive:!0}),O=function(){function t(t,a,n,i,r,s,c){var p=this;this._elementRef=t,this._changeDetectorRef=a,this._viewportRuler=n,this._dir=i,this._ngZone=r,this._platform=s,this._animationMode=c,this._scrollDistance=0,this._selectedIndexChanged=!1,this._destroyed=new o.Subject,this._showPaginationControls=!1,this._disableScrollAfter=!0,this._disableScrollBefore=!0,this._stopScrolling=new o.Subject,this._selectedIndex=0,this.selectFocusedIndex=new e.EventEmitter,this.indexFocused=new e.EventEmitter,r.runOutsideAngular(function(){o.fromEvent(t.nativeElement,"mouseleave").pipe(l.takeUntil(p._destroyed)).subscribe(function(){p._stopInterval()})})}return Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(t){t=c.coerceNumberProperty(t),this._selectedIndex!=t&&(this._selectedIndexChanged=!0,this._selectedIndex=t,this._keyManager&&this._keyManager.updateActiveItemIndex(t))},enumerable:!0,configurable:!0}),t.prototype.ngAfterViewInit=function(){var t=this;o.fromEvent(this._previousPaginator.nativeElement,"touchstart",L).pipe(l.takeUntil(this._destroyed)).subscribe(function(){t._handlePaginatorPress("before")}),o.fromEvent(this._nextPaginator.nativeElement,"touchstart",L).pipe(l.takeUntil(this._destroyed)).subscribe(function(){t._handlePaginatorPress("after")})},t.prototype.ngAfterContentInit=function(){var t=this,e=this._dir?this._dir.change:o.of(null),a=this._viewportRuler.change(150),n=function(){t.updatePagination(),t._alignInkBarToSelectedTab()};this._keyManager=new d.FocusKeyManager(this._items).withHorizontalOrientation(this._getLayoutDirection()).withWrap(),this._keyManager.updateActiveItem(0),"undefined"!=typeof requestAnimationFrame?requestAnimationFrame(n):n(),o.merge(e,a,this._items.changes).pipe(l.takeUntil(this._destroyed)).subscribe(function(){n(),t._keyManager.withHorizontalOrientation(t._getLayoutDirection())}),this._keyManager.change.pipe(l.takeUntil(this._destroyed)).subscribe(function(e){t.indexFocused.emit(e),t._setTabFocus(e)})},t.prototype.ngAfterContentChecked=function(){this._tabLabelCount!=this._items.length&&(this.updatePagination(),this._tabLabelCount=this._items.length,this._changeDetectorRef.markForCheck()),this._selectedIndexChanged&&(this._scrollToLabel(this._selectedIndex),this._checkScrollingControls(),this._alignInkBarToSelectedTab(),this._selectedIndexChanged=!1,this._changeDetectorRef.markForCheck()),this._scrollDistanceChanged&&(this._updateTabScrollPosition(),this._scrollDistanceChanged=!1,this._changeDetectorRef.markForCheck())},t.prototype.ngOnDestroy=function(){this._destroyed.next(),this._destroyed.complete(),this._stopScrolling.complete()},t.prototype._handleKeydown=function(t){if(!b.hasModifierKey(t))switch(t.keyCode){case b.HOME:this._keyManager.setFirstItemActive(),t.preventDefault();break;case b.END:this._keyManager.setLastItemActive(),t.preventDefault();break;case b.ENTER:case b.SPACE:this.selectFocusedIndex.emit(this.focusIndex),this._itemSelected(t);break;default:this._keyManager.onKeydown(t)}},t.prototype._onContentChanges=function(){var t=this,e=this._elementRef.nativeElement.textContent;e!==this._currentTextContent&&(this._currentTextContent=e||"",this._ngZone.run(function(){t.updatePagination(),t._alignInkBarToSelectedTab(),t._changeDetectorRef.markForCheck()}))},t.prototype.updatePagination=function(){this._checkPaginationEnabled(),this._checkScrollingControls(),this._updateTabScrollPosition()},Object.defineProperty(t.prototype,"focusIndex",{get:function(){return this._keyManager?this._keyManager.activeItemIndex:0},set:function(t){this._isValidIndex(t)&&this.focusIndex!==t&&this._keyManager&&this._keyManager.setActiveItem(t)},enumerable:!0,configurable:!0}),t.prototype._isValidIndex=function(t){if(!this._items)return!0;var e=this._items?this._items.toArray()[t]:null;return!!e&&!e.disabled},t.prototype._setTabFocus=function(t){if(this._showPaginationControls&&this._scrollToLabel(t),this._items&&this._items.length){this._items.toArray()[t].focus();var e=this._tabListContainer.nativeElement,a=this._getLayoutDirection();e.scrollLeft="ltr"==a?0:e.scrollWidth-e.offsetWidth}},t.prototype._getLayoutDirection=function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},t.prototype._updateTabScrollPosition=function(){var t=this.scrollDistance,e=this._platform,a="ltr"===this._getLayoutDirection()?-t:t;this._tabList.nativeElement.style.transform="translateX("+Math.round(a)+"px)",e&&(e.TRIDENT||e.EDGE)&&(this._tabListContainer.nativeElement.scrollLeft=0)},Object.defineProperty(t.prototype,"scrollDistance",{get:function(){return this._scrollDistance},set:function(t){this._scrollTo(t)},enumerable:!0,configurable:!0}),t.prototype._scrollHeader=function(t){var e=this._tabListContainer.nativeElement.offsetWidth,a=("before"==t?-1:1)*e/3;return this._scrollTo(this._scrollDistance+a)},t.prototype._handlePaginatorClick=function(t){this._stopInterval(),this._scrollHeader(t)},t.prototype._scrollToLabel=function(t){var e=this._items?this._items.toArray()[t]:null;if(e){var a,n,i=this._tabListContainer.nativeElement.offsetWidth,o=e.elementRef.nativeElement,r=o.offsetLeft,s=o.offsetWidth;"ltr"==this._getLayoutDirection()?(a=r,n=a+s):(n=this._tabList.nativeElement.offsetWidth-r,a=n-s);var l=this.scrollDistance,c=this.scrollDistance+i;a<l?this.scrollDistance-=l-a+60:n>c&&(this.scrollDistance+=n-c+60)}},t.prototype._checkPaginationEnabled=function(){var t=this._tabList.nativeElement.scrollWidth>this._elementRef.nativeElement.offsetWidth;t||(this.scrollDistance=0),t!==this._showPaginationControls&&this._changeDetectorRef.markForCheck(),this._showPaginationControls=t},t.prototype._checkScrollingControls=function(){this._disableScrollBefore=0==this.scrollDistance,this._disableScrollAfter=this.scrollDistance==this._getMaxScrollDistance(),this._changeDetectorRef.markForCheck()},t.prototype._getMaxScrollDistance=function(){return this._tabList.nativeElement.scrollWidth-this._tabListContainer.nativeElement.offsetWidth||0},t.prototype._alignInkBarToSelectedTab=function(){var t=this._items&&this._items.length?this._items.toArray()[this.selectedIndex]:null,e=t?t.elementRef.nativeElement:null;e?this._inkBar.alignToElement(e):this._inkBar.hide()},t.prototype._stopInterval=function(){this._stopScrolling.next()},t.prototype._handlePaginatorPress=function(t){var e=this;this._stopInterval(),o.timer(650,100).pipe(l.takeUntil(o.merge(this._stopScrolling,this._destroyed))).subscribe(function(){var a=e._scrollHeader(t),n=a.maxScrollDistance,i=a.distance;(0===i||i>=n)&&e._stopInterval()})},t.prototype._scrollTo=function(t){var e=this._getMaxScrollDistance();return this._scrollDistance=Math.max(0,Math.min(e,t)),this._scrollDistanceChanged=!0,this._checkScrollingControls(),{maxScrollDistance:e,distance:this._scrollDistance}},t.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:p.ViewportRuler},{type:s.Directionality,decorators:[{type:e.Optional}]},{type:e.NgZone},{type:h.Platform},{type:String}]},t}(),M=function(t){function n(e,a,n,i,o,r,s){var l=t.call(this,e,a,n,i,o,r,s)||this;return l._disableRipple=!1,l}return g(n,t),Object.defineProperty(n.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(t){this._disableRipple=c.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),n.prototype._itemSelected=function(t){t.preventDefault()},n.decorators=[{type:e.Component,args:[{selector:"mat-tab-header",template:'<div class="mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4" #previousPaginator aria-hidden="true" mat-ripple [matRippleDisabled]="_disableScrollBefore || disableRipple" [class.mat-tab-header-pagination-disabled]="_disableScrollBefore" (click)="_handlePaginatorClick(\'before\')" (mousedown)="_handlePaginatorPress(\'before\')" (touchend)="_stopInterval()"><div class="mat-tab-header-pagination-chevron"></div></div><div class="mat-tab-label-container" #tabListContainer (keydown)="_handleKeydown($event)"><div #tabList class="mat-tab-list" [class._mat-animation-noopable]="_animationMode === \'NoopAnimations\'" role="tablist" (cdkObserveContent)="_onContentChanges()"><div class="mat-tab-labels"><ng-content></ng-content></div><mat-ink-bar></mat-ink-bar></div></div><div class="mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4" #nextPaginator aria-hidden="true" mat-ripple [matRippleDisabled]="_disableScrollAfter || disableRipple" [class.mat-tab-header-pagination-disabled]="_disableScrollAfter" (mousedown)="_handlePaginatorPress(\'after\')" (click)="_handlePaginatorClick(\'after\')" (touchend)="_stopInterval()"><div class="mat-tab-header-pagination-chevron"></div></div>',styles:[".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-pagination-after,.mat-tab-header-rtl .mat-tab-header-pagination-before{padding-right:4px}.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:'';height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:.5s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}@media (-ms-high-contrast:active){.mat-ink-bar{outline:solid 2px;height:0}}.mat-tab-labels{display:flex}[mat-align-tabs=center] .mat-tab-labels{justify-content:center}[mat-align-tabs=end] .mat-tab-labels{justify-content:flex-end}.mat-tab-label-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}._mat-animation-noopable.mat-tab-list{transition:none;animation:none}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:0}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}@media (-ms-high-contrast:active){.mat-tab-label:focus{outline:dotted 2px}}.mat-tab-label.mat-tab-disabled{cursor:default}@media (-ms-high-contrast:active){.mat-tab-label.mat-tab-disabled{opacity:.5}}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media (-ms-high-contrast:active){.mat-tab-label{opacity:1}}@media (max-width:599px){.mat-tab-label{min-width:72px}}"],inputs:["selectedIndex"],outputs:["selectFocusedIndex","indexFocused"],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,host:{class:"mat-tab-header","[class.mat-tab-header-pagination-controls-enabled]":"_showPaginationControls","[class.mat-tab-header-rtl]":"_getLayoutDirection() == 'rtl'"}}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:p.ViewportRuler},{type:s.Directionality,decorators:[{type:e.Optional}]},{type:e.NgZone},{type:h.Platform},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[a.ANIMATION_MODULE_TYPE]}]}]},n.propDecorators={_items:[{type:e.ContentChildren,args:[S]}],_inkBar:[{type:e.ViewChild,args:[v,{static:!0}]}],_tabListContainer:[{type:e.ViewChild,args:["tabListContainer",{static:!0}]}],_tabList:[{type:e.ViewChild,args:["tabList",{static:!0}]}],_nextPaginator:[{type:e.ViewChild,args:["nextPaginator",{static:!1}]}],_previousPaginator:[{type:e.ViewChild,args:["previousPaginator",{static:!1}]}],disableRipple:[{type:e.Input}]},n}(O),A=0,j=function(){function t(){}return t}(),B=new e.InjectionToken("MAT_TABS_CONFIG"),N=function(){function t(t){this._elementRef=t}return t}(),H=i.mixinColor(i.mixinDisableRipple(N),"primary"),F=function(t){function n(a,n,i,r){var s=t.call(this,a)||this;return s._changeDetectorRef=n,s._animationMode=r,s._indexToSelect=0,s._tabBodyWrapperHeight=0,s._tabsSubscription=o.Subscription.EMPTY,s._tabLabelSubscription=o.Subscription.EMPTY,s._dynamicHeight=!1,s._selectedIndex=null,s.headerPosition="above",s.selectedIndexChange=new e.EventEmitter,s.focusChange=new e.EventEmitter,s.animationDone=new e.EventEmitter,s.selectedTabChange=new e.EventEmitter(!0),s._groupId=A++,s.animationDuration=i&&i.animationDuration?i.animationDuration:"500ms",s}return g(n,t),Object.defineProperty(n.prototype,"dynamicHeight",{get:function(){return this._dynamicHeight},set:function(t){this._dynamicHeight=c.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(t){this._indexToSelect=c.coerceNumberProperty(t,null)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"animationDuration",{get:function(){return this._animationDuration},set:function(t){this._animationDuration=/^\d+$/.test(t)?t+"ms":t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){var e=this._elementRef.nativeElement;e.classList.remove("mat-background-"+this.backgroundColor),t&&e.classList.add("mat-background-"+t),this._backgroundColor=t},enumerable:!0,configurable:!0}),n.prototype.ngAfterContentChecked=function(){var t=this,e=this._indexToSelect=this._clampTabIndex(this._indexToSelect);if(this._selectedIndex!=e){var a=null==this._selectedIndex;a||this.selectedTabChange.emit(this._createChangeEvent(e)),Promise.resolve().then(function(){t._tabs.forEach(function(t,a){return t.isActive=a===e}),a||t.selectedIndexChange.emit(e)})}this._tabs.forEach(function(a,n){a.position=n-e,null==t._selectedIndex||0!=a.position||a.origin||(a.origin=e-t._selectedIndex)}),this._selectedIndex!==e&&(this._selectedIndex=e,this._changeDetectorRef.markForCheck())},n.prototype.ngAfterContentInit=function(){var t=this;this._subscribeToTabLabels(),this._tabsSubscription=this._tabs.changes.subscribe(function(){if(t._clampTabIndex(t._indexToSelect)===t._selectedIndex)for(var e=t._tabs.toArray(),a=0;a<e.length;a++)if(e[a].isActive){t._indexToSelect=t._selectedIndex=a;break}t._subscribeToTabLabels(),t._changeDetectorRef.markForCheck()})},n.prototype.ngOnDestroy=function(){this._tabsSubscription.unsubscribe(),this._tabLabelSubscription.unsubscribe()},n.prototype.realignInkBar=function(){this._tabHeader&&this._tabHeader._alignInkBarToSelectedTab()},n.prototype._focusChanged=function(t){this.focusChange.emit(this._createChangeEvent(t))},n.prototype._createChangeEvent=function(t){var e=new j;return e.index=t,this._tabs&&this._tabs.length&&(e.tab=this._tabs.toArray()[t]),e},n.prototype._subscribeToTabLabels=function(){var t=this;this._tabLabelSubscription&&this._tabLabelSubscription.unsubscribe(),this._tabLabelSubscription=o.merge.apply(void 0,this._tabs.map(function(t){return t._stateChanges})).subscribe(function(){return t._changeDetectorRef.markForCheck()})},n.prototype._clampTabIndex=function(t){return Math.min(this._tabs.length-1,Math.max(t||0,0))},n.prototype._getTabLabelId=function(t){return"mat-tab-label-"+this._groupId+"-"+t},n.prototype._getTabContentId=function(t){return"mat-tab-content-"+this._groupId+"-"+t},n.prototype._setTabBodyWrapperHeight=function(t){if(this._dynamicHeight&&this._tabBodyWrapperHeight){var e=this._tabBodyWrapper.nativeElement;e.style.height=this._tabBodyWrapperHeight+"px",this._tabBodyWrapper.nativeElement.offsetHeight&&(e.style.height=t+"px")}},n.prototype._removeTabBodyWrapperHeight=function(){var t=this._tabBodyWrapper.nativeElement;this._tabBodyWrapperHeight=t.clientHeight,t.style.height="",this.animationDone.emit()},n.prototype._handleClick=function(t,e,a){t.disabled||(this.selectedIndex=e.focusIndex=a)},n.prototype._getTabIndex=function(t,e){return t.disabled?null:this.selectedIndex===e?0:-1},n.decorators=[{type:e.Component,args:[{selector:"mat-tab-group",exportAs:"matTabGroup",template:'<mat-tab-header #tabHeader [selectedIndex]="selectedIndex" [disableRipple]="disableRipple" (indexFocused)="_focusChanged($event)" (selectFocusedIndex)="selectedIndex = $event"><div class="mat-tab-label" role="tab" matTabLabelWrapper mat-ripple cdkMonitorElementFocus *ngFor="let tab of _tabs; let i = index" [id]="_getTabLabelId(i)" [attr.tabIndex]="_getTabIndex(tab, i)" [attr.aria-posinset]="i + 1" [attr.aria-setsize]="_tabs.length" [attr.aria-controls]="_getTabContentId(i)" [attr.aria-selected]="selectedIndex == i" [attr.aria-label]="tab.ariaLabel || null" [attr.aria-labelledby]="(!tab.ariaLabel && tab.ariaLabelledby) ? tab.ariaLabelledby : null" [class.mat-tab-label-active]="selectedIndex == i" [disabled]="tab.disabled" [matRippleDisabled]="tab.disabled || disableRipple" (click)="_handleClick(tab, tabHeader, i)"><div class="mat-tab-label-content"><ng-template [ngIf]="tab.templateLabel"><ng-template [cdkPortalOutlet]="tab.templateLabel"></ng-template></ng-template><ng-template [ngIf]="!tab.templateLabel">{{tab.textLabel}}</ng-template></div></div></mat-tab-header><div class="mat-tab-body-wrapper" [class._mat-animation-noopable]="_animationMode === \'NoopAnimations\'" #tabBodyWrapper><mat-tab-body role="tabpanel" *ngFor="let tab of _tabs; let i = index" [id]="_getTabContentId(i)" [attr.aria-labelledby]="_getTabLabelId(i)" [class.mat-tab-body-active]="selectedIndex == i" [content]="tab.content" [position]="tab.position" [origin]="tab.origin" [animationDuration]="animationDuration" (_onCentered)="_removeTabBodyWrapperHeight()" (_onCentering)="_setTabBodyWrapperHeight($event)"></mat-tab-body></div>',styles:[".mat-tab-group{display:flex;flex-direction:column}.mat-tab-group.mat-tab-group-inverted-header{flex-direction:column-reverse}.mat-tab-label{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;position:relative}.mat-tab-label:focus{outline:0}.mat-tab-label:focus:not(.mat-tab-disabled){opacity:1}@media (-ms-high-contrast:active){.mat-tab-label:focus{outline:dotted 2px}}.mat-tab-label.mat-tab-disabled{cursor:default}@media (-ms-high-contrast:active){.mat-tab-label.mat-tab-disabled{opacity:.5}}.mat-tab-label .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media (-ms-high-contrast:active){.mat-tab-label{opacity:1}}@media (max-width:599px){.mat-tab-label{padding:0 12px}}@media (max-width:959px){.mat-tab-label{padding:0 12px}}.mat-tab-group[mat-stretch-tabs]>.mat-tab-header .mat-tab-label{flex-basis:0;flex-grow:1}.mat-tab-body-wrapper{position:relative;overflow:hidden;display:flex;transition:height .5s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable.mat-tab-body-wrapper{transition:none;animation:none}.mat-tab-body{top:0;left:0;right:0;bottom:0;position:absolute;display:block;overflow:hidden;flex-basis:100%}.mat-tab-body.mat-tab-body-active{position:relative;overflow-x:hidden;overflow-y:auto;z-index:1;flex-grow:1}.mat-tab-group.mat-tab-group-dynamic-height .mat-tab-body.mat-tab-body-active{overflow-y:hidden}"],encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush,inputs:["color","disableRipple"],host:{class:"mat-tab-group","[class.mat-tab-group-dynamic-height]":"dynamicHeight","[class.mat-tab-group-inverted-header]":'headerPosition === "below"'}}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:e.ChangeDetectorRef},{type:void 0,decorators:[{type:e.Inject,args:[B]},{type:e.Optional}]},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[a.ANIMATION_MODULE_TYPE]}]}]},n.propDecorators={_tabs:[{type:e.ContentChildren,args:[w]}],_tabBodyWrapper:[{type:e.ViewChild,args:["tabBodyWrapper",{static:!1}]}],_tabHeader:[{type:e.ViewChild,args:["tabHeader",{static:!1}]}],dynamicHeight:[{type:e.Input}],selectedIndex:[{type:e.Input}],headerPosition:[{type:e.Input}],animationDuration:[{type:e.Input}],backgroundColor:[{type:e.Input}],selectedIndexChange:[{type:e.Output}],focusChange:[{type:e.Output}],animationDone:[{type:e.Output}],selectedTabChange:[{type:e.Output}]},n}(H),W=function(t){function n(e,a,n,i,o,r,s){var l=t.call(this,e,i,o,a,n,r,s)||this;return l._disableRipple=!1,l.color="primary",l}return g(n,t),Object.defineProperty(n.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){var e=this._elementRef.nativeElement.classList;e.remove("mat-background-"+this.backgroundColor),t&&e.add("mat-background-"+t),this._backgroundColor=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"disableRipple",{get:function(){return this._disableRipple},set:function(t){this._disableRipple=c.coerceBooleanProperty(t)},enumerable:!0,configurable:!0}),n.prototype._itemSelected=function(){},n.prototype.ngAfterContentInit=function(){this.updateActiveLink(),t.prototype.ngAfterContentInit.call(this)},n.prototype.updateActiveLink=function(t){if(this._items){
for(var e=this._items.toArray(),a=0;a<e.length;a++)if(e[a].active)return this.selectedIndex=a,void this._changeDetectorRef.markForCheck();this.selectedIndex=-1,this._inkBar.hide()}},n.decorators=[{type:e.Component,args:[{selector:"[mat-tab-nav-bar]",exportAs:"matTabNavBar, matTabNav",inputs:["color"],template:'<div class="mat-tab-header-pagination mat-tab-header-pagination-before mat-elevation-z4" #previousPaginator aria-hidden="true" mat-ripple [matRippleDisabled]="_disableScrollBefore || disableRipple" [class.mat-tab-header-pagination-disabled]="_disableScrollBefore" (click)="_handlePaginatorClick(\'before\')" (mousedown)="_handlePaginatorPress(\'before\')" (touchend)="_stopInterval()"><div class="mat-tab-header-pagination-chevron"></div></div><div class="mat-tab-link-container" #tabListContainer (keydown)="_handleKeydown($event)"><div class="mat-tab-list" #tabList (cdkObserveContent)="_onContentChanges()"><div class="mat-tab-links"><ng-content></ng-content></div><mat-ink-bar></mat-ink-bar></div></div><div class="mat-tab-header-pagination mat-tab-header-pagination-after mat-elevation-z4" #nextPaginator aria-hidden="true" mat-ripple [matRippleDisabled]="_disableScrollAfter || disableRipple" [class.mat-tab-header-pagination-disabled]="_disableScrollAfter" (mousedown)="_handlePaginatorPress(\'after\')" (click)="_handlePaginatorClick(\'after\')" (touchend)="_stopInterval()"><div class="mat-tab-header-pagination-chevron"></div></div>',styles:[".mat-tab-header{display:flex;overflow:hidden;position:relative;flex-shrink:0}.mat-tab-header-pagination{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;position:relative;display:none;justify-content:center;align-items:center;min-width:32px;cursor:pointer;z-index:2;-webkit-tap-highlight-color:transparent;touch-action:none}.mat-tab-header-pagination-controls-enabled .mat-tab-header-pagination{display:flex}.mat-tab-header-pagination-before,.mat-tab-header-rtl .mat-tab-header-pagination-after{padding-left:4px}.mat-tab-header-pagination-before .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-after .mat-tab-header-pagination-chevron{transform:rotate(-135deg)}.mat-tab-header-pagination-after,.mat-tab-header-rtl .mat-tab-header-pagination-before{padding-right:4px}.mat-tab-header-pagination-after .mat-tab-header-pagination-chevron,.mat-tab-header-rtl .mat-tab-header-pagination-before .mat-tab-header-pagination-chevron{transform:rotate(45deg)}.mat-tab-header-pagination-chevron{border-style:solid;border-width:2px 2px 0 0;content:'';height:8px;width:8px}.mat-tab-header-pagination-disabled{box-shadow:none;cursor:default}.mat-tab-list{flex-grow:1;position:relative;transition:transform .5s cubic-bezier(.35,0,.25,1)}.mat-tab-links{display:flex}[mat-align-tabs=center] .mat-tab-links{justify-content:center}[mat-align-tabs=end] .mat-tab-links{justify-content:flex-end}.mat-ink-bar{position:absolute;bottom:0;height:2px;transition:.5s cubic-bezier(.35,0,.25,1)}._mat-animation-noopable.mat-ink-bar{transition:none;animation:none}.mat-tab-group-inverted-header .mat-ink-bar{bottom:auto;top:0}@media (-ms-high-contrast:active){.mat-ink-bar{outline:solid 2px;height:0}}.mat-tab-link-container{display:flex;flex-grow:1;overflow:hidden;z-index:1}.mat-tab-link{height:48px;padding:0 24px;cursor:pointer;box-sizing:border-box;opacity:.6;min-width:160px;text-align:center;display:inline-flex;justify-content:center;align-items:center;white-space:nowrap;vertical-align:top;text-decoration:none;position:relative;overflow:hidden;-webkit-tap-highlight-color:transparent}.mat-tab-link:focus{outline:0}.mat-tab-link:focus:not(.mat-tab-disabled){opacity:1}@media (-ms-high-contrast:active){.mat-tab-link:focus{outline:dotted 2px}}.mat-tab-link.mat-tab-disabled{cursor:default}@media (-ms-high-contrast:active){.mat-tab-link.mat-tab-disabled{opacity:.5}}.mat-tab-link .mat-tab-label-content{display:inline-flex;justify-content:center;align-items:center;white-space:nowrap}@media (-ms-high-contrast:active){.mat-tab-link{opacity:1}}[mat-stretch-tabs] .mat-tab-link{flex-basis:0;flex-grow:1}.mat-tab-link.mat-tab-disabled{pointer-events:none}@media (max-width:599px){.mat-tab-link{min-width:72px}}"],host:{class:"mat-tab-nav-bar mat-tab-header","[class.mat-tab-header-pagination-controls-enabled]":"_showPaginationControls","[class.mat-tab-header-rtl]":"_getLayoutDirection() == 'rtl'","[class.mat-primary]":'color !== "warn" && color !== "accent"',"[class.mat-accent]":'color === "accent"',"[class.mat-warn]":'color === "warn"'},encapsulation:e.ViewEncapsulation.None,changeDetection:e.ChangeDetectionStrategy.OnPush}]}],n.ctorParameters=function(){return[{type:e.ElementRef},{type:s.Directionality,decorators:[{type:e.Optional}]},{type:e.NgZone},{type:e.ChangeDetectorRef},{type:p.ViewportRuler},{type:h.Platform,decorators:[{type:e.Optional}]},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[a.ANIMATION_MODULE_TYPE]}]}]},n.propDecorators={_items:[{type:e.ContentChildren,args:[e.forwardRef(function(){return q}),{descendants:!0}]}],_inkBar:[{type:e.ViewChild,args:[v,{static:!0}]}],_tabListContainer:[{type:e.ViewChild,args:["tabListContainer",{static:!0}]}],_tabList:[{type:e.ViewChild,args:["tabList",{static:!0}]}],_nextPaginator:[{type:e.ViewChild,args:["nextPaginator",{static:!1}]}],_previousPaginator:[{type:e.ViewChild,args:["previousPaginator",{static:!1}]}],backgroundColor:[{type:e.Input}],disableRipple:[{type:e.Input}],color:[{type:e.Input}]},n}(O),V=function(){function t(){}return t}(),z=i.mixinTabIndex(i.mixinDisableRipple(i.mixinDisabled(V))),q=function(t){function n(e,a,n,o,r,s,l,c){var p=t.call(this)||this;return p._tabNavBar=e,p.elementRef=a,p._focusMonitor=l,p._isActive=!1,p._tabLinkRipple=new i.RippleRenderer(p,n,a,o),p._tabLinkRipple.setupTriggerEvents(a.nativeElement),p.rippleConfig=r||{},p.tabIndex=parseInt(s)||0,"NoopAnimations"===c&&(p.rippleConfig.animation={enterDuration:0,exitDuration:0}),l.monitor(a),p}return g(n,t),Object.defineProperty(n.prototype,"active",{get:function(){return this._isActive},set:function(t){t!==this._isActive&&(this._isActive=t,this._tabNavBar.updateActiveLink(this.elementRef))},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"rippleDisabled",{get:function(){return this.disabled||this.disableRipple||this._tabNavBar.disableRipple||!!this.rippleConfig.disabled},enumerable:!0,configurable:!0}),n.prototype.focus=function(){this.elementRef.nativeElement.focus()},n.prototype.ngOnDestroy=function(){this._tabLinkRipple._removeTriggerEvents(),this._focusMonitor.stopMonitoring(this.elementRef)},n.decorators=[{type:e.Directive,args:[{selector:"[mat-tab-link], [matTabLink]",exportAs:"matTabLink",inputs:["disabled","disableRipple","tabIndex"],host:{class:"mat-tab-link","[attr.aria-current]":"active","[attr.aria-disabled]":"disabled","[attr.tabIndex]":"tabIndex","[class.mat-tab-disabled]":"disabled","[class.mat-tab-label-active]":"active"}}]}],n.ctorParameters=function(){return[{type:W},{type:e.ElementRef},{type:e.NgZone},{type:h.Platform},{type:void 0,decorators:[{type:e.Optional},{type:e.Inject,args:[i.MAT_RIPPLE_GLOBAL_OPTIONS]}]},{type:String,decorators:[{type:e.Attribute,args:["tabindex"]}]},{type:d.FocusMonitor},{type:String,decorators:[{type:e.Optional},{type:e.Inject,args:[a.ANIMATION_MODULE_TYPE]}]}]},n.propDecorators={active:[{type:e.Input}]},n}(z),U=function(){function t(){}return t.decorators=[{type:e.NgModule,args:[{imports:[m.CommonModule,i.MatCommonModule,n.PortalModule,i.MatRippleModule,u.ObserversModule,d.A11yModule],exports:[i.MatCommonModule,F,C,w,W,q,x],declarations:[F,C,w,v,S,W,q,D,T,M,x]}]}],t}();t.MatInkBar=v,t._MAT_INK_BAR_POSITIONER=y,t.MatTabBody=D,t.MatTabBodyPortal=T,t.MatTabHeader=M,t.MatTabLabelWrapper=S,t.MatTab=w,t.MatTabLabel=C,t.MatTabNav=W,t.MatTabLink=q,t.MatTabContent=x,t.MatTabsModule=U,t.MatTabChangeEvent=j,t.MAT_TABS_CONFIG=B,t.MatTabGroup=F,t.matTabsAnimations=P,t.ɵa23=f,t.ɵb23=O,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=material-tabs.umd.min.js.map