r?(n=!1,e.triggerHandler("$scrollend")):(e.triggerHandler("$scroll"),i(t))}var n,o,r=200;e.on("scroll touchmove",function(){n||(n=!0,i(t),e.triggerHandler("$scrollstart")),e.triggerHandler("$scroll"),o=+a.now()})}var m=c();return function(e,t,n){var o=t.controller("mdContent");if(o)if(m)t.css({position:m,top:0,"z-index":2});else{var r=o.$element.data("$$sticky");r||(r=d(o),o.$element.data("$$sticky",r));var i=r.add(t,n||t.clone());e.$on("$destroy",i)}}}t.module("material.components.sticky",["material.core","material.components.content"]).factory("$mdSticky",e),e.$inject=["$document","$mdConstant","$compile","$$rAF","$mdUtil"]}(),function(){function e(e,n,o){return{restrict:"E",replace:!0,transclude:!0,template:'',compile:function(r,i,a){return function(r,i,d){function c(e){return t.element(e[0].querySelector(".md-subheader-content"))}o(i);var l=i[0].outerHTML;a(r,function(e){c(i).append(e)}),i.hasClass("md-no-sticky")||a(r,function(o){var a=n(t.element(l))(r);c(a).append(o),e(r,i,a)})}}}}t.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",e),e.$inject=["$mdSticky","$compile","$mdTheming"]}(),function(){function e(e){function t(e){function t(t,r,i){var a=e(i[n]);r.on(o,function(e){t.$apply(function(){a(t,{$event:e})})})}return{restrict:"A",link:t}}var n="md"+e,o="$md."+e.toLowerCase();return t.$inject=["$parse"],t}t.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",e("SwipeLeft")).directive("mdSwipeRight",e("SwipeRight"))}(),function(){function e(e,n,o,r,i,a,d,c){function l(e,n){var r=m.compile(e,n);return e.addClass("md-dragging"),function(e,n,l,m){function s(t){h(e)||(t.stopPropagation(),n.addClass("md-dragging"),E={width:b.prop("offsetWidth")},n.removeClass("transition"))}function u(e){if(E){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/E.width,n=m.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),b.css(i.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),E.translate=n}}function p(e){if(E){e.stopPropagation(),n.removeClass("md-dragging"),b.css(i.CSS.TRANSFORM,"");var t=m.$viewValue?E.translate<.5:E.translate>.5;t&&f(!m.$viewValue),E=null}}function f(t){e.$apply(function(){m.$setViewValue(t),m.$render()})}m=m||o.fakeNgModel();var h=a(l.ngDisabled),b=t.element(n[0].querySelector(".md-thumb-container")),g=t.element(n[0].querySelector(".md-container"));d(function(){n.removeClass("md-dragging")}),r(e,n,l,m),t.isDefined(l.ngDisabled)&&e.$watch(h,function(e){n.attr("tabindex",e?-1:0)}),c.register(g,"drag"),g.on("$md.dragstart",s).on("$md.drag",u).on("$md.dragend",p);var E}}var m=e[0];return{restrict:"E",priority:210,transclude:!0,template:'',require:"?ngModel",compile:l}}t.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",e),e.$inject=["mdCheckboxDirective","$mdTheming","$mdUtil","$document","$mdConstant","$parse","$$rAF","$mdGesture"]}(),function(){t.module("material.components.tabs",["material.core","material.components.icon"])}(),function(){function e(){return{restrict:"E"}}function n(e){function t(e,t,o){function r(r,i,d){return i=o.extractElementByName(i,"md-toast"),n=d.content,i.addClass(d.position.split(" ").map(function(e){return"md-"+e}).join(" ")),d.parent.addClass(a(d.position)),d.onSwipe=function(e,n){i.addClass("md-"+e.type.replace("$md.","")),o.nextTick(t.cancel)},i.on("$md.swipeleft $md.swiperight",d.onSwipe),e.enter(i,d.parent)}function i(t,n,o){return n.off("$md.swipeleft $md.swiperight",o.onSwipe),o.parent.removeClass(a(o.position)),e.leave(n)}function a(e){return"md-toast-open-"+(e.indexOf("top")>-1?"top":"bottom")}return{onShow:r,onRemove:i,position:"bottom left",themable:!0,hideDelay:3e3}}var n,o="ok",r=e("$mdToast").setDefaults({methods:["position","hideDelay","capsule"],options:t}).addPreset("simple",{argOption:"content",methods:["content","action","highlightAction","theme","parent"],options:["$mdToast","$mdTheming",function(e,t){var r={template:['',"{{ toast.content }}",'',"{{ toast.action }}","",""].join(""),controller:["$scope",function(t){var r=this;t.$watch(function(){return n},function(){r.content=n}),this.resolve=function(){e.hide(o)}}],theme:t.defaultTheme(),controllerAs:"toast",bindToController:!0};return r}]}).addMethod("updateContent",function(e){n=e});return t.$inject=["$animate","$mdToast","$mdUtil"],r}t.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",e).provider("$mdToast",n),n.$inject=["$$interimElementProvider"]}(),function(){function e(e,n,o,r,i){var a=t.bind(null,o.supplant,"translate3d(0,{0}px,0)");return{restrict:"E",controller:t.noop,link:function(d,c,l){function m(){function t(t,n){c.parent()[0]===n.parent()[0]&&(u&&u.off("scroll",b),n.on("scroll",b),n.attr("scroll-shrink","true"),u=n,e(r))}function r(){s=c.prop("offsetHeight");var e=-s*h+"px";u.css("margin-top",e),u.css("margin-bottom",e),m()}function m(e){var t=e?e.target.scrollTop:f;g(),p=Math.min(s/h,Math.max(0,p+t-f)),c.css(n.CSS.TRANSFORM,a([-p*h])),u.css(n.CSS.TRANSFORM,a([(s-p)*h])),f=t,o.nextTick(function(){var e=c.hasClass("md-whiteframe-z1");e&&!p?i.removeClass(c,"md-whiteframe-z1"):!e&&p&&i.addClass(c,"md-whiteframe-z1")})}var s,u,p=0,f=0,h=l.mdShrinkSpeedFactor||.5,b=e.throttle(m),g=o.debounce(r,5e3);d.$on("$mdContentLoaded",t)}r(c),t.isDefined(l.mdScrollShrink)&&m()}}}t.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",e),e.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"]}(),function(){function e(e,n,o,r,i,a,d,c,l){function m(m,p,f){function h(){t.isDefined(f.mdDelay)||(m.delay=s)}function b(){m.$on("$destroy",function(){m.visible=!1,p.remove(),t.element(n).off("resize",I)}),m.$watch("visible",function(e){e?C():y()})}function g(){k.attr("aria-label")||k.text().trim()||k.attr("aria-label",p.text().trim())}function E(){p.detach(),p.attr("role","tooltip")}function v(){for(var e=p.parent();e&&$("pointer-events","none",e[0]);)e=e.parent();return e}function M(){for(var e=p.parent()[0];e&&e!==d[0]&&e!==document.body;)e=e.parentNode;return e}function $(e,o,r){e=f.$normalize(e),r=r||p[0];var i=n.getComputedStyle(r);return t.isDefined(i[e])&&i[e]==o}function A(){var e=!1,o=function(){k.on("blur mouseleave touchend touchcancel",i),T(!0)},i=function(){var t=m.hasOwnProperty("autohide")?m.autohide:f.hasOwnProperty("mdAutohide");(t||e||r[0].activeElement!==k[0])&&(k.off("blur mouseleave touchend touchcancel",i),T(!1)),e=!1};k.on("mousedown",function(){e=!0}),k.on("focus mouseenter touchstart",o),t.element(n).on("resize",I)}function T(t){T.value=!!t,T.queued||(t?(T.queued=!0,e(function(){m.visible=T.value,T.queued=!1},m.delay)):i.nextTick(function(){m.visible=!1}))}function C(){return S.append(p),$("display","none")?(m.visible=!1,void p.detach()):(w(),void t.forEach([p,x,N],function(e){c.addClass(e,"md-show")}))}function y(){l.all([c.removeClass(N,"md-show"),c.removeClass(x,"md-show"),c.removeClass(p,"md-show")]).then(function(){m.visible||p.detach()})}function w(){function e(){var e="left"===_||"right"===_?2*Math.sqrt(Math.pow(o.width,2)+Math.pow(o.height/2,2)):2*Math.sqrt(Math.pow(o.width/2,2)+Math.pow(o.height,2)),t="left"===_?{left:100,top:50}:"right"===_?{left:0,top:50}:"top"===_?{left:50,top:100}:{left:50,top:0};x.css({width:e+"px",height:e+"px",left:t.left+"%",top:t.top+"%"})}function t(e){var t={left:e.left,top:e.top};return t.left=Math.min(t.left,S.prop("scrollWidth")-o.width-u),t.left=Math.max(t.left,u),t.top=Math.min(t.top,S.prop("scrollHeight")-o.height-u),t.top=Math.max(t.top,u),t}function n(e){return"left"===e?{left:r.left-o.width-u,top:r.top+r.height/2-o.height/2}:"right"===e?{left:r.left+r.width+u,top:r.top+r.height/2-o.height/2}:"top"===e?{left:r.left+r.width/2-o.width/2,top:r.top-o.height-u}:{left:r.left+r.width/2-o.width/2,top:r.top+r.height+u}}var o=i.offsetRect(p,S),r=i.offsetRect(k,S),a=n(_);_?a=t(a):a.top>p.prop("offsetParent").scrollHeight-o.height-u&&(a=t(n("top"))),p.css({top:a.top+"px",left:a.left+"px"}),e()}a(p);var k=v(),x=t.element(p[0].getElementsByClassName("md-background")[0]),N=t.element(p[0].getElementsByClassName("md-content")[0]),_=f.mdDirection,H=M(),S=t.element(H||document.body),I=o.throttle(function(){m.visible&&w()});h(),E(),A(),b(),g()}var s=300,u=8;return{restrict:"E",transclude:!0,priority:210,template:' ',scope:{visible:"=?mdVisible",delay:"=?mdDelay",autohide:"=?mdAutohide"},link:m}}t.module("material.components.tooltip",["material.core"]).directive("mdTooltip",e),e.$inject=["$timeout","$window","$$rAF","$document","$mdUtil","$mdTheming","$rootElement","$animate","$q"]}(),function(){function e(){return{controller:o,template:n,compile:function(e,t){e.addClass("md-virtual-repeat-container").addClass(t.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}function n(e){return'"}function o(e,n,o,r){this.$scope=n,this.$element=o,this.$attrs=r,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.scroller=o[0].getElementsByClassName("md-virtual-repeat-scroller")[0],this.sizer=this.scroller.getElementsByClassName("md-virtual-repeat-sizer")[0],this.offsetter=this.scroller.getElementsByClassName("md-virtual-repeat-offsetter")[0],e(t.bind(this,this.updateSize)),r.ngHide&&n.$watch(r.ngHide,t.bind(this,function(n){n||e(t.bind(this,this.updateSize))}))}function r(e){return{controller:i,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(t,n){var o=n.mdVirtualRepeat,r=o.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),i=r[1],a=e(r[2]),d=n.mdExtraName&&e(n.mdExtraName);return function(e,t,n,o,r){o[0].link_(o[1],r,i,a,d)}}}}function i(e,t,n,o,r,i){this.$scope=e,this.$element=t,this.$attrs=n,this.$browser=o,this.$document=r,this.$$rAF=i,this.browserCheckUrlChange=o.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.startIndex=0,this.endIndex=0,this.itemSize=e.$eval(n.mdItemSize)||null,this.isFirstRender=!0,this.itemsLength=0,this.blocks={},this.pooledBlocks=[]}t.module("material.components.virtualRepeat",["material.core"]).directive("mdVirtualRepeatContainer",e).directive("mdVirtualRepeat",r);var a=1533917,d=3;o.$inject=["$$rAF","$scope","$element","$attrs"],o.prototype.register=function(e){this.repeater=e,t.element(this.scroller).on("scroll wheel touchmove touchend",t.bind(this,this.handleScroll_))},o.prototype.isHorizontal=function(){return this.horizontal},o.prototype.getSize=function(){return this.size},o.prototype.setSize_=function(e){this.size=e,this.$element[0].style[this.isHorizontal()?"width":"height"]=e+"px"},o.prototype.updateSize=function(){this.originalSize||(this.size=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight,this.repeater&&this.repeater.containerUpdated())},o.prototype.getScrollSize=function(){return this.scrollSize},o.prototype.sizeScroller_=function(e){var t=this.isHorizontal()?"width":"height",n=this.isHorizontal()?"height":"width";if(a>e)this.sizer.style[t]=e+"px";else{this.sizer.innerHTML="",this.sizer.style[t]="auto",this.sizer.style[n]="auto";var o=Math.floor(e/a),r=document.createElement("div");r.style[t]=a+"px",r.style[n]="1px";for(var i=0;o>i;i++)this.sizer.appendChild(r.cloneNode(!1));r.style[t]=e-o*a+"px",this.sizer.appendChild(r)}},o.prototype.autoShrink_=function(e){var t=Math.max(e,this.autoShrinkMin*this.repeater.getItemSize());this.autoShrink&&t!==this.size&&(t<(this.originalSize||this.size)?(this.originalSize||(this.originalSize=this.size),this.setSize_(t)):this.originalSize&&(this.setSize_(this.originalSize),this.originalSize=null))},o.prototype.setScrollSize=function(e){this.scrollSize!==e&&(this.sizeScroller_(e),this.autoShrink_(e),this.scrollSize=e)},o.prototype.getScrollOffset=function(){return this.scrollOffset},o.prototype.scrollTo=function(e){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=e,this.handleScroll_()},o.prototype.resetScroll=function(){this.scrollTo(0)},o.prototype.handleScroll_=function(){var e=this.isHorizontal()?this.scroller.scrollLeft:this.scroller.scrollTop;if(e!==this.scrollOffset){var t=this.repeater.getItemSize();if(t){var n=Math.max(0,Math.floor(e/t)-d),o=this.isHorizontal()?"translateX(":"translateY(";o+=n*t+"px)",this.scrollOffset=e,
scope:{mdOnLayout:"&"},link:a}}function n(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e.nextTick,this.layoutDelegate=t.noop}function o(e){function n(t,n){var o,a,d,c,l,m;return c=e.time(function(){a=r(t,n)}),o={layoutInfo:function(){return a},map:function(t){return l=e.time(function(){var e=o.layoutInfo();d=t(e.positioning,e.rowCount)}),o},reflow:function(t){return m=e.time(function(){var e=t||i;e(d.grid,d.tiles)}),o},performance:function(){return{tileCount:n.length,layoutTime:c,mapTime:l,reflowTime:m,totalTime:c+l+m}}}}function o(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}function r(e,t){function n(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(var a=0,m=0;m-a=e?o():(a=l.indexOf(0,d),-1!==a&&-1!==(m=i(a+1))?d=m+1:(a=m=0,o()));return r(a,t.col,t.row),d=a+t.col,{col:a,row:c}}function o(){d=0,c++,r(0,e,-1)}function r(e,t,n){for(var o=e;e+t>o;o++)l[o]=Math.max(l[o]+n,0)}function i(e){var t;for(t=e;tn;n++)t.push(0);return t}var d=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)}}var i=o;return n.animateWith=function(e){i=t.isFunction(e)?e:o},n}function r(e){function n(n,o,r,i){o.attr("role","listitem");var a=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(){return n.$parent.$index},function(e,t){e!==t&&i.invalidateTiles()})}return{restrict:"E",require:"^mdGridList",template:"",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:n}}function i(){return{template:"",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(){function e(e,t,n){function o(o,r,i){function a(){var e=r.parent();return e.attr("aria-label")||e.text()?!0:e.parent().attr("aria-label")||e.parent().text()?!0:!1}function d(){function t(){return!o.fontIcon&&!o.fontSet&&!i.hasOwnProperty("class")}o.svgIcon||o.svgSrc||(o.fontIcon&&r.addClass("md-font "+o.fontIcon),o.fontSet&&r.addClass(e.fontSet(o.fontSet)),t()&&r.addClass(e.fontSet()))}t(r),d();var c=i.alt||o.fontIcon||o.svgIcon||r.text(),l=i.$normalize(i.$attr.mdSvgIcon||i.$attr.mdSvgSrc||"");i["aria-label"]||(""==c||a()?r.text()||n.expect(r,"aria-hidden","true"):(n.expect(r,"aria-label",c),n.expect(r,"role","img"))),l&&i.$observe(l,function(t){r.empty(),t&&e(t).then(function(e){r.append(e)})})}return{scope:{fontSet:"@mdFontSet",fontIcon:"@mdFontIcon",svgIcon:"@mdSvgIcon",svgSrc:"@mdSvgSrc"},restrict:"E",link:o}}t.module("material.components.icon",["material.core"]).directive("mdIcon",e),e.$inject=["$mdIcon","$mdTheming","$mdAria"]}(),function(){function e(){}function n(e,t){this.url=e,this.viewBoxSize=t||r.defaultViewBoxSize}function o(e,n,o,r,i){function a(e){return e=e||"",E[e]?o.when(E[e].clone()):v.test(e)?s(e).then(c(e)):(-1==e.indexOf(":")&&(e="$default:"+e),l(e)["catch"](m)["catch"](u)["catch"](p).then(c(e)))}function d(n){var o=t.isUndefined(n)||!(n&&n.length);if(o)return e.defaultFontSet;var r=n;return t.forEach(e.fontSets,function(e){e.alias==n&&(r=e.fontSet||r)}),r}function c(t){return function(n){return E[t]=f(n)?n:new h(n,e[t]),E[t].clone()}}function l(t){var n=e[t];return n?s(n.url).then(function(e){return new h(e,n)}):o.reject(t)}function m(t){function n(e){var n=t.slice(t.lastIndexOf(":")+1),r=e.querySelector("#"+n);return r?new h(r,i):o.reject(t)}var r=t.substring(0,t.lastIndexOf(":"))||"$default",i=e[r];return i?s(i.url).then(n):o.reject(t)}function s(e){return n.get(e,{cache:i}).then(function(e){return t.element("").append(e.data).find("svg")[0]})}function u(e){var n;return t.isString(e)&&(n="icon "+e+" not found",r.warn(n)),o.reject(n||e)}function p(e){var n=t.isString(e)?e:e.message||e.data||e.statusText;return r.warn(n),o.reject(n)}function f(e){return t.isDefined(e.element)&&t.isDefined(e.config)}function h(e,n){"svg"!=e.tagName&&(e=t.element('