UNPKG

angular-material

Version:

This repository publishes the AngularJS Material v1.x library and localized installs using `npm`. You can find the component source-code for this library in the [AngularJS Material repository](https://github.com/angular/material).

7 lines 146 kB
/*! * AngularJS Material Design * https://github.com/angular/material * @license MIT * v1.2.0-master-93518bb */ function DetectNgTouch(e,t){if(t.has("$swipe")){e.warn("You are using the ngTouch module. \nAngularJS Material already has mobile click, tap, and swipe support... \nngTouch is not supported with AngularJS Material!")}}function MdCoreConfigure(e,t){e.decorator("$$rAF",["$delegate",rAFDecorator]),e.decorator("$q",["$delegate",qDecorator]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}function rAFDecorator(a){return a.throttle=function(e){var t,n,o,r;return function(){t=arguments,r=this,o=e,n||(n=!0,a(function(){o.apply(r,Array.prototype.slice.call(t)),n=!1}))}},a}function qDecorator(e){return e.resolve||(e.resolve=e.when),e}function MdAutofocusDirective(a){return{restrict:"A",link:{pre:function(e,t,n){var o=n.mdAutoFocus||n.mdAutofocus||n.mdSidenavFocus;r(a(o)(e)),o&&e.$watch(o,r);function r(e){angular.isUndefined(e)&&(e=!0),t.toggleClass("md-autofocus",!!e)}}}}}function ColorUtilFactory(){return{rgbaToHex:function(e){return((e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"").toUpperCase()},hexToRgba:function(e){var t="#"===e[0]?e.substr(1):e,n=t.length/3,o=t.substr(0,n),r=t.substr(n,n),a=t.substr(2*n);return 1==n&&(o+=o,r+=r,a+=a),"rgba("+parseInt(o,16)+","+parseInt(r,16)+","+parseInt(a,16)+",0.1)"},rgbToRgba:function(e){return e.replace(")",", 0.1)").replace("(","a(")},rgbaToRgb:function(e){return e?e.replace("rgba","rgb").replace(/,[^),]+\)/,")"):"rgb(0,0,0)"}}}function MdConstantFactory(){var o=document.createElement("div"),r=function(e){var t,n,o=/^(Moz|webkit|ms)(?=[A-Z])/;for(t in e.style)if(n=o.exec(t))return n[0]}(o),e=/webkit/i.test(r),a=/([:\-_]+(.))/g;function t(e){var t=function(e){return e.replace(a,function(e,t,n,o){return o?n.toUpperCase():n})}(r+"-"+e),n=t.charAt(0).toLowerCase()+t.substring(1);return d(o,e)?e:d(o,t)?t:d(o,n)?n:e}function d(e,t){return angular.isDefined(e.style[t])}var n={isInputKey:function(e){return 31<=e.keyCode&&e.keyCode<=90},isNumPadKey:function(e){return 3===e.location&&97<=e.keyCode&&e.keyCode<=105},isMetaKey:function(e){return 91<=e.keyCode&&e.keyCode<=93},isFnLockKey:function(e){return 112<=e.keyCode&&e.keyCode<=145},isNavigationKey:function(e){var t=n.KEY_CODE;return-1!=[t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW].indexOf(e.keyCode)},hasModifierKey:function(e){return e.ctrlKey||e.metaKey||e.altKey},ELEMENT_MAX_PIXELS:1533917,BEFORE_NG_ARIA:210,KEY_CODE:{COMMA:188,SEMICOLON:186,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,TAB:9,BACKSPACE:8,DELETE:46},CSS:{TRANSITIONEND:"transitionend"+(e?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(e?" webkitAnimationEnd":""),TRANSFORM:t("transform"),TRANSFORM_ORIGIN:t("transformOrigin"),TRANSITION:t("transition"),TRANSITION_DURATION:t("transitionDuration"),ANIMATION_PLAY_STATE:t("animationPlayState"),ANIMATION_DURATION:t("animationDuration"),ANIMATION_NAME:t("animationName"),ANIMATION_TIMING:t("animationTimingFunction"),ANIMATION_DIRECTION:t("animationDirection")},MEDIA:{xs:"(max-width: 599px)","gt-xs":"(min-width: 600px)",sm:"(min-width: 600px) and (max-width: 959px)","gt-sm":"(min-width: 960px)",md:"(min-width: 960px) and (max-width: 1279px)","gt-md":"(min-width: 1280px)",lg:"(min-width: 1280px) and (max-width: 1919px)","gt-lg":"(min-width: 1920px)",xl:"(min-width: 1920px)",landscape:"(orientation: landscape)",portrait:"(orientation: portrait)",print:"print"},MEDIA_PRIORITY:["xl","gt-lg","lg","gt-md","md","gt-sm","sm","gt-xs","xs","landscape","portrait","print"]};return n}function MdIterator(e,m){function i(){return!0}e&&!angular.isArray(e)&&(e=Array.prototype.slice.call(e)),m=!!m;var c=e||[];return{items:function(){return[].concat(c)},count:function(){return c.length},inRange:l,contains:t,indexOf:u,itemAt:function(e){return l(e)?c[e]:null},findBy:function(t,n){return c.filter(function(e){return e[t]===n})},add:function(e,t){if(!e)return-1;angular.isNumber(t)||(t=c.length);return c.splice(t,0,e),u(e)},remove:function(e){t(e)&&c.splice(u(e),1)},first:s,last:p,next:angular.bind(null,n,!1),previous:angular.bind(null,n,!0),hasPrevious:function(e){return!!e&&l(u(e)-1)},hasNext:function(e){return!!e&&l(u(e)+1)}};function l(e){return c.length&&-1<e&&e<c.length}function u(e){return c.indexOf(e)}function t(e){return e&&-1<u(e)}function s(){return c.length?c[0]:null}function p(){return c.length?c[c.length-1]:null}function n(e,t,n,o){n=n||i;for(var r=u(t);;){if(!l(r))return null;var a=r+(e?-1:1),d=null;if(l(a)?d=c[a]:m&&(a=u(d=e?p():s())),null===d||a===o)return null;if(n(d))return d;angular.isUndefined(o)&&(o=a),r=a}}}function mdMediaFactory(d,t,o){var a={},m={},r={},n={};return e.getResponsiveAttribute=function(e,t){for(var n=0;n<d.MEDIA_PRIORITY.length;n++){var o=d.MEDIA_PRIORITY[n];if(m[a[o]].matches){var r=c(e,t+"-"+o);if(e[r])return e[r]}}return e[c(e,t)]},e.getQuery=function(e){return m[e]},e.watchResponsiveAttributes=function(e,o,r){var a=[];return e.forEach(function(e){var t=c(o,e);for(var n in angular.isDefined(o[t])&&a.push(o.$observe(t,angular.bind(void 0,r,null))),d.MEDIA)t=c(o,e+"-"+n),angular.isDefined(o[t])&&a.push(o.$observe(t,angular.bind(void 0,r,n)))}),function(){a.forEach(function(e){e()})}},e;function e(e){var t=a[e];angular.isUndefined(t)&&(t=a[e]=function(e){return d.MEDIA[e]||("("!==e.charAt(0)?"("+e+")":e)}(e));var n=r[t];return angular.isUndefined(n)&&(n=function(e){var t=m[e];t=t||(m[e]=o.matchMedia(e));return t.addListener(i),r[t.media]=!!t.matches}(t)),n}function i(e){t.$evalAsync(function(){r[e.media]=!!e.matches})}function c(e,t){return n[t]||(n[t]=e.$normalize(t))}}function MdPrefixer(e,t){var o=["data","x"];return e?t?n(e):r(e):{buildList:r,buildSelector:n,hasAttribute:function(e,t){if(!(e=a(e)))return!1;for(var n=r(t),o=0;o<n.length;o++)if(e.hasAttribute(n[o]))return!0;return!1},removeAttribute:function(t,e){if(!(t=a(t)))return;r(e).forEach(function(e){t.removeAttribute(e)})}};function r(n){return(n=angular.isArray(n)?n:[n]).forEach(function(t){o.forEach(function(e){n.push(e+"-"+t)})}),n}function n(e){return r(e=angular.isArray(e)?e:[e]).map(function(e){return"["+e+"]"}).join(",")}function a(e){if((e=e[0]||e).nodeType)return e}}goog.provide("ngmaterial.core"),DetectNgTouch.$inject=["$log","$injector"],MdCoreConfigure.$inject=["$provide","$mdThemingProvider"],rAFDecorator.$inject=["$delegate"],qDecorator.$inject=["$delegate"],angular.module("material.core",["ngAnimate","material.core.animate","material.core.layout","material.core.interaction","material.core.gestures","material.core.theming"]).config(MdCoreConfigure).run(DetectNgTouch),MdAutofocusDirective.$inject=["$parse"],angular.module("material.core").directive("mdAutofocus",MdAutofocusDirective),angular.module("material.core").factory("$mdColorUtil",ColorUtilFactory),angular.module("material.core").factory("$mdConstant",MdConstantFactory),angular.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.iterator=MdIterator,e}])}]),mdMediaFactory.$inject=["$mdConstant","$rootScope","$window"],angular.module("material.core").factory("$mdMedia",mdMediaFactory),angular.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.prefixer=MdPrefixer,e}])}]),UtilFactory.$inject=["$document","$timeout","$compile","$rootScope","$$mdAnimate","$interpolate","$log","$rootElement","$window","$$rAF"];var isIos,isAndroid,nextUniqueId=0;if(window.navigator){var userAgent=window.navigator.userAgent||window.navigator.vendor||window.opera;isIos=userAgent.match(/ipad|iphone|ipod/i),isAndroid=userAgent.match(/android/i)}function UtilFactory(i,m,n,d,e,t,a,o,c,u){var r=t.startSymbol(),l=t.endSymbol(),s="{{"===r&&"}}"===l;document.contains||(document.contains=function(e){return document.body.contains(e)});function p(e,t,n){var o=!1;if(e&&e.length){var r=c.getComputedStyle(e[0]);o=angular.isDefined(r[t])&&(!n||r[t]==n)}return o}function E(e){return e?function(e){return-1<String(e).indexOf("px")}(e)||function(e){return-1<String(e).indexOf("%")}(e)?e:e+"px":"0"}var h={dom:{},isIos:isIos,isAndroid:isAndroid,now:window.performance&&window.performance.now?angular.bind(window.performance,window.performance.now):Date.now||function(){return(new Date).getTime()},getModelOption:function(e,t){if(e.$options){var n=e.$options;return n.getOption?n.getOption(t):n[t]}},isRtl:function(e){switch(angular.isDefined(e)&&e.hasOwnProperty("dir")&&e.dir){case"ltr":return!1;case"rtl":return!0}return"rtl"===i[0].dir||"rtl"===i[0].body.dir},bidi:function(e,t,n,o){var r=!this.isRtl();if(0==arguments.length)return r?"ltr":"rtl";var a=angular.element(e);r&&angular.isDefined(n)?a.css(t,E(n)):!r&&angular.isDefined(o)&&a.css(t,E(o))},bidiProperty:function(e,t,n,o){var r=!this.isRtl(),a=angular.element(e);r&&angular.isDefined(t)?(a.css(t,E(o)),a.css(n,"")):!r&&angular.isDefined(n)&&(a.css(n,E(o)),a.css(t,""))},clientRect:function(e,t,n){var o=b(e);t=b(t||o.offsetParent||document.body);var r=o.getBoundingClientRect(),a=n?t.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:r.left-a.left,top:r.top-a.top,width:r.width,height:r.height}},offsetRect:function(e,t){return h.clientRect(e,t,!0)},nodesToArray:function(e){var t,n=[];for(e=e||[],t=0;t<e.length;++t)n.push(e.item(t));return n},getViewportTop:function(){return h.disableScrollAround._count&&h.disableScrollAround._viewPortTop?h.disableScrollAround._viewPortTop:c.scrollY||c.pageYOffset||0},findFocusTarget:function(e,t){var n=this.prefixer("md-autofocus",!0);return o(e,t||n)||o(e,n);function o(e,t){var n,o=e[0].querySelectorAll(t);return o&&o.length&&o.length&&angular.forEach(o,function(e){(e=angular.element(e)).hasClass("md-autofocus")&&(n=e)}),n}},disableScrollAround:function(e,t,n){if(n=n||{},h.disableScrollAround._count=Math.max(0,h.disableScrollAround._count||0),h.disableScrollAround._count++,h.disableScrollAround._restoreScroll)return h.disableScrollAround._restoreScroll;var m=i[0].body,o=function(){var e=i[0].documentElement,t=e.style.cssText||"",n=m.style.cssText||"",o=h.getViewportTop();h.disableScrollAround._viewPortTop=o;var r=m.clientWidth,a=m.scrollHeight>m.clientHeight+1,d=0<e.scrollTop?e:m;a&&angular.element(m).css({position:"fixed",width:"100%",top:-o+"px"});m.clientWidth<r&&(m.style.overflow="hidden");return function(){m.style.cssText=n,e.style.cssText=t,d.scrollTop=o}}(),r=function(e,t){var n,o=angular.element(e||m);t.disableScrollMask?n=o:(n=angular.element('<div class="md-scroll-mask"> <div class="md-scroll-mask-bar"></div></div>'),o.append(n));function r(e){e.preventDefault()}return n.on("wheel touchmove",r),function(){n.off("wheel touchmove",r),!t.disableScrollMask&&n[0].parentNode&&n[0].parentNode.removeChild(n[0])}}(t,n);return h.disableScrollAround._restoreScroll=function(){--h.disableScrollAround._count<=0&&(delete h.disableScrollAround._viewPortTop,o(),r(),delete h.disableScrollAround._restoreScroll)}},enableScrolling:function(){var e=this.disableScrollAround._restoreScroll;e&&e()},floatingScrollbars:function(){if(void 0===this.floatingScrollbars.cached){var e=angular.element("<div><div></div></div>").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});e.children().css("height","60px"),i[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth===e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(e){var n=e[0]||e;document.addEventListener("click",function e(t){t.target===n&&t.$focus&&(n.focus(),t.stopImmediatePropagation(),t.preventDefault(),n.removeEventListener("click",e))},!0);var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!1,!0,window,{},0,0,0,0,!1,!1,!1,!1,0,null),t.$material=!0,t.$focus=!0,n.dispatchEvent(t)},createBackdrop:function(e,t){return n(h.supplant('<md-backdrop class="{0}">',[t]))(e)},supplant:function(e,a,t){return t=t||/\{([^{}]*)\}/g,e.replace(t,function(t,e){var n=e.split("."),o=a;try{for(var r in n)n.hasOwnProperty(r)&&(o=o[n[r]])}catch(e){o=t}return"string"==typeof o||"number"==typeof o?o:t})},fakeNgModel:function(){return{$fake:!0,$setTouched:angular.noop,$setViewValue:function(e){this.$viewValue=e,this.$render(e),this.$viewChangeListeners.forEach(function(e){e()})},$isEmpty:function(e){return 0===(""+e).length},$parsers:[],$formatters:[],$viewChangeListeners:[],$render:angular.noop}},debounce:function(n,o,r,a){var d;return function(){var e=r,t=Array.prototype.slice.call(arguments);m.cancel(d),d=m(function(){d=void 0,n.apply(e,t)},o||10,a)}},throttle:function(n,o){var r;return function(){var e=arguments,t=h.now();(!r||o<t-r)&&(n.apply(this,e),r=t)}},time:function(e){var t=h.now();return e(),h.now()-t},valueOnUse:function(e,t,n){var o=null,r=Array.prototype.slice.call(arguments),a=3<r.length?r.slice(3):[];Object.defineProperty(e,t,{get:function(){return null===o&&(o=n.apply(e,a)),o}})},nextUid:function(){return""+nextUniqueId++},disconnectScope:function(e){if(e&&e.$root!==e&&!e.$$destroyed){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e,n=t.$parent;t.$$disconnected=!1,t.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=t,n.$$childTail=t):n.$$childHead=n.$$childTail=t}},getSiblings:function(t,e){var n=e.toUpperCase();return t instanceof angular.element&&(t=t[0]),Array.prototype.filter.call(t.parentNode.children,function(e){return t!==e&&e.tagName.toUpperCase()===n}).map(function(e){return angular.element(e)})},getClosest:function(e,t,n){if(angular.isString(t)){var o=t.toUpperCase();t=function(e){return e.nodeName.toUpperCase()===o}}if(e instanceof angular.element&&(e=e[0]),n&&(e=e.parentNode),!e)return null;do{if(t(e))return e}while(e=e.parentNode);return null},elementContains:function(t,n){return(window.Node&&window.Node.prototype&&Node.prototype.contains?angular.bind(t,t.contains):angular.bind(t,function(e){return t===n||!!(16&this.compareDocumentPosition(e))}))(n)},extractElementByName:function(e,o,t,n){var r=m(e);return!r&&n&&a.warn(h.supplant("Unable to find node '{0}' in element '{1}'.",[o,e[0].outerHTML])),angular.element(r||e);function m(e){return function(e){if(e)for(var t=0,n=e.length;t<n;t++)if(e[t].nodeName.toLowerCase()===o)return e[t];return null}(e)||(t?function(e){var t;if(e)for(var n=0,o=e.length;n<o;n++){var r=e[n];if(!t)for(var a=0,d=r.childNodes.length;a<d;a++)t=t||m([r.childNodes[a]])}return t}(e):null)}},initOptionalProperties:function(o,r,a){a=a||{},angular.forEach(o.$$isolateBindings,function(e,t){if(e.optional&&angular.isUndefined(o[t])){var n=angular.isDefined(r[e.attrName]);o[t]=angular.isDefined(a[t])?a[t]:n}})},nextTick:function(e,t,n){var o=h.nextTick,r=o.timeout,a=o.queue||[];return a.push({scope:n,callback:e}),null==t&&(t=!0),o.digest=o.digest||t,o.queue=a,r||(o.timeout=m(function(){var e=o.queue,t=o.digest;o.queue=[],o.timeout=null,o.digest=!1,e.forEach(function(e){e.scope&&e.scope.$$destroyed||e.callback()}),t&&d.$digest()},0,!1))},processTemplate:function(e){return s?e:e&&angular.isString(e)?e.replace(/\{\{/g,r).replace(/}}/g,l):e},getParentWithPointerEvents:function(e){for(var t=e.parent();p(t,"pointer-events","none");)t=t.parent();return t},getNearestContentElement:function(e){for(var t=e.parent()[0];t&&t!==o[0]&&t!==document.body&&"MD-CONTENT"!==t.nodeName.toUpperCase();)t=t.parentNode;return t},checkStickySupport:function(){var e,t=angular.element("<div>");i[0].body.appendChild(t[0]);for(var n=["sticky","-webkit-sticky"],o=0;o<n.length;++o)if(t.css({position:n[o],top:0,"z-index":2}),t.css("position")==n[o]){e=n[o];break}return t.remove(),e},parseAttributeBoolean:function(e,t){return""===e||!!e&&(!1===t||"false"!==e&&"0"!==e)},hasComputedStyle:p,isParentFormSubmitted:function(e){var t=h.getClosest(e,"form"),n=t?angular.element(t).controller("form"):null;return!!n&&n.$submitted},animateScrollTo:function(r,a,d){var m=r.scrollTop,i=a-m,c=m<a,l=h.now();u(function e(){var t=(n=d||1e3,o=h.now()-l,function(e,t,n,o){if(o<e)return t+n;var r=(e/=o)*e;return t+n*(r*e*-2+3*r)}(o,m,i,n));var n,o;r.scrollTop=t;(c?t<a:a<t)&&u(e)})},uniq:function(e){if(e)return e.filter(function(e,t,n){return n.indexOf(e)===t})},getInnerHTML:function(e){var t=new XMLSerializer;return Array.prototype.map.call(e.childNodes,function(e){return t.serializeToString(e)}).join("")},getOuterHTML:function(e){return(new XMLSerializer).serializeToString(e)},msie:window.document.documentMode,getTouchAction:function(){for(var e=document.createElement("div"),t=["","webkit","Moz","MS","ms","o"],n=0;n<t.length;n++){var o=t[n],r=o?o+"TouchAction":"touchAction";if(angular.isDefined(e.style[r]))return r}},getEventPath:function(e){for(var t=[],n=e.target;n;)t.push(n),n=n.parentElement;return-1===t.indexOf(window)&&-1===t.indexOf(document)&&t.push(document),-1===t.indexOf(window)&&t.push(window),t},sanitize:function(e){return e?e.replace(/[\\^$*+?.()|{}[]/g,"\\$&"):e}};return h.dom.animator=e(h),h;function b(e){return e[0]||e}}function MdAriaProvider(){var r={showWarnings:!0};return{disableWarnings:function(){r.showWarnings=!1},$get:["$$rAF","$log","$window","$interpolate",function(e,t,n,o){return MdAriaService.apply(r,arguments)}]}}function MdAriaService(o,r,i,a){var d=this.showWarnings;return{expect:m,expectAsync:c,expectWithText:function(e,t){var n=l(e)||"";-1<n.indexOf(a.startSymbol())?c(e,t,function(){return l(e)}):m(e,t,n)},expectWithoutText:function(e,t){var n=l(e);-1<n.indexOf(a.startSymbol())||n||m(e,t,n)},getText:l,hasAriaLabel:u,parentHasAriaLabel:function e(t,n){n=n||1;var o=angular.element(t)[0]||t;if(!o.parentNode)return!1;if(r(o.parentNode))return!0;n--;if(n)return e(o.parentNode,n);return!1;function r(e){if(!u(e))return!1;if(e.hasAttribute("role"))switch(e.getAttribute("role").toLowerCase()){case"command":case"definition":case"directory":case"grid":case"list":case"listitem":case"log":case"marquee":case"menu":case"menubar":case"note":case"presentation":case"separator":case"scrollbar":case"status":case"tablist":return!1}switch(e.tagName.toLowerCase()){case"abbr":case"acronym":case"address":case"applet":case"audio":case"b":case"bdi":case"bdo":case"big":case"blockquote":case"br":case"canvas":case"caption":case"center":case"cite":case"code":case"col":case"data":case"dd":case"del":case"dfn":case"dir":case"div":case"dl":case"em":case"embed":case"fieldset":case"figcaption":case"font":case"h1":case"h2":case"h3":case"h4":case"h5":case"h6":case"hgroup":case"html":case"i":case"ins":case"isindex":case"kbd":case"keygen":case"label":case"legend":case"li":case"map":case"mark":case"menu":case"object":case"ol":case"output":case"pre":case"presentation":case"q":case"rt":case"ruby":case"samp":case"small":case"source":case"span":case"status":case"strike":case"strong":case"sub":case"sup":case"svg":case"tbody":case"td":case"th":case"thead":case"time":case"tr":case"track":case"tt":case"ul":case"var":return!1}return!0}}};function m(e,t,n){var o=angular.element(e)[0]||e;!o||o.hasAttribute(t)&&0!==o.getAttribute(t).length||function(e,t){var n=e.hasChildNodes(),o=!1;if(n)for(var r=e.childNodes,a=0;a<r.length;a++){var d=r[a];1===d.nodeType&&d.hasAttribute(t)&&"none"!==((m=d).currentStyle?m.currentStyle:i.getComputedStyle(m)).display&&(o=!0)}var m;return o}(o,t)||((n=angular.isString(n)?n.trim():"").length?e.attr(t,n):d&&r.warn('ARIA: Attribute "',t,'", required for accessibility, is missing on node:',o))}function c(e,t,n){o(function(){m(e,t,n())})}function l(t){t=t[0]||t;for(var e,n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null),o="";e=n.nextNode();)r(e)||(o+=e.textContent);return o.trim()||"";function r(e){for(;e.parentNode&&(e=e.parentNode)!==t;)if(e.getAttribute&&"true"===e.getAttribute("aria-hidden"))return!0}}function u(e){var t=angular.element(e)[0]||e;return!!t.hasAttribute&&(t.hasAttribute("aria-label")||t.hasAttribute("aria-labelledby")||t.hasAttribute("aria-describedby"))}}function MdCompilerProvider(){function a(e,t,n,o,r){this.$q=e,this.$templateRequest=t,this.$injector=n,this.$compile=o,this.$controller=r}this.$get=["$q","$templateRequest","$injector","$compile","$controller",function(e,t,n,o,r){return new a(e,t,n,o,r)}],a.prototype.compile=function(e){return e.contentElement?this._prepareContentElement(e):this._compileTemplate(e)},a.prototype._prepareContentElement=function(e){var t=this._fetchContentElement(e);return this.$q.resolve({element:t.element,cleanup:t.restore,locals:{},link:function(){return t.element}})},a.prototype._compileTemplate=function(o){var r=this,e=o.templateUrl,t=o.template||"",n=angular.extend({},o.resolve),a=angular.extend({},o.locals),d=o.transformTemplate||angular.identity;return angular.forEach(n,function(e,t){angular.isString(e)?n[t]=r.$injector.get(e):n[t]=r.$injector.invoke(e)}),angular.extend(n,a),n.$$ngTemplate=e?this.$templateRequest(e):this.$q.when(t),this.$q.all(n).then(function(e){var t=d(e.$$ngTemplate,o),n=o.element||angular.element("<div>").html(t.trim()).contents();return r._compileElement(e,n,o)})},a.prototype._compileElement=function(o,r,a){var d=this,m=this.$compile(r),i={element:r,cleanup:r.remove.bind(r),locals:o,link:function(e){if(o.$scope=e,a.controller){var t=angular.extend({},o,{$element:r}),n=d._createController(a,t,o);angular.isFunction(n.$onDestroy)&&e.$on("$destroy",function(){angular.isFunction(n.$onDestroy)&&n.$onDestroy()}),r.data("$ngControllerController",n),r.children().data("$ngControllerController",n),i.controller=n}return m(e)}};return i},a.prototype._createController=function(e,t,n){var o=this.$controller(e.controller,t);return e.bindToController&&angular.extend(o,n),e.controllerAs&&(t.$scope[e.controllerAs]=o),angular.isFunction(o.$onInit)&&o.$onInit(),o},a.prototype._fetchContentElement=function(e){var t,n=e.contentElement;return t=angular.isString(n)?o(n=document.querySelector(n)):(n=n[0]||n,document.contains(n)?o(n):function(){n.parentNode&&n.parentNode.removeChild(n)}),{element:angular.element(n),restore:t};function o(e){var t=e.parentNode,n=e.nextElementSibling;return function(){n?t.insertBefore(e,n):t.appendChild(e)}}}}angular.module("material.core").factory("$mdUtil",UtilFactory),angular.element.prototype.focus=angular.element.prototype.focus||function(){return this.length&&this[0].focus(),this},angular.element.prototype.blur=angular.element.prototype.blur||function(){return this.length&&this[0].blur(),this},MdAriaService.$inject=["$$rAF","$log","$window","$interpolate"],angular.module("material.core").provider("$mdAria",MdAriaProvider),angular.module("material.core").provider("$mdCompiler",MdCompilerProvider),MdCompilerProvider.$inject=["$compileProvider"],MdGesture.$inject=["$$MdGestureHandler","$$rAF","$timeout","$mdUtil"],attachToDocument.$inject=["$mdGesture","$$MdGestureHandler","$mdUtil"];var pointer,lastPointer,HANDLERS={},maxClickDistance=6,forceSkipClickHijack=!1,disableAllGestures=!1,lastLabelClickPos=null,isInitialized=!1;function MdGestureProvider(){}function MdGesture(o,e,n,t){var r=t.getTouchAction(),a=void 0!==window.jQuery&&angular.element===window.jQuery,d={handler:function(e,t){var n=new o(e);return angular.extend(n,t),HANDLERS[e]=n,d},register:function(e,t,n){var o=HANDLERS[t.replace(/^\$md./,"")];if(o)return o.registerElement(e,n);throw new Error("Failed to register element with handler "+t+". Available handlers: "+Object.keys(HANDLERS).join(", "))},isAndroid:t.isAndroid,isIos:t.isIos,isHijackingClicks:(t.isIos||t.isAndroid)&&!a&&!forceSkipClickHijack};function m(n){return function(e,t){t.distance<this.state.options.maxDistance&&this.dispatchEvent(e,n,t)}}return d.isHijackingClicks&&(d.handler("click",{options:{maxDistance:maxClickDistance},onEnd:m("click")}),d.handler("focus",{options:{maxDistance:maxClickDistance},onEnd:function(e,t){t.distance<this.state.options.maxDistance&&canFocus(e.target)&&(this.dispatchEvent(e,"focus",t),e.target.focus())}}),d.handler("mouseup",{options:{maxDistance:maxClickDistance},onEnd:m("mouseup")}),d.handler("mousedown",{onStart:function(e){this.dispatchEvent(e,"mousedown")}})),d.handler("press",{onStart:function(e,t){this.dispatchEvent(e,"$md.pressdown")},onEnd:function(e,t){this.dispatchEvent(e,"$md.pressup")}}).handler("hold",{options:{maxDistance:6,delay:500},onCancel:function(){n.cancel(this.state.timeout)},onStart:function(e,t){if(!this.state.registeredParent)return this.cancel();this.state.pos={x:t.x,y:t.y},this.state.timeout=n(angular.bind(this,function(){this.dispatchEvent(e,"$md.hold"),this.cancel()}),this.state.options.delay,!1)},onMove:function(e,t){r||"touchmove"!==e.type||e.preventDefault();var n=this.state.pos.x-t.x,o=this.state.pos.y-t.y;Math.sqrt(n*n+o*o)>this.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onSetup:function(e,t){r&&(this.oldTouchAction=e[0].style[r],e[0].style[r]=t.horizontal?"pan-y":"pan-x")},onCleanup:function(e){this.oldTouchAction?e[0].style[r]=this.oldTouchAction:e[0].style[r]=null},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,o;r||"touchmove"!==e.type||e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(o=this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=makeStartPointer(e),updatePointerState(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):o&&this.cancel())},dispatchDragMove:e.throttle(function(e){this.state.isRunning&&(updatePointerState(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(updatePointerState(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(e,t){var n;Math.abs(t.velocityX)>this.state.options.minVelocity&&Math.abs(t.distanceX)>this.state.options.minDistance?(n="left"==t.directionX?"$md.swipeleft":"$md.swiperight",this.dispatchEvent(e,n)):Math.abs(t.velocityY)>this.state.options.minVelocity&&Math.abs(t.distanceY)>this.state.options.minDistance&&(n="up"==t.directionY?"$md.swipeup":"$md.swipedown",this.dispatchEvent(e,n))}})}function GestureHandler(e){this.name=e,this.state={}}function MdGestureHandler(){var e=void 0!==window.jQuery&&angular.element===window.jQuery;return GestureHandler.prototype={options:{},dispatchEvent:e?function(e,t,n){n=n||pointer;var o=new angular.element.Event(t);o.$material=!0,o.pointer=n,o.srcEvent=e,angular.extend(o,{clientX:n.x,clientY:n.y,screenX:n.x,screenY:n.y,pageX:n.x,pageY:n.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),angular.element(n.target).trigger(o)}:function(e,t,n){var o;n=n||pointer,"click"===t||"mouseup"===t||"mousedown"===t?"function"==typeof window.MouseEvent?o=new MouseEvent(t,{bubbles:!0,cancelable:!0,screenX:Number(e.screenX),screenY:Number(e.screenY),clientX:Number(n.x),clientY:Number(n.y),ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,button:e.button,buttons:e.buttons,relatedTarget:e.relatedTarget||null}):(o=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,window,e.detail,n.x,n.y,n.x,n.y,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget||null):"function"==typeof window.CustomEvent?o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:{}}):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,{});o.$material=!0,o.pointer=n,o.srcEvent=e,n.target.dispatchEvent(o)},onSetup:angular.noop,onCleanup:angular.noop,onStart:angular.noop,onMove:angular.noop,onEnd:angular.noop,onCancel:angular.noop,start:function(e,t){if(!this.state.isRunning){var n=this.getNearestParent(e.target),o=n&&n.$mdGesture[this.name]||{};this.state={isRunning:!0,options:angular.extend({},this.options,o),registeredParent:n},this.onStart(e,t)}},move:function(e,t){this.state.isRunning&&this.onMove(e,t)},end:function(e,t){this.state.isRunning&&(this.state.isRunning=!1,this.onEnd(e,t))},cancel:function(e,t){this.onCancel(e,t),this.state={}},getNearestParent:function(e){for(var t=e;t;){if((t.$mdGesture||{})[this.name])return t;t=t.parentNode}return null},registerElement:function(e,t){var n=this;return e[0].$mdGesture=e[0].$mdGesture||{},e[0].$mdGesture[this.name]=t||{},e.on("$destroy",o),n.onSetup(e,t||{}),o;function o(){delete e[0].$mdGesture[n.name],e.off("$destroy",o),n.onCleanup(e,t||{})}}},GestureHandler}function attachToDocument(e,r,n){if(!disableAllGestures){!isInitialized&&e.isHijackingClicks&&(document.addEventListener("click",function(e){var t;t=n.isIos?angular.isDefined(e.webkitForce)&&0===e.webkitForce:0===e.clientX&&0===e.clientY;t||e.$material||e.isIonicTap||isInputEventFromLabelClick(e)?(lastLabelClickPos=null,"label"===e.target.tagName.toLowerCase()&&(lastLabelClickPos={x:e.x,y:e.y})):(e.preventDefault(),e.stopPropagation(),lastLabelClickPos=null)},!0),document.addEventListener("mouseup",t,!0),document.addEventListener("mousedown",t,!0),document.addEventListener("focus",t,!0),isInitialized=!0);angular.element(document).on("mousedown touchstart pointerdown",function(e){if(pointer)return;var t=+Date.now();if(lastPointer&&!typesMatch(e,lastPointer)&&t-lastPointer.endTime<1500)return;pointer=makeStartPointer(e),o("start",e)}).on("mousemove touchmove pointermove",function(e){if(!pointer||!typesMatch(e,pointer))return;updatePointerState(e,pointer),o("move",e)}).on("mouseup mouseleave touchend touchcancel pointerup pointercancel",function(e){if(!pointer||!typesMatch(e,pointer))return;updatePointerState(e,pointer),pointer.endTime=+Date.now(),"pointercancel"!==e.type&&o("end",e);lastPointer=pointer,pointer=null}).on("$$mdGestureReset",function(){lastPointer=pointer=null})}function t(e){!e.clientX&&!e.clientY||e.$material||e.isIonicTap||isInputEventFromLabelClick(e)||"mousedown"===e.type&&(canFocus(e.target)||canFocus(document.activeElement))||(e.preventDefault(),e.stopPropagation())}function o(e,t){var n;for(var o in HANDLERS)(n=HANDLERS[o])instanceof r&&("start"===e&&n.cancel(),n[e](t,pointer))}}function makeStartPointer(e){var t=getEventPoint(e),n={startTime:+Date.now(),target:e.target,type:e.type.charAt(0)};return n.startX=n.x=t.pageX,n.startY=n.y=t.pageY,n}function typesMatch(e,t){return e&&t&&e.type.charAt(0)===t.type}function isInputEventFromLabelClick(e){return lastLabelClickPos&&lastLabelClickPos.x===e.x&&lastLabelClickPos.y===e.y}function updatePointerState(e,t){var n=getEventPoint(e),o=t.x=n.pageX,r=t.y=n.pageY;t.distanceX=o-t.startX,t.distanceY=r-t.startY,t.distance=Math.sqrt(t.distanceX*t.distanceX+t.distanceY*t.distanceY),t.directionX=0<t.distanceX?"right":t.distanceX<0?"left":"",t.directionY=0<t.distanceY?"down":t.distanceY<0?"up":"",t.duration=+Date.now()-t.startTime,t.velocityX=t.distanceX/t.duration,t.velocityY=t.distanceY/t.duration}function getEventPoint(e){return(e=e.originalEvent||e).touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}function canFocus(e){return!!e&&"-1"!==e.getAttribute("tabindex")&&!e.hasAttribute("disabled")&&(e.hasAttribute("tabindex")||e.hasAttribute("href")||e.isContentEditable||-1!==["INPUT","SELECT","BUTTON","TEXTAREA","VIDEO","AUDIO"].indexOf(e.nodeName))}function InterimElementProvider(){return t.$inject=["$document","$q","$rootScope","$timeout","$rootElement","$animate","$mdUtil","$mdCompiler","$mdTheming","$injector","$exceptionHandler"],e.$get=t,e;function e(r){e.$inject=["$$interimElement","$injector"];var n=["onHide","onShow","onRemove"],a={},c={presets:{}},o={setDefaults:function(e){return c.optionsFactory=e.options,c.methods=(e.methods||[]).concat(n),o},addPreset:function(e,t){if((t=t||{}).methods=t.methods||[],t.options=t.options||function(){return{}},/^cancel|hide|show$/.test(e))throw new Error("Preset '"+e+"' in "+r+" is reserved!");if(-1<t.methods.indexOf("_options"))throw new Error("Method '_options' in "+r+" is reserved!");return c.presets[e]={methods:t.methods.concat(n),optionsFactory:t.options,argOption:t.argOption},o},addMethod:function(e,t){return a[e]=t,o},$get:e};return o.addPreset("build",{methods:["controller","controllerAs","resolve","multiple","template","templateUrl","themable","transformTemplate","parent","contentElement"]}),o;function e(e,o){var d,t,n=e(),m={hide:n.hide,cancel:n.cancel,show:function(e){(e=e||{})._options&&(e=e._options);return n.show(angular.extend({},t,e))},destroy:function(e){return n.destroy(e)}};return d=c.methods||[],t=i(c.optionsFactory,{}),angular.forEach(a,function(e,t){m[t]=e}),angular.forEach(c.presets,function(t,n){var o=i(t.optionsFactory,{}),e=(t.methods||[]).concat(d);function r(e){this._options=angular.extend({},o,e)}if(angular.extend(o,{$type:n}),angular.forEach(e,function(t){r.prototype[t]=function(e){return this._options[t]=e,this}}),t.argOption){var a="show"+n.charAt(0).toUpperCase()+n.slice(1);m[a]=function(e){var t=m[n](e);return m.show(t)}}m[n]=function(e){return arguments.length&&t.argOption&&!angular.isObject(e)&&!angular.isArray(e)?(new r)[t.argOption](e):new r(e)}}),m;function i(e,t){var n={};return n[r]=m,o.invoke(e||function(){return t},{},n)}}}function t(u,s,t,p,E,o,n,h,b,i,c){return function(){var l,r=[],a=[],d=[];return l={show:function(e){var t=new m((e=e||{})||{}),n=e.multiple?s.resolve():s.all(r);e.multiple||(n=n.then(function(){var e=a.concat(d.map(l.cancel));return s.all(e)}));var o=n.then(function(){return t.show().then(function(){d.push(t)}).catch(function(e){return e}).finally(function(){r.splice(r.indexOf(o),1)})});return r.push(o),t.deferred.promise.catch(function(e){return e instanceof Error&&c(e),e}),t.deferred.promise},hide:e(function(n,o){{if((o=o||{}).closeAll)return s.all(d.slice().reverse().map(e));if(void 0!==o.closeTo)return s.all(d.slice(o.closeTo).map(e))}return e(d[d.length-1]);function e(e){if(!e)return s.when(n);var t=e.remove(n,!1,o||{}).catch(function(e){return e}).finally(function(){a.splice(a.indexOf(t),1)});return d.splice(d.indexOf(e),1),a.push(t),e.deferred.promise}}),cancel:e(function(e,t){var n=d.pop();if(!n)return s.when(e);var o=n.remove(e,!0,t||{}).catch(function(e){return e}).finally(function(){a.splice(a.indexOf(o),1)});return a.push(o),n.deferred.promise.catch(angular.noop)}),destroy:function(e){var t=e?null:d.shift(),n=angular.element(e).length&&angular.element(e)[0].parentNode;if(n){var o=d.filter(function(e){return e.options.element[0]===n});o.length&&(t=o[0],d.splice(d.indexOf(t),1))}return t?t.remove(!1,!1,{$destroy:!0}):s.when(!1)},$injector_:i};function e(t){return function(){var e=arguments;return d.length?t.apply(l,e):r.length?r[0].finally(function(){return t.apply(l,e)}):s.when("No interim elements currently showing up.")}}function m(a){var d,m,i=s.when(!0);return a=function(e){(e=e||{}).template&&(e.template=n.processTemplate(e.template));return angular.extend({preserveScope:!1,cancelAutoHide:angular.noop,scope:e.scope||t.$new(e.isolateScope),onShow:function(e,t,n){return o.enter(t,n.parent)},onRemove:function(e,t){return t&&o.leave(t)||s.when()}},e)}(a),d={options:a,deferred:s.defer(),show:function(){return s(function(t,n){function o(e){d.deferred.reject(e),n(e)}a.onCompiling&&a.onCompiling(a),function(t){return(t.skipCompile?null:h.compile(t))||s(function(e){e({locals:{},link:function(){return t.element}})})}(a).then(function(e){m=function(e,t){angular.extend(e.locals,t);var n=e.link(t.scope);t.element=n,t.parent=function(e,t){var n,o=t.parent;o=angular.isFunction(o)?o(t.scope,e,t):angular.isString(o)?angular.element(u[0].querySelector(o)):angular.element(o);if((o||{}).length)return o;E[0]&&E[0].querySelector&&(n=E[0].querySelector(":not(svg) > body"));n=n||E[0];"#comment"===n.nodeName&&(n=u[0].body);return angular.element(n)}(n,t),t.themable&&b(n);return n}(e,a),a.cleanupElement=e.cleanup,i=function(n,o,e){var t=o.onShowing||angular.noop,r=o.onComplete||angular.noop;try{t(o.scope,n,o,e)}catch(e){return s.reject(e)}return s(function(e,t){try{s.when(o.onShow(o.scope,n,o)).then(function(){r(o.scope,n,o),function(){var e,t=angular.noop;a.hideDelay&&(e=p(l.hide,a.hideDelay),t=function(){p.cancel(e)});a.cancelAutoHide=function(){t(),a.cancelAutoHide=void 0}}(),e(n)},t)}catch(e){t(e.message)}})}(m,a,e.controller).then(t,o)}).catch(o)})},remove:function(e,t,n){if(!m)return s.when(!1);return(a=angular.extend(a||{},n||{})).cancelAutoHide&&a.cancelAutoHide(),a.element.triggerHandler("$mdInterimElementRemove"),!0===a.$destroy?c(a.element,a).then(function(){t&&r(e)||o(e)}):(s.when(i).finally(function(){c(a.element,a).then(function(){t?r(e):o(e)},r)}),d.deferred.promise);function o(e){d.deferred.resolve(e)}function r(e){d.deferred.reject(e)}}};function c(o,r){var a=r.onRemoving||angular.noop;return s(function(e,t){try{var n=s.when(r.onRemove(r.scope,o,r)||!0);a(o,n),r.$destroy?(e(o),!r.preserveScope&&r.scope&&n.then(function(){r.scope.$destroy()})):n.then(function(){!r.preserveScope&&r.scope&&r.scope.$destroy(),e(o)},t)}catch(e){t(e.message)}})}}}}}function MdInteractionService(e,t,n){this.$timeout=e,this.$mdUtil=t,this.$rootScope=n,this.pointerEvent="MSPointerEvent"in window?"MSPointerDown":"PointerEvent"in window?"pointerdown":null,this.bodyElement=angular.element(document.body),this.isBuffering=!1,this.bufferTimeout=null,this.lastInteractionType=null,this.lastInteractionTime=null,this.inputHandler=this.onInputEvent.bind(this),this.bufferedInputHandler=this.onBufferInputEvent.bind(this),this.inputEventMap={keydown:"keyboard",mousedown:"mouse",mouseenter:"mouse",touchstart:"touch",pointerdown:"pointer",MSPointerDown:"pointer"},this.iePointerMap={2:"touch",3:"touch",4:"mouse"},this.initializeEvents(),this.$rootScope.$on("$destroy",this.deregister.bind(this))}function MdLiveAnnouncer(e){this._$timeout=e,this._liveElement=this._createLiveElement(),this._announceTimeout=100}function ComponentRegistry(n,o){var r,a=[],d={};return r={notFoundError:function(e,t){n.error((t||"")+"No instance found for handle",e)},getInstances:function(){return a},get:function(e){if(!m(e))return null;var t,n,o;for(t=0,n=a.length;t<n;t++)if((o=a[t]).$$mdHandle===e)return o;return null},register:function(t,e){return e?(t.$$mdHandle=e,a.push(t),(n=d[e])&&(n.forEach(function(e){e.resolve(t)}),delete d[e]),function(){var e=a.indexOf(t);-1!==e&&a.splice(e,1)}):angular.noop;var n},when:function(e){if(m(e)){var t=o.defer(),n=r.get(e);return n?t.resolve(n):(void 0===d[e]&&(d[e]=[]),d[e].push(t)),t.promise}return o.reject("Invalid `md-component-id` value.")}};function m(e){return e&&""!==e}}angular.module("material.core.gestures",[]).provider("$mdGesture",MdGestureProvider).factory("$$MdGestureHandler",MdGestureHandler).run(attachToDocument),MdGestureProvider.prototype={disableAll:function(){disableAllGestures=!0},skipClickHijack:function(){return forceSkipClickHijack=!0},setMaxClickDistance:function(e){maxClickDistance=parseInt(e)},$get:["$$MdGestureHandler","$$rAF","$timeout","$mdUtil",function(e,t,n,o){return new MdGesture(e,t,n,o)}]},angular.module("material.core").provider("$$interimElement",InterimElementProvider),MdInteractionService.$inject=["$timeout","$mdUtil","$rootScope"],angular.module("material.core.interaction",[]).service("$mdInteraction",MdInteractionService),MdInteractionService.prototype.deregister=function(){this.bodyElement.off("keydown mousedown",this.inputHandler),"ontouchstart"in document.documentElement&&this.bodyElement.off("touchstart",this.bufferedInputHandler),this.pointerEvent&&this.bodyElement.off(this.pointerEvent,this.inputHandler)},MdInteractionService.prototype.initializeEvents=function(){this.bodyElement.on("keydown mousedown",this.inputHandler),"ontouchstart"in document.documentElement&&this.bodyElement.on("touchstart",this.bufferedInputHandler),this.pointerEvent&&this.bodyElement.on(this.pointerEvent,this.inputHandler)},MdInteractionService.prototype.onInputEvent=function(e){if(!this.isBuffering){var t=this.inputEventMap[e.type];"pointer"===t&&(t=this.iePointerMap[e.pointerType]||e.pointerType),this.lastInteractionType=t,this.lastInteractionTime=this.$mdUtil.now()}},MdInteractionService.prototype.onBufferInputEvent=function(e){this.$timeout.cancel(this.bufferTimeout),this.onInputEvent(e),this.isBuffering=!0,this.bufferTimeout=this.$timeout(function(){this.isBuffering=!1}.bind(this),650,!1)},MdInteractionService.prototype.getLastInteractionType=function(){return this.lastInteractionType},MdInteractionService.prototype.isUserInvoked=function(e){var t=angular.isNumber(e)?e:15;return this.lastInteractionTime>=this.$mdUtil.now()-t},function(){"use strict";var d,m,i,o,r,t,n,e,a,c=/(-gt)?-(sm|md|lg|print)/g,l=/\s+/g,u=["grow","initial","auto","none","noshrink","nogrow"],s=["row","column"],p=["","start","center","end","stretch","space-around","space-between"],E=["","start","center","end","stretch"],h={enabled:!0,breakpoints:[]};function b(e){return e.replace(t,"").replace(n,function(e,t,n,o){return o?n.toUpperCase():n})}function f(){var e=!!document.querySelector("[md-layouts-disabled]");h.enabled=!e}function M(){return h.enabled=!1,{restrict:"A",priority:"900"}}function g(o){return["$mdUtil","$interpolate","$log",function(e,t,n){return d=e,m=t,i=n,{restrict:"A",compile:function(e,t){var n;return h.enabled&&(v(o,N(o,t,""),T(e,o,t)),r(null,e),n=r),n||angular.noop}}}];function r(e,t){t.addClass(o)}}function A(e,t,n,o){var r,a=n[0].nodeName.toLowerCase();switch(e.replace(c,"")){case"flex":"md-button"!==a&&"fieldset"!==a||(r="<"+a+" "+e+"></"+a+">","https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers","Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",o.warn(d.supplant("Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",[r,"https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers"])))}}function v(e,t,n){var o=t;if(!_(t)){switch(e.replace(c,"")){case"layout":k(t,s)||(t=s[0]);break;case"flex":k(t,u)||isNaN(t)&&(t="");break;case"flex-offset":case"flex-order":t&&!isNaN(+t)||(t="0");break;case"layout-align":var r=function(e){var t,n={main:"start",cross:"stretch"};0!==(e=e||"").indexOf("-")&&0!==e.indexOf(" ")||(e="none"+e);(t=e.toLowerCase().trim().replace(l,"-").split("-")).length&&"space"===t[0]&&(t=[t[0]+"-"+t[1],t[2]]);0<t.length&&(n.main=t[0]||n.main);1<t.length&&(n.cross=t[1]||n.cross);p.indexOf(n.main)<0&&(n.main="start");E.indexOf(n.cross)<0&&(n.cross="stretch");return n}(t);t=d.supplant("{main}-{cross}",r);break;case"layout-padding":case"layout-margin":case"layout-fill":case"layout-wrap":case"layout-nowrap":t=""}t!==o&&(n||angular.noop)(t)}return t?t.trim():""}function T(e,t,n){return function(e){_(e)||(n[n.$normalize(t)]=e)}}function _(e){return-1<(e||"").indexOf(m.startSymbol())}function N(e,t,n){var o=t.$normalize(e);return t[o]?t[o].trim().replace(l,"-"):n||null}function k(t,e,n){t=n&&t?t.replace(l,n):t;var o=!1;return t&&e.forEach(function(e){e=n?e.replace(l,n):e,o=o||e===t}),o}r=angular.module("material.core.layout",["ng"]),t=/^((?:x|data)[:\-_])/i,n=/([:\-_]+(.))/g,e=["layout","flex","flex-order","flex-offset","layout-align"],a=["show","hide","layout-padding","layout-margin"],angular.forEach(["","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print"],function(n){angular.forEach(e,function(e){var t=n?e+"-"+n:e;r.directive(b(t),function(a){return["$mdUtil","$interpolate","$log",function(e,t,n){return d=e,m=t,i=n,{restrict:"A",compile:function(e,t){var n;return h.enabled&&(A(a,t,e,i),v(a,N(a,t,""),T(e,a,t)),n=o),n||angular.noop}}}];function o(e,t,n){var o=function(n,o){var r;return function(e){var t=v(o,e||"");angular.isDefined(t)&&(r&&n.removeClass(r),r=t?o+"-"+t.trim().replace(l,"-"):o,n.addClass(r))}}(t,a),r=n.$observe(n.$normalize(a),o);o(N(a,n,"")),e.$on("$destroy",function(){r()})}}(t))}),angular.forEach(a,function(e){var t=n?e+"-"+n:e;r.directive(b(t),g(t))})}),r.provider("$$mdLayout",function(){return{$get:angular.noop,validateAttributeValue:v,validateAttributeUsage:A,disableLayouts:function(e){h.enabled=!0!==e}}}).directive("mdLayoutCss",M).directive("ngCloak",(o="ng-cloak",["$timeout",function(n){return{restrict:"A",priority:-10,compile:function(e){return h.enabled?(e.addClass(o),function(e,t){n(function(){t.removeClass(o)},10,!1)}):angular.noop}}}])).directive("layoutWrap",g("layout-wrap")).directive("layoutNowrap",g("layout-nowrap")).directive("layoutNoWrap",g("layout-no-wrap")).directive("layoutFill",g("layout-fill")).config(f)}(),MdLiveAnnouncer.$inject=["$timeout"],angular.module("material.core").service("$mdLiveAnnouncer",MdLiveAnnouncer),MdLiveAnnouncer.prototype.announce=function(e,t){t=t||"polite";var n=this;n._liveElement.textContent="",n._liveElement.setAttribute("aria-live",t),n._$timeout(function(){n._liveElement.textContent=e},n._announceTimeout,!1)},MdLiveAnnouncer.prototype._createLiveElement=function(){var e=document.createElement("div");return e.classList.add("md-visually-hidden"),e.setAttribute("role","status"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-live","polite"),document.body.appendChild(e),e},angular.module("material.core.meta",[]).provider("$$mdMeta",function(){var o=angular.element(document.head),r={};function a(e){if(r[e])return!0;var t=document.getElementsByName(e)[0];return!!t&&(r[e]=angular.element(t),!0)}var e={setMeta:function(e,t){if(a(e),r[e])r[e].attr("content",t);else{var n=angular.element('<meta name="'+e+'" content="'+t+'"/>');o.append(n),r[e]=n}return function(){r[e].attr("content",""),r[e].remove(),delete r[e]}},getMeta:function(e){if(!a(e))throw Error("$$mdMeta: could not find a meta tag with the name '"+e+"'");return r[e].attr("content")}};return angular.extend({},e,{$get:function(){return e}})}),ComponentRegistry.$inject=["$log","$q"],angular.module("material.core").factory("$mdComponentRegistry",ComponentRegistry),function(){"use strict";function e(o){return{attach:function(e,t,n){return n=angular.extend(function(e){return e.hasClass("md-icon-button")?{isMenuItem:e.hasClass("md-menu-item"),fitRipple:!0,center:!0}:{isMenuItem:e.hasClass("md-menu-item"),dimBackground:!0}}(t),n),o.attach(e,t,n)}}}e.$inject=["$mdInkRipple"],angular.module("material.core").factory("$mdButtonInkRipple",e)}(),function(){"use strict";function e(o){return{attach:function(e,t,n){return o.attach(e,t,angular.extend({center:!0,dimBackground:!1,fitRipple:!0},n))}}}e.$inject=["$mdInkRipple"],angular.module("material.core").factory("$mdCheckboxInkRipple",e)}(),function(){"use strict";function e(o){return{attach:function(e,t,n){return o.attach(e,t,angular.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},n))}}}e.$inject=["$mdInkRipple"],angular.module("material.core").factory("$mdListInkRipple",e)}(),InkRippleCtrl.$inject=["$scope","$element","rippleOptions","$window","$timeout","$mdUtil","$mdColorUtil"],InkRippleDirective.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"],angular.module("material.core").provider("$mdInkRipple",InkRippleProvider).directive("mdInkRipple",InkRippleDirective).directive("mdNoInk",attrNoDirective).directive("mdNoBar",attrNoDirective).directive("mdNoStretch",attrNoDirective);var DURATION=450;function InkRippleDirective(o,r){return{controller:angular.noop,link:function(e,t,n){n.hasOwnProperty("mdInkRippleCheckbox")?r.attach(e,t):o.attach(e,t)}}}function InkRippleProvider(){var r=!1;return{disableInkRipple:function(){r=!0},$get:["$injector",function(o){return{attach:function(e,t,n){return r||t.controller("mdNoInk")?angular.noop:o.instantiate(InkRippleCtrl,{$scope:e,$element:t,rippleOptions:n})}}}]}}function InkRippleCtrl(e,t,n,o,r,a,d){this.$window=o,this.$timeout=r,this.$mdUtil=a,this.$mdColorUtil=d,this.$scope=e,this.$element=t,this.options=n,this.mousedown=!1,this.ripples=[],this.timeout=null,this.lastRipple=null,a.valueOnUse(this,"container",this.createContainer),this.$element.addClass("md-ink-ripple"),(t.controller("mdInkRipple")||{}).createRipple=angular.bind(this,this.createRipple),(t.controller("mdInkRipple")||{}).setColor=angular.bind(this,this.color),this.bindEvents()}function autoCleanup(e,t){(e.mousedown||e.lastRipple)&&(e.mousedown=!1,e.$mdUtil.nextTick(angular.bind(e,t),!1))}function attrNoDirective(){return{controller:angular.noop}}function AnimateDomUtils(n,e,i,c,a){var l;return l={translate3d:function(t,n,e,o){return a(t,{from:n,to:e,addClass:o.transitionInClass,removeClass:o.transitionOutClass,duration:o.duration}).start().then(function(){return r});function r(e){return a(t,{to:e||n,addClass:o.transitionOutClass,removeClass:o.transitionInClass,duration:o.duration}).start()}},waitTransitionEnd:function(a,d){var m=3e3;return e(function(t,e){var n;"0s"!==(n=(n=(d=d||{}).cachedTransitionStyles)||window.getComputedStyle(a[0])).transitionDuration&&(n.transition||n.transitionProperty)||(m=0);var o=i(r,d.timeout||m);function r(e){e&&e.target!==a[0]||(e&&i.cancel(o),a.off(c.CSS.TRANSITIONEND,r),t())}a.on(c.CSS.TRANSITIONEND,r)})},calculateTransformValues:function(e,t){var n,o,r=t.element,a=t.bounds;if(r||a){var d=r?l.clientRect(r)||(n=e?e.parent():null,(o=n?n.parent():null)?l.clientRect(o):null):l.copyRect(a),m=l.copyRect(e[0].getBoundingClientRect()),i=l.centerPointFor(m),c=l.centerPointFor(d);return{centerX:c.x-i.x,centerY:c.y-i.y,scaleX:Math.round(100*M