return"MD-GRID-TILE"==e.tagName})}functionb(e){return[].map.call(e,function(e){varn=t.element(e).controller("mdGridTile");return{row:parseInt(i.getResponsiveAttribute(n.$attrs,"md-rowspan"),10)||1,col:parseInt(i.getResponsiveAttribute(n.$attrs,"md-colspan"),10)||1}})}functionv(){vare=parseInt(i.getResponsiveAttribute(d,"md-cols"),10);if(isNaN(e))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";returne}functionE(){returny(i.getResponsiveAttribute(d,"md-gutter")||1)}functionM(){vare=i.getResponsiveAttribute(d,"md-row-height");switch($()){case"fixed":returny(e);case"ratio":vart=e.split(":");returnparseFloat(t[0])/parseFloat(t[1]);case"fit":return0}}function$(){vare=i.getResponsiveAttribute(d,"md-row-height");return"fit"==e?"fit":-1!==e.indexOf(":")?"ratio":"fixed"}functiony(e){return/\D$/.test(e)?e:e+"px"}a.attr("role","list"),c.layoutDelegate=u;varC=t.bind(c,c.invalidateLayout),A=l();n.$on("$destroy",s);varT,k=e.startSymbol(),w=e.endSymbol(),x=e(h("share")+"% - ("+h("gutter")+" * "+h("gutterShare")+")"),N=e("calc(("+h("unit")+" + "+h("gutter")+") * "+h("offset")+")"),_=e("calc(("+h("unit")+") * "+h("span")+" + ("+h("span")+" - 1) * "+h("gutter")+")")}return{restrict:"E",controller:n,scope:{mdOnLayout:"&"},link:a}}functionn(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e.nextTick,this.layoutDelegate=t.noop}functiono(e){functionn(t,n){varo,a,d,c,l,s;returnc=e.time(function(){a=r(t,n)}),o={layoutInfo:function(){returna},map:function(t){returnl=e.time(function(){vare=o.layoutInfo();d=t(e.positioning,e.rowCount)}),o},reflow:function(t){returns=e.time(function(){vare=t||i;e(d.grid,d.tiles)}),o},performance:function(){return{tileCount:n.length,layoutTime:c,mapTime:l,reflowTime:s,totalTime:c+l+s}}}}functiono(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}functionr(e,t){functionn(t,n){if(t.col>e)throw"md-grid-list: Tile at position "+n+" has a colspan ("+t.col+") that exceeds the column count ("+e+")";for(vara=0,s=0;s-a<t.col;)d>=e?o():(a=l.indexOf(0,d),-1!==a&&-1!==(s=i(a+1))?d=s+1:(a=s=0,o()));returnr(a,t.col,t.row),d=a+t.col,{col:a,row:c}}functiono(){d=0,c++,r(0,e,-1)}functionr(e,t,n){for(varo=e;e+t>o;o++)l[o]=Math.max(l[o]+n,0)}functioni(e){vart;for(t=e;t<l.length;t++)if(0!==l[t])returnt;returnt===l.length?t:void0}functiona(){for(vart=[],n=0;e>n;n++)t.push(0);returnt}vard=0,c=0,l=a();return{positioning:t.map(function(e,t){return{spans:e,position:n(e,t)}}),rowCount:c+Math.max.apply(Math,l)}}vari=o;returnn.animateWith=function(e){i=t.isFunction(e)?e:o},n}functionr(e){functionn(n,o,r,i){o.attr("role","listitem");vara=e.watchResponsiveAttributes(["md-colspan","md-rowspan"],r,t.bind(i,i.invalidateLayout));i.invalidateTiles(),n.$on("$destroy",function(){a(),i.invalidateLayout()}),t.isDefined(n.$parent.$index)&&n.$watch(function(){returnn.$parent.$index},function(e,t){e!==t&&i.invalidateTiles()})}return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:n}}functioni(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}t.module("material.components.gridList",["material.core"]).directive("mdGridList",e).directive("mdGridTile",r).directive("mdGridTileFooter",i).directive("mdGridTileHeader",i).factory("$mdGridLayout",o),e.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],n.$inject=["$mdUtil"],n.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(t.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}},o.$inject=["$mdUtil"],r.$inject=["$mdMedia"]}(),function(){t.module("material.components.icon",["material.core"])}(),function(){functione(e,t){functionn(t,n,o){e(n)}functiono(e,n,o){varr=this;r.isErrorGetter=o.mdIsError&&t(o.mdIsError)
bottom:M.bottom-(v.top+v.height)},y=b.width-2*d,C=g.scrollHeight>g.offsetHeight,A=f.querySelector("md-option[selected]"),s=f.getElementsByTagName("md-option"),T=f.getElementsByTagName("md-optgroup"),k=r(o.loadingAsync);m=k?g.firstElementChild||g:A?A:T.length?T[0]:s.length?s[0]:g.firstElementChild||g,g.offsetWidth>y&&(g.style["max-width"]=y+"px"),E&&(g.style["min-width"]=v.width+"px"),C&&f.classList.add("md-overflow");varw=m;"MD-OPTGROUP"===(w.tagName||"").toUpperCase()&&(w=s[0]||g.firstElementChild||g,m=w),o.focusedNode=w;varx=f.getBoundingClientRect(),N=a(m);if(m){var_=l.getComputedStyle(m);N.paddingLeft=parseInt(_.paddingLeft,10)||0,N.paddingRight=parseInt(_.paddingRight,10)||0}if(C){varS=g.offsetHeight/2;g.scrollTop=N.top+N.height/2-S,$.top<S?g.scrollTop=Math.min(N.top,g.scrollTop+S-$.top):$.bottom<S&&(g.scrollTop=Math.max(N.top+N.height-x.height,g.scrollTop-S+$.bottom))}varH,D,O,I;E?(H=v.left,D=v.top+v.height,O="50% 0",D+x.height>M.bottom&&(D=v.top-x.height,O="50% 100%")):(H=v.left+N.left-N.paddingLeft+2,D=Math.floor(v.top+v.height/2-N.height/2-N.top+g.scrollTop)+2,O=N.left+v.width/2+"px "+(N.top+N.height/2-g.scrollTop)+"px 0px",I=v.width+N.paddingLeft+N.paddingRight);varR=u.getBoundingClientRect(),L=Math.round(100*Math.min(v.width/x.width,1))/100,P=Math.round(100*Math.min(v.height/x.height,1))/100;return{container:{element:t.element(u),styles:{left:Math.floor(i(M.left,H,M.right-R.width)),top:Math.floor(i(M.top,D,M.bottom-R.height)),"min-width":I}},dropDown:{element:t.element(f),styles:{transformOrigin:O,transform:o.alreadyOpen?"":c.supplant("scale({0},{1})",[L,P])}}}}varM="$mdSelect.show() expected a target element in options.target but got '{0}'!",$=c.dom.animator;return{parent:"body",themable:!0,onShow:f,onRemove:p,hasBackdrop:!0,disableParentScroll:!0}}functionr(e){returne&&t.isFunction(e.then)}functioni(e,t,n){returnMath.max(e,Math.min(t,n))}functiona(e){returne?{left:e.offsetLeft,top:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}:{left:0,top:0,width:0,height:0}}returno.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate"],e("$mdSelect").setDefaults({methods:["target"],options:o})}vard=8,c=0;t.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",e).directive("mdSelectMenu",o).directive("mdOption",r).directive("mdOptgroup",i).provider("$mdSelect",a),e.$inject=["$mdSelect","$mdUtil","$mdTheming","$mdAria","$rootElement","$compile","$parse"],o.$inject=["$parse","$mdUtil","$mdTheming"],r.$inject=["$mdButtonInkRipple","$mdUtil"],a.$inject=["$$interimElementProvider"]}(),function(){functione(e,n){returnfunction(o){functionr(){returne.when(o).then(function(e){returnd=e,e})}vari,a="SideNav '"+o+"' is not available!",d=e.get(o);returnd||e.notFoundError(o),i={isOpen:function(){returnd&&d.isOpen()},isLockedOpen:function(){returnd&&d.isLockedOpen()},toggle:function(){returnd?d.toggle():n.reject(a)},open:function(){returnd?d.open():n.reject(a)},close:function(){returnd?d.close():n.reject(a)},then:function(e){varo=d?n.when(d):r();returno.then(e||t.noop)}}}}functiono(){return{restrict:"A",require:"^mdSidenav",link:function(e,t,n,o){}}}functionr(e,o,r,i,a,d,c,l,s,m){functionu(d,u,h,p){functionf(e,t){d.isLockedOpen=e,e===t?u.toggleClass("md-locked-open",!!e):a[e?"addClass":"removeClass"](u,"md-locked-open"),k.toggleClass("md-locked-open",!!e)}functiong(e){vart=o.findFocusTarget(u)||o.findFocusTarget(u,"[md-sidenav-focus]")||u,n=u.parent();returnn[e?"on":"off"]("keydown",E),k[e?"on":"off"]("click",M),e&&(y=m[0].activeElement),b(e),C=s.all([e?a.enter(k,n):a.leave(k),a[e?"removeClass":"addClass"](u,"md-closed")]).then(function(){d.isOpen&&t&&t.focus()})}functionb(e){varo=u.parent();e&&!$?($=o.css("overflow"),o.css("overflow","hidden")):t.isDefined($)&&(o.css("overflow",$),$=n)}functionv(e){returnd.isOpen==e?s.when(!0):s(function(t){d.isOpen=e,o.nextTick(function(){C.then(function(e){d.isOpen||(y&&y.focus(),y=null),t(e)})})})}functionE(e){vart=e.keyCode===r.KEY_CODE.ESCAPE;returnt?M(e):s.w
s.pin&&s.pin(re.$.scrollContainer,m))}functionb(){e.autofocus&&re.input.focus()}functionv(){varn=parseInt(e.delay,10)||0;u.$observe("disabled",function(e){te.isDisabled=e}),u.$observe("required",function(e){te.isRequired=null!==e}),e.$watch("searchText",n?a.debounce(D,n):D),e.$watch("selectedItem",w),t.element(l).on("resize",f),e.$on("$destroy",E)}functionE(){if(t.element(l).off("resize",f),re){vare="ul scroller scrollContainer input".split(" ");t.forEach(e,function(e){re.$[e].remove()})}}functionM(){re={main:o[0],scrollContainer:o[0].getElementsByClassName("md-virtual-repeat-container")[0],scroller:o[0].getElementsByClassName("md-virtual-repeat-scroller")[0],ul:o.find("ul")[0],input:o.find("input")[0],wrap:o.find("md-autocomplete-wrap")[0],root:document.body},re.li=re.ul.getElementsByTagName("li"),re.snap=$(),re.$=y(re)}function$(){for(vare=o;e.length;e=e.parent())if(t.isDefined(e.attr("md-autocomplete-snap")))returne[0];returnre.wrap}functiony(e){varn={};for(varoine)e.hasOwnProperty(o)&&(n[o]=t.element(e[o]));returnn}functionC(t,n){!t&&n?(f(),re&&a.nextTick(function(){a.disableScrollAround(re.ul)},!1,e)):t&&!n&&a.nextTick(function(){a.enableScrolling()},!1,e)}functionA(){ae=!0}functionT(){ae=!1,ce||(te.hidden=!0)}functionk(){re.input.focus()}functionw(t,n){t&&P(t).then(function(o){e.searchText=o,_(t,n)}),t!==n&&x()}functionx(){t.isFunction(e.itemChange)&&e.itemChange(F(e.selectedItem))}functionN(){t.isFunction(e.textChange)&&e.textChange()}function_(e,t){de.forEach(function(n){n(e,t)})}functionS(e){-1==de.indexOf(e)&&de.push(e)}functionH(e){vart=de.indexOf(e);-1!=t&&de.splice(t,1)}functionD(t,n){te.index=B(),t!==n&&P(e.selectedItem).then(function(o){t!==o&&(e.selectedItem=null,t!==n&&N(),q()?J():(te.loading=!1,te.matches=[],te.hidden=U(),K()))})}functionO(){ce=!1,ae||(te.hidden=!0)}functionI(){ce=!0,t.isString(e.searchText)||(e.searchText=""),e.minLength>0||(te.hidden=U(),te.hidden||J())}functionR(e){switch(e.keyCode){cased.KEY_CODE.DOWN_ARROW:if(te.loading)return;e.stopPropagation(),e.preventDefault(),te.index=Math.min(te.index+1,te.matches.length-1),X(),K();break;cased.KEY_CODE.UP_ARROW:if(te.loading)return;e.stopPropagation(),e.preventDefault(),te.index=te.index<0?te.matches.length-1:Math.max(0,te.index-1),X(),K();break;cased.KEY_CODE.TAB:cased.KEY_CODE.ENTER:if(te.hidden||te.loading||te.index<0||te.matches.length<1)return;e.stopPropagation(),e.preventDefault(),V(te.index);break;cased.KEY_CODE.ESCAPE:e.stopPropagation(),e.preventDefault(),W(),te.matches=[],te.hidden=!0,te.index=B()}}functionL(){returnt.isNumber(e.minLength)?e.minLength:1}functionP(t){functionn(t){returnt&&e.itemText?e.itemText(F(t)):null}returnh.when(n(t)||t)}functionF(e){if(!e)returnn;vart={};returnte.itemName&&(t[te.itemName]=e),t}functionB(){returne.autoselect?0:-1}functionU(){returnq()&&te.matches.length?void0:!0}functionz(){returnP(te.matches[te.index])}functionq(){returnt.isDefined(e.searchText)&&e.searchText.length>=L()}functionj(e,t,n){Object.defineProperty(te,e,{get:function(){returnn},set:function(e){varo=n;n=e,t(e,o)}})}functionV(t){a.nextTick(function(){P(te.matches[t]).then(function(e){vart=re.$.input.controller("ngModel");t.$setViewValue(e),t.$render()})["finally"](function(){e.selectedItem=te.matches[t],te.loading=!1,te.hidden=!0,te.index=0,te.matches=[]})},!1)}functionW(){e.searchText="",V(-1);vart=document.createEvent("CustomEvent");t.initCustomEvent("input",!0,!0,{value:e.searchText}),re.input.dispatchEvent(t),re.input.focus()}functionY(n){functiono(t){ie[i]=t,n===e.searchText&&(te.matches=t,te.hidden=U(),e.selectOnMatch&&ee(),K(),f())}varr=e.$parent.$eval(oe),i=n.toLowerCase();t.isArray(r)?o(r):r&&a.nextTick(function(){te.loading=!0,r.success&&r.success(o),r.then&&r.then(o),r["finally"]&&r["finally"](function(){te.loading=!1})},!0,e)}functionK(){z().then(function(e){te.messages=[G(),e]})}functionG(){if(le===te.matches.length)return"";switch(le=te.matches.length,te.matches.length){case0:return"There are no matches available.";case1:return"Thereis1matchavailab
i.$watch(function(){returns.isOpen},function(e){e?(l.setAttribute("aria-expanded","true"),r[0].classList.add("md-open"),t.forEach(s.nestedMenus,function(e){e.classList.remove("md-open")})):(l&&l.setAttribute("aria-expanded","false"),r[0].classList.remove("md-open")),i.$mdMenuIsOpen=s.isOpen}),this.focusMenuContainer=function(){vare=c[0].querySelector("[md-menu-focus-target]");e||(e=c[0].querySelector(".md-button")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.close=function(n,o){if(s.isOpen&&(s.isOpen=!1,i.$emit("$mdMenuClose",r),e.hide(null,o),!n)){vara=s.restoreFocusTo||r.find("button")[0];ainstanceoft.element&&(a=a[0]),a.focus()}},this.positionMode=function(){vare=(o.mdPositionMode||"target").split(" ");return1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){vare=(o.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throwError("Invalid offsets specified. Please follow format <x, y> or <n>")}}t.module("material.components.menu").controller("mdMenuCtrl",e),e.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout"]}(),function(){functione(e){functiono(n){n.addClass("md-menu");varo=n.children()[0];if(o.hasAttribute("ng-click")||(o=o.querySelector("[ng-click],[ng-mouseenter]")||o),!o||"MD-BUTTON"!=o.nodeName&&"BUTTON"!=o.nodeName||o.hasAttribute("type")||o.setAttribute("type","button"),2!=n.children().length)throwError(i+"Expected two children elements.");o&&o.setAttribute("aria-haspopup","true");vara=n[0].querySelectorAll("md-menu"),d=parseInt(n[0].getAttribute("md-nest-level"),10)||0;returna&&t.forEach(e.nodesToArray(a),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("md-nested-menu"),e.setAttribute("md-nest-level",d+1),e.setAttribute("role","menu")}),r}functionr(e,o,r,i){vara=i[0],d=i[1]!=n,c=t.element('<div class="md-open-menu-container md-whiteframe-z2"></div>'),l=o.children()[1];c.append(l),d&&(o.append(c),c[0].style.display="none"),a.init(c,{isInMenuBar:d}),e.$on("$destroy",function(){c.remove(),a.close()})}vari="Invalid HTML for md-menu: ";return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:o}}t.module("material.components.menu").directive("mdMenu",e),e.$inject=["$mdUtil"]}(),function(){functione(e){functiono(e,o,a,d,c,l,s,m,u,h){functionp(n,o,r){returnr.nestLevel?t.noop:(r.disableParentScroll&&!e.getClosest(r.target,"MD-DIALOG")?r.restoreScroll=e.disableScrollAround(r.element,r.parent):r.disableParentScroll=!1,r.hasBackdrop&&(r.backdrop=e.createBackdrop(n,"md-menu-backdrop md-click-catcher"),u.enter(r.backdrop,r.parent)),function(){r.backdrop&&(r.backdrop.off("click"),u.leave(r.backdrop,{duration:0})),r.disableParentScroll&&r.restoreScroll()})}functionf(e,t,n){returnn.cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),m(t,{addClass:"md-leave"}).start().then(function(){t.removeClass("md-active"),E(t,n),n.alreadyOpen=!1})}functiong(n,r,i){functiond(){returni.preserveElement?r[0].style.display="":i.parent.append(r),l(function(e){vart=M(r,i);r.removeClass("md-leave"),m(r,{addClass:"md-active",from:$.toCss(t),to:$.toCss({transform:""})}).start().then(e)})}functionu(){if(!i.target)throwError("$mdMenu.show() expected a target to animate from in options.target");t.extend(i,{alreadyOpen:!1,isRemoved:!1,target:t.element(i.target),parent:t.element(i.parent),menuContentEl:t.element(r[0].querySelector("md-menu-content"))})}functionh(){vare=function(e,t){returns.throttle(function(){if(!i.isRemoved){varn=M(e,t);e.css($.toCss(n))}})}(r,i);returnc.addEventListener("resize",e),c.addEventListener("orientationchange",e),function(){c.removeEventListener("resize",e),c.removeEventListener("orientationchange",e)}}functionf(){functiont(t){varn;a.KEY_CODE;switch(t.keyCode){casea.KEY_CODE.ESCAPE:i.mdMenuCtrl.close(!0,{closeAll:!0}),n=!0;break;casea.KEY_CODE.UP_ARROW: