blob: d7e945fa568818c006892fca07a092059077fdee [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(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@angular/flex-layout/core"),require("@angular/cdk/bidi"),require("rxjs"),require("rxjs/operators")):"function"==typeof define&&define.amd?define("@angular/flex-layout/flex",["exports","@angular/core","@angular/flex-layout/core","@angular/cdk/bidi","rxjs","rxjs/operators"],t):t((e.ng=e.ng||{},e.ng.flexLayout=e.ng.flexLayout||{},e.ng.flexLayout.flex={}),e.ng.core,e.ng.flexLayout.core,e.ng.cdk.bidi,e.rxjs,e.rxjs.operators)}(this,function(e,t,r,l,n,i){"use strict";function a(e,t){function r(){this.constructor=e}h(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function o(e){var t=s(e);return x(t[0],t[1],t[2])}function s(e){e=e?e.toLowerCase():"";var t=e.split(" "),r=t[0],l=t[1],n=t[2];return F.find(function(e){return e===r})||(r=F[0]),l===v&&(l=n!==v?n:"",n=v),[r,u(l),!!n]}function f(e){return s(e)[0].indexOf("row")>-1}function u(e){if(e)switch(e.toLowerCase()){case"reverse":case"wrap-reverse":case"reverse-wrap":e="wrap-reverse";break;case"no":case"none":case"nowrap":e="nowrap";break;default:e="wrap"}return e}function x(e,t,r){return void 0===t&&(t=null),void 0===r&&(r=!1),{display:r?"inline-flex":"flex","box-sizing":"border-box","flex-direction":e,"flex-wrap":t||null}}function c(e,t){var r="0px",l=e,n="0px";return"rtl"===t?n=e:r=e,{padding:"0px "+r+" "+l+" "+n}}function y(e,t){var r="0px",l="-"+e,n="0px";return"rtl"===t?n="-"+e:r="-"+e,{margin:"0px "+r+" "+l+" "+n}}function p(e,t){switch(t){case"column":return"margin-bottom";case"column-reverse":return"margin-top";case"row":return"rtl"===e?"margin-left":"margin-right";case"row-reverse":return"rtl"===e?"margin-right":"margin-left";default:return"rtl"===e?"margin-left":"margin-right"}}function d(e,t){var r=p(t.directionality,t.layout),l=m({},A);return l[r]=e,l}function g(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(null==e)throw TypeError("Cannot convert undefined or null to object");for(var l=0,n=t;l<n.length;l++){var i=n[l];if(null!=i)for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a])}return e}var h=function(e,t){return(h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},m=function(){return m=Object.assign||function(e){for(var t,r=1,l=arguments.length;r<l;r++){t=arguments[r];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},m.apply(this,arguments)},v="inline",F=["row","column","row-reverse","column-reverse"],b=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a(r,e),r.prototype.buildStyles=function(e){return o(e)},r.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],r.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new r},token:r,providedIn:"root"}),r}(r.StyleBuilder),w=["fxLayout","fxLayout.xs","fxLayout.sm","fxLayout.md","fxLayout.lg","fxLayout.xl","fxLayout.lt-sm","fxLayout.lt-md","fxLayout.lt-lg","fxLayout.lt-xl","fxLayout.gt-xs","fxLayout.gt-sm","fxLayout.gt-md","fxLayout.gt-lg"],L=function(e){function l(t,r,l,n){var i=e.call(this,t,l,r,n)||this;return i.elRef=t,i.styleUtils=r,i.styleBuilder=l,i.marshal=n,i.DIRECTIVE_KEY="layout",i.styleCache=S,i.init(),i}return a(l,e),l.ctorParameters=function(){return[{type:t.ElementRef},{type:r.StyleUtils},{type:b,decorators:[{type:t.Optional}]},{type:r.MediaMarshaller}]},l}(r.BaseDirective2),O=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=w,t}return a(r,e),r.decorators=[{type:t.Directive,args:[{selector:"\n [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md],\n [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md],\n [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm],\n [fxLayout.gt-md], [fxLayout.gt-lg]\n",inputs:w}]}],r}(L),S=new Map,A={"margin-left":null,"margin-right":null,"margin-top":null,"margin-bottom":null},I=function(e){function l(t){var r=e.call(this)||this;return r._styler=t,r}return a(l,e),l.prototype.buildStyles=function(e,t){return e.endsWith(B)?(e=e.slice(0,e.indexOf(B)),y(e,t.directionality)):{}},l.prototype.sideEffect=function(e,t,r){var l=r.items;if(e.endsWith(B)){e=e.slice(0,e.indexOf(B));var n=c(e,r.directionality);this._styler.applyStyleToElements(n,r.items)}else{var i=l.pop(),a=d(e,r);this._styler.applyStyleToElements(a,l),this._styler.applyStyleToElements(A,[i])}},l.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],l.ctorParameters=function(){return[{type:r.StyleUtils}]},l.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new l(t.ɵɵinject(r.StyleUtils))},token:l,providedIn:"root"}),l}(r.StyleBuilder),j=["fxLayoutGap","fxLayoutGap.xs","fxLayoutGap.sm","fxLayoutGap.md","fxLayoutGap.lg","fxLayoutGap.xl","fxLayoutGap.lt-sm","fxLayoutGap.lt-md","fxLayoutGap.lt-lg","fxLayoutGap.lt-xl","fxLayoutGap.gt-xs","fxLayoutGap.gt-sm","fxLayoutGap.gt-md","fxLayoutGap.gt-lg"],D=function(e){function o(t,r,l,a,o,s){var f=e.call(this,t,o,a,s)||this;f.elRef=t,f.zone=r,f.directionality=l,f.styleUtils=a,f.styleBuilder=o,f.marshal=s,f.layout="row",f.DIRECTIVE_KEY="layout-gap",f.observerSubject=new n.Subject;var u=[f.directionality.change,f.observerSubject.asObservable()];return f.init(u),f.marshal.trackValue(f.nativeElement,"layout").pipe(i.takeUntil(f.destroySubject)).subscribe(f.onLayoutChange.bind(f)),f}return a(o,e),Object.defineProperty(o.prototype,"childrenNodes",{get:function(){for(var e=this.nativeElement.children,t=[],r=e.length;r--;)t[r]=e[r];return t},enumerable:!0,configurable:!0}),o.prototype.ngAfterContentInit=function(){this.buildChildObservable(),this.triggerUpdate()},o.prototype.ngOnDestroy=function(){e.prototype.ngOnDestroy.call(this),this.observer&&this.observer.disconnect()},o.prototype.onLayoutChange=function(e){var t=this,r=e.value,l=r.split(" ");this.layout=l[0],F.find(function(e){return e===t.layout})||(this.layout="row"),this.triggerUpdate()},o.prototype.updateWithValue=function(e){var t=this,r=this.childrenNodes.filter(function(e){return 1===e.nodeType&&t.willDisplay(e)}).sort(function(e,r){var l=+t.styler.lookupStyle(e,"order"),n=+t.styler.lookupStyle(r,"order");return isNaN(l)||isNaN(n)||l===n?0:l>n?1:-1});if(r.length>0){var l=this.directionality.value,n=this.layout;"row"===n&&"rtl"===l?this.styleCache=C:"row"===n&&"rtl"!==l?this.styleCache=M:"column"===n&&"rtl"===l?this.styleCache=E:"column"===n&&"rtl"!==l&&(this.styleCache=G),this.addStyles(e,{directionality:l,items:r,layout:n})}},o.prototype.clearStyles=function(){var t,r=Object.keys(this.mru).length>0,l=r?"padding":p(this.directionality.value,this.layout);r&&e.prototype.clearStyles.call(this),this.styleUtils.applyStyleToElements((t={},t[l]="",t),this.childrenNodes)},o.prototype.willDisplay=function(e){var t=this.marshal.getValue(e,"show-hide");return!0===t||void 0===t&&"none"!==this.styleUtils.lookupStyle(e,"display")},o.prototype.buildChildObservable=function(){var e=this;this.zone.runOutsideAngular(function(){"undefined"!=typeof MutationObserver&&(e.observer=new MutationObserver(function(t){var r=function(e){return e.addedNodes&&e.addedNodes.length>0||e.removedNodes&&e.removedNodes.length>0};t.some(r)&&e.observerSubject.next()}),e.observer.observe(e.nativeElement,{childList:!0}))})},o.ctorParameters=function(){return[{type:t.ElementRef},{type:t.NgZone},{type:l.Directionality},{type:r.StyleUtils},{type:I,decorators:[{type:t.Optional}]},{type:r.MediaMarshaller}]},o}(r.BaseDirective2),k=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=j,t}return a(r,e),r.decorators=[{type:t.Directive,args:[{selector:"\n [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md],\n [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md],\n [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm],\n [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]\n",inputs:j}]}],r}(D),C=new Map,E=new Map,M=new Map,G=new Map,B=" grid",U=function(e){function l(t){var r=e.call(this)||this;return r.layoutConfig=t,r}return a(l,e),l.prototype.buildStyles=function(e,t){var r=e.split(" "),l=r[0],n=r[1],i=r.slice(2),a=i.join(" "),o=t.direction.indexOf("column")>-1?"column":"row",s=f(o)?"max-width":"max-height",u=f(o)?"min-width":"min-height",x=String(a).indexOf("calc")>-1,c=x||"auto"===a,y=String(a).indexOf("%")>-1&&!x,p=String(a).indexOf("px")>-1||String(a).indexOf("rem")>-1||String(a).indexOf("em")>-1||String(a).indexOf("vw")>-1||String(a).indexOf("vh")>-1,d=x||p;l="0"==l?0:l,n="0"==n?0:n;var h=!l&&!n,m={},v={"max-width":null,"max-height":null,"min-width":null,"min-height":null};switch(a||""){case"":var F=!1!==this.layoutConfig.useColumnBasisZero;a="row"===o?"0%":F?"0.000000001px":"auto";break;case"initial":case"nogrow":l=0,a="auto";break;case"grow":a="100%";break;case"noshrink":n=0,a="auto";break;case"auto":break;case"none":l=0,n=0,a="auto";break;default:d||y||isNaN(a)||(a+="%"),"0%"===a&&(d=!0),"0px"===a&&(a="0%"),m=x?g(v,{"flex-grow":l,"flex-shrink":n,"flex-basis":d?a:"100%"}):g(v,{flex:l+" "+n+" "+(d?a:"100%")})}return m.flex||m["flex-grow"]||(m=x?g(v,{"flex-grow":l,"flex-shrink":n,"flex-basis":a}):g(v,{flex:l+" "+n+" "+a})),"0%"!==a&&"0px"!==a&&"0.000000001px"!==a&&"auto"!==a&&(m[u]=h||d&&l?a:null,m[s]=h||!c&&n?a:null),m[u]||m[s]?t.hasWrap&&(m[x?"flex-basis":"flex"]=m[s]?x?m[s]:l+" "+n+" "+m[s]:x?m[u]:l+" "+n+" "+m[u]):m=x?g(v,{"flex-grow":l,"flex-shrink":n,"flex-basis":a}):g(v,{flex:l+" "+n+" "+a}),g(m,{"box-sizing":"border-box"})},l.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],l.ctorParameters=function(){return[{type:void 0,decorators:[{type:t.Inject,args:[r.LAYOUT_CONFIG]}]}]},l.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new l(t.ɵɵinject(r.LAYOUT_CONFIG))},token:l,providedIn:"root"}),l}(r.StyleBuilder),R=["fxFlex","fxFlex.xs","fxFlex.sm","fxFlex.md","fxFlex.lg","fxFlex.xl","fxFlex.lt-sm","fxFlex.lt-md","fxFlex.lt-lg","fxFlex.lt-xl","fxFlex.gt-xs","fxFlex.gt-sm","fxFlex.gt-md","fxFlex.gt-lg"],_=function(e){function l(t,r,l,n,a){var o=e.call(this,t,n,r,a)||this;return o.elRef=t,o.styleUtils=r,o.layoutConfig=l,o.styleBuilder=n,o.marshal=a,o.DIRECTIVE_KEY="flex",o.direction="",o.wrap=!1,o.flexGrow="1",o.flexShrink="1",o.init(),o.parentElement&&(o.marshal.trackValue(o.parentElement,"layout").pipe(i.takeUntil(o.destroySubject)).subscribe(o.onLayoutChange.bind(o)),o.marshal.trackValue(o.nativeElement,"layout-align").pipe(i.takeUntil(o.destroySubject)).subscribe(o.triggerReflow.bind(o))),o}return a(l,e),Object.defineProperty(l.prototype,"shrink",{get:function(){return this.flexShrink},set:function(e){this.flexShrink=e||"1",this.triggerReflow()},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"grow",{get:function(){return this.flexGrow},set:function(e){this.flexGrow=e||"1",this.triggerReflow()},enumerable:!0,configurable:!0}),l.prototype.onLayoutChange=function(e){var t=e.value,r=t.split(" ");this.direction=r[0],this.wrap=void 0!==r[1]&&"wrap"===r[1],this.triggerUpdate()},l.prototype.updateWithValue=function(e){var t=!1!==this.layoutConfig.addFlexToParent;this.direction||(this.direction=this.getFlexFlowDirection(this.parentElement,t));var l=this.direction,n=l.startsWith("row"),i=this.wrap;n&&i?this.styleCache=T:n&&!i?this.styleCache=P:!n&&i?this.styleCache=Y:n||i||(this.styleCache=V);var a=String(e).replace(";",""),o=r.validateBasis(a,this.flexGrow,this.flexShrink);this.addStyles(o.join(" "),{direction:l,hasWrap:i})},l.prototype.triggerReflow=function(){var e=this.activatedValue;if(void 0!==e){var t=r.validateBasis(e,this.flexGrow,this.flexShrink);this.marshal.updateElement(this.nativeElement,this.DIRECTIVE_KEY,t.join(" "))}},l.ctorParameters=function(){return[{type:t.ElementRef},{type:r.StyleUtils},{type:void 0,decorators:[{type:t.Inject,args:[r.LAYOUT_CONFIG]}]},{type:U},{type:r.MediaMarshaller}]},l.propDecorators={shrink:[{type:t.Input,args:["fxShrink"]}],grow:[{type:t.Input,args:["fxGrow"]}]},l}(r.BaseDirective2),N=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=R,t}return a(r,e),r.decorators=[{type:t.Directive,args:[{inputs:R,selector:"\n [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md],\n [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md],\n [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm],\n [fxFlex.gt-md], [fxFlex.gt-lg]\n"}]}],r}(_),P=new Map,V=new Map,T=new Map,Y=new Map,W=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a(r,e),r.prototype.buildStyles=function(e){return{order:e&&parseInt(e,10)||""}},r.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],r.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new r},token:r,providedIn:"root"}),r}(r.StyleBuilder),K=["fxFlexOrder","fxFlexOrder.xs","fxFlexOrder.sm","fxFlexOrder.md","fxFlexOrder.lg","fxFlexOrder.xl","fxFlexOrder.lt-sm","fxFlexOrder.lt-md","fxFlexOrder.lt-lg","fxFlexOrder.lt-xl","fxFlexOrder.gt-xs","fxFlexOrder.gt-sm","fxFlexOrder.gt-md","fxFlexOrder.gt-lg"],q=function(e){function l(t,r,l,n){var i=e.call(this,t,l,r,n)||this;return i.elRef=t,i.styleUtils=r,i.styleBuilder=l,i.marshal=n,i.DIRECTIVE_KEY="flex-order",i.styleCache=z,i.init(),i}return a(l,e),l.ctorParameters=function(){return[{type:t.ElementRef},{type:r.StyleUtils},{type:W,decorators:[{type:t.Optional}]},{type:r.MediaMarshaller}]},l}(r.BaseDirective2),z=new Map,Z=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=K,t}return a(r,e),r.decorators=[{type:t.Directive,args:[{selector:"\n [fxFlexOrder], [fxFlexOrder.xs], [fxFlexOrder.sm], [fxFlexOrder.md],\n [fxFlexOrder.lg], [fxFlexOrder.xl], [fxFlexOrder.lt-sm], [fxFlexOrder.lt-md],\n [fxFlexOrder.lt-lg], [fxFlexOrder.lt-xl], [fxFlexOrder.gt-xs], [fxFlexOrder.gt-sm],\n [fxFlexOrder.gt-md], [fxFlexOrder.gt-lg]\n",inputs:K}]}],r}(q),H=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a(r,e),r.prototype.buildStyles=function(e,t){var r;""===e&&(e="0");var l=String(e).indexOf("%")>-1;String(e).indexOf("px")>-1||l||isNaN(+e)||(e+="%");var n=t.isRtl?"margin-right":"margin-left";return f(t.layout)?(r={},r[n]=""+e,r):{"margin-top":""+e}},r.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],r.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new r},token:r,providedIn:"root"}),r}(r.StyleBuilder),J=["fxFlexOffset","fxFlexOffset.xs","fxFlexOffset.sm","fxFlexOffset.md","fxFlexOffset.lg","fxFlexOffset.xl","fxFlexOffset.lt-sm","fxFlexOffset.lt-md","fxFlexOffset.lt-lg","fxFlexOffset.lt-xl","fxFlexOffset.gt-xs","fxFlexOffset.gt-sm","fxFlexOffset.gt-md","fxFlexOffset.gt-lg"],Q=function(e){function n(t,r,l,n,a){var o=e.call(this,t,l,a,n)||this;return o.elRef=t,o.directionality=r,o.styleBuilder=l,o.marshal=n,o.styler=a,o.DIRECTIVE_KEY="flex-offset",o.init([o.directionality.change]),o.parentElement&&o.marshal.trackValue(o.parentElement,"layout-gap").pipe(i.takeUntil(o.destroySubject)).subscribe(o.triggerUpdate.bind(o)),o}return a(n,e),n.prototype.updateWithValue=function(e){void 0===e&&(e="");var t=this.getFlexFlowDirection(this.parentElement,!0),r="rtl"===this.directionality.value;"row"===t&&r?this.styleCache=$:"row"!==t||r?"column"===t&&r?this.styleCache=ee:"column"!==t||r||(this.styleCache=re):this.styleCache=te,this.addStyles(e+"",{layout:t,isRtl:r})},n.ctorParameters=function(){return[{type:t.ElementRef},{type:l.Directionality},{type:H,decorators:[{type:t.Optional}]},{type:r.MediaMarshaller},{type:r.StyleUtils}]},n}(r.BaseDirective2),X=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=J,t}return a(r,e),r.decorators=[{type:t.Directive,args:[{selector:"\n [fxFlexOffset], [fxFlexOffset.xs], [fxFlexOffset.sm], [fxFlexOffset.md],\n [fxFlexOffset.lg], [fxFlexOffset.xl], [fxFlexOffset.lt-sm], [fxFlexOffset.lt-md],\n [fxFlexOffset.lt-lg], [fxFlexOffset.lt-xl], [fxFlexOffset.gt-xs], [fxFlexOffset.gt-sm],\n [fxFlexOffset.gt-md], [fxFlexOffset.gt-lg]\n",inputs:J}]}],r}(Q),$=new Map,ee=new Map,te=new Map,re=new Map,le=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a(r,e),r.prototype.buildStyles=function(e){e=e||"stretch";var t={};switch(e){case"start":t["align-self"]="flex-start";break;case"end":t["align-self"]="flex-end";break;default:t["align-self"]=e}return t},r.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],r.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new r},token:r,providedIn:"root"}),r}(r.StyleBuilder),ne=["fxFlexAlign","fxFlexAlign.xs","fxFlexAlign.sm","fxFlexAlign.md","fxFlexAlign.lg","fxFlexAlign.xl","fxFlexAlign.lt-sm","fxFlexAlign.lt-md","fxFlexAlign.lt-lg","fxFlexAlign.lt-xl","fxFlexAlign.gt-xs","fxFlexAlign.gt-sm","fxFlexAlign.gt-md","fxFlexAlign.gt-lg"],ie=function(e){function l(t,r,l,n){var i=e.call(this,t,l,r,n)||this;return i.elRef=t,i.styleUtils=r,i.styleBuilder=l,i.marshal=n,i.DIRECTIVE_KEY="flex-align",i.styleCache=ae,i.init(),i}return a(l,e),l.ctorParameters=function(){return[{type:t.ElementRef},{type:r.StyleUtils},{type:le,decorators:[{type:t.Optional}]},{type:r.MediaMarshaller}]},l}(r.BaseDirective2),ae=new Map,oe=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=ne,t}return a(r,e),r.decorators=[{type:t.Directive,args:[{selector:"\n [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md],\n [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md],\n [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm],\n [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg]\n",inputs:ne}]}],r}(ie),se={margin:0,width:"100%",height:"100%","min-width":"100%","min-height":"100%"},fe=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a(r,e),r.prototype.buildStyles=function(e){return se},r.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],r.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new r},token:r,providedIn:"root"}),r}(r.StyleBuilder),ue=function(e){function l(t,r,l,n){var i=e.call(this,t,l,r,n)||this;return i.elRef=t,i.styleUtils=r,i.styleBuilder=l,i.marshal=n,i.styleCache=xe,i.addStyles(""),i}return a(l,e),l.decorators=[{type:t.Directive,args:[{selector:"[fxFill], [fxFlexFill]"}]}],l.ctorParameters=function(){return[{type:t.ElementRef},{type:r.StyleUtils},{type:fe},{type:r.MediaMarshaller}]},l}(r.BaseDirective2),xe=new Map,ce=function(e){function r(){return null!==e&&e.apply(this,arguments)||this}return a(r,e),r.prototype.buildStyles=function(e,t){var r={},l=e.split(" "),n=l[0],i=l[1];switch(n){case"center":r["justify-content"]="center";break;case"space-around":r["justify-content"]="space-around";break;case"space-between":r["justify-content"]="space-between";break;case"space-evenly":r["justify-content"]="space-evenly";break;case"end":case"flex-end":r["justify-content"]="flex-end";break;case"start":case"flex-start":default:r["justify-content"]="flex-start"}switch(i){case"start":case"flex-start":r["align-items"]=r["align-content"]="flex-start";break;case"center":r["align-items"]=r["align-content"]="center";break;case"end":case"flex-end":r["align-items"]=r["align-content"]="flex-end";break;case"space-between":r["align-content"]="space-between",r["align-items"]="stretch";break;case"space-around":r["align-content"]="space-around",r["align-items"]="stretch";break;case"baseline":r["align-content"]="stretch",r["align-items"]="baseline";break;case"stretch":default:r["align-items"]=r["align-content"]="stretch"}return g(r,{display:t.inline?"inline-flex":"flex","flex-direction":t.layout,"box-sizing":"border-box","max-width":"stretch"===i?f(t.layout)?null:"100%":null,"max-height":"stretch"===i&&f(t.layout)?"100%":null})},r.decorators=[{type:t.Injectable,args:[{providedIn:"root"}]}],r.ngInjectableDef=t.ɵɵdefineInjectable({factory:function(){return new r},token:r,providedIn:"root"}),r}(r.StyleBuilder),ye=["fxLayoutAlign","fxLayoutAlign.xs","fxLayoutAlign.sm","fxLayoutAlign.md","fxLayoutAlign.lg","fxLayoutAlign.xl","fxLayoutAlign.lt-sm","fxLayoutAlign.lt-md","fxLayoutAlign.lt-lg","fxLayoutAlign.lt-xl","fxLayoutAlign.gt-xs","fxLayoutAlign.gt-sm","fxLayoutAlign.gt-md","fxLayoutAlign.gt-lg"],pe=function(e){function l(t,r,l,n){var a=e.call(this,t,l,r,n)||this;return a.elRef=t,a.styleUtils=r,a.styleBuilder=l,a.marshal=n,a.DIRECTIVE_KEY="layout-align",a.layout="row",a.inline=!1,a.init(),a.marshal.trackValue(a.nativeElement,"layout").pipe(i.takeUntil(a.destroySubject)).subscribe(a.onLayoutChange.bind(a)),a}return a(l,e),l.prototype.updateWithValue=function(e){var t=this.layout||"row",r=this.inline;"row"===t&&r?this.styleCache=Fe:"row"!==t||r?"row-reverse"===t&&r?this.styleCache=we:"row-reverse"!==t||r?"column"===t&&r?this.styleCache=be:"column"!==t||r?"column-reverse"===t&&r?this.styleCache=Le:"column-reverse"!==t||r||(this.styleCache=ve):this.styleCache=he:this.styleCache=me:this.styleCache=ge,this.addStyles(e,{layout:t,inline:r})},l.prototype.onLayoutChange=function(e){var t=this,r=e.value.split(" ");this.layout=r[0],this.inline=e.value.includes("inline"),F.find(function(e){return e===t.layout})||(this.layout="row"),this.triggerUpdate()},l.ctorParameters=function(){return[{type:t.ElementRef},{type:r.StyleUtils},{type:ce,decorators:[{type:t.Optional}]},{type:r.MediaMarshaller}]},l}(r.BaseDirective2),de=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputs=ye,t}return a(r,e),r.decorators=[{type:t.Directive,args:[{selector:"\n [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md],\n [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md],\n [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm],\n [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]\n",inputs:ye}]}],r}(pe),ge=new Map,he=new Map,me=new Map,ve=new Map,Fe=new Map,be=new Map,we=new Map,Le=new Map,Oe=[O,k,de,Z,X,ue,oe,N],Se=function(){function e(){}return e.decorators=[{type:t.NgModule,args:[{imports:[r.CoreModule,l.BidiModule],declarations:Oe.slice(),exports:Oe.slice()}]}],e}();e.FlexModule=Se,e.FlexStyleBuilder=U,e.FlexDirective=_,e.DefaultFlexDirective=N,e.FlexAlignStyleBuilder=le,e.FlexAlignDirective=ie,e.DefaultFlexAlignDirective=oe,e.FlexFillStyleBuilder=fe,e.FlexFillDirective=ue,e.FlexOffsetStyleBuilder=H,e.FlexOffsetDirective=Q,e.DefaultFlexOffsetDirective=X,e.FlexOrderStyleBuilder=W,e.FlexOrderDirective=q,e.DefaultFlexOrderDirective=Z,e.LayoutStyleBuilder=b,e.LayoutDirective=L,e.DefaultLayoutDirective=O,e.LayoutAlignStyleBuilder=ce,e.LayoutAlignDirective=pe,e.DefaultLayoutAlignDirective=de,e.LayoutGapStyleBuilder=I,e.LayoutGapDirective=D,e.DefaultLayoutGapDirective=k,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=flex-layout-flex.umd.min.js.map