mcs-ng-material
Version:
MCS NG-Meterial is based on mcs-web.
8 lines • 125 kB
JavaScript
/*!
* AngularJS Material Design
* https://github.com/angular/material
* @license MIT
* v1.1.5-master-515959d
*/
!function(e,t,n){"use strict";function o(e,t){if(t.has("$swipe")){var n="You are using the ngTouch module. \nAngularJS Material already has mobile click, tap, and swipe support... \nngTouch is not supported with AngularJS Material!";e.warn(n)}}function r(e,t){e.decorator("$$rAF",["$delegate",d]),e.decorator("$q",["$delegate",a]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}function d(e){return e.throttle=function(t){var n,o,r,d;return function(){n=arguments,d=this,r=t,o||(o=!0,e(function(){r.apply(d,Array.prototype.slice.call(n)),o=!1}))}},e}function a(e){return e.resolve||(e.resolve=e.when),e}function m(e){function n(n,o,r){function d(e){t.isUndefined(e)&&(e=!0),o.toggleClass("md-autofocus",!!e)}var a=r.mdAutoFocus||r.mdAutofocus||r.mdSidenavFocus;d(e(a)(n)),a&&n.$watch(a,d)}return{restrict:"A",link:{pre:n}}}function i(){function e(e){var t="#"===e[0]?e.substr(1):e,n=t.length/3,o=t.substr(0,n),r=t.substr(n,n),d=t.substr(2*n);return 1===n&&(o+=o,r+=r,d+=d),"rgba("+parseInt(o,16)+","+parseInt(r,16)+","+parseInt(d,16)+",0.1)"}function t(e){e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i);var t=e&&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):"";return t.toUpperCase()}function n(e){return e.replace(")",", 0.1)").replace("(","a(")}function o(e){return e?e.replace("rgba","rgb").replace(/,[^),]+\)/,")"):"rgb(0,0,0)"}return{rgbaToHex:t,hexToRgba:e,rgbToRgba:n,rgbaToRgb:o}}function c(){function e(e){var t=a+"-"+e,r=o(t),m=r.charAt(0).toLowerCase()+r.substring(1);return n(d,e)?e:n(d,r)?r:n(d,m)?m:e}function n(e,n){return t.isDefined(e.style[n])}function o(e){return e.replace(i,function(e,t,n,o){return o?n.toUpperCase():n})}function r(e){var t,n,o=/^(Moz|webkit|ms)(?=[A-Z])/;for(t in e.style)if(n=o.exec(t))return n[0]}var d=document.createElement("div"),a=r(d),m=/webkit/i.test(a),i=/([:\-_]+(.))/g,c={isInputKey:function(e){return e.keyCode>=31&&e.keyCode<=90},isNumPadKey:function(e){return 3===e.location&&e.keyCode>=97&&e.keyCode<=105},isMetaKey:function(e){return e.keyCode>=91&&e.keyCode<=93},isFnLockKey:function(e){return e.keyCode>=112&&e.keyCode<=145},isNavigationKey:function(e){var t=c.KEY_CODE,n=[t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW];return n.indexOf(e.keyCode)!=-1},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"+(m?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(m?" webkitAnimationEnd":""),TRANSFORM:e("transform"),TRANSFORM_ORIGIN:e("transformOrigin"),TRANSITION:e("transition"),TRANSITION_DURATION:e("transitionDuration"),ANIMATION_PLAY_STATE:e("animationPlayState"),ANIMATION_DURATION:e("animationDuration"),ANIMATION_NAME:e("animationName"),ANIMATION_TIMING:e("animationTimingFunction"),ANIMATION_DIRECTION:e("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 c}function l(e,n){function o(){return[].concat(M)}function r(){return M.length}function d(e){return M.length&&e>-1&&e<M.length}function a(e){return!!e&&d(u(e)+1)}function m(e){return!!e&&d(u(e)-1)}function i(e){return d(e)?M[e]:null}function c(e,t){return M.filter(function(n){return n[e]===t})}function l(e,n){return e?(t.isNumber(n)||(n=M.length),M.splice(n,0,e),u(e)):-1}function s(e){p(e)&&M.splice(u(e),1)}function u(e){return M.indexOf(e)}function p(e){return e&&u(e)>-1}function E(){return M.length?M[0]:null}function h(){return M.length?M[M.length-1]:null}function f(e,o,r,a){r=r||b;for(var m=u(o);;){if(!d(m))return null;var i=m+(e?-1:1),c=null;if(d(i)?c=M[i]:n&&(c=e?h():E(),i=u(c)),null===c||i===a)return null;if(r(c))return c;t.isUndefined(a)&&(a=i),m=i}}var b=function(){return!0};e&&!t.isArray(e)&&(e=Array.prototype.slice.call(e)),n=!!n;var M=e||[];return{items:o,count:r,inRange:d,contains:p,indexOf:u,itemAt:i,findBy:c,add:l,remove:s,first:E,last:h,next:t.bind(null,f,!1),previous:t.bind(null,f,!0),hasPrevious:m,hasNext:a}}function s(e,n,o){function r(e){var n=u[e];t.isUndefined(n)&&(n=u[e]=d(e));var o=E[n];return t.isUndefined(o)&&(o=a(n)),o}function d(t){return e.MEDIA[t]||("("!==t.charAt(0)?"("+t+")":t)}function a(e){var t=p[e];return t||(t=p[e]=o.matchMedia(e)),t.addListener(m),E[t.media]=!!t.matches}function m(e){n.$evalAsync(function(){E[e.media]=!!e.matches})}function i(e){return p[e]}function c(t,n){for(var o=0;o<e.MEDIA_PRIORITY.length;o++){var r=e.MEDIA_PRIORITY[o];if(p[u[r]].matches){var d=s(t,n+"-"+r);if(t[d])return t[d]}}return t[s(t,n)]}function l(n,o,r){var d=[];return n.forEach(function(n){var a=s(o,n);t.isDefined(o[a])&&d.push(o.$observe(a,t.bind(void 0,r,null)));for(var m in e.MEDIA)a=s(o,n+"-"+m),t.isDefined(o[a])&&d.push(o.$observe(a,t.bind(void 0,r,m)))}),function(){d.forEach(function(e){e()})}}function s(e,t){return h[t]||(h[t]=e.$normalize(t))}var u={},p={},E={},h={};return r.getResponsiveAttribute=c,r.getQuery=i,r.watchResponsiveAttributes=l,r}function u(e,n){function o(e){return e=t.isArray(e)?e:[e],e.forEach(function(t){i.forEach(function(n){e.push(n+"-"+t)})}),e}function r(e){return e=t.isArray(e)?e:[e],o(e).map(function(e){return"["+e+"]"}).join(",")}function d(e,t){if(e=m(e),!e)return!1;for(var n=o(t),r=0;r<n.length;r++)if(e.hasAttribute(n[r]))return!0;return!1}function a(e,t){e=m(e),e&&o(t).forEach(function(t){e.removeAttribute(t)})}function m(e){if(e=e[0]||e,e.nodeType)return e}var i=["data","x"];return e?n?r(e):o(e):{buildList:o,buildSelector:r,hasAttribute:d,removeAttribute:a}}function p(o,r,d,a,m,i,c,l,s,u){function p(e){return e?E(e)||h(e)?e:e+"px":"0"}function E(e){return String(e).indexOf("px")>-1}function h(e){return String(e).indexOf("%")>-1}function f(e){return e[0]||e}var b=i.startSymbol(),M=i.endSymbol(),g="{{"===b&&"}}"===M,A=function(e,n,o){var r=!1;if(e&&e.length){var d=s.getComputedStyle(e[0]);r=t.isDefined(d[n])&&(!o||d[n]==o)}return r},v={dom:{},now:e.performance&&e.performance.now?t.bind(e.performance,e.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]}},bidi:function(e,n,r,d){var a=!("rtl"==o[0].dir||"rtl"==o[0].body.dir);if(0==arguments.length)return a?"ltr":"rtl";var m=t.element(e);a&&t.isDefined(r)?m.css(n,p(r)):!a&&t.isDefined(d)&&m.css(n,p(d))},bidiProperty:function(e,n,r,d){var a=!("rtl"==o[0].dir||"rtl"==o[0].body.dir),m=t.element(e);a&&t.isDefined(n)?(m.css(n,p(d)),m.css(r,"")):!a&&t.isDefined(r)&&(m.css(r,p(d)),m.css(n,""))},clientRect:function(e,t,n){var o=f(e);t=f(t||o.offsetParent||document.body);var r=o.getBoundingClientRect(),d=n?t.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:r.left-d.left,top:r.top-d.top,width:r.width,height:r.height}},offsetRect:function(e,t){return v.clientRect(e,t,!0)},nodesToArray:function(e){e=e||[];for(var t=[],n=0;n<e.length;++n)t.push(e.item(n));return t},getViewportTop:function(){return e.scrollY||e.pageYOffset||0},findFocusTarget:function(e,n){function o(e,n){var o,r=e[0].querySelectorAll(n);return r&&r.length&&r.length&&t.forEach(r,function(e){e=t.element(e);var n=e.hasClass("md-autofocus");n&&(o=e)}),o}var r,d=this.prefixer("md-autofocus",!0);return r=o(e,n||d),r||n==d||(r=o(e,this.prefixer("md-auto-focus",!0)),r||(r=o(e,d))),r},disableScrollAround:function(e,n,r){function d(e){function n(e){e.preventDefault()}e=t.element(e||m);var o;return r.disableScrollMask?o=e:(o=t.element('<div class="md-scroll-mask"> <div class="md-scroll-mask-bar"></div></div>'),e.append(o)),o.on("wheel",n),o.on("touchmove",n),function(){o.off("wheel"),o.off("touchmove"),!r.disableScrollMask&&o[0].parentNode&&o[0].parentNode.removeChild(o[0])}}function a(){var e=o[0].documentElement,n=e.style.cssText||"",r=m.style.cssText||"",d=v.getViewportTop(),a=m.clientWidth,i=m.scrollHeight>m.clientHeight+1,c=e.scrollTop>0?e:m;return i&&t.element(m).css({position:"fixed",width:"100%",top:-d+"px"}),m.clientWidth<a&&(m.style.overflow="hidden"),i&&(e.style.overflowY="scroll"),function(){m.style.cssText=r,e.style.cssText=n,c.scrollTop=d}}if(r=r||{},v.disableScrollAround._count=Math.max(0,v.disableScrollAround._count||0),v.disableScrollAround._count++,v.disableScrollAround._restoreScroll)return v.disableScrollAround._restoreScroll;var m=o[0].body,i=a(),c=d(n);return v.disableScrollAround._restoreScroll=function(){--v.disableScrollAround._count<=0&&(i(),c(),delete v.disableScrollAround._restoreScroll)}},enableScrolling:function(){var e=this.disableScrollAround._restoreScroll;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===n){var e=t.element("<div><div></div></div>").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});e.children().css("height","60px"),o[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth==e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(t){var n=t[0]||t;document.addEventListener("click",function r(e){e.target===n&&e.$focus&&(n.focus(),e.stopImmediatePropagation(),e.preventDefault(),n.removeEventListener("click",r))},!0);var o=document.createEvent("MouseEvents");o.initMouseEvent("click",!1,!0,e,{},0,0,0,0,!1,!1,!1,!1,0,null),o.$material=!0,o.$focus=!0,n.dispatchEvent(o)},createBackdrop:function(e,t){return d(v.supplant('<md-backdrop class="{0}">',[t]))(e)},supplant:function(e,t,n){return n=n||/\{([^{}]*)\}/g,e.replace(n,function(e,n){var o=n.split("."),r=t;try{for(var d in o)o.hasOwnProperty(d)&&(r=r[o[d]])}catch(a){r=e}return"string"==typeof r||"number"==typeof r?r:e})},fakeNgModel:function(){return{$fake:!0,$setTouched:t.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:t.noop}},debounce:function(e,t,o,d){var a;return function(){var m=o,i=Array.prototype.slice.call(arguments);r.cancel(a),a=r(function(){a=n,e.apply(m,i)},t||10,d)}},throttle:function(e,t){var n;return function(){var o=this,r=arguments,d=v.now();(!n||d-n>t)&&(e.apply(o,r),n=d)}},time:function(e){var t=v.now();return e(),v.now()-t},valueOnUse:function(e,t,n){var o=null,r=Array.prototype.slice.call(arguments),d=r.length>3?r.slice(3):[];Object.defineProperty(e,t,{get:function(){return null===o&&(o=n.apply(e,d)),o}})},nextUid:function(){return""+L++},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}},getClosest:function(e,n,o){if(t.isString(n)){var r=n.toUpperCase();n=function(e){return e.nodeName.toUpperCase()===r}}if(e instanceof t.element&&(e=e[0]),o&&(e=e.parentNode),!e)return null;do if(n(e))return e;while(e=e.parentNode);return null},elementContains:function(n,o){var r=e.Node&&e.Node.prototype&&Node.prototype.contains,d=r?t.bind(n,n.contains):t.bind(n,function(e){return n===o||!!(16&this.compareDocumentPosition(e))});return d(o)},extractElementByName:function(e,n,o,r){function d(e){return a(e)||(o?m(e):null)}function a(e){if(e)for(var t=0,o=e.length;t<o;t++)if(e[t].nodeName.toLowerCase()===n)return e[t];return null}function m(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,m=r.childNodes.length;a<m;a++)t=t||d([r.childNodes[a]])}return t}var i=d(e);return!i&&r&&c.warn(v.supplant("Unable to find node '{0}' in element '{1}'.",[n,e[0].outerHTML])),t.element(i||e)},initOptionalProperties:function(e,n,o){o=o||{},t.forEach(e.$$isolateBindings,function(r,d){if(r.optional&&t.isUndefined(e[d])){var a=t.isDefined(n[r.attrName]);e[d]=t.isDefined(o[d])?o[d]:a}})},nextTick:function(e,t,n){function o(){var e=d.queue,t=d.digest;d.queue=[],d.timeout=null,d.digest=!1,e.forEach(function(e){var t=e.scope&&e.scope.$$destroyed;t||e.callback()}),t&&a.$digest()}var d=v.nextTick,m=d.timeout,i=d.queue||[];return i.push({scope:n,callback:e}),null==t&&(t=!0),d.digest=d.digest||t,d.queue=i,m||(d.timeout=r(o,0,!1))},processTemplate:function(e){return g?e:e&&t.isString(e)?e.replace(/\{\{/g,b).replace(/}}/g,M):e},getParentWithPointerEvents:function(e){for(var t=e.parent();A(t,"pointer-events","none");)t=t.parent();return t},getNearestContentElement:function(e){for(var t=e.parent()[0];t&&t!==l[0]&&t!==document.body&&"MD-CONTENT"!==t.nodeName.toUpperCase();)t=t.parentNode;return t},checkStickySupport:function(){var e,n=t.element("<div>");o[0].body.appendChild(n[0]);for(var r=["sticky","-webkit-sticky"],d=0;d<r.length;++d)if(n.css({position:r[d],top:0,"z-index":2}),n.css("position")==r[d]){e=r[d];break}return n.remove(),e},parseAttributeBoolean:function(e,t){return""===e||!!e&&(t===!1||"false"!==e&&"0"!==e)},hasComputedStyle:A,isParentFormSubmitted:function(e){var n=v.getClosest(e,"form"),o=n?t.element(n).controller("form"):null;return!!o&&o.$submitted},animateScrollTo:function(e,t,n){function o(){var n=r();e.scrollTop=n,(i?n<t:n>t)&&u(o)}function r(){var e=n||1e3,t=v.now()-c;return d(t,a,m,e)}function d(e,t,n,o){if(e>o)return t+n;var r=(e/=o)*e,d=r*e;return t+n*(-2*d+3*r)}var a=e.scrollTop,m=t-a,i=a<t,c=v.now();u(o)},uniq:function(e){if(e)return e.filter(function(e,t,n){return n.indexOf(e)===t})}};return v.dom.animator=m(v),v}function E(){function e(){t.showWarnings=!1}var t={showWarnings:!0};return{disableWarnings:e,$get:["$$rAF","$log","$window","$interpolate",function(e,n,o,r){return h.apply(t,arguments)}]}}function h(e,n,o,r){function d(e,o,r){var d=t.element(e)[0]||e;!d||d.hasAttribute(o)&&0!==d.getAttribute(o).length||l(d,o)||(r=t.isString(r)?r.trim():"",r.length?e.attr(o,r):p&&n.warn('ARIA: Attribute "',o,'", required for accessibility, is missing on node:',d))}function a(t,n,o){e(function(){d(t,n,o())})}function m(e,t){var n=c(e)||"",o=n.indexOf(r.startSymbol())>-1;o?a(e,t,function(){return c(e)}):d(e,t,n)}function i(e,t){var n=c(e),o=n.indexOf(r.startSymbol())>-1;o||n||d(e,t,n)}function c(e){function t(t){for(;t.parentNode&&(t=t.parentNode)!==e;)if(t.getAttribute&&"true"===t.getAttribute("aria-hidden"))return!0}e=e[0]||e;for(var n,o=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,null,!1),r="";n=o.nextNode();)t(n)||(r+=n.textContent);return r.trim()||""}function l(e,t){function n(e){var t=e.currentStyle?e.currentStyle:o.getComputedStyle(e);return"none"===t.display}var r=e.hasChildNodes(),d=!1;if(r)for(var a=e.childNodes,m=0;m<a.length;m++){var i=a[m];1===i.nodeType&&i.hasAttribute(t)&&(n(i)||(d=!0))}return d}function s(e){var n=t.element(e)[0]||e;return!!n.hasAttribute&&(n.hasAttribute("aria-label")||n.hasAttribute("aria-labelledby")||n.hasAttribute("aria-describedby"))}function u(e,n){function o(e){if(!s(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}n=n||1;var r=t.element(e)[0]||e;return!!r.parentNode&&(!!o(r.parentNode)||(n--,!!n&&u(r.parentNode,n)))}var p=this.showWarnings;return{expect:d,expectAsync:a,expectWithText:m,expectWithoutText:i,getText:c,hasAriaLabel:s,parentHasAriaLabel:u}}function f(e){function n(){return!r||("function"==typeof e.preAssignBindingsEnabled?e.preAssignBindingsEnabled():1===t.version.major&&t.version.minor<6)}function o(e,t,n,o,r){this.$q=e,this.$templateRequest=t,this.$injector=n,this.$compile=o,this.$controller=r}var r=!1;this.respectPreAssignBindingsEnabled=function(e){return t.isDefined(e)?(r=e,this):r},this.$get=["$q","$templateRequest","$injector","$compile","$controller",function(e,t,n,r,d){return new o(e,t,n,r,d)}],o.prototype.compile=function(e){return e.contentElement?this._prepareContentElement(e):this._compileTemplate(e)},o.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}})},o.prototype._compileTemplate=function(e){var n=this,o=e.templateUrl,r=e.template||"",d=t.extend({},e.resolve),a=t.extend({},e.locals),m=e.transformTemplate||t.identity;return t.forEach(d,function(e,o){t.isString(e)?d[o]=n.$injector.get(e):d[o]=n.$injector.invoke(e)}),t.extend(d,a),o?d.$$ngTemplate=this.$templateRequest(o):d.$$ngTemplate=this.$q.when(r),this.$q.all(d).then(function(o){var r=m(o.$$ngTemplate,e),d=e.element||t.element("<div>").html(r.trim()).contents();return n._compileElement(o,d,e)})},o.prototype._compileElement=function(e,n,o){function r(r){if(e.$scope=r,o.controller){var i=t.extend({},e,{$element:n}),c=d._createController(o,i,e);n.data("$ngControllerController",c),n.children().data("$ngControllerController",c),m.controller=c}return a(r)}var d=this,a=this.$compile(n),m={element:n,cleanup:n.remove.bind(n),locals:e,link:r};return m},o.prototype._createController=function(e,o,r){var d=this.$controller(e.controller,o,!0,e.controllerAs);n()&&e.bindToController&&t.extend(d.instance,r);var a=d();return!n()&&e.bindToController&&t.extend(a,r),t.isFunction(a.$onInit)&&a.$onInit(),a},o.prototype._fetchContentElement=function(e){function n(e){var t=e.parentNode,n=e.nextElementSibling;return function(){n?t.insertBefore(e,n):t.appendChild(e)}}var o=e.contentElement,r=null;return t.isString(o)?(o=document.querySelector(o),r=n(o)):(o=o[0]||o,r=document.contains(o)?n(o):function(){o.parentNode&&o.parentNode.removeChild(o)}),{element:t.element(o),restore:r}}}function b(){}function M(n,o,r){function d(e){return function(t,n){n.distance<this.state.options.maxDistance&&this.dispatchEvent(t,e,n)}}function a(e,t,n){var o=F[t.replace(/^\$md./,"")];if(!o)throw new Error("Failed to register element with handler "+t+". Available handlers: "+Object.keys(F).join(", "));return o.registerElement(e,n)}function m(e,o){var r=new n(e);return t.extend(r,o),F[e]=r,E}function i(){for(var e=document.createElement("div"),n=["","webkit","Moz","MS","ms","o"],o=0;o<n.length;o++){var r=n[o],d=r?r+"TouchAction":"touchAction";if(t.isDefined(e.style[d]))return d}}var c=navigator.userAgent||navigator.vendor||e.opera,l=c.match(/ipad|iphone|ipod/i),s=c.match(/android/i),u=i(),p="undefined"!=typeof e.jQuery&&t.element===e.jQuery,E={handler:m,register:a,isHijackingClicks:(l||s)&&!p&&!Y};return E.isHijackingClicks&&(E.handler("click",{options:{maxDistance:B},onEnd:d("click")}),E.handler("focus",{options:{maxDistance:B},onEnd:function(e,t){t.distance<this.state.options.maxDistance&&H(e.target)&&(this.dispatchEvent(e,"focus",t),e.target.focus())}}),E.handler("mouseup",{options:{maxDistance:B},onEnd:d("mouseup")}),E.handler("mousedown",{onStart:function(e){this.dispatchEvent(e,"mousedown")}})),E.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(){r.cancel(this.state.timeout)},onStart:function(e,n){return this.state.registeredParent?(this.state.pos={x:n.x,y:n.y},void(this.state.timeout=r(t.bind(this,function(){this.dispatchEvent(e,"$md.hold"),this.cancel()}),this.state.options.delay,!1))):this.cancel()},onMove:function(e,t){u||"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){u&&(this.oldTouchAction=e[0].style[u],e[0].style[u]=t.horizontal?"pan-y":"pan-x")},onCleanup:function(e){this.oldTouchAction&&(e[0].style[u]=this.oldTouchAction)},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,o;u||"touchmove"!==e.type||e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,o=Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,o=Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=T(e),k(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):o&&this.cancel())},dispatchDragMove:o.throttle(function(e){this.state.isRunning&&(k(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(k(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 g(e){this.name=e,this.state={}}function A(){function n(e,n,o){o=o||j;var r=new t.element.Event(n);r.$material=!0,r.pointer=o,r.srcEvent=e,t.extend(r,{clientX:o.x,clientY:o.y,screenX:o.x,screenY:o.y,pageX:o.x,pageY:o.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),t.element(o.target).trigger(r)}function o(t,n,o){o=o||j;var r;"click"===n||"mouseup"==n||"mousedown"==n?(r=document.createEvent("MouseEvents"),r.initMouseEvent(n,!0,!0,e,t.detail,o.x,o.y,o.x,o.y,t.ctrlKey,t.altKey,t.shiftKey,t.metaKey,t.button,t.relatedTarget||null)):(r=document.createEvent("CustomEvent"),r.initCustomEvent(n,!0,!0,{})),r.$material=!0,r.pointer=o,r.srcEvent=t,o.target.dispatchEvent(r)}var r="undefined"!=typeof e.jQuery&&t.element===e.jQuery;return g.prototype={options:{},dispatchEvent:r?n:o,onSetup:t.noop,onCleanup:t.noop,onStart:t.noop,onMove:t.noop,onEnd:t.noop,onCancel:t.noop,start:function(e,n){if(!this.state.isRunning){var o=this.getNearestParent(e.target),r=o&&o.$mdGesture[this.name]||{};this.state={isRunning:!0,options:t.extend({},this.options,r),registeredParent:o},this.onStart(e,n)}},move:function(e,t){this.state.isRunning&&this.onMove(e,t)},end:function(e,t){this.state.isRunning&&(this.onEnd(e,t),this.state.isRunning=!1)},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){function n(){delete e[0].$mdGesture[o.name],e.off("$destroy",n),o.onCleanup(e,t||{})}var o=this;return e[0].$mdGesture=e[0].$mdGesture||{},e[0].$mdGesture[this.name]=t||{},e.on("$destroy",n),o.onSetup(e,t||{}),n}},g}function v(e,n){function o(e){var t=!e.clientX&&!e.clientY;t||e.$material||e.isIonicTap||N(e)||"mousedown"===e.type&&(H(e.target)||H(document.activeElement))||(e.preventDefault(),e.stopPropagation())}function r(e){var t=0===e.clientX&&0===e.clientY,n=e.target&&"submit"===e.target.type;t||e.$material||e.isIonicTap||N(e)||n?(q=null,"label"==e.target.tagName.toLowerCase()&&(q={x:e.x,y:e.y})):(e.preventDefault(),e.stopPropagation(),q=null)}function d(e,t){var o;for(var r in F)o=F[r],o instanceof n&&("start"===e&&o.cancel(),o[e](t,j))}function a(e){if(!j){var t=+Date.now();U&&!_(e,U)&&t-U.endTime<1500||(j=T(e),d("start",e))}}function m(e){j&&_(e,j)&&(k(e,j),d("move",e))}function i(e){j&&_(e,j)&&(k(e,j),j.endTime=+Date.now(),"pointercancel"!==e.type&&d("end",e),U=j,j=null)}document.contains||(document.contains=function(e){return document.body.contains(e)}),!W&&e.isHijackingClicks&&(document.addEventListener("click",r,!0),document.addEventListener("mouseup",o,!0),document.addEventListener("mousedown",o,!0),document.addEventListener("focus",o,!0),W=!0);var c="mousedown touchstart pointerdown",l="mousemove touchmove pointermove",s="mouseup mouseleave touchend touchcancel pointerup pointercancel";t.element(document).on(c,a).on(l,m).on(s,i).on("$$mdGestureReset",function(){U=j=null})}function T(e){var t=y(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 _(e,t){return e&&t&&e.type.charAt(0)===t.type}function N(e){return q&&q.x==e.x&&q.y==e.y}function k(e,t){var n=y(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=t.distanceX>0?"right":t.distanceX<0?"left":"",t.directionY=t.distanceY>0?"down":t.distanceY<0?"up":"",t.duration=+Date.now()-t.startTime,t.velocityX=t.distanceX/t.duration,t.velocityY=t.distanceY/t.duration}function y(e){return e=e.originalEvent||e,e.touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}function H(e){return!!e&&"-1"!=e.getAttribute("tabindex")&&!e.hasAttribute("disabled")&&(e.hasAttribute("tabindex")||e.hasAttribute("href")||e.isContentEditable||["INPUT","SELECT","BUTTON","TEXTAREA","VIDEO","AUDIO"].indexOf(e.nodeName)!=-1)}function w(e,n){this.$timeout=e,this.$mdUtil=n,this.bodyElement=t.element(document.body),this.isBuffering=!1,this.bufferTimeout=null,this.lastInteractionType=null,this.lastInteractionTime=null,this.inputEventMap={keydown:"keyboard",mousedown:"mouse",mouseenter:"mouse",touchstart:"touch",pointerdown:"pointer",MSPointerDown:"pointer"},this.iePointerMap={2:"touch",3:"touch",4:"mouse"},this.initializeEvents()}function $(){function e(e){function n(e){return i.optionsFactory=e.options,i.methods=(e.methods||[]).concat(a),c}function o(e,t){return m[e]=t,c}function r(t,n){if(n=n||{},n.methods=n.methods||[],n.options=n.options||function(){return{}},/^cancel|hide|show$/.test(t))throw new Error("Preset '"+t+"' in "+e+" is reserved!");if(n.methods.indexOf("_options")>-1)throw new Error("Method '_options' in "+e+" is reserved!");return i.presets[t]={methods:n.methods.concat(a),optionsFactory:n.options,argOption:n.argOption},c}function d(n,o){function r(e){return e=e||{},e._options&&(e=e._options),s.show(t.extend({},l,e))}function d(e){return s.destroy(e)}function a(t,n){var r={};return r[e]=u,o.invoke(t||function(){return n},{},r)}var c,l,s=n(),u={hide:s.hide,cancel:s.cancel,show:r,destroy:d};return c=i.methods||[],l=a(i.optionsFactory,{}),t.forEach(m,function(e,t){u[t]=e}),t.forEach(i.presets,function(e,n){function o(e){this._options=t.extend({},r,e)}var r=a(e.optionsFactory,{}),d=(e.methods||[]).concat(c);if(t.extend(r,{$type:n}),t.forEach(d,function(e){o.prototype[e]=function(t){return this._options[e]=t,this}}),e.argOption){var m="show"+n.charAt(0).toUpperCase()+n.slice(1);u[m]=function(e){var t=u[n](e);return u.show(t)}}u[n]=function(n){return arguments.length&&e.argOption&&!t.isObject(n)&&!t.isArray(n)?(new o)[e.argOption](n):new o(n)}}),u}d.$inject=["$$interimElement","$injector"];var a=["onHide","onShow","onRemove"],m={},i={presets:{}},c={setDefaults:n,addPreset:r,addMethod:o,$get:d};return c.addPreset("build",{methods:["controller","controllerAs","resolve","multiple","template","templateUrl","themable","transformTemplate","parent","contentElement"]}),c}function o(e,o,r,d,a,m,i,c,l,s,u){return function(){function p(e){e=e||{};var t=new M(e||{}),n=e.multiple?o.resolve():o.all(v);e.multiple||(n=n.then(function(){var e=T.concat(_.map(g.cancel));return o.all(e)}));var r=n.then(function(){return t.show()["catch"](function(e){return e})["finally"](function(){v.splice(v.indexOf(r),1),_.push(t)})});return v.push(r),t.deferred.promise["catch"](function(e){return e instanceof Error&&u(e),e}),t.deferred.promise}function E(e,t){function r(n){var o=n.remove(e,!1,t||{})["catch"](function(e){return e})["finally"](function(){T.splice(T.indexOf(o),1)});return _.splice(_.indexOf(n),1),T.push(o),n.deferred.promise}return t=t||{},t.closeAll?o.all(_.slice().reverse().map(r)):t.closeTo!==n?o.all(_.slice(t.closeTo).map(r)):r(_[_.length-1])}function h(e,n){var r=_.pop();if(!r)return o.when(e);var d=r.remove(e,!0,n||{})["catch"](function(e){return e})["finally"](function(){T.splice(T.indexOf(d),1)});return T.push(d),r.deferred.promise["catch"](t.noop)}function f(e){return function(){var t=arguments;return _.length?e.apply(g,t):v.length?v[0]["finally"](function(){return e.apply(g,t)}):o.when("No interim elements currently showing up.")}}function b(e){var n=e?null:_.shift(),r=t.element(e).length&&t.element(e)[0].parentNode;if(r){var d=_.filter(function(e){return e.options.element[0]===r});d.length&&(n=d[0],_.splice(_.indexOf(n),1))}return n?n.remove(A,!1,{$destroy:!0}):o.when(A)}function M(s){function u(){return o(function(e,t){function n(e){T.deferred.reject(e),t(e)}s.onCompiling&&s.onCompiling(s),h(s).then(function(t){_=f(t,s),s.cleanupElement=t.cleanup,N=A(_,s,t.controller).then(e,n)})["catch"](n)})}function p(e,n,r){function d(e){T.deferred.resolve(e)}function a(e){T.deferred.reject(e)}return _?(s=t.extend(s||{},r||{}),s.cancelAutoHide&&s.cancelAutoHide(),s.element.triggerHandler("$mdInterimElementRemove"),s.$destroy===!0?v(s.element,s).then(function(){n&&a(e)||d(e)}):(o.when(N)["finally"](function(){v(s.element,s).then(function(){n?a(e):d(e)},a)}),T.deferred.promise)):o.when(!1)}function E(e){return e=e||{},e.template&&(e.template=i.processTemplate(e.template)),t.extend({preserveScope:!1,cancelAutoHide:t.noop,scope:e.scope||r.$new(e.isolateScope),onShow:function(e,t,n){return m.enter(t,n.parent)},onRemove:function(e,t){return t&&m.leave(t)||o.when()}},e)}function h(e){var t=e.skipCompile?null:c.compile(e);return t||o(function(t){t({locals:{},link:function(){return e.element}})})}function f(e,n){t.extend(e.locals,n);var o=e.link(n.scope);return n.element=o,n.parent=b(o,n),n.themable&&l(o),o}function b(n,o){var r=o.parent;if(r=t.isFunction(r)?r(o.scope,n,o):t.isString(r)?t.element(e[0].querySelector(r)):t.element(r),!(r||{}).length){var d;return a[0]&&a[0].querySelector&&(d=a[0].querySelector(":not(svg) > body")),d||(d=a[0]),"#comment"==d.nodeName&&(d=e[0].body),
t.element(d)}return r}function M(){var e,o=t.noop;s.hideDelay&&(e=d(g.hide,s.hideDelay),o=function(){d.cancel(e)}),s.cancelAutoHide=function(){o(),s.cancelAutoHide=n}}function A(e,n,r){var d=n.onShowing||t.noop,a=n.onComplete||t.noop;try{d(n.scope,e,n,r)}catch(m){return o.reject(m)}return o(function(t,d){try{o.when(n.onShow(n.scope,e,n,r)).then(function(){a(n.scope,e,n),M(),t(e)},d)}catch(m){d(m.message)}})}function v(e,n){var r=n.onRemoving||t.noop;return o(function(t,d){try{var a=o.when(n.onRemove(n.scope,e,n)||!0);r(e,a),n.$destroy?(t(e),!n.preserveScope&&n.scope&&a.then(function(){n.scope.$destroy()})):a.then(function(){!n.preserveScope&&n.scope&&n.scope.$destroy(),t(e)},d)}catch(m){d(m.message)}})}var T,_,N=o.when(!0);return s=E(s),T={options:s,deferred:o.defer(),show:u,remove:p}}var g,A=!1,v=[],T=[],_=[];return g={show:p,hide:f(E),cancel:f(h),destroy:b,$injector_:s}}}return o.$inject=["$document","$q","$rootScope","$timeout","$rootElement","$animate","$mdUtil","$mdCompiler","$mdTheming","$injector","$exceptionHandler"],e.$get=o,e}function x(e){this._$timeout=e,this._liveElement=this._createLiveElement(),this._announceTimeout=100}function C(e,o){function r(e){return e&&""!==e}var d,a=[],m={};return d={notFoundError:function(t,n){e.error((n||"")+"No instance found for handle",t)},getInstances:function(){return a},get:function(e){if(!r(e))return null;var t,n,o;for(t=0,n=a.length;t<n;t++)if(o=a[t],o.$$mdHandle===e)return o;return null},register:function(e,n){function o(){var t=a.indexOf(e);t!==-1&&a.splice(t,1)}function r(){var t=m[n];t&&(t.forEach(function(t){t.resolve(e)}),delete m[n])}return n?(e.$$mdHandle=n,a.push(e),r(),o):t.noop},when:function(e){if(r(e)){var t=o.defer(),a=d.get(e);return a?t.resolve(a):(m[e]===n&&(m[e]=[]),m[e].push(t)),t.promise}return o.reject("Invalid `md-component-id` value.")}}}function S(e,n){return{controller:t.noop,link:function(t,o,r){r.hasOwnProperty("mdInkRippleCheckbox")?n.attach(t,o):e.attach(t,o)}}}function D(){function e(){n=!0}var n=!1;return{disableInkRipple:e,$get:["$injector",function(e){function o(o,r,d){return n||r.controller("mdNoInk")?t.noop:e.instantiate(R,{$scope:o,$element:r,rippleOptions:d})}return{attach:o}}]}}function R(e,n,o,r,d,a,m){this.$window=r,this.$timeout=d,this.$mdUtil=a,this.$mdColorUtil=m,this.$scope=e,this.$element=n,this.options=o,this.mousedown=!1,this.ripples=[],this.timeout=null,this.lastRipple=null,a.valueOnUse(this,"container",this.createContainer),this.$element.addClass("md-ink-ripple"),(n.controller("mdInkRipple")||{}).createRipple=t.bind(this,this.createRipple),(n.controller("mdInkRipple")||{}).setColor=t.bind(this,this.color),this.bindEvents()}function O(e,n){(e.mousedown||e.lastRipple)&&(e.mousedown=!1,e.$mdUtil.nextTick(t.bind(e,n),!1))}function I(){return{controller:t.noop}}function P(n,o,r,d,a){var m;return m={translate3d:function(e,t,n,o){function r(n){return a(e,{to:n||t,addClass:o.transitionOutClass,removeClass:o.transitionInClass,duration:o.duration}).start()}return a(e,{from:t,to:n,addClass:o.transitionInClass,removeClass:o.transitionOutClass,duration:o.duration}).start().then(function(){return r})},waitTransitionEnd:function(t,n){var a=3e3;return o(function(o,m){function i(e){e&&e.target!==t[0]||(e&&r.cancel(l),t.off(d.CSS.TRANSITIONEND,i),o())}function c(n){return n=n||e.getComputedStyle(t[0]),"0s"==n.transitionDuration||!n.transition&&!n.transitionProperty}n=n||{},c(n.cachedTransitionStyles)&&(a=0);var l=r(i,n.timeout||a);t.on(d.CSS.TRANSITIONEND,i)})},calculateTransformValues:function(e,t){function n(){var t=e?e.parent():null,n=t?t.parent():null;return n?m.clientRect(n):null}var o=t.element,r=t.bounds;if(o||r){var d=o?m.clientRect(o)||n():m.copyRect(r),a=m.copyRect(e[0].getBoundingClientRect()),i=m.centerPointFor(a),c=m.centerPointFor(d);return{centerX:c.x-i.x,centerY:c.y-i.y,scaleX:Math.round(100*Math.min(.5,d.width/a.width))/100,scaleY:Math.round(100*Math.min(.5,d.height/a.height))/100}}return{centerX:0,centerY:0,scaleX:.5,scaleY:.5}},calculateZoomToOrigin:function(e,o){var r="translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )",d=t.bind(null,n.supplant,r);return d(m.calculateTransformValues(e,o))},calculateSlideToOrigin:function(e,o){var r="translate3d( {centerX}px, {centerY}px, 0 )",d=t.bind(null,n.supplant,r);return d(m.calculateTransformValues(e,o))},toCss:function(e){function n(e,n,r){t.forEach(n.split(" "),function(e){o[e]=r})}var o={},r="left top right bottom width height x y min-width min-height max-width max-height";return t.forEach(e,function(e,a){if(!t.isUndefined(e))if(r.indexOf(a)>=0)o[a]=e+"px";else switch(a){case"transition":n(a,d.CSS.TRANSITION,e);break;case"transform":n(a,d.CSS.TRANSFORM,e);break;case"transformOrigin":n(a,d.CSS.TRANSFORM_ORIGIN,e);break;case"font-size":o["font-size"]=e}}),o},toTransformCss:function(e,n,o){var r={};return t.forEach(d.CSS.TRANSFORM.split(" "),function(t){r[t]=e}),n&&(o=o||"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important",r.transition=o),r},copyRect:function(e,n){return e?(n=n||{},t.forEach("left top right bottom width height".split(" "),function(t){n[t]=Math.round(e[t])}),n.width=n.width||n.right-n.left,n.height=n.height||n.bottom-n.top,n):null},clientRect:function(e){var n=t.element(e)[0].getBoundingClientRect(),o=function(e){return e&&e.width>0&&e.height>0};return o(n)?m.copyRect(n):null},centerPointFor:function(e){return e?{x:Math.round(e.left+e.width/2),y:Math.round(e.top+e.height/2)}:{x:0,y:0}}}}o.$inject=["$log","$injector"],r.$inject=["$provide","$mdThemingProvider"],d.$inject=["$delegate"],a.$inject=["$delegate"],t.module("material.core",["ngAnimate","material.core.animate","material.core.layout","material.core.interaction","material.core.gestures","material.core.theming"]).config(r).run(o),m.$inject=["$parse"],t.module("material.core").directive("mdAutofocus",m).directive("mdAutoFocus",m).directive("mdSidenavFocus",m),t.module("material.core").factory("$mdColorUtil",i),t.module("material.core").factory("$mdConstant",c),t.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.iterator=l,e}])}]),s.$inject=["$mdConstant","$rootScope","$window"],t.module("material.core").factory("$mdMedia",s),t.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.prefixer=u,e}])}]),p.$inject=["$document","$timeout","$compile","$rootScope","$$mdAnimate","$interpolate","$log","$rootElement","$window","$$rAF"];var L=0;t.module("material.core").factory("$mdUtil",p),t.element.prototype.focus=t.element.prototype.focus||function(){return this.length&&this[0].focus(),this},t.element.prototype.blur=t.element.prototype.blur||function(){return this.length&&this[0].blur(),this},h.$inject=["$$rAF","$log","$window","$interpolate"],t.module("material.core").provider("$mdAria",E),t.module("material.core").provider("$mdCompiler",f),f.$inject=["$compileProvider"],M.$inject=["$$MdGestureHandler","$$rAF","$timeout"],v.$inject=["$mdGesture","$$MdGestureHandler"];var j,U,F={},Y=!1,B=6,q=null,W=!1;t.module("material.core.gestures",[]).provider("$mdGesture",b).factory("$$MdGestureHandler",A).run(v),b.prototype={skipClickHijack:function(){return Y=!0},setMaxClickDistance:function(e){B=parseInt(e)},$get:["$$MdGestureHandler","$$rAF","$timeout",function(e,t,n){return new M(e,t,n)}]},w.$inject=["$timeout","$mdUtil"],t.module("material.core.interaction",[]).service("$mdInteraction",w),w.prototype.initializeEvents=function(){var t="MSPointerEvent"in e?"MSPointerDown":"PointerEvent"in e?"pointerdown":null;this.bodyElement.on("keydown mousedown",this.onInputEvent.bind(this)),"ontouchstart"in document.documentElement&&this.bodyElement.on("touchstart",this.onBufferInputEvent.bind(this)),t&&this.bodyElement.on(t,this.onInputEvent.bind(this))},w.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()}},w.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)},w.prototype.getLastInteractionType=function(){return this.lastInteractionType},w.prototype.isUserInvoked=function(e){var n=t.isNumber(e)?e:15;return this.lastInteractionTime>=this.$mdUtil.now()-n},t.module("material.core").provider("$$interimElement",$),function(){function e(e){function m(e){return e.replace(s,"").replace(u,function(e,t,n,o){return o?n.toUpperCase():n})}var s=/^((?:x|data)[:\-_])/i,u=/([:\-_]+(.))/g,p=["","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print"],E=["layout","flex","flex-order","flex-offset","layout-align"],h=["show","hide","layout-padding","layout-margin"];t.forEach(p,function(n){t.forEach(E,function(t){var o=n?t+"-"+n:t;e.directive(m(o),d(o))}),t.forEach(h,function(t){var o=n?t+"-"+n:t;e.directive(m(o),a(o))})}),e.provider("$$mdLayout",function(){return{$get:t.noop,validateAttributeValue:l,validateAttributeUsage:c,disableLayouts:function(e){k.enabled=e!==!0}}}).directive("mdLayoutCss",o).directive("ngCloak",r("ng-cloak")).directive("layoutWrap",a("layout-wrap")).directive("layoutNowrap",a("layout-nowrap")).directive("layoutNoWrap",a("layout-no-wrap")).directive("layoutFill",a("layout-fill")).directive("layoutLtMd",i("layout-lt-md",!0)).directive("layoutLtLg",i("layout-lt-lg",!0)).directive("flexLtMd",i("flex-lt-md",!0)).directive("flexLtLg",i("flex-lt-lg",!0)).directive("layoutAlignLtMd",i("layout-align-lt-md")).directive("layoutAlignLtLg",i("layout-align-lt-lg")).directive("flexOrderLtMd",i("flex-order-lt-md")).directive("flexOrderLtLg",i("flex-order-lt-lg")).directive("offsetLtMd",i("flex-offset-lt-md")).directive("offsetLtLg",i("flex-offset-lt-lg")).directive("hideLtMd",i("hide-lt-md")).directive("hideLtLg",i("hide-lt-lg")).directive("showLtMd",i("show-lt-md")).directive("showLtLg",i("show-lt-lg")).config(n)}function n(){var e=!!document.querySelector("[md-layouts-disabled]");k.enabled=!e}function o(){return k.enabled=!1,{restrict:"A",priority:"900"}}function r(e){return["$timeout",function(n){return{restrict:"A",priority:-10,compile:function(o){return k.enabled?(o.addClass(e),function(t,o){n(function(){o.removeClass(e)},10,!1)}):t.noop}}}]}function d(e){function n(t,n,o){var r=m(n,e,o),d=o.$observe(o.$normalize(e),r);r(p(e,o,"")),t.$on("$destroy",function(){d()})}return["$mdUtil","$interpolate","$log",function(o,r,d){return f=o,b=r,M=d,{restrict:"A",compile:function(o,r){var d;return k.enabled&&(c(e,r,o,M),l(e,p(e,r,""),s(o,e,r)),d=n),d||t.noop}}}]}function a(e){function n(t,n){n.addClass(e)}return["$mdUtil","$interpolate","$log",function(o,r,d){return f=o,b=r,M=d,{restrict:"A",compile:function(o,r){var d;return k.enabled&&(l(e,p(e,r,""),s(o,e,r)),n(null,o),d=n),d||t.noop}}}]}function m(e,n){var o;return function(r){var d=l(n,r||"");t.isDefined(d)&&(o&&e.removeClass(o),o=d?n+"-"+d.trim().replace(A,"-"):n,e.addClass(o))}}function i(e){var n=e.split("-");return["$log",function(o){return o.warn(e+"has been deprecated. Please use a `"+n[0]+"-gt-<xxx>` variant."),t.noop}]}function c(e,t,n,o){var r,d,a,m=n[0].nodeName.toLowerCase();switch(e.replace(g,"")){case"flex":"md-button"!=m&&"fieldset"!=m||(d="<"+m+" "+e+"></"+m+">",a="https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers",r="Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",o.warn(f.supplant(r,[d,a])))}}function l(e,n,o){var r;if(!u(n)){switch(e.replace(g,"")){case"layout":E(n,T)||(n=T[0]);break;case"flex":E(n,v)||isNaN(n)&&(n="");break;case"flex-offset":case"flex-order":n&&!isNaN(+n)||(n="0");break;case"layout-align":var d=h(n);n=f.supplant("{main}-{cross}",d);break;case"layout-padding":case"layout-margin":case"layout-fill":case"layout-wrap":case"layout-nowrap":n=""}n!=r&&(o||t.noop)(n)}return n?n.trim():""}function s(e,t,n){return function(e){u(e)||(n[n.$normalize(t)]=e)}}function u(e){return(e||"").indexOf(b.startSymbol())>-1}function p(e,t,n){var o=t.$normalize(e);return t[o]?t[o].trim().replace(A,"-"):n||null}function E(e,t,n){e=n&&e?e.replace(A,n):e;var o=!1;return e&&t.forEach(function(t){t=n?t.replace(A,n):t,o=o||t===e}),o}function h(e){var t,n={main:"start",cross:"stretch"};return e=e||"",0!==e.indexOf("-")&&0!==e.indexOf(" ")||(e="none"+e),t=e.toLowerCase().trim().replace(A,"-").split("-"),t.length&&"space"===t[0]&&(t=[t[0]+"-"+t[1],t[2]]),t.length>0&&(n.main=t[0]||n.main),t.length>1&&(n.cross=t[1]||n.cross),_.indexOf(n.main)<0&&(n.main="start"),N.indexOf(n.cross)<0&&(n.cross="stretch"),n}var f,b,M,g=/(-gt)?-(sm|md|lg|print)/g,A=/\s+/g,v=["grow","initial","auto","none","noshrink","nogrow"],T=["row","column"],_=["","start","center","end","stretch","space-around","space-between"],N=["","start","center","end","stretch"],k={enabled:!0,breakpoints:[]};e(t.module("material.core.layout",["ng"]))}(),x.$inject=["$timeout"],t.module("material.core").service("$mdLiveAnnouncer",x),x.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)},x.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},t.module("material.core.meta",[]).provider("$$mdMeta",function(){function e(e){if(d[e])return!0;var n=document.getElementsByName(e)[0];return!!n&&(d[e]=t.element(n),!0)}function n(n,o){if(e(n),d[n])d[n].attr("content",o);else{var a=t.element('<meta name="'+n+'" content="'+o+'"/>');r.append(a),d[n]=a}return function(){d[n].attr("content",""),d[n].remove(),delete d[n]}}function o(t){if(!e(t))throw Error("$$mdMeta: could not find a meta tag with the name '"+t+"'");return d[t].attr("content")}var r=t.element(document.head),d={},a={setMeta:n,getMeta:o};return t.extend({},a,{$get:function(){return a}})}),C.$inject=["$log","$q"],t.module("material.core").factory("$mdComponentRegistry",C),function(){function e(e){function n(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}}return{attach:function(o,r,d){return d=t.extend(n(r),d),e.attach(o,r,d)}}}e.$inject=["$mdInkRipple"],t.module("material.core").factory("$mdButtonInkRipple",e)}(),function(){function e(e){function n(n,o,r){return e.attach(n,o,t.extend({center:!0,dimBackground:!1,fitRipple:!0},r))}return{attach:n}}e.$inject=["$mdInkRipple"],t.module("material.core").factory("$mdCheckboxInkRipple",e)}(),function(){function e(e){function n(n,o,r){return e.attach(n,o,t.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},r))}return{attach:n}}e.$inject=["$mdInkRipple"],t.module("material.core").factory("$mdListInkRipple",e)}(),R.$inject=["$scope","$element","rippleOptions","$window","$timeout","$mdUtil","$mdColorUtil"],S.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"],t.module("material.core").provider("$mdInkRipple",D).directive("mdInkRipple",S).directive("mdNoInk",I).directive("mdNoBar",I).directive("mdNoStretch",I);var X=450;R.prototype.color=function(e){function n(){var e=o.options&&o.options.colorElement?o.options.colorElement:[],t=e.length?e[0]:o.$element[0];return t?o.$window.getComputedStyle(t).color:"rgb(0,0,0)"}var o=this;return t.isDefined(e)&&(o._color=o._parseColor(e)),o._color||o._parseColor(o.inkRipple())||o._parseColor(n())},R.prototype.calculateColor=function(){return this.color()},R.prototype._parseColor=function(e,t){t=t||1;var n=this.$mdColorUtil;if(e)return 0===e.indexOf("rgba")?e.replace(/\d?\.?\d*\s*\)\s*$/,(.1*t).toString()+")"):0===e.indexOf("rgb")?n.rgbToRgba(e):0===e.indexOf("#")?n.hexToRgba(e):void 0},R.prototype.bindEvents=function(){this.$element.on("mousedown",t.bind(this,this.handleMousedown)),this.$element.on("mouseup touchend",t.bind(this,this.handleMouseup)),this.$element.on("mouseleave",t.bind(this,this.handleMouseup)),this.$element.on("touchmove",t.bind(this,this.handleTouchmove))},R.prototype.handleMousedown=function(e){if(!this.mousedown)if(e.hasOwnProperty("originalEvent")&&(e=e.originalEvent),this.mousedown=!0,this.options.center)this.createRipple(this.container.prop("clientWidth")/2,this.container.prop("clientWidth")/2);else if(e.srcElement!==this.$element[0]){var t=this.$element[0].getBoundingClientRect(),n=e.clientX-t.left,o=e.clientY-t.top;this.createRipple(n,o)}else this.createRipple(e.offsetX,e.offsetY)},R.prototype.handleMouseup=function(){O(this,this.clearRipples)},R.prototype.handleTouchmove=function(){O(this,this.deleteRipples)},R.prototype.deleteRipples=function(){for(var e=0;e<this.ripples.length;e++)this.ripples[e].remove()},R.prototype.clearRipples=function(){for(var e=0;e<this.ripples.length;e++)this.fadeInComplete(this.ripples[e])},R.prototype.createContainer=function(){var e=t.element('<div class="md-ripple-container"></div>');return this.$element.append(e),e},R.prototype.clearTimeout=function(){this.timeout&&(this.$timeout.cancel(this.timeout),this.timeout=null)},R.prototype.isRippleAllowed=function(){var e=this.$element[0];do{if(!e.tagName||"BODY"===e.tagName)break;if(e&&t.isFunction(e.hasAttribute)){if(e.hasAttribute("disabled"))return!1;if("false"===this.inkRipple()||"0"===this.inkRipple())return!1}}while(e=e.parentNode);return!0},R.prototype.inkRipple=function(){return this.$element.attr("md-ink-ripple")},R.prototype.createRipple=function(e,n){function o(e,t,n){return e?Math.max(t,n):Math.sqrt(Math.pow(t,2)+Math.pow(n,2))}if(this.isRippleAllowed()){var r=this,d=r.$mdColorUtil,a=t.element('<div class="md-ripple