o?(n=!1,e.triggerHandler("$scrollend")):(e.triggerHandler("$scroll"),i(t))}var n,a,o=200;e.on("scroll touchmove",function(){n||(n=!0,i(t),e.triggerHandler("$scrollstart")),e.triggerHandler("$scroll"),a=+r.now()})}var l=o();return function(e,t,n){var i=t.controller("mdContent");if(i)if(l)t.css({position:l,top:0,"z-index":2});else{var r=i.$element.data("$$sticky");r||(r=a(i),i.$element.data("$$sticky",r));var o=r.add(t,n||t.clone());e.$on("$destroy",o)}}}angular.module("material.components.sticky",["material.core","material.components.content","material.decorators","material.animations"]).factory("$mdSticky",["$document","$mdEffects","$compile","$$rAF","$mdUtil",e])}(),function(){function e(e,t){return{restrict:"E",replace:!0,transclude:!0,template:'',compile:function(n,i,r){var a=n[0].outerHTML;return function(n,i){function o(e){return angular.element(e[0].querySelector(".md-subheader-content"))}r(n,function(e){o(i).append(e)}),r(n,function(r){var c=t(angular.element(a))(n);o(c).append(r),e(n,i,c)})}}}}angular.module("material.components.subheader",["material.components.sticky"]).directive("mdSubheader",["$mdSticky","$compile",e])}(),function(){!function(){function e(e,t,n){return function(i,r,a){var o=n.toLowerCase(),c="md"+n,l=e(a[c])||angular.noop,s=t(i,o),u=function(e){l(i,e)};s(r,function(e){e.type==o&&u()})}}angular.module("material.components.swipe",["ng"]).factory("$mdSwipe",function(){return function(e,t){return t||(t="swipeleft swiperight"),function(n,i,r){function a(t){t.srcEvent.stopPropagation(),angular.isFunction(i)&&e.$apply(function(){i(t)})}function o(){return l.on(t,a),function(){l.off(t)}}function c(e,t){var n=t.indexOf("pan")>-1,i=t.indexOf("swipe")>-1;return n&&e.push([Hammer.Pan,{direction:Hammer.DIRECTION_HORIZONTAL}]),i&&e.push([Hammer.Swipe,{direction:Hammer.DIRECTION_HORIZONTAL}]),e}var l=new Hammer(n[0],{recognizers:c([],t)});return r||o(),e.$on("$destroy",function(){l.destroy()}),o}}}).directive("mdSwipeLeft",["$parse","$mdSwipe",function(t,n){return{restrict:"A",link:e(t,n,"SwipeLeft")}}]).directive("mdSwipeRight",["$parse","$mdSwipe",function(t,n){return{restrict:"A",link:e(t,n,"SwipeRight")}}])}()}(),function(){function e(e,t){function n(e,t){var n=angular.element(e[0].querySelector(".md-switch-thumb"));n.attr("disabled",t.disabled),n.attr("ngDisabled",t.ngDisabled);var r=i.compile(n,t);return function(e,t,n,i){var a=angular.element(t[0].querySelector(".md-switch-thumb"));return r(e,a,n,i)}}var i=e[0],r=t[0];return{restrict:"E",transclude:!0,template:''+r.template+"
",require:"?ngModel",compile:n}}angular.module("material.components.switch",["material.components.checkbox","material.components.radioButton"]).directive("mdSwitch",["mdCheckboxDirective","mdRadioButtonDirective",e])}(),function(){angular.module("material.components.tabs",["material.core","material.animations","material.components.swipe"])}(),function(){function e(){return{restrict:"E",replace:!0,scope:{fid:"@?",value:"=ngModel"},compile:function(){return{pre:function(e,t,n){angular.isDefined(n.disabled)&&(t.attr("disabled",!0),e.isDisabled=!0),e.label=n.label||"",e.fid=e.fid||e.label,t.attr("type",n.type||"text"),t.attr("class",n.class)}}},template:' '}}function t(){return{restrict:"CE",controller:["$element",function(e){this.setFocused=function(t){e.toggleClass("md-input-focused",!!t)},this.setHasValue=function(t){e.toggleClass("md-input-has-value",!!t)}}]}}function n(e){return{restrict:"E",replace:!0,template:"",require:["^?mdInputGroup","?ngModel"],link:function(t,n,i,r){var a=r[0],o=r[1];if(a){var c=e.isParentDisabled(n);n.attr("tabindex",c?-1:0),n.attr("type",i.type||n.parent().attr("type")||"text"),o&&o.$formatters.push(function(e){return a.setHasValue(angular.isDefined(e)&&null!==e),e}),n.on("input",function(){var e=n.val();a.setHasValue(angular.isDefined(e)&&null!==e)}),n.on("focus",function(){a.setFocused(!0)}),n.on("blur",function(){a.setFocused(!1)}),t.$on("$destroy",function(){a.setFocused(!1),a.setHasValue(!1)})}}}}angular.module("material.components.textField",["material.core"]).directive("mdInputGroup",[t]).directive("mdInput",["$mdUtil",n]).directive("mdTextFloat",[e])}(),function(){function e(){return{restrict:"E"}}function t(e,t,n,i){function r(t,r,a){r.addClass(a.position),a.parent.addClass(o(a.position));var c=i(t,"swipeleft swiperight");
return a.detachSwipe=c(r,function(t){r.addClass(t.type),e(l.hide)}),n.enter(r,a.parent)}function a(e,t,i){return i.detachSwipe(),i.parent.removeClass(o(i.position)),n.leave(t)}function o(e){return"md-toast-open-"+(e.indexOf("top")>-1?"top":"bottom")}var c={onShow:r,onRemove:a,position:"bottom left",hideDelay:3e3},l=t(c);return l}angular.module("material.components.toast",["material.services.interimElement","material.components.swipe"]).directive("mdToast",[e]).factory("$mdToast",["$timeout","$$interimElement","$animate","$mdSwipe",t])}(),function(){function e(e,t,n){return{restrict:"E",controller:angular.noop,link:function(i,r,a){function o(){function o(t,i){n.elementIsSibling(r,i)&&(u&&u.off("scroll",p),i.on("scroll",p),i.attr("scroll-shrink","true"),u=i,e(c))}function c(){s=r.prop("offsetHeight"),u.css("margin-top",-s*f+"px"),l()}function l(e){var n=e?e.target.scrollTop:m;v(),d=Math.min(s/f,Math.max(0,d+n-m)),r.css(t.TRANSFORM,"translate3d(0,"+-d*f+"px,0)"),u.css(t.TRANSFORM,"translate3d(0,"+(s-d)*f+"px,0)"),m=n}var s,u,d=0,m=0,f=a.shrinkSpeedFactor||.5,p=e.debounce(l),v=n.debounce(c,5e3);i.$on("$mdContentLoaded",o)}angular.isDefined(a.scrollShrink)&&o()}}}angular.module("material.components.toolbar",["material.core","material.components.content","material.animations"]).directive("mdToolbar",["$$rAF","$mdEffects","$mdUtil",e])}(),function(){function e(e,t,n,i,r){function a(i,a,s,u){function d(){i.visible&&v()}function m(t){m.value=!!t,m.queued||(t?(m.queued=!0,e(function(){i.visible=m.value,m.queued=!1},o)):e(function(){i.visible=!1}))}function f(){a.removeClass("tooltip-hide"),g.attr("aria-describedby",a.attr("id")),l.append(a),n(function(){n(function(){v(),i.visible&&a.addClass("tooltip-show")})})}function p(){a.removeClass("tooltip-show").addClass("tooltip-hide"),g.removeAttr("aria-describedby"),e(function(){i.visible||a.detach()},200,!1)}function v(){var e=a[0].getBoundingClientRect(),n=g[0].getBoundingClientRect();u&&(n.top+=u.$element.prop("scrollTop"),n.left+=u.$element.prop("scrollLeft"));var i="bottom",r={left:n.left+n.width/2-e.width/2,top:n.top+n.height};r.left=Math.min(r.left,t.innerWidth-e.width-c),r.left=Math.max(r.left,c),r.top+e.height>t.innerHeight&&(r.top=n.top-e.height,i="top"),a.css({top:r.top+"px",left:r.left+"px"}),a.attr("width-32",Math.ceil(e.width/32)),a.attr("tooltip-direction",i)}var g=a.parent();a.detach(),a.attr("role","tooltip"),a.attr("id",s.id||"tooltip_"+r.nextUid()),g.on("focus mouseenter touchstart",function(){m(!0)}),g.on("blur mouseleave touchend touchcancel",function(){document.activeElement!==g[0]&&m(!1)}),i.$watch("visible",function(e){e?f():p()});var h=n.debounce(d);angular.element(t).on("resize",h),i.$on("$destroy",function(){i.visible=!1,a.remove(),angular.element(t).off("resize",h)})}var o=400,c=8,l=angular.element(document.body);return{restrict:"E",transclude:!0,require:"^?mdContent",template:'',scope:{visible:"=?"},link:a}}angular.module("material.components.tooltip",["material.core"]).directive("mdTooltip",["$timeout","$window","$$rAF","$document","$mdUtil",e])}(),function(){angular.module("material.components.whiteframe",[])}(),function(){function e(){function e(e,t,n){var i=e[0];if(!i.hasAttribute(t)){var r=angular.isDefined(n);r&&(n=String(n).trim(),e.attr(t,n))}}return{expect:e}}angular.module("material.services.aria",[]).service("$mdAria",["$log",e])}(),function(){function e(e,t){var n=/^\s*([@=&])(\??)\s*(\w*)\s*$/;return function(i,r,a,o){function c(e,t,n){if(!angular.isDefined(r[e])){var a=o&&o.hasOwnProperty(t);return i[t]=a?o[t]:n,!0}return!1}angular.forEach(a||{},function(a,o){var l,s,u=a.match(n)||[],d=u[3]||o,m=u[1];switch(m){case"@":r.$observe(d,function(e){i[o]=e}),r.$$observers[d].$$scope=i,c(d,o)||(i[o]=t(r[d])(i));break;case"=":c(d,o)||(i[o]=""===r[d]?!0:i.$eval(r[d]),s=i.$watch(r[d],function(e){i[o]=e}),i.$on("$destroy",s));break;case"&":if(!c(d,o,angular.noop)){if(r[d]&&r[d].match(RegExp(o+"(.*?)")))throw new Error('& expression binding "'+o+'" looks like it will recursively call "'+r[d]+'" and cause a stack overflow! Please choose a different scopeName.');l=e(r[d]),i[o]=function(e){return l(i,e)}}}})}}angular.module("material.services.attrBind",[]).factory("$attrBind",["$parse","$interpolate",e])}(),function(){function e(e,t,n,i,r,a){this.compile=function(o){var c=o.templateUrl,l=o.template||"",s=o.controller,u=o.controllerAs,d=o.resolve||{},m=o.locals||{},f=o.transformTemplate||angular.identity;return angular.forEach(d,function(e,t){d[t]=angular.isString(e)?n.get(e):n.invoke(e)}),angular.extend(d,m),d.$template=c?t.get(c,{cache:a}).then(function(e){return e.data}):e.when(l),e.all(d).then(function(e){var t=f(e.$template),n=angular.element("").html(t).contents(),a=i(n);return{locals:e,element:n,link:function(t){if(e.$scope=t,s){var i=r(s,e);n.data("$ngControllerController",i),n.children().data("$ngControllerController",i),u&&(t[u]=i)}return a(t)}}})}}angular.module("material.services.compiler",[]).service("$mdCompiler",["$q","$http","$injector","$compile","$controller","$templateCache",e])}(),function(){function e(e,t,n,i,r,a){return function(o){function c(e){d.length&&m.hide();var t=new u(e);return d.push(t),t.show().then(function(){return t.deferred.promise})}function l(e){var t=d.shift();t&&t.remove().then(function(){t.deferred.resolve(e)})}function s(e){var t=d.shift();t&&t.remove().then(function(){t.deferred.reject(e)})}function u(r){var c,l,s;return r=r||{},r=angular.extend({scope:r.scope||t.$new(r.isolateScope)},o,r),c={options:r,deferred:e.defer(),show:function(){return a.compile(r).then(function(t){function a(){r.hideDelay&&(l=n(m.hide,r.hideDelay))}r.parent||(r.parent=i.find("body"),r.parent.length||(r.parent=i)),s=t.link(r.scope);var o=r.onShow(r.scope,s,r);return e.when(o).then(a)})},cancelTimeout:function(){l&&(n.cancel(l),l=void 0)},remove:function(){c.cancelTimeout();var t=r.onRemove(r.scope,s,r);return e.when(t).then(function(){r.scope.$destroy()})}}}var d=[];o=angular.extend({onShow:function(e,t,n){return r.enter(t,n.parent)},onRemove:function(e,t){return r.leave(t)}},o||{});var m;return m={show:c,hide:l,cancel:s}}}angular.module("material.services.interimElement",["material.services.compiler"]).factory("$$interimElement",["$q","$rootScope","$timeout","$rootElement","$animate","$mdCompiler",e])}(),function(){function e(e){var t=[];return{notFoundError:function(t){e.error("No instance found for handle",t)},getInstances:function(){return t},get:function(e){var n,i,r;for(n=0,i=t.length;i>n;n++)if(r=t[n],r.$$mdHandle===e)return r;return null},register:function(e,n){return e.$$mdHandle=n,t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}}}}angular.module("material.services.registry",[]).factory("$mdComponentRegistry",["$log",e])}(),function(){function e(e,t,n,i){function r(r,a,o,c){function l(){m(),i(m,100,!1)}function s(){var t=d.selected()&&d.selected().element;if(!t||d.count()<2)a.css({display:"none",width:"0px"});else{var n=t.prop("offsetWidth"),i=t.prop("offsetLeft")+(d.$$pagingOffset||0);a.css({display:n>0?"block":"none",width:n+"px"}),a.css(e.TRANSFORM,"translate3d("+i+"px,0,0)")}}var u=c[0],d=c[1];if(!u){var m=n.debounce(s);r.$watch(d.selected,s),r.$on("$mdTabsChanged",m),r.$on("$mdTabsPaginationChanged",m),angular.element(t).on("resize",l),r.$on("$destroy",function(){angular.element(t).off("resize",l)})}}return{restrict:"E",require:["^?nobar","^mdTabs"],link:r}}angular.module("material.components.tabs").directive("mdTabsInkBar",["$mdEffects","$window","$$rAF","$timeout",e])}(),function(){function e(e,t,n,i,r){function a(a,l,s,u){function d(e){if(b.active){var t=angular.element(e.target).controller("mdTab"),n=g(t);n!==b.page&&(t.element.blur(),h(n).then(function(){t.element.focus()}))}}function m(e){if(e)if(b.active){var t=g(e);h(t)}else w()}function f(e){var t,n=b.page+e;if(!u.selected()||g(u.selected())!==n){var i;0>e?(i=(n+1)*b.itemsPerPage,t=u.previous(u.itemAt(i))):(i=n*b.itemsPerPage-1,t=u.next(u.itemAt(i)))}h(n).then(function(){t&&t.element.focus()}),t&&u.select(t)}function p(){var e=l.find("md-tab"),t=l.parent().prop("clientWidth")-c,n=t&&o*u.count()>t,i=n!==b.active;if(b.active=n,n){b.pagesCount=Math.ceil(o*u.count()/t),b.itemsPerPage=Math.max(1,Math.floor(u.count()/b.pagesCount)),b.tabWidth=t/b.itemsPerPage,$.css("width",b.tabWidth*u.count()+"px"),e.css("width",b.tabWidth+"px");var a=g(u.selected());h(a)}else i&&r(function(){$.css("width",""),e.css("width",""),v(0),b.page=-1})}function v(t){function n(t){t.target===$[0]&&($.off(e.TRANSITIONEND_EVENT,n),r.resolve())}if(u.pagingOffset===t)return i.when();var r=i.defer();return u.$$pagingOffset=t,$.css(e.TRANSFORM,"translate3d("+t+"px,0,0)"),$.on(e.TRANSITIONEND_EVENT,n),r.promise}function g(e){var t=u.indexOf(e);return-1===t?0:Math.floor(t/b.itemsPerPage)}function h(e){if(e!==b.page){var t=b.pagesCount;return 0>e&&(e=0),e>t&&(e=t),b.hasPrev=e>0,b.hasNext=(e+1)*b.itemsPerPage'),d.element=t,d.isDisabled=o,d.onAdd=c,d.onRemove=l,d.onSelect=s,d.onDeselect=u}angular.module("material.components.tabs").controller("$mdTab",["$scope","$element","$compile","$animate","$mdSwipe","$mdUtil",e])}(),function(){function e(e,t,n,i,r){function a(a,o){var c=a.find("md-tab-label");c.length?c.remove():c=angular.isDefined(o.label)?angular.element("").html(o.label):angular.element("").append(a.contents().remove());var l=a.contents().remove();return function(a,o,s,u){function d(){var e=c.clone();o.append(e),t(e)(a.$parent),$.content=l.clone()}function m(){a.$apply(function(){b.select($),$.element.focus()})}function f(e){if(e.which==r.KEY_CODE.SPACE)o.triggerHandler("click"),e.preventDefault();else if(e.which===r.KEY_CODE.LEFT_ARROW){var t=b.previous($);t&&t.element.focus()}else if(e.which===r.KEY_CODE.RIGHT_ARROW){var n=b.next($);n&&n.element.focus()}}function p(){a.$watch("$parent.$index",function(e){b.move($,e)})}function v(){function e(e){var t=b.selected()===$;e&&!t?b.select($):!e&&t&&b.deselect($)}var t=a.$parent.$watch("!!("+s.active+")",e);a.$on("$destroy",t)}function g(){function e(e){o.attr("aria-disabled",e);var t=b.selected()===$;t&&e&&b.select(b.next()||b.previous())}a.$watch($.isDisabled,e)}function h(){var e=s.id||i.nextUid(),t="content_"+e;o.attr({id:e,role:"tabItemCtrl",tabIndex:"-1","aria-controls":t}),$.contentContainer.attr({id:t,role:"tabpanel","aria-labelledby":e}),n.expect(o,"aria-label",o.text())}var $=u[0],b=u[1];d();var w=e.attachButtonBehavior(o);b.add($),a.$on("$destroy",function(){w(),b.remove($)}),angular.isDefined(s.ngClick)||o.on("click",m),o.on("keydown",f),angular.isNumber(a.$parent.$index)&&p(),angular.isDefined(s.active)&&v(),g(),h()}}return{restrict:"E",require:["mdTab","^mdTabs"],controller:"$mdTab",scope:{onSelect:"&",onDeselect:"&",label:"@"},compile:a}}angular.module("material.components.tabs").directive("mdTab",["$mdInkRipple","$compile","$mdAria","$mdUtil","$mdConstant",e])}(),function(){function e(e,t,n){function i(){return p.itemAt(e.selectedIndex)}function r(t,n){f.add(t,n),t.onAdd(p.contentArea),t.$$onSwipe=m,(-1===e.selectedIndex||e.selectedIndex===p.indexOf(t))&&p.select(t),e.$broadcast("$mdTabsChanged")}function a(t,n){f.contains(t)&&(n||p.selected()===t&&(f.count()>1?p.select(p.previous()||p.next()):p.deselect(t)),f.remove(t),t.onRemove(),e.$broadcast("$mdTabsChanged"))}function o(t,n){var i=p.selected()===t;f.remove(t),f.add(t,n),i&&p.select(t),e.$broadcast("$mdTabsChanged")}function c(t){!t||t.isSelected||t.isDisabled()||f.contains(t)&&(p.deselect(p.selected()),e.selectedIndex=p.indexOf(t),t.isSelected=!0,t.onSelect())}function l(t){t&&t.isSelected&&f.contains(t)&&(e.selectedIndex=-1,t.isSelected=!1,t.onDeselect())}function s(e,t){return f.next(e||p.selected(),t||d)}function u(e,t){return f.previous(e||p.selected(),t||d)}function d(e){return e&&!e.isDisabled()}function m(e){if(p.selected())switch(e){case"swiperight":case"panright":p.select(p.previous());break;case"swipeleft":case"panleft":p.select(p.next())}}var f=n.iterator([],!1),p=this;p.element=t,p.contentArea=angular.element(t[0].querySelector(".tabs-content")),p.inRange=f.inRange,p.indexOf=f.indexOf,p.itemAt=f.itemAt,p.count=f.count,p.selected=i,p.add=r,p.remove=a,p.move=o,p.select=c,p.deselect=l,p.next=s,p.previous=u,p.swipe=m,e.$on("$destroy",function(){p.deselect(p.selected());for(var e=f.count()-1;e>=0;e--)p.remove(f[e],!0)})}angular.module("material.components.tabs").controller("$mdTabs",["$scope","$element","$mdUtil",e])}(),function(){function e(){function e(e,t,n,i){function r(){t.attr({role:"tablist"})}function a(){e.$watch("selectedIndex",function(e,t){if(i.deselect(i.itemAt(t)),i.inRange(e)){var n=i.itemAt(e);n&&n.isDisabled()&&(n=e>t?i.next(n):i.previous(n)),i.select(n)}})}r(),a()}return{restrict:"E",controller:"$mdTabs",require:"mdTabs",transclude:!0,scope:{selectedIndex:"=?selected"},template:'',link:e}}angular.module("material.components.tabs").directive("mdTabs",["$parse",e])}();