fossasia/loklak_search

View on GitHub
4.717afb774a0e4309fb55.js

Summary

Maintainability
A
0 mins
Test Coverage
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{"2Q+G":function(t,e,n){"use strict";n.d(e,"a",function(){return u}),n.d(e,"d",function(){return c}),n.d(e,"b",function(){return p}),n.d(e,"c",function(){return h});var i=n("CcnG"),o=(n("mVsa"),n("Ip0R")),s=(n("eDkP"),n("Fzqc"),n("Wf4p")),r=n("dWZg"),a=(n("4c35"),n("qAlS"),n("wFw1")),u=(n("lLAP"),i["\u0275crt"]({encapsulation:2,styles:[".mat-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;max-height:calc(100vh - 48px);border-radius:2px;outline:0}.mat-menu-panel:not([class*=mat-elevation-z]){box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)}@media screen and (-ms-high-contrast:active){.mat-menu-panel{outline:solid 1px}}.mat-menu-content{padding-top:8px;padding-bottom:8px}.mat-menu-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;outline:0;border:none;-webkit-tap-highlight-color:transparent;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;position:relative}.mat-menu-item::-moz-focus-inner{border:0}.mat-menu-item[disabled]{cursor:default}[dir=rtl] .mat-menu-item{text-align:right}.mat-menu-item .mat-icon{margin-right:16px;vertical-align:middle}.mat-menu-item .mat-icon svg{vertical-align:top}[dir=rtl] .mat-menu-item .mat-icon{margin-left:16px;margin-right:0}.mat-menu-item-submenu-trigger{padding-right:32px}.mat-menu-item-submenu-trigger::after{width:0;height:0;border-style:solid;border-width:5px 0 5px 5px;border-color:transparent transparent transparent currentColor;content:'';display:inline-block;position:absolute;top:50%;right:16px;transform:translateY(-50%)}[dir=rtl] .mat-menu-item-submenu-trigger{padding-right:16px;padding-left:32px}[dir=rtl] .mat-menu-item-submenu-trigger::after{right:auto;left:16px;transform:rotateY(180deg) translateY(-50%)}.mat-menu-panel.ng-animating .mat-menu-item-submenu-trigger{pointer-events:none}button.mat-menu-item{width:100%}.mat-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}"],data:{animation:[{type:7,name:"transformMenu",definitions:[{type:0,name:"void",styles:{type:6,styles:{opacity:0,transform:"scale(0.01, 0.01)"},offset:null},options:void 0},{type:1,expr:"void => enter",animation:{type:2,steps:[{type:11,selector:".mat-menu-content",animation:{type:6,styles:{opacity:0},offset:null},options:null},{type:4,styles:{type:6,styles:{opacity:1,transform:"scale(1, 0.5)"},offset:null},timings:"100ms linear"},{type:3,steps:[{type:11,selector:".mat-menu-content",animation:{type:4,styles:{type:6,styles:{opacity:1},offset:null},timings:"400ms cubic-bezier(0.55, 0, 0.55, 0.2)"},options:null},{type:4,styles:{type:6,styles:{transform:"scale(1, 1)"},offset:null},timings:"300ms cubic-bezier(0.25, 0.8, 0.25, 1)"}],options:null}],options:null},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"150ms 50ms linear"},options:null}],options:{}},{type:7,name:"fadeInItems",definitions:[{type:0,name:"showing",styles:{type:6,styles:{opacity:1},offset:null},options:void 0},{type:1,expr:"void => *",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:null,timings:"400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}]}}));function l(t){return i["\u0275vid"](0,[(t()(),i["\u0275eld"](0,0,null,null,3,"div",[["class","mat-menu-panel"],["role","menu"],["tabindex","-1"]],[[24,"@transformMenu",0]],[[null,"keydown"],[null,"click"],[null,"@transformMenu.start"],[null,"@transformMenu.done"]],function(t,e,n){var i=!0,o=t.component;return"keydown"===e&&(i=!1!==o._handleKeydown(n)&&i),"click"===e&&(i=!1!==o.closed.emit("click")&&i),"@transformMenu.start"===e&&(i=0!=(o._isAnimating=!0)&&i),"@transformMenu.done"===e&&(i=!1!==o._onAnimationDone(n)&&i),i},null,null)),i["\u0275did"](1,278528,null,0,o.i,[i.IterableDiffers,i.KeyValueDiffers,i.ElementRef,i.Renderer2],{klass:[0,"klass"],ngClass:[1,"ngClass"]},null),(t()(),i["\u0275eld"](2,0,null,null,1,"div",[["class","mat-menu-content"]],null,null,null,null,null)),i["\u0275ncd"](null,0)],function(t,e){t(e,1,0,"mat-menu-panel",e.component._classList)},function(t,e){t(e,0,0,e.component._panelAnimationState)})}function c(t){return i["\u0275vid"](2,[i["\u0275qud"](402653184,1,{templateRef:0}),(t()(),i["\u0275and"](0,[[1,2]],null,0,null,l))],null,null)}var p=i["\u0275crt"]({encapsulation:2,styles:[],data:{}});function h(t){return i["\u0275vid"](2,[i["\u0275ncd"](null,0),(t()(),i["\u0275eld"](1,0,null,null,1,"div",[["class","mat-menu-ripple mat-ripple"],["matRipple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),i["\u0275did"](2,212992,null,0,s.u,[i.ElementRef,i.NgZone,r.a,[2,s.j],[2,a.a]],{disabled:[0,"disabled"],trigger:[1,"trigger"]},null)],function(t,e){var n=e.component;t(e,2,0,n.disableRipple||n.disabled,n._getHostElement())},function(t,e){t(e,1,0,i["\u0275nov"](e,2).unbounded)})}},MlvX:function(t,e,n){"use strict";n.d(e,"a",function(){return u}),n.d(e,"b",function(){return c});var i=n("CcnG"),o=n("Wf4p"),s=(n("Fzqc"),n("dWZg")),r=n("Ip0R"),a=n("wFw1"),u=i["\u0275crt"]({encapsulation:2,styles:[".mat-option{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;line-height:48px;height:48px;padding:0 16px;text-align:left;text-decoration:none;position:relative;cursor:pointer;outline:0;display:flex;flex-direction:row;max-width:100%;box-sizing:border-box;align-items:center}.mat-option[disabled]{cursor:default}[dir=rtl] .mat-option{text-align:right}.mat-option .mat-icon{margin-right:16px;vertical-align:middle}.mat-option .mat-icon svg{vertical-align:top}[dir=rtl] .mat-option .mat-icon{margin-left:16px;margin-right:0}.mat-option[aria-disabled=true]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:32px}[dir=rtl] .mat-optgroup .mat-option:not(.mat-option-multiple){padding-left:16px;padding-right:32px}@media screen and (-ms-high-contrast:active){.mat-option{margin:0 1px}.mat-option.mat-active{border:solid 1px currentColor;margin:0}}.mat-option-text{display:inline-block;flex-grow:1;overflow:hidden;text-overflow:ellipsis}.mat-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}@media screen and (-ms-high-contrast:active){.mat-option-ripple{opacity:.5}}.mat-option-pseudo-checkbox{margin-right:8px}[dir=rtl] .mat-option-pseudo-checkbox{margin-left:8px;margin-right:0}"],data:{}});function l(t){return i["\u0275vid"](0,[(t()(),i["\u0275eld"](0,0,null,null,1,"mat-pseudo-checkbox",[["class","mat-option-pseudo-checkbox mat-pseudo-checkbox"]],[[2,"mat-pseudo-checkbox-indeterminate",null],[2,"mat-pseudo-checkbox-checked",null],[2,"mat-pseudo-checkbox-disabled",null],[2,"_mat-animation-noopable",null]],null,null,h,p)),i["\u0275did"](1,49152,null,0,o.s,[[2,a.a]],{state:[0,"state"],disabled:[1,"disabled"]},null)],function(t,e){var n=e.component;t(e,1,0,n.selected?"checked":"",n.disabled)},function(t,e){t(e,0,0,"indeterminate"===i["\u0275nov"](e,1).state,"checked"===i["\u0275nov"](e,1).state,i["\u0275nov"](e,1).disabled,"NoopAnimations"===i["\u0275nov"](e,1)._animationMode)})}function c(t){return i["\u0275vid"](2,[(t()(),i["\u0275and"](16777216,null,null,1,null,l)),i["\u0275did"](1,16384,null,0,r.k,[i.ViewContainerRef,i.TemplateRef],{ngIf:[0,"ngIf"]},null),(t()(),i["\u0275eld"](2,0,null,null,1,"span",[["class","mat-option-text"]],null,null,null,null,null)),i["\u0275ncd"](null,0),(t()(),i["\u0275eld"](4,0,null,null,1,"div",[["class","mat-option-ripple mat-ripple"],["mat-ripple",""]],[[2,"mat-ripple-unbounded",null]],null,null,null,null)),i["\u0275did"](5,212992,null,0,o.u,[i.ElementRef,i.NgZone,s.a,[2,o.j],[2,a.a]],{disabled:[0,"disabled"],trigger:[1,"trigger"]},null)],function(t,e){var n=e.component;t(e,1,0,n.multiple),t(e,5,0,n.disabled||n.disableRipple,n._getHostElement())},function(t,e){t(e,4,0,i["\u0275nov"](e,5).unbounded)})}var p=i["\u0275crt"]({encapsulation:2,styles:[".mat-pseudo-checkbox{width:20px;height:20px;border:2px solid;border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0,0,.2,.1),background-color 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:'';border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0,0,.2,.1)}.mat-pseudo-checkbox.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox.mat-pseudo-checkbox-indeterminate{border-color:transparent}._mat-animation-noopable.mat-pseudo-checkbox{transition:none;animation:none}._mat-animation-noopable.mat-pseudo-checkbox::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{top:7px;left:0;width:16px;opacity:1}.mat-pseudo-checkbox-checked::after{top:3px;left:1px;width:12px;height:5px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1}"],data:{}});function h(t){return i["\u0275vid"](2,[],null,null)}},YlbQ:function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n("mrSG"),n("6blF"),n("F/XL");var i=n("K9Ia"),o=(n("CcnG"),function(){function t(t,e,n){void 0===t&&(t=!1),void 0===n&&(n=!0);var o=this;this._multiple=t,this._emitChanges=n,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.onChange=this._emitChanges?new i.a:null,e&&e.length&&(t?e.forEach(function(t){return o._markSelected(t)}):this._markSelected(e[0]),this._selectedToEmit.length=0)}return Object.defineProperty(t.prototype,"selected",{get:function(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected},enumerable:!0,configurable:!0}),t.prototype.select=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._verifyValueAssignment(e),e.forEach(function(e){return t._markSelected(e)}),this._emitChangeEvent()},t.prototype.deselect=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];this._verifyValueAssignment(e),e.forEach(function(e){return t._unmarkSelected(e)}),this._emitChangeEvent()},t.prototype.toggle=function(t){this.isSelected(t)?this.deselect(t):this.select(t)},t.prototype.clear=function(){this._unmarkAll(),this._emitChangeEvent()},t.prototype.isSelected=function(t){return this._selection.has(t)},t.prototype.isEmpty=function(){return 0===this._selection.size},t.prototype.hasValue=function(){return!this.isEmpty()},t.prototype.sort=function(t){this._multiple&&this.selected&&this._selected.sort(t)},t.prototype.isMultipleSelection=function(){return this._multiple},t.prototype._emitChangeEvent=function(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.onChange&&this.onChange.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])},t.prototype._markSelected=function(t){this.isSelected(t)||(this._multiple||this._unmarkAll(),this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))},t.prototype._unmarkSelected=function(t){this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))},t.prototype._unmarkAll=function(){var t=this;this.isEmpty()||this._selection.forEach(function(e){return t._unmarkSelected(e)})},t.prototype._verifyValueAssignment=function(t){if(t.length>1&&!this._multiple)throw Error("Cannot pass multiple values into SelectionModel with single-value mode.")},t}())},lYZG:function(t,e,n){"use strict";n.d(e,"a",function(){return r});var i=n("6blF"),o=n("0/uQ"),s=n("G5J1");function r(t){return new i.a(function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?Object(o.a)(n):Object(s.b)()).subscribe(e)})}},mVsa:function(t,e,n){"use strict";var i=n("CcnG"),o=n("4c35"),s=(n("ihYY"),n("mrSG")),r=n("lLAP"),a=n("Wf4p"),u=n("K9Ia"),l=n("p0ib"),c=n("F/XL"),p=1,h={},m=function(t){function e(e,n){var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i}return s.__extends(e,t),e.prototype.requestAsyncId=function(e,n,i){return void 0===i&&(i=0),null!==i&&i>0?t.prototype.requestAsyncId.call(this,e,n,i):(e.actions.push(this),e.scheduled||(e.scheduled=(o=e.flush.bind(e,null),s=p++,h[s]=o,Promise.resolve().then(function(){return function(t){var e=h[t];e&&e()}(s)}),s)));var o,s},e.prototype.recycleAsyncId=function(e,n,i){if(void 0===i&&(i=0),null!==i&&i>0||null===i&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,i);0===e.actions.length&&(delete h[n],e.scheduled=void 0)},e}(n("h9Dq").a),d=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s.__extends(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,i=-1,o=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++i<o&&(t=n.shift()));if(this.active=!1,e){for(;++i<o&&(t=n.shift());)t.unsubscribe();throw e}},e}(n("CS9Q").a))(m),f=n("pugT"),b=n("n6gG"),g=n("YSh2"),_=n("VnD/"),y=n("t9fZ"),v=n("15JJ"),x=n("p0Sj"),k=n("ny24"),M=n("vubp"),w=n("eDkP");n.d(e,"b",function(){return P}),n.d(e,"e",function(){return j}),n.d(e,"c",function(){return S}),n.d(e,"a",function(){return E}),n.d(e,"d",function(){return C}),n.d(e,"f",function(){return T}),n.d(e,"h",function(){return O}),n.d(e,"g",function(){return I});var O=new i.InjectionToken("MAT_MENU_PANEL"),C=function(t){function e(e,n,i,o){var s=t.call(this)||this;return s._elementRef=e,s._focusMonitor=i,s._parentMenu=o,s._hovered=new u.a,s._highlighted=!1,s._triggersSubmenu=!1,i&&i.monitor(s._getHostElement(),!1),o&&o.addItem&&o.addItem(s),s._document=n,s}return Object(s.__extends)(e,t),e.prototype.focus=function(t){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._getHostElement(),t):this._getHostElement().focus()},e.prototype.ngOnDestroy=function(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._getHostElement()),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete()},e.prototype._getTabIndex=function(){return this.disabled?"-1":"0"},e.prototype._getHostElement=function(){return this._elementRef.nativeElement},e.prototype._checkDisabled=function(t){this.disabled&&(t.preventDefault(),t.stopPropagation())},e.prototype._handleMouseEnter=function(){this._hovered.next(this)},e.prototype.getLabel=function(){var t=this._elementRef.nativeElement,e=this._document?this._document.TEXT_NODE:3,n="";if(t.childNodes)for(var i=t.childNodes.length,o=0;o<i;o++)t.childNodes[o].nodeType===e&&(n+=t.childNodes[o].textContent);return n.trim()},e}(Object(a.C)(Object(a.D)(function(){}))),E=new i.InjectionToken("mat-menu-default-options",{providedIn:"root",factory:function(){return{overlapTrigger:!0,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}}),S=function(){function t(t,e,n){this._elementRef=t,this._ngZone=e,this._defaultOptions=n,this._xPosition=this._defaultOptions.xPosition,this._yPosition=this._defaultOptions.yPosition,this._items=[],this._itemChanges=new u.a,this._tabSubscription=f.a.EMPTY,this._classList={},this._panelAnimationState="void",this._animationDone=new u.a,this.backdropClass=this._defaultOptions.backdropClass,this._overlapTrigger=this._defaultOptions.overlapTrigger,this._hasBackdrop=this._defaultOptions.hasBackdrop,this.closed=new i.EventEmitter,this.close=this.closed}return Object.defineProperty(t.prototype,"xPosition",{get:function(){return this._xPosition},set:function(t){"before"!==t&&"after"!==t&&function(){throw Error('x-position value must be either \'before\' or after\'.\n      Example: <mat-menu x-position="before" #menu="matMenu"></mat-menu>')}(),this._xPosition=t,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"yPosition",{get:function(){return this._yPosition},set:function(t){"above"!==t&&"below"!==t&&function(){throw Error('y-position value must be either \'above\' or below\'.\n      Example: <mat-menu y-position="above" #menu="matMenu"></mat-menu>')}(),this._yPosition=t,this.setPositionClasses()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"overlapTrigger",{get:function(){return this._overlapTrigger},set:function(t){this._overlapTrigger=Object(b.b)(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasBackdrop",{get:function(){return this._hasBackdrop},set:function(t){this._hasBackdrop=Object(b.b)(t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"panelClass",{set:function(t){t&&t.length&&(this._classList=t.split(" ").reduce(function(t,e){return t[e]=!0,t},{}),this._elementRef.nativeElement.className="")},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"classList",{get:function(){return this.panelClass},set:function(t){this.panelClass=t},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){this.setPositionClasses()},t.prototype.ngAfterContentInit=function(){var t=this;this._keyManager=new r.d(this._items).withWrap().withTypeAhead(),this._tabSubscription=this._keyManager.tabOut.subscribe(function(){return t.closed.emit("tab")})},t.prototype.ngOnDestroy=function(){this._tabSubscription.unsubscribe(),this.closed.complete()},t.prototype._hovered=function(){return this._itemChanges.pipe(Object(x.a)(this._items),Object(v.a)(function(t){return l.a.apply(void 0,t.map(function(t){return t._hovered}))}))},t.prototype._handleKeydown=function(t){var e=t.keyCode;switch(e){case g.e:this.closed.emit("keydown"),t.stopPropagation();break;case g.g:this.parentMenu&&"ltr"===this.direction&&this.closed.emit("keydown");break;case g.i:this.parentMenu&&"rtl"===this.direction&&this.closed.emit("keydown");break;default:e!==g.l&&e!==g.b||this._keyManager.setFocusOrigin("keyboard"),this._keyManager.onKeydown(t)}},t.prototype.focusFirstItem=function(t){var e=this;void 0===t&&(t="program"),this.lazyContent?this._ngZone.onStable.asObservable().pipe(Object(y.a)(1)).subscribe(function(){return e._keyManager.setFocusOrigin(t).setFirstItemActive()}):this._keyManager.setFocusOrigin(t).setFirstItemActive()},t.prototype.resetActiveItem=function(){this._keyManager.setActiveItem(-1)},t.prototype.setElevation=function(t){var e="mat-elevation-z"+(2+t),n=Object.keys(this._classList).find(function(t){return t.startsWith("mat-elevation-z")});n&&n!==this._previousElevation||(this._previousElevation&&(this._classList[this._previousElevation]=!1),this._classList[e]=!0,this._previousElevation=e)},t.prototype.addItem=function(t){-1===this._items.indexOf(t)&&(this._items.push(t),this._itemChanges.next(this._items))},t.prototype.removeItem=function(t){var e=this._items.indexOf(t);this._items.indexOf(t)>-1&&(this._items.splice(e,1),this._itemChanges.next(this._items))},t.prototype.setPositionClasses=function(t,e){void 0===t&&(t=this.xPosition),void 0===e&&(e=this.yPosition);var n=this._classList;n["mat-menu-before"]="before"===t,n["mat-menu-after"]="after"===t,n["mat-menu-above"]="above"===e,n["mat-menu-below"]="below"===e},t.prototype._startAnimation=function(){this._panelAnimationState="enter"},t.prototype._resetAnimation=function(){this._panelAnimationState="void"},t.prototype._onAnimationDone=function(t){this._animationDone.next(t),this._isAnimating=!1,"enter"===t.toState&&0===this._keyManager.activeItemIndex&&(t.element.scrollTop=0)},t}(),P=new i.InjectionToken("mat-menu-scroll-strategy");function I(t){return function(){return t.scrollStrategies.reposition()}}var T=function(){function t(t,e,n,o,s,r,a,u){this._overlay=t,this._element=e,this._viewContainerRef=n,this._scrollStrategy=o,this._parentMenu=s,this._menuItemInstance=r,this._dir=a,this._focusMonitor=u,this._overlayRef=null,this._menuOpen=!1,this._closeSubscription=f.a.EMPTY,this._hoverSubscription=f.a.EMPTY,this._openedByMouse=!1,this.menuOpened=new i.EventEmitter,this.onMenuOpen=this.menuOpened,this.menuClosed=new i.EventEmitter,this.onMenuClose=this.menuClosed,r&&(r._triggersSubmenu=this.triggersSubmenu())}return Object.defineProperty(t.prototype,"_deprecatedMatMenuTriggerFor",{get:function(){return this.menu},set:function(t){this.menu=t},enumerable:!0,configurable:!0}),t.prototype.ngAfterContentInit=function(){var t=this;this._checkMenu(),this.menu.close.subscribe(function(e){t._destroyMenu(),"click"!==e&&"tab"!==e||!t._parentMenu||t._parentMenu.closed.emit(e)}),this._handleHover()},t.prototype.ngOnDestroy=function(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._cleanUpSubscriptions()},Object.defineProperty(t.prototype,"menuOpen",{get:function(){return this._menuOpen},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"dir",{get:function(){return this._dir&&"rtl"===this._dir.value?"rtl":"ltr"},enumerable:!0,configurable:!0}),t.prototype.triggersSubmenu=function(){return!(!this._menuItemInstance||!this._parentMenu)},t.prototype.toggleMenu=function(){return this._menuOpen?this.closeMenu():this.openMenu()},t.prototype.openMenu=function(){var t=this;if(!this._menuOpen){var e=this._createOverlay();this._setPosition(e.getConfig().positionStrategy),e.attach(this._portal),this.menu.lazyContent&&this.menu.lazyContent.attach(this.menuData),this._closeSubscription=this._menuClosingActions().subscribe(function(){return t.closeMenu()}),this._initMenu(),this.menu instanceof S&&this.menu._startAnimation()}},t.prototype.closeMenu=function(){this.menu.close.emit()},t.prototype.focus=function(t){void 0===t&&(t="program"),this._focusMonitor?this._focusMonitor.focusVia(this._element.nativeElement,t):this._element.nativeElement.focus()},t.prototype._destroyMenu=function(){var t=this;if(this._overlayRef&&this.menuOpen){var e=this.menu;this._closeSubscription.unsubscribe(),this._overlayRef.detach(),e instanceof S?(e._resetAnimation(),e.lazyContent?e._animationDone.pipe(Object(_.a)(function(t){return"void"===t.toState}),Object(y.a)(1)).subscribe(function(){e.lazyContent.detach(),t._resetMenu()}):this._resetMenu()):(this._resetMenu(),e.lazyContent&&e.lazyContent.detach())}},t.prototype._initMenu=function(){this.menu.parentMenu=this.triggersSubmenu()?this._parentMenu:void 0,this.menu.direction=this.dir,this._setMenuElevation(),this._setIsMenuOpen(!0),this.menu.focusFirstItem(this._openedByMouse?"mouse":"program")},t.prototype._setMenuElevation=function(){if(this.menu.setElevation){for(var t=0,e=this.menu.parentMenu;e;)t++,e=e.parentMenu;this.menu.setElevation(t)}},t.prototype._resetMenu=function(){this._setIsMenuOpen(!1),this._openedByMouse?this.triggersSubmenu()||this.focus("mouse"):this.focus(),this._openedByMouse=!1},t.prototype._setIsMenuOpen=function(t){this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&(this._menuItemInstance._highlighted=t)},t.prototype._checkMenu=function(){this.menu||function(){throw Error('mat-menu-trigger: must pass in an mat-menu instance.\n\n    Example:\n      <mat-menu #menu="matMenu"></mat-menu>\n      <button [matMenuTriggerFor]="menu"></button>')}()},t.prototype._createOverlay=function(){if(!this._overlayRef){this._portal=new o.h(this.menu.templateRef,this._viewContainerRef);var t=this._getOverlayConfig();this._subscribeToPositions(t.positionStrategy),this._overlayRef=this._overlay.create(t)}return this._overlayRef},t.prototype._getOverlayConfig=function(){return new w.d({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withTransformOriginOn(".mat-menu-panel"),hasBackdrop:null==this.menu.hasBackdrop?!this.triggersSubmenu():this.menu.hasBackdrop,backdropClass:this.menu.backdropClass||"cdk-overlay-transparent-backdrop",scrollStrategy:this._scrollStrategy(),direction:this._dir})},t.prototype._subscribeToPositions=function(t){var e=this;this.menu.setPositionClasses&&t.positionChanges.subscribe(function(t){e.menu.setPositionClasses("start"===t.connectionPair.overlayX?"after":"before","top"===t.connectionPair.overlayY?"below":"above")})},t.prototype._setPosition=function(t){var e="before"===this.menu.xPosition?["end","start"]:["start","end"],n=e[0],i=e[1],o="above"===this.menu.yPosition?["bottom","top"]:["top","bottom"],s=o[0],r=o[1],a=[s,r],u=a[0],l=a[1],c=[n,i],p=c[0],h=c[1],m=0;this.triggersSubmenu()?(h=n="before"===this.menu.xPosition?"start":"end",i=p="end"===n?"start":"end",m="bottom"===s?8:-8):this.menu.overlapTrigger||(u="top"===s?"bottom":"top",l="top"===r?"bottom":"top"),t.withPositions([{originX:n,originY:u,overlayX:p,overlayY:s,offsetY:m},{originX:i,originY:u,overlayX:h,overlayY:s,offsetY:m},{originX:n,originY:l,overlayX:p,overlayY:r,offsetY:-m},{originX:i,originY:l,overlayX:h,overlayY:r,offsetY:-m}])},t.prototype._cleanUpSubscriptions=function(){this._closeSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()},t.prototype._menuClosingActions=function(){var t=this,e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments(),i=this._parentMenu?this._parentMenu.closed:Object(c.a)(),o=this._parentMenu?this._parentMenu._hovered().pipe(Object(_.a)(function(e){return e!==t._menuItemInstance}),Object(_.a)(function(){return t._menuOpen})):Object(c.a)();return Object(l.a)(e,i,o,n)},t.prototype._handleMousedown=function(t){Object(r.g)(t)||(this._openedByMouse=!0,this.triggersSubmenu()&&t.preventDefault())},t.prototype._handleKeydown=function(t){var e=t.keyCode;this.triggersSubmenu()&&(e===g.i&&"ltr"===this.dir||e===g.g&&"rtl"===this.dir)&&this.openMenu()},t.prototype._handleClick=function(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()},t.prototype._handleHover=function(){var t=this;this.triggersSubmenu()&&(this._hoverSubscription=this._parentMenu._hovered().pipe(Object(_.a)(function(e){return e===t._menuItemInstance&&!e.disabled}),Object(M.a)(0,d)).subscribe(function(){t._openedByMouse=!0,t.menu instanceof S&&t.menu._isAnimating?t.menu._animationDone.pipe(Object(y.a)(1),Object(k.a)(t._parentMenu._hovered())).subscribe(function(){return t.openMenu()}):t.openMenu()}))},t}(),j=function(){}},vubp:function(t,e,n){"use strict";var i=n("mrSG"),o=n("T1DM"),s=n("FFOo"),r=n("60iU");function a(t,e){void 0===e&&(e=o.a);var n,i=(n=t)instanceof Date&&!isNaN(+n)?+t-e.now():Math.abs(t);return function(t){return t.lift(new u(i,e))}}n.d(e,"a",function(){return a});var u=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.delay,this.scheduler))},t}(),l=function(t){function e(e,n,i){var o=t.call(this,e)||this;return o.delay=n,o.scheduler=i,o.queue=[],o.active=!1,o.errored=!1,o}return i.__extends(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,i=t.scheduler,o=t.destination;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(o);if(n.length>0){var s=Math.max(0,n[0].time-i.now());this.schedule(t,s)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new c(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(r.a.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t)},e.prototype._complete=function(){this.scheduleNotification(r.a.createComplete())},e}(s.a),c=function(t,e){this.time=t,this.notification=e}}}]);