-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path913-es2015.024772a488b57619a8de.js
More file actions
2 lines (2 loc) · 55.4 KB
/
913-es2015.024772a488b57619a8de.js
File metadata and controls
2 lines (2 loc) · 55.4 KB
1
2
(self.webpackChunkrxjs_dev=self.webpackChunkrxjs_dev||[]).push([[913],{30584:function(t,e,i){"use strict";i.d(e,{ux:function(){return wt},ZX:function(){return vt}});var s=i(12770),n=i(2316),o=i(36145),r=i(772),a=i(54364),h=i(20657),l=i(40912),c=i(20749),d=i(90930),p=i(17159),_=i(35116),u=i(44094);i(13256),i(36487),i(90084);const f=(0,o.Mq)();class m{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){const t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=(0,h.HM)(-this._previousScrollPosition.left),t.style.top=(0,h.HM)(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){const t=this._document.documentElement,e=t.style,i=this._document.body.style,s=e.scrollBehavior||"",n=i.scrollBehavior||"";this._isEnabled=!1,e.left=this._previousHTMLStyles.left,e.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),f&&(e.scrollBehavior=i.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),f&&(e.scrollBehavior=s,i.scrollBehavior=n)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;const t=this._document.body,e=this._viewportRuler.getViewportSize();return t.scrollHeight>e.height||t.scrollWidth>e.width}}class g{constructor(t,e,i,s){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=i,this._config=s,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef=t}enable(){if(this._scrollSubscription)return;const t=this._scrollDispatcher.scrolled(0);this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{const t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}class y{enable(){}disable(){}attach(){}}function v(t,e){return e.some(e=>t.bottom<e.top||t.top>e.bottom||t.right<e.left||t.left>e.right)}function b(t,e){return e.some(e=>t.top<e.top||t.bottom>e.bottom||t.left<e.left||t.right>e.right)}class w{constructor(t,e,i,s){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this._config=s,this._scrollSubscription=null}attach(t){this._overlayRef=t}enable(){this._scrollSubscription||(this._scrollSubscription=this._scrollDispatcher.scrolled(this._config?this._config.scrollThrottle:0).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){const t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:e,height:i}=this._viewportRuler.getViewportSize();v(t,[{width:e,height:i,bottom:i,right:e,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}}))}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}}let k=(()=>{class t{constructor(t,e,i,s){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=i,this.noop=()=>new y,this.close=t=>new g(this._scrollDispatcher,this._ngZone,this._viewportRuler,t),this.block=()=>new m(this._viewportRuler,this._document),this.reposition=t=>new w(this._scrollDispatcher,this._viewportRuler,this._ngZone,t),this._document=s}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(s.mF),n.LFG(s.rL),n.LFG(n.R0b),n.LFG(a.K0))},t.\u0275prov=n.Yz7({factory:function(){return new t(n.LFG(s.mF),n.LFG(s.rL),n.LFG(n.R0b),n.LFG(a.K0))},token:t,providedIn:"root"}),t})();class x{constructor(t){if(this.scrollStrategy=new y,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){const e=Object.keys(t);for(const i of e)void 0!==t[i]&&(this[i]=t[i])}}}class C{constructor(t,e,i,s,n){this.offsetX=i,this.offsetY=s,this.panelClass=n,this.originX=t.originX,this.originY=t.originY,this.overlayX=e.overlayX,this.overlayY=e.overlayY}}class S{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}}let E=(()=>{class t{constructor(t){this._attachedOverlays=[],this._document=t}ngOnDestroy(){this.detach()}add(t){this.remove(t),this._attachedOverlays.push(t)}remove(t){const e=this._attachedOverlays.indexOf(t);e>-1&&this._attachedOverlays.splice(e,1),0===this._attachedOverlays.length&&this.detach()}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(a.K0))},t.\u0275prov=n.Yz7({factory:function(){return new t(n.LFG(a.K0))},token:t,providedIn:"root"}),t})(),P=(()=>{class t extends E{constructor(t){super(t),this._keydownListener=t=>{const e=this._attachedOverlays;for(let i=e.length-1;i>-1;i--)if(e[i]._keydownEvents.observers.length>0){e[i]._keydownEvents.next(t);break}}}add(t){super.add(t),this._isAttached||(this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(a.K0))},t.\u0275prov=n.Yz7({factory:function(){return new t(n.LFG(a.K0))},token:t,providedIn:"root"}),t})(),R=(()=>{class t extends E{constructor(t,e){super(t),this._platform=e,this._cursorStyleIsSet=!1,this._clickListener=t=>{const e=(0,o.sA)(t),i=this._attachedOverlays.slice();for(let s=i.length-1;s>-1;s--){const n=i[s];if(!(n._outsidePointerEvents.observers.length<1)&&n.hasAttached()){if(n.overlayElement.contains(e))break;n._outsidePointerEvents.next(t)}}}}add(t){if(super.add(t),!this._isAttached){const t=this._document.body;t.addEventListener("click",this._clickListener,!0),t.addEventListener("auxclick",this._clickListener,!0),t.addEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=t.style.cursor,t.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){const t=this._document.body;t.removeEventListener("click",this._clickListener,!0),t.removeEventListener("auxclick",this._clickListener,!0),t.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(t.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(a.K0),n.LFG(o.t4))},t.\u0275prov=n.Yz7({factory:function(){return new t(n.LFG(a.K0),n.LFG(o.t4))},token:t,providedIn:"root"}),t})();const O="undefined"!=typeof window?window:{},L=void 0!==O.__karma__&&!!O.__karma__||void 0!==O.jasmine&&!!O.jasmine||void 0!==O.jest&&!!O.jest||void 0!==O.Mocha&&!!O.Mocha;let B=(()=>{class t{constructor(t,e){this._platform=e,this._document=t}ngOnDestroy(){const t=this._containerElement;t&&t.parentNode&&t.parentNode.removeChild(t)}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){const t="cdk-overlay-container";if(this._platform.isBrowser||L){const e=this._document.querySelectorAll(`.${t}[platform="server"], .${t}[platform="test"]`);for(let t=0;t<e.length;t++)e[t].parentNode.removeChild(e[t])}const e=this._document.createElement("div");e.classList.add(t),L?e.setAttribute("platform","test"):this._platform.isBrowser||e.setAttribute("platform","server"),this._document.body.appendChild(e),this._containerElement=e}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(a.K0),n.LFG(o.t4))},t.\u0275prov=n.Yz7({factory:function(){return new t(n.LFG(a.K0),n.LFG(o.t4))},token:t,providedIn:"root"}),t})();class A{constructor(t,e,i,s,n,o,r,a,h){this._portalOutlet=t,this._host=e,this._pane=i,this._config=s,this._ngZone=n,this._keyboardDispatcher=o,this._document=r,this._location=a,this._outsideClickDispatcher=h,this._backdropElement=null,this._backdropClick=new c.x,this._attachments=new c.x,this._detachments=new c.x,this._locationChanges=d.w0.EMPTY,this._backdropClickHandler=t=>this._backdropClick.next(t),this._keydownEvents=new c.x,this._outsidePointerEvents=new c.x,s.scrollStrategy&&(this._scrollStrategy=s.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=s.positionStrategy}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){let e=this._portalOutlet.attach(t);return!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host),this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._ngZone.onStable.pipe((0,_.q)(1)).subscribe(()=>{this.hasAttached()&&this.updatePosition()}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();const t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenStable(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){const t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this.detachBackdrop(),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host&&this._host.parentNode&&(this._host.parentNode.removeChild(this._host),this._host=null),this._previousHostParent=this._pane=null,t&&this._detachments.next(),this._detachments.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=Object.assign(Object.assign({},this._config),t),this._updateElementSize()}setDirection(t){this._config=Object.assign(Object.assign({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){const t=this._config.direction;return t?"string"==typeof t?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;const t=this._pane.style;t.width=(0,h.HM)(this._config.width),t.height=(0,h.HM)(this._config.height),t.minWidth=(0,h.HM)(this._config.minWidth),t.minHeight=(0,h.HM)(this._config.minHeight),t.maxWidth=(0,h.HM)(this._config.maxWidth),t.maxHeight=(0,h.HM)(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){const t="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),"undefined"!=typeof requestAnimationFrame?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(t)})}):this._backdropElement.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t=this._backdropElement;if(!t)return;let e,i=()=>{t&&(t.removeEventListener("click",this._backdropClickHandler),t.removeEventListener("transitionend",i),t.parentNode&&t.parentNode.removeChild(t)),this._backdropElement==t&&(this._backdropElement=null),this._config.backdropClass&&this._toggleClasses(t,this._config.backdropClass,!1),clearTimeout(e)};t.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",i)}),t.style.pointerEvents="none",e=this._ngZone.runOutsideAngular(()=>setTimeout(i,500))}_toggleClasses(t,e,i){const s=t.classList;(0,h.Eq)(e).forEach(t=>{t&&(i?s.add(t):s.remove(t))})}_detachContentWhenStable(){this._ngZone.runOutsideAngular(()=>{const t=this._ngZone.onStable.pipe((0,u.R)((0,p.T)(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||0===this._pane.children.length)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._previousHostParent.removeChild(this._host)),t.unsubscribe())})})}_disposeScrollStrategy(){const t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}}const F="cdk-overlay-connected-position-bounding-box",M=/([A-Za-z%]+)$/;class D{constructor(t,e,i,s,n){this._viewportRuler=e,this._document=i,this._platform=s,this._overlayContainer=n,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new c.x,this._resizeSubscription=d.w0.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}get positions(){return this._preferredPositions}attach(t){this._validatePositions(),t.hostElement.classList.add(F),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition)return void this.reapplyLastPosition();this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect();const t=this._originRect,e=this._overlayRect,i=this._viewportRect,s=[];let n;for(let o of this._preferredPositions){let r=this._getOriginPoint(t,o),a=this._getOverlayPoint(r,e,o),h=this._getOverlayFit(a,e,i,o);if(h.isCompletelyWithinViewport)return this._isPushed=!1,void this._applyPosition(o,r);this._canFitWithFlexibleDimensions(h,a,i)?s.push({position:o,origin:r,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(r,o)}):(!n||n.overlayFit.visibleArea<h.visibleArea)&&(n={overlayFit:h,overlayPoint:a,originPoint:r,position:o,overlayRect:e})}if(s.length){let t=null,e=-1;for(const i of s){const s=i.boundingBoxRect.width*i.boundingBoxRect.height*(i.position.weight||1);s>e&&(e=s,t=i)}return this._isPushed=!1,void this._applyPosition(t.position,t.origin)}if(this._canPush)return this._isPushed=!0,void this._applyPosition(n.position,n.originPoint);this._applyPosition(n.position,n.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&j(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(F),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(!this._isDisposed&&(!this._platform||this._platform.isBrowser)){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect();const t=this._lastPosition||this._preferredPositions[0],e=this._getOriginPoint(this._originRect,t);this._applyPosition(t,e)}}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,-1===t.indexOf(this._lastPosition)&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e){let i,s;if("center"==e.originX)i=t.left+t.width/2;else{const s=this._isRtl()?t.right:t.left,n=this._isRtl()?t.left:t.right;i="start"==e.originX?s:n}return s="center"==e.originY?t.top+t.height/2:"top"==e.originY?t.top:t.bottom,{x:i,y:s}}_getOverlayPoint(t,e,i){let s,n;return s="center"==i.overlayX?-e.width/2:"start"===i.overlayX?this._isRtl()?-e.width:0:this._isRtl()?0:-e.width,n="center"==i.overlayY?-e.height/2:"top"==i.overlayY?0:-e.height,{x:t.x+s,y:t.y+n}}_getOverlayFit(t,e,i,s){const n=T(e);let{x:o,y:r}=t,a=this._getOffset(s,"x"),h=this._getOffset(s,"y");a&&(o+=a),h&&(r+=h);let l=0-r,c=r+n.height-i.height,d=this._subtractOverflows(n.width,0-o,o+n.width-i.width),p=this._subtractOverflows(n.height,l,c),_=d*p;return{visibleArea:_,isCompletelyWithinViewport:n.width*n.height===_,fitsInViewportVertically:p===n.height,fitsInViewportHorizontally:d==n.width}}_canFitWithFlexibleDimensions(t,e,i){if(this._hasFlexibleDimensions){const s=i.bottom-e.y,n=i.right-e.x,o=I(this._overlayRef.getConfig().minHeight),r=I(this._overlayRef.getConfig().minWidth),a=t.fitsInViewportHorizontally||null!=r&&r<=n;return(t.fitsInViewportVertically||null!=o&&o<=s)&&a}return!1}_pushOverlayOnScreen(t,e,i){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};const s=T(e),n=this._viewportRect,o=Math.max(t.x+s.width-n.width,0),r=Math.max(t.y+s.height-n.height,0),a=Math.max(n.top-i.top-t.y,0),h=Math.max(n.left-i.left-t.x,0);let l=0,c=0;return l=s.width<=n.width?h||-o:t.x<this._viewportMargin?n.left-i.left-t.x:0,c=s.height<=n.height?a||-r:t.y<this._viewportMargin?n.top-i.top-t.y:0,this._previousPushAmount={x:l,y:c},{x:t.x+l,y:t.y+c}}_applyPosition(t,e){if(this._setTransformOrigin(t),this._setOverlayElementStyles(e,t),this._setBoundingBoxStyles(e,t),t.panelClass&&this._addPanelClasses(t.panelClass),this._lastPosition=t,this._positionChanges.observers.length){const e=this._getScrollVisibility(),i=new S(t,e);this._positionChanges.next(i)}this._isInitialRender=!1}_setTransformOrigin(t){if(!this._transformOriginSelector)return;const e=this._boundingBox.querySelectorAll(this._transformOriginSelector);let i,s=t.overlayY;i="center"===t.overlayX?"center":this._isRtl()?"start"===t.overlayX?"right":"left":"start"===t.overlayX?"left":"right";for(let n=0;n<e.length;n++)e[n].style.transformOrigin=`${i} ${s}`}_calculateBoundingBoxRect(t,e){const i=this._viewportRect,s=this._isRtl();let n,o,r,a,h,l;if("top"===e.overlayY)o=t.y,n=i.height-o+this._viewportMargin;else if("bottom"===e.overlayY)r=i.height-t.y+2*this._viewportMargin,n=i.height-r+this._viewportMargin;else{const e=Math.min(i.bottom-t.y+i.top,t.y),s=this._lastBoundingBoxSize.height;n=2*e,o=t.y-e,n>s&&!this._isInitialRender&&!this._growAfterOpen&&(o=t.y-s/2)}if("end"===e.overlayX&&!s||"start"===e.overlayX&&s)l=i.width-t.x+this._viewportMargin,a=t.x-this._viewportMargin;else if("start"===e.overlayX&&!s||"end"===e.overlayX&&s)h=t.x,a=i.right-t.x;else{const e=Math.min(i.right-t.x+i.left,t.x),s=this._lastBoundingBoxSize.width;a=2*e,h=t.x-e,a>s&&!this._isInitialRender&&!this._growAfterOpen&&(h=t.x-s/2)}return{top:o,left:h,bottom:r,right:l,width:a,height:n}}_setBoundingBoxStyles(t,e){const i=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(i.height=Math.min(i.height,this._lastBoundingBoxSize.height),i.width=Math.min(i.width,this._lastBoundingBoxSize.width));const s={};if(this._hasExactPosition())s.top=s.left="0",s.bottom=s.right=s.maxHeight=s.maxWidth="",s.width=s.height="100%";else{const t=this._overlayRef.getConfig().maxHeight,n=this._overlayRef.getConfig().maxWidth;s.height=(0,h.HM)(i.height),s.top=(0,h.HM)(i.top),s.bottom=(0,h.HM)(i.bottom),s.width=(0,h.HM)(i.width),s.left=(0,h.HM)(i.left),s.right=(0,h.HM)(i.right),s.alignItems="center"===e.overlayX?"center":"end"===e.overlayX?"flex-end":"flex-start",s.justifyContent="center"===e.overlayY?"center":"bottom"===e.overlayY?"flex-end":"flex-start",t&&(s.maxHeight=(0,h.HM)(t)),n&&(s.maxWidth=(0,h.HM)(n))}this._lastBoundingBoxSize=i,j(this._boundingBox.style,s)}_resetBoundingBoxStyles(){j(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){j(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){const i={},s=this._hasExactPosition(),n=this._hasFlexibleDimensions,o=this._overlayRef.getConfig();if(s){const s=this._viewportRuler.getViewportScrollPosition();j(i,this._getExactOverlayY(e,t,s)),j(i,this._getExactOverlayX(e,t,s))}else i.position="static";let r="",a=this._getOffset(e,"x"),l=this._getOffset(e,"y");a&&(r+=`translateX(${a}px) `),l&&(r+=`translateY(${l}px)`),i.transform=r.trim(),o.maxHeight&&(s?i.maxHeight=(0,h.HM)(o.maxHeight):n&&(i.maxHeight="")),o.maxWidth&&(s?i.maxWidth=(0,h.HM)(o.maxWidth):n&&(i.maxWidth="")),j(this._pane.style,i)}_getExactOverlayY(t,e,i){let s={top:"",bottom:""},n=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(n=this._pushOverlayOnScreen(n,this._overlayRect,i));let o=this._overlayContainer.getContainerElement().getBoundingClientRect().top;return n.y-=o,"bottom"===t.overlayY?s.bottom=this._document.documentElement.clientHeight-(n.y+this._overlayRect.height)+"px":s.top=(0,h.HM)(n.y),s}_getExactOverlayX(t,e,i){let s,n={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);return this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,i)),s=this._isRtl()?"end"===t.overlayX?"left":"right":"end"===t.overlayX?"right":"left","right"===s?n.right=this._document.documentElement.clientWidth-(o.x+this._overlayRect.width)+"px":n.left=(0,h.HM)(o.x),n}_getScrollVisibility(){const t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),i=this._scrollables.map(t=>t.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:b(t,i),isOriginOutsideView:v(t,i),isOverlayClipped:b(e,i),isOverlayOutsideView:v(e,i)}}_subtractOverflows(t,...e){return e.reduce((t,e)=>t-Math.max(e,0),t)}_getNarrowedViewportRect(){const t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,i=this._viewportRuler.getViewportScrollPosition();return{top:i.top+this._viewportMargin,left:i.left+this._viewportMargin,right:i.left+t-this._viewportMargin,bottom:i.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return"rtl"===this._overlayRef.getDirection()}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return"x"===e?null==t.offsetX?this._offsetX:t.offsetX:null==t.offsetY?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&(0,h.Eq)(t).forEach(t=>{""!==t&&-1===this._appliedPanelClasses.indexOf(t)&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){const t=this._origin;if(t instanceof n.SBq)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();const e=t.width||0,i=t.height||0;return{top:t.y,bottom:t.y+i,left:t.x,right:t.x+e,height:i,width:e}}}function j(t,e){for(let i in e)e.hasOwnProperty(i)&&(t[i]=e[i]);return t}function I(t){if("number"!=typeof t&&null!=t){const[e,i]=t.split(M);return i&&"px"!==i?null:parseFloat(e)}return t||null}function T(t){return{top:Math.floor(t.top),right:Math.floor(t.right),bottom:Math.floor(t.bottom),left:Math.floor(t.left),width:Math.floor(t.width),height:Math.floor(t.height)}}class H{constructor(t,e,i,s,n,o,r){this._preferredPositions=[],this._positionStrategy=new D(i,s,n,o,r).withFlexibleDimensions(!1).withPush(!1).withViewportMargin(0),this.withFallbackPosition(t,e),this.onPositionChange=this._positionStrategy.positionChanges}get positions(){return this._preferredPositions}attach(t){this._overlayRef=t,this._positionStrategy.attach(t),this._direction&&(t.setDirection(this._direction),this._direction=null)}dispose(){this._positionStrategy.dispose()}detach(){this._positionStrategy.detach()}apply(){this._positionStrategy.apply()}recalculateLastPosition(){this._positionStrategy.reapplyLastPosition()}withScrollableContainers(t){this._positionStrategy.withScrollableContainers(t)}withFallbackPosition(t,e,i,s){const n=new C(t,e,i,s);return this._preferredPositions.push(n),this._positionStrategy.withPositions(this._preferredPositions),this}withDirection(t){return this._overlayRef?this._overlayRef.setDirection(t):this._direction=t,this}withOffsetX(t){return this._positionStrategy.withDefaultOffsetX(t),this}withOffsetY(t){return this._positionStrategy.withDefaultOffsetY(t),this}withLockedPosition(t){return this._positionStrategy.withLockedPosition(t),this}withPositions(t){return this._preferredPositions=t.slice(),this._positionStrategy.withPositions(this._preferredPositions),this}setOrigin(t){return this._positionStrategy.setOrigin(t),this}}const G="cdk-global-overlay-wrapper";class z{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._leftOffset="",this._rightOffset="",this._alignItems="",this._justifyContent="",this._width="",this._height=""}attach(t){const e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(G),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._rightOffset="",this._leftOffset=t,this._justifyContent="flex-start",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._leftOffset="",this._rightOffset=t,this._justifyContent="flex-end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._justifyContent="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,i=this._overlayRef.getConfig(),{width:s,height:n,maxWidth:o,maxHeight:r}=i,a=!("100%"!==s&&"100vw"!==s||o&&"100%"!==o&&"100vw"!==o),h=!("100%"!==n&&"100vh"!==n||r&&"100%"!==r&&"100vh"!==r);t.position=this._cssPosition,t.marginLeft=a?"0":this._leftOffset,t.marginTop=h?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=this._rightOffset,a?e.justifyContent="flex-start":"center"===this._justifyContent?e.justifyContent="center":"rtl"===this._overlayRef.getConfig().direction?"flex-start"===this._justifyContent?e.justifyContent="flex-end":"flex-end"===this._justifyContent&&(e.justifyContent="flex-start"):e.justifyContent=this._justifyContent,e.alignItems=h?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;const t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,i=e.style;e.classList.remove(G),i.justifyContent=i.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}}let Y=(()=>{class t{constructor(t,e,i,s){this._viewportRuler=t,this._document=e,this._platform=i,this._overlayContainer=s}global(){return new z}connectedTo(t,e,i){return new H(e,i,t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}flexibleConnectedTo(t){return new D(t,this._viewportRuler,this._document,this._platform,this._overlayContainer)}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(s.rL),n.LFG(a.K0),n.LFG(o.t4),n.LFG(B))},t.\u0275prov=n.Yz7({factory:function(){return new t(n.LFG(s.rL),n.LFG(a.K0),n.LFG(o.t4),n.LFG(B))},token:t,providedIn:"root"}),t})(),q=0,Z=(()=>{class t{constructor(t,e,i,s,n,o,r,a,h,l,c){this.scrollStrategies=t,this._overlayContainer=e,this._componentFactoryResolver=i,this._positionBuilder=s,this._keyboardDispatcher=n,this._injector=o,this._ngZone=r,this._document=a,this._directionality=h,this._location=l,this._outsideClickDispatcher=c}create(t){const e=this._createHostElement(),i=this._createPaneElement(e),s=this._createPortalOutlet(i),n=new x(t);return n.direction=n.direction||this._directionality.value,new A(s,e,i,n,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher)}position(){return this._positionBuilder}_createPaneElement(t){const e=this._document.createElement("div");return e.id="cdk-overlay-"+q++,e.classList.add("cdk-overlay-pane"),t.appendChild(e),e}_createHostElement(){const t=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(t),t}_createPortalOutlet(t){return this._appRef||(this._appRef=this._injector.get(n.z2F)),new l.u0(t,this._componentFactoryResolver,this._appRef,this._injector,this._document)}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(k),n.LFG(B),n.LFG(n._Vd),n.LFG(Y),n.LFG(P),n.LFG(n.zs3),n.LFG(n.R0b),n.LFG(a.K0),n.LFG(r.Is),n.LFG(a.Ye),n.LFG(R))},t.\u0275prov=n.Yz7({token:t,factory:t.\u0275fac}),t})();const X={provide:new n.OlP("cdk-connected-overlay-scroll-strategy"),deps:[Z],useFactory:function(t){return()=>t.scrollStrategies.reposition()}};let N=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=n.oAB({type:t}),t.\u0275inj=n.cJS({providers:[Z,X],imports:[[r.vT,l.eL,s.Cl],s.Cl]}),t})();var V=i(24298),W=i(70781),U=i(97175),K=i(51606),$=i(57850),J=i(76323),Q=i(62431),tt=i(99454),et=i(71775),it=i(49005),st=i(57993);const nt=new Set;let ot,rt=(()=>{class t{constructor(t){this._platform=t,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):at}matchMedia(t){return this._platform.WEBKIT&&function(t){if(!nt.has(t))try{ot||(ot=document.createElement("style"),ot.setAttribute("type","text/css"),document.head.appendChild(ot)),ot.sheet&&(ot.sheet.insertRule(`@media ${t} {.fx-query-test{ }}`,0),nt.add(t))}catch(e){console.error(e)}}(t),this._matchMedia(t)}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(o.t4))},t.\u0275prov=n.Yz7({factory:function(){return new t(n.LFG(o.t4))},token:t,providedIn:"root"}),t})();function at(t){return{matches:"all"===t||""===t,media:t,addListener:()=>{},removeListener:()=>{}}}let ht=(()=>{class t{constructor(t,e){this._mediaMatcher=t,this._zone=e,this._queries=new Map,this._destroySubject=new c.x}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(t){return lt((0,h.Eq)(t)).some(t=>this._registerQuery(t).mql.matches)}observe(t){const e=lt((0,h.Eq)(t)).map(t=>this._registerQuery(t).observable);let i=(0,$.a)(e);return i=(0,J.z)(i.pipe((0,_.q)(1)),i.pipe((0,tt.T)(1),(0,et.b)(0))),i.pipe((0,it.U)(t=>{const e={matches:!1,breakpoints:{}};return t.forEach(({matches:t,query:i})=>{e.matches=e.matches||t,e.breakpoints[i]=t}),e}))}_registerQuery(t){if(this._queries.has(t))return this._queries.get(t);const e=this._mediaMatcher.matchMedia(t),i={observable:new Q.y(t=>{const i=e=>this._zone.run(()=>t.next(e));return e.addListener(i),()=>{e.removeListener(i)}}).pipe((0,st.O)(e),(0,it.U)(({matches:e})=>({query:t,matches:e})),(0,u.R)(this._destroySubject)),mql:e};return this._queries.set(t,i),i}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(rt),n.LFG(n.R0b))},t.\u0275prov=n.Yz7({factory:function(){return new t(n.LFG(rt),n.LFG(n.R0b))},token:t,providedIn:"root"}),t})();function lt(t){return t.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}function ct(t,e){if(1&t){const t=n.EpF();n.TgZ(0,"div",1),n.TgZ(1,"button",2),n.NdJ("click",function(){return n.CHM(t),n.oxw().action()}),n._uU(2),n.qZA(),n.qZA()}if(2&t){const t=n.oxw();n.xp6(2),n.Oqu(t.data.action)}}function dt(t,e){}const pt=new n.OlP("MatSnackBarData");class _t{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}}const ut=Math.pow(2,31)-1;class ft{constructor(t,e){this._overlayRef=e,this._afterDismissed=new c.x,this._afterOpened=new c.x,this._onAction=new c.x,this._dismissedByAction=!1,this.containerInstance=t,this.onAction().subscribe(()=>this.dismiss()),t._onExit.subscribe(()=>this._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,ut))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}}let mt=(()=>{class t{constructor(t,e){this.snackBarRef=t,this.data=e}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}}return t.\u0275fac=function(e){return new(e||t)(n.Y36(ft),n.Y36(pt))},t.\u0275cmp=n.Xpm({type:t,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-simple-snackbar"],decls:3,vars:2,consts:[["class","mat-simple-snackbar-action",4,"ngIf"],[1,"mat-simple-snackbar-action"],["mat-button","",3,"click"]],template:function(t,e){1&t&&(n.TgZ(0,"span"),n._uU(1),n.qZA(),n.YNc(2,ct,3,1,"div",0)),2&t&&(n.xp6(1),n.Oqu(e.data.message),n.xp6(1),n.Q6J("ngIf",e.hasAction))},directives:[a.O5,W.lW],styles:[".mat-simple-snackbar{display:flex;justify-content:space-between;align-items:center;line-height:20px;opacity:1}.mat-simple-snackbar-action{flex-shrink:0;margin:-8px -8px -8px 8px}.mat-simple-snackbar-action button{max-height:36px;min-width:0}[dir=rtl] .mat-simple-snackbar-action{margin-left:-8px;margin-right:8px}\n"],encapsulation:2,changeDetection:0}),t})();const gt={snackBarState:(0,U.X$)("state",[(0,U.SB)("void, hidden",(0,U.oB)({transform:"scale(0.8)",opacity:0})),(0,U.SB)("visible",(0,U.oB)({transform:"scale(1)",opacity:1})),(0,U.eR)("* => visible",(0,U.jt)("150ms cubic-bezier(0, 0, 0.2, 1)")),(0,U.eR)("* => void, * => hidden",(0,U.jt)("75ms cubic-bezier(0.4, 0.0, 1, 1)",(0,U.oB)({opacity:0})))])};let yt=(()=>{class t extends l.en{constructor(t,e,i,s,n){super(),this._ngZone=t,this._elementRef=e,this._changeDetectorRef=i,this._platform=s,this.snackBarConfig=n,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new c.x,this._onExit=new c.x,this._onEnter=new c.x,this._animationState="void",this.attachDomPortal=t=>(this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachDomPortal(t)),this._live="assertive"!==n.politeness||n.announcementMessage?"off"===n.politeness?"off":"polite":"assertive",this._platform.FIREFOX&&("polite"===this._live&&(this._role="status"),"assertive"===this._live&&(this._role="alert"))}attachComponentPortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this._assertNotAttached(),this._applySnackBarClasses(),this._portalOutlet.attachTemplatePortal(t)}onAnimationEnd(t){const{fromState:e,toState:i}=t;if(("void"===i&&"void"!==e||"hidden"===i)&&this._completeExit(),"visible"===i){const t=this._onEnter;this._ngZone.run(()=>{t.next(),t.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._animationState="hidden",this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId),this._onExit}ngOnDestroy(){this._destroyed=!0,this._completeExit()}_completeExit(){this._ngZone.onMicrotaskEmpty.pipe((0,_.q)(1)).subscribe(()=>{this._onExit.next(),this._onExit.complete()})}_applySnackBarClasses(){const t=this._elementRef.nativeElement,e=this.snackBarConfig.panelClass;e&&(Array.isArray(e)?e.forEach(e=>t.classList.add(e)):t.classList.add(e)),"center"===this.snackBarConfig.horizontalPosition&&t.classList.add("mat-snack-bar-center"),"top"===this.snackBarConfig.verticalPosition&&t.classList.add("mat-snack-bar-top")}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{const t=this._elementRef.nativeElement.querySelector("[aria-hidden]"),e=this._elementRef.nativeElement.querySelector("[aria-live]");if(t&&e){let i=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&t.contains(document.activeElement)&&(i=document.activeElement),t.removeAttribute("aria-hidden"),e.appendChild(t),null==i||i.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}}return t.\u0275fac=function(e){return new(e||t)(n.Y36(n.R0b),n.Y36(n.SBq),n.Y36(n.sBO),n.Y36(o.t4),n.Y36(_t))},t.\u0275cmp=n.Xpm({type:t,selectors:[["snack-bar-container"]],viewQuery:function(t,e){if(1&t&&n.Gf(l.Pl,7),2&t){let t;n.iGM(t=n.CRH())&&(e._portalOutlet=t.first)}},hostAttrs:[1,"mat-snack-bar-container"],hostVars:1,hostBindings:function(t,e){1&t&&n.WFA("@state.done",function(t){return e.onAnimationEnd(t)}),2&t&&n.d8E("@state",e._animationState)},features:[n.qOj],decls:3,vars:2,consts:[["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(t,e){1&t&&(n.TgZ(0,"div",0),n.YNc(1,dt,0,0,"ng-template",1),n.qZA(),n._UZ(2,"div")),2&t&&(n.xp6(2),n.uIk("aria-live",e._live)("role",e._role))},directives:[l.Pl],styles:[".mat-snack-bar-container{border-radius:4px;box-sizing:border-box;display:block;margin:24px;max-width:33vw;min-width:344px;padding:14px 16px;min-height:48px;transform-origin:center}.cdk-high-contrast-active .mat-snack-bar-container{border:solid 1px}.mat-snack-bar-handset{width:100%}.mat-snack-bar-handset .mat-snack-bar-container{margin:8px;max-width:100%;min-width:0;width:100%}\n"],encapsulation:2,data:{animation:[gt.snackBarState]}}),t})(),vt=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=n.oAB({type:t}),t.\u0275inj=n.cJS({imports:[[N,l.eL,a.ez,W.ot,V.BQ],V.BQ]}),t})();const bt=new n.OlP("mat-snack-bar-default-options",{providedIn:"root",factory:function(){return new _t}});let wt=(()=>{class t{constructor(t,e,i,s,n,o){this._overlay=t,this._live=e,this._injector=i,this._breakpointObserver=s,this._parentSnackBar=n,this._defaultConfig=o,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=mt,this.snackBarContainerComponent=yt,this.handsetCssClass="mat-snack-bar-handset"}get _openedSnackBarRef(){const t=this._parentSnackBar;return t?t._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(t){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=t:this._snackBarRefAtThisLevel=t}openFromComponent(t,e){return this._attach(t,e)}openFromTemplate(t,e){return this._attach(t,e)}open(t,e="",i){const s=Object.assign(Object.assign({},this._defaultConfig),i);return s.data={message:t,action:e},s.announcementMessage===t&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(t,e){const i=n.zs3.create({parent:e&&e.viewContainerRef&&e.viewContainerRef.injector||this._injector,providers:[{provide:_t,useValue:e}]}),s=new l.C5(this.snackBarContainerComponent,e.viewContainerRef,i),o=t.attach(s);return o.instance.snackBarConfig=e,o.instance}_attach(t,e){const i=Object.assign(Object.assign(Object.assign({},new _t),this._defaultConfig),e),s=this._createOverlay(i),o=this._attachSnackBarContainer(s,i),r=new ft(o,s);if(t instanceof n.Rgc){const e=new l.UE(t,null,{$implicit:i.data,snackBarRef:r});r.instance=o.attachTemplatePortal(e)}else{const e=this._createInjector(i,r),s=new l.C5(t,void 0,e),n=o.attachComponentPortal(s);r.instance=n.instance}return this._breakpointObserver.observe("(max-width: 599.98px) and (orientation: portrait)").pipe((0,u.R)(s.detachments())).subscribe(t=>{const e=s.overlayElement.classList;t.matches?e.add(this.handsetCssClass):e.remove(this.handsetCssClass)}),i.announcementMessage&&o._onAnnounce.subscribe(()=>{this._live.announce(i.announcementMessage,i.politeness)}),this._animateSnackBar(r,i),this._openedSnackBarRef=r,this._openedSnackBarRef}_animateSnackBar(t,e){t.afterDismissed().subscribe(()=>{this._openedSnackBarRef==t&&(this._openedSnackBarRef=null),e.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{t.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):t.containerInstance.enter(),e.duration&&e.duration>0&&t.afterOpened().subscribe(()=>t._dismissAfter(e.duration))}_createOverlay(t){const e=new x;e.direction=t.direction;let i=this._overlay.position().global();const s="rtl"===t.direction,n="left"===t.horizontalPosition||"start"===t.horizontalPosition&&!s||"end"===t.horizontalPosition&&s,o=!n&&"center"!==t.horizontalPosition;return n?i.left("0"):o?i.right("0"):i.centerHorizontally(),"top"===t.verticalPosition?i.top("0"):i.bottom("0"),e.positionStrategy=i,this._overlay.create(e)}_createInjector(t,e){return n.zs3.create({parent:t&&t.viewContainerRef&&t.viewContainerRef.injector||this._injector,providers:[{provide:ft,useValue:e},{provide:pt,useValue:t.data}]})}}return t.\u0275fac=function(e){return new(e||t)(n.LFG(Z),n.LFG(K.Kd),n.LFG(n.zs3),n.LFG(ht),n.LFG(t,12),n.LFG(bt))},t.\u0275prov=n.Yz7({factory:function(){return new t(n.LFG(Z),n.LFG(K.Kd),n.LFG(n.gxx),n.LFG(ht),n.LFG(t,12),n.LFG(bt))},token:t,providedIn:vt}),t})()},53306:function(t,e,i){t.exports=i(99876).version},34622:function(t,e,i){"use strict";i.d(e,{Q:function(){return B}});var s=i(2316),n=i(39349),o=i(53306),r=i.n(o),a=i(30584),h=i(22184),l=i(3098),c=i(44541);function d(t){return t&&t.origin?t.origin:"https://stackblitz.com"}function p(){return Math.random().toString(36).substring(7)}function _(t){var e="";return t?(t.forceEmbedLayout&&(e+="embed=1"),t.clickToLoad&&(e+=(e.length?"&":"")+"ctl=1"),t.openFile&&(e+=(e.length?"&":"")+"file="+t.openFile),!t.view||"preview"!==t.view&&"editor"!==t.view||(e+=(e.length?"&":"")+"view="+t.view),t.theme&&(e+=(e.length?"&":"")+"theme="+t.theme),t.hideExplorer&&(e+=(e.length?"&":"")+"hideExplorer=1"),t.hideNavigation&&(e+=(e.length?"&":"")+"hideNavigation=1;"),t.hideDevTools&&(e+=(e.length?"&":"")+"hidedevtools=1"),t.initialPath&&(e+=(e.length?"&":"")+"initialpath="+encodeURIComponent(t.initialPath)),"number"==typeof t.devToolsHeight&&t.devToolsHeight>0&&t.devToolsHeight<100&&(e+=(e.length?"&":"")+"devtoolsheight="+t.devToolsHeight),e.length?"?"+e:e):e}function u(t,e,i){if(null===t.parentNode)throw new Error("Invalid Element");e.id=t.id,function(t,e){e&&(e.hasOwnProperty("height")&&(t.height=""+e.height),e.hasOwnProperty("width")&&(t.width=""+e.width)),t.height||(t.height="300"),t.width||t.setAttribute("style","width:100%;")}(e,i),t.parentNode.replaceChild(e,t)}function f(t){if("string"==typeof t){var e=document.getElementById(t);if(null!==e)return e}else if(t instanceof HTMLElement)return t;throw new Error("Invalid Element")}function m(t){return t&&!1===t.newWindow?"_self":"_blank"}var g=function(t){var e=this;this.pending={},this.port=t,this.port.onmessage=function(t){if(t.data.payload.__reqid){var i=t.data.payload.__reqid,s=t.data.payload.__success;if(e.pending[i]){if(delete t.data.payload.__reqid,delete t.data.payload.__success,s){var n=0===Object.keys(t.data.payload).length&&t.data.payload.constructor===Object?null:t.data.payload;e.pending[i].resolve(n)}else e.pending[i].reject(t.data.payload.error?t.data.type+": "+t.data.payload.error:t.data.type);delete e.pending[i]}}}};g.prototype.request=function(t){var e=this,i=p();return new Promise(function(s,n){e.pending[i]={resolve:s,reject:n},t.payload.__reqid=i,e.port.postMessage(t)})};var y=function(t,e){var i=this;this.rdc=new g(t),this.preview={},Object.defineProperty(this.preview,"origin",{value:e.previewOrigin,writable:!1}),this.editor={openFile:function(t){return i.rdc.request({type:"SDK_OPEN_FILE",payload:{path:t}})}}};y.prototype.applyFsDiff=function(t){return this.rdc.request({type:"SDK_APPLY_FS_DIFF",payload:t})},y.prototype.getFsSnapshot=function(){return this.rdc.request({type:"SDK_GET_FS_SNAPSHOT",payload:{}})},y.prototype.getDependencies=function(){return this.rdc.request({type:"SDK_GET_DEPS_SNAPSHOT",payload:{}})};var v=[],b=function(t){var e=this;this.id=p(),this.element=t,this.pending=new Promise(function(t,i){var s=function(i){i.data.action&&"SDK_INIT_SUCCESS"===i.data.action&&i.data.id===e.id&&(e.vm=new y(i.ports[0],i.data.payload),t(e.vm),o())},n=function(){e.element.contentWindow&&e.element.contentWindow.postMessage({action:"SDK_INIT",id:e.id},"*")};function o(){window.clearInterval(a),window.removeEventListener("message",s)}window.addEventListener("message",s),n();var r=0,a=window.setInterval(function(){if(e.vm)o();else{if(r>=20)return o(),i("Timeout: Unable to establish a connection with the StackBlitz VM"),void v.forEach(function(t,i){t.id===e.id&&v.splice(i,1)});r++,n()}},500)}),v.push(this)},w=["typescript","create-react-app","angular-cli","javascript","polymer","vue"];function k(t,e){var i=document.createElement("input");return i.type="hidden",i.name=t,i.value=e,i}function x(t){-1===w.indexOf(t.template)&&console.warn("Unsupported project template, must be one of: "+w.join(", "));var e=document.createElement("form");return e.method="POST",e.setAttribute("style","display:none;"),e.appendChild(k("project[title]",t.title)),e.appendChild(k("project[description]",t.description)),e.appendChild(k("project[template]",t.template)),t.tags&&t.tags.forEach(function(t){e.appendChild(k("project[tags][]",t))}),t.dependencies&&e.appendChild(k("project[dependencies]",JSON.stringify(t.dependencies))),t.settings&&e.appendChild(k("project[settings]",JSON.stringify(t.settings))),Object.keys(t.files).forEach(function(i){e.appendChild(k("project[files]["+i+"]",t.files[i]))}),e}var C={connect:function(t){if(!t||!t.contentWindow)return Promise.reject("Provided element is not an iframe.");var e=function(t){var e=t instanceof Element?"element":"id";return v.find(function(i){return i[e]===t})||null}(t);return e?e.pending:new b(t).pending},openGithubProject:function(t,e){window.open(d(e)+"/github/"+t+_(e),m(e))},openProject:function(t,e){!function(t,e){var i=x(t);i.action=d(e)+"/run"+_(e),i.target=m(e),document.body.appendChild(i),i.submit(),document.body.removeChild(i)}(t,e)},openProjectId:function(t,e){window.open(d(e)+"/edit/"+t+_(e),m(e))},embedGithubProject:function(t,e,i){var s=f(t),n=document.createElement("iframe");return n.src=d(i)+"/github/"+e+_(i),u(s,n,i),C.connect(n)},embedProject:function(t,e,i){var s=f(t),n=function(t,e){var i=x(t);return i.action=d(e)+"/run"+_(e),i.id="sb","<html><head><title></title></head><body>"+i.outerHTML+"<script>document.getElementById('sb').submit();<\/script></body></html>"}(e,i),o=document.createElement("iframe");return u(s,o,i),o.contentDocument&&o.contentDocument.write(n),C.connect(o)},embedProjectId:function(t,e,i){var s=f(t),n=document.createElement("iframe");return n.src=d(i)+"/edit/"+e+_(i),u(s,n,i),C.connect(n)}},S=C;let E=(()=>{class t{openProject(t){const e={ts:"ts",typescript:"ts"}[t.language]||"js";S.openProject({files:{"index.html":t.html||"",[`index.${e}`]:t.code},title:"RxJS example",description:"RxJS example",template:"ts"===e?"typescript":"javascript",tags:["rxjs","demo"],dependencies:t.dependencies,settings:{compile:{trigger:"auto",action:"refresh",clearConsole:!0}}},{devToolsHeight:50})}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=s.Yz7({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var P=i(54364);const R=["codeContainer"];function O(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",4),s.NdJ("click",function(){return s.CHM(t),s.oxw().doCopy()}),s._uU(1,"\n "),s.TgZ(2,"span",5),s._uU(3,"content_copy"),s.qZA(),s._uU(4,"\n "),s.qZA()}if(2&t){const t=s.oxw();s.uIk("aria-label",t.ariaLabelCopy)}}function L(t,e){if(1&t){const t=s.EpF();s.TgZ(0,"button",6),s.NdJ("click",function(){return s.CHM(t),s.oxw().editInStackBlitz()}),s._uU(1,"\n "),s.TgZ(2,"span",5),s._uU(3,"open_in_new"),s.qZA(),s._uU(4,"\n "),s.qZA()}if(2&t){const t=s.oxw();s.uIk("aria-label",t.ariaLabelEdit)}}let B=(()=>{class t{constructor(t,e,i,n,o){this.snackbar=t,this.pretty=e,this.copier=i,this.logger=n,this.stackblitz=o,this.ariaLabelCopy="",this.ariaLabelEdit="",this.codeFormatted=new s.vpe}set code(t){this._code=t,this._code&&this._code.trim()?this.formatDisplayedCode():this.showMissingCodeMessage()}get code(){return this._code}set header(t){this._header=t,this.ariaLabelCopy=this.header?`Copy code snippet from ${this.header}`:"",this.ariaLabelEdit=this.header?`Edit code snippet from ${this.header} in StackBlitz`:""}get header(){return this._header}ngOnChanges(){this.code&&this.formatDisplayedCode()}formatDisplayedCode(){const t=function(t){let e=Number.MAX_VALUE;const i=t.split("\n");return i.forEach(t=>{const i=t.search(/\S/);-1!==i&&(e=Math.min(i,e))}),i.map(t=>t.substr(e)).join("\n").trim()}(this.code);this.setCodeHtml(t),this.codeText=this.getCodeText(),this.pretty.formatCode(t,this.language,this.getLinenums(t)).pipe((0,n.b)(()=>this.codeFormatted.emit())).subscribe(t=>this.setCodeHtml(t),t=>{})}showMissingCodeMessage(){const t=this.path?this.path+(this.region?"#"+this.region:""):"";this.setCodeHtml(`<p class="code-missing">The code sample is missing${t?` for\n${t}`:"."}</p>`)}setCodeHtml(t){this.codeContainer.nativeElement.innerHTML=t}getCodeText(){return this.codeContainer.nativeElement.textContent}getHtmlFromCode(t){const e=new RegExp("// html: (.*)"),i=t.match(e);return i?i[1]:""}doCopy(){const t=this.codeText;this.copier.copyText(t)?(this.logger.log("Copied code to clipboard:",t),this.snackbar.open("Code Copied","",{duration:800})):(this.logger.error(new Error(`ERROR copying code to clipboard: "${t}"`)),this.snackbar.open("Copy failed. Please try again!","",{duration:800}))}editInStackBlitz(){this.stackblitz.openProject({code:this.codeText,language:this.language,dependencies:{rxjs:r()},html:this.getHtmlFromCode(this.codeText)})}getLinenums(t){const e="boolean"==typeof this.linenums?this.linenums:"true"===this.linenums||"false"!==this.linenums&&("string"==typeof this.linenums?parseInt(this.linenums,10):this.linenums);return null==e||isNaN(e)?(t.match(/\n/g)||[]).length>10:e}}return t.\u0275fac=function(e){return new(e||t)(s.Y36(a.ux),s.Y36(h.t),s.Y36(l.u),s.Y36(c.Y),s.Y36(E))},t.\u0275cmp=s.Xpm({type:t,selectors:[["aio-code"]],viewQuery:function(t,e){if(1&t&&s.Gf(R,7),2&t){let t;s.iGM(t=s.CRH())&&(e.codeContainer=t.first)}},inputs:{hideCopy:"hideCopy",language:"language",linenums:"linenums",path:"path",region:"region",header:"header"},outputs:{codeFormatted:"codeFormatted"},features:[s.TTD],decls:9,vars:5,consts:[["class","material-icons copy-button no-print","title","Copy code snippet",3,"click",4,"ngIf"],["class","material-icons edit-button no-print","title","Edit in StackBlitz",3,"click",4,"ngIf"],[1,"animated","fadeIn"],["codeContainer",""],["title","Copy code snippet",1,"material-icons","copy-button","no-print",3,"click"],["aria-hidden","true"],["title","Edit in StackBlitz",1,"material-icons","edit-button","no-print",3,"click"]],template:function(t,e){1&t&&(s.TgZ(0,"pre"),s._uU(1," "),s.YNc(2,O,5,1,"button",0),s._uU(3,"\n "),s.YNc(4,L,5,1,"button",1),s._uU(5,"\n "),s._UZ(6,"code",2,3),s._uU(8,"\n "),s.qZA()),2&t&&(s.Gre("prettyprint lang-",e.language,""),s.xp6(2),s.Q6J("ngIf",!e.hideCopy),s.xp6(2),s.Q6J("ngIf",!e.hideCopy))},directives:[P.O5],encapsulation:2}),t})()},99835:function(t,e,i){"use strict";i.d(e,{r:function(){return h}});var s=i(54364),n=i(30584),o=i(22184),r=i(3098),a=i(2316);let h=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=a.oAB({type:t}),t.\u0275inj=a.cJS({providers:[o.t,r.u],imports:[[s.ez,n.ZX]]}),t})()},22184:function(t,e,i){"use strict";i.d(e,{t:function(){return l}});var s=i(6376),n=i(31635),o=i(49005),r=i(80993),a=i(2316),h=i(44541);let l=(()=>{class t{constructor(t){this.logger=t,this.prettyPrintOne=(0,s.Dp)(this.getPrettyPrintOne()).pipe((0,n.B)())}getPrettyPrintOne(){const t=window.prettyPrintOne;return t?Promise.resolve(t):i.e(176).then(i.t.bind(i,53176,23)).then(()=>window.prettyPrintOne,t=>{const e=`Cannot get prettify.js from server: ${t.message}`;return this.logger.error(new Error(e)),()=>{throw new Error(e)}})}formatCode(t,e,i){return this.prettyPrintOne.pipe((0,o.U)(s=>{try{return s(t,e,i)}catch(n){const e=`Could not format code that begins '${t.substr(0,50)}...'.`;throw console.error(e,n),new Error(e)}}),(0,r.P)())}}return t.\u0275fac=function(e){return new(e||t)(a.LFG(h.Y))},t.\u0275prov=a.Yz7({token:t,factory:t.\u0275fac}),t})()},3098:function(t,e,i){"use strict";i.d(e,{u:function(){return n}});var s=i(2316);let n=(()=>{class t{createFake(t){const e="rtl"===document.documentElement.getAttribute("dir");this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[e?"right":"left"]="-9999px";const i=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=i+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=t,document.body.appendChild(this.fakeElem),this.fakeElem.select(),this.fakeElem.setSelectionRange(0,this.fakeElem.value.length)}removeFake(){this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}copyText(t){try{return this.createFake(t),document.execCommand("copy")}catch(e){return!1}finally{this.removeFake()}}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=s.Yz7({token:t,factory:t.\u0275fac}),t})()},99876:function(t){"use strict";t.exports={version:"7.5.2"}}}]);
//# sourceMappingURL=913-es2015.024772a488b57619a8de.js.map